From 9dd7a74d103b16064bed67b962b352dfab100a95 Mon Sep 17 00:00:00 2001 From: "J.P. Poveda" Date: Sat, 30 Dec 2017 14:45:19 -0800 Subject: [PATCH] #111 --- index.ts | 1 + package-lock.json | 2676 +++++++++++------ package.json | 40 +- src/core/@injectable/index.ts | 2 +- src/core/@injectable/injectable.spec.ts | 13 +- src/core/@injectable/sakura-api-injectable.ts | 29 - src/core/@injectable/sapi-injectable-mixin.ts | 30 + src/core/@model/db.spec.ts | 28 +- src/core/@model/index.ts | 2 +- src/core/@model/json.spec.ts | 38 +- src/core/@model/model.spec.ts | 41 +- src/core/@model/model.ts | 24 +- src/core/@model/private.spec.ts | 5 +- src/core/@model/sakura-api-model.ts | 118 - src/core/@model/sapi-model-mixin.ts | 94 + src/core/@routable/index.ts | 2 +- src/core/@routable/routable.spec.ts | 25 +- src/core/@routable/route.spec.ts | 9 +- src/core/@routable/sakura-api-routable.ts | 45 - src/core/@routable/sapi-routable-mixin.ts | 37 + src/core/helpers/constructor-type.ts | 4 + src/core/sakura-api.spec.ts | 4 +- src/handlers/basic-handlers.ts | 4 +- 23 files changed, 2042 insertions(+), 1229 deletions(-) delete mode 100644 src/core/@injectable/sakura-api-injectable.ts create mode 100644 src/core/@injectable/sapi-injectable-mixin.ts delete mode 100644 src/core/@model/sakura-api-model.ts create mode 100644 src/core/@model/sapi-model-mixin.ts delete mode 100644 src/core/@routable/sakura-api-routable.ts create mode 100644 src/core/@routable/sapi-routable-mixin.ts create mode 100644 src/core/helpers/constructor-type.ts diff --git a/index.ts b/index.ts index 9a345e6..34166d7 100644 --- a/index.ts +++ b/index.ts @@ -2,3 +2,4 @@ import 'colors'; export * from './src/boot'; export * from './src/core'; + diff --git a/package-lock.json b/package-lock.json index 332379e..e28be8a 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,16 +1,26 @@ { "name": "@sakuraapi/api", - "version": "0.7.0", + "version": "0.8.0-1", "lockfileVersion": 1, "requires": true, "dependencies": { + "@types/body-parser": { + "version": "1.16.8", + "resolved": "https://registry.npmjs.org/@types/body-parser/-/body-parser-1.16.8.tgz", + "integrity": "sha512-BdN2PXxOFnTXFcyONPW6t0fHjz2fvRZHVMFpaS0wYr+Y8fWEaNOs4V8LEu/fpzQlMx+ahdndgTaGTwPC+J/EeA==", + "dev": true, + "requires": { + "@types/express": "4.11.0", + "@types/node": "8.5.2" + } + }, "@types/bson": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/@types/bson/-/bson-1.0.3.tgz", - "integrity": "sha1-bCbwh2v52Muwbt1AGeKTVL86A+A=", + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/@types/bson/-/bson-1.0.6.tgz", + "integrity": "sha512-v7N8qcTGiYhLRyi+Y69R3tPC4GLqByCg3NC2EO6PciC166O9dNhjFPoXeMePtZ+0f+/O2xLDWXs5BLnRfcBaBA==", "dev": true, "requires": { - "@types/node": "8.0.46" + "@types/node": "8.5.2" } }, "@types/colors": { @@ -20,28 +30,35 @@ "dev": true }, "@types/debug": { - "version": "0.0.29", - "resolved": "https://registry.npmjs.org/@types/debug/-/debug-0.0.29.tgz", - "integrity": "sha1-oeUUrfvZLwOiJLpU1pMRHb8fN1Q=", + "version": "0.0.30", + "resolved": "https://registry.npmjs.org/@types/debug/-/debug-0.0.30.tgz", + "integrity": "sha512-orGL5LXERPYsLov6CWs3Fh6203+dXzJkR7OnddIr2514Hsecwc8xRpzCapshBbKFImCsvS/mk6+FWiN5LyZJAQ==", + "dev": true + }, + "@types/events": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@types/events/-/events-1.1.0.tgz", + "integrity": "sha512-y3bR98mzYOo0pAZuiLari+cQyiKk3UXRuT45h1RjhfeCzqkjaVsfZJNaxdgtk7/3tzOm1ozLTqEqMP3VbI48jw==", "dev": true }, "@types/express": { - "version": "4.0.36", - "resolved": "https://registry.npmjs.org/@types/express/-/express-4.0.36.tgz", - "integrity": "sha512-bT9q2eqH/E72AGBQKT50dh6AXzheTqigGZ1GwDiwmx7vfHff0bZOrvUWjvGpNWPNkRmX1vDF6wonG6rlpBHb1A==", + "version": "4.11.0", + "resolved": "https://registry.npmjs.org/@types/express/-/express-4.11.0.tgz", + "integrity": "sha512-N1Wdp3v4KmdO3W/CM7KXrDwM4xcVZjlHF2dAOs7sNrTUX8PY3G4n9NkaHlfjGFEfgFeHmRRjywoBd4VkujDs9w==", "dev": true, "requires": { - "@types/express-serve-static-core": "4.0.48", - "@types/serve-static": "1.7.31" + "@types/body-parser": "1.16.8", + "@types/express-serve-static-core": "4.11.0", + "@types/serve-static": "1.13.1" } }, "@types/express-serve-static-core": { - "version": "4.0.48", - "resolved": "https://registry.npmjs.org/@types/express-serve-static-core/-/express-serve-static-core-4.0.48.tgz", - "integrity": "sha512-+W+fHO/hUI6JX36H8FlgdMHU3Dk4a/Fn08fW5qdd7MjPP/wJlzq9fkCrgaH0gES8vohVeqwefHwPa4ylVKyYIg==", + "version": "4.11.0", + "resolved": "https://registry.npmjs.org/@types/express-serve-static-core/-/express-serve-static-core-4.11.0.tgz", + "integrity": "sha512-hOi1QNb+4G+UjDt6CEJ6MjXHy+XceY7AxIa28U9HgJ80C+3gIbj7h5dJNxOI7PU3DO1LIhGP5Bs47Dbf5l8+MA==", "dev": true, "requires": { - "@types/node": "8.0.46" + "@types/node": "8.5.2" } }, "@types/fs-extra": { @@ -50,7 +67,7 @@ "integrity": "sha512-PlKJw6ujJXLJjbvB3T0UCbY3jibKM6/Ya5cc9j1q+mYDeK3aR4Dp+20ZwxSuvJr9mIoPxp7+IL4aMOEvsscRTA==", "dev": true, "requires": { - "@types/node": "8.0.46" + "@types/node": "8.5.2" } }, "@types/handlebars": { @@ -72,9 +89,9 @@ "dev": true }, "@types/lodash": { - "version": "4.14.66", - "resolved": "https://registry.npmjs.org/@types/lodash/-/lodash-4.14.66.tgz", - "integrity": "sha512-LpGSiIy5/utq8AT2bSXGnENnS1kCZJ1m84L1yqKst2UehSZe6VWROmiysYg/lLJR6zu2ooeVoQtkUHToA+mEtQ==", + "version": "4.14.91", + "resolved": "https://registry.npmjs.org/@types/lodash/-/lodash-4.14.91.tgz", + "integrity": "sha512-k+nc3moSlAaXacyvz4/c6D9lnUeI6AKsLvkXFuNzUEEqMw7sjDnLW2GqlJ4nyFgMX/p+QzvVG6zRoDo4lJIV5g==", "dev": true }, "@types/marked": { @@ -84,9 +101,9 @@ "dev": true }, "@types/mime": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/@types/mime/-/mime-1.3.1.tgz", - "integrity": "sha512-rek8twk9C58gHYqIrUlJsx8NQMhlxqHzln9Z9ODqiNgv3/s+ZwIrfr+djqzsnVM12xe9hL98iJ20lj2RvCBv6A==", + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/@types/mime/-/mime-2.0.0.tgz", + "integrity": "sha512-A2TAGbTFdBw9azHbpVd+/FkdW2T6msN1uct1O9bH3vTerEHKZhTXJUQXy+hNq1B0RagfU8U+KBdqiZpxjhOUQA==", "dev": true }, "@types/minimatch": { @@ -96,29 +113,30 @@ "dev": true }, "@types/mongodb": { - "version": "2.2.6", - "resolved": "https://registry.npmjs.org/@types/mongodb/-/mongodb-2.2.6.tgz", - "integrity": "sha512-IYMgWzhfLLYvMUmLvo3aaxSKYg+udWZ4j5vQJ+/uecRNFt5MnO2eI8nvbwwFYcIEwc1QRdFQZEL6JzcnE+DU9A==", + "version": "2.2.18", + "resolved": "https://registry.npmjs.org/@types/mongodb/-/mongodb-2.2.18.tgz", + "integrity": "sha512-bNookS+Y4N7B9/z9lZrTcVUdXSfrH8J+svBFCzxbCl5pOg32YeIgvKjrqD4yF7Ecec7bo7ZCdqajXS06TeuWdA==", "dev": true, "requires": { - "@types/bson": "1.0.3", - "@types/node": "8.0.46" + "@types/bson": "1.0.6", + "@types/events": "1.1.0", + "@types/node": "8.5.2" } }, "@types/node": { - "version": "8.0.46", - "resolved": "https://registry.npmjs.org/@types/node/-/node-8.0.46.tgz", - "integrity": "sha512-rRkP4kb5JYIfAoRKaDbcdPZBcTNOgzSApyzhPN9e6rhViSJAWQGlSXIX5gc75iR02jikhpzy3usu31wMHllfFw==", + "version": "8.5.2", + "resolved": "https://registry.npmjs.org/@types/node/-/node-8.5.2.tgz", + "integrity": "sha512-KA4GKOpgXnrqEH2eCVhiv2CsxgXGQJgV1X0vsGlh+WCnxbeAE1GT44ZsTU1IN5dEeV/gDupKa7gWo08V5IxWVQ==", "dev": true }, "@types/serve-static": { - "version": "1.7.31", - "resolved": "https://registry.npmjs.org/@types/serve-static/-/serve-static-1.7.31.tgz", - "integrity": "sha1-FUVt6NmNa0z/Mb5savdJKuY/Uho=", + "version": "1.13.1", + "resolved": "https://registry.npmjs.org/@types/serve-static/-/serve-static-1.13.1.tgz", + "integrity": "sha512-jDMH+3BQPtvqZVIcsH700Dfi8Q3MIcEx16g/VdxjoqiGR/NntekB10xdBpirMKnPe9z2C5cBmL0vte0YttOr3Q==", "dev": true, "requires": { - "@types/express-serve-static-core": "4.0.48", - "@types/mime": "1.3.1" + "@types/express-serve-static-core": "4.11.0", + "@types/mime": "2.0.0" } }, "@types/shelljs": { @@ -127,25 +145,25 @@ "integrity": "sha1-IpwVfGvB5n1rmQ5sXhjb0v9Yz/A=", "dev": true, "requires": { - "@types/node": "8.0.46" + "@types/node": "8.5.2" } }, "@types/superagent": { - "version": "3.5.0", - "resolved": "https://registry.npmjs.org/@types/superagent/-/superagent-3.5.0.tgz", - "integrity": "sha512-KoOAOLosNttYXQUiWUsbvIZ9Emn7BXLwfcHQfBj5H5WGlxTnr1sunwZxnBSkhcCYlbfwh/Lel8oeJW1c9k9awQ==", + "version": "3.5.6", + "resolved": "https://registry.npmjs.org/@types/superagent/-/superagent-3.5.6.tgz", + "integrity": "sha512-yGiVkRbB1qtIkRCpEJIxlHazBoILmu33xbbu4IiwxTJjwDi/EudiPYAD7QwWe035jkE40yQgTVXZsAePFtleww==", "dev": true, "requires": { - "@types/node": "8.0.46" + "@types/node": "8.5.2" } }, "@types/supertest": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/@types/supertest/-/supertest-2.0.1.tgz", - "integrity": "sha512-Bbb6TuZ5SNlsQ/M4EbbQRA6+wu7oQuCBVFuFu7/rV/bTTyCjCoBd0Qldr/YLBc1YYhI6JghT0wG+LuPIOIzxLA==", + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/@types/supertest/-/supertest-2.0.4.tgz", + "integrity": "sha512-0TvOJ+6XVMSImgqc2ClNllfVffCxHQhFbsbwOGzGTjdFydoaG052LPqnP8SnmSlnokOcQiPPcbz+Yi30LxWPyA==", "dev": true, "requires": { - "@types/superagent": "3.5.0" + "@types/superagent": "3.5.6" } }, "@types/uuid": { @@ -154,7 +172,7 @@ "integrity": "sha512-5fRLCYhLtDb3hMWqQyH10qtF+Ud2JnNCXTCZ+9ktNdCcgslcuXkDTkFcJNk++MT29yDntDnlF1+jD+uVGumsbw==", "dev": true, "requires": { - "@types/node": "8.0.46" + "@types/node": "8.5.2" } }, "abbrev": { @@ -164,12 +182,36 @@ "dev": true }, "accepts": { - "version": "1.3.3", - "resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.3.tgz", - "integrity": "sha1-w8p0NJOGSMPg2cHjKN1otiLChMo=", + "version": "1.3.4", + "resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.4.tgz", + "integrity": "sha1-hiRnWMfdbSGmR0/whKR0DsBesh8=", "requires": { - "mime-types": "2.1.15", + "mime-types": "2.1.17", "negotiator": "0.6.1" + }, + "dependencies": { + "mime-db": { + "version": "1.30.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.30.0.tgz", + "integrity": "sha1-dMZD2i3Z1qRTmZY0ZbJtXKfXHwE=" + }, + "mime-types": { + "version": "2.1.17", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.17.tgz", + "integrity": "sha1-Cdejk/A+mVp5+K+Fe3Cp4KsWVXo=", + "requires": { + "mime-db": "1.30.0" + } + } + } + }, + "agent-base": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-4.1.2.tgz", + "integrity": "sha512-VE6QoEdaugY86BohRtfGmTDabxdU5sCKOkbcPA6PXKJsRzEi/7A3RCTxJal1ft/4qSfPht5/iQLhMh/wzSkkNw==", + "dev": true, + "requires": { + "es6-promisify": "5.0.0" } }, "align-text": { @@ -189,6 +231,54 @@ "integrity": "sha1-SlKCrBZHKek2Gbz9OtFR+BfOkfU=", "dev": true }, + "ansi-align": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ansi-align/-/ansi-align-2.0.0.tgz", + "integrity": "sha1-w2rsy6VjuJzrVW82kPCx2eNUf38=", + "dev": true, + "requires": { + "string-width": "2.1.1" + }, + "dependencies": { + "ansi-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", + "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=", + "dev": true + }, + "is-fullwidth-code-point": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", + "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=", + "dev": true + }, + "string-width": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz", + "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==", + "dev": true, + "requires": { + "is-fullwidth-code-point": "2.0.0", + "strip-ansi": "4.0.0" + } + }, + "strip-ansi": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", + "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", + "dev": true, + "requires": { + "ansi-regex": "3.0.0" + } + } + } + }, + "ansi-escapes": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-3.0.0.tgz", + "integrity": "sha512-O/klc27mWNUigtv0F8NJWbLF00OcegQalkqKURWdosW08YZKi4m6CnSUSvIZG1otNJbTWhN01Hhz389DW7mvDQ==", + "dev": true + }, "ansi-regex": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", @@ -202,13 +292,13 @@ "dev": true }, "anymatch": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-1.3.0.tgz", - "integrity": "sha1-o+Uvo5FoyCX/V7AkgSbOWo/5VQc=", + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-1.3.2.tgz", + "integrity": "sha512-0XNayC8lTHQ2OI8aljNCN3sSx6hsr/1+rlcDAotXJR7C1oZZHCNsfpbKwMjRA3Uqb5tF1Rae2oloTr4xpq+WjA==", "dev": true, "requires": { - "arrify": "1.0.1", - "micromatch": "2.3.11" + "micromatch": "2.3.11", + "normalize-path": "2.1.1" } }, "argparse": { @@ -226,13 +316,13 @@ "integrity": "sha1-jzuCf5Vai9ZpaX5KQlasPOrjVs8=", "dev": true, "requires": { - "arr-flatten": "1.0.3" + "arr-flatten": "1.1.0" } }, "arr-flatten": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/arr-flatten/-/arr-flatten-1.0.3.tgz", - "integrity": "sha1-onTthawIhJtr14R8RYB0XcUa37E=", + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/arr-flatten/-/arr-flatten-1.1.0.tgz", + "integrity": "sha512-L3hKV5R/p5o81R7O02IGnwpDmkp6E982XhtbuwSe3O4qOtMMMtodicASA1Cny2U+aCXcNpml+m4dPsvsJ3jatg==", "dev": true }, "array-flatten": { @@ -246,16 +336,10 @@ "integrity": "sha1-odl8yvy8JiXMcPrc6zalDFiwGlM=", "dev": true }, - "arrify": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/arrify/-/arrify-1.0.1.tgz", - "integrity": "sha1-iYUI2iIm84DfkEcoRWhJwVAaSw0=", - "dev": true - }, "async": { - "version": "0.9.0", - "resolved": "https://registry.npmjs.org/async/-/async-0.9.0.tgz", - "integrity": "sha1-rDYTsdqb7RtHUQu0ZRuJMeRxRsc=", + "version": "1.5.2", + "resolved": "https://registry.npmjs.org/async/-/async-1.5.2.tgz", + "integrity": "sha1-7GphrlZIDAw8skHJVhjiCJL5Zyo=", "dev": true }, "async-each": { @@ -271,14 +355,14 @@ "dev": true }, "babel-code-frame": { - "version": "6.22.0", - "resolved": "https://registry.npmjs.org/babel-code-frame/-/babel-code-frame-6.22.0.tgz", - "integrity": "sha1-AnYgvuVnqIwyVhV05/0IAdMxGOQ=", + "version": "6.26.0", + "resolved": "https://registry.npmjs.org/babel-code-frame/-/babel-code-frame-6.26.0.tgz", + "integrity": "sha1-Y/1D99weO7fONZR9uP42mj9Yx0s=", "dev": true, "requires": { "chalk": "1.1.3", "esutils": "2.0.2", - "js-tokens": "3.0.1" + "js-tokens": "3.0.2" } }, "balanced-match": { @@ -288,9 +372,9 @@ "dev": true }, "binary-extensions": { - "version": "1.8.0", - "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-1.8.0.tgz", - "integrity": "sha1-SOyNFt9Dd+rl+liEaCSAr02Vx3Q=", + "version": "1.11.0", + "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-1.11.0.tgz", + "integrity": "sha1-RqoXUftqL5PuXmibsQh9SxTGwgU=", "dev": true }, "bindings": { @@ -299,31 +383,135 @@ "integrity": "sha1-FK1hE4EtLTfXLme0ystLtyZQXxE=" }, "body-parser": { - "version": "1.17.2", - "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.17.2.tgz", - "integrity": "sha1-+IkqvI+eYn1Crtr7yma/WrmRBO4=", + "version": "1.18.2", + "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.18.2.tgz", + "integrity": "sha1-h2eKGdhLR9hZuDGZvVm84iKxBFQ=", "dev": true, "requires": { - "bytes": "2.4.0", - "content-type": "1.0.2", - "debug": "2.6.7", - "depd": "1.1.0", - "http-errors": "1.6.1", - "iconv-lite": "0.4.15", + "bytes": "3.0.0", + "content-type": "1.0.4", + "debug": "2.6.9", + "depd": "1.1.1", + "http-errors": "1.6.2", + "iconv-lite": "0.4.19", "on-finished": "2.3.0", - "qs": "6.4.0", - "raw-body": "2.2.0", + "qs": "6.5.1", + "raw-body": "2.3.2", "type-is": "1.6.15" }, "dependencies": { "debug": { - "version": "2.6.7", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.7.tgz", - "integrity": "sha1-krrR9tBbu2u6Isyoi80OyJTChh4=", + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", "dev": true, "requires": { "ms": "2.0.0" } + }, + "qs": { + "version": "6.5.1", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.5.1.tgz", + "integrity": "sha512-eRzhrN1WSINYCDCbrz796z37LOe3m5tmW7RQf6oBntukAG1nmovJvhnwHHRMAfeoItc1m2Hk02WER2aQ/iqs+A==", + "dev": true + } + } + }, + "boom": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/boom/-/boom-5.2.0.tgz", + "integrity": "sha512-Z5BTk6ZRe4tXXQlkqftmsAUANpXmuwlsF5Oov8ThoMbQRzdGTA1ngYRW160GexgOgjsFOKJz0LYhoNi+2AMBUw==", + "dev": true, + "requires": { + "hoek": "4.2.0" + } + }, + "boxen": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/boxen/-/boxen-1.3.0.tgz", + "integrity": "sha512-TNPjfTr432qx7yOjQyaXm3dSR0MH9vXp7eT1BFSl/C51g+EFnOR9hTg1IreahGBmDNCehscshe45f+C1TBZbLw==", + "dev": true, + "requires": { + "ansi-align": "2.0.0", + "camelcase": "4.1.0", + "chalk": "2.3.0", + "cli-boxes": "1.0.0", + "string-width": "2.1.1", + "term-size": "1.2.0", + "widest-line": "2.0.0" + }, + "dependencies": { + "ansi-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", + "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=", + "dev": true + }, + "ansi-styles": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.0.tgz", + "integrity": "sha512-NnSOmMEYtVR2JVMIGTzynRkkaxtiq1xnFBcdQD/DnNCYPoEPsVJhM98BDyaoNOQIi7p4okdi3E27eN7GQbsUug==", + "dev": true, + "requires": { + "color-convert": "1.9.1" + } + }, + "camelcase": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-4.1.0.tgz", + "integrity": "sha1-1UVjW+HjPFQmScaRc+Xeas+uNN0=", + "dev": true + }, + "chalk": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.3.0.tgz", + "integrity": "sha512-Az5zJR2CBujap2rqXGaJKaPHyJ0IrUimvYNX+ncCy8PJP4ltOGTrHUIo097ZaL2zMeKYpiCdqDvS6zdrTFok3Q==", + "dev": true, + "requires": { + "ansi-styles": "3.2.0", + "escape-string-regexp": "1.0.5", + "supports-color": "4.5.0" + } + }, + "has-flag": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-2.0.0.tgz", + "integrity": "sha1-6CB68cx7MNRGzHC3NLXovhj4jVE=", + "dev": true + }, + "is-fullwidth-code-point": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", + "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=", + "dev": true + }, + "string-width": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz", + "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==", + "dev": true, + "requires": { + "is-fullwidth-code-point": "2.0.0", + "strip-ansi": "4.0.0" + } + }, + "strip-ansi": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", + "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", + "dev": true, + "requires": { + "ansi-regex": "3.0.0" + } + }, + "supports-color": { + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-4.5.0.tgz", + "integrity": "sha1-vnoN5ITexcXN34s9WRJQRJEvY1s=", + "dev": true, + "requires": { + "has-flag": "2.0.0" + } } } }, @@ -367,10 +555,16 @@ "resolved": "https://registry.npmjs.org/buffer-shims/-/buffer-shims-1.0.0.tgz", "integrity": "sha1-mXjOMXOIxkmth5MCjDR37wRKi1E=" }, + "builtin-modules": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/builtin-modules/-/builtin-modules-1.1.1.tgz", + "integrity": "sha1-Jw8HbFpywC9bZaR9+Uxf46J4iS8=", + "dev": true + }, "bytes": { - "version": "2.4.0", - "resolved": "https://registry.npmjs.org/bytes/-/bytes-2.4.0.tgz", - "integrity": "sha1-fZcZb51br39pNeJZhVSe3SpsIzk=", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.0.0.tgz", + "integrity": "sha1-0ygVQE1olpn4Wk6k+odV3ROpYEg=", "dev": true }, "camelcase": { @@ -386,6 +580,12 @@ "integrity": "sha1-FkpUg+Yw+kMh5a8HAg5TGDGyYJs=", "dev": true }, + "capture-stack-trace": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/capture-stack-trace/-/capture-stack-trace-1.0.0.tgz", + "integrity": "sha1-Sm+gc5nCa7pH8LJJa00PtAjFVQ0=", + "dev": true + }, "center-align": { "version": "0.1.3", "resolved": "https://registry.npmjs.org/center-align/-/center-align-0.1.3.tgz", @@ -418,15 +618,21 @@ } } }, + "chardet": { + "version": "0.4.2", + "resolved": "https://registry.npmjs.org/chardet/-/chardet-0.4.2.tgz", + "integrity": "sha1-tUc7M9yXxCTl2Y3IfVXU2KKci/I=", + "dev": true + }, "chokidar": { "version": "1.7.0", "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-1.7.0.tgz", "integrity": "sha1-eY5ol3gVHIB2tLNg5e3SjNortGg=", "dev": true, "requires": { - "anymatch": "1.3.0", + "anymatch": "1.3.2", "async-each": "1.0.1", - "fsevents": "1.1.2", + "fsevents": "1.1.3", "glob-parent": "2.0.0", "inherits": "2.0.3", "is-binary-path": "1.0.1", @@ -435,6 +641,46 @@ "readdirp": "2.1.0" } }, + "cli-boxes": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/cli-boxes/-/cli-boxes-1.0.0.tgz", + "integrity": "sha1-T6kXw+WclKAEzWH47lCdplFocUM=", + "dev": true + }, + "cli-cursor": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-2.1.0.tgz", + "integrity": "sha1-s12sN2R5+sw+lHR9QdDQ9SOP/LU=", + "dev": true, + "requires": { + "restore-cursor": "2.0.0" + } + }, + "cli-table2": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/cli-table2/-/cli-table2-0.2.0.tgz", + "integrity": "sha1-LR738hig54biFFQFYtS9F3/jLZc=", + "dev": true, + "requires": { + "colors": "1.1.2", + "lodash": "3.10.1", + "string-width": "1.0.2" + }, + "dependencies": { + "lodash": { + "version": "3.10.1", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-3.10.1.tgz", + "integrity": "sha1-W/Rejkm6QYnhfUgnid/RW9FAt7Y=", + "dev": true + } + } + }, + "cli-width": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/cli-width/-/cli-width-2.2.0.tgz", + "integrity": "sha1-/xnt6Kml5XkyQUewwR8PvLq+1jk=", + "dev": true + }, "cliui": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/cliui/-/cliui-2.1.0.tgz", @@ -461,6 +707,27 @@ "resolved": "https://registry.npmjs.org/co/-/co-4.6.0.tgz", "integrity": "sha1-bqa989hTrlTMuOR7+gvz+QMfsYQ=" }, + "code-point-at": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/code-point-at/-/code-point-at-1.1.0.tgz", + "integrity": "sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c=", + "dev": true + }, + "color-convert": { + "version": "1.9.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.1.tgz", + "integrity": "sha512-mjGanIiwQJskCC18rPR6OmrZ6fm2Lc7PeGFYwCmy5J34wC6F1PzdGL6xeMfmgicfYcNLGuVFA3WzXtIDCQSZxQ==", + "dev": true, + "requires": { + "color-name": "1.1.3" + } + }, + "color-name": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", + "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=", + "dev": true + }, "colors": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/colors/-/colors-1.1.2.tgz", @@ -476,13 +743,10 @@ } }, "commander": { - "version": "2.10.0", - "resolved": "https://registry.npmjs.org/commander/-/commander-2.10.0.tgz", - "integrity": "sha512-q/r9trjmuikWDRJNTBHAVnWhuU6w+z80KgBq7j9YDclik5E7X4xi0KnlZBNFA1zOQ+SH/vHMWd2mC9QTOz7GpA==", - "dev": true, - "requires": { - "graceful-readlink": "1.0.1" - } + "version": "2.12.2", + "resolved": "https://registry.npmjs.org/commander/-/commander-2.12.2.tgz", + "integrity": "sha512-BFnaq5ZOGcDN7FlrtBT4xxkgIToalIIxwjxLWVJ8bGTpe1LroqMiqQXdA7ygc7CRvaYS+9zfPGFnJqFSayx+AA==", + "dev": true }, "component-emitter": { "version": "1.2.1", @@ -497,50 +761,17 @@ "dev": true }, "configstore": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/configstore/-/configstore-1.4.0.tgz", - "integrity": "sha1-w1eB0FAdJowlxUuLF/YkDopPsCE=", + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/configstore/-/configstore-3.1.1.tgz", + "integrity": "sha512-5oNkD/L++l0O6xGXxb1EWS7SivtjfGQlRyxJsYgE0Z495/L81e2h4/d3r969hoPXuFItzNOKMtsXgYG4c7dYvw==", "dev": true, "requires": { + "dot-prop": "4.2.0", "graceful-fs": "4.1.11", - "mkdirp": "0.5.1", - "object-assign": "4.1.1", - "os-tmpdir": "1.0.2", - "osenv": "0.1.4", - "uuid": "2.0.3", - "write-file-atomic": "1.3.4", - "xdg-basedir": "2.0.0" - }, - "dependencies": { - "uuid": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-2.0.3.tgz", - "integrity": "sha1-Z+LoY3lyFVMN/zGOW/nc6/1Hsho=", - "dev": true - } - } - }, - "connect": { - "version": "3.6.2", - "resolved": "https://registry.npmjs.org/connect/-/connect-3.6.2.tgz", - "integrity": "sha1-aU6NIGgb/kkCgsiriGvpjwn0L+c=", - "dev": true, - "requires": { - "debug": "2.6.7", - "finalhandler": "1.0.3", - "parseurl": "1.3.1", - "utils-merge": "1.0.0" - }, - "dependencies": { - "debug": { - "version": "2.6.7", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.7.tgz", - "integrity": "sha1-krrR9tBbu2u6Isyoi80OyJTChh4=", - "dev": true, - "requires": { - "ms": "2.0.0" - } - } + "make-dir": "1.1.0", + "unique-string": "1.0.0", + "write-file-atomic": "2.3.0", + "xdg-basedir": "3.0.0" } }, "content-disposition": { @@ -558,9 +789,10 @@ } }, "content-type": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/content-type/-/content-type-1.0.2.tgz", - "integrity": "sha1-t9ETrueo3Se9IRM8TcJSnfFyHu0=" + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/content-type/-/content-type-1.0.4.tgz", + "integrity": "sha512-hIP3EEPs8tB9AT1L+NUqtwOAps4mk2Zob89MWXMHjHWg9milF/j4osnnQLXBCBFBk/tvIG/tUc9mOUJiPBhPXA==", + "dev": true }, "cookie": { "version": "0.3.1", @@ -589,6 +821,38 @@ "integrity": "sha1-jtolLsqrWEDc2XXOuQ2TcMgZ/4c=", "dev": true }, + "create-error-class": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/create-error-class/-/create-error-class-3.0.2.tgz", + "integrity": "sha1-Br56vvlHo/FKMP1hBnHUAbyot7Y=", + "dev": true, + "requires": { + "capture-stack-trace": "1.0.0" + } + }, + "cross-spawn": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-5.1.0.tgz", + "integrity": "sha1-6L0O/uWPz/b4+UUQoKVUu/ojVEk=", + "dev": true, + "requires": { + "lru-cache": "4.1.1", + "shebang-command": "1.2.0", + "which": "1.2.14" + } + }, + "crypto-random-string": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/crypto-random-string/-/crypto-random-string-1.0.0.tgz", + "integrity": "sha1-ojD2T1aDEOFJgAmUB5DsmVRbyn4=", + "dev": true + }, + "cvss": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/cvss/-/cvss-1.0.2.tgz", + "integrity": "sha1-32fpK/EqeW9J6Sh5nI2zunS5/NY=", + "dev": true + }, "dasherize": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/dasherize/-/dasherize-2.0.0.tgz", @@ -602,9 +866,9 @@ "dev": true }, "debug": { - "version": "2.6.8", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.8.tgz", - "integrity": "sha1-5zFTHKLt4n0YgiJCfaF4IdaP9Pw=", + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", + "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", "requires": { "ms": "2.0.0" } @@ -613,8 +877,7 @@ "version": "1.2.0", "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz", "integrity": "sha1-9lNNFRSCabIDUue+4m9QH5oZEpA=", - "dev": true, - "optional": true + "dev": true }, "deep-extend": { "version": "0.4.2", @@ -635,9 +898,10 @@ "dev": true }, "depd": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/depd/-/depd-1.1.0.tgz", - "integrity": "sha1-4b2Cxqq2ztlluXuIsX7T5SjKGMM=" + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/depd/-/depd-1.1.1.tgz", + "integrity": "sha1-V4O04cRZ8G+lyif5kfPQbnoxA1k=", + "dev": true }, "destroy": { "version": "1.0.4", @@ -645,9 +909,9 @@ "integrity": "sha1-l4hXRCxEdJ5CBmE+N5RiBYJqvYA=" }, "diff": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/diff/-/diff-3.2.0.tgz", - "integrity": "sha1-yc45Okt8vQsFinJck98pkCeGj/k=", + "version": "3.4.0", + "resolved": "https://registry.npmjs.org/diff/-/diff-3.4.0.tgz", + "integrity": "sha512-QpVuMTEoJMF7cKzi6bvWhRulU1fZqZnvyVQgNhPaxxuTYwyjn/j1v9falseQ/uXWwPnO56RBfwtg4h/EQXmucA==", "dev": true }, "dns-prefetch-control": { @@ -662,34 +926,37 @@ "integrity": "sha1-WTKJDcn04vGeXrAqIAJuXl78j1g=", "dev": true }, + "dot-prop": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/dot-prop/-/dot-prop-4.2.0.tgz", + "integrity": "sha512-tUMXrxlExSW6U2EXiiKGSBVdYgtV8qlHL+C10TsW4PURY/ic+eaysnSkwB4kA/mBlCyy/IKDJ+Lc3wbWeaXtuQ==", + "dev": true, + "requires": { + "is-obj": "1.0.1" + } + }, "duplexer": { "version": "0.1.1", "resolved": "https://registry.npmjs.org/duplexer/-/duplexer-0.1.1.tgz", "integrity": "sha1-rOb/gIwc5mtX0ev5eXessCM0z8E=", "dev": true }, - "duplexify": { - "version": "3.5.0", - "resolved": "https://registry.npmjs.org/duplexify/-/duplexify-3.5.0.tgz", - "integrity": "sha1-GqdzAC4VeEV+nZ1KULDMquvL1gQ=", - "dev": true, - "requires": { - "end-of-stream": "1.0.0", - "inherits": "2.0.3", - "readable-stream": "2.2.7", - "stream-shift": "1.0.0" - } + "duplexer3": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/duplexer3/-/duplexer3-0.1.4.tgz", + "integrity": "sha1-7gHdHKwO08vH/b6jfcCo8c4ALOI=", + "dev": true }, "ecstatic": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/ecstatic/-/ecstatic-1.4.1.tgz", - "integrity": "sha1-Mst7b6LikNWGaGdNEV6PDD1WfWo=", + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/ecstatic/-/ecstatic-2.2.1.tgz", + "integrity": "sha512-ztE4WqheoWLh3wv+HQwy7dACnvNY620coWpa+XqY6R2cVWgaAT2lUISU1Uf7JpdLLJCURktJOaA9av2AOzsyYQ==", "dev": true, "requires": { - "he": "0.5.0", + "he": "1.1.1", "mime": "1.3.4", "minimist": "1.2.0", - "url-join": "1.1.0" + "url-join": "2.0.2" } }, "ee-first": { @@ -702,24 +969,13 @@ "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.1.tgz", "integrity": "sha1-eePVhlU0aQn+bw9Fpd5oEDspTSA=" }, - "end-of-stream": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.0.0.tgz", - "integrity": "sha1-1FlucCc0qT5A6a+GQxnqvZn/Lw4=", + "error-ex": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.1.tgz", + "integrity": "sha1-+FWobOYa3E6GIcPNoh56dhLDqNw=", "dev": true, "requires": { - "once": "1.3.3" - }, - "dependencies": { - "once": { - "version": "1.3.3", - "resolved": "https://registry.npmjs.org/once/-/once-1.3.3.tgz", - "integrity": "sha1-suJhVXzkwxTsgwTz+oJmPkKXyiA=", - "dev": true, - "requires": { - "wrappy": "1.0.2" - } - } + "is-arrayish": "0.2.1" } }, "es6-promise": { @@ -727,6 +983,23 @@ "resolved": "https://registry.npmjs.org/es6-promise/-/es6-promise-3.2.1.tgz", "integrity": "sha1-7FYjOGgDKQkgcXDDlEjiREndH8Q=" }, + "es6-promisify": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/es6-promisify/-/es6-promisify-5.0.0.tgz", + "integrity": "sha1-UQnWLz5W6pZ8S2NQWu8IKRyKUgM=", + "dev": true, + "requires": { + "es6-promise": "4.2.2" + }, + "dependencies": { + "es6-promise": { + "version": "4.2.2", + "resolved": "https://registry.npmjs.org/es6-promise/-/es6-promise-4.2.2.tgz", + "integrity": "sha512-LSas5vsuA6Q4nEdf9wokY5/AJYXry98i0IzXsv49rYsgDGDNDPbqAYR1Pe23iFxygfbGZNR/5VrHXBCh2BhvUQ==", + "dev": true + } + } + }, "escape-html": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz", @@ -770,9 +1043,9 @@ "dev": true }, "etag": { - "version": "1.8.0", - "resolved": "https://registry.npmjs.org/etag/-/etag-1.8.0.tgz", - "integrity": "sha1-b2Ma7zNtbEY2K1F2QETOIWvjwFE=" + "version": "1.8.1", + "resolved": "https://registry.npmjs.org/etag/-/etag-1.8.1.tgz", + "integrity": "sha1-Qa4u62XvpiJorr/qg6x9eSmbCIc=" }, "event-stream": { "version": "3.3.4", @@ -795,6 +1068,21 @@ "integrity": "sha1-HIaZHYFq0eUEdQ5zh0Ik7PO+xQg=", "dev": true }, + "execa": { + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/execa/-/execa-0.7.0.tgz", + "integrity": "sha1-lEvs00zEHuMqY6n68nrVpl/Fl3c=", + "dev": true, + "requires": { + "cross-spawn": "5.1.0", + "get-stream": "3.0.0", + "is-stream": "1.1.0", + "npm-run-path": "2.0.2", + "p-finally": "1.0.0", + "signal-exit": "3.0.2", + "strip-eof": "1.0.0" + } + }, "exit": { "version": "0.1.2", "resolved": "https://registry.npmjs.org/exit/-/exit-0.1.2.tgz", @@ -826,47 +1114,125 @@ "dev": true }, "express": { - "version": "4.15.3", - "resolved": "https://registry.npmjs.org/express/-/express-4.15.3.tgz", - "integrity": "sha1-urZdDwOqgMNYQIly/HAPkWlEtmI=", + "version": "4.16.2", + "resolved": "https://registry.npmjs.org/express/-/express-4.16.2.tgz", + "integrity": "sha1-41xt/i1kt9ygpc1PIXgb4ymeB2w=", "requires": { - "accepts": "1.3.3", + "accepts": "1.3.4", "array-flatten": "1.1.1", + "body-parser": "1.18.2", "content-disposition": "0.5.2", - "content-type": "1.0.2", + "content-type": "1.0.4", "cookie": "0.3.1", "cookie-signature": "1.0.6", - "debug": "2.6.7", - "depd": "1.1.0", + "debug": "2.6.9", + "depd": "1.1.1", "encodeurl": "1.0.1", "escape-html": "1.0.3", - "etag": "1.8.0", - "finalhandler": "1.0.3", - "fresh": "0.5.0", + "etag": "1.8.1", + "finalhandler": "1.1.0", + "fresh": "0.5.2", "merge-descriptors": "1.0.1", "methods": "1.1.2", "on-finished": "2.3.0", - "parseurl": "1.3.1", + "parseurl": "1.3.2", "path-to-regexp": "0.1.7", - "proxy-addr": "1.1.4", - "qs": "6.4.0", + "proxy-addr": "2.0.2", + "qs": "6.5.1", "range-parser": "1.2.0", - "send": "0.15.3", - "serve-static": "1.12.3", - "setprototypeof": "1.0.3", + "safe-buffer": "5.1.1", + "send": "0.16.1", + "serve-static": "1.13.1", + "setprototypeof": "1.1.0", "statuses": "1.3.1", "type-is": "1.6.15", - "utils-merge": "1.0.0", - "vary": "1.1.1" + "utils-merge": "1.0.1", + "vary": "1.1.2" }, "dependencies": { + "body-parser": { + "version": "1.18.2", + "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.18.2.tgz", + "integrity": "sha1-h2eKGdhLR9hZuDGZvVm84iKxBFQ=", + "requires": { + "bytes": "3.0.0", + "content-type": "1.0.4", + "debug": "2.6.9", + "depd": "1.1.1", + "http-errors": "1.6.2", + "iconv-lite": "0.4.19", + "on-finished": "2.3.0", + "qs": "6.5.1", + "raw-body": "2.3.2", + "type-is": "1.6.15" + } + }, + "bytes": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.0.0.tgz", + "integrity": "sha1-0ygVQE1olpn4Wk6k+odV3ROpYEg=" + }, + "content-type": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/content-type/-/content-type-1.0.4.tgz", + "integrity": "sha512-hIP3EEPs8tB9AT1L+NUqtwOAps4mk2Zob89MWXMHjHWg9milF/j4osnnQLXBCBFBk/tvIG/tUc9mOUJiPBhPXA==" + }, "debug": { - "version": "2.6.7", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.7.tgz", - "integrity": "sha1-krrR9tBbu2u6Isyoi80OyJTChh4=", + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", "requires": { "ms": "2.0.0" } + }, + "depd": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/depd/-/depd-1.1.1.tgz", + "integrity": "sha1-V4O04cRZ8G+lyif5kfPQbnoxA1k=" + }, + "http-errors": { + "version": "1.6.2", + "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-1.6.2.tgz", + "integrity": "sha1-CgAsyFcHGSp+eUbO7cERVfYOxzY=", + "requires": { + "depd": "1.1.1", + "inherits": "2.0.3", + "setprototypeof": "1.0.3", + "statuses": "1.3.1" + }, + "dependencies": { + "setprototypeof": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.0.3.tgz", + "integrity": "sha1-ZlZ+NwQ+608E2RvWWMDL77VbjgQ=" + } + } + }, + "iconv-lite": { + "version": "0.4.19", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.19.tgz", + "integrity": "sha512-oTZqweIP51xaGPI4uPa56/Pri/480R+mo7SeU+YETByQNhDG55ycFyNLIgta9vXhILrxXDmF7ZGhqZIcuN0gJQ==" + }, + "qs": { + "version": "6.5.1", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.5.1.tgz", + "integrity": "sha512-eRzhrN1WSINYCDCbrz796z37LOe3m5tmW7RQf6oBntukAG1nmovJvhnwHHRMAfeoItc1m2Hk02WER2aQ/iqs+A==" + }, + "raw-body": { + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.3.2.tgz", + "integrity": "sha1-vNYMd9Prk83gBQKVw/N5OJvIj4k=", + "requires": { + "bytes": "3.0.0", + "http-errors": "1.6.2", + "iconv-lite": "0.4.19", + "unpipe": "1.0.0" + } + }, + "setprototypeof": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.1.0.tgz", + "integrity": "sha512-BvE/TwpZX4FXExxOxZyRGQQv651MSwmWKZGqvmPcRIjDqWub67kTKuIMx43cZZrS/cBBzwBcNDWoFxt2XEFIpQ==" } } }, @@ -876,6 +1242,25 @@ "integrity": "sha1-p1Xqe8Gt/MWjHOfnYtuq3F5jZEQ=", "dev": true }, + "external-editor": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/external-editor/-/external-editor-2.1.0.tgz", + "integrity": "sha512-E44iT5QVOUJBKij4IIV3uvxuNlbKS38Tw1HiupxEIHPv9qtC2PrDYohbXV5U+1jnfIXttny8gUhj+oZvflFlzA==", + "dev": true, + "requires": { + "chardet": "0.4.2", + "iconv-lite": "0.4.19", + "tmp": "0.0.33" + }, + "dependencies": { + "iconv-lite": { + "version": "0.4.19", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.19.tgz", + "integrity": "sha512-oTZqweIP51xaGPI4uPa56/Pri/480R+mo7SeU+YETByQNhDG55ycFyNLIgta9vXhILrxXDmF7ZGhqZIcuN0gJQ==", + "dev": true + } + } + }, "extglob": { "version": "0.3.2", "resolved": "https://registry.npmjs.org/extglob/-/extglob-0.3.2.tgz", @@ -891,6 +1276,15 @@ "integrity": "sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc=", "dev": true }, + "figures": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/figures/-/figures-2.0.0.tgz", + "integrity": "sha1-OrGi0qYsi/tDGgyUy3l6L84nyWI=", + "dev": true, + "requires": { + "escape-string-regexp": "1.0.5" + } + }, "filename-regex": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/filename-regex/-/filename-regex-2.0.1.tgz", @@ -911,29 +1305,38 @@ } }, "finalhandler": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.0.3.tgz", - "integrity": "sha1-70fneVDpmXgOhgIqVg4yF+DQzIk=", + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.1.0.tgz", + "integrity": "sha1-zgtoVbRYU+eRsvzGgARtiCU91/U=", "requires": { - "debug": "2.6.7", + "debug": "2.6.9", "encodeurl": "1.0.1", "escape-html": "1.0.3", "on-finished": "2.3.0", - "parseurl": "1.3.1", + "parseurl": "1.3.2", "statuses": "1.3.1", "unpipe": "1.0.0" }, "dependencies": { "debug": { - "version": "2.6.7", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.7.tgz", - "integrity": "sha1-krrR9tBbu2u6Isyoi80OyJTChh4=", + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", "requires": { "ms": "2.0.0" } } } }, + "find-up": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-2.1.0.tgz", + "integrity": "sha1-RdG35QbHF93UgndaK3eSCjwMV6c=", + "dev": true, + "requires": { + "locate-path": "2.0.0" + } + }, "for-in": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/for-in/-/for-in-1.0.2.tgz", @@ -967,9 +1370,9 @@ "dev": true }, "forwarded": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/forwarded/-/forwarded-0.1.0.tgz", - "integrity": "sha1-Ge+YdMSuHCl7zweP3mOgm2aoQ2M=" + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/forwarded/-/forwarded-0.1.2.tgz", + "integrity": "sha1-mMI9qxF1ZXuMBXPozszZGw/xjIQ=" }, "frameguard": { "version": "3.0.0", @@ -978,9 +1381,9 @@ "dev": true }, "fresh": { - "version": "0.5.0", - "resolved": "https://registry.npmjs.org/fresh/-/fresh-0.5.0.tgz", - "integrity": "sha1-9HTKXmqSRtb9jglTz6m5yAWvp44=" + "version": "0.5.2", + "resolved": "https://registry.npmjs.org/fresh/-/fresh-0.5.2.tgz", + "integrity": "sha1-PYyt2Q2XZWn6g1qx+OSyOhBWBac=" }, "from": { "version": "0.1.7", @@ -1006,14 +1409,14 @@ "dev": true }, "fsevents": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-1.1.2.tgz", - "integrity": "sha512-Sn44E5wQW4bTHXvQmvSHwqbuiXtduD6Rrjm2ZtUEGbyrig+nUH3t/QD4M4/ZXViY556TBpRgZkHLDx3JxPwxiw==", + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-1.1.3.tgz", + "integrity": "sha512-WIr7iDkdmdbxu/Gh6eKEZJL6KPE74/5MEsf2whTOFNxbIoIixogroLdKYqB6FDav4Wavh/lZdzzd3b2KxIXC5Q==", "dev": true, "optional": true, "requires": { "nan": "2.4.0", - "node-pre-gyp": "0.6.36" + "node-pre-gyp": "0.6.39" }, "dependencies": { "abbrev": { @@ -1171,7 +1574,6 @@ "version": "2.0.5", "bundled": true, "dev": true, - "optional": true, "requires": { "boom": "2.10.1" } @@ -1219,6 +1621,12 @@ "dev": true, "optional": true }, + "detect-libc": { + "version": "1.0.2", + "bundled": true, + "dev": true, + "optional": true + }, "ecc-jsbn": { "version": "0.1.1", "bundled": true, @@ -1360,7 +1768,6 @@ "version": "3.1.3", "bundled": true, "dev": true, - "optional": true, "requires": { "boom": "2.10.1", "cryptiles": "2.0.5", @@ -1532,11 +1939,13 @@ "optional": true }, "node-pre-gyp": { - "version": "0.6.36", + "version": "0.6.39", "bundled": true, "dev": true, "optional": true, "requires": { + "detect-libc": "1.0.2", + "hawk": "3.1.3", "mkdirp": "0.5.1", "nopt": "4.0.1", "npmlog": "4.1.0", @@ -1744,7 +2153,6 @@ "version": "1.0.9", "bundled": true, "dev": true, - "optional": true, "requires": { "hoek": "2.16.3" } @@ -1904,6 +2312,18 @@ } } }, + "get-caller-file": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-1.0.2.tgz", + "integrity": "sha1-9wLmMSfn4jHBYKgMFVSstw1QR+U=", + "dev": true + }, + "get-stream": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-3.0.0.tgz", + "integrity": "sha1-jpQ9E1jcN1VQVOy+LtsFqhdO3hQ=", + "dev": true + }, "glob": { "version": "5.0.15", "resolved": "https://registry.npmjs.org/glob/-/glob-5.0.15.tgz", @@ -1936,30 +2356,32 @@ "is-glob": "2.0.1" } }, + "global-dirs": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/global-dirs/-/global-dirs-0.1.1.tgz", + "integrity": "sha1-sxnA3UYH81PzvpzKTHL8FIxJ9EU=", + "dev": true, + "requires": { + "ini": "1.3.5" + } + }, "got": { - "version": "3.3.1", - "resolved": "https://registry.npmjs.org/got/-/got-3.3.1.tgz", - "integrity": "sha1-5dDtSvVfw+701WAHdp2YGSvLLso=", + "version": "6.7.1", + "resolved": "https://registry.npmjs.org/got/-/got-6.7.1.tgz", + "integrity": "sha1-JAzQV4WpoY5WHcG0S0HHY+8ejbA=", "dev": true, "requires": { - "duplexify": "3.5.0", - "infinity-agent": "2.0.3", + "create-error-class": "3.0.2", + "duplexer3": "0.1.4", + "get-stream": "3.0.0", "is-redirect": "1.0.0", + "is-retry-allowed": "1.1.0", "is-stream": "1.1.0", "lowercase-keys": "1.0.0", - "nested-error-stacks": "1.0.2", - "object-assign": "3.0.0", - "prepend-http": "1.0.4", - "read-all-stream": "3.1.0", - "timed-out": "2.0.0" - }, - "dependencies": { - "object-assign": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-3.0.0.tgz", - "integrity": "sha1-m+3VygiXlJvKR+f/QIBi1Un1h/I=", - "dev": true - } + "safe-buffer": "5.1.1", + "timed-out": "4.0.1", + "unzip-response": "2.0.1", + "url-parse-lax": "1.0.0" } }, "graceful-fs": { @@ -1968,12 +2390,6 @@ "integrity": "sha1-Dovf5NHduIVNZOBOp8AOKgJuVlg=", "dev": true }, - "graceful-readlink": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/graceful-readlink/-/graceful-readlink-1.0.1.tgz", - "integrity": "sha1-TK+tdrxi8C+gObL5Tpo906ORpyU=", - "dev": true - }, "handlebars": { "version": "4.0.10", "resolved": "https://registry.npmjs.org/handlebars/-/handlebars-4.0.10.tgz", @@ -2019,26 +2435,25 @@ "dev": true }, "he": { - "version": "0.5.0", - "resolved": "https://registry.npmjs.org/he/-/he-0.5.0.tgz", - "integrity": "sha1-LAX/rvkLaOhg8/0rVO9YCYknfuI=", + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/he/-/he-1.1.1.tgz", + "integrity": "sha1-k0EP0hsAlzUVH4howvJx80J+I/0=", "dev": true }, "helmet": { - "version": "3.6.1", - "resolved": "https://registry.npmjs.org/helmet/-/helmet-3.6.1.tgz", - "integrity": "sha1-kfOqf6TJRnFZX7Vo39jChImjiL4=", + "version": "3.9.0", + "resolved": "https://registry.npmjs.org/helmet/-/helmet-3.9.0.tgz", + "integrity": "sha512-czCyS77TyanWlfVSoGlb9GBJV2Q2zJayKxU5uBw0N1TzDTs/qVNh1SL8Q688KU0i0Sb7lQ/oLtnaEqXzl2yWvA==", "dev": true, "requires": { - "connect": "3.6.2", "dns-prefetch-control": "0.1.0", "dont-sniff-mimetype": "1.0.0", "expect-ct": "0.1.0", "frameguard": "3.0.0", - "helmet-csp": "2.4.0", + "helmet-csp": "2.6.0", "hide-powered-by": "1.0.0", "hpkp": "2.0.0", - "hsts": "2.0.0", + "hsts": "2.1.0", "ienoopen": "1.0.0", "nocache": "2.0.0", "referrer-policy": "1.1.0", @@ -2046,16 +2461,16 @@ } }, "helmet-csp": { - "version": "2.4.0", - "resolved": "https://registry.npmjs.org/helmet-csp/-/helmet-csp-2.4.0.tgz", - "integrity": "sha1-flOhVxZ6BkWq3XF30SrmxgXBhC4=", + "version": "2.6.0", + "resolved": "https://registry.npmjs.org/helmet-csp/-/helmet-csp-2.6.0.tgz", + "integrity": "sha512-n/oW9l6RtO4f9YvphsNzdvk1zITrSN7iRT8ojgrJu/N3mVdHl9zE4OjbiHWcR64JK32kbqx90/yshWGXcjUEhw==", "dev": true, "requires": { "camelize": "1.0.0", "content-security-policy-builder": "1.1.0", "dasherize": "2.0.0", "lodash.reduce": "4.6.0", - "platform": "1.3.3" + "platform": "1.3.4" } }, "hide-powered-by": { @@ -2070,6 +2485,18 @@ "integrity": "sha1-5tnb5Xy+/mB1HwKvM2GVhwyQwB4=", "dev": true }, + "hoek": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/hoek/-/hoek-4.2.0.tgz", + "integrity": "sha512-v0XCLxICi9nPfYrS9RL8HbYnXi9obYAeLbSP00BmnZwCK9+Ih9WOjoZ8YoHCoav2csqn4FOz4Orldsy2dmDwmQ==", + "dev": true + }, + "hosted-git-info": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.5.0.tgz", + "integrity": "sha512-pNgbURSuab90KbTqvRPsseaTxOJCZBD0a7t+haSN33piP9cCM4l0CqdzAif2hUqm716UovKB2ROmiabGAKVXyg==", + "dev": true + }, "hpkp": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/hpkp/-/hpkp-2.0.0.tgz", @@ -2077,20 +2504,18 @@ "dev": true }, "hsts": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/hsts/-/hsts-2.0.0.tgz", - "integrity": "sha1-pSI0xgcN7PIUsra3C7FE0H5Hdsc=", - "dev": true, - "requires": { - "core-util-is": "1.0.2" - } + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/hsts/-/hsts-2.1.0.tgz", + "integrity": "sha512-zXhh/DqgrTXJ7erTN6Fh5k/xjMhDGXCqdYN3wvxUvGUQvnxcFfUd8E+6vLg/nk3ss1TYMb+DhRl25fYABioTvA==", + "dev": true }, "http-errors": { - "version": "1.6.1", - "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-1.6.1.tgz", - "integrity": "sha1-X4uO2YrKVFZWv1cplzh/kEpyIlc=", + "version": "1.6.2", + "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-1.6.2.tgz", + "integrity": "sha1-CgAsyFcHGSp+eUbO7cERVfYOxzY=", + "dev": true, "requires": { - "depd": "1.1.0", + "depd": "1.1.1", "inherits": "2.0.3", "setprototypeof": "1.0.3", "statuses": "1.3.1" @@ -2107,18 +2532,18 @@ } }, "http-server": { - "version": "0.9.0", - "resolved": "https://registry.npmjs.org/http-server/-/http-server-0.9.0.tgz", - "integrity": "sha1-jxsGvcczYY1NxCgxx7oa/04GABo=", + "version": "0.10.0", + "resolved": "https://registry.npmjs.org/http-server/-/http-server-0.10.0.tgz", + "integrity": "sha1-sqRGsWqduH7TxiK6m+sbCFsSNKc=", "dev": true, "requires": { "colors": "1.0.3", "corser": "2.0.1", - "ecstatic": "1.4.1", + "ecstatic": "2.2.1", "http-proxy": "1.16.2", "opener": "1.4.3", "optimist": "0.6.1", - "portfinder": "0.4.0", + "portfinder": "1.0.13", "union": "0.4.6" }, "dependencies": { @@ -2130,10 +2555,31 @@ } } }, + "https-proxy-agent": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-2.1.1.tgz", + "integrity": "sha512-LK6tQUR/VOkTI6ygAfWUKKP95I+e6M1h7N3PncGu1CATHCnex+CAv9ttR0lbHu1Uk2PXm/WoAHFo6JCGwMjVMw==", + "dev": true, + "requires": { + "agent-base": "4.1.2", + "debug": "3.1.0" + }, + "dependencies": { + "debug": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", + "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", + "dev": true, + "requires": { + "ms": "2.0.0" + } + } + } + }, "iconv-lite": { - "version": "0.4.15", - "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.15.tgz", - "integrity": "sha1-/iZaIYrGpXz+hUkn6dBMGYJe3es=", + "version": "0.4.19", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.19.tgz", + "integrity": "sha512-oTZqweIP51xaGPI4uPa56/Pri/480R+mo7SeU+YETByQNhDG55ycFyNLIgta9vXhILrxXDmF7ZGhqZIcuN0gJQ==", "dev": true }, "ienoopen": { @@ -2148,18 +2594,18 @@ "integrity": "sha1-SMptcvbGo68Aqa1K5odr44ieKwk=", "dev": true }, + "import-lazy": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/import-lazy/-/import-lazy-2.1.0.tgz", + "integrity": "sha1-BWmOPUXIjo1+nZLLBYTnfwlvPkM=", + "dev": true + }, "imurmurhash": { "version": "0.1.4", "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", "integrity": "sha1-khi5srkoojixPcT7a21XbyMUU+o=", "dev": true }, - "infinity-agent": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/infinity-agent/-/infinity-agent-2.0.3.tgz", - "integrity": "sha1-ReDi/3qesDCyfWK3SzdEt6esQhY=", - "dev": true - }, "inflight": { "version": "1.0.6", "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", @@ -2176,21 +2622,123 @@ "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=" }, "ini": { - "version": "1.3.4", - "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.4.tgz", - "integrity": "sha1-BTfLedr1m1mhpRff9wbIbsA5Fi4=", + "version": "1.3.5", + "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.5.tgz", + "integrity": "sha512-RZY5huIKCMRWDUqZlEi72f/lmXKMvuszcMBduliQ3nnWbx9X/ZBQO7DijMEYS9EhHBb2qacRUMtC7svLwe0lcw==", "dev": true }, + "inquirer": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/inquirer/-/inquirer-3.3.0.tgz", + "integrity": "sha512-h+xtnyk4EwKvFWHrUYsWErEVR+igKtLdchu+o0Z1RL7VU/jVMFbYir2bp6bAj8efFNxWqHX0dIss6fJQ+/+qeQ==", + "dev": true, + "requires": { + "ansi-escapes": "3.0.0", + "chalk": "2.3.0", + "cli-cursor": "2.1.0", + "cli-width": "2.2.0", + "external-editor": "2.1.0", + "figures": "2.0.0", + "lodash": "4.17.4", + "mute-stream": "0.0.7", + "run-async": "2.3.0", + "rx-lite": "4.0.8", + "rx-lite-aggregates": "4.0.8", + "string-width": "2.1.1", + "strip-ansi": "4.0.0", + "through": "2.3.8" + }, + "dependencies": { + "ansi-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", + "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=", + "dev": true + }, + "ansi-styles": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.0.tgz", + "integrity": "sha512-NnSOmMEYtVR2JVMIGTzynRkkaxtiq1xnFBcdQD/DnNCYPoEPsVJhM98BDyaoNOQIi7p4okdi3E27eN7GQbsUug==", + "dev": true, + "requires": { + "color-convert": "1.9.1" + } + }, + "chalk": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.3.0.tgz", + "integrity": "sha512-Az5zJR2CBujap2rqXGaJKaPHyJ0IrUimvYNX+ncCy8PJP4ltOGTrHUIo097ZaL2zMeKYpiCdqDvS6zdrTFok3Q==", + "dev": true, + "requires": { + "ansi-styles": "3.2.0", + "escape-string-regexp": "1.0.5", + "supports-color": "4.5.0" + } + }, + "has-flag": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-2.0.0.tgz", + "integrity": "sha1-6CB68cx7MNRGzHC3NLXovhj4jVE=", + "dev": true + }, + "is-fullwidth-code-point": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", + "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=", + "dev": true + }, + "string-width": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz", + "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==", + "dev": true, + "requires": { + "is-fullwidth-code-point": "2.0.0", + "strip-ansi": "4.0.0" + } + }, + "strip-ansi": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", + "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", + "dev": true, + "requires": { + "ansi-regex": "3.0.0" + } + }, + "supports-color": { + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-4.5.0.tgz", + "integrity": "sha1-vnoN5ITexcXN34s9WRJQRJEvY1s=", + "dev": true, + "requires": { + "has-flag": "2.0.0" + } + } + } + }, "interpret": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/interpret/-/interpret-1.0.4.tgz", "integrity": "sha1-ggzdWIuGj/sZGoCVBtbJyPISsbA=", "dev": true }, + "invert-kv": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/invert-kv/-/invert-kv-1.0.0.tgz", + "integrity": "sha1-EEqOSqym09jNFXqO+L+rLXo//bY=", + "dev": true + }, "ipaddr.js": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.3.0.tgz", - "integrity": "sha1-HgOlL9rYOou7KyXL9JmLTP/NPew=" + "version": "1.5.2", + "resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.5.2.tgz", + "integrity": "sha1-1LUFvemUaYfM8PxY2QEP+WB+P6A=" + }, + "is-arrayish": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz", + "integrity": "sha1-d8mYQFJ6qOyxqLppe4BkWnqSap0=", + "dev": true }, "is-binary-path": { "version": "1.0.1", @@ -2198,7 +2746,7 @@ "integrity": "sha1-dfFmQrSA8YenEcgUFh/TpKdlWJg=", "dev": true, "requires": { - "binary-extensions": "1.8.0" + "binary-extensions": "1.11.0" } }, "is-buffer": { @@ -2207,6 +2755,15 @@ "integrity": "sha1-Hzsm72E7IUuIy8ojzGwB2Hlh7sw=", "dev": true }, + "is-builtin-module": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-builtin-module/-/is-builtin-module-1.0.0.tgz", + "integrity": "sha1-VAVy0096wxGfj3bDDLwbHgN6/74=", + "dev": true, + "requires": { + "builtin-modules": "1.1.1" + } + }, "is-dotfile": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/is-dotfile/-/is-dotfile-1.0.3.tgz", @@ -2234,10 +2791,10 @@ "integrity": "sha1-rEaBd8SUNAWgkvyPKXYMb/xiBsA=", "dev": true }, - "is-finite": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-finite/-/is-finite-1.0.2.tgz", - "integrity": "sha1-zGZ3aVYCvlUO8R6LSqYwU0K20Ko=", + "is-fullwidth-code-point": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz", + "integrity": "sha1-754xOG8DGn8NZDr4L95QxFfvAMs=", "dev": true, "requires": { "number-is-nan": "1.0.1" @@ -2252,6 +2809,16 @@ "is-extglob": "1.0.0" } }, + "is-installed-globally": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/is-installed-globally/-/is-installed-globally-0.1.0.tgz", + "integrity": "sha1-Df2Y9akRFxbdU13aZJL2e/PSWoA=", + "dev": true, + "requires": { + "global-dirs": "0.1.1", + "is-path-inside": "1.0.1" + } + }, "is-npm": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/is-npm/-/is-npm-1.0.0.tgz", @@ -2267,6 +2834,21 @@ "kind-of": "3.2.2" } }, + "is-obj": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-obj/-/is-obj-1.0.1.tgz", + "integrity": "sha1-PkcprB9f3gJc19g6iW2rn09n2w8=", + "dev": true + }, + "is-path-inside": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-path-inside/-/is-path-inside-1.0.1.tgz", + "integrity": "sha1-jvW33lBDej/cprToZe96pVy0gDY=", + "dev": true, + "requires": { + "path-is-inside": "1.0.2" + } + }, "is-posix-bracket": { "version": "0.1.1", "resolved": "https://registry.npmjs.org/is-posix-bracket/-/is-posix-bracket-0.1.1.tgz", @@ -2279,12 +2861,24 @@ "integrity": "sha1-IHurkWOEmcB7Kt8kCkGochADRXU=", "dev": true }, + "is-promise": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-promise/-/is-promise-2.1.0.tgz", + "integrity": "sha1-eaKp7OfwlugPNtKy87wWwf9L8/o=", + "dev": true + }, "is-redirect": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/is-redirect/-/is-redirect-1.0.0.tgz", "integrity": "sha1-HQPd7VO9jbDzDCbk+V02/HyH3CQ=", "dev": true }, + "is-retry-allowed": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/is-retry-allowed/-/is-retry-allowed-1.1.0.tgz", + "integrity": "sha1-EaBgVotnM5REAz0BJaYaINVk+zQ=", + "dev": true + }, "is-stream": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-1.1.0.tgz", @@ -2348,14 +2942,14 @@ } }, "jasmine": { - "version": "2.6.0", - "resolved": "https://registry.npmjs.org/jasmine/-/jasmine-2.6.0.tgz", - "integrity": "sha1-ayLnCIPo5YnUVjRhU7TSBt2+IX8=", + "version": "2.8.0", + "resolved": "https://registry.npmjs.org/jasmine/-/jasmine-2.8.0.tgz", + "integrity": "sha1-awicChFXax8W3xG4AUbZHU6Lij4=", "dev": true, "requires": { "exit": "0.1.2", "glob": "7.1.2", - "jasmine-core": "2.6.4" + "jasmine-core": "2.8.0" }, "dependencies": { "glob": { @@ -2375,24 +2969,24 @@ } }, "jasmine-core": { - "version": "2.6.4", - "resolved": "https://registry.npmjs.org/jasmine-core/-/jasmine-core-2.6.4.tgz", - "integrity": "sha1-3skmzQqfoof7bbXHVfpIfnTOysU=", + "version": "2.8.0", + "resolved": "https://registry.npmjs.org/jasmine-core/-/jasmine-core-2.8.0.tgz", + "integrity": "sha1-vMl5rh+f0FcB5F5S5l06XWPxok4=", "dev": true }, "jasmine-spec-reporter": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/jasmine-spec-reporter/-/jasmine-spec-reporter-3.3.0.tgz", - "integrity": "sha1-xjw9Q7rP0W5tqGxG0mWVfgB18Uw=", + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/jasmine-spec-reporter/-/jasmine-spec-reporter-4.2.1.tgz", + "integrity": "sha512-FZBoZu7VE5nR7Nilzy+Np8KuVIOxF4oXDPDknehCYBDE080EnlPu0afdZNmpGDBRCUBv3mj5qgqCRmk6W/K8vg==", "dev": true, "requires": { "colors": "1.1.2" } }, "js-tokens": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-3.0.1.tgz", - "integrity": "sha1-COnxMkhKLEWjCQfp3E1VZ7fxFNc=", + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-3.0.2.tgz", + "integrity": "sha1-mGbfOVECEw449/mWvOtlRDIJwls=", "dev": true }, "js-yaml": { @@ -2432,12 +3026,12 @@ } }, "latest-version": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/latest-version/-/latest-version-1.0.1.tgz", - "integrity": "sha1-cs/Ebj6NG+ZR4eu1Tqn26pbzdLs=", + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/latest-version/-/latest-version-3.1.0.tgz", + "integrity": "sha1-ogU4P+oyKzO1rjsYq+4NwvNW7hU=", "dev": true, "requires": { - "package-json": "1.2.0" + "package-json": "4.0.1" } }, "lazy-cache": { @@ -2447,6 +3041,15 @@ "dev": true, "optional": true }, + "lcid": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/lcid/-/lcid-1.0.0.tgz", + "integrity": "sha1-MIrMr6C8SDo4Z7S28rlQYlHRuDU=", + "dev": true, + "requires": { + "invert-kv": "1.0.0" + } + }, "levn": { "version": "0.3.0", "resolved": "https://registry.npmjs.org/levn/-/levn-0.3.0.tgz", @@ -2457,99 +3060,32 @@ "type-check": "0.3.2" } }, - "lodash": { - "version": "4.17.4", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.4.tgz", - "integrity": "sha1-eCA6TRwyiuHYbcpkYONptX9AVa4=" - }, - "lodash._baseassign": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/lodash._baseassign/-/lodash._baseassign-3.2.0.tgz", - "integrity": "sha1-jDigmVAPIVrQnlnxci/QxSv+Ck4=", - "dev": true, - "requires": { - "lodash._basecopy": "3.0.1", - "lodash.keys": "3.1.2" - } - }, - "lodash._basecopy": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/lodash._basecopy/-/lodash._basecopy-3.0.1.tgz", - "integrity": "sha1-jaDmqHbPNEwK2KVIghEd08XHyjY=", - "dev": true - }, - "lodash._bindcallback": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/lodash._bindcallback/-/lodash._bindcallback-3.0.1.tgz", - "integrity": "sha1-5THCdkTPi1epnhftlbNcdIeJOS4=", - "dev": true - }, - "lodash._createassigner": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/lodash._createassigner/-/lodash._createassigner-3.1.1.tgz", - "integrity": "sha1-g4pbri/aymOsIt7o4Z+k5taXCxE=", - "dev": true, - "requires": { - "lodash._bindcallback": "3.0.1", - "lodash._isiterateecall": "3.0.9", - "lodash.restparam": "3.6.1" - } - }, - "lodash._getnative": { - "version": "3.9.1", - "resolved": "https://registry.npmjs.org/lodash._getnative/-/lodash._getnative-3.9.1.tgz", - "integrity": "sha1-VwvH3t5G1hzc3mh9ZdPuy6o6r/U=", - "dev": true - }, - "lodash._isiterateecall": { - "version": "3.0.9", - "resolved": "https://registry.npmjs.org/lodash._isiterateecall/-/lodash._isiterateecall-3.0.9.tgz", - "integrity": "sha1-UgOte6Ql+uhCRg5pbbnPPmqsBXw=", - "dev": true - }, - "lodash.assign": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/lodash.assign/-/lodash.assign-3.2.0.tgz", - "integrity": "sha1-POnwI0tLIiPilrj6CsH+6OvKZPo=", + "load-json-file": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-2.0.0.tgz", + "integrity": "sha1-eUfkIUmvgNaWy/eXvKq8/h/inKg=", "dev": true, "requires": { - "lodash._baseassign": "3.2.0", - "lodash._createassigner": "3.1.1", - "lodash.keys": "3.1.2" + "graceful-fs": "4.1.11", + "parse-json": "2.2.0", + "pify": "2.3.0", + "strip-bom": "3.0.0" } }, - "lodash.defaults": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/lodash.defaults/-/lodash.defaults-3.1.2.tgz", - "integrity": "sha1-xzCLGNv4vJNy1wGnNJPGEZK9Liw=", + "locate-path": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-2.0.0.tgz", + "integrity": "sha1-K1aLJl7slExtnA3pw9u7ygNUzY4=", "dev": true, "requires": { - "lodash.assign": "3.2.0", - "lodash.restparam": "3.6.1" + "p-locate": "2.0.0", + "path-exists": "3.0.0" } }, - "lodash.isarguments": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/lodash.isarguments/-/lodash.isarguments-3.1.0.tgz", - "integrity": "sha1-L1c9hcaiQon/AGY7SRwdM4/zRYo=", - "dev": true - }, - "lodash.isarray": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/lodash.isarray/-/lodash.isarray-3.0.4.tgz", - "integrity": "sha1-eeTriMNqgSKvhvhEqpvNhRtfu1U=", - "dev": true - }, - "lodash.keys": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/lodash.keys/-/lodash.keys-3.1.2.tgz", - "integrity": "sha1-TbwEcrFWvlCgsoaFXRvQsMZWCYo=", - "dev": true, - "requires": { - "lodash._getnative": "3.9.1", - "lodash.isarguments": "3.1.0", - "lodash.isarray": "3.0.4" - } + "lodash": { + "version": "4.17.4", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.4.tgz", + "integrity": "sha1-eCA6TRwyiuHYbcpkYONptX9AVa4=" }, "lodash.reduce": { "version": "4.6.0", @@ -2557,12 +3093,6 @@ "integrity": "sha1-8atrg5KZrUj3hKu/R2WW8DuRTTs=", "dev": true }, - "lodash.restparam": { - "version": "3.6.1", - "resolved": "https://registry.npmjs.org/lodash.restparam/-/lodash.restparam-3.6.1.tgz", - "integrity": "sha1-k2pOMJ7zMKdkXtQUWYbIWuWyCAU=", - "dev": true - }, "longest": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/longest/-/longest-1.0.1.tgz", @@ -2575,6 +3105,33 @@ "integrity": "sha1-TjNms55/VFfjXxMkvfb4jQv8cwY=", "dev": true }, + "lru-cache": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-4.1.1.tgz", + "integrity": "sha512-q4spe4KTfsAS1SUHLO0wz8Qiyf1+vMIAgpRYioFYDMNqKfHQbg+AVDH3i4fvpl71/P1L0dBl+fQi+P37UYf0ew==", + "dev": true, + "requires": { + "pseudomap": "1.0.2", + "yallist": "2.1.2" + } + }, + "make-dir": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-1.1.0.tgz", + "integrity": "sha512-0Pkui4wLJ7rxvmfUvs87skoEaxmu0hCUApF8nonzpl7q//FWp9zu8W61Scz4sd/kUiqDxvUhtoam2efDyiBzcA==", + "dev": true, + "requires": { + "pify": "3.0.0" + }, + "dependencies": { + "pify": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", + "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=", + "dev": true + } + } + }, "map-stream": { "version": "0.1.0", "resolved": "https://registry.npmjs.org/map-stream/-/map-stream-0.1.0.tgz", @@ -2592,6 +3149,15 @@ "resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz", "integrity": "sha1-hxDXrwqmJvj/+hzgAWhUUmMlV0g=" }, + "mem": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/mem/-/mem-1.1.0.tgz", + "integrity": "sha1-Xt1StIXKHZAP5kiVUFOZoN+kX3Y=", + "dev": true, + "requires": { + "mimic-fn": "1.1.0" + } + }, "merge-descriptors": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-1.0.1.tgz", @@ -2620,13 +3186,14 @@ "normalize-path": "2.1.1", "object.omit": "2.0.1", "parse-glob": "3.0.4", - "regex-cache": "0.4.3" + "regex-cache": "0.4.4" } }, "mime": { "version": "1.3.4", "resolved": "https://registry.npmjs.org/mime/-/mime-1.3.4.tgz", - "integrity": "sha1-EV+eO2s9rylZmDyzjxSaLUDrXVM=" + "integrity": "sha1-EV+eO2s9rylZmDyzjxSaLUDrXVM=", + "dev": true }, "mime-db": { "version": "1.27.0", @@ -2641,6 +3208,12 @@ "mime-db": "1.27.0" } }, + "mimic-fn": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-1.1.0.tgz", + "integrity": "sha1-5md4PZLonb00KBi1IwudYqZyrRg=", + "dev": true + }, "minimatch": { "version": "3.0.4", "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", @@ -2674,19 +3247,19 @@ } }, "mongodb": { - "version": "2.2.29", - "resolved": "https://registry.npmjs.org/mongodb/-/mongodb-2.2.29.tgz", - "integrity": "sha512-MrQvIsN6zN80I4hdFo8w46w51cIqD2FJBGsUfApX9GmjXA1aCclEAJbOHaQWjCtabeWq57S3ECzqEKg/9bdBhA==", + "version": "2.2.33", + "resolved": "https://registry.npmjs.org/mongodb/-/mongodb-2.2.33.tgz", + "integrity": "sha1-tTfEcdNKZlG0jzb9vyl1A0Dgi1A=", "requires": { "es6-promise": "3.2.1", - "mongodb-core": "2.1.13", + "mongodb-core": "2.1.17", "readable-stream": "2.2.7" } }, "mongodb-core": { - "version": "2.1.13", - "resolved": "https://registry.npmjs.org/mongodb-core/-/mongodb-core-2.1.13.tgz", - "integrity": "sha512-mbcvqLLZwVcpTrsfBDY3hRNk2SDNJWOvKKxFJSc0pnUBhYojymBc/L0THfQsWwKJrkb2nIXSjfFll1mG/I5OqQ==", + "version": "2.1.17", + "resolved": "https://registry.npmjs.org/mongodb-core/-/mongodb-core-2.1.17.tgz", + "integrity": "sha1-pBizN6FKFJkPtRC5I97mqBMXPfg=", "requires": { "bson": "1.0.4", "require_optional": "1.0.1" @@ -2697,6 +3270,12 @@ "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=" }, + "mute-stream": { + "version": "0.0.7", + "resolved": "https://registry.npmjs.org/mute-stream/-/mute-stream-0.0.7.tgz", + "integrity": "sha1-MHXOk7whuPq0PhvE2n6BFe0ee6s=", + "dev": true + }, "nan": { "version": "2.4.0", "resolved": "https://registry.npmjs.org/nan/-/nan-2.4.0.tgz", @@ -2707,15 +3286,6 @@ "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.1.tgz", "integrity": "sha1-KzJxhOiZIQEXeyhWP7XnECrNDKk=" }, - "nested-error-stacks": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/nested-error-stacks/-/nested-error-stacks-1.0.2.tgz", - "integrity": "sha1-GfYZWRUZ8JZ2mlupqG5u7sgjw88=", - "dev": true, - "requires": { - "inherits": "2.0.3" - } - }, "nocache": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/nocache/-/nocache-2.0.0.tgz", @@ -2723,23 +3293,38 @@ "dev": true }, "nodemon": { - "version": "1.11.0", - "resolved": "https://registry.npmjs.org/nodemon/-/nodemon-1.11.0.tgz", - "integrity": "sha1-ImxWK9KnsT09dRi0mtSCijYj0Gw=", + "version": "1.14.6", + "resolved": "https://registry.npmjs.org/nodemon/-/nodemon-1.14.6.tgz", + "integrity": "sha512-jwF0CXtG3xO+ZP5Hq+O1Ry1ZxB6boB5SUY1hvsbwOAQ0gG+or2hawqGURYkrxqO/pN4mcp1fUvO69haxG6Mfjw==", "dev": true, "requires": { "chokidar": "1.7.0", - "debug": "2.6.8", - "es6-promise": "3.2.1", + "debug": "2.6.9", "ignore-by-default": "1.0.1", - "lodash.defaults": "3.1.2", "minimatch": "3.0.4", - "ps-tree": "1.1.0", - "touch": "1.0.0", + "pstree.remy": "1.1.0", + "touch": "3.1.0", "undefsafe": "0.0.3", - "update-notifier": "0.5.0" + "update-notifier": "2.3.0" + }, + "dependencies": { + "debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "dev": true, + "requires": { + "ms": "2.0.0" + } + } } }, + "nodesecurity-npm-utils": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/nodesecurity-npm-utils/-/nodesecurity-npm-utils-6.0.0.tgz", + "integrity": "sha512-NLRle1woNaT2orR6fue2jNqkhxDTktgJj3sZxvR/8kp21pvOY7Gwlx5wvo0H8ZVPqdgd2nE2ADB9wDu5Cl8zNg==", + "dev": true + }, "nopt": { "version": "3.0.6", "resolved": "https://registry.npmjs.org/nopt/-/nopt-3.0.6.tgz", @@ -2749,349 +3334,176 @@ "abbrev": "1.0.9" } }, + "normalize-package-data": { + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-2.4.0.tgz", + "integrity": "sha512-9jjUFbTPfEy3R/ad/2oNbKtW9Hgovl5O1FvFWKkKblNXoN/Oou6+9+KKohPK13Yc3/TyunyWhJp6gvRNR/PPAw==", + "dev": true, + "requires": { + "hosted-git-info": "2.5.0", + "is-builtin-module": "1.0.0", + "semver": "5.3.0", + "validate-npm-package-license": "3.0.1" + } + }, "normalize-path": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-2.1.1.tgz", "integrity": "sha1-GrKLVW4Zg2Oowab35vogE3/mrtk=", "dev": true, "requires": { - "remove-trailing-separator": "1.0.2" + "remove-trailing-separator": "1.1.0" + } + }, + "npm-run-path": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-2.0.2.tgz", + "integrity": "sha1-NakjLfo11wZ7TLLd8jV7GHFTbF8=", + "dev": true, + "requires": { + "path-key": "2.0.1" } }, "nsp": { - "version": "2.6.3", - "resolved": "https://registry.npmjs.org/nsp/-/nsp-2.6.3.tgz", - "integrity": "sha1-2wUDWVPNoqs6Vx7oL6uE9MsIHRc=", + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/nsp/-/nsp-3.1.0.tgz", + "integrity": "sha512-jtD2WMlmqWA3zSZTFog8MQkwUvXWdJD7ps7A30q8ImOIao0RFgZXbPPZ8O6yWaKxLbRxVUIoCfwvXyg7AVS+IA==", "dev": true, "requires": { - "chalk": "1.1.3", - "cli-table": "0.3.1", - "cvss": "1.0.1", - "https-proxy-agent": "1.0.0", - "joi": "6.10.1", - "nodesecurity-npm-utils": "5.0.0", - "path-is-absolute": "1.0.0", - "rc": "1.1.6", - "semver": "5.1.0", - "subcommand": "2.0.3", - "wreck": "6.3.0" + "chalk": "2.3.0", + "cli-table2": "0.2.0", + "cvss": "1.0.2", + "https-proxy-agent": "2.1.1", + "inquirer": "3.3.0", + "nodesecurity-npm-utils": "6.0.0", + "semver": "5.4.1", + "wreck": "12.5.1", + "yargs": "9.0.1" }, "dependencies": { - "chalk": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", - "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=", - "dev": true, - "requires": { - "ansi-styles": "2.2.1", - "escape-string-regexp": "1.0.5", - "has-ansi": "2.0.0", - "strip-ansi": "3.0.1", - "supports-color": "2.0.0" - }, - "dependencies": { - "ansi-styles": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz", - "integrity": "sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=", - "dev": true - }, - "escape-string-regexp": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", - "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=", - "dev": true - }, - "has-ansi": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/has-ansi/-/has-ansi-2.0.0.tgz", - "integrity": "sha1-NPUEnOHs3ysGSa8+8k5F7TVBbZE=", - "dev": true, - "requires": { - "ansi-regex": "2.0.0" - }, - "dependencies": { - "ansi-regex": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.0.0.tgz", - "integrity": "sha1-xQYbbg74qBd15Q9dZhUb9r83EQc=", - "dev": true - } - } - }, - "strip-ansi": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", - "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", - "dev": true, - "requires": { - "ansi-regex": "2.0.0" - }, - "dependencies": { - "ansi-regex": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.0.0.tgz", - "integrity": "sha1-xQYbbg74qBd15Q9dZhUb9r83EQc=", - "dev": true - } - } - }, - "supports-color": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz", - "integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=", - "dev": true - } - } + "ansi-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", + "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=", + "dev": true }, - "cli-table": { - "version": "0.3.1", - "resolved": "https://registry.npmjs.org/cli-table/-/cli-table-0.3.1.tgz", - "integrity": "sha1-9TsFJmqLGguTSz0IIebi3FkUriM=", + "ansi-styles": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.0.tgz", + "integrity": "sha512-NnSOmMEYtVR2JVMIGTzynRkkaxtiq1xnFBcdQD/DnNCYPoEPsVJhM98BDyaoNOQIi7p4okdi3E27eN7GQbsUug==", "dev": true, "requires": { - "colors": "1.0.3" - }, - "dependencies": { - "colors": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/colors/-/colors-1.0.3.tgz", - "integrity": "sha1-BDP0TYCWgP3rYO0mDxsMJi6CpAs=", - "dev": true - } + "color-convert": "1.9.1" } }, - "cvss": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/cvss/-/cvss-1.0.1.tgz", - "integrity": "sha1-XAffU2FqxW1m6PR0vtJePBRhk9s=", + "camelcase": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-4.1.0.tgz", + "integrity": "sha1-1UVjW+HjPFQmScaRc+Xeas+uNN0=", "dev": true }, - "https-proxy-agent": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-1.0.0.tgz", - "integrity": "sha1-NffabEjOTdv6JkiRrFk+5f+GceY=", + "chalk": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.3.0.tgz", + "integrity": "sha512-Az5zJR2CBujap2rqXGaJKaPHyJ0IrUimvYNX+ncCy8PJP4ltOGTrHUIo097ZaL2zMeKYpiCdqDvS6zdrTFok3Q==", "dev": true, "requires": { - "agent-base": "2.0.1", - "debug": "2.2.0", - "extend": "3.0.0" - }, - "dependencies": { - "agent-base": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-2.0.1.tgz", - "integrity": "sha1-vY+ehqjrIh//oHvRS+/VXfFCgV4=", - "dev": true, - "requires": { - "extend": "3.0.0", - "semver": "5.0.3" - }, - "dependencies": { - "semver": { - "version": "5.0.3", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.0.3.tgz", - "integrity": "sha1-d0Zt5YnNXTyV8TiqeLxWmjy10no=", - "dev": true - } - } - }, - "debug": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.2.0.tgz", - "integrity": "sha1-+HBX6ZWxofauaklgZkE3vFbwOdo=", - "dev": true, - "requires": { - "ms": "0.7.1" - }, - "dependencies": { - "ms": { - "version": "0.7.1", - "resolved": "https://registry.npmjs.org/ms/-/ms-0.7.1.tgz", - "integrity": "sha1-nNE8A62/8ltl7/3nzoZO6VIBcJg=", - "dev": true - } - } - }, - "extend": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.0.tgz", - "integrity": "sha1-WkdDU7nzNT3dgXbf03uRyDpG8dQ=", - "dev": true - } + "ansi-styles": "3.2.0", + "escape-string-regexp": "1.0.5", + "supports-color": "4.5.0" } }, - "joi": { - "version": "6.10.1", - "resolved": "https://registry.npmjs.org/joi/-/joi-6.10.1.tgz", - "integrity": "sha1-TVDDGAeRIgAP5fFq8f+OGRe3fgY=", + "cliui": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-3.2.0.tgz", + "integrity": "sha1-EgYBU3qRbSmUD5NNo7SNWFo5IT0=", "dev": true, "requires": { - "hoek": "2.16.3", - "isemail": "1.2.0", - "moment": "2.12.0", - "topo": "1.1.0" + "string-width": "1.0.2", + "strip-ansi": "3.0.1", + "wrap-ansi": "2.1.0" }, "dependencies": { - "hoek": { - "version": "2.16.3", - "resolved": "https://registry.npmjs.org/hoek/-/hoek-2.16.3.tgz", - "integrity": "sha1-ILt0A9POo5jpHcRxCo/xuCdKJe0=", - "dev": true - }, - "isemail": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/isemail/-/isemail-1.2.0.tgz", - "integrity": "sha1-vgPfjMPineTSxd9lASY/H6RZXpo=", - "dev": true - }, - "moment": { - "version": "2.12.0", - "resolved": "https://registry.npmjs.org/moment/-/moment-2.12.0.tgz", - "integrity": "sha1-3CVg0Zg41sBzGxpq+gRnUmTTYNY=", - "dev": true - }, - "topo": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/topo/-/topo-1.1.0.tgz", - "integrity": "sha1-6ddRYV0buH3IZdsYL6HKCl71NtU=", + "string-width": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz", + "integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=", "dev": true, "requires": { - "hoek": "2.16.3" + "code-point-at": "1.1.0", + "is-fullwidth-code-point": "1.0.0", + "strip-ansi": "3.0.1" } } } }, - "nodesecurity-npm-utils": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/nodesecurity-npm-utils/-/nodesecurity-npm-utils-5.0.0.tgz", - "integrity": "sha1-Baow3jDKjIRcQEjpT9eOXgi1Xtk=", - "dev": true - }, - "path-is-absolute": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.0.tgz", - "integrity": "sha1-Jj2tpmqz8vsQv3+dJN2PPlcO+RI=", + "has-flag": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-2.0.0.tgz", + "integrity": "sha1-6CB68cx7MNRGzHC3NLXovhj4jVE=", "dev": true }, - "rc": { - "version": "1.1.6", - "resolved": "https://registry.npmjs.org/rc/-/rc-1.1.6.tgz", - "integrity": "sha1-Q2UbdrauU7XIAvEVH6P8OwWZack=", - "dev": true, - "requires": { - "deep-extend": "0.4.1", - "ini": "1.3.4", - "minimist": "1.2.0", - "strip-json-comments": "1.0.4" - }, - "dependencies": { - "deep-extend": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/deep-extend/-/deep-extend-0.4.1.tgz", - "integrity": "sha1-7+QRPQgIX05vlod1mBD4B0aeIlM=", - "dev": true - }, - "ini": { - "version": "1.3.4", - "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.4.tgz", - "integrity": "sha1-BTfLedr1m1mhpRff9wbIbsA5Fi4=", - "dev": true - }, - "minimist": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", - "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=", - "dev": true - }, - "strip-json-comments": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-1.0.4.tgz", - "integrity": "sha1-HhX7ysl9Pumb8tc7TGVrCCu6+5E=", - "dev": true - } - } - }, "semver": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.1.0.tgz", - "integrity": "sha1-hfLPhVBGXE3wAM99hvawVBBqueU=", + "version": "5.4.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.4.1.tgz", + "integrity": "sha512-WfG/X9+oATh81XtllIo/I8gOiY9EXRdv1cQdyykeXK17YcUW3EXUAi2To4pcH6nZtJPr7ZOpM5OMyWJZm+8Rsg==", "dev": true }, - "subcommand": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/subcommand/-/subcommand-2.0.3.tgz", - "integrity": "sha1-mz/Rp1PjxEHwBBDLRBMdhlX1LDI=", + "string-width": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz", + "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==", "dev": true, "requires": { - "cliclopts": "1.1.1", - "debug": "2.2.0", - "minimist": "1.2.0", - "xtend": "4.0.1" + "is-fullwidth-code-point": "2.0.0", + "strip-ansi": "4.0.0" }, "dependencies": { - "cliclopts": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/cliclopts/-/cliclopts-1.1.1.tgz", - "integrity": "sha1-aUMcfLWvcjd0sNORG0w3USQxkQ8=", + "is-fullwidth-code-point": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", + "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=", "dev": true }, - "debug": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.2.0.tgz", - "integrity": "sha1-+HBX6ZWxofauaklgZkE3vFbwOdo=", + "strip-ansi": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", + "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", "dev": true, "requires": { - "ms": "0.7.1" - }, - "dependencies": { - "ms": { - "version": "0.7.1", - "resolved": "https://registry.npmjs.org/ms/-/ms-0.7.1.tgz", - "integrity": "sha1-nNE8A62/8ltl7/3nzoZO6VIBcJg=", - "dev": true - } + "ansi-regex": "3.0.0" } - }, - "minimist": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", - "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=", - "dev": true - }, - "xtend": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.1.tgz", - "integrity": "sha1-pcbVMr5lbiPbgg77lDofBJmNY68=", - "dev": true } } }, - "wreck": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/wreck/-/wreck-6.3.0.tgz", - "integrity": "sha1-oTaXafB7u2LWo3gzanhx/Hc8dAs=", + "supports-color": { + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-4.5.0.tgz", + "integrity": "sha1-vnoN5ITexcXN34s9WRJQRJEvY1s=", "dev": true, "requires": { - "boom": "2.10.1", - "hoek": "2.16.3" - }, - "dependencies": { - "boom": { - "version": "2.10.1", - "resolved": "https://registry.npmjs.org/boom/-/boom-2.10.1.tgz", - "integrity": "sha1-OciRjO/1eZ+D+UkqhI9iWt0Mdm8=", - "dev": true, - "requires": { - "hoek": "2.16.3" - } - }, - "hoek": { - "version": "2.16.3", - "resolved": "https://registry.npmjs.org/hoek/-/hoek-2.16.3.tgz", - "integrity": "sha1-ILt0A9POo5jpHcRxCo/xuCdKJe0=", - "dev": true - } + "has-flag": "2.0.0" + } + }, + "yargs": { + "version": "9.0.1", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-9.0.1.tgz", + "integrity": "sha1-UqzCP+7Kw0BCB47njAwAf1CF20w=", + "dev": true, + "requires": { + "camelcase": "4.1.0", + "cliui": "3.2.0", + "decamelize": "1.2.0", + "get-caller-file": "1.0.2", + "os-locale": "2.1.0", + "read-pkg-up": "2.0.0", + "require-directory": "2.1.1", + "require-main-filename": "1.0.1", + "set-blocking": "2.0.0", + "string-width": "2.1.1", + "which-module": "2.0.0", + "y18n": "3.2.1", + "yargs-parser": "7.0.0" } } } @@ -3102,12 +3514,6 @@ "integrity": "sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0=", "dev": true }, - "object-assign": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", - "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=", - "dev": true - }, "object.omit": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/object.omit/-/object.omit-2.0.1.tgz", @@ -3135,6 +3541,15 @@ "wrappy": "1.0.2" } }, + "onetime": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/onetime/-/onetime-2.0.1.tgz", + "integrity": "sha1-BnQoIw/WdEOyeUsiu6UotoZ5YtQ=", + "dev": true, + "requires": { + "mimic-fn": "1.1.0" + } + }, "opener": { "version": "1.4.3", "resolved": "https://registry.npmjs.org/opener/-/opener-1.4.3.tgz", @@ -3181,11 +3596,16 @@ } } }, - "os-homedir": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/os-homedir/-/os-homedir-1.0.2.tgz", - "integrity": "sha1-/7xJiDNuDoM94MFox+8VISGqf7M=", - "dev": true + "os-locale": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/os-locale/-/os-locale-2.1.0.tgz", + "integrity": "sha512-3sslG3zJbEYcaC4YVAvDorjGxc7tv6KVATnLPZONiljsUncvihe9BQoVCEs0RZ1kmf4Hk9OBqlZfJZWI4GanKA==", + "dev": true, + "requires": { + "execa": "0.7.0", + "lcid": "1.0.0", + "mem": "1.1.0" + } }, "os-tmpdir": { "version": "1.0.2", @@ -3193,24 +3613,37 @@ "integrity": "sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ=", "dev": true }, - "osenv": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/osenv/-/osenv-0.1.4.tgz", - "integrity": "sha1-Qv5tWVPfBsgGS+bxdsPQWqqjRkQ=", + "p-finally": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/p-finally/-/p-finally-1.0.0.tgz", + "integrity": "sha1-P7z7FbiZpEEjs0ttzBi3JDNqLK4=", + "dev": true + }, + "p-limit": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-1.1.0.tgz", + "integrity": "sha1-sH/y2aXYi+yAYDWJWiurZqJ5iLw=", + "dev": true + }, + "p-locate": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-2.0.0.tgz", + "integrity": "sha1-IKAQOyIqcMj9OcwuWAaA893l7EM=", "dev": true, "requires": { - "os-homedir": "1.0.2", - "os-tmpdir": "1.0.2" + "p-limit": "1.1.0" } }, "package-json": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/package-json/-/package-json-1.2.0.tgz", - "integrity": "sha1-yOysCUInzfdqMWh07QXifMk5oOA=", + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/package-json/-/package-json-4.0.1.tgz", + "integrity": "sha1-iGmgQBJTZhxMTKPabCEh7VVfXu0=", "dev": true, "requires": { - "got": "3.3.1", - "registry-url": "3.1.0" + "got": "6.7.1", + "registry-auth-token": "3.3.1", + "registry-url": "3.1.0", + "semver": "5.3.0" } }, "parse-glob": { @@ -3225,10 +3658,25 @@ "is-glob": "2.0.1" } }, + "parse-json": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-2.2.0.tgz", + "integrity": "sha1-9ID0BDTvgHQfhGkJn43qGPVaTck=", + "dev": true, + "requires": { + "error-ex": "1.3.1" + } + }, "parseurl": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.1.tgz", - "integrity": "sha1-yKuMkiO6NIiKpkopeyiFO+wY2lY=" + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.2.tgz", + "integrity": "sha1-/CidTtiZMRlGDBViUyYs3I3mW/M=" + }, + "path-exists": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz", + "integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=", + "dev": true }, "path-is-absolute": { "version": "1.0.1", @@ -3236,6 +3684,18 @@ "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=", "dev": true }, + "path-is-inside": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/path-is-inside/-/path-is-inside-1.0.2.tgz", + "integrity": "sha1-NlQX3t5EQw0cEa9hAn+s8HS9/FM=", + "dev": true + }, + "path-key": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-2.0.1.tgz", + "integrity": "sha1-QRyttXTFoUDTpLGRDUDYDMn0C0A=", + "dev": true + }, "path-parse": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.5.tgz", @@ -3247,6 +3707,15 @@ "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.7.tgz", "integrity": "sha1-32BBeABfUi8V60SQ5yR6G/qmf4w=" }, + "path-type": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/path-type/-/path-type-2.0.0.tgz", + "integrity": "sha1-8BLMuEFbcJb8LaoQVMPXI4lZTHM=", + "dev": true, + "requires": { + "pify": "2.3.0" + } + }, "pause-stream": { "version": "0.0.11", "resolved": "https://registry.npmjs.org/pause-stream/-/pause-stream-0.0.11.tgz", @@ -3256,35 +3725,38 @@ "through": "2.3.8" } }, - "pinkie": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/pinkie/-/pinkie-2.0.4.tgz", - "integrity": "sha1-clVrgM+g1IqXToDnckjoDtT3+HA=", + "pify": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", + "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=", "dev": true }, - "pinkie-promise": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/pinkie-promise/-/pinkie-promise-2.0.1.tgz", - "integrity": "sha1-ITXW36ejWMBprJsXh3YogihFD/o=", - "dev": true, - "requires": { - "pinkie": "2.0.4" - } - }, "platform": { - "version": "1.3.3", - "resolved": "https://registry.npmjs.org/platform/-/platform-1.3.3.tgz", - "integrity": "sha1-ZGx3ARiZhwtqCQPnXpl+jlHadGE=", + "version": "1.3.4", + "resolved": "https://registry.npmjs.org/platform/-/platform-1.3.4.tgz", + "integrity": "sha1-bw+xftqqSPIUQrOpdcBjEw8cPr0=", "dev": true }, "portfinder": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/portfinder/-/portfinder-0.4.0.tgz", - "integrity": "sha1-o/+t/6/k+5jgYBqF7aJ8J86Eyh4=", + "version": "1.0.13", + "resolved": "https://registry.npmjs.org/portfinder/-/portfinder-1.0.13.tgz", + "integrity": "sha1-uzLs2HwnEErm7kS1o8y/Drsa7ek=", "dev": true, "requires": { - "async": "0.9.0", + "async": "1.5.2", + "debug": "2.6.9", "mkdirp": "0.5.1" + }, + "dependencies": { + "debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "dev": true, + "requires": { + "ms": "2.0.0" + } + } } }, "prelude-ls": { @@ -3317,12 +3789,12 @@ "dev": true }, "proxy-addr": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-1.1.4.tgz", - "integrity": "sha1-J+VF9pYKRKYn2bREZ+NcG2tM4vM=", + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-2.0.2.tgz", + "integrity": "sha1-ZXFQT0e7mI7IGAJT+F3X4UlSvew=", "requires": { - "forwarded": "0.1.0", - "ipaddr.js": "1.3.0" + "forwarded": "0.1.2", + "ipaddr.js": "1.5.2" } }, "ps-tree": { @@ -3334,10 +3806,26 @@ "event-stream": "3.3.4" } }, + "pseudomap": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/pseudomap/-/pseudomap-1.0.2.tgz", + "integrity": "sha1-8FKijacOYYkX7wqKw0wa5aaChrM=", + "dev": true + }, + "pstree.remy": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/pstree.remy/-/pstree.remy-1.1.0.tgz", + "integrity": "sha512-q5I5vLRMVtdWa8n/3UEzZX7Lfghzrg9eG2IKk2ENLSofKRCXVqMvMUHxCKgXNaqH/8ebhBxrqftHWnyTFweJ5Q==", + "dev": true, + "requires": { + "ps-tree": "1.1.0" + } + }, "qs": { "version": "6.4.0", "resolved": "https://registry.npmjs.org/qs/-/qs-6.4.0.tgz", - "integrity": "sha1-E+JtKK1rD/qpExLNO/cI7TUecjM=" + "integrity": "sha1-E+JtKK1rD/qpExLNO/cI7TUecjM=", + "dev": true }, "randomatic": { "version": "1.1.7", @@ -3386,36 +3874,48 @@ "integrity": "sha1-9JvmtIeJTdxA3MlKMi9hEJLgDV4=" }, "raw-body": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.2.0.tgz", - "integrity": "sha1-mUl2z2pQlqQRYoQEkvC9xdbn+5Y=", + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.3.2.tgz", + "integrity": "sha1-vNYMd9Prk83gBQKVw/N5OJvIj4k=", "dev": true, "requires": { - "bytes": "2.4.0", - "iconv-lite": "0.4.15", + "bytes": "3.0.0", + "http-errors": "1.6.2", + "iconv-lite": "0.4.19", "unpipe": "1.0.0" } }, "rc": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/rc/-/rc-1.2.1.tgz", - "integrity": "sha1-LgPo5C7kULjLPc5lvhv4l04d/ZU=", + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/rc/-/rc-1.2.2.tgz", + "integrity": "sha1-2M6ctX6NZNnHut2YdsfDTL48cHc=", "dev": true, "requires": { "deep-extend": "0.4.2", - "ini": "1.3.4", + "ini": "1.3.5", "minimist": "1.2.0", "strip-json-comments": "2.0.1" } }, - "read-all-stream": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/read-all-stream/-/read-all-stream-3.1.0.tgz", - "integrity": "sha1-NcPhd/IHjveJ7kv6+kNzB06u9Po=", + "read-pkg": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-2.0.0.tgz", + "integrity": "sha1-jvHAYjxqbbDcZxPEv6xGMysjaPg=", "dev": true, "requires": { - "pinkie-promise": "2.0.1", - "readable-stream": "2.2.7" + "load-json-file": "2.0.0", + "normalize-package-data": "2.4.0", + "path-type": "2.0.0" + } + }, + "read-pkg-up": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-2.0.0.tgz", + "integrity": "sha1-a3KoBImE4MQeeVEP1en6mbO1Sb4=", + "dev": true, + "requires": { + "find-up": "2.1.0", + "read-pkg": "2.0.0" } }, "readable-stream": { @@ -3465,13 +3965,22 @@ "integrity": "sha1-tPg3BEFqytiZiMmxVjXUfgO5NEo=" }, "regex-cache": { - "version": "0.4.3", - "resolved": "https://registry.npmjs.org/regex-cache/-/regex-cache-0.4.3.tgz", - "integrity": "sha1-mxpsNdTQ3871cRrmUejp09cRQUU=", + "version": "0.4.4", + "resolved": "https://registry.npmjs.org/regex-cache/-/regex-cache-0.4.4.tgz", + "integrity": "sha512-nVIZwtCjkC9YgvWkpM55B5rBhBYRZhAaJbgcFYXXsHnbZ9UZI9nnVWYZpBlCqv9ho2eZryPnWrZGsOdPwVWXWQ==", "dev": true, "requires": { - "is-equal-shallow": "0.1.3", - "is-primitive": "2.0.0" + "is-equal-shallow": "0.1.3" + } + }, + "registry-auth-token": { + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/registry-auth-token/-/registry-auth-token-3.3.1.tgz", + "integrity": "sha1-+w0yie4Nmtosu1KvXf5mywcNMAY=", + "dev": true, + "requires": { + "rc": "1.2.2", + "safe-buffer": "5.1.1" } }, "registry-url": { @@ -3480,13 +3989,13 @@ "integrity": "sha1-PU74cPc93h138M+aOBQyRE4XSUI=", "dev": true, "requires": { - "rc": "1.2.1" + "rc": "1.2.2" } }, "remove-trailing-separator": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/remove-trailing-separator/-/remove-trailing-separator-1.0.2.tgz", - "integrity": "sha1-abBi2XhyetFNxrVrpKt3L9jXBRE=", + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/remove-trailing-separator/-/remove-trailing-separator-1.1.0.tgz", + "integrity": "sha1-wkvOKig62tW8P1jg1IJJuSN52O8=", "dev": true }, "repeat-element": { @@ -3501,14 +4010,17 @@ "integrity": "sha1-jcrkcOHIirwtYA//Sndihtp15jc=", "dev": true }, - "repeating": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/repeating/-/repeating-1.1.3.tgz", - "integrity": "sha1-PUEUIYh3U3SU+X93+Xhfq4EPpKw=", - "dev": true, - "requires": { - "is-finite": "1.0.2" - } + "require-directory": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", + "integrity": "sha1-jGStX9MNqxyXbiNE/+f3kqam30I=", + "dev": true + }, + "require-main-filename": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-1.0.1.tgz", + "integrity": "sha1-l/cXtp1IeE9fUmpsWqj/3aBVpNE=", + "dev": true }, "require_optional": { "version": "1.0.1", @@ -3536,6 +4048,16 @@ "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-2.0.0.tgz", "integrity": "sha1-lICrIOlP+h2egKgEx+oUdhGWa1c=" }, + "restore-cursor": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-2.0.0.tgz", + "integrity": "sha1-n37ih/gv0ybU/RYpI9YhKe7g368=", + "dev": true, + "requires": { + "onetime": "2.0.1", + "signal-exit": "3.0.2" + } + }, "right-align": { "version": "0.1.3", "resolved": "https://registry.npmjs.org/right-align/-/right-align-0.1.3.tgz", @@ -3546,6 +4068,30 @@ "align-text": "0.1.4" } }, + "run-async": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/run-async/-/run-async-2.3.0.tgz", + "integrity": "sha1-A3GrSuC91yDUFm19/aZP96RFpsA=", + "dev": true, + "requires": { + "is-promise": "2.1.0" + } + }, + "rx-lite": { + "version": "4.0.8", + "resolved": "https://registry.npmjs.org/rx-lite/-/rx-lite-4.0.8.tgz", + "integrity": "sha1-Cx4Rr4vESDbwSmQH6S2kJGe3lEQ=", + "dev": true + }, + "rx-lite-aggregates": { + "version": "4.0.8", + "resolved": "https://registry.npmjs.org/rx-lite-aggregates/-/rx-lite-aggregates-4.0.8.tgz", + "integrity": "sha1-dTuHqJoRyVRnxKwWJsTvxOBcZ74=", + "dev": true, + "requires": { + "rx-lite": "4.0.8" + } + }, "safe-buffer": { "version": "5.1.1", "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.1.tgz", @@ -3566,19 +4112,19 @@ } }, "send": { - "version": "0.15.3", - "resolved": "https://registry.npmjs.org/send/-/send-0.15.3.tgz", - "integrity": "sha1-UBP5+ZAj31DRvZiSwZ4979HVMwk=", + "version": "0.16.1", + "resolved": "https://registry.npmjs.org/send/-/send-0.16.1.tgz", + "integrity": "sha512-ElCLJdJIKPk6ux/Hocwhk7NFHpI3pVm/IZOYWqUmoxcgeyM+MpxHHKhb8QmlJDX1pU6WrgaHBkVNm73Sv7uc2A==", "requires": { - "debug": "2.6.7", - "depd": "1.1.0", + "debug": "2.6.9", + "depd": "1.1.1", "destroy": "1.0.4", "encodeurl": "1.0.1", "escape-html": "1.0.3", - "etag": "1.8.0", - "fresh": "0.5.0", - "http-errors": "1.6.1", - "mime": "1.3.4", + "etag": "1.8.1", + "fresh": "0.5.2", + "http-errors": "1.6.2", + "mime": "1.4.1", "ms": "2.0.0", "on-finished": "2.3.0", "range-parser": "1.2.0", @@ -3586,26 +4132,53 @@ }, "dependencies": { "debug": { - "version": "2.6.7", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.7.tgz", - "integrity": "sha1-krrR9tBbu2u6Isyoi80OyJTChh4=", + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", "requires": { "ms": "2.0.0" } + }, + "depd": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/depd/-/depd-1.1.1.tgz", + "integrity": "sha1-V4O04cRZ8G+lyif5kfPQbnoxA1k=" + }, + "http-errors": { + "version": "1.6.2", + "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-1.6.2.tgz", + "integrity": "sha1-CgAsyFcHGSp+eUbO7cERVfYOxzY=", + "requires": { + "depd": "1.1.1", + "inherits": "2.0.3", + "setprototypeof": "1.0.3", + "statuses": "1.3.1" + } + }, + "mime": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/mime/-/mime-1.4.1.tgz", + "integrity": "sha512-KI1+qOZu5DcW6wayYHSzR/tXKCDC5Om4s1z2QJjDULzLcmf3DvzS7oluY4HCTrc+9FiKmWUgeNLg7W3uIQvxtQ==" } } }, "serve-static": { - "version": "1.12.3", - "resolved": "https://registry.npmjs.org/serve-static/-/serve-static-1.12.3.tgz", - "integrity": "sha1-n0uhni8wMMVH+K+ZEHg47DjVseI=", + "version": "1.13.1", + "resolved": "https://registry.npmjs.org/serve-static/-/serve-static-1.13.1.tgz", + "integrity": "sha512-hSMUZrsPa/I09VYFJwa627JJkNs0NrfL1Uzuup+GqHfToR2KcsXFymXSV90hoyw3M+msjFuQly+YzIH/q0MGlQ==", "requires": { "encodeurl": "1.0.1", "escape-html": "1.0.3", - "parseurl": "1.3.1", - "send": "0.15.3" + "parseurl": "1.3.2", + "send": "0.16.1" } }, + "set-blocking": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz", + "integrity": "sha1-BF+XgtARrppoA93TgrJDkrPYkPc=", + "dev": true + }, "set-immediate-shim": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/set-immediate-shim/-/set-immediate-shim-1.0.1.tgz", @@ -3617,6 +4190,21 @@ "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.0.3.tgz", "integrity": "sha1-ZlZ+NwQ+608E2RvWWMDL77VbjgQ=" }, + "shebang-command": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-1.2.0.tgz", + "integrity": "sha1-RKrGW2lbAzmJaMOfNj/uXer98eo=", + "dev": true, + "requires": { + "shebang-regex": "1.0.0" + } + }, + "shebang-regex": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-1.0.0.tgz", + "integrity": "sha1-2kL0l0DAtC2yypcoVxyxkMmO/qM=", + "dev": true + }, "shelljs": { "version": "0.7.8", "resolved": "https://registry.npmjs.org/shelljs/-/shelljs-0.7.8.tgz", @@ -3644,10 +4232,10 @@ } } }, - "slide": { - "version": "1.1.6", - "resolved": "https://registry.npmjs.org/slide/-/slide-1.1.6.tgz", - "integrity": "sha1-VusCfWW00tzmyy4tMsTUr8nh1wc=", + "signal-exit": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.2.tgz", + "integrity": "sha1-tf3AjxKH6hF4Yo5BXiUTK3NkbG0=", "dev": true }, "source-map": { @@ -3661,22 +4249,43 @@ } }, "source-map-support": { - "version": "0.4.15", - "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.4.15.tgz", - "integrity": "sha1-AyAt9lwG0r2MfsI2KhkwVv7407E=", + "version": "0.5.0", + "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.0.tgz", + "integrity": "sha512-vUoN3I7fHQe0R/SJLKRdKYuEdRGogsviXFkHHo17AWaTGv17VLnxw+CFXvqy+y4ORZ3doWLQcxRYfwKrsd/H7Q==", "dev": true, "requires": { - "source-map": "0.5.6" + "source-map": "0.6.1" }, "dependencies": { "source-map": { - "version": "0.5.6", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.6.tgz", - "integrity": "sha1-dc449SvwczxafwwRjYEzSiu19BI=", + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", "dev": true } } }, + "spdx-correct": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/spdx-correct/-/spdx-correct-1.0.2.tgz", + "integrity": "sha1-SzBz2TP/UfORLwOsVRlJikFQ20A=", + "dev": true, + "requires": { + "spdx-license-ids": "1.2.2" + } + }, + "spdx-expression-parse": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/spdx-expression-parse/-/spdx-expression-parse-1.0.4.tgz", + "integrity": "sha1-m98vIOH0DtRH++JzJmGR/O1RYmw=", + "dev": true + }, + "spdx-license-ids": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-1.2.2.tgz", + "integrity": "sha1-yd96NCRZSt5r0RkA1ZZpbcBrrFc=", + "dev": true + }, "split": { "version": "0.3.3", "resolved": "https://registry.npmjs.org/split/-/split-0.3.3.tgz", @@ -3706,18 +4315,14 @@ "duplexer": "0.1.1" } }, - "stream-shift": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/stream-shift/-/stream-shift-1.0.0.tgz", - "integrity": "sha1-1cdSgl5TZ+eG944Y5EXqIjoVWVI=", - "dev": true - }, - "string-length": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/string-length/-/string-length-1.0.1.tgz", - "integrity": "sha1-VpcPscOFWOnnC3KL894mmsRa36w=", + "string-width": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz", + "integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=", "dev": true, "requires": { + "code-point-at": "1.1.0", + "is-fullwidth-code-point": "1.0.0", "strip-ansi": "3.0.1" } }, @@ -3738,6 +4343,18 @@ "ansi-regex": "2.1.1" } }, + "strip-bom": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz", + "integrity": "sha1-IzTBjpx1n3vdVv3vfprj1YjmjtM=", + "dev": true + }, + "strip-eof": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/strip-eof/-/strip-eof-1.0.0.tgz", + "integrity": "sha1-u0P/VZim6wXYm1n80SnJgzE2Br8=", + "dev": true + }, "strip-json-comments": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz", @@ -3752,7 +4369,7 @@ "requires": { "component-emitter": "1.2.1", "cookiejar": "2.1.1", - "debug": "2.6.8", + "debug": "2.6.9", "extend": "3.0.1", "form-data": "2.2.0", "formidable": "1.1.1", @@ -3760,6 +4377,17 @@ "mime": "1.3.4", "qs": "6.4.0", "readable-stream": "2.2.7" + }, + "dependencies": { + "debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "dev": true, + "requires": { + "ms": "2.0.0" + } + } } }, "supertest": { @@ -3781,6 +4409,15 @@ "has-flag": "1.0.0" } }, + "term-size": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/term-size/-/term-size-1.2.0.tgz", + "integrity": "sha1-RYuDiH8oj8Vtb/+/rSYuJmOO+mk=", + "dev": true, + "requires": { + "execa": "0.7.0" + } + }, "through": { "version": "2.3.8", "resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz", @@ -3788,15 +4425,24 @@ "dev": true }, "timed-out": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/timed-out/-/timed-out-2.0.0.tgz", - "integrity": "sha1-84sK6B03R9YoAB9B2vxlKs5nHAo=", + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/timed-out/-/timed-out-4.0.1.tgz", + "integrity": "sha1-8y6srFoXW+ol1/q1Zas+2HQe9W8=", "dev": true }, + "tmp": { + "version": "0.0.33", + "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.0.33.tgz", + "integrity": "sha512-jRCJlojKnZ3addtTOjdIqoRuPEKBvNXcGYqzO6zWZX8KfKEpnGY5jfggJQ3EjKuu8D4bJRr0y+cYJFmYbImXGw==", + "dev": true, + "requires": { + "os-tmpdir": "1.0.2" + } + }, "touch": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/touch/-/touch-1.0.0.tgz", - "integrity": "sha1-RJy+LbrlqMgDjjDXH6D/RklHxN4=", + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/touch/-/touch-3.1.0.tgz", + "integrity": "sha512-WBx8Uy5TLtOSRtIq+M03/sKDrXCLHxwDcquSP2c43Le03/9serjQBIztjRz6FkJez9D/hleyAXTBGLwwZUw9lA==", "dev": true, "requires": { "nopt": "1.0.10" @@ -3814,29 +4460,50 @@ } }, "tslib": { - "version": "1.7.1", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.7.1.tgz", - "integrity": "sha1-vIAEFkaRkjp5/oN4u+s9ogF1OOw=", + "version": "1.8.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.8.1.tgz", + "integrity": "sha1-aUavLR1lGnsYY7Ux1uWvpBqkTqw=", "dev": true }, "tslint": { - "version": "5.4.3", - "resolved": "https://registry.npmjs.org/tslint/-/tslint-5.4.3.tgz", - "integrity": "sha1-dhyEArgONHt3M6BDkKdXslNYBGc=", + "version": "5.8.0", + "resolved": "https://registry.npmjs.org/tslint/-/tslint-5.8.0.tgz", + "integrity": "sha1-H0mtWy53x2w69N3K5VKuTjYS6xM=", "dev": true, "requires": { - "babel-code-frame": "6.22.0", - "colors": "1.1.2", - "commander": "2.10.0", - "diff": "3.2.0", + "babel-code-frame": "6.26.0", + "builtin-modules": "1.1.1", + "chalk": "2.3.0", + "commander": "2.12.2", + "diff": "3.4.0", "glob": "7.1.2", "minimatch": "3.0.4", - "resolve": "1.3.3", + "resolve": "1.5.0", "semver": "5.3.0", - "tslib": "1.7.1", - "tsutils": "2.4.0" + "tslib": "1.8.1", + "tsutils": "2.14.0" }, "dependencies": { + "ansi-styles": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.0.tgz", + "integrity": "sha512-NnSOmMEYtVR2JVMIGTzynRkkaxtiq1xnFBcdQD/DnNCYPoEPsVJhM98BDyaoNOQIi7p4okdi3E27eN7GQbsUug==", + "dev": true, + "requires": { + "color-convert": "1.9.1" + } + }, + "chalk": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.3.0.tgz", + "integrity": "sha512-Az5zJR2CBujap2rqXGaJKaPHyJ0IrUimvYNX+ncCy8PJP4ltOGTrHUIo097ZaL2zMeKYpiCdqDvS6zdrTFok3Q==", + "dev": true, + "requires": { + "ansi-styles": "3.2.0", + "escape-string-regexp": "1.0.5", + "supports-color": "4.5.0" + } + }, "glob": { "version": "7.1.2", "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.2.tgz", @@ -3851,22 +4518,40 @@ "path-is-absolute": "1.0.1" } }, + "has-flag": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-2.0.0.tgz", + "integrity": "sha1-6CB68cx7MNRGzHC3NLXovhj4jVE=", + "dev": true + }, "resolve": { - "version": "1.3.3", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.3.3.tgz", - "integrity": "sha1-ZVkHw0aahoDcLeOidaj91paR8OU=", + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.5.0.tgz", + "integrity": "sha512-hgoSGrc3pjzAPHNBg+KnFcK2HwlHTs/YrAGUr6qgTVUZmXv1UEXXl0bZNBKMA9fud6lRYFdPGz0xXxycPzmmiw==", "dev": true, "requires": { "path-parse": "1.0.5" } + }, + "supports-color": { + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-4.5.0.tgz", + "integrity": "sha1-vnoN5ITexcXN34s9WRJQRJEvY1s=", + "dev": true, + "requires": { + "has-flag": "2.0.0" + } } } }, "tsutils": { - "version": "2.4.0", - "resolved": "https://registry.npmjs.org/tsutils/-/tsutils-2.4.0.tgz", - "integrity": "sha1-rUzm26Dlo+2934Ymt8oEB4IYn+o=", - "dev": true + "version": "2.14.0", + "resolved": "https://registry.npmjs.org/tsutils/-/tsutils-2.14.0.tgz", + "integrity": "sha512-f6axSMV0RoUufiKiRQgmRlN1c+Ag+mDaZjcd6bHdvplT/zyhuMCGqw3pJS8s3+0x4EVkdoQajs9PchdDZlguvw==", + "dev": true, + "requires": { + "tslib": "1.8.1" + } }, "type-check": { "version": "0.3.2", @@ -3932,9 +4617,9 @@ "dev": true }, "typescript": { - "version": "2.3.4", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-2.3.4.tgz", - "integrity": "sha1-PTgyGCgjHkNPKHUUlZw3qCtin0I=", + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-2.6.2.tgz", + "integrity": "sha1-PFtv1/beCRQmkCfwPAlGdY92c6Q=", "dev": true }, "uglify-js": { @@ -3988,6 +4673,15 @@ } } }, + "unique-string": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/unique-string/-/unique-string-1.0.0.tgz", + "integrity": "sha1-nhBXzKhRq7kzmPizOuGHuZyuwRo=", + "dev": true, + "requires": { + "crypto-random-string": "1.0.0" + } + }, "universalify": { "version": "0.1.1", "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.1.1.tgz", @@ -3999,46 +4693,110 @@ "resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz", "integrity": "sha1-sr9O6FFKrmFltIF4KdIbLvSZBOw=" }, + "unzip-response": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/unzip-response/-/unzip-response-2.0.1.tgz", + "integrity": "sha1-0vD3N9FrBhXnKmk17QQhRXLVb5c=", + "dev": true + }, "update-notifier": { - "version": "0.5.0", - "resolved": "https://registry.npmjs.org/update-notifier/-/update-notifier-0.5.0.tgz", - "integrity": "sha1-B7XcIGazYnqztPUwEw9+3doHpMw=", + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/update-notifier/-/update-notifier-2.3.0.tgz", + "integrity": "sha1-TognpruRUUCrCTVZ1wFOPruDdFE=", "dev": true, "requires": { - "chalk": "1.1.3", - "configstore": "1.4.0", + "boxen": "1.3.0", + "chalk": "2.3.0", + "configstore": "3.1.1", + "import-lazy": "2.1.0", + "is-installed-globally": "0.1.0", "is-npm": "1.0.0", - "latest-version": "1.0.1", - "repeating": "1.1.3", + "latest-version": "3.1.0", "semver-diff": "2.1.0", - "string-length": "1.0.1" + "xdg-basedir": "3.0.0" + }, + "dependencies": { + "ansi-styles": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.0.tgz", + "integrity": "sha512-NnSOmMEYtVR2JVMIGTzynRkkaxtiq1xnFBcdQD/DnNCYPoEPsVJhM98BDyaoNOQIi7p4okdi3E27eN7GQbsUug==", + "dev": true, + "requires": { + "color-convert": "1.9.1" + } + }, + "chalk": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.3.0.tgz", + "integrity": "sha512-Az5zJR2CBujap2rqXGaJKaPHyJ0IrUimvYNX+ncCy8PJP4ltOGTrHUIo097ZaL2zMeKYpiCdqDvS6zdrTFok3Q==", + "dev": true, + "requires": { + "ansi-styles": "3.2.0", + "escape-string-regexp": "1.0.5", + "supports-color": "4.5.0" + } + }, + "has-flag": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-2.0.0.tgz", + "integrity": "sha1-6CB68cx7MNRGzHC3NLXovhj4jVE=", + "dev": true + }, + "supports-color": { + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-4.5.0.tgz", + "integrity": "sha1-vnoN5ITexcXN34s9WRJQRJEvY1s=", + "dev": true, + "requires": { + "has-flag": "2.0.0" + } + } } }, "url-join": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/url-join/-/url-join-1.1.0.tgz", - "integrity": "sha1-dBxsL0WWxIMNZxhGCSDQySIC3Hg=", + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/url-join/-/url-join-2.0.2.tgz", + "integrity": "sha1-wHJ1aWetJLi1nldBVRyqx49QuLc=", "dev": true }, + "url-parse-lax": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/url-parse-lax/-/url-parse-lax-1.0.0.tgz", + "integrity": "sha1-evjzA2Rem9eaJy56FKxovAYJ2nM=", + "dev": true, + "requires": { + "prepend-http": "1.0.4" + } + }, "util-deprecate": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=" }, "utils-merge": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/utils-merge/-/utils-merge-1.0.0.tgz", - "integrity": "sha1-ApT7kiu5N1FTVBxPcJYjHyh8ivg=" + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/utils-merge/-/utils-merge-1.0.1.tgz", + "integrity": "sha1-n5VxD1CiZ5R7LMwSR0HBAoQn5xM=" }, "uuid": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.1.0.tgz", "integrity": "sha512-DIWtzUkw04M4k3bf1IcpS2tngXEL26YUD2M0tMDUpnUrz2hgzUBlD55a4FjdLGPvfHxS6uluGWvaVEqgBcVa+g==" }, + "validate-npm-package-license": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/validate-npm-package-license/-/validate-npm-package-license-3.0.1.tgz", + "integrity": "sha1-KAS6vnEq0zeUWaz74kdGqywwP7w=", + "dev": true, + "requires": { + "spdx-correct": "1.0.2", + "spdx-expression-parse": "1.0.4" + } + }, "vary": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/vary/-/vary-1.1.1.tgz", - "integrity": "sha1-Z1Neu2lMHVIldFeYRmUyP1h+jTc=" + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz", + "integrity": "sha1-IpnwLG3tMNSllhsLn3RSShj2NPw=" }, "which": { "version": "1.2.14", @@ -4049,6 +4807,54 @@ "isexe": "2.0.0" } }, + "which-module": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/which-module/-/which-module-2.0.0.tgz", + "integrity": "sha1-2e8H3Od7mQK4o6j6SzHD4/fm6Ho=", + "dev": true + }, + "widest-line": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/widest-line/-/widest-line-2.0.0.tgz", + "integrity": "sha1-AUKk6KJD+IgsAjOqDgKBqnYVInM=", + "dev": true, + "requires": { + "string-width": "2.1.1" + }, + "dependencies": { + "ansi-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", + "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=", + "dev": true + }, + "is-fullwidth-code-point": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", + "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=", + "dev": true + }, + "string-width": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz", + "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==", + "dev": true, + "requires": { + "is-fullwidth-code-point": "2.0.0", + "strip-ansi": "4.0.0" + } + }, + "strip-ansi": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", + "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", + "dev": true, + "requires": { + "ansi-regex": "3.0.0" + } + } + } + }, "window-size": { "version": "0.1.0", "resolved": "https://registry.npmjs.org/window-size/-/window-size-0.1.0.tgz", @@ -4062,21 +4868,41 @@ "integrity": "sha1-o9XabNXAvAAI03I0u68b7WMFkQc=", "dev": true }, + "wrap-ansi": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-2.1.0.tgz", + "integrity": "sha1-2Pw9KE3QV5T+hJc8rs3Rz4JP3YU=", + "dev": true, + "requires": { + "string-width": "1.0.2", + "strip-ansi": "3.0.1" + } + }, "wrappy": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=", "dev": true }, + "wreck": { + "version": "12.5.1", + "resolved": "https://registry.npmjs.org/wreck/-/wreck-12.5.1.tgz", + "integrity": "sha512-l5DUGrc+yDyIflpty1x9XuMj1ehVjC/dTbF3/BasOO77xk0EdEa4M/DuOY8W88MQDAD0fEDqyjc8bkIMHd2E9A==", + "dev": true, + "requires": { + "boom": "5.2.0", + "hoek": "4.2.0" + } + }, "write-file-atomic": { - "version": "1.3.4", - "resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-1.3.4.tgz", - "integrity": "sha1-+Aek8LHZ6ROuekgRLmzDrxmRtF8=", + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-2.3.0.tgz", + "integrity": "sha512-xuPeK4OdjWqtfi59ylvVL0Yn35SF3zgcAcv7rBPFHVaEapaDr4GdGgm3j7ckTwH9wHL7fGmgfAnb0+THrHb8tA==", "dev": true, "requires": { "graceful-fs": "4.1.11", "imurmurhash": "0.1.4", - "slide": "1.1.6" + "signal-exit": "3.0.2" } }, "x-xss-protection": { @@ -4086,13 +4912,22 @@ "dev": true }, "xdg-basedir": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/xdg-basedir/-/xdg-basedir-2.0.0.tgz", - "integrity": "sha1-7byQPMOF/ARSPZZqM1UEtVBNG9I=", - "dev": true, - "requires": { - "os-homedir": "1.0.2" - } + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/xdg-basedir/-/xdg-basedir-3.0.0.tgz", + "integrity": "sha1-SWsswQnsqNus/i3HK2A8F8WHCtQ=", + "dev": true + }, + "y18n": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/y18n/-/y18n-3.2.1.tgz", + "integrity": "sha1-bRX7qITAhnnA136I53WegR4H+kE=", + "dev": true + }, + "yallist": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-2.1.2.tgz", + "integrity": "sha1-HBH5IY8HYImkfdUS+TxmmaaoHVI=", + "dev": true }, "yargs": { "version": "3.10.0", @@ -4106,6 +4941,23 @@ "decamelize": "1.2.0", "window-size": "0.1.0" } + }, + "yargs-parser": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-7.0.0.tgz", + "integrity": "sha1-jQrELxbqVd69MyyvTEA4s+P139k=", + "dev": true, + "requires": { + "camelcase": "4.1.0" + }, + "dependencies": { + "camelcase": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-4.1.0.tgz", + "integrity": "sha1-1UVjW+HjPFQmScaRc+Xeas+uNN0=", + "dev": true + } + } } } } diff --git a/package.json b/package.json index ee3152e..d511769 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@sakuraapi/api", - "version": "0.7.1", + "version": "0.8.0-1", "description": "MongoDB and TypeScript MEAN Stack Framework for NodeJS", "main": "lib/index.js", "typings": "lib/index.d.ts", @@ -58,36 +58,36 @@ }, "devDependencies": { "@types/colors": "^1.1.3", - "@types/debug": "0.0.29", - "@types/express": "^4.0.35", + "@types/debug": "0.0.30", + "@types/express": "^4.11.0", "@types/jasmine": "2.5.45", - "@types/lodash": "^4.14.63", - "@types/mongodb": "^2.2.0", - "@types/node": "^8.0.46", - "@types/supertest": "^2.0.0", + "@types/lodash": "^4.14.91", + "@types/mongodb": "^2.2.18", + "@types/node": "^8.5.2", + "@types/supertest": "^2.0.4", "@types/uuid": "^3.4.3", - "body-parser": "^1.17.1", - "helmet": "^3.6.0", - "http-server": "^0.9.0", + "body-parser": "^1.18.2", + "helmet": "^3.9.0", + "http-server": "^0.10.0", "istanbul": "^0.4.5", - "jasmine": "^2.6.0", - "jasmine-spec-reporter": "^3.3.0", - "nodemon": "^1.11.0", - "nsp": "^2.6.3", - "source-map-support": "^0.4.14", + "jasmine": "^2.8.0", + "jasmine-spec-reporter": "^4.2.1", + "nodemon": "^1.14.6", + "nsp": "^3.1.0", + "source-map-support": "^0.5.0", "supertest": "^3.0.0", - "tslint": "^5.1.0", + "tslint": "^5.8.0", "typedoc": "^0.9.0", - "typescript": "^2.3.1" + "typescript": "^2.6.2" }, "dependencies": { "bson-ext": "^1.0.5", "co": "^4.6.0", "colors": "^1.1.2", - "debug": "^2.6.6", - "express": "^4.15.2", + "debug": "^3.1.0", + "express": "^4.16.2", "lodash": "^4.17.4", - "mongodb": "^2.2.26", + "mongodb": "^2.2.33", "reflect-metadata": "^0.1.10", "uuid": "^3.1.0" } diff --git a/src/core/@injectable/index.ts b/src/core/@injectable/index.ts index 4878a4b..742f82c 100644 --- a/src/core/@injectable/index.ts +++ b/src/core/@injectable/index.ts @@ -1,2 +1,2 @@ export * from './injectable'; -export * from './sakura-api-injectable'; +export * from './sapi-injectable-mixin'; diff --git a/src/core/@injectable/injectable.spec.ts b/src/core/@injectable/injectable.spec.ts index 2f49348..37000af 100644 --- a/src/core/@injectable/injectable.spec.ts +++ b/src/core/@injectable/injectable.spec.ts @@ -1,18 +1,15 @@ import {NextFunction, Request, Response} from 'express'; import * as request from 'supertest'; import {testSapi, testUrl} from '../../../spec/helpers/sakuraapi'; +import {SapiModelMixin} from '../@model'; import {Json} from '../@model/json'; import {Model} from '../@model/model'; -import {SakuraApiModel} from '../@model/sakura-api-model'; +import {SapiRoutableMixin} from '../@routable'; import {IRoutableLocals, Routable} from '../@routable/routable'; import {Route} from '../@routable/route'; -import {SakuraApiRoutable} from '../@routable/sakura-api-routable'; import {SakuraApi} from '../sakura-api'; import { - Injectable, - injectableSymbols, - NonInjectableConstructorParameterError, - ProviderNotRegistered, + Injectable, injectableSymbols, NonInjectableConstructorParameterError, ProviderNotRegistered, ProvidersMustBeDecoratedWithInjectableError } from './injectable'; @@ -294,7 +291,7 @@ describe('@Injectable', () => { } @Model() - class TestModel extends SakuraApiModel { + class TestModel extends SapiModelMixin() { @Json() test: string; @@ -340,7 +337,7 @@ describe('@Injectable', () => { @Routable({ baseUrl: 'injectRoutableTest' }) - class AnApi extends SakuraApiRoutable { + class AnApi extends SapiRoutableMixin() { constructor(private testService: TestService) { super(); diff --git a/src/core/@injectable/sakura-api-injectable.ts b/src/core/@injectable/sakura-api-injectable.ts deleted file mode 100644 index 99e8410..0000000 --- a/src/core/@injectable/sakura-api-injectable.ts +++ /dev/null @@ -1,29 +0,0 @@ -import {SakuraApi} from '../sakura-api'; - -/*** - * Integrators should extend their [[Injectable]] classes with this abstract class to get typing for the - * `@`[[Injectable]] mixin functions that are injected. If you need to have a custom super class that cannot extend - * this abstract class, it's sufficient for you to copy and paste these type definitions into your super class to - * get the same typing. - * - * For example, let's say you had a super class SuperChicken that already extends some class you don't control... for - * example, SuperHeroBirds. Since ES doesn't support multiple inheritance, you could just copy and past the - * type definitions for `@`[[Injectable]] mixins into `SuperChicken`: - * ### Example - *
- * class SuperChicken extends SuperHeroBirds {
- *   static sapi?: SakuraApi;
- *   sapi?: SakuraApi;
- *   sapiConfig?: any;
- *   static sapiConfig?: any;
- * }
- *
- * Annoying? Yes. See: https://github.com/Microsoft/TypeScript/issues/4881
- */
-export abstract class SakuraApiInjectable {
-  static sapi?: SakuraApi;
-  static sapiConfig?: any;
-
-  sapi?: SakuraApi;
-  sapiConfig?: any;
-}
diff --git a/src/core/@injectable/sapi-injectable-mixin.ts b/src/core/@injectable/sapi-injectable-mixin.ts
new file mode 100644
index 0000000..5968dc6
--- /dev/null
+++ b/src/core/@injectable/sapi-injectable-mixin.ts
@@ -0,0 +1,30 @@
+import {Constructor} from '../helpers/constructor-type';
+import {SakuraApi} from '../sakura-api';
+
+/***
+ * Integrators should extend their Injectables with this Mixin to get type checking
+ *
+ * ### Example
+ * 
+ * class SuperChicken extends SapiInjectableMixin() {
+ * }
+ * 
+ * + * See [[SapiModelMixin]] for more information. + */ +export function SapiInjectableMixin>(Base?: T) { + Base = Base || class { + } as any; + + return class extends Base { + constructor(...args: any[]) { + super(...args); + } + + static sapi: SakuraApi; + static sapiConfig: any; + + sapi: SakuraApi; + sapiConfig: any; + }; +} diff --git a/src/core/@model/db.spec.ts b/src/core/@model/db.spec.ts index 70ed155..1bb4766 100644 --- a/src/core/@model/db.spec.ts +++ b/src/core/@model/db.spec.ts @@ -3,7 +3,7 @@ import {ObjectID} from 'mongodb'; import {testSapi} from '../../../spec/helpers/sakuraapi'; import {Db, dbSymbols, Json} from './'; import {Model} from './model'; -import {SakuraApiModel} from './sakura-api-model'; +import {SapiModelMixin} from './sapi-model-mixin'; describe('@Db', () => { @@ -25,7 +25,7 @@ describe('@Db', () => { it('is injected as a static member of an @Model object by default', () => { @Model() - class Test extends SakuraApiModel { + class Test extends SapiModelMixin() { } expect(Test.fromDb).toBeDefined(); @@ -39,7 +39,7 @@ describe('@Db', () => { } @Model() - class User extends SakuraApiModel { + class User extends SapiModelMixin() { @Db() value; @@ -70,7 +70,7 @@ describe('@Db', () => { describe('constructor', () => { @Model() - class Test extends SakuraApiModel { + class Test extends SapiModelMixin() { val = 777; } @@ -123,7 +123,7 @@ describe('@Db', () => { } @Model() - class Test extends SakuraApiModel { + class Test extends SapiModelMixin() { @Db('fn') firstName: string; @@ -160,7 +160,7 @@ describe('@Db', () => { } @Model() - class Test extends SakuraApiModel { + class Test extends SapiModelMixin() { @Db({model: Contact}) contact: Contact = new Contact(); } @@ -198,7 +198,7 @@ describe('@Db', () => { it('throws when IDbOptions.model is invalid constructor function', () => { @Model() - class TestModelOptionFail extends SakuraApiModel { + class TestModelOptionFail extends SapiModelMixin() { @Db({model: {}}) doh = new Order(); } @@ -244,7 +244,7 @@ describe('@Db', () => { it('handles properties with @Db({field}) set', () => { @Model() - class Test extends SakuraApiModel { + class Test extends SapiModelMixin() { @Db({ field: 'fn' @@ -266,7 +266,7 @@ describe('@Db', () => { it('unmarshalls _id', (done) => { @Model() - class Test extends SakuraApiModel { + class Test extends SapiModelMixin() { @Db({field: 'ph'}) phone: string; @@ -292,7 +292,7 @@ describe('@Db', () => { db: 'userDb' } }) - class Test94 extends SakuraApiModel { + class Test94 extends SapiModelMixin() { @Db({field: 'ad', model: Address}) @Json() address = new Address(); } @@ -351,7 +351,7 @@ describe('@Db', () => { promiscuous: true } }) - class Test extends SakuraApiModel { + class Test extends SapiModelMixin() { @Db({field: 'ph'}) phone: string; @@ -410,7 +410,7 @@ describe('@Db', () => { db: 'userDb' } }) - class User extends SakuraApiModel { + class User extends SapiModelMixin() { @Db('fn') @Json('f') firstName: string = 'George'; @@ -508,7 +508,7 @@ describe('@Db', () => { describe('fromDbArray', () => { @Model() - class Test extends SakuraApiModel { + class Test extends SapiModelMixin() { @Db({ field: 'fn' }) @@ -580,7 +580,7 @@ describe('@Db', () => { promiscuous: false // default } }) - class ChasteModelTest extends SakuraApiModel { + class ChasteModelTest extends SapiModelMixin() { @Db('fn') firstName = 'George'; diff --git a/src/core/@model/index.ts b/src/core/@model/index.ts index ade604e..b7f746f 100644 --- a/src/core/@model/index.ts +++ b/src/core/@model/index.ts @@ -3,4 +3,4 @@ export * from './errors'; export * from './json'; export * from './model'; export * from './private'; -export * from './sakura-api-model'; +export * from './sapi-model-mixin'; diff --git a/src/core/@model/json.spec.ts b/src/core/@model/json.spec.ts index b1c94e4..9639b7d 100644 --- a/src/core/@model/json.spec.ts +++ b/src/core/@model/json.spec.ts @@ -3,7 +3,7 @@ import {testSapi} from '../../../spec/helpers/sakuraapi'; import {Db} from './db'; import {Json} from './json'; import {Model, modelSymbols} from './model'; -import {SakuraApiModel} from './sakura-api-model'; +import {SapiModelMixin} from './sapi-model-mixin'; describe('@Json', () => { @@ -14,7 +14,7 @@ describe('@Json', () => { promiscuous: true } }) - class Test extends SakuraApiModel { + class Test extends SapiModelMixin() { @Json('ap') aProperty: string = 'test'; @@ -61,7 +61,7 @@ describe('@Json', () => { describe('toJson', () => { it('function is injected into the prototype of the model by default', () => { @Model() - class User extends SakuraApiModel { + class User extends SapiModelMixin() { firstName = 'George'; lastName: string; } @@ -95,7 +95,7 @@ describe('@Json', () => { } @Model({}) - class User extends SakuraApiModel { + class User extends SapiModelMixin() { @Db('fn') @Json('fn') firstName = 'George'; @@ -148,7 +148,7 @@ describe('@Json', () => { } @Model() - class User extends SakuraApiModel { + class User extends SapiModelMixin() { firstName = 'George'; lastName: string; contact = new Contact(); @@ -174,7 +174,7 @@ describe('@Json', () => { } @Model() - class User extends SakuraApiModel { + class User extends SapiModelMixin() { firstName = 'George'; lastName: string; contact = new Contact(); @@ -198,7 +198,7 @@ describe('@Json', () => { } @Model() - class User extends SakuraApiModel { + class User extends SapiModelMixin() { @Json('fn') firstName = 0; @@ -226,7 +226,7 @@ describe('@Json', () => { db: 'userDb' } }) - class User extends SakuraApiModel { + class User extends SapiModelMixin() { @Db('fn') @Json('fName') firstName = 'George'; @Db('ln') @Json('lName') @@ -308,7 +308,7 @@ describe('@Json', () => { promiscuous: true } }) - class User extends SakuraApiModel { + class User extends SapiModelMixin() { firstName = 'George'; lastName: string; contact = new Contact(); @@ -363,7 +363,7 @@ describe('@Json', () => { } @Model() - class User extends SakuraApiModel { + class User extends SapiModelMixin() { @Db({field: 'fn', private: true}) firstName = 'George'; @@ -462,7 +462,7 @@ describe('@Json', () => { } @Model({}) - class User extends SakuraApiModel { + class User extends SapiModelMixin() { @Db('fn') @Json('fn') firstName = 'George'; @@ -483,7 +483,7 @@ describe('@Json', () => { it('allows the injected functions to be overridden without breaking the internal dependencies', () => { @Model() - class SymbolTest extends SakuraApiModel { + class SymbolTest extends SapiModelMixin() { @Json('ap') aProperty: number; } @@ -507,7 +507,7 @@ describe('@Json', () => { it('does not throw if there are no @Json decorators', () => { @Model() - class C extends SakuraApiModel { + class C extends SapiModelMixin() { someProperty = 777; } @@ -610,7 +610,7 @@ describe('@Json', () => { it('maps a model property that has no @Json property, but does have a default value', () => { @Model() - class TestDefaults extends SakuraApiModel { + class TestDefaults extends SapiModelMixin() { firstName: string = 'George'; lastName: string = 'Washington'; } @@ -692,7 +692,7 @@ describe('@Json', () => { } @Model() - class Parent extends SakuraApiModel { + class Parent extends SapiModelMixin() { @Json({model: Child}) instantiatedChild = new Child(); @@ -781,7 +781,7 @@ describe('@Json', () => { describe('id behavior', () => { @Model() - class User extends SakuraApiModel { + class User extends SapiModelMixin() { } it('unmarshalls id as an ObjectID when it is a valid ObjectID', () => { @@ -833,7 +833,7 @@ describe('@Json', () => { describe('promiscuous fields, issue #99', () => { @Model() - class DonorIntent extends SakuraApiModel { + class DonorIntent extends SapiModelMixin() { @Db() @Json() currency: string; @@ -1052,7 +1052,7 @@ describe('@Json', () => { } @Model() - class ChangeSetTest extends SakuraApiModel { + class ChangeSetTest extends SapiModelMixin() { @Db('first') @Json('fn') @@ -1144,7 +1144,7 @@ describe('@Json', () => { it('allows the injected functions to be overridden without breaking the internal dependencies', () => { @Model() - class SymbolTest extends SakuraApiModel { + class SymbolTest extends SapiModelMixin() { @Json('ap') aProperty: number; } diff --git a/src/core/@model/model.spec.ts b/src/core/@model/model.spec.ts index 60bedb5..36c9101 100644 --- a/src/core/@model/model.spec.ts +++ b/src/core/@model/model.spec.ts @@ -1,19 +1,16 @@ import {InsertOneWriteOpResult, ObjectID, ReplaceOneOptions, UpdateWriteOpResult} from 'mongodb'; import {testSapi} from '../../../spec/helpers/sakuraapi'; import {SakuraApi} from '../sakura-api'; -import {Db, Json, Model, modelSymbols, SakuraApiModel} from './'; +import {Db, Json, Model, modelSymbols} from './'; import {SapiDbForModelNotFound, SapiMissingIdErr} from './errors'; +import {SapiModelMixin} from './sapi-model-mixin'; describe('core/@Model', () => { @Model() - class Test extends SakuraApiModel { + class Test extends SapiModelMixin() { - static getById(id: string, project?: any): Promise { - return new Promise((resolve) => { - resolve('custom'); - }); - } + isCustom = false; constructor() { super(); @@ -29,10 +26,16 @@ describe('core/@Model', () => { nModified: -1, ok: 1 } - }); + } as any); } } + (Test as any).getById = async (id: string, project?: any): Promise => { + const test = new Test(); + test.isCustom = true; + return test; + }; + describe('construction', () => { let test = null; @@ -104,7 +107,7 @@ describe('core/@Model', () => { @Model({ dbConfig }) - class TestDefaultMethods extends SakuraApiModel { + class TestDefaultMethods extends SapiModelMixin() { @Db({ field: 'fn' }) @@ -123,7 +126,7 @@ describe('core/@Model', () => { db: 'bad' } }) - class TestBadDb extends SakuraApiModel { + class TestBadDb extends SapiModelMixin() { } let sapi = null; @@ -457,7 +460,7 @@ describe('core/@Model', () => { db: 'userDb' } }) - class UserCreateTest extends SakuraApiModel { + class UserCreateTest extends SapiModelMixin() { @Db() firstName = 'George'; @Db() @@ -538,7 +541,7 @@ describe('core/@Model', () => { } @Model({dbConfig}) - class TestParent extends SakuraApiModel { + class TestParent extends SapiModelMixin() { @Db() @Json() pVal = 'parent'; @@ -773,7 +776,7 @@ describe('core/@Model', () => { promiscuous: true } }) - class PartialUpdateTest extends SakuraApiModel { + class PartialUpdateTest extends SapiModelMixin() { @Db('fn') firstName = 'George'; @@ -976,7 +979,7 @@ describe('core/@Model', () => { Test .getById('123') .then((result) => { - expect(result).toBe('custom'); + expect(result.isCustom).toBe(true); done(); }) .catch(done.fail); @@ -995,7 +998,7 @@ describe('core/@Model', () => { describe('allows integrator to exclude CRUD with suppressInjection: [] in ModelOptions', () => { @Model({suppressInjection: ['get', 'save']}) - class TestSuppressedDefaultMethods extends SakuraApiModel { + class TestSuppressedDefaultMethods extends SapiModelMixin() { } beforeEach(() => { @@ -1022,7 +1025,7 @@ describe('core/@Model', () => { promiscuous: true } }) - class NestedModel extends SakuraApiModel { + class NestedModel extends SapiModelMixin() { @Db() contact: { firstName: string, @@ -1091,7 +1094,7 @@ describe('core/@Model', () => { db: 'userDb' } }) - class ModelDateStoreAndRestoreTest extends SakuraApiModel { + class ModelDateStoreAndRestoreTest extends SapiModelMixin() { @Db() @Json() date: Date = new Date(); } @@ -1172,7 +1175,7 @@ describe('core/@Model', () => { db: 'userDb' } }) - class ModelArrayStoreAndRestoreTest extends SakuraApiModel { + class ModelArrayStoreAndRestoreTest extends SapiModelMixin() { @Db() @Json() anArray = ['value1', 'value2']; } @@ -1253,7 +1256,7 @@ describe('core/@Model', () => { describe('sapi injected', () => { @Model() - class TestSapiInjection extends SakuraApiModel { + class TestSapiInjection extends SapiModelMixin() { } let sapi; diff --git a/src/core/@model/model.ts b/src/core/@model/model.ts index f8f0bf4..02f68f4 100644 --- a/src/core/@model/model.ts +++ b/src/core/@model/model.ts @@ -1,14 +1,6 @@ import { - Collection, - CollectionInsertOneOptions, - CollectionOptions, - Cursor, - Db, - DeleteWriteOpResultObject, - InsertOneWriteOpResult, - ObjectID, - ReplaceOneOptions, - UpdateWriteOpResult + Collection, CollectionInsertOneOptions, CollectionOptions, Cursor, Db, DeleteWriteOpResultObject, + InsertOneWriteOpResult, ObjectID, ReplaceOneOptions, UpdateWriteOpResult } from 'mongodb'; import {getDependencyInjections} from '../@injectable/injectable'; import {addDefaultInstanceMethods, addDefaultStaticMethods, shouldRecurse} from '../helpers'; @@ -287,19 +279,11 @@ export function Model(modelOptions?: IModelOptions): (object) => any { // Developer notes: // // Instance method injection... TypeScript won't know these are part of the type of the object being constructed - // since they're dynamically injected. This is best done with TypeScript declaration merging. - // See: https://www.typescriptlang.org/docs/handbook/declaration-merging.html + // since they're dynamically injected. You can use the SapiModelMixin to overcome this. // // example: - // - // interface Example extends IModel {} - // - // @Model() - // class Example {} - // - // alternatively: // @Model() - // class Example extends SakuraApiModel {} + // class Example extends SapiModelMixin() {} // ================================================================================================================= // Inject default instance methods for CRUD if not already defined by integrator diff --git a/src/core/@model/private.spec.ts b/src/core/@model/private.spec.ts index 63578fa..a459dec 100644 --- a/src/core/@model/private.spec.ts +++ b/src/core/@model/private.spec.ts @@ -1,5 +1,6 @@ import {testSapi} from '../../../spec/helpers/sakuraapi'; -import {Json, Model, Private, SakuraApiModel} from './'; +import {Json, Model, Private} from './'; +import {SapiModelMixin} from './sapi-model-mixin'; describe('@Private', () => { const sapi = testSapi({ @@ -8,7 +9,7 @@ describe('@Private', () => { }); @Model() - class Test implements SakuraApiModel { + class Test extends SapiModelMixin() { @Private() aPrivateField1: number = 1; diff --git a/src/core/@model/sakura-api-model.ts b/src/core/@model/sakura-api-model.ts deleted file mode 100644 index 19c2246..0000000 --- a/src/core/@model/sakura-api-model.ts +++ /dev/null @@ -1,118 +0,0 @@ -import { - Collection, - CollectionInsertOneOptions, - CollectionOptions, - Cursor, - Db, - DeleteWriteOpResultObject, - InsertOneWriteOpResult, - ObjectID, - ReplaceOneOptions, - UpdateWriteOpResult -} from 'mongodb'; -import {SakuraApi} from '../sakura-api'; -import {IDbGetParams, IFromDbOptions} from './'; - -/*** - * Integrators should extend their [[Model]] classes with this abstract class to get typing for the `@`[[Model]] mixin - * functions that are injected. If you need to have a custom super class that cannot extend this abstract class, - * it's sufficient for you to copy and paste these type definitions into your super class to get the same typing. - * - * For example, let's say you had a super class SuperChicken that already extends some class you don't control... for - * example, SuperHeroBirds. Since ES doesn't support multiple inheritance, you could just copy and past the - * type definitions for `@`[[Model]] mixins into `SuperChicken`: - * - * ### Example - *
- * class SuperChicken extends SuperHeroBirds {
- *   static fromDb?: (this: { new(): T }, json: any, options?: IFromDbOptions) => T;
- *
- *   static fromJson?: (this: { new(...any): T }, json: object, ...constructorArgs: any[]) => T;
- *   static fromJsonToDb?: (json: any) => any;
- *
- *   static fromDbArray?: (this: { new(): T }, jsons: object[], ...constructorArgs) => T[];
- *   static fromJsonArray?: (this: { new(): T }, jsons: object[], ...constructorArgs: any[]) => T[];
- *
- *   static get?: (this: { new (): T }, params: IDbGetParams) => Promise;
- *   static getById?: (this: { new (): T }, id: string | ObjectID, project?: any) => Promise;
- *   static getCollection?: () => Collection;
- *   static getCursor?: (filter: any, project?: any) => Cursor;
- *   static getCursorById?: (id, project?: any) => Cursor;
- *   static getDb?: () => Db;
- *   static getOne?: (this: { new (): T }, filter: any, project?: any) => Promise;
- *
- *   static mapJsonToDb?: (json: object) => object;
- *
- *   static removeAll?: (filter: any, options?: CollectionOptions) => Promise;
- *   static removeById?: (id: ObjectID, options?: CollectionOptions) => Promise;
- *
- *   static sapi?: SakuraApi;
- *   static sapiConfig?: any;
- *
- *   _id?: ObjectID; // tslint:disable-line
- *   id?: ObjectID;
- *
- *   create?: (options?: CollectionInsertOneOptions) => Promise;
- *
- *   getCollection?: () => Collection;
- *   getDb?: () => Db;
- *
- *   remove?: (filter: any | null, options?: CollectionOptions) => Promise;
- *   save?: (set?: { [key: string]: any } | null, options?: ReplaceOneOptions) => Promise;
- *
- *   sapi?: SakuraApi;
- *   sapiConfig?: any;
- *
- *   toDb?: (changeSet?: object) => any;
- *   toJson?: (projection?: any) => any;
- *   toJsonString?: (replacer?: () => any | Array, space?: string | number) => string;
- *
- *   ///
- *   // your class implementation continues on here...
- * }
- * 
- * Pain in the arse? Sure. Unfortunately, TypeScript interfaces don't allow you to define static interface - * members. See: https://github.com/Microsoft/TypeScript/issues/4881 - */ -export abstract class SakuraApiModel { - - static fromDb?: (this: { new(): T }, json: any, options?: IFromDbOptions) => T; - - // tslint:disable-next-line:variable-name - static fromJson?: (this: { new(...any): T }, json: object) => T; - static fromJsonToDb?: (json: any) => any; - - static fromDbArray?: (this: { new(): T }, jsons: object[], options?: IFromDbOptions) => T[]; - static fromJsonArray?: (this: { new(): T }, jsons: object[]) => T[]; - - static get?: (this: { new (): T }, params: IDbGetParams) => Promise; - static getById?: (this: { new (): T }, id: string | ObjectID, project?: any) => Promise; - static getCollection?: () => Collection; - static getCursor?: (filter: any, project?: any) => Cursor; - static getCursorById?: (id, project?: any) => Cursor; - static getDb?: () => Db; - static getOne?: (this: { new (): T }, filter: any, project?: any) => Promise; - - static mapJsonToDb?: (json: object) => object; - - static removeAll?: (filter: any, options?: CollectionOptions) => Promise; - static removeById?: (id: ObjectID, options?: CollectionOptions) => Promise; - - static sapi?: SakuraApi; - static sapiConfig?: any; - - _id?: ObjectID; // tslint:disable-line - id?: ObjectID; - - create?: (options?: CollectionInsertOneOptions) => Promise; - - getCollection?: () => Collection; - getDb?: () => Db; - - remove?: (filter: any | null, options?: CollectionOptions) => Promise; - save?: (set?: { [key: string]: any } | null, options?: ReplaceOneOptions) => Promise; - - toDb?: (changeSet?: object) => any; - toJson?: (projection?: any) => any; - toJsonString?: (replacer?: () => any | Array, space?: string | number) => string; -} diff --git a/src/core/@model/sapi-model-mixin.ts b/src/core/@model/sapi-model-mixin.ts new file mode 100644 index 0000000..0ad067e --- /dev/null +++ b/src/core/@model/sapi-model-mixin.ts @@ -0,0 +1,94 @@ +import { + Collection, CollectionInsertOneOptions, CollectionOptions, Cursor, Db, DeleteWriteOpResultObject, + InsertOneWriteOpResult, ObjectID, ReplaceOneOptions, UpdateWriteOpResult +} from 'mongodb'; +import {Constructor} from '../helpers/constructor-type'; +import {SakuraApi} from '../sakura-api'; +import {IDbGetParams, IFromDbOptions} from './'; + +/** + * Integrators should extend their Models with this Mixin to get type checking. + * + * ### Example + *
+ * class SuperChicken extends SapiModelMixins() {
+ * }
+ * 
+ * + * If your class inherits from a base class, you can: + * ### Example + *
+ * class SuperChicken extends SapiModelMixins(BaseClass) {
+ * }
+ * 
+ * + * * You can also mixin other mixins so long as they follow the patterns established here: + * * https://www.typescriptlang.org/docs/handbook/mixins.html + * * https://www.typescriptlang.org/docs/handbook/release-notes/typescript-2-2.html + * * http://justinfagnani.com/2015/12/21/real-mixins-with-javascript-classes/ + * + * You can override an injected method like this: + * ### Example + *
+ * class SuperChicken extends SapiModelMixins(BaseClass) {
+ * }
+ *
+ * (SuperChicken as any).getById(id:string | ObjectID, project?:any) => Promise {
+ * ...
+ * }
+ *
+ * (SuperChicken as any).prototype.remove(filter: any | null, options?: CollectionOptions) => Promise {
+ * ...
+ * }
+ * 
+ * + * Just remember to stick to the interface in case SakuraAPI is calling the method being overriden internally. + */ +export function SapiModelMixin>(Base?: T) { + Base = Base || class { + } as any; + + return class extends Base { + constructor(...args: any[]) { + super(...args); + } + + static fromDb: (this: { new(): T }, json: any, options?: IFromDbOptions) => T; + static fromJson: (this: { new(...any): T }, json: object) => T; + static fromJsonToDb: (json: any) => any; + + static fromDbArray: (this: { new(): T }, jsons: object[], options?: IFromDbOptions) => T[]; + static fromJsonArray: (this: { new(): T }, jsons: object[]) => T[]; + + static get: (this: { new (): T }, params: IDbGetParams) => Promise; + static getById: (this: { new (): T }, id: string | ObjectID, project?: any) => Promise; + static getCollection: () => Collection; + static getCursor: (filter: any, project?: any) => Cursor; + static getCursorById: (id, project?: any) => Cursor; + static getDb: () => Db; + static getOne: (this: { new (): T }, filter: any, project?: any) => Promise; + + static mapJsonToDb: (json: object) => object; + + static removeAll: (filter: any, options?: CollectionOptions) => Promise; + static removeById: (id: ObjectID, options?: CollectionOptions) => Promise; + + static sapi: SakuraApi; + static sapiConfig?: any; + + _id: ObjectID; + id: ObjectID; + + create: (options?: CollectionInsertOneOptions) => Promise; + + getCollection: () => Collection; + getDb: () => Db; + + remove: (filter: any | null, options?: CollectionOptions) => Promise; + save: (set?: { [key: string]: any } | null, options?: ReplaceOneOptions) => Promise; + + toDb: (changeSet?: object) => any; + toJson: (projection?: any) => any; + toJsonString: (replacer?: () => any | Array, space?: string | number) => string; + }; +} diff --git a/src/core/@routable/index.ts b/src/core/@routable/index.ts index ed7efdf..728c589 100644 --- a/src/core/@routable/index.ts +++ b/src/core/@routable/index.ts @@ -1,3 +1,3 @@ export * from './routable'; export * from './route'; -export * from './sakura-api-routable'; +export * from './sapi-routable-mixin'; diff --git a/src/core/@routable/routable.spec.ts b/src/core/@routable/routable.spec.ts index 0c63e2a..625c8d0 100644 --- a/src/core/@routable/routable.spec.ts +++ b/src/core/@routable/routable.spec.ts @@ -3,11 +3,12 @@ import {NextFunction, Request, Response} from 'express'; import {ObjectID} from 'mongodb'; import {testSapi, testUrl} from '../../../spec/helpers/sakuraapi'; import {getAllRouteHandler, getRouteHandler} from '../../handlers/basic-handlers'; -import {Db, Json, Model, SakuraApiModel} from '../@model'; +import {Db, Json, Model, SapiModelMixin} from '../@model'; import {DUPLICATE_RESOURCE} from '../helpers/http-status'; import {SakuraApi} from '../sakura-api'; -import {Routable, routableSymbols, Route, SakuraApiRoutable} from './'; +import {Routable, routableSymbols, Route} from './'; import {IRoutableLocals} from './routable'; +import {SapiRoutableMixin} from './sapi-routable-mixin'; import request = require('supertest'); describe('core/@Routable', () => { @@ -307,7 +308,7 @@ describe('core/@Routable', () => { db: 'userDb' } }) - class User extends SakuraApiModel { + class User extends SapiModelMixin() { @Db('fname') @Json('fn') firstName: string = 'George'; @Db('lname') @Json('ln') @@ -327,7 +328,7 @@ describe('core/@Routable', () => { db: 'userDb' } }) - class NoDocsCreated extends SakuraApiModel { + class NoDocsCreated extends SapiModelMixin() { } @Routable({ @@ -1272,7 +1273,7 @@ describe('core/@Routable', () => { db: 'userDb' } }) - class UserBeforeAllHandlers extends SakuraApiModel { + class UserBeforeAllHandlers extends SapiModelMixin() { @Db() @Json() firstName = 'George'; @Db() @Json() @@ -1380,7 +1381,7 @@ describe('core/@Routable', () => { db: 'userDb' } }) - class UserAfterAllHandlers extends SakuraApiModel { + class UserAfterAllHandlers extends SapiModelMixin() { @Db() @Json() firstName = 'George'; @Db() @Json() @@ -1465,7 +1466,7 @@ describe('core/@Routable', () => { db: 'userDb' } }) - class UserAfterAllHandlersBeforeAllHandlers extends SakuraApiModel { + class UserAfterAllHandlersBeforeAllHandlers extends SapiModelMixin() { @Db() @Json() firstName = 'George'; @Db() @Json() @@ -1555,7 +1556,7 @@ describe('core/@Routable', () => { db: 'userDb' } }) - class BeforeAfterInjectRouteTestModel extends SakuraApiModel { + class BeforeAfterInjectRouteTestModel extends SapiModelMixin() { @Db() @Json() firstName = 'George'; @@ -1567,7 +1568,7 @@ describe('core/@Routable', () => { baseUrl: 'GetAllRouteHandlerBeforeAfterTest', model: BeforeAfterInjectRouteTestModel }) - class GetAllRouteHandlerBeforeAfterTest extends SakuraApiRoutable { + class GetAllRouteHandlerBeforeAfterTest extends SapiRoutableMixin() { static getAfterTest(req: Request, res: Response, next: NextFunction) { const resLocal = res.locals as IRoutableLocals; @@ -1656,7 +1657,7 @@ describe('core/@Routable', () => { db: 'userDb' } }) - class BeforeAfterInjectRouteTestModel extends SakuraApiModel { + class BeforeAfterInjectRouteTestModel extends SapiModelMixin() { @Db() @Json() firstName = 'George'; @@ -1668,7 +1669,7 @@ describe('core/@Routable', () => { baseUrl: 'GetRouteHandlerBeforeAfterTest', model: BeforeAfterInjectRouteTestModel }) - class GetRouteHandlerBeforeAfterTest extends SakuraApiRoutable { + class GetRouteHandlerBeforeAfterTest extends SapiRoutableMixin() { static getAfterTest(req: Request, res: Response, next: NextFunction) { const resLocal = res.locals as IRoutableLocals; @@ -1761,7 +1762,7 @@ describe('core/@Routable', () => { describe('sapi injected', () => { @Routable() - class TestRoutableSapiInjection extends SakuraApiModel { + class TestRoutableSapiInjection extends SapiModelMixin() { } let sapi; diff --git a/src/core/@routable/route.spec.ts b/src/core/@routable/route.spec.ts index ff2a494..b1a8005 100644 --- a/src/core/@routable/route.spec.ts +++ b/src/core/@routable/route.spec.ts @@ -2,16 +2,17 @@ import * as express from 'express'; import {NextFunction, Request, Response} from 'express'; import * as request from 'supertest'; import {testSapi, testUrl} from '../../../spec/helpers/sakuraapi'; -import {Db, Json, Model, SakuraApiModel} from '../@model'; +import {Db, Json, Model} from '../@model'; +import {SapiModelMixin} from '../@model/sapi-model-mixin'; import {IRoutableLocals, Routable, routableSymbols, Route} from './'; -import {SakuraApiRoutable} from './sakura-api-routable'; +import {SapiRoutableMixin} from './sapi-routable-mixin'; describe('core/Route', () => { @Routable({ baseUrl: 'testCoreRoute', blackList: ['someBlacklistedMethod'] }) - class TestCoreRoute extends SakuraApiRoutable { + class TestCoreRoute extends SapiRoutableMixin() { @Route({ method: 'get', path: '/' @@ -253,7 +254,7 @@ describe('core/Route', () => { db: 'userDb' } }) - class AfterHandlerTestModel extends SakuraApiModel { + class AfterHandlerTestModel extends SapiModelMixin() { @Db() @Json() firstName = 'George'; diff --git a/src/core/@routable/sakura-api-routable.ts b/src/core/@routable/sakura-api-routable.ts deleted file mode 100644 index 064e78f..0000000 --- a/src/core/@routable/sakura-api-routable.ts +++ /dev/null @@ -1,45 +0,0 @@ -import {NextFunction, Request, Response} from 'express'; -import {SakuraApi} from '../sakura-api'; - -/*** - * Integrators should extend their [[Routable]] classes with this abstract class to get typing for the `@`[[Routable]] - * mixin functions that are injected. If you need to have a custom super class that cannot extend this abstract class, - * it's sufficient for you to copy and paste these type definitions into your super class to get the same typing. - * - * For example, let's say you had a super class SuperChicken that already extends some class you don't control... for - * example, SuperHeroBirds. Since ES doesn't support multiple inheritance, you could just copy and past the - * type definitions for `@`[[Routable]] mixins into `SuperChickenApi`: - * - * ### Example - *
- * class SuperChickenApi extends SuperHeroBirdsApi {
- *   getRouteHandler?: (req: Request, res: Response, next: NextFunction) => void;
- *   getAllRouteHandler?: (req: Request, res: Response, next: NextFunction) => void;
- *   putRouteHandler?: (req: Request, res: Response, next: NextFunction) => void;
- *   postRouteHandler?: (req: Request, res: Response, next: NextFunction) => void;
- *   deleteRouteHandler?: (req: Request, res: Response, next: NextFunction) => void;
- *   static sapi?: SakuraApi;
- *   static sapiConfig?: any;
- *
- *   sapi?: SakuraApi;
- *   sapiConfig?: any;
- *
- *   ///
- *   // your class implementation continues on here...
- * }
- * 
- * Annoying? Yes. See: https://github.com/Microsoft/TypeScript/issues/4881 - */ -export abstract class SakuraApiRoutable { - static getRouteHandler?: (req: Request, res: Response, next: NextFunction) => void; - static getAllRouteHandler?: (req: Request, res: Response, next: NextFunction) => void; - static putRouteHandler?: (req: Request, res: Response, next: NextFunction) => void; - static postRouteHandler?: (req: Request, res: Response, next: NextFunction) => void; - static deleteRouteHandler?: (req: Request, res: Response, next: NextFunction) => void; - - static sapi?: SakuraApi; - static sapiConfig?: any; - - sapi?: SakuraApi; - sapiConfig?: any; -} diff --git a/src/core/@routable/sapi-routable-mixin.ts b/src/core/@routable/sapi-routable-mixin.ts new file mode 100644 index 0000000..b2721b9 --- /dev/null +++ b/src/core/@routable/sapi-routable-mixin.ts @@ -0,0 +1,37 @@ +import {NextFunction, Request, Response} from 'express'; +import {Constructor} from '../helpers/constructor-type'; +import {SakuraApi} from '../sakura-api'; + +/** + * Integrators should extend their Models with this Mixin to get type checking. + * + * * ### Example + *
+ * class SuperChicken extends SapiRoutableMixin() {
+ * }
+ * 
+ * + * See [[SapiModelMixin]] for more details. + */ +export function SapiRoutableMixin>(Base?: T) { + Base = Base || class { + } as any; + + return class extends Base { + constructor(...args: any[]) { + super(...args); + } + + static getRouteHandler?: (req: Request, res: Response, next: NextFunction) => void; + static getAllRouteHandler?: (req: Request, res: Response, next: NextFunction) => void; + static putRouteHandler?: (req: Request, res: Response, next: NextFunction) => void; + static postRouteHandler?: (req: Request, res: Response, next: NextFunction) => void; + static deleteRouteHandler?: (req: Request, res: Response, next: NextFunction) => void; + + static sapi?: SakuraApi; + static sapiConfig?: any; + + sapi?: SakuraApi; + sapiConfig?: any; + }; +} diff --git a/src/core/helpers/constructor-type.ts b/src/core/helpers/constructor-type.ts new file mode 100644 index 0000000..5fbf9b2 --- /dev/null +++ b/src/core/helpers/constructor-type.ts @@ -0,0 +1,4 @@ +/** + * Used for mixins + */ +export type Constructor = new(...args: any[]) => T; diff --git a/src/core/sakura-api.spec.ts b/src/core/sakura-api.spec.ts index 46eb238..ea668db 100644 --- a/src/core/sakura-api.spec.ts +++ b/src/core/sakura-api.spec.ts @@ -5,9 +5,9 @@ import {MongoClient} from 'mongodb'; import * as request from 'supertest'; import {testMongoDbUrl, testSapi, testUrl} from '../../spec/helpers/sakuraapi'; import {SakuraApiConfig} from '../../src/boot/sakura-api-config'; +import {SapiModelMixin} from './@model'; import {Json} from './@model/json'; import {Model} from './@model/model'; -import {SakuraApiModel} from './@model/sakura-api-model'; import {Routable, Route} from './@routable/'; import {SakuraApi, SakuraApiPluginResult} from './sakura-api'; @@ -335,7 +335,7 @@ describe('core/SakuraApi', () => { } @Model() - class TestModelPlugin extends SakuraApiModel { + class TestModelPlugin extends SapiModelMixin() { @Json() modelValue = 'found'; } diff --git a/src/handlers/basic-handlers.ts b/src/handlers/basic-handlers.ts index c5bce11..ebeda91 100644 --- a/src/handlers/basic-handlers.ts +++ b/src/handlers/basic-handlers.ts @@ -1,5 +1,5 @@ import {NextFunction, Request, Response} from 'express'; -import {IDbGetParams, SakuraApiModel} from '../core/@model'; +import {IDbGetParams} from '../core/@model'; import {IRoutableLocals, routableSymbols} from '../core/@routable/routable'; import {DUPLICATE_RESOURCE} from '../core/helpers/http-status'; import {SanitizeMongoDB as Sanitize} from '../core/security/mongo-db'; @@ -216,7 +216,7 @@ export function putRouteHandler(req: Request, res: Response, next: NextFunction) model .getById(id) - .then((obj: SakuraApiModel) => { + .then((obj) => { if (!obj) { resLocals.status = 404; return next();