From 7d34af2e73688a0a55273bcc1384e839b438d44d Mon Sep 17 00:00:00 2001 From: Wallace Breza Date: Tue, 14 May 2019 08:27:11 -0700 Subject: [PATCH 01/19] WIP: Started APIM plugin development --- apim/azureApim.js | 36 + apim/azureApimFunction.js | 34 + apim/lib/deployApi.js | 10 + apim/lib/deployOperation.js | 10 + apim/lib/deployOperations.js | 15 + config.js | 6 +- index.js | 19 +- package-lock.json | 5907 ++++++++++++++++++++++++++++++++++ provider/azureProvider.js | 102 +- 9 files changed, 6088 insertions(+), 51 deletions(-) create mode 100644 apim/azureApim.js create mode 100644 apim/azureApimFunction.js create mode 100644 apim/lib/deployApi.js create mode 100644 apim/lib/deployOperation.js create mode 100644 apim/lib/deployOperations.js create mode 100644 package-lock.json diff --git a/apim/azureApim.js b/apim/azureApim.js new file mode 100644 index 00000000..d4ef5a5f --- /dev/null +++ b/apim/azureApim.js @@ -0,0 +1,36 @@ +'use strict'; + +const BbPromise = require('bluebird'); +const deployApi = require('./lib/deployApi'); +const deployOperations = require('./lib/deployOperations'); +const loginToAzure = require('../shared/loginToAzure'); + +class AzureApim { + constructor(serverless, options) { + this.serverless = serverless; + this.options = options; + this.provider = this.serverless.getProvider('azure'); + + this.serverless.cli.log('Initializing APIM plugin'); + + Object.assign( + this, + loginToAzure, + deployApi, + deployOperations + ); + + this.hooks = { + 'deploy:deploy': () => BbPromise.bind(this) + .then(this.provider.initialize(this.serverless, this.options)) + .then(() => this.serverless.cli.log('Starting APIM deployment')) + .then(() => this.serverless.cli.log(JSON.stringify(this.options))) + .then(this.loginToAzure) + .then(this.deployApi) + .then(this.deployOperations) + .then(() => this.serverless.cli.log('Successfully deployed API Management API & Operations')) + }; + } +} + +module.exports = AzureApim; \ No newline at end of file diff --git a/apim/azureApimFunction.js b/apim/azureApimFunction.js new file mode 100644 index 00000000..02683e48 --- /dev/null +++ b/apim/azureApimFunction.js @@ -0,0 +1,34 @@ +'use strict'; + +const BbPromise = require('bluebird'); +const deployApi = require('./lib/deployApi'); +const deployOperation = require('./lib/deployOperation'); +const loginToAzure = require('../shared/loginToAzure'); + +class AzureApimFunction { + constructor(serverless, options) { + this.serverless = serverless; + this.options = options; + this.provider = this.serverless.getProvider('azure'); + + this.serverless.cli.log('Initializing APIM Function plugin'); + + Object.assign( + this, + loginToAzure, + deployApi, + deployOperation + ); + + this.hooks = { + 'deploy:functions': () => BbPromise.bind(this) + .then(this.provider.initialize(this.serverless, this.options)) + .then(this.loginToAzure) + .then(this.deployApi) + .then(this.deployOperation) + .then(() => this.serverless.cli.log('Successfully deployed API Management API')) + }; + } +} + +module.exports = AzureApimFunction; diff --git a/apim/lib/deployApi.js b/apim/lib/deployApi.js new file mode 100644 index 00000000..92141661 --- /dev/null +++ b/apim/lib/deployApi.js @@ -0,0 +1,10 @@ +'use strict'; + +module.exports = { + deployApi() { + this.serverless.cli.log('Starting to deploy API'); + this.serverless.cli.log(JSON.stringify(this.options)); + + return this.provider.deployApi(this.options); + } +}; diff --git a/apim/lib/deployOperation.js b/apim/lib/deployOperation.js new file mode 100644 index 00000000..5ee1abca --- /dev/null +++ b/apim/lib/deployOperation.js @@ -0,0 +1,10 @@ +'use strict'; + +module.exports = { + deployOperation() { + this.serverless.cli.log('Starting to deploy Operation'); + this.serverless.cli.log(JSON.stringify(this.options)); + + return this.provider.deployApiOperation(this.options.function); + } +}; \ No newline at end of file diff --git a/apim/lib/deployOperations.js b/apim/lib/deployOperations.js new file mode 100644 index 00000000..1b894e73 --- /dev/null +++ b/apim/lib/deployOperations.js @@ -0,0 +1,15 @@ +'use strict'; + +const BbPromise = require('bluebird'); + +module.exports = { + deployOperations() { + this.serverless.cli.log('Starting to deploy Operations'); + + const deployApiTasks = this.serverless.service.getAllFunctions().map((functionName) => { + return this.provider.deployApiOperation(functionName); + }); + + return BbPromise.all(deployApiTasks); + } +}; diff --git a/config.js b/config.js index 9d3820bd..b7978636 100644 --- a/config.js +++ b/config.js @@ -2,7 +2,7 @@ module.exports = { bearer: 'Bearer ', functionAppApiPath: '/api/', functionAppDomain: '.azurewebsites.net', - functionsAdminApiPath: '.azurewebsites.net/admin/functions/', + functionsAdminApiPath: '/admin/functions/', functionsApiPath: '/api/functions', jsonContentType: 'application/json', logInvocationsApiPath: '/azurejobs/api/functions/definitions/', @@ -12,6 +12,6 @@ module.exports = { providerName: 'azure', scmCommandApiPath: '/api/command', scmDomain: '.scm.azurewebsites.net', - scmVfsPath: '.scm.azurewebsites.net/api/vfs/site/wwwroot/', - scmZipApiPath: '.scm.azurewebsites.net/api/zip/site/wwwroot/' + scmVfsPath: '/api/vfs/site/wwwroot/', + scmZipApiPath: '/api/zip/site/wwwroot/' }; diff --git a/index.js b/index.js index 389ddd85..5763c8e7 100644 --- a/index.js +++ b/index.js @@ -14,7 +14,8 @@ const AzureLogs = require('./logs/azureLogs'); const AzureRemove = require('./remove/azureRemove'); const AzurePackage = require('./package/azurePackage'); const AzurePackageFunction = require('./package/azurePackageFunction'); - +const AzureApim = require('./apim/azureApim'); +const AzureApimFunction = require('./apim/azureApimFunction'); class AzureIndex { constructor(serverless, options) { @@ -23,13 +24,15 @@ class AzureIndex { this.serverless.setProvider(AzureProvider.getProviderName(), new AzureProvider(serverless)); - this.serverless.pluginManager.addPlugin(AzurePackage); - this.serverless.pluginManager.addPlugin(AzurePackageFunction); - this.serverless.pluginManager.addPlugin(AzureDeploy); - this.serverless.pluginManager.addPlugin(AzureDeployFunction); - this.serverless.pluginManager.addPlugin(AzureInvoke); - this.serverless.pluginManager.addPlugin(AzureLogs); - this.serverless.pluginManager.addPlugin(AzureRemove); + //this.serverless.pluginManager.addPlugin(AzurePackage); + //this.serverless.pluginManager.addPlugin(AzurePackageFunction); + //this.serverless.pluginManager.addPlugin(AzureDeploy); + //this.serverless.pluginManager.addPlugin(AzureDeployFunction); + this.serverless.pluginManager.addPlugin(AzureApim); + this.serverless.pluginManager.addPlugin(AzureApimFunction); + //this.serverless.pluginManager.addPlugin(AzureInvoke); + //this.serverless.pluginManager.addPlugin(AzureLogs); + //this.serverless.pluginManager.addPlugin(AzureRemove); } } diff --git a/package-lock.json b/package-lock.json new file mode 100644 index 00000000..9c992f1c --- /dev/null +++ b/package-lock.json @@ -0,0 +1,5907 @@ +{ + "name": "serverless-azure-functions", + "version": "0.7.0", + "lockfileVersion": 1, + "requires": true, + "dependencies": { + "@types/node": { + "version": "8.10.48", + "resolved": "https://registry.npmjs.org/@types/node/-/node-8.10.48.tgz", + "integrity": "sha512-c35YEBTkL4rzXY2ucpSKy+UYHjUBIIkuJbWYbsGIrKLEWU5dgJMmLkkIb3qeC3O3Tpb1ZQCwecscvJTDjDjkRw==" + }, + "JSONSelect": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/JSONSelect/-/JSONSelect-0.4.0.tgz", + "integrity": "sha1-oI7cxn6z/L6Z7WMIVTRKDPKCu40=" + }, + "acorn": { + "version": "5.7.3", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-5.7.3.tgz", + "integrity": "sha512-T/zvzYRfbVojPWahDsE5evJdHb3oJoQfFbsrKM7w5Zcs++Tr257tia3BmMP8XYVjp1S9RZXQMh7gao96BlqZOw==" + }, + "acorn-dynamic-import": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/acorn-dynamic-import/-/acorn-dynamic-import-2.0.2.tgz", + "integrity": "sha1-x1K9IQvvZ5UBtsbLf8hPj0cVjMQ=", + "optional": true, + "requires": { + "acorn": "^4.0.3" + }, + "dependencies": { + "acorn": { + "version": "4.0.13", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-4.0.13.tgz", + "integrity": "sha1-EFSVrlNh1pe9GVyCUZLhrX8lN4c=", + "optional": true + } + } + }, + "acorn-jsx": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-3.0.1.tgz", + "integrity": "sha1-r9+UiPsezvyDSPb7IvRk4ypYs2s=", + "dev": true, + "requires": { + "acorn": "^3.0.4" + }, + "dependencies": { + "acorn": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-3.3.0.tgz", + "integrity": "sha1-ReN/s56No/JbruP/U2niu18iAXo=", + "dev": true + } + } + }, + "adal-node": { + "version": "0.1.28", + "resolved": "https://registry.npmjs.org/adal-node/-/adal-node-0.1.28.tgz", + "integrity": "sha1-RoxLs+u9lrEnBmn0ucuk4AZepIU=", + "requires": { + "@types/node": "^8.0.47", + "async": ">=0.6.0", + "date-utils": "*", + "jws": "3.x.x", + "request": ">= 2.52.0", + "underscore": ">= 1.3.1", + "uuid": "^3.1.0", + "xmldom": ">= 0.1.x", + "xpath.js": "~1.1.0" + } + }, + "ajv": { + "version": "6.10.0", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.10.0.tgz", + "integrity": "sha512-nffhOpkymDECQyR0mnsUtoCE8RlX38G0rYP+wgLWFyZuUyuuojSSvi/+euOiQBIn63whYwYVIIH1TvE3tu4OEg==", + "requires": { + "fast-deep-equal": "^2.0.1", + "fast-json-stable-stringify": "^2.0.0", + "json-schema-traverse": "^0.4.1", + "uri-js": "^4.2.2" + } + }, + "ajv-keywords": { + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-1.5.1.tgz", + "integrity": "sha1-MU3QpLM2j609/NxU7eYXG4htrzw=", + "dev": true + }, + "align-text": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/align-text/-/align-text-0.1.4.tgz", + "integrity": "sha1-DNkKVhCT810KmSVsIrcGlDP60Rc=", + "optional": true, + "requires": { + "kind-of": "^3.0.2", + "longest": "^1.0.1", + "repeat-string": "^1.5.2" + } + }, + "ansi-escapes": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-3.2.0.tgz", + "integrity": "sha512-cBhpre4ma+U0T1oM5fXg7Dy1Jw7zzwv7lt/GoCpr+hDQJoYnKVPLL4dCvSEFMmQurOQvSrwT7SL/DAlhBI97RQ==" + }, + "ansi-regex": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", + "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=" + }, + "ansi-styles": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz", + "integrity": "sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=", + "dev": true + }, + "anymatch": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-2.0.0.tgz", + "integrity": "sha512-5teOsQWABXHHBFP9y3skS5P3d/WfWXpv3FUpy+LorMrNYaT9pI4oLMQX7jzQ2KklNpGpWHzdCXTDT2Y3XGlZBw==", + "optional": true, + "requires": { + "micromatch": "^3.1.4", + "normalize-path": "^2.1.1" + } + }, + "aproba": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/aproba/-/aproba-1.2.0.tgz", + "integrity": "sha512-Y9J6ZjXtoYh8RnXVCMOU/ttDmk1aBjunq9vO0ta5x85WDQiQfUF9sIPBITdbiiIVcBo03Hi3jMxigBtsddlXRw==" + }, + "archiver-utils": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/archiver-utils/-/archiver-utils-1.3.0.tgz", + "integrity": "sha1-5QtMCccL89aA4y/xt5lOn52JUXQ=", + "optional": true, + "requires": { + "glob": "^7.0.0", + "graceful-fs": "^4.1.0", + "lazystream": "^1.0.0", + "lodash": "^4.8.0", + "normalize-path": "^2.0.0", + "readable-stream": "^2.0.0" + }, + "dependencies": { + "glob": { + "version": "7.1.4", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.4.tgz", + "integrity": "sha512-hkLPepehmnKk41pUGm3sYxoFs/umurYfYJCerbXEyFIWcAzvpipAgVkBqqT9RBKMGjnq6kMuyYwha6csxbiM1A==", + "optional": true, + "requires": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.0.4", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + } + }, + "lazystream": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/lazystream/-/lazystream-1.0.0.tgz", + "integrity": "sha1-9plf4PggOS9hOWvolGJAe7dxaOQ=", + "optional": true, + "requires": { + "readable-stream": "^2.0.5" + } + } + } + }, + "are-we-there-yet": { + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/are-we-there-yet/-/are-we-there-yet-1.1.5.tgz", + "integrity": "sha512-5hYdAkZlcG8tOLujVDTgCT+uPX0VnpAH28gWsLfzpXYm7wP6mp5Q/gYyR7YQ0cKVJcXJnl3j2kpBan13PtQf6w==", + "requires": { + "delegates": "^1.0.0", + "readable-stream": "^2.0.6" + } + }, + "argparse": { + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", + "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", + "dev": true, + "requires": { + "sprintf-js": "~1.0.2" + } + }, + "arr-diff": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/arr-diff/-/arr-diff-4.0.0.tgz", + "integrity": "sha1-1kYQdP6/7HHn4VI1dhoyml3HxSA=", + "optional": true + }, + "arr-flatten": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/arr-flatten/-/arr-flatten-1.1.0.tgz", + "integrity": "sha512-L3hKV5R/p5o81R7O02IGnwpDmkp6E982XhtbuwSe3O4qOtMMMtodicASA1Cny2U+aCXcNpml+m4dPsvsJ3jatg==", + "optional": true + }, + "arr-union": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/arr-union/-/arr-union-3.1.0.tgz", + "integrity": "sha1-45sJrqne+Gao8gbiiK9jkZuuOcQ=", + "optional": true + }, + "array-unique": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/array-unique/-/array-unique-0.3.2.tgz", + "integrity": "sha1-qJS3XUvE9s1nnvMkSp/Y9Gri1Cg=", + "optional": true + }, + "arrify": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/arrify/-/arrify-1.0.1.tgz", + "integrity": "sha1-iYUI2iIm84DfkEcoRWhJwVAaSw0=", + "optional": true + }, + "asn1": { + "version": "0.2.4", + "resolved": "https://registry.npmjs.org/asn1/-/asn1-0.2.4.tgz", + "integrity": "sha512-jxwzQpLQjSmWXgwaCZE9Nz+glAG01yF1QnWgbhGwHI5A6FRIEY6IVqtHhIepHqI7/kyEyQEagBC5mBEFlIYvdg==", + "requires": { + "safer-buffer": "~2.1.0" + } + }, + "asn1.js": { + "version": "4.10.1", + "resolved": "https://registry.npmjs.org/asn1.js/-/asn1.js-4.10.1.tgz", + "integrity": "sha512-p32cOF5q0Zqs9uBiONKYLm6BClCoBCM5O9JfeUSlnQLBTxYdTK+pW+nXflm8UkKd2UYlEbYz5qEi0JuZR9ckSw==", + "optional": true, + "requires": { + "bn.js": "^4.0.0", + "inherits": "^2.0.1", + "minimalistic-assert": "^1.0.0" + } + }, + "assert": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/assert/-/assert-1.5.0.tgz", + "integrity": "sha512-EDsgawzwoun2CZkCgtxJbv392v4nbk9XDD06zI+kQYoBM/3RBWLlEyJARDOmhAAosBjWACEkKL6S+lIZtcAubA==", + "optional": true, + "requires": { + "object-assign": "^4.1.1", + "util": "0.10.3" + }, + "dependencies": { + "inherits": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.1.tgz", + "integrity": "sha1-sX0I0ya0Qj5Wjv9xn5GwscvfafE=", + "optional": true + }, + "util": { + "version": "0.10.3", + "resolved": "https://registry.npmjs.org/util/-/util-0.10.3.tgz", + "integrity": "sha1-evsa/lCAUkZInj23/g7TeTNqwPk=", + "optional": true, + "requires": { + "inherits": "2.0.1" + } + } + } + }, + "assert-plus": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", + "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=" + }, + "assign-symbols": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/assign-symbols/-/assign-symbols-1.0.0.tgz", + "integrity": "sha1-WWZ/QfrdTyDMvCu5a41Pf3jsA2c=", + "optional": true + }, + "async": { + "version": "2.6.0", + "resolved": "https://registry.npmjs.org/async/-/async-2.6.0.tgz", + "integrity": "sha512-xAfGg1/NTLBBKlHFmnd7PlmUW9KhVQIUuSrYem9xzFUZy13ScvtyGGejaae9iAVRiRq9+Cx7DPFaAAhCpyxyPw==", + "requires": { + "lodash": "^4.14.0" + } + }, + "async-each": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/async-each/-/async-each-1.0.3.tgz", + "integrity": "sha512-z/WhQ5FPySLdvREByI2vZiTWwCnF0moMJ1hK9YQwDTHKh6I7/uSckMetoRGb5UBZPC1z0jlw+n/XCgjeH7y1AQ==", + "optional": true + }, + "asynckit": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", + "integrity": "sha1-x57Zf380y48robyXkLzDZkdLS3k=" + }, + "atob": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/atob/-/atob-2.1.2.tgz", + "integrity": "sha512-Wm6ukoaOGJi/73p/cl2GvLjTI5JM1k/O14isD73YML8StrH/7/lRFgmg8nICZgD3bZZvjwCGxtMOD3wWNAu8cg==", + "optional": true + }, + "aws-sign2": { + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/aws-sign2/-/aws-sign2-0.7.0.tgz", + "integrity": "sha1-tG6JCTSpWR8tL2+G1+ap8bP+dqg=" + }, + "aws4": { + "version": "1.8.0", + "resolved": "https://registry.npmjs.org/aws4/-/aws4-1.8.0.tgz", + "integrity": "sha512-ReZxvNHIOv88FlT7rxcXIIC0fPt4KZqZbOlivyWtXLt8ESx84zd3kMC6iK5jVeS2qt+g7ftS7ye4fi06X5rtRQ==" + }, + "az-login": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/az-login/-/az-login-0.3.0.tgz", + "integrity": "sha512-jwnYLDaK9wZKaZVx2vFRuToeMVagr5xO2utOhhoUK6Vwa2WRjjIZGQufChvLnYQ6ZP1NVh04y0pUxQkN6CfebA==", + "requires": { + "azure-arm-authorization": "^4.0.0-preview", + "azure-graph": "^2.0.0-preview", + "copy-paste": "^1.3.0", + "fs-extra": "^2.1.2", + "fse": "^1.0.1", + "inquirer": "^3.0.6", + "keytar": "^4.0.2", + "moment": "^2.18.1", + "ms-rest-azure": "^2.1.0", + "opn": "^4.0.2" + } + }, + "azure-arm-authorization": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/azure-arm-authorization/-/azure-arm-authorization-4.1.0.tgz", + "integrity": "sha512-pOcV6x9p7FuXcaQ64ROb+WilifauFJA3vPwRMBw55iNTOp78EvndNgLjN7AbtudEM5eTHxxhL6Dupy5SFLW6tw==", + "requires": { + "ms-rest": "^2.2.2", + "ms-rest-azure": "^2.3.3" + } + }, + "azure-arm-resource": { + "version": "2.0.0-preview", + "resolved": "https://registry.npmjs.org/azure-arm-resource/-/azure-arm-resource-2.0.0-preview.tgz", + "integrity": "sha1-lYAQoY+V/4LpqZU3E7oMydJxEks=", + "requires": { + "ms-rest": "^2.0.0", + "ms-rest-azure": "^2.0.0" + } + }, + "azure-graph": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/azure-graph/-/azure-graph-2.2.0.tgz", + "integrity": "sha512-ab0LlM5Q3pcKm+V6F6yx2ShzGOTYMcmJvLdL3PQsC9hF+hrYsBdkTCdNZdlPBgrSB8jp5vzhmK83qHGRs14hHw==", + "requires": { + "ms-rest": "^2.2.2", + "ms-rest-azure": "^2.3.3" + } + }, + "babel-code-frame": { + "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.2" + } + }, + "balanced-match": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz", + "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=" + }, + "base": { + "version": "0.11.2", + "resolved": "https://registry.npmjs.org/base/-/base-0.11.2.tgz", + "integrity": "sha512-5T6P4xPgpp0YDFvSWwEZ4NoE3aM4QBQXDzmVbraCkFj8zHM+mba8SyqB5DbZWyR7mYHo6Y7BdQo3MoA4m0TeQg==", + "optional": true, + "requires": { + "cache-base": "^1.0.1", + "class-utils": "^0.3.5", + "component-emitter": "^1.2.1", + "define-property": "^1.0.0", + "isobject": "^3.0.1", + "mixin-deep": "^1.2.0", + "pascalcase": "^0.1.1" + }, + "dependencies": { + "define-property": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz", + "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=", + "optional": true, + "requires": { + "is-descriptor": "^1.0.0" + } + }, + "is-accessor-descriptor": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", + "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", + "optional": true, + "requires": { + "kind-of": "^6.0.0" + } + }, + "is-data-descriptor": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", + "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", + "optional": true, + "requires": { + "kind-of": "^6.0.0" + } + }, + "is-descriptor": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", + "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", + "optional": true, + "requires": { + "is-accessor-descriptor": "^1.0.0", + "is-data-descriptor": "^1.0.0", + "kind-of": "^6.0.2" + } + }, + "kind-of": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.2.tgz", + "integrity": "sha512-s5kLOcnH0XqDO+FvuaLX8DDjZ18CGFk7VygH40QoKPUQhW4e2rvM0rwUq0t8IQDOwYSeLK01U90OjzBTme2QqA==", + "optional": true + } + } + }, + "base64-js": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.3.0.tgz", + "integrity": "sha512-ccav/yGvoa80BQDljCxsmmQ3Xvx60/UpBIij5QN21W3wBi/hhIC9OoO+KLpu9IJTS9j4DRVJ3aDDF9cMSoa2lw==", + "optional": true + }, + "bcrypt-pbkdf": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.2.tgz", + "integrity": "sha1-pDAdOJtqQ/m2f/PKEaP2Y342Dp4=", + "requires": { + "tweetnacl": "^0.14.3" + } + }, + "big.js": { + "version": "5.2.2", + "resolved": "https://registry.npmjs.org/big.js/-/big.js-5.2.2.tgz", + "integrity": "sha512-vyL2OymJxmarO8gxMr0mhChsO9QGwhynfuu4+MHTAW6czfq9humCB7rKpUjDd9YUiDPU4mzpyupFSvOClAwbmQ==", + "optional": true + }, + "binary-extensions": { + "version": "1.13.1", + "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-1.13.1.tgz", + "integrity": "sha512-Un7MIEDdUC5gNpcGDV97op1Ywk748MpHcFTHoYs6qnj1Z3j7I53VG3nwZhKzoBZmbdRNnb6WRdFlwl7tSDuZGw==", + "optional": true + }, + "bl": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/bl/-/bl-1.2.2.tgz", + "integrity": "sha512-e8tQYnZodmebYDWGH7KMRvtzKXaJHx3BbilrgZCfvyLUYdKpK1t5PSPmpkny/SgiTSCnjfLW7v5rlONXVFkQEA==", + "requires": { + "readable-stream": "^2.3.5", + "safe-buffer": "^5.1.1" + } + }, + "bluebird": { + "version": "3.5.4", + "resolved": "https://registry.npmjs.org/bluebird/-/bluebird-3.5.4.tgz", + "integrity": "sha512-FG+nFEZChJrbQ9tIccIfZJBz3J7mLrAhxakAbnrJWn8d7aKOC+LWifa0G+p4ZqKp4y13T7juYvdhq9NzKdsrjw==" + }, + "bn.js": { + "version": "4.11.8", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.8.tgz", + "integrity": "sha512-ItfYfPLkWHUjckQCk8xC+LwxgK8NYcXywGigJgSwOP8Y2iyWT4f2vsZnoOXTTbo+o5yXmIUJ4gn5538SO5S3gA==", + "optional": true + }, + "boom": { + "version": "2.10.1", + "resolved": "https://registry.npmjs.org/boom/-/boom-2.10.1.tgz", + "integrity": "sha1-OciRjO/1eZ+D+UkqhI9iWt0Mdm8=", + "requires": { + "hoek": "2.x.x" + } + }, + "brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "requires": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "braces": { + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/braces/-/braces-2.3.2.tgz", + "integrity": "sha512-aNdbnj9P8PjdXU4ybaWLK2IF3jc/EoDYbC7AazW6to3TRsfXxscC9UXOB5iDiEQrkyIbWp2SLQda4+QAa7nc3w==", + "optional": true, + "requires": { + "arr-flatten": "^1.1.0", + "array-unique": "^0.3.2", + "extend-shallow": "^2.0.1", + "fill-range": "^4.0.0", + "isobject": "^3.0.1", + "repeat-element": "^1.1.2", + "snapdragon": "^0.8.1", + "snapdragon-node": "^2.0.1", + "split-string": "^3.0.2", + "to-regex": "^3.0.1" + }, + "dependencies": { + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "optional": true, + "requires": { + "is-extendable": "^0.1.0" + } + } + } + }, + "brorand": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/brorand/-/brorand-1.1.0.tgz", + "integrity": "sha1-EsJe/kCkXjwyPrhnWgoM5XsiNx8=", + "optional": true + }, + "browserify-aes": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/browserify-aes/-/browserify-aes-1.2.0.tgz", + "integrity": "sha512-+7CHXqGuspUn/Sl5aO7Ea0xWGAtETPXNSAjHo48JfLdPWcMng33Xe4znFvQweqc/uzk5zSOI3H52CYnjCfb5hA==", + "optional": true, + "requires": { + "buffer-xor": "^1.0.3", + "cipher-base": "^1.0.0", + "create-hash": "^1.1.0", + "evp_bytestokey": "^1.0.3", + "inherits": "^2.0.1", + "safe-buffer": "^5.0.1" + } + }, + "browserify-cipher": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/browserify-cipher/-/browserify-cipher-1.0.1.tgz", + "integrity": "sha512-sPhkz0ARKbf4rRQt2hTpAHqn47X3llLkUGn+xEJzLjwY8LRs2p0v7ljvI5EyoRO/mexrNunNECisZs+gw2zz1w==", + "optional": true, + "requires": { + "browserify-aes": "^1.0.4", + "browserify-des": "^1.0.0", + "evp_bytestokey": "^1.0.0" + } + }, + "browserify-des": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/browserify-des/-/browserify-des-1.0.2.tgz", + "integrity": "sha512-BioO1xf3hFwz4kc6iBhI3ieDFompMhrMlnDFC4/0/vd5MokpuAc3R+LYbwTA9A5Yc9pq9UYPqffKpW2ObuwX5A==", + "optional": true, + "requires": { + "cipher-base": "^1.0.1", + "des.js": "^1.0.0", + "inherits": "^2.0.1", + "safe-buffer": "^5.1.2" + } + }, + "browserify-rsa": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/browserify-rsa/-/browserify-rsa-4.0.1.tgz", + "integrity": "sha1-IeCr+vbyApzy+vsTNWenAdQTVSQ=", + "optional": true, + "requires": { + "bn.js": "^4.1.0", + "randombytes": "^2.0.1" + } + }, + "browserify-sign": { + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/browserify-sign/-/browserify-sign-4.0.4.tgz", + "integrity": "sha1-qk62jl17ZYuqa/alfmMMvXqT0pg=", + "optional": true, + "requires": { + "bn.js": "^4.1.1", + "browserify-rsa": "^4.0.0", + "create-hash": "^1.1.0", + "create-hmac": "^1.1.2", + "elliptic": "^6.0.0", + "inherits": "^2.0.1", + "parse-asn1": "^5.0.0" + } + }, + "browserify-zlib": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/browserify-zlib/-/browserify-zlib-0.2.0.tgz", + "integrity": "sha512-Z942RysHXmJrhqk88FmKBVq/v5tqmSkDz7p54G/MGyjMnCFFnC79XWNbg+Vta8W6Wb2qtSZTSxIGkJrRpCFEiA==", + "optional": true, + "requires": { + "pako": "~1.0.5" + } + }, + "buffer": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.2.1.tgz", + "integrity": "sha512-c+Ko0loDaFfuPWiL02ls9Xd3GO3cPVmUobQ6t3rXNUk304u6hGq+8N/kFi+QEIKhzK3uwolVhLzszmfLmMLnqg==", + "optional": true, + "requires": { + "base64-js": "^1.0.2", + "ieee754": "^1.1.4" + } + }, + "buffer-alloc": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/buffer-alloc/-/buffer-alloc-1.2.0.tgz", + "integrity": "sha512-CFsHQgjtW1UChdXgbyJGtnm+O/uLQeZdtbDo8mfUgYXCHSM1wgrVxXm6bSyrUuErEb+4sYVGCzASBRot7zyrow==", + "requires": { + "buffer-alloc-unsafe": "^1.1.0", + "buffer-fill": "^1.0.0" + } + }, + "buffer-alloc-unsafe": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/buffer-alloc-unsafe/-/buffer-alloc-unsafe-1.1.0.tgz", + "integrity": "sha512-TEM2iMIEQdJ2yjPJoSIsldnleVaAk1oW3DBVUykyOLsEsFmEc9kn+SFFPz+gl54KQNxlDnAwCXosOS9Okx2xAg==" + }, + "buffer-crc32": { + "version": "0.2.13", + "resolved": "https://registry.npmjs.org/buffer-crc32/-/buffer-crc32-0.2.13.tgz", + "integrity": "sha1-DTM+PwDqxQqhRUq9MO+MKl2ackI=", + "optional": true + }, + "buffer-equal-constant-time": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/buffer-equal-constant-time/-/buffer-equal-constant-time-1.0.1.tgz", + "integrity": "sha1-+OcRMvf/5uAaXJaXpMbz5I1cyBk=" + }, + "buffer-fill": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/buffer-fill/-/buffer-fill-1.0.0.tgz", + "integrity": "sha1-+PeLdniYiO858gXNY39o5wISKyw=" + }, + "buffer-from": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.1.tgz", + "integrity": "sha512-MQcXEUbCKtEo7bhqEs6560Hyd4XaovZlO/k9V3hjVUF/zwW7KBVdSK4gIt/bzwS9MbR5qob+F5jusZsb0YQK2A==", + "dev": true + }, + "buffer-xor": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/buffer-xor/-/buffer-xor-1.0.3.tgz", + "integrity": "sha1-JuYe0UIvtw3ULm42cp7VHYVf6Nk=", + "optional": true + }, + "builtin-modules": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/builtin-modules/-/builtin-modules-1.1.1.tgz", + "integrity": "sha1-Jw8HbFpywC9bZaR9+Uxf46J4iS8=", + "optional": true + }, + "builtin-status-codes": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/builtin-status-codes/-/builtin-status-codes-3.0.0.tgz", + "integrity": "sha1-hZgoeOIbmOHGZCXgPQF0eI9Wnug=", + "optional": true + }, + "cache-base": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/cache-base/-/cache-base-1.0.1.tgz", + "integrity": "sha512-AKcdTnFSWATd5/GCPRxr2ChwIJ85CeyrEyjRHlKxQ56d4XJMGym0uAiKn0xbLOGOl3+yRpOTi484dVCEc5AUzQ==", + "optional": true, + "requires": { + "collection-visit": "^1.0.0", + "component-emitter": "^1.2.1", + "get-value": "^2.0.6", + "has-value": "^1.0.0", + "isobject": "^3.0.1", + "set-value": "^2.0.0", + "to-object-path": "^0.3.0", + "union-value": "^1.0.0", + "unset-value": "^1.0.0" + } + }, + "caller-path": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/caller-path/-/caller-path-0.1.0.tgz", + "integrity": "sha1-lAhe9jWB7NPaqSREqP6U6CV3dR8=", + "dev": true, + "requires": { + "callsites": "^0.2.0" + } + }, + "callsites": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/callsites/-/callsites-0.2.0.tgz", + "integrity": "sha1-r6uWJikQp/M8GaV3WCXGnzTjUMo=", + "dev": true + }, + "camelcase": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-1.2.1.tgz", + "integrity": "sha1-m7UwTS4LVmmLLHWLCKPqqdqlijk=", + "optional": true + }, + "caseless": { + "version": "0.12.0", + "resolved": "https://registry.npmjs.org/caseless/-/caseless-0.12.0.tgz", + "integrity": "sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw=" + }, + "center-align": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/center-align/-/center-align-0.1.3.tgz", + "integrity": "sha1-qg0yYptu6XIgBBHL1EYckHvCt60=", + "optional": true, + "requires": { + "align-text": "^0.1.3", + "lazy-cache": "^1.0.3" + } + }, + "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.2", + "has-ansi": "^2.0.0", + "strip-ansi": "^3.0.0", + "supports-color": "^2.0.0" + } + }, + "chardet": { + "version": "0.4.2", + "resolved": "https://registry.npmjs.org/chardet/-/chardet-0.4.2.tgz", + "integrity": "sha1-tUc7M9yXxCTl2Y3IfVXU2KKci/I=" + }, + "chokidar": { + "version": "2.1.5", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-2.1.5.tgz", + "integrity": "sha512-i0TprVWp+Kj4WRPtInjexJ8Q+BqTE909VpH8xVhXrJkoc5QC8VO9TryGOqTr+2hljzc1sC62t22h5tZePodM/A==", + "optional": true, + "requires": { + "anymatch": "^2.0.0", + "async-each": "^1.0.1", + "braces": "^2.3.2", + "fsevents": "^1.2.7", + "glob-parent": "^3.1.0", + "inherits": "^2.0.3", + "is-binary-path": "^1.0.0", + "is-glob": "^4.0.0", + "normalize-path": "^3.0.0", + "path-is-absolute": "^1.0.0", + "readdirp": "^2.2.1", + "upath": "^1.1.1" + }, + "dependencies": { + "normalize-path": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", + "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", + "optional": true + } + } + }, + "chownr": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/chownr/-/chownr-1.1.1.tgz", + "integrity": "sha512-j38EvO5+LHX84jlo6h4UzmOwi0UgW61WRyPtJz4qaadK5eY3BTS5TY/S1Stc3Uk2lIM6TPevAlULiEJwie860g==" + }, + "cipher-base": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/cipher-base/-/cipher-base-1.0.4.tgz", + "integrity": "sha512-Kkht5ye6ZGmwv40uUDZztayT2ThLQGfnj/T71N/XzeZeo3nf8foyW7zGTsPYkEya3m5f3cAypH+qe7YOrM1U2Q==", + "optional": true, + "requires": { + "inherits": "^2.0.1", + "safe-buffer": "^5.0.1" + } + }, + "circular-json": { + "version": "0.3.3", + "resolved": "https://registry.npmjs.org/circular-json/-/circular-json-0.3.3.tgz", + "integrity": "sha512-UZK3NBx2Mca+b5LsG7bY183pHWt5Y1xts4P3Pz7ENTwGVnJOUWbRb3ocjvX7hx9tq/yTAdclXm9sZ38gNuem4A==", + "dev": true + }, + "cjson": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/cjson/-/cjson-0.2.1.tgz", + "integrity": "sha1-c82KrWXZ4VBfmvF0TTt5wVJ2gqU=" + }, + "class-utils": { + "version": "0.3.6", + "resolved": "https://registry.npmjs.org/class-utils/-/class-utils-0.3.6.tgz", + "integrity": "sha512-qOhPa/Fj7s6TY8H8esGu5QNpMMQxz79h+urzrNYN6mn+9BnxlDGf5QZ+XeCDsxSjPqsSR56XOZOJmpeurnLMeg==", + "optional": true, + "requires": { + "arr-union": "^3.1.0", + "define-property": "^0.2.5", + "isobject": "^3.0.0", + "static-extend": "^0.1.1" + }, + "dependencies": { + "define-property": { + "version": "0.2.5", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", + "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", + "optional": true, + "requires": { + "is-descriptor": "^0.1.0" + } + } + } + }, + "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=", + "requires": { + "restore-cursor": "^2.0.0" + } + }, + "cli-width": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/cli-width/-/cli-width-2.2.0.tgz", + "integrity": "sha1-/xnt6Kml5XkyQUewwR8PvLq+1jk=" + }, + "cliui": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-2.1.0.tgz", + "integrity": "sha1-S0dXYP+AJkx2LDoXGQMukcf+oNE=", + "optional": true, + "requires": { + "center-align": "^0.1.1", + "right-align": "^0.1.1", + "wordwrap": "0.0.2" + }, + "dependencies": { + "wordwrap": { + "version": "0.0.2", + "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-0.0.2.tgz", + "integrity": "sha1-t5Zpu0LstAn4PVg8rVLKF+qhZD8=", + "optional": true + } + } + }, + "co": { + "version": "4.6.0", + "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=" + }, + "collection-visit": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/collection-visit/-/collection-visit-1.0.0.tgz", + "integrity": "sha1-S8A3PBZLwykbTTaMgpzxqApZ3KA=", + "optional": true, + "requires": { + "map-visit": "^1.0.0", + "object-visit": "^1.0.0" + } + }, + "color-convert": { + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", + "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", + "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=" + }, + "colors": { + "version": "0.5.1", + "resolved": "https://registry.npmjs.org/colors/-/colors-0.5.1.tgz", + "integrity": "sha1-fQAj6usVTo7p/Oddy5I9DtFmd3Q=" + }, + "combined-stream": { + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", + "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==", + "requires": { + "delayed-stream": "~1.0.0" + } + }, + "component-emitter": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/component-emitter/-/component-emitter-1.3.0.tgz", + "integrity": "sha512-Rd3se6QB+sO1TwqZjscQrurpEPIfO0/yYnSin6Q/rD3mOutHvUrCAhJub3r90uNb+SESBuE0QYoB90YdfatsRg==", + "optional": true + }, + "concat-map": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", + "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=" + }, + "concat-stream": { + "version": "1.6.2", + "resolved": "https://registry.npmjs.org/concat-stream/-/concat-stream-1.6.2.tgz", + "integrity": "sha512-27HBghJxjiZtIk3Ycvn/4kbJk/1uZuJFfuPEns6LaEvpvG1f0hTea8lilrouyo9mVc2GWdcEZ8OLoGmSADlrCw==", + "dev": true, + "requires": { + "buffer-from": "^1.0.0", + "inherits": "^2.0.3", + "readable-stream": "^2.2.2", + "typedarray": "^0.0.6" + } + }, + "console-browserify": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/console-browserify/-/console-browserify-1.1.0.tgz", + "integrity": "sha1-8CQcRXMKn8YyOyBtvzjtx0HQuxA=", + "optional": true, + "requires": { + "date-now": "^0.1.4" + } + }, + "console-control-strings": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/console-control-strings/-/console-control-strings-1.1.0.tgz", + "integrity": "sha1-PXz0Rk22RG6mRL9LOVB/mFEAjo4=" + }, + "constants-browserify": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/constants-browserify/-/constants-browserify-1.0.0.tgz", + "integrity": "sha1-wguW2MYXdIqvHBYCF2DNJ/y4y3U=", + "optional": true + }, + "copy-descriptor": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/copy-descriptor/-/copy-descriptor-0.1.1.tgz", + "integrity": "sha1-Z29us8OZl8LuGsOpJP1hJHSPV40=", + "optional": true + }, + "copy-paste": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/copy-paste/-/copy-paste-1.3.0.tgz", + "integrity": "sha1-p+bEocKP3t8rCB5yuX3y75X0ce0=", + "requires": { + "iconv-lite": "^0.4.8", + "sync-exec": "~0.6.x" + } + }, + "core-util-is": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", + "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=" + }, + "crc": { + "version": "3.8.0", + "resolved": "https://registry.npmjs.org/crc/-/crc-3.8.0.tgz", + "integrity": "sha512-iX3mfgcTMIq3ZKLIsVFAbv7+Mc10kxabAGQb8HvjA1o3T1PIYprbakQ65d3I+2HGHt6nSKkM9PYjgoJO2KcFBQ==", + "optional": true, + "requires": { + "buffer": "^5.1.0" + } + }, + "create-ecdh": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/create-ecdh/-/create-ecdh-4.0.3.tgz", + "integrity": "sha512-GbEHQPMOswGpKXM9kCWVrremUcBmjteUaQ01T9rkKCPDXfUHX0IoP9LpHYo2NPFampa4e+/pFDc3jQdxrxQLaw==", + "optional": true, + "requires": { + "bn.js": "^4.1.0", + "elliptic": "^6.0.0" + } + }, + "create-hash": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/create-hash/-/create-hash-1.2.0.tgz", + "integrity": "sha512-z00bCGNHDG8mHAkP7CtT1qVu+bFQUPjYq/4Iv3C3kWjTFV10zIjfSoeqXo9Asws8gwSHDGj/hl2u4OGIjapeCg==", + "optional": true, + "requires": { + "cipher-base": "^1.0.1", + "inherits": "^2.0.1", + "md5.js": "^1.3.4", + "ripemd160": "^2.0.1", + "sha.js": "^2.4.0" + } + }, + "create-hmac": { + "version": "1.1.7", + "resolved": "https://registry.npmjs.org/create-hmac/-/create-hmac-1.1.7.tgz", + "integrity": "sha512-MJG9liiZ+ogc4TzUwuvbER1JRdgvUFSB5+VR/g5h82fGaIRWMWddtKBHi7/sVhfjQZ6SehlyhvQYrcYkaUIpLg==", + "optional": true, + "requires": { + "cipher-base": "^1.0.3", + "create-hash": "^1.1.0", + "inherits": "^2.0.1", + "ripemd160": "^2.0.0", + "safe-buffer": "^5.0.1", + "sha.js": "^2.4.8" + } + }, + "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=", + "optional": true, + "requires": { + "lru-cache": "^4.0.1", + "shebang-command": "^1.2.0", + "which": "^1.2.9" + }, + "dependencies": { + "lru-cache": { + "version": "4.1.5", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-4.1.5.tgz", + "integrity": "sha512-sWZlbEP2OsHNkXrMl5GYk/jKk70MBng6UU4YI/qGDYbgf6YbP4EvmqISbXCoJiRKs+1bSpFHVgQxvJ17F2li5g==", + "optional": true, + "requires": { + "pseudomap": "^1.0.2", + "yallist": "^2.1.2" + } + } + } + }, + "cryptiles": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/cryptiles/-/cryptiles-2.0.5.tgz", + "integrity": "sha1-O9/s3GCBR8HGcgL6KR59ylnqo7g=", + "requires": { + "boom": "2.x.x" + } + }, + "crypto-browserify": { + "version": "3.12.0", + "resolved": "https://registry.npmjs.org/crypto-browserify/-/crypto-browserify-3.12.0.tgz", + "integrity": "sha512-fz4spIh+znjO2VjL+IdhEpRJ3YN6sMzITSBijk6FK2UvTqruSQW+/cCZTSNsMiZNvUeq0CqurF+dAbyiGOY6Wg==", + "optional": true, + "requires": { + "browserify-cipher": "^1.0.0", + "browserify-sign": "^4.0.0", + "create-ecdh": "^4.0.0", + "create-hash": "^1.1.0", + "create-hmac": "^1.1.0", + "diffie-hellman": "^5.0.0", + "inherits": "^2.0.1", + "pbkdf2": "^3.0.3", + "public-encrypt": "^4.0.0", + "randombytes": "^2.0.0", + "randomfill": "^1.0.3" + } + }, + "d": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/d/-/d-1.0.0.tgz", + "integrity": "sha1-dUu1v+VUUdpppYuU1F9MWwRi1Y8=", + "requires": { + "es5-ext": "^0.10.9" + } + }, + "dashdash": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/dashdash/-/dashdash-1.14.1.tgz", + "integrity": "sha1-hTz6D3y+L+1d4gMmuN1YEDX24vA=", + "requires": { + "assert-plus": "^1.0.0" + } + }, + "date-now": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/date-now/-/date-now-0.1.4.tgz", + "integrity": "sha1-6vQ5/U1ISK105cx9vvIAZyueNFs=", + "optional": true + }, + "date-utils": { + "version": "1.2.21", + "resolved": "https://registry.npmjs.org/date-utils/-/date-utils-1.2.21.tgz", + "integrity": "sha1-YfsWzcEnSzyayq/+n8ad+HIKK2Q=" + }, + "debug": { + "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" + } + }, + "decamelize": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz", + "integrity": "sha1-9lNNFRSCabIDUue+4m9QH5oZEpA=", + "optional": true + }, + "decode-uri-component": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/decode-uri-component/-/decode-uri-component-0.2.0.tgz", + "integrity": "sha1-6zkTMzRYd1y4TNGh+uBiEGu4dUU=", + "optional": true + }, + "decompress-response": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/decompress-response/-/decompress-response-3.3.0.tgz", + "integrity": "sha1-gKTdMjdIOEv6JICDYirt7Jgq3/M=", + "requires": { + "mimic-response": "^1.0.0" + } + }, + "deep-extend": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/deep-extend/-/deep-extend-0.6.0.tgz", + "integrity": "sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA==" + }, + "deep-is": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.3.tgz", + "integrity": "sha1-s2nW+128E+7PUk+RsHD+7cNXzzQ=", + "dev": true + }, + "define-property": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-2.0.2.tgz", + "integrity": "sha512-jwK2UV4cnPpbcG7+VRARKTZPUWowwXA8bzH5NP6ud0oeAxyYPuGZUAC7hMugpCdz4BeSZl2Dl9k66CHJ/46ZYQ==", + "optional": true, + "requires": { + "is-descriptor": "^1.0.2", + "isobject": "^3.0.1" + }, + "dependencies": { + "is-accessor-descriptor": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", + "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", + "optional": true, + "requires": { + "kind-of": "^6.0.0" + } + }, + "is-data-descriptor": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", + "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", + "optional": true, + "requires": { + "kind-of": "^6.0.0" + } + }, + "is-descriptor": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", + "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", + "optional": true, + "requires": { + "is-accessor-descriptor": "^1.0.0", + "is-data-descriptor": "^1.0.0", + "kind-of": "^6.0.2" + } + }, + "kind-of": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.2.tgz", + "integrity": "sha512-s5kLOcnH0XqDO+FvuaLX8DDjZ18CGFk7VygH40QoKPUQhW4e2rvM0rwUq0t8IQDOwYSeLK01U90OjzBTme2QqA==", + "optional": true + } + } + }, + "delayed-stream": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", + "integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk=" + }, + "delegates": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/delegates/-/delegates-1.0.0.tgz", + "integrity": "sha1-hMbhWbgZBP3KWaDvRM2HDTElD5o=" + }, + "des.js": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/des.js/-/des.js-1.0.0.tgz", + "integrity": "sha1-wHTS4qpqipoH29YfmhXCzYPsjsw=", + "optional": true, + "requires": { + "inherits": "^2.0.1", + "minimalistic-assert": "^1.0.0" + } + }, + "detect-libc": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-1.0.3.tgz", + "integrity": "sha1-+hN8S9aY7fVc1c0CrFWfkaTEups=" + }, + "diff": { + "version": "3.5.0", + "resolved": "https://registry.npmjs.org/diff/-/diff-3.5.0.tgz", + "integrity": "sha512-A46qtFgd+g7pDZinpnwiRJtxbC1hpgf0uzP3iG89scHk0AUC7A1TGxf5OiiOUv/JMZR8GOt8hL900hV0bOy5xA==", + "optional": true + }, + "diffie-hellman": { + "version": "5.0.3", + "resolved": "https://registry.npmjs.org/diffie-hellman/-/diffie-hellman-5.0.3.tgz", + "integrity": "sha512-kqag/Nl+f3GwyK25fhUMYj81BUOrZ9IuJsjIcDE5icNM9FJHAVm3VcUDxdLPoQtTuUylWm6ZIknYJwwaPxsUzg==", + "optional": true, + "requires": { + "bn.js": "^4.1.0", + "miller-rabin": "^4.0.0", + "randombytes": "^2.0.0" + } + }, + "doctrine": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-2.1.0.tgz", + "integrity": "sha512-35mSku4ZXK0vfCuHEDAwt55dg2jNajHZ1odvF+8SSr82EsZY4QmXfuWso8oEd8zRhVObSN18aM0CjSdoBX7zIw==", + "dev": true, + "requires": { + "esutils": "^2.0.2" + } + }, + "domain-browser": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/domain-browser/-/domain-browser-1.2.0.tgz", + "integrity": "sha512-jnjyiM6eRyZl2H+W8Q/zLMA481hzi0eszAaBUzIVnmYVDBbnLxVNnfu1HgEBvCbL+71FrxMl3E6lpKH7Ge3OXA==", + "optional": true + }, + "duplexer": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/duplexer/-/duplexer-0.1.1.tgz", + "integrity": "sha1-rOb/gIwc5mtX0ev5eXessCM0z8E=" + }, + "ebnf-parser": { + "version": "0.1.10", + "resolved": "https://registry.npmjs.org/ebnf-parser/-/ebnf-parser-0.1.10.tgz", + "integrity": "sha1-zR9rpHfFY4xAyX7ZtXLbW6tdgzE=" + }, + "ecc-jsbn": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/ecc-jsbn/-/ecc-jsbn-0.1.2.tgz", + "integrity": "sha1-OoOpBOVDUyh4dMVkt1SThoSamMk=", + "requires": { + "jsbn": "~0.1.0", + "safer-buffer": "^2.1.0" + } + }, + "ecdsa-sig-formatter": { + "version": "1.0.11", + "resolved": "https://registry.npmjs.org/ecdsa-sig-formatter/-/ecdsa-sig-formatter-1.0.11.tgz", + "integrity": "sha512-nagl3RYrbNv6kQkeJIpt6NJZy8twLB/2vtz6yN9Z4vRKHN4/QZJIEbqohALSgwKdnksuY3k5Addp5lg8sVoVcQ==", + "requires": { + "safe-buffer": "^5.0.1" + } + }, + "elliptic": { + "version": "6.4.1", + "resolved": "https://registry.npmjs.org/elliptic/-/elliptic-6.4.1.tgz", + "integrity": "sha512-BsXLz5sqX8OHcsh7CqBMztyXARmGQ3LWPtGjJi6DiJHq5C/qvi9P3OqgswKSDftbu8+IoI/QDTAm2fFnQ9SZSQ==", + "optional": true, + "requires": { + "bn.js": "^4.4.0", + "brorand": "^1.0.1", + "hash.js": "^1.0.0", + "hmac-drbg": "^1.0.0", + "inherits": "^2.0.1", + "minimalistic-assert": "^1.0.0", + "minimalistic-crypto-utils": "^1.0.0" + } + }, + "emojis-list": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/emojis-list/-/emojis-list-2.1.0.tgz", + "integrity": "sha1-TapNnbAPmBmIDHn6RXrlsJof04k=", + "optional": true + }, + "end-of-stream": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.1.tgz", + "integrity": "sha512-1MkrZNvWTKCaigbn+W15elq2BB/L22nqrSY5DKlo3X6+vclJm8Bb5djXJBmEX6fS3+zCh/F4VBK5Z2KxJt4s2Q==", + "requires": { + "once": "^1.4.0" + } + }, + "enhanced-resolve": { + "version": "3.4.1", + "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-3.4.1.tgz", + "integrity": "sha1-BCHjOf1xQZs9oT0Smzl5BAIwR24=", + "optional": true, + "requires": { + "graceful-fs": "^4.1.2", + "memory-fs": "^0.4.0", + "object-assign": "^4.0.1", + "tapable": "^0.2.7" + } + }, + "errno": { + "version": "0.1.7", + "resolved": "https://registry.npmjs.org/errno/-/errno-0.1.7.tgz", + "integrity": "sha512-MfrRBDWzIWifgq6tJj60gkAwtLNb6sQPlcFrSOflcP1aFmmruKQ2wRnze/8V6kgyz7H3FF8Npzv78mZ7XLLflg==", + "optional": true, + "requires": { + "prr": "~1.0.1" + } + }, + "error-ex": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.2.tgz", + "integrity": "sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==", + "optional": true, + "requires": { + "is-arrayish": "^0.2.1" + } + }, + "es5-ext": { + "version": "0.10.50", + "resolved": "https://registry.npmjs.org/es5-ext/-/es5-ext-0.10.50.tgz", + "integrity": "sha512-KMzZTPBkeQV/JcSQhI5/z6d9VWJ3EnQ194USTUwIYZ2ZbpN8+SGXQKt1h68EX44+qt+Fzr8DO17vnxrw7c3agw==", + "requires": { + "es6-iterator": "~2.0.3", + "es6-symbol": "~3.1.1", + "next-tick": "^1.0.0" + } + }, + "es6-iterator": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/es6-iterator/-/es6-iterator-2.0.3.tgz", + "integrity": "sha1-p96IkUGgWpSwhUQDstCg+/qY87c=", + "requires": { + "d": "1", + "es5-ext": "^0.10.35", + "es6-symbol": "^3.1.1" + } + }, + "es6-map": { + "version": "0.1.5", + "resolved": "https://registry.npmjs.org/es6-map/-/es6-map-0.1.5.tgz", + "integrity": "sha1-kTbgUD3MBqMBaQ8LsU/042TpSfA=", + "requires": { + "d": "1", + "es5-ext": "~0.10.14", + "es6-iterator": "~2.0.1", + "es6-set": "~0.1.5", + "es6-symbol": "~3.1.1", + "event-emitter": "~0.3.5" + } + }, + "es6-set": { + "version": "0.1.5", + "resolved": "https://registry.npmjs.org/es6-set/-/es6-set-0.1.5.tgz", + "integrity": "sha1-0rPsXU2ADO2BjbU40ol02wpzzLE=", + "requires": { + "d": "1", + "es5-ext": "~0.10.14", + "es6-iterator": "~2.0.1", + "es6-symbol": "3.1.1", + "event-emitter": "~0.3.5" + } + }, + "es6-symbol": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/es6-symbol/-/es6-symbol-3.1.1.tgz", + "integrity": "sha1-vwDvT9q2uhtG7Le2KbTH7VcVzHc=", + "requires": { + "d": "1", + "es5-ext": "~0.10.14" + } + }, + "es6-weak-map": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/es6-weak-map/-/es6-weak-map-2.0.2.tgz", + "integrity": "sha1-XjqzIlH/0VOKH45f+hNXdy+S2W8=", + "requires": { + "d": "1", + "es5-ext": "^0.10.14", + "es6-iterator": "^2.0.1", + "es6-symbol": "^3.1.1" + } + }, + "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=" + }, + "escodegen": { + "version": "0.0.21", + "resolved": "https://registry.npmjs.org/escodegen/-/escodegen-0.0.21.tgz", + "integrity": "sha1-U9ZSz6EDA4gnlFilJmxf/HCcY8M=", + "requires": { + "esprima": "~1.0.2", + "estraverse": "~0.0.4", + "source-map": ">= 0.1.2" + }, + "dependencies": { + "esprima": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/esprima/-/esprima-1.0.4.tgz", + "integrity": "sha1-n1V+CPw7TSbs6d00+Pv0drYlha0=" + } + } + }, + "escope": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/escope/-/escope-3.6.0.tgz", + "integrity": "sha1-4Bl16BJ4GhY6ba392AOY3GTIicM=", + "requires": { + "es6-map": "^0.1.3", + "es6-weak-map": "^2.0.1", + "esrecurse": "^4.1.0", + "estraverse": "^4.1.1" + }, + "dependencies": { + "estraverse": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.2.0.tgz", + "integrity": "sha1-De4/7TH81GlhjOc0IJn8GvoL2xM=" + } + } + }, + "eslint": { + "version": "3.19.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-3.19.0.tgz", + "integrity": "sha1-yPxiAcf0DdCJQbh8CFdnOGpnmsw=", + "dev": true, + "requires": { + "babel-code-frame": "^6.16.0", + "chalk": "^1.1.3", + "concat-stream": "^1.5.2", + "debug": "^2.1.1", + "doctrine": "^2.0.0", + "escope": "^3.6.0", + "espree": "^3.4.0", + "esquery": "^1.0.0", + "estraverse": "^4.2.0", + "esutils": "^2.0.2", + "file-entry-cache": "^2.0.0", + "glob": "^7.0.3", + "globals": "^9.14.0", + "ignore": "^3.2.0", + "imurmurhash": "^0.1.4", + "inquirer": "^0.12.0", + "is-my-json-valid": "^2.10.0", + "is-resolvable": "^1.0.0", + "js-yaml": "^3.5.1", + "json-stable-stringify": "^1.0.0", + "levn": "^0.3.0", + "lodash": "^4.0.0", + "mkdirp": "^0.5.0", + "natural-compare": "^1.4.0", + "optionator": "^0.8.2", + "path-is-inside": "^1.0.1", + "pluralize": "^1.2.1", + "progress": "^1.1.8", + "require-uncached": "^1.0.2", + "shelljs": "^0.7.5", + "strip-bom": "^3.0.0", + "strip-json-comments": "~2.0.1", + "table": "^3.7.8", + "text-table": "~0.2.0", + "user-home": "^2.0.0" + }, + "dependencies": { + "ansi-escapes": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-1.4.0.tgz", + "integrity": "sha1-06ioOzGapneTZisT52HHkRQiMG4=", + "dev": true + }, + "cli-cursor": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-1.0.2.tgz", + "integrity": "sha1-ZNo/fValRBLll5S9Ytw1KV6PKYc=", + "dev": true, + "requires": { + "restore-cursor": "^1.0.1" + } + }, + "estraverse": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.2.0.tgz", + "integrity": "sha1-De4/7TH81GlhjOc0IJn8GvoL2xM=", + "dev": true + }, + "figures": { + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/figures/-/figures-1.7.0.tgz", + "integrity": "sha1-y+Hjr/zxzUS4DK3+0o3Hk6lwHS4=", + "dev": true, + "requires": { + "escape-string-regexp": "^1.0.5", + "object-assign": "^4.1.0" + } + }, + "glob": { + "version": "7.1.4", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.4.tgz", + "integrity": "sha512-hkLPepehmnKk41pUGm3sYxoFs/umurYfYJCerbXEyFIWcAzvpipAgVkBqqT9RBKMGjnq6kMuyYwha6csxbiM1A==", + "dev": true, + "requires": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.0.4", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + } + }, + "inquirer": { + "version": "0.12.0", + "resolved": "https://registry.npmjs.org/inquirer/-/inquirer-0.12.0.tgz", + "integrity": "sha1-HvK/1jUE3wvHV4X/+MLEHfEvB34=", + "dev": true, + "requires": { + "ansi-escapes": "^1.1.0", + "ansi-regex": "^2.0.0", + "chalk": "^1.0.0", + "cli-cursor": "^1.0.1", + "cli-width": "^2.0.0", + "figures": "^1.3.5", + "lodash": "^4.3.0", + "readline2": "^1.0.1", + "run-async": "^0.1.0", + "rx-lite": "^3.1.2", + "string-width": "^1.0.1", + "strip-ansi": "^3.0.0", + "through": "^2.3.6" + } + }, + "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.0" + } + }, + "onetime": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/onetime/-/onetime-1.1.0.tgz", + "integrity": "sha1-ofeDj4MUxRbwXs78vEzP4EtO14k=", + "dev": true + }, + "restore-cursor": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-1.0.1.tgz", + "integrity": "sha1-NGYfRohjJ/7SmRR5FSJS35LapUE=", + "dev": true, + "requires": { + "exit-hook": "^1.0.0", + "onetime": "^1.0.0" + } + }, + "run-async": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/run-async/-/run-async-0.1.0.tgz", + "integrity": "sha1-yK1KXhEGYeQCp9IbUw4AnyX444k=", + "dev": true, + "requires": { + "once": "^1.3.0" + } + }, + "rx-lite": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/rx-lite/-/rx-lite-3.1.2.tgz", + "integrity": "sha1-Gc5QLKVyZl87ZHsQk5+X/RYV8QI=", + "dev": true + }, + "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.0.0", + "is-fullwidth-code-point": "^1.0.0", + "strip-ansi": "^3.0.0" + } + } + } + }, + "espree": { + "version": "3.5.4", + "resolved": "https://registry.npmjs.org/espree/-/espree-3.5.4.tgz", + "integrity": "sha512-yAcIQxtmMiB/jL32dzEp2enBeidsB7xWPLNiw3IIkpVds1P+h7qF9YwJq1yUNzp2OKXgAprs4F61ih66UsoD1A==", + "dev": true, + "requires": { + "acorn": "^5.5.0", + "acorn-jsx": "^3.0.0" + } + }, + "esprima": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/esprima/-/esprima-1.2.2.tgz", + "integrity": "sha1-dqD9Zvz+FU/SkmZ9wmQBl1CxZXs=" + }, + "esquery": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.0.1.tgz", + "integrity": "sha512-SmiyZ5zIWH9VM+SRUReLS5Q8a7GxtRdxEBVZpm98rJM7Sb+A9DVCndXfkeFUd3byderg+EbDkfnevfCwynWaNA==", + "dev": true, + "requires": { + "estraverse": "^4.0.0" + }, + "dependencies": { + "estraverse": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.2.0.tgz", + "integrity": "sha1-De4/7TH81GlhjOc0IJn8GvoL2xM=", + "dev": true + } + } + }, + "esrecurse": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.2.1.tgz", + "integrity": "sha512-64RBB++fIOAXPw3P9cy89qfMlvZEXZkqqJkjqqXIvzP5ezRZjW+lPWjw35UX/3EhUPFYbg5ER4JYgDw4007/DQ==", + "requires": { + "estraverse": "^4.1.0" + }, + "dependencies": { + "estraverse": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.2.0.tgz", + "integrity": "sha1-De4/7TH81GlhjOc0IJn8GvoL2xM=" + } + } + }, + "estraverse": { + "version": "0.0.4", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-0.0.4.tgz", + "integrity": "sha1-AaCTLf7ldGhKWYr1pnw7+bZCjbI=" + }, + "esutils": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.2.tgz", + "integrity": "sha1-Cr9PHKpbyx96nYrMbepPqqBLrJs=", + "dev": true + }, + "event-emitter": { + "version": "0.3.5", + "resolved": "https://registry.npmjs.org/event-emitter/-/event-emitter-0.3.5.tgz", + "integrity": "sha1-34xp7vFkeSPHFXuc6DhAYQsCzDk=", + "requires": { + "d": "1", + "es5-ext": "~0.10.14" + } + }, + "events": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/events/-/events-3.0.0.tgz", + "integrity": "sha512-Dc381HFWJzEOhQ+d8pkNon++bk9h6cdAoAj4iE6Q4y6xgTzySWXlKn05/TVNpjnfRqi/X0EpJEJohPjNI3zpVA==", + "optional": true + }, + "evp_bytestokey": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/evp_bytestokey/-/evp_bytestokey-1.0.3.tgz", + "integrity": "sha512-/f2Go4TognH/KvCISP7OUsHn85hT9nUkxxA9BEWxFn+Oj9o8ZNLm/40hdlgSLyuOimsrTKLUMEorQexp/aPQeA==", + "optional": true, + "requires": { + "md5.js": "^1.3.4", + "safe-buffer": "^5.1.1" + } + }, + "execa": { + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/execa/-/execa-0.7.0.tgz", + "integrity": "sha1-lEvs00zEHuMqY6n68nrVpl/Fl3c=", + "optional": true, + "requires": { + "cross-spawn": "^5.0.1", + "get-stream": "^3.0.0", + "is-stream": "^1.1.0", + "npm-run-path": "^2.0.0", + "p-finally": "^1.0.0", + "signal-exit": "^3.0.0", + "strip-eof": "^1.0.0" + } + }, + "exit-hook": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/exit-hook/-/exit-hook-1.1.1.tgz", + "integrity": "sha1-8FyiM7SMBdVP/wd2XfhQfpXAL/g=", + "dev": true + }, + "expand-brackets": { + "version": "2.1.4", + "resolved": "https://registry.npmjs.org/expand-brackets/-/expand-brackets-2.1.4.tgz", + "integrity": "sha1-t3c14xXOMPa27/D4OwQVGiJEliI=", + "optional": true, + "requires": { + "debug": "^2.3.3", + "define-property": "^0.2.5", + "extend-shallow": "^2.0.1", + "posix-character-classes": "^0.1.0", + "regex-not": "^1.0.0", + "snapdragon": "^0.8.1", + "to-regex": "^3.0.1" + }, + "dependencies": { + "define-property": { + "version": "0.2.5", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", + "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", + "optional": true, + "requires": { + "is-descriptor": "^0.1.0" + } + }, + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "optional": true, + "requires": { + "is-extendable": "^0.1.0" + } + } + } + }, + "expand-template": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/expand-template/-/expand-template-2.0.3.tgz", + "integrity": "sha512-XYfuKMvj4O35f/pOXLObndIRvyQ+/+6AhODh+OKWj9S9498pHHn/IMszH+gt0fBCRWMNfk1ZSp5x3AifmnI2vg==" + }, + "extend": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.2.tgz", + "integrity": "sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==" + }, + "extend-shallow": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-3.0.2.tgz", + "integrity": "sha1-Jqcarwc7OfshJxcnRhMcJwQCjbg=", + "optional": true, + "requires": { + "assign-symbols": "^1.0.0", + "is-extendable": "^1.0.1" + }, + "dependencies": { + "is-extendable": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-1.0.1.tgz", + "integrity": "sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==", + "optional": true, + "requires": { + "is-plain-object": "^2.0.4" + } + } + } + }, + "external-editor": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/external-editor/-/external-editor-2.2.0.tgz", + "integrity": "sha512-bSn6gvGxKt+b7+6TKEv1ZycHleA7aHhRHyAqJyp5pbUFuYYNIzpZnQDk7AsYckyWdEnTeAnay0aCy2aV6iTk9A==", + "requires": { + "chardet": "^0.4.0", + "iconv-lite": "^0.4.17", + "tmp": "^0.0.33" + } + }, + "extglob": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/extglob/-/extglob-2.0.4.tgz", + "integrity": "sha512-Nmb6QXkELsuBr24CJSkilo6UHHgbekK5UiZgfE6UHD3Eb27YC6oD+bhcT+tJ6cl8dmsgdQxnWlcry8ksBIBLpw==", + "optional": true, + "requires": { + "array-unique": "^0.3.2", + "define-property": "^1.0.0", + "expand-brackets": "^2.1.4", + "extend-shallow": "^2.0.1", + "fragment-cache": "^0.2.1", + "regex-not": "^1.0.0", + "snapdragon": "^0.8.1", + "to-regex": "^3.0.1" + }, + "dependencies": { + "define-property": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz", + "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=", + "optional": true, + "requires": { + "is-descriptor": "^1.0.0" + } + }, + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "optional": true, + "requires": { + "is-extendable": "^0.1.0" + } + }, + "is-accessor-descriptor": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", + "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", + "optional": true, + "requires": { + "kind-of": "^6.0.0" + } + }, + "is-data-descriptor": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", + "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", + "optional": true, + "requires": { + "kind-of": "^6.0.0" + } + }, + "is-descriptor": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", + "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", + "optional": true, + "requires": { + "is-accessor-descriptor": "^1.0.0", + "is-data-descriptor": "^1.0.0", + "kind-of": "^6.0.2" + } + }, + "kind-of": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.2.tgz", + "integrity": "sha512-s5kLOcnH0XqDO+FvuaLX8DDjZ18CGFk7VygH40QoKPUQhW4e2rvM0rwUq0t8IQDOwYSeLK01U90OjzBTme2QqA==", + "optional": true + } + } + }, + "extsprintf": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/extsprintf/-/extsprintf-1.3.0.tgz", + "integrity": "sha1-lpGEQOMEGnpBT4xS48V06zw+HgU=" + }, + "fast-deep-equal": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-2.0.1.tgz", + "integrity": "sha1-ewUhjd+WZ79/Nwv3/bLLFf3Qqkk=" + }, + "fast-json-stable-stringify": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.0.0.tgz", + "integrity": "sha1-1RQsDK7msRifh9OnYREGT4bIu/I=" + }, + "fast-levenshtein": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz", + "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=", + "requires": { + "escape-string-regexp": "^1.0.5" + } + }, + "file-entry-cache": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-2.0.0.tgz", + "integrity": "sha1-w5KZDD5oR4PYOLjISkXYoEhFg2E=", + "dev": true, + "requires": { + "flat-cache": "^1.2.1", + "object-assign": "^4.0.1" + } + }, + "fill-range": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-4.0.0.tgz", + "integrity": "sha1-1USBHUKPmOsGpj3EAtJAPDKMOPc=", + "optional": true, + "requires": { + "extend-shallow": "^2.0.1", + "is-number": "^3.0.0", + "repeat-string": "^1.6.1", + "to-regex-range": "^2.1.0" + }, + "dependencies": { + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "optional": true, + "requires": { + "is-extendable": "^0.1.0" + } + } + } + }, + "find-up": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-2.1.0.tgz", + "integrity": "sha1-RdG35QbHF93UgndaK3eSCjwMV6c=", + "optional": true, + "requires": { + "locate-path": "^2.0.0" + } + }, + "flat-cache": { + "version": "1.3.4", + "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-1.3.4.tgz", + "integrity": "sha512-VwyB3Lkgacfik2vhqR4uv2rvebqmDvFu4jlN/C1RzWoJEo8I7z4Q404oiqYCkq41mni8EzQnm95emU9seckwtg==", + "dev": true, + "requires": { + "circular-json": "^0.3.1", + "graceful-fs": "^4.1.2", + "rimraf": "~2.6.2", + "write": "^0.2.1" + } + }, + "for-in": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/for-in/-/for-in-1.0.2.tgz", + "integrity": "sha1-gQaNKVqBQuwKxybG4iAMMPttXoA=", + "optional": true + }, + "forever-agent": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/forever-agent/-/forever-agent-0.6.1.tgz", + "integrity": "sha1-+8cfDEGt6zf5bFd60e1C2P2sypE=" + }, + "form-data": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.3.3.tgz", + "integrity": "sha512-1lLKB2Mu3aGP1Q/2eCOx0fNbRMe7XdwktwOruhfqqd0rIJWwN4Dh+E3hrPSlDCXnSR7UtZ1N38rVXm+6+MEhJQ==", + "requires": { + "asynckit": "^0.4.0", + "combined-stream": "^1.0.6", + "mime-types": "^2.1.12" + } + }, + "fragment-cache": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/fragment-cache/-/fragment-cache-0.2.1.tgz", + "integrity": "sha1-QpD60n8T6Jvn8zeZxrxaCr//DRk=", + "optional": true, + "requires": { + "map-cache": "^0.2.2" + } + }, + "fs-constants": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fs-constants/-/fs-constants-1.0.0.tgz", + "integrity": "sha512-y6OAwoSIf7FyjMIv94u+b5rdheZEjzR63GTyZJm5qh4Bi+2YgwLCcI/fPFZkL5PSixOt6ZNKm+w+Hfp/Bciwow==" + }, + "fs-extra": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-2.1.2.tgz", + "integrity": "sha1-BGxwFjzvmq1GsOSn+kZ/si1x3jU=", + "requires": { + "graceful-fs": "^4.1.2", + "jsonfile": "^2.1.0" + } + }, + "fs.realpath": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", + "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=" + }, + "fse": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/fse/-/fse-1.0.1.tgz", + "integrity": "sha1-LLewDLu7vD4Rspxy+ygIMOfT1q0=", + "requires": { + "minimatch": "^3.0.3" + } + }, + "fsevents": { + "version": "1.2.9", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-1.2.9.tgz", + "integrity": "sha512-oeyj2H3EjjonWcFjD5NvZNE9Rqe4UW+nQBU2HNeKw0koVLEFIhtyETyAakeAM3de7Z/SW5kcA+fZUait9EApnw==", + "optional": true, + "requires": { + "nan": "^2.12.1", + "node-pre-gyp": "^0.12.0" + }, + "dependencies": { + "abbrev": { + "version": "1.1.1", + "bundled": true, + "optional": true + }, + "ansi-regex": { + "version": "2.1.1", + "bundled": true, + "optional": true + }, + "aproba": { + "version": "1.2.0", + "bundled": true, + "optional": true + }, + "are-we-there-yet": { + "version": "1.1.5", + "bundled": true, + "optional": true, + "requires": { + "delegates": "^1.0.0", + "readable-stream": "^2.0.6" + } + }, + "balanced-match": { + "version": "1.0.0", + "bundled": true, + "optional": true + }, + "brace-expansion": { + "version": "1.1.11", + "bundled": true, + "optional": true, + "requires": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "chownr": { + "version": "1.1.1", + "bundled": true, + "optional": true + }, + "code-point-at": { + "version": "1.1.0", + "bundled": true, + "optional": true + }, + "concat-map": { + "version": "0.0.1", + "bundled": true, + "optional": true + }, + "console-control-strings": { + "version": "1.1.0", + "bundled": true, + "optional": true + }, + "core-util-is": { + "version": "1.0.2", + "bundled": true, + "optional": true + }, + "debug": { + "version": "4.1.1", + "bundled": true, + "optional": true, + "requires": { + "ms": "^2.1.1" + } + }, + "deep-extend": { + "version": "0.6.0", + "bundled": true, + "optional": true + }, + "delegates": { + "version": "1.0.0", + "bundled": true, + "optional": true + }, + "detect-libc": { + "version": "1.0.3", + "bundled": true, + "optional": true + }, + "fs-minipass": { + "version": "1.2.5", + "bundled": true, + "optional": true, + "requires": { + "minipass": "^2.2.1" + } + }, + "fs.realpath": { + "version": "1.0.0", + "bundled": true, + "optional": true + }, + "gauge": { + "version": "2.7.4", + "bundled": true, + "optional": true, + "requires": { + "aproba": "^1.0.3", + "console-control-strings": "^1.0.0", + "has-unicode": "^2.0.0", + "object-assign": "^4.1.0", + "signal-exit": "^3.0.0", + "string-width": "^1.0.1", + "strip-ansi": "^3.0.1", + "wide-align": "^1.1.0" + } + }, + "glob": { + "version": "7.1.3", + "bundled": true, + "optional": true, + "requires": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.0.4", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + } + }, + "has-unicode": { + "version": "2.0.1", + "bundled": true, + "optional": true + }, + "iconv-lite": { + "version": "0.4.24", + "bundled": true, + "optional": true, + "requires": { + "safer-buffer": ">= 2.1.2 < 3" + } + }, + "ignore-walk": { + "version": "3.0.1", + "bundled": true, + "optional": true, + "requires": { + "minimatch": "^3.0.4" + } + }, + "inflight": { + "version": "1.0.6", + "bundled": true, + "optional": true, + "requires": { + "once": "^1.3.0", + "wrappy": "1" + } + }, + "inherits": { + "version": "2.0.3", + "bundled": true, + "optional": true + }, + "ini": { + "version": "1.3.5", + "bundled": true, + "optional": true + }, + "is-fullwidth-code-point": { + "version": "1.0.0", + "bundled": true, + "optional": true, + "requires": { + "number-is-nan": "^1.0.0" + } + }, + "isarray": { + "version": "1.0.0", + "bundled": true, + "optional": true + }, + "minimatch": { + "version": "3.0.4", + "bundled": true, + "optional": true, + "requires": { + "brace-expansion": "^1.1.7" + } + }, + "minimist": { + "version": "0.0.8", + "bundled": true, + "optional": true + }, + "minipass": { + "version": "2.3.5", + "bundled": true, + "optional": true, + "requires": { + "safe-buffer": "^5.1.2", + "yallist": "^3.0.0" + } + }, + "minizlib": { + "version": "1.2.1", + "bundled": true, + "optional": true, + "requires": { + "minipass": "^2.2.1" + } + }, + "mkdirp": { + "version": "0.5.1", + "bundled": true, + "optional": true, + "requires": { + "minimist": "0.0.8" + } + }, + "ms": { + "version": "2.1.1", + "bundled": true, + "optional": true + }, + "needle": { + "version": "2.3.0", + "bundled": true, + "optional": true, + "requires": { + "debug": "^4.1.0", + "iconv-lite": "^0.4.4", + "sax": "^1.2.4" + } + }, + "node-pre-gyp": { + "version": "0.12.0", + "bundled": true, + "optional": true, + "requires": { + "detect-libc": "^1.0.2", + "mkdirp": "^0.5.1", + "needle": "^2.2.1", + "nopt": "^4.0.1", + "npm-packlist": "^1.1.6", + "npmlog": "^4.0.2", + "rc": "^1.2.7", + "rimraf": "^2.6.1", + "semver": "^5.3.0", + "tar": "^4" + } + }, + "nopt": { + "version": "4.0.1", + "bundled": true, + "optional": true, + "requires": { + "abbrev": "1", + "osenv": "^0.1.4" + } + }, + "npm-bundled": { + "version": "1.0.6", + "bundled": true, + "optional": true + }, + "npm-packlist": { + "version": "1.4.1", + "bundled": true, + "optional": true, + "requires": { + "ignore-walk": "^3.0.1", + "npm-bundled": "^1.0.1" + } + }, + "npmlog": { + "version": "4.1.2", + "bundled": true, + "optional": true, + "requires": { + "are-we-there-yet": "~1.1.2", + "console-control-strings": "~1.1.0", + "gauge": "~2.7.3", + "set-blocking": "~2.0.0" + } + }, + "number-is-nan": { + "version": "1.0.1", + "bundled": true, + "optional": true + }, + "object-assign": { + "version": "4.1.1", + "bundled": true, + "optional": true + }, + "once": { + "version": "1.4.0", + "bundled": true, + "optional": true, + "requires": { + "wrappy": "1" + } + }, + "os-homedir": { + "version": "1.0.2", + "bundled": true, + "optional": true + }, + "os-tmpdir": { + "version": "1.0.2", + "bundled": true, + "optional": true + }, + "osenv": { + "version": "0.1.5", + "bundled": true, + "optional": true, + "requires": { + "os-homedir": "^1.0.0", + "os-tmpdir": "^1.0.0" + } + }, + "path-is-absolute": { + "version": "1.0.1", + "bundled": true, + "optional": true + }, + "process-nextick-args": { + "version": "2.0.0", + "bundled": true, + "optional": true + }, + "rc": { + "version": "1.2.8", + "bundled": true, + "optional": true, + "requires": { + "deep-extend": "^0.6.0", + "ini": "~1.3.0", + "minimist": "^1.2.0", + "strip-json-comments": "~2.0.1" + }, + "dependencies": { + "minimist": { + "version": "1.2.0", + "bundled": true, + "optional": true + } + } + }, + "readable-stream": { + "version": "2.3.6", + "bundled": true, + "optional": true, + "requires": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" + } + }, + "rimraf": { + "version": "2.6.3", + "bundled": true, + "optional": true, + "requires": { + "glob": "^7.1.3" + } + }, + "safe-buffer": { + "version": "5.1.2", + "bundled": true, + "optional": true + }, + "safer-buffer": { + "version": "2.1.2", + "bundled": true, + "optional": true + }, + "sax": { + "version": "1.2.4", + "bundled": true, + "optional": true + }, + "semver": { + "version": "5.7.0", + "bundled": true, + "optional": true + }, + "set-blocking": { + "version": "2.0.0", + "bundled": true, + "optional": true + }, + "signal-exit": { + "version": "3.0.2", + "bundled": true, + "optional": true + }, + "string-width": { + "version": "1.0.2", + "bundled": true, + "optional": true, + "requires": { + "code-point-at": "^1.0.0", + "is-fullwidth-code-point": "^1.0.0", + "strip-ansi": "^3.0.0" + } + }, + "string_decoder": { + "version": "1.1.1", + "bundled": true, + "optional": true, + "requires": { + "safe-buffer": "~5.1.0" + } + }, + "strip-ansi": { + "version": "3.0.1", + "bundled": true, + "optional": true, + "requires": { + "ansi-regex": "^2.0.0" + } + }, + "strip-json-comments": { + "version": "2.0.1", + "bundled": true, + "optional": true + }, + "tar": { + "version": "4.4.8", + "bundled": true, + "optional": true, + "requires": { + "chownr": "^1.1.1", + "fs-minipass": "^1.2.5", + "minipass": "^2.3.4", + "minizlib": "^1.1.1", + "mkdirp": "^0.5.0", + "safe-buffer": "^5.1.2", + "yallist": "^3.0.2" + } + }, + "util-deprecate": { + "version": "1.0.2", + "bundled": true, + "optional": true + }, + "wide-align": { + "version": "1.1.3", + "bundled": true, + "optional": true, + "requires": { + "string-width": "^1.0.2 || 2" + } + }, + "wrappy": { + "version": "1.0.2", + "bundled": true, + "optional": true + }, + "yallist": { + "version": "3.0.3", + "bundled": true, + "optional": true + } + } + }, + "gauge": { + "version": "2.7.4", + "resolved": "https://registry.npmjs.org/gauge/-/gauge-2.7.4.tgz", + "integrity": "sha1-LANAXHU4w51+s3sxcCLjJfsBi/c=", + "requires": { + "aproba": "^1.0.3", + "console-control-strings": "^1.0.0", + "has-unicode": "^2.0.0", + "object-assign": "^4.1.0", + "signal-exit": "^3.0.0", + "string-width": "^1.0.1", + "strip-ansi": "^3.0.1", + "wide-align": "^1.1.0" + }, + "dependencies": { + "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=", + "requires": { + "number-is-nan": "^1.0.0" + } + }, + "string-width": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz", + "integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=", + "requires": { + "code-point-at": "^1.0.0", + "is-fullwidth-code-point": "^1.0.0", + "strip-ansi": "^3.0.0" + } + } + } + }, + "generate-function": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/generate-function/-/generate-function-2.3.1.tgz", + "integrity": "sha512-eeB5GfMNeevm/GRYq20ShmsaGcmI81kIX2K9XQx5miC8KdHaC6Jm0qQ8ZNeGOi7wYB8OsdxKs+Y2oVuTFuVwKQ==", + "dev": true, + "requires": { + "is-property": "^1.0.2" + } + }, + "generate-object-property": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/generate-object-property/-/generate-object-property-1.2.0.tgz", + "integrity": "sha1-nA4cQDCM6AT0eDYYuTf6iPmdUNA=", + "dev": true, + "requires": { + "is-property": "^1.0.0" + } + }, + "get-caller-file": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-1.0.3.tgz", + "integrity": "sha512-3t6rVToeoZfYSGd8YoLFR2DJkiQrIiUrGcjvFX2mDw3bn6k2OtwHN0TNCLbBO+w8qTvimhDkv+LSscbJY1vE6w==", + "optional": true + }, + "get-stream": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-3.0.0.tgz", + "integrity": "sha1-jpQ9E1jcN1VQVOy+LtsFqhdO3hQ=", + "optional": true + }, + "get-value": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/get-value/-/get-value-2.0.6.tgz", + "integrity": "sha1-3BXKHGcjh8p2vTesCjlbogQqLCg=", + "optional": true + }, + "getpass": { + "version": "0.1.7", + "resolved": "https://registry.npmjs.org/getpass/-/getpass-0.1.7.tgz", + "integrity": "sha1-Xv+OPmhNVprkyysSgmBOi6YhSfo=", + "requires": { + "assert-plus": "^1.0.0" + } + }, + "github-from-package": { + "version": "0.0.0", + "resolved": "https://registry.npmjs.org/github-from-package/-/github-from-package-0.0.0.tgz", + "integrity": "sha1-l/tdlr/eiXMxPyDoKI75oWf6ZM4=" + }, + "glob-parent": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-3.1.0.tgz", + "integrity": "sha1-nmr2KZ2NO9K9QEMIMr0RPfkGxa4=", + "optional": true, + "requires": { + "is-glob": "^3.1.0", + "path-dirname": "^1.0.0" + }, + "dependencies": { + "is-glob": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-3.1.0.tgz", + "integrity": "sha1-e6WuJCF4BKxwcHuWkiVnSGzD6Eo=", + "optional": true, + "requires": { + "is-extglob": "^2.1.0" + } + } + } + }, + "globals": { + "version": "9.18.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-9.18.0.tgz", + "integrity": "sha512-S0nG3CLEQiY/ILxqtztTWH/3iRRdyBLw6KMDxnKMchrtbj2OFmehVh0WUCfW3DUrIgx/qFrJPICrq4Z4sTR9UQ==", + "dev": true + }, + "graceful-fs": { + "version": "4.1.15", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.1.15.tgz", + "integrity": "sha512-6uHUhOPEBgQ24HM+r6b/QwWfZq+yiFcipKFrOFiBEnWdy5sdzYoi+pJeQaPI5qOLRFqWmAXUPQNsielzdLoecA==" + }, + "har-schema": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/har-schema/-/har-schema-2.0.0.tgz", + "integrity": "sha1-qUwiJOvKwEeCoNkDVSHyRzW37JI=" + }, + "har-validator": { + "version": "5.1.3", + "resolved": "https://registry.npmjs.org/har-validator/-/har-validator-5.1.3.tgz", + "integrity": "sha512-sNvOCzEQNr/qrvJgc3UG/kD4QtlHycrzwS+6mfTrrSq97BvaYcPZZI1ZSqGSPR73Cxn4LKTD4PttRwfU7jWq5g==", + "requires": { + "ajv": "^6.5.5", + "har-schema": "^2.0.0" + } + }, + "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" + } + }, + "has-flag": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=" + }, + "has-unicode": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/has-unicode/-/has-unicode-2.0.1.tgz", + "integrity": "sha1-4Ob+aijPUROIVeCG0Wkedx3iqLk=" + }, + "has-value": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/has-value/-/has-value-1.0.0.tgz", + "integrity": "sha1-GLKB2lhbHFxR3vJMkw7SmgvmsXc=", + "optional": true, + "requires": { + "get-value": "^2.0.6", + "has-values": "^1.0.0", + "isobject": "^3.0.0" + } + }, + "has-values": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/has-values/-/has-values-1.0.0.tgz", + "integrity": "sha1-lbC2P+whRmGab+V/51Yo1aOe/k8=", + "optional": true, + "requires": { + "is-number": "^3.0.0", + "kind-of": "^4.0.0" + }, + "dependencies": { + "kind-of": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-4.0.0.tgz", + "integrity": "sha1-IIE989cSkosgc3hpGkUGb65y3Vc=", + "optional": true, + "requires": { + "is-buffer": "^1.1.5" + } + } + } + }, + "hash-base": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/hash-base/-/hash-base-3.0.4.tgz", + "integrity": "sha1-X8hoaEfs1zSZQDMZprCj8/auSRg=", + "optional": true, + "requires": { + "inherits": "^2.0.1", + "safe-buffer": "^5.0.1" + } + }, + "hash.js": { + "version": "1.1.7", + "resolved": "https://registry.npmjs.org/hash.js/-/hash.js-1.1.7.tgz", + "integrity": "sha512-taOaskGt4z4SOANNseOviYDvjEJinIkRgmp7LbKP2YTTmVxWBl87s/uzK9r+44BclBSp2X7K1hqeNfz9JbBeXA==", + "optional": true, + "requires": { + "inherits": "^2.0.3", + "minimalistic-assert": "^1.0.1" + } + }, + "hawk": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/hawk/-/hawk-3.1.3.tgz", + "integrity": "sha1-B4REvXwWQLD+VA0sm3PVlnjo4cQ=", + "requires": { + "boom": "2.x.x", + "cryptiles": "2.x.x", + "hoek": "2.x.x", + "sntp": "1.x.x" + } + }, + "hmac-drbg": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/hmac-drbg/-/hmac-drbg-1.0.1.tgz", + "integrity": "sha1-0nRXAQJabHdabFRXk+1QL8DGSaE=", + "optional": true, + "requires": { + "hash.js": "^1.0.3", + "minimalistic-assert": "^1.0.0", + "minimalistic-crypto-utils": "^1.0.1" + } + }, + "hoek": { + "version": "2.16.3", + "resolved": "https://registry.npmjs.org/hoek/-/hoek-2.16.3.tgz", + "integrity": "sha1-ILt0A9POo5jpHcRxCo/xuCdKJe0=" + }, + "homedir-polyfill": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/homedir-polyfill/-/homedir-polyfill-1.0.3.tgz", + "integrity": "sha512-eSmmWE5bZTK2Nou4g0AI3zZ9rswp7GRKoKXS1BLUkvPviOqs4YTN1djQIqrXy9k5gEtdLPy86JjRwsNM9tnDcA==", + "optional": true, + "requires": { + "parse-passwd": "^1.0.0" + } + }, + "hosted-git-info": { + "version": "2.7.1", + "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.7.1.tgz", + "integrity": "sha512-7T/BxH19zbcCTa8XkMlbK5lTo1WtgkFi3GvdWEyNuc4Vex7/9Dqbnpsf4JMydcfj9HCg4zUWFTL3Za6lapg5/w==", + "optional": true + }, + "http-signature": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/http-signature/-/http-signature-1.2.0.tgz", + "integrity": "sha1-muzZJRFHcvPZW2WmCruPfBj7rOE=", + "requires": { + "assert-plus": "^1.0.0", + "jsprim": "^1.2.2", + "sshpk": "^1.7.0" + } + }, + "https-browserify": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/https-browserify/-/https-browserify-1.0.0.tgz", + "integrity": "sha1-7AbBDgo0wPL68Zn3/X/Hj//QPHM=", + "optional": true + }, + "iconv-lite": { + "version": "0.4.24", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz", + "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==", + "requires": { + "safer-buffer": ">= 2.1.2 < 3" + } + }, + "ieee754": { + "version": "1.1.13", + "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.1.13.tgz", + "integrity": "sha512-4vf7I2LYV/HaWerSo3XmlMkp5eZ83i+/CDluXi/IGTs/O1sejBNhTtnxzmRZfvOUqj7lZjqHkeTvpgSFDlWZTg==", + "optional": true + }, + "ignore": { + "version": "3.3.10", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-3.3.10.tgz", + "integrity": "sha512-Pgs951kaMm5GXP7MOvxERINe3gsaVjUWFm+UZPSq9xYriQAksyhg0csnS0KXSNRD5NmNdapXEpjxG49+AKh/ug==", + "dev": true + }, + "imurmurhash": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", + "integrity": "sha1-khi5srkoojixPcT7a21XbyMUU+o=", + "dev": true + }, + "indexof": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/indexof/-/indexof-0.0.1.tgz", + "integrity": "sha1-gtwzbSMrkGIXnQWrMpOmYFn9Q10=", + "optional": true + }, + "inflight": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", + "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", + "requires": { + "once": "^1.3.0", + "wrappy": "1" + } + }, + "inherits": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", + "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=" + }, + "ini": { + "version": "1.3.5", + "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.5.tgz", + "integrity": "sha512-RZY5huIKCMRWDUqZlEi72f/lmXKMvuszcMBduliQ3nnWbx9X/ZBQO7DijMEYS9EhHBb2qacRUMtC7svLwe0lcw==" + }, + "inquirer": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/inquirer/-/inquirer-3.3.0.tgz", + "integrity": "sha512-h+xtnyk4EwKvFWHrUYsWErEVR+igKtLdchu+o0Z1RL7VU/jVMFbYir2bp6bAj8efFNxWqHX0dIss6fJQ+/+qeQ==", + "requires": { + "ansi-escapes": "^3.0.0", + "chalk": "^2.0.0", + "cli-cursor": "^2.1.0", + "cli-width": "^2.0.0", + "external-editor": "^2.0.4", + "figures": "^2.0.0", + "lodash": "^4.3.0", + "mute-stream": "0.0.7", + "run-async": "^2.2.0", + "rx-lite": "^4.0.8", + "rx-lite-aggregates": "^4.0.8", + "string-width": "^2.1.0", + "strip-ansi": "^4.0.0", + "through": "^2.3.6" + }, + "dependencies": { + "ansi-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", + "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=" + }, + "ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "requires": { + "color-convert": "^1.9.0" + } + }, + "chalk": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", + "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", + "requires": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + } + }, + "strip-ansi": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", + "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", + "requires": { + "ansi-regex": "^3.0.0" + } + }, + "supports-color": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "requires": { + "has-flag": "^3.0.0" + } + } + } + }, + "interpret": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/interpret/-/interpret-1.2.0.tgz", + "integrity": "sha512-mT34yGKMNceBQUoVn7iCDKDntA7SC6gycMAWzGx1z/CMCTV7b2AAtXlo3nRyHZ1FelRkQbQjprHSYGwzLtkVbw==" + }, + "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=", + "optional": true + }, + "is-accessor-descriptor": { + "version": "0.1.6", + "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz", + "integrity": "sha1-qeEss66Nh2cn7u84Q/igiXtcmNY=", + "optional": true, + "requires": { + "kind-of": "^3.0.2" + } + }, + "is-arrayish": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz", + "integrity": "sha1-d8mYQFJ6qOyxqLppe4BkWnqSap0=", + "optional": true + }, + "is-binary-path": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-1.0.1.tgz", + "integrity": "sha1-dfFmQrSA8YenEcgUFh/TpKdlWJg=", + "optional": true, + "requires": { + "binary-extensions": "^1.0.0" + } + }, + "is-buffer": { + "version": "1.1.6", + "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.6.tgz", + "integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==" + }, + "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=", + "optional": true, + "requires": { + "builtin-modules": "^1.0.0" + } + }, + "is-data-descriptor": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz", + "integrity": "sha1-C17mSDiOLIYCgueT8YVv7D8wG1Y=", + "optional": true, + "requires": { + "kind-of": "^3.0.2" + } + }, + "is-descriptor": { + "version": "0.1.6", + "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.6.tgz", + "integrity": "sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg==", + "optional": true, + "requires": { + "is-accessor-descriptor": "^0.1.6", + "is-data-descriptor": "^0.1.4", + "kind-of": "^5.0.0" + }, + "dependencies": { + "kind-of": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz", + "integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==", + "optional": true + } + } + }, + "is-extendable": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-0.1.1.tgz", + "integrity": "sha1-YrEQ4omkcUGOPsNqYX1HLjAd/Ik=", + "optional": true + }, + "is-extglob": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", + "integrity": "sha1-qIwCU1eR8C7TfHahueqXc8gz+MI=", + "optional": 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=" + }, + "is-glob": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.1.tgz", + "integrity": "sha512-5G0tKtBTFImOqDnLB2hG6Bp2qcKEFduo4tZu9MT/H6NQv/ghhy30o55ufafxJ/LdH79LLs2Kfrn85TLKyA7BUg==", + "optional": true, + "requires": { + "is-extglob": "^2.1.1" + } + }, + "is-my-ip-valid": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-my-ip-valid/-/is-my-ip-valid-1.0.0.tgz", + "integrity": "sha512-gmh/eWXROncUzRnIa1Ubrt5b8ep/MGSnfAUI3aRp+sqTCs1tv1Isl8d8F6JmkN3dXKc3ehZMrtiPN9eL03NuaQ==", + "dev": true + }, + "is-my-json-valid": { + "version": "2.20.0", + "resolved": "https://registry.npmjs.org/is-my-json-valid/-/is-my-json-valid-2.20.0.tgz", + "integrity": "sha512-XTHBZSIIxNsIsZXg7XB5l8z/OBFosl1Wao4tXLpeC7eKU4Vm/kdop2azkPqULwnfGQjmeDIyey9g7afMMtdWAA==", + "dev": true, + "requires": { + "generate-function": "^2.0.0", + "generate-object-property": "^1.1.0", + "is-my-ip-valid": "^1.0.0", + "jsonpointer": "^4.0.0", + "xtend": "^4.0.0" + } + }, + "is-number": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-3.0.0.tgz", + "integrity": "sha1-JP1iAaR4LPUFYcgQJ2r8fRLXEZU=", + "optional": true, + "requires": { + "kind-of": "^3.0.2" + } + }, + "is-plain-object": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz", + "integrity": "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==", + "optional": true, + "requires": { + "isobject": "^3.0.1" + } + }, + "is-promise": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-promise/-/is-promise-2.1.0.tgz", + "integrity": "sha1-eaKp7OfwlugPNtKy87wWwf9L8/o=" + }, + "is-property": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-property/-/is-property-1.0.2.tgz", + "integrity": "sha1-V/4cTkhHTt1lsJkR8msc1Ald2oQ=", + "dev": true + }, + "is-resolvable": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/is-resolvable/-/is-resolvable-1.1.0.tgz", + "integrity": "sha512-qgDYXFSR5WvEfuS5dMj6oTMEbrrSaM0CrFk2Yiq/gXnBvD9pMa2jGXxyhGLfvhZpuMZe18CJpFxAt3CRs42NMg==", + "dev": true + }, + "is-stream": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-1.1.0.tgz", + "integrity": "sha1-EtSj3U5o4Lec6428hBc66A2RykQ=" + }, + "is-typedarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz", + "integrity": "sha1-5HnICFjfDBsR3dppQPlgEfzaSpo=" + }, + "is-windows": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-windows/-/is-windows-1.0.2.tgz", + "integrity": "sha512-eXK1UInq2bPmjyX6e3VHIzMLobc4J94i4AWn+Hpq3OU5KkrRC96OAcR3PRJ/pGu6m8TRnBHP9dkXQVsT/COVIA==", + "optional": true + }, + "isarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=" + }, + "isexe": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", + "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=", + "optional": true + }, + "isobject": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", + "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=", + "optional": true + }, + "isstream": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/isstream/-/isstream-0.1.2.tgz", + "integrity": "sha1-R+Y/evVa+m+S4VAOaQ64uFKcCZo=" + }, + "jison": { + "version": "0.4.13", + "resolved": "https://registry.npmjs.org/jison/-/jison-0.4.13.tgz", + "integrity": "sha1-kEFwfWIkE2f1iDRTK58ZwsNvrHg=", + "requires": { + "JSONSelect": "0.4.0", + "cjson": "~0.2.1", + "ebnf-parser": "~0.1.9", + "escodegen": "0.0.21", + "esprima": "1.0.x", + "jison-lex": "0.2.x", + "lex-parser": "~0.1.3", + "nomnom": "1.5.2" + }, + "dependencies": { + "esprima": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/esprima/-/esprima-1.0.4.tgz", + "integrity": "sha1-n1V+CPw7TSbs6d00+Pv0drYlha0=" + } + } + }, + "jison-lex": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/jison-lex/-/jison-lex-0.2.1.tgz", + "integrity": "sha1-rEuBXozOUTLrErXfz+jXB7iETf4=", + "requires": { + "lex-parser": "0.1.x", + "nomnom": "1.5.2" + } + }, + "js-tokens": { + "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": { + "version": "3.13.1", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.13.1.tgz", + "integrity": "sha512-YfbcO7jXDdyj0DGxYVSlSeQNHbD7XPWvrVWeVUujrQEoZzWJIRrCPoyk6kL6IAjAG2IolMK4T0hNUe0HOUs5Jw==", + "dev": true, + "requires": { + "argparse": "^1.0.7", + "esprima": "^4.0.0" + }, + "dependencies": { + "esprima": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", + "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==", + "dev": true + } + } + }, + "jsbn": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/jsbn/-/jsbn-0.1.1.tgz", + "integrity": "sha1-peZUwuWi3rXyAdls77yoDA7y9RM=" + }, + "json-loader": { + "version": "0.5.7", + "resolved": "https://registry.npmjs.org/json-loader/-/json-loader-0.5.7.tgz", + "integrity": "sha512-QLPs8Dj7lnf3e3QYS1zkCo+4ZwqOiF9d/nZnYozTISxXWCfNs9yuky5rJw4/W34s7POaNlbZmQGaB5NiXCbP4w==", + "optional": true + }, + "json-schema": { + "version": "0.2.3", + "resolved": "https://registry.npmjs.org/json-schema/-/json-schema-0.2.3.tgz", + "integrity": "sha1-tIDIkuWaLwWVTOcnvT8qTogvnhM=" + }, + "json-schema-traverse": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", + "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==" + }, + "json-stable-stringify": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/json-stable-stringify/-/json-stable-stringify-1.0.1.tgz", + "integrity": "sha1-mnWdOcXy/1A/1TAGRu1EX4jE+a8=", + "requires": { + "jsonify": "~0.0.0" + } + }, + "json-stringify-safe": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz", + "integrity": "sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus=" + }, + "json5": { + "version": "0.5.1", + "resolved": "https://registry.npmjs.org/json5/-/json5-0.5.1.tgz", + "integrity": "sha1-Hq3nrMASA0rYTiOWdn6tn6VJWCE=", + "optional": true + }, + "jsonfile": { + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-2.4.0.tgz", + "integrity": "sha1-NzaitCi4e72gzIO1P6PWM6NcKug=", + "requires": { + "graceful-fs": "^4.1.6" + } + }, + "jsonify": { + "version": "0.0.0", + "resolved": "https://registry.npmjs.org/jsonify/-/jsonify-0.0.0.tgz", + "integrity": "sha1-LHS27kHZPKUbe1qu6PUDYx0lKnM=" + }, + "jsonpath": { + "version": "0.2.12", + "resolved": "https://registry.npmjs.org/jsonpath/-/jsonpath-0.2.12.tgz", + "integrity": "sha1-W/nZEftGFsHjNwvs658NskrjTNI=", + "requires": { + "esprima": "1.2.2", + "jison": "0.4.13", + "static-eval": "0.2.3", + "underscore": "1.7.0" + }, + "dependencies": { + "underscore": { + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/underscore/-/underscore-1.7.0.tgz", + "integrity": "sha1-a7rwh3UA02vjTsqlhODbn+8DUgk=" + } + } + }, + "jsonpointer": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/jsonpointer/-/jsonpointer-4.0.1.tgz", + "integrity": "sha1-T9kss04OnbPInIYi7PUfm5eMbLk=", + "dev": true + }, + "jsprim": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/jsprim/-/jsprim-1.4.1.tgz", + "integrity": "sha1-MT5mvB5cwG5Di8G3SZwuXFastqI=", + "requires": { + "assert-plus": "1.0.0", + "extsprintf": "1.3.0", + "json-schema": "0.2.3", + "verror": "1.10.0" + } + }, + "jwa": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/jwa/-/jwa-1.4.1.tgz", + "integrity": "sha512-qiLX/xhEEFKUAJ6FiBMbes3w9ATzyk5W7Hvzpa/SLYdxNtng+gcurvrI7TbACjIXlsJyr05/S1oUhZrc63evQA==", + "requires": { + "buffer-equal-constant-time": "1.0.1", + "ecdsa-sig-formatter": "1.0.11", + "safe-buffer": "^5.0.1" + } + }, + "jws": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/jws/-/jws-3.2.2.tgz", + "integrity": "sha512-YHlZCB6lMTllWDtSPHz/ZXTsi8S00usEV6v1tjq8tOUZzw7DpSDWVXjXDre6ed1w/pd495ODpHZYSdkRTsa0HA==", + "requires": { + "jwa": "^1.4.1", + "safe-buffer": "^5.0.1" + } + }, + "keytar": { + "version": "4.6.0", + "resolved": "https://registry.npmjs.org/keytar/-/keytar-4.6.0.tgz", + "integrity": "sha512-8wWWTC62QHvUvgW/QYyJv7X0GFZfp2Ykr5n3PuXKADro0Sv2RKvuYxbkzoZvsw33EDNAKnUTSA0/KLGN/MbwDw==", + "requires": { + "nan": "2.13.2", + "prebuild-install": "5.3.0" + } + }, + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "optional": true, + "requires": { + "is-buffer": "^1.1.5" + } + }, + "lazy-cache": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/lazy-cache/-/lazy-cache-1.0.4.tgz", + "integrity": "sha1-odePw6UEdMuAhF07O24dpJpEbo4=", + "optional": true + }, + "lcid": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/lcid/-/lcid-1.0.0.tgz", + "integrity": "sha1-MIrMr6C8SDo4Z7S28rlQYlHRuDU=", + "optional": true, + "requires": { + "invert-kv": "^1.0.0" + } + }, + "levn": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/levn/-/levn-0.3.0.tgz", + "integrity": "sha1-OwmSTt+fCDwEkP3UwLxEIeBHZO4=", + "dev": true, + "requires": { + "prelude-ls": "~1.1.2", + "type-check": "~0.3.2" + } + }, + "lex-parser": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/lex-parser/-/lex-parser-0.1.4.tgz", + "integrity": "sha1-ZMTwJfF/1Tv7RXY/rrFvAVp0dVA=" + }, + "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=", + "optional": true, + "requires": { + "graceful-fs": "^4.1.2", + "parse-json": "^2.2.0", + "pify": "^2.0.0", + "strip-bom": "^3.0.0" + } + }, + "loader-runner": { + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/loader-runner/-/loader-runner-2.4.0.tgz", + "integrity": "sha512-Jsmr89RcXGIwivFY21FcRrisYZfvLMTWx5kOLc+JTxtpBOG6xML0vzbc6SEQG2FO9/4Fc3wW4LVcB5DmGflaRw==", + "optional": true + }, + "loader-utils": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-1.2.3.tgz", + "integrity": "sha512-fkpz8ejdnEMG3s37wGL07iSBDg99O9D5yflE9RGNH3hRdx9SOwYfnGYdZOUIZitN8E+E2vkq3MUMYMvPYl5ZZA==", + "optional": true, + "requires": { + "big.js": "^5.2.2", + "emojis-list": "^2.0.0", + "json5": "^1.0.1" + }, + "dependencies": { + "json5": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/json5/-/json5-1.0.1.tgz", + "integrity": "sha512-aKS4WQjPenRxiQsC93MNfjx+nbF4PAdYzmd/1JIj8HYzqfbu86beTuNgXDzPknWk0n0uARlyewZo4s++ES36Ow==", + "optional": true, + "requires": { + "minimist": "^1.2.0" + } + } + } + }, + "locate-path": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-2.0.0.tgz", + "integrity": "sha1-K1aLJl7slExtnA3pw9u7ygNUzY4=", + "optional": true, + "requires": { + "p-locate": "^2.0.0", + "path-exists": "^3.0.0" + } + }, + "lodash": { + "version": "4.17.11", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.11.tgz", + "integrity": "sha512-cQKh8igo5QUhZ7lg38DYWAxMvjSAKG0A8wGSVimP07SIUEK2UO+arSRKbRZWtelMtN5V0Hkwh5ryOto/SshYIg==" + }, + "longest": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/longest/-/longest-1.0.1.tgz", + "integrity": "sha1-MKCy2jj3N3DoKUoNIuZiXtd9AJc=", + "optional": true + }, + "make-error": { + "version": "1.3.5", + "resolved": "https://registry.npmjs.org/make-error/-/make-error-1.3.5.tgz", + "integrity": "sha512-c3sIjNUow0+8swNwVpqoH4YCShKNFkMaw6oH1mNS2haDZQqkeZFlHS3dhoeEbKKmJB4vXpJucU6oH75aDYeE9g==", + "optional": true + }, + "map-cache": { + "version": "0.2.2", + "resolved": "https://registry.npmjs.org/map-cache/-/map-cache-0.2.2.tgz", + "integrity": "sha1-wyq9C9ZSXZsFFkW7TyasXcmKDb8=", + "optional": true + }, + "map-visit": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/map-visit/-/map-visit-1.0.0.tgz", + "integrity": "sha1-7Nyo8TFE5mDxtb1B8S80edmN+48=", + "optional": true, + "requires": { + "object-visit": "^1.0.0" + } + }, + "md5.js": { + "version": "1.3.5", + "resolved": "https://registry.npmjs.org/md5.js/-/md5.js-1.3.5.tgz", + "integrity": "sha512-xitP+WxNPcTTOgnTJcrhM0xvdPepipPSf3I8EIpGKeFLjt3PlJLIDG3u8EX53ZIubkb+5U2+3rELYpEhHhzdkg==", + "optional": true, + "requires": { + "hash-base": "^3.0.0", + "inherits": "^2.0.1", + "safe-buffer": "^5.1.2" + } + }, + "mem": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/mem/-/mem-1.1.0.tgz", + "integrity": "sha1-Xt1StIXKHZAP5kiVUFOZoN+kX3Y=", + "optional": true, + "requires": { + "mimic-fn": "^1.0.0" + } + }, + "memory-fs": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/memory-fs/-/memory-fs-0.4.1.tgz", + "integrity": "sha1-OpoguEYlI+RHz7x+i7gO1me/xVI=", + "optional": true, + "requires": { + "errno": "^0.1.3", + "readable-stream": "^2.0.1" + } + }, + "micromatch": { + "version": "3.1.10", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-3.1.10.tgz", + "integrity": "sha512-MWikgl9n9M3w+bpsY3He8L+w9eF9338xRl8IAO5viDizwSzziFEyUzo2xrrloB64ADbTf8uA8vRqqttDTOmccg==", + "optional": true, + "requires": { + "arr-diff": "^4.0.0", + "array-unique": "^0.3.2", + "braces": "^2.3.1", + "define-property": "^2.0.2", + "extend-shallow": "^3.0.2", + "extglob": "^2.0.4", + "fragment-cache": "^0.2.1", + "kind-of": "^6.0.2", + "nanomatch": "^1.2.9", + "object.pick": "^1.3.0", + "regex-not": "^1.0.0", + "snapdragon": "^0.8.1", + "to-regex": "^3.0.2" + }, + "dependencies": { + "kind-of": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.2.tgz", + "integrity": "sha512-s5kLOcnH0XqDO+FvuaLX8DDjZ18CGFk7VygH40QoKPUQhW4e2rvM0rwUq0t8IQDOwYSeLK01U90OjzBTme2QqA==", + "optional": true + } + } + }, + "miller-rabin": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/miller-rabin/-/miller-rabin-4.0.1.tgz", + "integrity": "sha512-115fLhvZVqWwHPbClyntxEVfVDfl9DLLTuJvq3g2O/Oxi8AiNouAHvDSzHS0viUJc+V5vm3eq91Xwqn9dp4jRA==", + "optional": true, + "requires": { + "bn.js": "^4.0.0", + "brorand": "^1.0.1" + } + }, + "mime-db": { + "version": "1.40.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.40.0.tgz", + "integrity": "sha512-jYdeOMPy9vnxEqFRRo6ZvTZ8d9oPb+k18PKoYNYUe2stVEBPPwsln/qWzdbmaIvnhZ9v2P+CuecK+fpUfsV2mA==" + }, + "mime-types": { + "version": "2.1.24", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.24.tgz", + "integrity": "sha512-WaFHS3MCl5fapm3oLxU4eYDw77IQM2ACcxQ9RIxfaC3ooc6PFuBMGZZsYpvoXS5D5QTWPieo1jjLdAm3TBP3cQ==", + "requires": { + "mime-db": "1.40.0" + } + }, + "mimic-fn": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-1.2.0.tgz", + "integrity": "sha512-jf84uxzwiuiIVKiOLpfYk7N46TSy8ubTonmneY9vrpHNAnp0QBt2BxWV9dO3/j+BoVAb+a5G6YDPW3M5HOdMWQ==" + }, + "mimic-response": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/mimic-response/-/mimic-response-1.0.1.tgz", + "integrity": "sha512-j5EctnkH7amfV/q5Hgmoal1g2QHFJRraOtmx0JpIqkxhBhI/lJSl1nMpQ45hVarwNETOoWEimndZ4QK0RHxuxQ==" + }, + "minimalistic-assert": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/minimalistic-assert/-/minimalistic-assert-1.0.1.tgz", + "integrity": "sha512-UtJcAD4yEaGtjPezWuO9wC4nwUnVH/8/Im3yEHQP4b67cXlD/Qr9hdITCU1xDbSEXg2XKNaP8jsReV7vQd00/A==", + "optional": true + }, + "minimalistic-crypto-utils": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/minimalistic-crypto-utils/-/minimalistic-crypto-utils-1.0.1.tgz", + "integrity": "sha1-9sAMHAsIIkblxNmd+4x8CDsrWCo=", + "optional": true + }, + "minimatch": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", + "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", + "requires": { + "brace-expansion": "^1.1.7" + } + }, + "minimist": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", + "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=" + }, + "mixin-deep": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/mixin-deep/-/mixin-deep-1.3.1.tgz", + "integrity": "sha512-8ZItLHeEgaqEvd5lYBXfm4EZSFCX29Jb9K+lAHhDKzReKBQKj3R+7NOF6tjqYi9t4oI8VUfaWITJQm86wnXGNQ==", + "optional": true, + "requires": { + "for-in": "^1.0.2", + "is-extendable": "^1.0.1" + }, + "dependencies": { + "is-extendable": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-1.0.1.tgz", + "integrity": "sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==", + "optional": true, + "requires": { + "is-plain-object": "^2.0.4" + } + } + } + }, + "mkdirp": { + "version": "0.5.1", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz", + "integrity": "sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM=", + "requires": { + "minimist": "0.0.8" + }, + "dependencies": { + "minimist": { + "version": "0.0.8", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz", + "integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0=" + } + } + }, + "moment": { + "version": "2.24.0", + "resolved": "https://registry.npmjs.org/moment/-/moment-2.24.0.tgz", + "integrity": "sha512-bV7f+6l2QigeBBZSM/6yTNq4P2fNpSWj/0e7jQcy87A8e7o2nAfP/34/2ky5Vw4B9S446EtIhodAzkFCcR4dQg==" + }, + "ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=" + }, + "ms-rest": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/ms-rest/-/ms-rest-2.5.0.tgz", + "integrity": "sha512-QUTg9CsmWpofDO0MR37z8B28/T9ObpQ+FM23GGDMKXw8KYDJ3cEBdK6dJTDDrtSoZG3U+S/vdmSEwJ7FNj6Kog==", + "requires": { + "duplexer": "^0.1.1", + "is-buffer": "^1.1.6", + "is-stream": "^1.1.0", + "moment": "^2.21.0", + "request": "^2.88.0", + "through": "^2.3.8", + "tunnel": "0.0.5", + "uuid": "^3.2.1" + }, + "dependencies": { + "request": { + "version": "2.88.0", + "resolved": "https://registry.npmjs.org/request/-/request-2.88.0.tgz", + "integrity": "sha512-NAqBSrijGLZdM0WZNsInLJpkJokL72XYjUpnB0iwsRgxh7dB6COrHnTBNwN0E+lHDAJzu7kLAkDeY08z2/A0hg==", + "requires": { + "aws-sign2": "~0.7.0", + "aws4": "^1.8.0", + "caseless": "~0.12.0", + "combined-stream": "~1.0.6", + "extend": "~3.0.2", + "forever-agent": "~0.6.1", + "form-data": "~2.3.2", + "har-validator": "~5.1.0", + "http-signature": "~1.2.0", + "is-typedarray": "~1.0.0", + "isstream": "~0.1.2", + "json-stringify-safe": "~5.0.1", + "mime-types": "~2.1.19", + "oauth-sign": "~0.9.0", + "performance-now": "^2.1.0", + "qs": "~6.5.2", + "safe-buffer": "^5.1.2", + "tough-cookie": "~2.4.3", + "tunnel-agent": "^0.6.0", + "uuid": "^3.3.2" + } + } + } + }, + "ms-rest-azure": { + "version": "2.6.0", + "resolved": "https://registry.npmjs.org/ms-rest-azure/-/ms-rest-azure-2.6.0.tgz", + "integrity": "sha512-J6386a9krZ4VtU7CRt+Ypgo9RGf8+d3gjMBkH7zbkM4zzkhbbMOYiPRaZ+bHZcfihkKLlktTgA6rjshTjF329A==", + "requires": { + "adal-node": "^0.1.28", + "async": "2.6.0", + "moment": "^2.22.2", + "ms-rest": "^2.3.2", + "request": "^2.88.0", + "uuid": "^3.2.1" + }, + "dependencies": { + "request": { + "version": "2.88.0", + "resolved": "https://registry.npmjs.org/request/-/request-2.88.0.tgz", + "integrity": "sha512-NAqBSrijGLZdM0WZNsInLJpkJokL72XYjUpnB0iwsRgxh7dB6COrHnTBNwN0E+lHDAJzu7kLAkDeY08z2/A0hg==", + "requires": { + "aws-sign2": "~0.7.0", + "aws4": "^1.8.0", + "caseless": "~0.12.0", + "combined-stream": "~1.0.6", + "extend": "~3.0.2", + "forever-agent": "~0.6.1", + "form-data": "~2.3.2", + "har-validator": "~5.1.0", + "http-signature": "~1.2.0", + "is-typedarray": "~1.0.0", + "isstream": "~0.1.2", + "json-stringify-safe": "~5.0.1", + "mime-types": "~2.1.19", + "oauth-sign": "~0.9.0", + "performance-now": "^2.1.0", + "qs": "~6.5.2", + "safe-buffer": "^5.1.2", + "tough-cookie": "~2.4.3", + "tunnel-agent": "^0.6.0", + "uuid": "^3.3.2" + } + } + } + }, + "mute-stream": { + "version": "0.0.7", + "resolved": "https://registry.npmjs.org/mute-stream/-/mute-stream-0.0.7.tgz", + "integrity": "sha1-MHXOk7whuPq0PhvE2n6BFe0ee6s=" + }, + "nan": { + "version": "2.13.2", + "resolved": "https://registry.npmjs.org/nan/-/nan-2.13.2.tgz", + "integrity": "sha512-TghvYc72wlMGMVMluVo9WRJc0mB8KxxF/gZ4YYFy7V2ZQX9l7rgbPg7vjS9mt6U5HXODVFVI2bOduCzwOMv/lw==" + }, + "nanomatch": { + "version": "1.2.13", + "resolved": "https://registry.npmjs.org/nanomatch/-/nanomatch-1.2.13.tgz", + "integrity": "sha512-fpoe2T0RbHwBTBUOftAfBPaDEi06ufaUai0mE6Yn1kacc3SnTErfb/h+X94VXzI64rKFHYImXSvdwGGCmwOqCA==", + "optional": true, + "requires": { + "arr-diff": "^4.0.0", + "array-unique": "^0.3.2", + "define-property": "^2.0.2", + "extend-shallow": "^3.0.2", + "fragment-cache": "^0.2.1", + "is-windows": "^1.0.2", + "kind-of": "^6.0.2", + "object.pick": "^1.3.0", + "regex-not": "^1.0.0", + "snapdragon": "^0.8.1", + "to-regex": "^3.0.1" + }, + "dependencies": { + "kind-of": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.2.tgz", + "integrity": "sha512-s5kLOcnH0XqDO+FvuaLX8DDjZ18CGFk7VygH40QoKPUQhW4e2rvM0rwUq0t8IQDOwYSeLK01U90OjzBTme2QqA==", + "optional": true + } + } + }, + "napi-build-utils": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/napi-build-utils/-/napi-build-utils-1.0.1.tgz", + "integrity": "sha512-boQj1WFgQH3v4clhu3mTNfP+vOBxorDlE8EKiMjUlLG3C4qAESnn9AxIOkFgTR2c9LtzNjPrjS60cT27ZKBhaA==" + }, + "natural-compare": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", + "integrity": "sha1-Sr6/7tdUHywnrPspvbvRXI1bpPc=", + "dev": true + }, + "neo-async": { + "version": "2.6.1", + "resolved": "https://registry.npmjs.org/neo-async/-/neo-async-2.6.1.tgz", + "integrity": "sha512-iyam8fBuCUpWeKPGpaNMetEocMt364qkCsfL9JuhjXX6dRnguRVOfk2GZaDpPjcOKiiXCPINZC1GczQ7iTq3Zw==", + "optional": true + }, + "next-tick": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/next-tick/-/next-tick-1.0.0.tgz", + "integrity": "sha1-yobR/ogoFpsBICCOPchCS524NCw=" + }, + "node-abi": { + "version": "2.8.0", + "resolved": "https://registry.npmjs.org/node-abi/-/node-abi-2.8.0.tgz", + "integrity": "sha512-1/aa2clS0pue0HjckL62CsbhWWU35HARvBDXcJtYKbYR7LnIutmpxmXbuDMV9kEviD2lP/wACOgWmmwljghHyQ==", + "requires": { + "semver": "^5.4.1" + } + }, + "node-libs-browser": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/node-libs-browser/-/node-libs-browser-2.2.0.tgz", + "integrity": "sha512-5MQunG/oyOaBdttrL40dA7bUfPORLRWMUJLQtMg7nluxUvk5XwnLdL9twQHFAjRx/y7mIMkLKT9++qPbbk6BZA==", + "optional": true, + "requires": { + "assert": "^1.1.1", + "browserify-zlib": "^0.2.0", + "buffer": "^4.3.0", + "console-browserify": "^1.1.0", + "constants-browserify": "^1.0.0", + "crypto-browserify": "^3.11.0", + "domain-browser": "^1.1.1", + "events": "^3.0.0", + "https-browserify": "^1.0.0", + "os-browserify": "^0.3.0", + "path-browserify": "0.0.0", + "process": "^0.11.10", + "punycode": "^1.2.4", + "querystring-es3": "^0.2.0", + "readable-stream": "^2.3.3", + "stream-browserify": "^2.0.1", + "stream-http": "^2.7.2", + "string_decoder": "^1.0.0", + "timers-browserify": "^2.0.4", + "tty-browserify": "0.0.0", + "url": "^0.11.0", + "util": "^0.11.0", + "vm-browserify": "0.0.4" + }, + "dependencies": { + "buffer": { + "version": "4.9.1", + "resolved": "https://registry.npmjs.org/buffer/-/buffer-4.9.1.tgz", + "integrity": "sha1-bRu2AbB6TvztlwlBMgkwJ8lbwpg=", + "optional": true, + "requires": { + "base64-js": "^1.0.2", + "ieee754": "^1.1.4", + "isarray": "^1.0.0" + } + }, + "punycode": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.4.1.tgz", + "integrity": "sha1-wNWmOycYgArY4esPpSachN1BhF4=", + "optional": true + } + } + }, + "nomnom": { + "version": "1.5.2", + "resolved": "https://registry.npmjs.org/nomnom/-/nomnom-1.5.2.tgz", + "integrity": "sha1-9DRUSKhTz71cDSYyDyR3qwUm/i8=", + "requires": { + "colors": "0.5.x", + "underscore": "1.1.x" + }, + "dependencies": { + "underscore": { + "version": "1.1.7", + "resolved": "https://registry.npmjs.org/underscore/-/underscore-1.1.7.tgz", + "integrity": "sha1-QLq4S60Z0jAJbo1u9ii/8FXYPbA=" + } + } + }, + "noop-logger": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/noop-logger/-/noop-logger-0.1.1.tgz", + "integrity": "sha1-lKKxYzxPExdVMAfYlm/Q6EG2pMI=" + }, + "normalize-package-data": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-2.5.0.tgz", + "integrity": "sha512-/5CMN3T0R4XTj4DcGaexo+roZSdSFW/0AOOTROrjxzCG1wrWXEsGbRKevjlIL+ZDE4sZlJr5ED4YW0yqmkK+eA==", + "optional": true, + "requires": { + "hosted-git-info": "^2.1.4", + "resolve": "^1.10.0", + "semver": "2 || 3 || 4 || 5", + "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=", + "optional": true, + "requires": { + "remove-trailing-separator": "^1.0.1" + } + }, + "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=", + "optional": true, + "requires": { + "path-key": "^2.0.0" + } + }, + "npmlog": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/npmlog/-/npmlog-4.1.2.tgz", + "integrity": "sha512-2uUqazuKlTaSI/dC8AzicUck7+IrEaOnN/e0jd3Xtt1KcGpwx30v50mL7oPyr/h9bL3E4aZccVwpwP+5W9Vjkg==", + "requires": { + "are-we-there-yet": "~1.1.2", + "console-control-strings": "~1.1.0", + "gauge": "~2.7.3", + "set-blocking": "~2.0.0" + } + }, + "number-is-nan": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/number-is-nan/-/number-is-nan-1.0.1.tgz", + "integrity": "sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0=" + }, + "oauth-sign": { + "version": "0.9.0", + "resolved": "https://registry.npmjs.org/oauth-sign/-/oauth-sign-0.9.0.tgz", + "integrity": "sha512-fexhUFFPTGV8ybAtSIGbV6gOkSv8UtRbDBnAyLQw4QPKkgNlsH2ByPGtMUqdWkos6YCRmAqViwgZrJc/mRDzZQ==" + }, + "object-assign": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", + "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=" + }, + "object-copy": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/object-copy/-/object-copy-0.1.0.tgz", + "integrity": "sha1-fn2Fi3gb18mRpBupde04EnVOmYw=", + "optional": true, + "requires": { + "copy-descriptor": "^0.1.0", + "define-property": "^0.2.5", + "kind-of": "^3.0.3" + }, + "dependencies": { + "define-property": { + "version": "0.2.5", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", + "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", + "optional": true, + "requires": { + "is-descriptor": "^0.1.0" + } + } + } + }, + "object-visit": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/object-visit/-/object-visit-1.0.1.tgz", + "integrity": "sha1-95xEk68MU3e1n+OdOV5BBC3QRbs=", + "optional": true, + "requires": { + "isobject": "^3.0.0" + } + }, + "object.pick": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/object.pick/-/object.pick-1.3.0.tgz", + "integrity": "sha1-h6EKxMFpS9Lhy/U1kaZhQftd10c=", + "optional": true, + "requires": { + "isobject": "^3.0.1" + } + }, + "once": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", + "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", + "requires": { + "wrappy": "1" + } + }, + "onetime": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/onetime/-/onetime-2.0.1.tgz", + "integrity": "sha1-BnQoIw/WdEOyeUsiu6UotoZ5YtQ=", + "requires": { + "mimic-fn": "^1.0.0" + } + }, + "opn": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/opn/-/opn-4.0.2.tgz", + "integrity": "sha1-erwi5kTf9jsKltWrfyeQwPAavJU=", + "requires": { + "object-assign": "^4.0.1", + "pinkie-promise": "^2.0.0" + } + }, + "optionator": { + "version": "0.8.2", + "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.8.2.tgz", + "integrity": "sha1-NkxeQJ0/TWMB1sC0wFu6UBgK62Q=", + "dev": true, + "requires": { + "deep-is": "~0.1.3", + "fast-levenshtein": "~2.0.4", + "levn": "~0.3.0", + "prelude-ls": "~1.1.2", + "type-check": "~0.3.2", + "wordwrap": "~1.0.0" + } + }, + "os-browserify": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/os-browserify/-/os-browserify-0.3.0.tgz", + "integrity": "sha1-hUNzx/XCMVkU/Jv8a9gjj92h7Cc=", + "optional": true + }, + "os-homedir": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/os-homedir/-/os-homedir-1.0.2.tgz", + "integrity": "sha1-/7xJiDNuDoM94MFox+8VISGqf7M=" + }, + "os-locale": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/os-locale/-/os-locale-2.1.0.tgz", + "integrity": "sha512-3sslG3zJbEYcaC4YVAvDorjGxc7tv6KVATnLPZONiljsUncvihe9BQoVCEs0RZ1kmf4Hk9OBqlZfJZWI4GanKA==", + "optional": true, + "requires": { + "execa": "^0.7.0", + "lcid": "^1.0.0", + "mem": "^1.1.0" + } + }, + "os-tmpdir": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz", + "integrity": "sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ=" + }, + "p-finally": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/p-finally/-/p-finally-1.0.0.tgz", + "integrity": "sha1-P7z7FbiZpEEjs0ttzBi3JDNqLK4=", + "optional": true + }, + "p-limit": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-1.3.0.tgz", + "integrity": "sha512-vvcXsLAJ9Dr5rQOPk7toZQZJApBl2K4J6dANSsEuh6QI41JYcsS/qhTGa9ErIUUgK3WNQoJYvylxvjqmiqEA9Q==", + "optional": true, + "requires": { + "p-try": "^1.0.0" + } + }, + "p-locate": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-2.0.0.tgz", + "integrity": "sha1-IKAQOyIqcMj9OcwuWAaA893l7EM=", + "optional": true, + "requires": { + "p-limit": "^1.1.0" + } + }, + "p-try": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/p-try/-/p-try-1.0.0.tgz", + "integrity": "sha1-y8ec26+P1CKOE/Yh8rGiN8GyB7M=", + "optional": true + }, + "pako": { + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/pako/-/pako-1.0.10.tgz", + "integrity": "sha512-0DTvPVU3ed8+HNXOu5Bs+o//Mbdj9VNQMUOe9oKCwh8l0GNwpTDMKCWbRjgtD291AWnkAgkqA/LOnQS8AmS1tw==", + "optional": true + }, + "parse-asn1": { + "version": "5.1.4", + "resolved": "https://registry.npmjs.org/parse-asn1/-/parse-asn1-5.1.4.tgz", + "integrity": "sha512-Qs5duJcuvNExRfFZ99HDD3z4mAi3r9Wl/FOjEOijlxwCZs7E7mW2vjTpgQ4J8LpTF8x5v+1Vn5UQFejmWT11aw==", + "optional": true, + "requires": { + "asn1.js": "^4.0.0", + "browserify-aes": "^1.0.0", + "create-hash": "^1.1.0", + "evp_bytestokey": "^1.0.0", + "pbkdf2": "^3.0.3", + "safe-buffer": "^5.1.1" + } + }, + "parse-json": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-2.2.0.tgz", + "integrity": "sha1-9ID0BDTvgHQfhGkJn43qGPVaTck=", + "optional": true, + "requires": { + "error-ex": "^1.2.0" + } + }, + "parse-passwd": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/parse-passwd/-/parse-passwd-1.0.0.tgz", + "integrity": "sha1-bVuTSkVpk7I9N/QKOC1vFmao5cY=", + "optional": true + }, + "pascalcase": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/pascalcase/-/pascalcase-0.1.1.tgz", + "integrity": "sha1-s2PlXoAGym/iF4TS2yK9FdeRfxQ=", + "optional": true + }, + "path-browserify": { + "version": "0.0.0", + "resolved": "https://registry.npmjs.org/path-browserify/-/path-browserify-0.0.0.tgz", + "integrity": "sha1-oLhwcpquIUAFt9UDLsLLuw+0RRo=", + "optional": true + }, + "path-dirname": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/path-dirname/-/path-dirname-1.0.2.tgz", + "integrity": "sha1-zDPSTVJeCZpTiMAzbG4yuRYGCeA=", + "optional": true + }, + "path-exists": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz", + "integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=", + "optional": true + }, + "path-is-absolute": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", + "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=" + }, + "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=", + "optional": true + }, + "path-parse": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.6.tgz", + "integrity": "sha512-GSmOT2EbHrINBf9SR7CDELwlJ8AENk3Qn7OikK4nFYAu3Ote2+JYNVvkpAEQm3/TLNEJFD/xZJjzyxg3KBWOzw==" + }, + "path-type": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/path-type/-/path-type-2.0.0.tgz", + "integrity": "sha1-8BLMuEFbcJb8LaoQVMPXI4lZTHM=", + "optional": true, + "requires": { + "pify": "^2.0.0" + } + }, + "pbkdf2": { + "version": "3.0.17", + "resolved": "https://registry.npmjs.org/pbkdf2/-/pbkdf2-3.0.17.tgz", + "integrity": "sha512-U/il5MsrZp7mGg3mSQfn742na2T+1/vHDCG5/iTI3X9MKUuYUZVLQhyRsg06mCgDBTd57TxzgZt7P+fYfjRLtA==", + "optional": true, + "requires": { + "create-hash": "^1.1.2", + "create-hmac": "^1.1.4", + "ripemd160": "^2.0.1", + "safe-buffer": "^5.0.1", + "sha.js": "^2.4.8" + } + }, + "performance-now": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/performance-now/-/performance-now-2.1.0.tgz", + "integrity": "sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns=" + }, + "pify": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", + "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=", + "optional": true + }, + "pinkie": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/pinkie/-/pinkie-2.0.4.tgz", + "integrity": "sha1-clVrgM+g1IqXToDnckjoDtT3+HA=" + }, + "pinkie-promise": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/pinkie-promise/-/pinkie-promise-2.0.1.tgz", + "integrity": "sha1-ITXW36ejWMBprJsXh3YogihFD/o=", + "requires": { + "pinkie": "^2.0.0" + } + }, + "pluralize": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/pluralize/-/pluralize-1.2.1.tgz", + "integrity": "sha1-0aIUg/0iu0HlihL6NCGCMUCJfEU=", + "dev": true + }, + "posix-character-classes": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/posix-character-classes/-/posix-character-classes-0.1.1.tgz", + "integrity": "sha1-AerA/jta9xoqbAL+q7jB/vfgDqs=", + "optional": true + }, + "prebuild-install": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/prebuild-install/-/prebuild-install-5.3.0.tgz", + "integrity": "sha512-aaLVANlj4HgZweKttFNUVNRxDukytuIuxeK2boIMHjagNJCiVKWFsKF4tCE3ql3GbrD2tExPQ7/pwtEJcHNZeg==", + "requires": { + "detect-libc": "^1.0.3", + "expand-template": "^2.0.3", + "github-from-package": "0.0.0", + "minimist": "^1.2.0", + "mkdirp": "^0.5.1", + "napi-build-utils": "^1.0.1", + "node-abi": "^2.7.0", + "noop-logger": "^0.1.1", + "npmlog": "^4.0.1", + "os-homedir": "^1.0.1", + "pump": "^2.0.1", + "rc": "^1.2.7", + "simple-get": "^2.7.0", + "tar-fs": "^1.13.0", + "tunnel-agent": "^0.6.0", + "which-pm-runs": "^1.0.0" + } + }, + "prelude-ls": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.1.2.tgz", + "integrity": "sha1-IZMqVJ9eUv/ZqCf1cOBL5iqX2lQ=", + "dev": true + }, + "process": { + "version": "0.11.10", + "resolved": "https://registry.npmjs.org/process/-/process-0.11.10.tgz", + "integrity": "sha1-czIwDoQBYb2j5podHZGn1LwW8YI=", + "optional": true + }, + "process-nextick-args": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.0.tgz", + "integrity": "sha512-MtEC1TqN0EU5nephaJ4rAtThHtC86dNN9qCuEhtshvpVBkAW5ZO7BASN9REnF9eoXGcRub+pFuKEpOHE+HbEMw==" + }, + "progress": { + "version": "1.1.8", + "resolved": "https://registry.npmjs.org/progress/-/progress-1.1.8.tgz", + "integrity": "sha1-4mDHj2Fhzdmw5WzD4Khd4Xx6V74=", + "dev": true + }, + "prr": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/prr/-/prr-1.0.1.tgz", + "integrity": "sha1-0/wRS6BplaRexok/SEzrHXj19HY=", + "optional": true + }, + "pseudomap": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/pseudomap/-/pseudomap-1.0.2.tgz", + "integrity": "sha1-8FKijacOYYkX7wqKw0wa5aaChrM=", + "optional": true + }, + "psl": { + "version": "1.1.31", + "resolved": "https://registry.npmjs.org/psl/-/psl-1.1.31.tgz", + "integrity": "sha512-/6pt4+C+T+wZUieKR620OpzN/LlnNKuWjy1iFLQ/UG35JqHlR/89MP1d96dUfkf6Dne3TuLQzOYEYshJ+Hx8mw==" + }, + "public-encrypt": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/public-encrypt/-/public-encrypt-4.0.3.tgz", + "integrity": "sha512-zVpa8oKZSz5bTMTFClc1fQOnyyEzpl5ozpi1B5YcvBrdohMjH2rfsBtyXcuNuwjsDIXmBYlF2N5FlJYhR29t8Q==", + "optional": true, + "requires": { + "bn.js": "^4.1.0", + "browserify-rsa": "^4.0.0", + "create-hash": "^1.1.0", + "parse-asn1": "^5.0.0", + "randombytes": "^2.0.1", + "safe-buffer": "^5.1.2" + } + }, + "pump": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/pump/-/pump-2.0.1.tgz", + "integrity": "sha512-ruPMNRkN3MHP1cWJc9OWr+T/xDP0jhXYCLfJcBuX54hhfIBnaQmAUMfDcG4DM5UMWByBbJY69QSphm3jtDKIkA==", + "requires": { + "end-of-stream": "^1.1.0", + "once": "^1.3.1" + } + }, + "punycode": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz", + "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==" + }, + "qs": { + "version": "6.5.2", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.5.2.tgz", + "integrity": "sha512-N5ZAX4/LxJmF+7wN74pUD6qAh9/wnvdQcjq9TZjevvXzSUo7bfmw91saqMjzGS2xq91/odN2dW/WOl7qQHNDGA==" + }, + "querystring": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/querystring/-/querystring-0.2.0.tgz", + "integrity": "sha1-sgmEkgO7Jd+CDadW50cAWHhSFiA=", + "optional": true + }, + "querystring-es3": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/querystring-es3/-/querystring-es3-0.2.1.tgz", + "integrity": "sha1-nsYfeQSYdXB9aUFFlv2Qek1xHnM=", + "optional": true + }, + "randombytes": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.1.0.tgz", + "integrity": "sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ==", + "optional": true, + "requires": { + "safe-buffer": "^5.1.0" + } + }, + "randomfill": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/randomfill/-/randomfill-1.0.4.tgz", + "integrity": "sha512-87lcbR8+MhcWcUiQ+9e+Rwx8MyR2P7qnt15ynUlbm3TU/fjbgz4GsvfSUDTemtCCtVCqb4ZcEFlyPNTh9bBTLw==", + "optional": true, + "requires": { + "randombytes": "^2.0.5", + "safe-buffer": "^5.1.0" + } + }, + "rc": { + "version": "1.2.8", + "resolved": "https://registry.npmjs.org/rc/-/rc-1.2.8.tgz", + "integrity": "sha512-y3bGgqKj3QBdxLbLkomlohkvsA8gdAiUQlSBJnBhfn+BPxg4bc62d8TcBW15wavDfgexCgccckhcZvywyQYPOw==", + "requires": { + "deep-extend": "^0.6.0", + "ini": "~1.3.0", + "minimist": "^1.2.0", + "strip-json-comments": "~2.0.1" + } + }, + "read-pkg": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-2.0.0.tgz", + "integrity": "sha1-jvHAYjxqbbDcZxPEv6xGMysjaPg=", + "optional": true, + "requires": { + "load-json-file": "^2.0.0", + "normalize-package-data": "^2.3.2", + "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=", + "optional": true, + "requires": { + "find-up": "^2.0.0", + "read-pkg": "^2.0.0" + } + }, + "readable-stream": { + "version": "2.3.6", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz", + "integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==", + "requires": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" + } + }, + "readdirp": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-2.2.1.tgz", + "integrity": "sha512-1JU/8q+VgFZyxwrJ+SVIOsh+KywWGpds3NTqikiKpDMZWScmAYyKIgqkO+ARvNWJfXeXR1zxz7aHF4u4CyH6vQ==", + "optional": true, + "requires": { + "graceful-fs": "^4.1.11", + "micromatch": "^3.1.10", + "readable-stream": "^2.0.2" + } + }, + "readline2": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/readline2/-/readline2-1.0.1.tgz", + "integrity": "sha1-QQWWCP/BVHV7cV2ZidGZ/783LjU=", + "dev": true, + "requires": { + "code-point-at": "^1.0.0", + "is-fullwidth-code-point": "^1.0.0", + "mute-stream": "0.0.5" + }, + "dependencies": { + "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.0" + } + }, + "mute-stream": { + "version": "0.0.5", + "resolved": "https://registry.npmjs.org/mute-stream/-/mute-stream-0.0.5.tgz", + "integrity": "sha1-j7+rsKmKJT0xhDMfno3rc3L6xsA=", + "dev": true + } + } + }, + "rechoir": { + "version": "0.6.2", + "resolved": "https://registry.npmjs.org/rechoir/-/rechoir-0.6.2.tgz", + "integrity": "sha1-hSBLVNuoLVdC4oyWdW70OvUOM4Q=", + "dev": true, + "requires": { + "resolve": "^1.1.6" + } + }, + "regex-not": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/regex-not/-/regex-not-1.0.2.tgz", + "integrity": "sha512-J6SDjUgDxQj5NusnOtdFxDwN/+HWykR8GELwctJ7mdqhcyy1xEc4SRFHUXvxTp661YaVKAjfRLZ9cCqS6tn32A==", + "optional": true, + "requires": { + "extend-shallow": "^3.0.2", + "safe-regex": "^1.1.0" + } + }, + "remove-trailing-separator": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/remove-trailing-separator/-/remove-trailing-separator-1.1.0.tgz", + "integrity": "sha1-wkvOKig62tW8P1jg1IJJuSN52O8=", + "optional": true + }, + "repeat-element": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/repeat-element/-/repeat-element-1.1.3.tgz", + "integrity": "sha512-ahGq0ZnV5m5XtZLMb+vP76kcAM5nkLqk0lpqAuojSKGgQtn4eRi4ZZGm2olo2zKFH+sMsWaqOCW1dqAnOru72g==", + "optional": true + }, + "repeat-string": { + "version": "1.6.1", + "resolved": "https://registry.npmjs.org/repeat-string/-/repeat-string-1.6.1.tgz", + "integrity": "sha1-jcrkcOHIirwtYA//Sndihtp15jc=", + "optional": true + }, + "request": { + "version": "2.81.0", + "resolved": "https://registry.npmjs.org/request/-/request-2.81.0.tgz", + "integrity": "sha1-xpKJRqDgbF+Nb4qTM0af/aRimKA=", + "requires": { + "aws-sign2": "~0.6.0", + "aws4": "^1.2.1", + "caseless": "~0.12.0", + "combined-stream": "~1.0.5", + "extend": "~3.0.0", + "forever-agent": "~0.6.1", + "form-data": "~2.1.1", + "har-validator": "~4.2.1", + "hawk": "~3.1.3", + "http-signature": "~1.1.0", + "is-typedarray": "~1.0.0", + "isstream": "~0.1.2", + "json-stringify-safe": "~5.0.1", + "mime-types": "~2.1.7", + "oauth-sign": "~0.8.1", + "performance-now": "^0.2.0", + "qs": "~6.4.0", + "safe-buffer": "^5.0.1", + "stringstream": "~0.0.4", + "tough-cookie": "~2.3.0", + "tunnel-agent": "^0.6.0", + "uuid": "^3.0.0" + }, + "dependencies": { + "ajv": { + "version": "4.11.8", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-4.11.8.tgz", + "integrity": "sha1-gv+wKynmYq5TvcIK8VlHcGc5xTY=", + "requires": { + "co": "^4.6.0", + "json-stable-stringify": "^1.0.1" + } + }, + "assert-plus": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-0.2.0.tgz", + "integrity": "sha1-104bh+ev/A24qttwIfP+SBAasjQ=" + }, + "aws-sign2": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/aws-sign2/-/aws-sign2-0.6.0.tgz", + "integrity": "sha1-FDQt0428yU0OW4fXY81jYSwOeU8=" + }, + "form-data": { + "version": "2.1.4", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.1.4.tgz", + "integrity": "sha1-M8GDrPGTJ27KqYFDpp6Uv+4XUNE=", + "requires": { + "asynckit": "^0.4.0", + "combined-stream": "^1.0.5", + "mime-types": "^2.1.12" + } + }, + "har-schema": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/har-schema/-/har-schema-1.0.5.tgz", + "integrity": "sha1-0mMTX0MwfALGAq/I/pWXDAFRNp4=" + }, + "har-validator": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/har-validator/-/har-validator-4.2.1.tgz", + "integrity": "sha1-M0gdDxu/9gDdID11gSpqX7oALio=", + "requires": { + "ajv": "^4.9.1", + "har-schema": "^1.0.5" + } + }, + "http-signature": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/http-signature/-/http-signature-1.1.1.tgz", + "integrity": "sha1-33LiZwZs0Kxn+3at+OE0qPvPkb8=", + "requires": { + "assert-plus": "^0.2.0", + "jsprim": "^1.2.2", + "sshpk": "^1.7.0" + } + }, + "oauth-sign": { + "version": "0.8.2", + "resolved": "https://registry.npmjs.org/oauth-sign/-/oauth-sign-0.8.2.tgz", + "integrity": "sha1-Rqarfwrq2N6unsBWV4C31O/rnUM=" + }, + "performance-now": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/performance-now/-/performance-now-0.2.0.tgz", + "integrity": "sha1-M+8wxcd9TqIcWlOGnZG1bY8lVeU=" + }, + "punycode": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.4.1.tgz", + "integrity": "sha1-wNWmOycYgArY4esPpSachN1BhF4=" + }, + "qs": { + "version": "6.4.0", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.4.0.tgz", + "integrity": "sha1-E+JtKK1rD/qpExLNO/cI7TUecjM=" + }, + "tough-cookie": { + "version": "2.3.4", + "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.3.4.tgz", + "integrity": "sha512-TZ6TTfI5NtZnuyy/Kecv+CnoROnyXn2DN97LontgQpCwsX2XyLYCC0ENhYkehSOwAp8rTQKc/NUIF7BkQ5rKLA==", + "requires": { + "punycode": "^1.4.1" + } + } + } + }, + "require-directory": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", + "integrity": "sha1-jGStX9MNqxyXbiNE/+f3kqam30I=", + "optional": 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=", + "optional": true + }, + "require-uncached": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/require-uncached/-/require-uncached-1.0.3.tgz", + "integrity": "sha1-Tg1W1slmL9MeQwEcS5WqSZVUIdM=", + "dev": true, + "requires": { + "caller-path": "^0.1.0", + "resolve-from": "^1.0.0" + } + }, + "resolve": { + "version": "1.10.1", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.10.1.tgz", + "integrity": "sha512-KuIe4mf++td/eFb6wkaPbMDnP6kObCaEtIDuHOUED6MNUo4K670KZUHuuvYPZDxNF0WVLw49n06M2m2dXphEzA==", + "requires": { + "path-parse": "^1.0.6" + } + }, + "resolve-from": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-1.0.1.tgz", + "integrity": "sha1-Jsv+k10a7uq7Kbw/5a6wHpPUQiY=", + "dev": true + }, + "resolve-url": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/resolve-url/-/resolve-url-0.2.1.tgz", + "integrity": "sha1-LGN/53yJOv0qZj/iGqkIAGjiBSo=", + "optional": true + }, + "restore-cursor": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-2.0.0.tgz", + "integrity": "sha1-n37ih/gv0ybU/RYpI9YhKe7g368=", + "requires": { + "onetime": "^2.0.0", + "signal-exit": "^3.0.2" + } + }, + "ret": { + "version": "0.1.15", + "resolved": "https://registry.npmjs.org/ret/-/ret-0.1.15.tgz", + "integrity": "sha512-TTlYpa+OL+vMMNG24xSlQGEJ3B/RzEfUlLct7b5G/ytav+wPrplCpVMFuwzXbkecJrb6IYo1iFb0S9v37754mg==", + "optional": true + }, + "right-align": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/right-align/-/right-align-0.1.3.tgz", + "integrity": "sha1-YTObci/mo1FWiSENJOFMlhSGE+8=", + "optional": true, + "requires": { + "align-text": "^0.1.1" + } + }, + "rimraf": { + "version": "2.6.3", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.6.3.tgz", + "integrity": "sha512-mwqeW5XsA2qAejG46gYdENaxXjx9onRNCfn7L0duuP4hCuTIi/QO7PDK07KJfp1d+izWPrzEJDcSqBa0OZQriA==", + "dev": true, + "requires": { + "glob": "^7.1.3" + }, + "dependencies": { + "glob": { + "version": "7.1.4", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.4.tgz", + "integrity": "sha512-hkLPepehmnKk41pUGm3sYxoFs/umurYfYJCerbXEyFIWcAzvpipAgVkBqqT9RBKMGjnq6kMuyYwha6csxbiM1A==", + "dev": true, + "requires": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.0.4", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + } + } + } + }, + "ripemd160": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/ripemd160/-/ripemd160-2.0.2.tgz", + "integrity": "sha512-ii4iagi25WusVoiC4B4lq7pbXfAp3D9v5CwfkY33vffw2+pkDjY1D8GaN7spsxvCSx8dkPqOZCEZyfxcmJG2IA==", + "optional": true, + "requires": { + "hash-base": "^3.0.0", + "inherits": "^2.0.1" + } + }, + "run-async": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/run-async/-/run-async-2.3.0.tgz", + "integrity": "sha1-A3GrSuC91yDUFm19/aZP96RFpsA=", + "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=" + }, + "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=", + "requires": { + "rx-lite": "*" + } + }, + "safe-buffer": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" + }, + "safe-regex": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/safe-regex/-/safe-regex-1.1.0.tgz", + "integrity": "sha1-QKNmnzsHfR6UPURinhV91IAjvy4=", + "optional": true, + "requires": { + "ret": "~0.1.10" + } + }, + "safer-buffer": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", + "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==" + }, + "semver": { + "version": "5.7.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.0.tgz", + "integrity": "sha512-Ya52jSX2u7QKghxeoFGpLwCtGlt7j0oY9DYb5apt9nPlJ42ID+ulTXESnt/qAQcoSERyZ5sl3LDIOw0nAn/5DA==" + }, + "serverless-webpack": { + "version": "4.4.0", + "resolved": "https://registry.npmjs.org/serverless-webpack/-/serverless-webpack-4.4.0.tgz", + "integrity": "sha512-yezTtL5on2QQfv1wG2tWLEu1UOjV8mLco4HfE9nO3tUsHPgT3nyL0HXWMpdf21KhIEFnDbgrbu4UYZm4lPrSyA==", + "optional": true, + "requires": { + "archiver": "^2.0.0", + "bluebird": "^3.5.0", + "fs-extra": "^4.0.2", + "glob": "^7.1.2", + "is-builtin-module": "^1.0.0", + "lodash": "^4.17.4", + "semver": "^5.4.1", + "ts-node": "^3.2.0" + }, + "dependencies": { + "archiver": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/archiver/-/archiver-2.1.1.tgz", + "integrity": "sha1-/2YrSnggFJSj7lRNOjP+dJZQnrw=", + "optional": true, + "requires": { + "archiver-utils": "^1.3.0", + "async": "^2.0.0", + "buffer-crc32": "^0.2.1", + "glob": "^7.0.0", + "lodash": "^4.8.0", + "readable-stream": "^2.0.0", + "tar-stream": "^1.5.0", + "zip-stream": "^1.2.0" + } + }, + "compress-commons": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/compress-commons/-/compress-commons-1.2.2.tgz", + "integrity": "sha1-UkqfEJA/OoEzibAiXSfEi7dRiQ8=", + "optional": true, + "requires": { + "buffer-crc32": "^0.2.1", + "crc32-stream": "^2.0.0", + "normalize-path": "^2.0.0", + "readable-stream": "^2.0.0" + } + }, + "crc32-stream": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/crc32-stream/-/crc32-stream-2.0.0.tgz", + "integrity": "sha1-483TtN8xaN10494/u8t7KX/pCPQ=", + "optional": true, + "requires": { + "crc": "^3.4.4", + "readable-stream": "^2.0.0" + } + }, + "fs-extra": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-4.0.3.tgz", + "integrity": "sha512-q6rbdDd1o2mAnQreO7YADIxf/Whx4AHBiRf6d+/cVT8h44ss+lHgxf1FemcqDnQt9X3ct4McHr+JMGlYSsK7Cg==", + "optional": true, + "requires": { + "graceful-fs": "^4.1.2", + "jsonfile": "^4.0.0", + "universalify": "^0.1.0" + } + }, + "glob": { + "version": "7.1.4", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.4.tgz", + "integrity": "sha512-hkLPepehmnKk41pUGm3sYxoFs/umurYfYJCerbXEyFIWcAzvpipAgVkBqqT9RBKMGjnq6kMuyYwha6csxbiM1A==", + "optional": true, + "requires": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.0.4", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + } + }, + "jsonfile": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-4.0.0.tgz", + "integrity": "sha1-h3Gq4HmbZAdrdmQPygWPnBDjPss=", + "optional": true, + "requires": { + "graceful-fs": "^4.1.6" + } + }, + "zip-stream": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/zip-stream/-/zip-stream-1.2.0.tgz", + "integrity": "sha1-qLxF9MG0lpnGuQGYuqyqzbzUugQ=", + "optional": true, + "requires": { + "archiver-utils": "^1.3.0", + "compress-commons": "^1.2.0", + "lodash": "^4.8.0", + "readable-stream": "^2.0.0" + } + } + } + }, + "set-blocking": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz", + "integrity": "sha1-BF+XgtARrppoA93TgrJDkrPYkPc=" + }, + "set-value": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/set-value/-/set-value-2.0.0.tgz", + "integrity": "sha512-hw0yxk9GT/Hr5yJEYnHNKYXkIA8mVJgd9ditYZCe16ZczcaELYYcfvaXesNACk2O8O0nTiPQcQhGUQj8JLzeeg==", + "optional": true, + "requires": { + "extend-shallow": "^2.0.1", + "is-extendable": "^0.1.1", + "is-plain-object": "^2.0.3", + "split-string": "^3.0.1" + }, + "dependencies": { + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "optional": true, + "requires": { + "is-extendable": "^0.1.0" + } + } + } + }, + "setimmediate": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/setimmediate/-/setimmediate-1.0.5.tgz", + "integrity": "sha1-KQy7Iy4waULX1+qbg3Mqt4VvgoU=", + "optional": true + }, + "sha.js": { + "version": "2.4.11", + "resolved": "https://registry.npmjs.org/sha.js/-/sha.js-2.4.11.tgz", + "integrity": "sha512-QMEp5B7cftE7APOjk5Y6xgrbWu+WkLVQwk8JNjZ8nKRciZaByEW6MubieAiToS7+dwvrjGhH8jRXz3MVd0AYqQ==", + "optional": true, + "requires": { + "inherits": "^2.0.1", + "safe-buffer": "^5.0.1" + } + }, + "shebang-command": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-1.2.0.tgz", + "integrity": "sha1-RKrGW2lbAzmJaMOfNj/uXer98eo=", + "optional": 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=", + "optional": true + }, + "shelljs": { + "version": "0.7.8", + "resolved": "https://registry.npmjs.org/shelljs/-/shelljs-0.7.8.tgz", + "integrity": "sha1-3svPh0sNHl+3LhSxZKloMEjprLM=", + "dev": true, + "requires": { + "glob": "^7.0.0", + "interpret": "^1.0.0", + "rechoir": "^0.6.2" + }, + "dependencies": { + "glob": { + "version": "7.1.4", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.4.tgz", + "integrity": "sha512-hkLPepehmnKk41pUGm3sYxoFs/umurYfYJCerbXEyFIWcAzvpipAgVkBqqT9RBKMGjnq6kMuyYwha6csxbiM1A==", + "dev": true, + "requires": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.0.4", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + } + } + } + }, + "signal-exit": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.2.tgz", + "integrity": "sha1-tf3AjxKH6hF4Yo5BXiUTK3NkbG0=" + }, + "simple-concat": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/simple-concat/-/simple-concat-1.0.0.tgz", + "integrity": "sha1-c0TLuLbib7J9ZrL8hvn21Zl1IcY=" + }, + "simple-get": { + "version": "2.8.1", + "resolved": "https://registry.npmjs.org/simple-get/-/simple-get-2.8.1.tgz", + "integrity": "sha512-lSSHRSw3mQNUGPAYRqo7xy9dhKmxFXIjLjp4KHpf99GEH2VH7C3AM+Qfx6du6jhfUi6Vm7XnbEVEf7Wb6N8jRw==", + "requires": { + "decompress-response": "^3.3.0", + "once": "^1.3.1", + "simple-concat": "^1.0.0" + } + }, + "slice-ansi": { + "version": "0.0.4", + "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-0.0.4.tgz", + "integrity": "sha1-7b+JA/ZvfOL46v1s7tZeJkyDGzU=", + "dev": true + }, + "snapdragon": { + "version": "0.8.2", + "resolved": "https://registry.npmjs.org/snapdragon/-/snapdragon-0.8.2.tgz", + "integrity": "sha512-FtyOnWN/wCHTVXOMwvSv26d+ko5vWlIDD6zoUJ7LW8vh+ZBC8QdljveRP+crNrtBwioEUWy/4dMtbBjA4ioNlg==", + "optional": true, + "requires": { + "base": "^0.11.1", + "debug": "^2.2.0", + "define-property": "^0.2.5", + "extend-shallow": "^2.0.1", + "map-cache": "^0.2.2", + "source-map": "^0.5.6", + "source-map-resolve": "^0.5.0", + "use": "^3.1.0" + }, + "dependencies": { + "define-property": { + "version": "0.2.5", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", + "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", + "optional": true, + "requires": { + "is-descriptor": "^0.1.0" + } + }, + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "optional": true, + "requires": { + "is-extendable": "^0.1.0" + } + }, + "source-map": { + "version": "0.5.7", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", + "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=", + "optional": true + } + } + }, + "snapdragon-node": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/snapdragon-node/-/snapdragon-node-2.1.1.tgz", + "integrity": "sha512-O27l4xaMYt/RSQ5TR3vpWCAB5Kb/czIcqUFOM/C4fYcLnbZUc1PkjTAMjof2pBWaSTwOUd6qUHcFGVGj7aIwnw==", + "optional": true, + "requires": { + "define-property": "^1.0.0", + "isobject": "^3.0.0", + "snapdragon-util": "^3.0.1" + }, + "dependencies": { + "define-property": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz", + "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=", + "optional": true, + "requires": { + "is-descriptor": "^1.0.0" + } + }, + "is-accessor-descriptor": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", + "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", + "optional": true, + "requires": { + "kind-of": "^6.0.0" + } + }, + "is-data-descriptor": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", + "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", + "optional": true, + "requires": { + "kind-of": "^6.0.0" + } + }, + "is-descriptor": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", + "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", + "optional": true, + "requires": { + "is-accessor-descriptor": "^1.0.0", + "is-data-descriptor": "^1.0.0", + "kind-of": "^6.0.2" + } + }, + "kind-of": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.2.tgz", + "integrity": "sha512-s5kLOcnH0XqDO+FvuaLX8DDjZ18CGFk7VygH40QoKPUQhW4e2rvM0rwUq0t8IQDOwYSeLK01U90OjzBTme2QqA==", + "optional": true + } + } + }, + "snapdragon-util": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/snapdragon-util/-/snapdragon-util-3.0.1.tgz", + "integrity": "sha512-mbKkMdQKsjX4BAL4bRYTj21edOf8cN7XHdYUJEe+Zn99hVEYcMvKPct1IqNe7+AZPirn8BCDOQBHQZknqmKlZQ==", + "optional": true, + "requires": { + "kind-of": "^3.2.0" + } + }, + "sntp": { + "version": "1.0.9", + "resolved": "https://registry.npmjs.org/sntp/-/sntp-1.0.9.tgz", + "integrity": "sha1-ZUEYTMkK7qbG57NeJlkIJEPGYZg=", + "requires": { + "hoek": "2.x.x" + } + }, + "source-list-map": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/source-list-map/-/source-list-map-2.0.1.tgz", + "integrity": "sha512-qnQ7gVMxGNxsiL4lEuJwe/To8UnK7fAnmbGEEH8RpLouuKbeEm0lhbQVFIrNSuB+G7tVrAlVsZgETT5nljf+Iw==", + "optional": true + }, + "source-map": { + "version": "0.7.3", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.7.3.tgz", + "integrity": "sha512-CkCj6giN3S+n9qrYiBTX5gystlENnRW5jZeNLHpe6aue+SrHcG5VYwujhW9s4dY31mEGsxBDrHR6oI69fTXsaQ==", + "optional": true + }, + "source-map-resolve": { + "version": "0.5.2", + "resolved": "https://registry.npmjs.org/source-map-resolve/-/source-map-resolve-0.5.2.tgz", + "integrity": "sha512-MjqsvNwyz1s0k81Goz/9vRBe9SZdB09Bdw+/zYyO+3CuPk6fouTaxscHkgtE8jKvf01kVfl8riHzERQ/kefaSA==", + "optional": true, + "requires": { + "atob": "^2.1.1", + "decode-uri-component": "^0.2.0", + "resolve-url": "^0.2.1", + "source-map-url": "^0.4.0", + "urix": "^0.1.0" + } + }, + "source-map-support": { + "version": "0.4.18", + "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.4.18.tgz", + "integrity": "sha512-try0/JqxPLF9nOjvSta7tVondkP5dwgyLDjVoyMDlmjugT2lRZ1OfsrYTkCd2hkDnJTKRbO/Rl3orm8vlsUzbA==", + "optional": true, + "requires": { + "source-map": "^0.5.6" + }, + "dependencies": { + "source-map": { + "version": "0.5.7", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", + "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=", + "optional": true + } + } + }, + "source-map-url": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/source-map-url/-/source-map-url-0.4.0.tgz", + "integrity": "sha1-PpNdfd1zYxuXZZlW1VEo6HtQhKM=", + "optional": true + }, + "spdx-correct": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/spdx-correct/-/spdx-correct-3.1.0.tgz", + "integrity": "sha512-lr2EZCctC2BNR7j7WzJ2FpDznxky1sjfxvvYEyzxNyb6lZXHODmEoJeFu4JupYlkfha1KZpJyoqiJ7pgA1qq8Q==", + "optional": true, + "requires": { + "spdx-expression-parse": "^3.0.0", + "spdx-license-ids": "^3.0.0" + } + }, + "spdx-exceptions": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/spdx-exceptions/-/spdx-exceptions-2.2.0.tgz", + "integrity": "sha512-2XQACfElKi9SlVb1CYadKDXvoajPgBVPn/gOQLrTvHdElaVhr7ZEbqJaRnJLVNeaI4cMEAgVCeBMKF6MWRDCRA==", + "optional": true + }, + "spdx-expression-parse": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/spdx-expression-parse/-/spdx-expression-parse-3.0.0.tgz", + "integrity": "sha512-Yg6D3XpRD4kkOmTpdgbUiEJFKghJH03fiC1OPll5h/0sO6neh2jqRDVHOQ4o/LMea0tgCkbMgea5ip/e+MkWyg==", + "optional": true, + "requires": { + "spdx-exceptions": "^2.1.0", + "spdx-license-ids": "^3.0.0" + } + }, + "spdx-license-ids": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.4.tgz", + "integrity": "sha512-7j8LYJLeY/Yb6ACbQ7F76qy5jHkp0U6jgBfJsk97bwWlVUnUWsAgpyaCvo17h0/RQGnQ036tVDomiwoI4pDkQA==", + "optional": true + }, + "split-string": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/split-string/-/split-string-3.1.0.tgz", + "integrity": "sha512-NzNVhJDYpwceVVii8/Hu6DKfD2G+NrQHlS/V/qgv763EYudVwEcMQNxd2lh+0VrUByXN/oJkl5grOhYWvQUYiw==", + "optional": true, + "requires": { + "extend-shallow": "^3.0.0" + } + }, + "sprintf-js": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", + "integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=", + "dev": true + }, + "sshpk": { + "version": "1.16.1", + "resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.16.1.tgz", + "integrity": "sha512-HXXqVUq7+pcKeLqqZj6mHFUMvXtOJt1uoUx09pFW6011inTMxqI8BA8PM95myrIyyKwdnzjdFjLiE6KBPVtJIg==", + "requires": { + "asn1": "~0.2.3", + "assert-plus": "^1.0.0", + "bcrypt-pbkdf": "^1.0.0", + "dashdash": "^1.12.0", + "ecc-jsbn": "~0.1.1", + "getpass": "^0.1.1", + "jsbn": "~0.1.0", + "safer-buffer": "^2.0.2", + "tweetnacl": "~0.14.0" + } + }, + "static-eval": { + "version": "0.2.3", + "resolved": "https://registry.npmjs.org/static-eval/-/static-eval-0.2.3.tgz", + "integrity": "sha1-Aj8XrJ/uQm6niMEuo5IG3Bdfiyo=", + "requires": { + "escodegen": "~0.0.24" + }, + "dependencies": { + "escodegen": { + "version": "0.0.28", + "resolved": "https://registry.npmjs.org/escodegen/-/escodegen-0.0.28.tgz", + "integrity": "sha1-Dk/xcV8yh3XWyrUaxEpAbNer/9M=", + "requires": { + "esprima": "~1.0.2", + "estraverse": "~1.3.0", + "source-map": ">= 0.1.2" + } + }, + "esprima": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/esprima/-/esprima-1.0.4.tgz", + "integrity": "sha1-n1V+CPw7TSbs6d00+Pv0drYlha0=" + }, + "estraverse": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-1.3.2.tgz", + "integrity": "sha1-N8K4k+8T1yPydth41g2FNRUqbEI=" + } + } + }, + "static-extend": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/static-extend/-/static-extend-0.1.2.tgz", + "integrity": "sha1-YICcOcv/VTNyJv1eC1IPNB8ftcY=", + "optional": true, + "requires": { + "define-property": "^0.2.5", + "object-copy": "^0.1.0" + }, + "dependencies": { + "define-property": { + "version": "0.2.5", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", + "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", + "optional": true, + "requires": { + "is-descriptor": "^0.1.0" + } + } + } + }, + "stream-browserify": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/stream-browserify/-/stream-browserify-2.0.2.tgz", + "integrity": "sha512-nX6hmklHs/gr2FuxYDltq8fJA1GDlxKQCz8O/IM4atRqBH8OORmBNgfvW5gG10GT/qQ9u0CzIvr2X5Pkt6ntqg==", + "optional": true, + "requires": { + "inherits": "~2.0.1", + "readable-stream": "^2.0.2" + } + }, + "stream-http": { + "version": "2.8.3", + "resolved": "https://registry.npmjs.org/stream-http/-/stream-http-2.8.3.tgz", + "integrity": "sha512-+TSkfINHDo4J+ZobQLWiMouQYB+UVYFttRA94FpEzzJ7ZdqcL4uUUQ7WkdkI4DSozGmgBUE/a47L+38PenXhUw==", + "optional": true, + "requires": { + "builtin-status-codes": "^3.0.0", + "inherits": "^2.0.1", + "readable-stream": "^2.3.6", + "to-arraybuffer": "^1.0.0", + "xtend": "^4.0.0" + } + }, + "string-width": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz", + "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==", + "requires": { + "is-fullwidth-code-point": "^2.0.0", + "strip-ansi": "^4.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=" + }, + "strip-ansi": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", + "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", + "requires": { + "ansi-regex": "^3.0.0" + } + } + } + }, + "string_decoder": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "requires": { + "safe-buffer": "~5.1.0" + } + }, + "stringstream": { + "version": "0.0.6", + "resolved": "https://registry.npmjs.org/stringstream/-/stringstream-0.0.6.tgz", + "integrity": "sha512-87GEBAkegbBcweToUrdzf3eLhWNg06FJTebl4BVJz/JgWy8CvEr9dRtX5qWphiynMSQlxxi+QqN0z5T32SLlhA==" + }, + "strip-ansi": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", + "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", + "requires": { + "ansi-regex": "^2.0.0" + } + }, + "strip-bom": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz", + "integrity": "sha1-IzTBjpx1n3vdVv3vfprj1YjmjtM=" + }, + "strip-eof": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/strip-eof/-/strip-eof-1.0.0.tgz", + "integrity": "sha1-u0P/VZim6wXYm1n80SnJgzE2Br8=", + "optional": true + }, + "strip-json-comments": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz", + "integrity": "sha1-PFMZQukIwml8DsNEhYwobHygpgo=" + }, + "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 + }, + "sync-exec": { + "version": "0.6.2", + "resolved": "https://registry.npmjs.org/sync-exec/-/sync-exec-0.6.2.tgz", + "integrity": "sha1-cX0izFPwzh3vVZQ2LzqJouu5EQU=", + "optional": true + }, + "table": { + "version": "3.8.3", + "resolved": "https://registry.npmjs.org/table/-/table-3.8.3.tgz", + "integrity": "sha1-K7xULw/amGGnVdOUf+/Ys/UThV8=", + "dev": true, + "requires": { + "ajv": "^4.7.0", + "ajv-keywords": "^1.0.0", + "chalk": "^1.1.1", + "lodash": "^4.0.0", + "slice-ansi": "0.0.4", + "string-width": "^2.0.0" + }, + "dependencies": { + "ajv": { + "version": "4.11.8", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-4.11.8.tgz", + "integrity": "sha1-gv+wKynmYq5TvcIK8VlHcGc5xTY=", + "dev": true, + "requires": { + "co": "^4.6.0", + "json-stable-stringify": "^1.0.1" + } + } + } + }, + "tapable": { + "version": "0.2.9", + "resolved": "https://registry.npmjs.org/tapable/-/tapable-0.2.9.tgz", + "integrity": "sha512-2wsvQ+4GwBvLPLWsNfLCDYGsW6xb7aeC6utq2Qh0PFwgEy7K7dsma9Jsmb2zSQj7GvYAyUGSntLtsv++GmgL1A==", + "optional": true + }, + "tar-fs": { + "version": "1.16.3", + "resolved": "https://registry.npmjs.org/tar-fs/-/tar-fs-1.16.3.tgz", + "integrity": "sha512-NvCeXpYx7OsmOh8zIOP/ebG55zZmxLE0etfWRbWok+q2Qo8x/vOR/IJT1taADXPe+jsiu9axDb3X4B+iIgNlKw==", + "requires": { + "chownr": "^1.0.1", + "mkdirp": "^0.5.1", + "pump": "^1.0.0", + "tar-stream": "^1.1.2" + }, + "dependencies": { + "pump": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/pump/-/pump-1.0.3.tgz", + "integrity": "sha512-8k0JupWme55+9tCVE+FS5ULT3K6AbgqrGa58lTT49RpyfwwcGedHqaC5LlQNdEAumn/wFsu6aPwkuPMioy8kqw==", + "requires": { + "end-of-stream": "^1.1.0", + "once": "^1.3.1" + } + } + } + }, + "tar-stream": { + "version": "1.6.2", + "resolved": "https://registry.npmjs.org/tar-stream/-/tar-stream-1.6.2.tgz", + "integrity": "sha512-rzS0heiNf8Xn7/mpdSVVSMAWAoy9bfb1WOTYC78Z0UQKeKa/CWS8FOq0lKGNa8DWKAn9gxjCvMLYc5PGXYlK2A==", + "requires": { + "bl": "^1.0.0", + "buffer-alloc": "^1.2.0", + "end-of-stream": "^1.0.0", + "fs-constants": "^1.0.0", + "readable-stream": "^2.3.0", + "to-buffer": "^1.1.1", + "xtend": "^4.0.0" + } + }, + "text-table": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz", + "integrity": "sha1-f17oI66AUgfACvLfSoTsP8+lcLQ=", + "dev": true + }, + "through": { + "version": "2.3.8", + "resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz", + "integrity": "sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU=" + }, + "timers-browserify": { + "version": "2.0.10", + "resolved": "https://registry.npmjs.org/timers-browserify/-/timers-browserify-2.0.10.tgz", + "integrity": "sha512-YvC1SV1XdOUaL6gx5CoGroT3Gu49pK9+TZ38ErPldOWW4j49GI1HKs9DV+KGq/w6y+LZ72W1c8cKz2vzY+qpzg==", + "optional": true, + "requires": { + "setimmediate": "^1.0.4" + } + }, + "tmp": { + "version": "0.0.33", + "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.0.33.tgz", + "integrity": "sha512-jRCJlojKnZ3addtTOjdIqoRuPEKBvNXcGYqzO6zWZX8KfKEpnGY5jfggJQ3EjKuu8D4bJRr0y+cYJFmYbImXGw==", + "requires": { + "os-tmpdir": "~1.0.2" + } + }, + "to-arraybuffer": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/to-arraybuffer/-/to-arraybuffer-1.0.1.tgz", + "integrity": "sha1-fSKbH8xjfkZsoIEYCDanqr/4P0M=", + "optional": true + }, + "to-buffer": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/to-buffer/-/to-buffer-1.1.1.tgz", + "integrity": "sha512-lx9B5iv7msuFYE3dytT+KE5tap+rNYw+K4jVkb9R/asAb+pbBSM17jtunHplhBe6RRJdZx3Pn2Jph24O32mOVg==" + }, + "to-object-path": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/to-object-path/-/to-object-path-0.3.0.tgz", + "integrity": "sha1-KXWIt7Dn4KwI4E5nL4XB9JmeF68=", + "optional": true, + "requires": { + "kind-of": "^3.0.2" + } + }, + "to-regex": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/to-regex/-/to-regex-3.0.2.tgz", + "integrity": "sha512-FWtleNAtZ/Ki2qtqej2CXTOayOH9bHDQF+Q48VpWyDXjbYxA4Yz8iDB31zXOBUlOHHKidDbqGVrTUvQMPmBGBw==", + "optional": true, + "requires": { + "define-property": "^2.0.2", + "extend-shallow": "^3.0.2", + "regex-not": "^1.0.2", + "safe-regex": "^1.1.0" + } + }, + "to-regex-range": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-2.1.1.tgz", + "integrity": "sha1-fIDBe53+vlmeJzZ+DU3VWQFB2zg=", + "optional": true, + "requires": { + "is-number": "^3.0.0", + "repeat-string": "^1.6.1" + } + }, + "tough-cookie": { + "version": "2.4.3", + "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.4.3.tgz", + "integrity": "sha512-Q5srk/4vDM54WJsJio3XNn6K2sCG+CQ8G5Wz6bZhRZoAe/+TxjWB/GlFAnYEbkYVlON9FMk/fE3h2RLpPXo4lQ==", + "requires": { + "psl": "^1.1.24", + "punycode": "^1.4.1" + }, + "dependencies": { + "punycode": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.4.1.tgz", + "integrity": "sha1-wNWmOycYgArY4esPpSachN1BhF4=" + } + } + }, + "ts-node": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-3.3.0.tgz", + "integrity": "sha1-wTxqMCTjC+EYDdUwOPwgkonUv2k=", + "optional": true, + "requires": { + "arrify": "^1.0.0", + "chalk": "^2.0.0", + "diff": "^3.1.0", + "make-error": "^1.1.1", + "minimist": "^1.2.0", + "mkdirp": "^0.5.1", + "source-map-support": "^0.4.0", + "tsconfig": "^6.0.0", + "v8flags": "^3.0.0", + "yn": "^2.0.0" + }, + "dependencies": { + "ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "optional": true, + "requires": { + "color-convert": "^1.9.0" + } + }, + "chalk": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", + "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", + "optional": true, + "requires": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + } + }, + "supports-color": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "optional": true, + "requires": { + "has-flag": "^3.0.0" + } + } + } + }, + "tsconfig": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/tsconfig/-/tsconfig-6.0.0.tgz", + "integrity": "sha1-aw6DdgA9evGGT434+J3QBZ/80DI=", + "optional": true, + "requires": { + "strip-bom": "^3.0.0", + "strip-json-comments": "^2.0.0" + } + }, + "tty-browserify": { + "version": "0.0.0", + "resolved": "https://registry.npmjs.org/tty-browserify/-/tty-browserify-0.0.0.tgz", + "integrity": "sha1-oVe6QC2iTpv5V/mqadUk7tQpAaY=", + "optional": true + }, + "tunnel": { + "version": "0.0.5", + "resolved": "https://registry.npmjs.org/tunnel/-/tunnel-0.0.5.tgz", + "integrity": "sha512-gj5sdqherx4VZKMcBA4vewER7zdK25Td+z1npBqpbDys4eJrLx+SlYjJvq1bDXs2irkuJM5pf8ktaEQVipkrbA==" + }, + "tunnel-agent": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz", + "integrity": "sha1-J6XeoGs2sEoKmWZ3SykIaPD8QP0=", + "requires": { + "safe-buffer": "^5.0.1" + } + }, + "tweetnacl": { + "version": "0.14.5", + "resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-0.14.5.tgz", + "integrity": "sha1-WuaBd/GS1EViadEIr6k/+HQ/T2Q=" + }, + "type-check": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.3.2.tgz", + "integrity": "sha1-WITKtRLPHTVeP7eE8wgEsrUg23I=", + "dev": true, + "requires": { + "prelude-ls": "~1.1.2" + } + }, + "typedarray": { + "version": "0.0.6", + "resolved": "https://registry.npmjs.org/typedarray/-/typedarray-0.0.6.tgz", + "integrity": "sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c=", + "dev": true + }, + "uglify-js": { + "version": "2.8.29", + "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-2.8.29.tgz", + "integrity": "sha1-KcVzMUgFe7Th913zW3qcty5qWd0=", + "optional": true, + "requires": { + "source-map": "~0.5.1", + "uglify-to-browserify": "~1.0.0", + "yargs": "~3.10.0" + }, + "dependencies": { + "source-map": { + "version": "0.5.7", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", + "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=", + "optional": true + }, + "yargs": { + "version": "3.10.0", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-3.10.0.tgz", + "integrity": "sha1-9+572FfdfB0tOMDnTvvWgdFDH9E=", + "optional": true, + "requires": { + "camelcase": "^1.0.2", + "cliui": "^2.1.0", + "decamelize": "^1.0.0", + "window-size": "0.1.0" + } + } + } + }, + "uglify-to-browserify": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/uglify-to-browserify/-/uglify-to-browserify-1.0.2.tgz", + "integrity": "sha1-bgkk1r2mta/jSeOabWMoUKD4grc=", + "optional": true + }, + "uglifyjs-webpack-plugin": { + "version": "0.4.6", + "resolved": "https://registry.npmjs.org/uglifyjs-webpack-plugin/-/uglifyjs-webpack-plugin-0.4.6.tgz", + "integrity": "sha1-uVH0q7a9YX5m9j64kUmOORdj4wk=", + "optional": true, + "requires": { + "source-map": "^0.5.6", + "uglify-js": "^2.8.29", + "webpack-sources": "^1.0.1" + }, + "dependencies": { + "source-map": { + "version": "0.5.7", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", + "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=", + "optional": true + } + } + }, + "underscore": { + "version": "1.9.1", + "resolved": "https://registry.npmjs.org/underscore/-/underscore-1.9.1.tgz", + "integrity": "sha512-5/4etnCkd9c8gwgowi5/om/mYO5ajCaOgdzj/oW+0eQV9WxKBDZw5+ycmKmeaTXjInS/W0BzpGLo2xR2aBwZdg==" + }, + "union-value": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/union-value/-/union-value-1.0.0.tgz", + "integrity": "sha1-XHHDTLW61dzr4+oM0IIHulqhrqQ=", + "optional": true, + "requires": { + "arr-union": "^3.1.0", + "get-value": "^2.0.6", + "is-extendable": "^0.1.1", + "set-value": "^0.4.3" + }, + "dependencies": { + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "optional": true, + "requires": { + "is-extendable": "^0.1.0" + } + }, + "set-value": { + "version": "0.4.3", + "resolved": "https://registry.npmjs.org/set-value/-/set-value-0.4.3.tgz", + "integrity": "sha1-fbCPnT0i3H945Trzw79GZuzfzPE=", + "optional": true, + "requires": { + "extend-shallow": "^2.0.1", + "is-extendable": "^0.1.1", + "is-plain-object": "^2.0.1", + "to-object-path": "^0.3.0" + } + } + } + }, + "universalify": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.1.2.tgz", + "integrity": "sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==", + "optional": true + }, + "unset-value": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/unset-value/-/unset-value-1.0.0.tgz", + "integrity": "sha1-g3aHP30jNRef+x5vw6jtDfyKtVk=", + "optional": true, + "requires": { + "has-value": "^0.3.1", + "isobject": "^3.0.0" + }, + "dependencies": { + "has-value": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/has-value/-/has-value-0.3.1.tgz", + "integrity": "sha1-ex9YutpiyoJ+wKIHgCVlSEWZXh8=", + "optional": true, + "requires": { + "get-value": "^2.0.3", + "has-values": "^0.1.4", + "isobject": "^2.0.0" + }, + "dependencies": { + "isobject": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-2.1.0.tgz", + "integrity": "sha1-8GVWEJaj8dou9GJy+BXIQNh+DIk=", + "optional": true, + "requires": { + "isarray": "1.0.0" + } + } + } + }, + "has-values": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/has-values/-/has-values-0.1.4.tgz", + "integrity": "sha1-bWHeldkd/Km5oCCJrThL/49it3E=", + "optional": true + } + } + }, + "upath": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/upath/-/upath-1.1.2.tgz", + "integrity": "sha512-kXpym8nmDmlCBr7nKdIx8P2jNBa+pBpIUFRnKJ4dr8htyYGJFokkr2ZvERRtUN+9SY+JqXouNgUPtv6JQva/2Q==", + "optional": true + }, + "uri-js": { + "version": "4.2.2", + "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.2.2.tgz", + "integrity": "sha512-KY9Frmirql91X2Qgjry0Wd4Y+YTdrdZheS8TFwvkbLWf/G5KNJDCh6pKL5OZctEW4+0Baa5idK2ZQuELRwPznQ==", + "requires": { + "punycode": "^2.1.0" + } + }, + "urix": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/urix/-/urix-0.1.0.tgz", + "integrity": "sha1-2pN/emLiH+wf0Y1Js1wpNQZ6bHI=", + "optional": true + }, + "url": { + "version": "0.11.0", + "resolved": "https://registry.npmjs.org/url/-/url-0.11.0.tgz", + "integrity": "sha1-ODjpfPxgUh63PFJajlW/3Z4uKPE=", + "optional": true, + "requires": { + "punycode": "1.3.2", + "querystring": "0.2.0" + }, + "dependencies": { + "punycode": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.3.2.tgz", + "integrity": "sha1-llOgNvt8HuQjQvIyXM7v6jkmxI0=", + "optional": true + } + } + }, + "use": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/use/-/use-3.1.1.tgz", + "integrity": "sha512-cwESVXlO3url9YWlFW/TA9cshCEhtu7IKJ/p5soJ/gGpj7vbvFrAY/eIioQ6Dw23KjZhYgiIo8HOs1nQ2vr/oQ==", + "optional": true + }, + "user-home": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/user-home/-/user-home-2.0.0.tgz", + "integrity": "sha1-nHC/2Babwdy/SGBODwS4tJzenp8=", + "dev": true, + "requires": { + "os-homedir": "^1.0.0" + } + }, + "util": { + "version": "0.11.1", + "resolved": "https://registry.npmjs.org/util/-/util-0.11.1.tgz", + "integrity": "sha512-HShAsny+zS2TZfaXxD9tYj4HQGlBezXZMZuM/S5PKLLoZkShZiGk9o5CzukI1LVHZvjdvZ2Sj1aW/Ndn2NB/HQ==", + "optional": true, + "requires": { + "inherits": "2.0.3" + } + }, + "util-deprecate": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", + "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=" + }, + "uuid": { + "version": "3.3.2", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.3.2.tgz", + "integrity": "sha512-yXJmeNaw3DnnKAOKJE51sL/ZaYfWJRl1pK9dr19YFCu0ObS231AB1/LbqTKRAQ5kw8A90rA6fr4riOUpTZvQZA==" + }, + "v8flags": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/v8flags/-/v8flags-3.1.3.tgz", + "integrity": "sha512-amh9CCg3ZxkzQ48Mhcb8iX7xpAfYJgePHxWMQCBWECpOSqJUXgY26ncA61UTV0BkPqfhcy6mzwCIoP4ygxpW8w==", + "optional": true, + "requires": { + "homedir-polyfill": "^1.0.1" + } + }, + "validate-npm-package-license": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/validate-npm-package-license/-/validate-npm-package-license-3.0.4.tgz", + "integrity": "sha512-DpKm2Ui/xN7/HQKCtpZxoRWBhZ9Z0kqtygG8XCgNQ8ZlDnxuQmWhj566j8fN4Cu3/JmbhsDo7fcAJq4s9h27Ew==", + "optional": true, + "requires": { + "spdx-correct": "^3.0.0", + "spdx-expression-parse": "^3.0.0" + } + }, + "verror": { + "version": "1.10.0", + "resolved": "https://registry.npmjs.org/verror/-/verror-1.10.0.tgz", + "integrity": "sha1-OhBcoXBTr1XW4nDB+CiGguGNpAA=", + "requires": { + "assert-plus": "^1.0.0", + "core-util-is": "1.0.2", + "extsprintf": "^1.2.0" + } + }, + "vm-browserify": { + "version": "0.0.4", + "resolved": "https://registry.npmjs.org/vm-browserify/-/vm-browserify-0.0.4.tgz", + "integrity": "sha1-XX6kW7755Kb/ZflUOOCofDV9WnM=", + "optional": true, + "requires": { + "indexof": "0.0.1" + } + }, + "watchpack": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/watchpack/-/watchpack-1.6.0.tgz", + "integrity": "sha512-i6dHe3EyLjMmDlU1/bGQpEw25XSjkJULPuAVKCbNRefQVq48yXKUpwg538F7AZTf9kyr57zj++pQFltUa5H7yA==", + "optional": true, + "requires": { + "chokidar": "^2.0.2", + "graceful-fs": "^4.1.2", + "neo-async": "^2.5.0" + } + }, + "webpack": { + "version": "3.12.0", + "resolved": "https://registry.npmjs.org/webpack/-/webpack-3.12.0.tgz", + "integrity": "sha512-Sw7MdIIOv/nkzPzee4o0EdvCuPmxT98+vVpIvwtcwcF1Q4SDSNp92vwcKc4REe7NItH9f1S4ra9FuQ7yuYZ8bQ==", + "optional": true, + "requires": { + "acorn": "^5.0.0", + "acorn-dynamic-import": "^2.0.0", + "ajv": "^6.1.0", + "ajv-keywords": "^3.1.0", + "async": "^2.1.2", + "enhanced-resolve": "^3.4.0", + "escope": "^3.6.0", + "interpret": "^1.0.0", + "json-loader": "^0.5.4", + "json5": "^0.5.1", + "loader-runner": "^2.3.0", + "loader-utils": "^1.1.0", + "memory-fs": "~0.4.1", + "mkdirp": "~0.5.0", + "node-libs-browser": "^2.0.0", + "source-map": "^0.5.3", + "supports-color": "^4.2.1", + "tapable": "^0.2.7", + "uglifyjs-webpack-plugin": "^0.4.6", + "watchpack": "^1.4.0", + "webpack-sources": "^1.0.1", + "yargs": "^8.0.2" + }, + "dependencies": { + "ajv-keywords": { + "version": "3.4.0", + "resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-3.4.0.tgz", + "integrity": "sha512-aUjdRFISbuFOl0EIZc+9e4FfZp0bDZgAdOOf30bJmw8VM9v84SHyVyxDfbWxpGYbdZD/9XoKxfHVNmxPkhwyGw==", + "optional": true + }, + "has-flag": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-2.0.0.tgz", + "integrity": "sha1-6CB68cx7MNRGzHC3NLXovhj4jVE=", + "optional": true + }, + "source-map": { + "version": "0.5.7", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", + "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=", + "optional": true + }, + "supports-color": { + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-4.5.0.tgz", + "integrity": "sha1-vnoN5ITexcXN34s9WRJQRJEvY1s=", + "optional": true, + "requires": { + "has-flag": "^2.0.0" + } + } + } + }, + "webpack-sources": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/webpack-sources/-/webpack-sources-1.3.0.tgz", + "integrity": "sha512-OiVgSrbGu7NEnEvQJJgdSFPl2qWKkWq5lHMhgiToIiN9w34EBnjYzSYs+VbL5KoYiLNtFFa7BZIKxRED3I32pA==", + "optional": true, + "requires": { + "source-list-map": "^2.0.0", + "source-map": "~0.6.1" + }, + "dependencies": { + "source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "optional": true + } + } + }, + "which": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz", + "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==", + "optional": true, + "requires": { + "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=", + "optional": true + }, + "which-pm-runs": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/which-pm-runs/-/which-pm-runs-1.0.0.tgz", + "integrity": "sha1-Zws6+8VS4LVd9rd4DKdGFfI60cs=" + }, + "wide-align": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/wide-align/-/wide-align-1.1.3.tgz", + "integrity": "sha512-QGkOQc8XL6Bt5PwnsExKBPuMKBxnGxWWW3fU55Xt4feHozMUhdUMaBCk290qpm/wG5u/RSKzwdAC4i51YigihA==", + "requires": { + "string-width": "^1.0.2 || 2" + } + }, + "window-size": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/window-size/-/window-size-0.1.0.tgz", + "integrity": "sha1-VDjNLqk7IC76Ohn+iIeu58lPnJ0=", + "optional": true + }, + "wordwrap": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-1.0.0.tgz", + "integrity": "sha1-J1hIEIkUVqQXHI0CJkQa3pDLyus=", + "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=", + "optional": true, + "requires": { + "string-width": "^1.0.1", + "strip-ansi": "^3.0.1" + }, + "dependencies": { + "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=", + "optional": true, + "requires": { + "number-is-nan": "^1.0.0" + } + }, + "string-width": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz", + "integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=", + "optional": true, + "requires": { + "code-point-at": "^1.0.0", + "is-fullwidth-code-point": "^1.0.0", + "strip-ansi": "^3.0.0" + } + } + } + }, + "wrappy": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", + "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=" + }, + "write": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/write/-/write-0.2.1.tgz", + "integrity": "sha1-X8A4KOJkzqP+kUVUdvejxWbLB1c=", + "dev": true, + "requires": { + "mkdirp": "^0.5.1" + } + }, + "xmldom": { + "version": "0.1.27", + "resolved": "https://registry.npmjs.org/xmldom/-/xmldom-0.1.27.tgz", + "integrity": "sha1-1QH5ezvbQDr4757MIFcxh6rawOk=" + }, + "xpath.js": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/xpath.js/-/xpath.js-1.1.0.tgz", + "integrity": "sha512-jg+qkfS4K8E7965sqaUl8mRngXiKb3WZGfONgE18pr03FUQiuSV6G+Ej4tS55B+rIQSFEIw3phdVAQ4pPqNWfQ==" + }, + "xtend": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.1.tgz", + "integrity": "sha1-pcbVMr5lbiPbgg77lDofBJmNY68=" + }, + "y18n": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/y18n/-/y18n-3.2.1.tgz", + "integrity": "sha1-bRX7qITAhnnA136I53WegR4H+kE=", + "optional": true + }, + "yallist": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-2.1.2.tgz", + "integrity": "sha1-HBH5IY8HYImkfdUS+TxmmaaoHVI=", + "optional": true + }, + "yargs": { + "version": "8.0.2", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-8.0.2.tgz", + "integrity": "sha1-YpmpBVsc78lp/355wdkY3Osiw2A=", + "optional": true, + "requires": { + "camelcase": "^4.1.0", + "cliui": "^3.2.0", + "decamelize": "^1.1.1", + "get-caller-file": "^1.0.1", + "os-locale": "^2.0.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.0.0", + "which-module": "^2.0.0", + "y18n": "^3.2.1", + "yargs-parser": "^7.0.0" + }, + "dependencies": { + "camelcase": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-4.1.0.tgz", + "integrity": "sha1-1UVjW+HjPFQmScaRc+Xeas+uNN0=", + "optional": true + }, + "cliui": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-3.2.0.tgz", + "integrity": "sha1-EgYBU3qRbSmUD5NNo7SNWFo5IT0=", + "optional": true, + "requires": { + "string-width": "^1.0.1", + "strip-ansi": "^3.0.1", + "wrap-ansi": "^2.0.0" + }, + "dependencies": { + "string-width": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz", + "integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=", + "optional": true, + "requires": { + "code-point-at": "^1.0.0", + "is-fullwidth-code-point": "^1.0.0", + "strip-ansi": "^3.0.0" + } + } + } + }, + "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=", + "optional": true, + "requires": { + "number-is-nan": "^1.0.0" + } + } + } + }, + "yargs-parser": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-7.0.0.tgz", + "integrity": "sha1-jQrELxbqVd69MyyvTEA4s+P139k=", + "optional": 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=", + "optional": true + } + } + }, + "yn": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/yn/-/yn-2.0.0.tgz", + "integrity": "sha1-5a2ryKz0CPY4X8dklWhMiOavaJo=", + "optional": true + } + } +} diff --git a/provider/azureProvider.js b/provider/azureProvider.js index 78f90699..863129f1 100644 --- a/provider/azureProvider.js +++ b/provider/azureProvider.js @@ -25,11 +25,11 @@ let existingFunctionApp = false; const deployedFunctionNames = []; class AzureProvider { - static getProviderName () { + static getProviderName() { return config.providerName; } - constructor (serverless) { + constructor(serverless) { this.provider = this; this.serverless = serverless; @@ -40,6 +40,12 @@ class AzureProvider { this.serverless = serverless; this.options = options; + // Overrides function app domains. + // In instances where the function app is deployed in an App Service Environment (ASE) + // the domains will be prefixed with a custom sub domain + config.functionAppDomain = this.serverless.service.provider.functionAppDomain || config.functionAppDomain; + config.scmDomain = this.serverless.service.provider.scmDomain || config.scmDomain; + return new BbPromise((resolve) => { functionAppName = this.serverless.service.service; resourceGroupName = this.serverless.service.provider.resourceGroup || `${functionAppName}-rg`; @@ -49,7 +55,7 @@ class AzureProvider { }); } - getParsedBindings () { + getParsedBindings() { if (!this.parsedBindings) { this.parsedBindings = parseBindings.getBindingsMetaData(this.serverless); } @@ -58,11 +64,13 @@ class AzureProvider { } Login() { - return login({ interactiveLoginHandler: (code, message) => { - // Override the interactive login handler, in order to be - // able to append the Serverless prefix to the displayed message. - this.serverless.cli.log(message); - }}).then((result) => { + return login({ + interactiveLoginHandler: (code, message) => { + // Override the interactive login handler, in order to be + // able to append the Serverless prefix to the displayed message. + this.serverless.cli.log(message); + } + }).then((result) => { principalCredentials = result.credentials; subscriptionId = result.subscriptionId; @@ -73,7 +81,7 @@ class AzureProvider { }); } - CreateResourceGroup () { + CreateResourceGroup() { const groupParameters = { location: this.serverless.service.provider.location, tags: { sampletag: 'sampleValue' } @@ -92,7 +100,7 @@ class AzureProvider { }); } - CreateFunctionApp () { + CreateFunctionApp() { this.serverless.cli.log(`Creating function app: ${functionAppName}`); const resourceClient = new resourceManagement.ResourceManagementClient(principalCredentials, subscriptionId); let parameters = { functionAppName: { value: functionAppName } }; @@ -168,7 +176,7 @@ class AzureProvider { }); } - DeleteDeployment () { + DeleteDeployment() { this.serverless.cli.log(`Deleting deployment: ${deploymentName}`); const resourceClient = new resourceManagement.ResourceManagementClient(principalCredentials, subscriptionId); resourceClient.addUserAgentInfo(`${pkg.name}/${pkg.version}`); @@ -182,7 +190,7 @@ class AzureProvider { }); } - DeleteResourceGroup () { + DeleteResourceGroup() { this.serverless.cli.log(`Deleting resource group: ${resourceGroupName}`); const resourceClient = new resourceManagement.ResourceManagementClient(principalCredentials, subscriptionId); resourceClient.addUserAgentInfo(`${pkg.name}/${pkg.version}`); @@ -198,7 +206,7 @@ class AzureProvider { }); } - getAdminKey () { + getAdminKey() { const options = { url: `https://${functionAppName}${config.scmDomain}${config.masterKeyApiPath}`, json: true, @@ -219,7 +227,7 @@ class AzureProvider { }); } - pingHostStatus (functionName) { + pingHostStatus(functionName) { const requestUrl = `https://${functionAppName}${config.functionAppDomain}/admin/functions/${functionName}/status`; const options = { host: functionAppName + config.functionAppDomain, @@ -247,7 +255,7 @@ class AzureProvider { }); } - isExistingFunctionApp () { + isExistingFunctionApp() { const host = functionAppName + config.scmDomain; return new BbPromise((resolve, reject) => { @@ -266,7 +274,7 @@ class AzureProvider { }); } - getDeployedFunctionsNames () { + getDeployedFunctionsNames() { const requestUrl = `https://${functionAppName}${config.scmDomain}${config.functionsApiPath}`; const options = { host: functionAppName + config.scmDomain, @@ -305,7 +313,7 @@ class AzureProvider { }); } - getLogsStream (functionName) { + getLogsStream(functionName) { const logOptions = { url: `https://${functionAppName}${config.scmDomain}${config.logStreamApiPath}${functionName}`, headers: { @@ -323,7 +331,7 @@ class AzureProvider { .pipe(process.stdout); } - getInvocationId (functionName) { + getInvocationId(functionName) { const options = { url: `https://${functionAppName}${config.scmDomain}${config.logInvocationsApiPath + functionAppName}-${functionName}/invocations?limit=5`, method: 'GET', @@ -345,7 +353,7 @@ class AzureProvider { }); } - getLogsForInvocationId () { + getLogsForInvocationId() { this.serverless.cli.log(`Logs for InvocationId: ${invocationId}`); const options = { url: `https://${functionAppName}${config.scmDomain}${config.logOutputApiPath}${invocationId}`, @@ -366,7 +374,7 @@ class AzureProvider { }); } - invoke (functionName, eventType, eventData) { + invoke(functionName, eventType, eventData) { if (eventType === 'http') { let queryString = ''; @@ -377,13 +385,13 @@ class AzureProvider { } catch (error) { return BbPromise.reject('The specified input data isn\'t a valid JSON string. ' + - 'Please correct it and try invoking the function again.'); + 'Please correct it and try invoking the function again.'); } } queryString = Object.keys(eventData) - .map((key) => `${key}=${eventData[key]}`) - .join('&'); + .map((key) => `${key}=${eventData[key]}`) + .join('&'); } return new BbPromise((resolve, reject) => { @@ -408,7 +416,7 @@ class AzureProvider { }); } - const requestUrl = `https://${functionAppName}${config.functionsAdminApiPath}${functionName}`; + const requestUrl = `https://${functionAppName}${config.functionAppDomain}${config.functionsAdminApiPath}${functionName}`; const options = { host: config.functionAppDomain, @@ -433,7 +441,7 @@ class AzureProvider { }); } - syncTriggers () { + syncTriggers() { const requestUrl = [ `https://management.azure.com/subscriptions/${subscriptionId}`, `/resourceGroups/${resourceGroupName}/providers/Microsoft.Web/sites/`, @@ -463,7 +471,7 @@ class AzureProvider { } - runKuduCommand (command) { + runKuduCommand(command) { this.serverless.cli.log(`Running Kudu command ${command}...`); const requestUrl = `https://${functionAppName}${config.scmDomain}${config.scmCommandApiPath}`; let postBody = { @@ -500,7 +508,7 @@ class AzureProvider { }); } - cleanUpFunctionsBeforeDeploy (serverlessFunctions) { + cleanUpFunctionsBeforeDeploy(serverlessFunctions) { const deleteFunctionPromises = []; deployedFunctionNames.forEach((functionName) => { @@ -514,7 +522,7 @@ class AzureProvider { } deleteFunction(functionName) { - const requestUrl = `https://${functionAppName}${config.scmVfsPath}${functionName}/?recursive=true`; + const requestUrl = `https://${functionAppName}${config.scmDomain}${config.scmVfsPath}${functionName}/?recursive=true`; const options = { host: functionAppName + config.scmDomain, method: 'delete', @@ -537,11 +545,11 @@ class AzureProvider { }); } - uploadPackageJson () { + uploadPackageJson() { const packageJsonFilePath = path.join(this.serverless.config.servicePath, 'package.json'); this.serverless.cli.log('Uploading package.json...'); - const requestUrl = `https://${functionAppName}${config.scmVfsPath}package.json`; + const requestUrl = `https://${functionAppName}${config.scmDomain}${config.scmVfsPath}package.json`; const options = { host: functionAppName + config.scmDomain, method: 'put', @@ -556,13 +564,13 @@ class AzureProvider { return new BbPromise((resolve, reject) => { if (fs.existsSync(packageJsonFilePath)) { fs.createReadStream(packageJsonFilePath) - .pipe(request.put(options, (err) => { - if (err) { - reject(err); - } else { - resolve('Package.json file uploaded'); - } - })); + .pipe(request.put(options, (err) => { + if (err) { + reject(err); + } else { + resolve('Package.json file uploaded'); + } + })); } else { resolve('Package.json file does not exist'); @@ -575,12 +583,12 @@ class AzureProvider { const functionJSON = params.functionsJson; functionJSON.entryPoint = entryPoint; functionJSON.scriptFile = filePath; - fs.writeFileSync(path.join(this.serverless.config.servicePath, functionName+'-function.json'), JSON.stringify(functionJSON, null, 4)); + fs.writeFileSync(path.join(this.serverless.config.servicePath, functionName + '-function.json'), JSON.stringify(functionJSON, null, 4)); resolve(); }); } - uploadFunction (functionName) { + uploadFunction(functionName) { return new BbPromise((resolve, reject) => { this.serverless.cli.log(`Uploading function: ${functionName}`); @@ -594,7 +602,7 @@ class AzureProvider { reject('Could not find zip package'); } - const requestUrl = `https://${functionAppName}${config.scmZipApiPath}/${functionName}/`; + const requestUrl = `https://${functionAppName}${config.scmDomain}${config.scmZipApiPath}/${functionName}/`; const options = { url: requestUrl, headers: { @@ -613,6 +621,20 @@ class AzureProvider { })); }); } + + deployApi() { + return new BbPromise((resolve) => { + this.serverless.cli.log('Deploying APIM API'); + setTimeout(resolve, 1000); + }); + } + + deployApiOperation(functionName) { + return new BbPromise((resolve) => { + this.serverless.cli.log(`Deploying APIM operation for function: ${functionName}`); + setTimeout(resolve, 1000); + }); + } } module.exports = AzureProvider; From 0d6bbc691ecffca3253f7702f4a4e4e9fef122d4 Mon Sep 17 00:00:00 2001 From: Wallace Breza Date: Wed, 15 May 2019 13:12:56 -0700 Subject: [PATCH 02/19] WIP: Deploys the API and operations --- .eslintrc.json | 13 +- apim/azureApim.js | 36 - apim/lib/deployApi.js | 10 - apim/lib/deployOperation.js | 10 - apim/lib/deployOperations.js | 15 - babel.config.js | 13 + index.js | 39 - package-lock.json | 1305 +++++++++++++++++ package.json | 12 +- src/apim/apimPlugin.js | 24 + {apim => src/apim}/azureApimFunction.js | 2 +- src/apim/lib/deployApi.js | 36 + src/apim/lib/deployFunctions.js | 13 + src/apim/lib/deployOperation.js | 47 + config.js => src/config.js | 0 {deploy => src/deploy}/azureDeploy.js | 0 {deploy => src/deploy}/azureDeployFunction.js | 0 .../lib/CreateResourceGroupAndFunctionApp.js | 0 .../deploy}/lib/cleanUpFunctions.js | 0 {deploy => src/deploy}/lib/uploadFunction.js | 0 {deploy => src/deploy}/lib/uploadFunctions.js | 0 src/index.js | 40 + {invoke => src/invoke}/azureInvoke.js | 0 {invoke => src/invoke}/lib/invokeFunction.js | 0 src/login/loginPlugin.js | 29 + {logs => src/logs}/azureLogs.js | 0 {logs => src/logs}/lib/retrieveLogs.js | 0 {package => src/package}/azurePackage.js | 0 .../package}/azurePackageFunction.js | 0 {package => src/package}/lib/compileEvents.js | 0 .../package}/lib/compileEventsForFunction.js | 0 .../package}/lib/webpackFunctionJson.js | 0 .../provider}/armTemplates/azuredeploy.json | 0 .../armTemplates/azuredeployWithGit.json | 0 {provider => src/provider}/azureProvider.js | 33 +- {remove => src/remove}/azureRemove.js | 0 .../remove}/lib/deleteResourceGroup.js | 0 {shared => src/shared}/bindings.json | 0 {shared => src/shared}/getAdminKey.js | 0 {shared => src/shared}/loginToAzure.js | 0 {shared => src/shared}/parseBindings.js | 7 +- {shared => src/shared}/utils.js | 0 42 files changed, 1546 insertions(+), 138 deletions(-) delete mode 100644 apim/azureApim.js delete mode 100644 apim/lib/deployApi.js delete mode 100644 apim/lib/deployOperation.js delete mode 100644 apim/lib/deployOperations.js create mode 100644 babel.config.js delete mode 100644 index.js create mode 100644 src/apim/apimPlugin.js rename {apim => src/apim}/azureApimFunction.js (93%) create mode 100644 src/apim/lib/deployApi.js create mode 100644 src/apim/lib/deployFunctions.js create mode 100644 src/apim/lib/deployOperation.js rename config.js => src/config.js (100%) rename {deploy => src/deploy}/azureDeploy.js (100%) rename {deploy => src/deploy}/azureDeployFunction.js (100%) rename {deploy => src/deploy}/lib/CreateResourceGroupAndFunctionApp.js (100%) rename {deploy => src/deploy}/lib/cleanUpFunctions.js (100%) rename {deploy => src/deploy}/lib/uploadFunction.js (100%) rename {deploy => src/deploy}/lib/uploadFunctions.js (100%) create mode 100644 src/index.js rename {invoke => src/invoke}/azureInvoke.js (100%) rename {invoke => src/invoke}/lib/invokeFunction.js (100%) create mode 100644 src/login/loginPlugin.js rename {logs => src/logs}/azureLogs.js (100%) rename {logs => src/logs}/lib/retrieveLogs.js (100%) rename {package => src/package}/azurePackage.js (100%) rename {package => src/package}/azurePackageFunction.js (100%) rename {package => src/package}/lib/compileEvents.js (100%) rename {package => src/package}/lib/compileEventsForFunction.js (100%) rename {package => src/package}/lib/webpackFunctionJson.js (100%) rename {provider => src/provider}/armTemplates/azuredeploy.json (100%) rename {provider => src/provider}/armTemplates/azuredeployWithGit.json (100%) rename {provider => src/provider}/azureProvider.js (96%) rename {remove => src/remove}/azureRemove.js (100%) rename {remove => src/remove}/lib/deleteResourceGroup.js (100%) rename {shared => src/shared}/bindings.json (100%) rename {shared => src/shared}/getAdminKey.js (100%) rename {shared => src/shared}/loginToAzure.js (100%) rename {shared => src/shared}/parseBindings.js (90%) rename {shared => src/shared}/utils.js (100%) diff --git a/.eslintrc.json b/.eslintrc.json index 3e3bc8a0..6cfd9309 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -18,5 +18,16 @@ "always" ], "no-console": 0 + }, + "parserOptions": { + "ecmaVersion": 8, + "sourceType": "module", + "ecmaFeatures": { + "arrowFunctions": true, + "classes": true, + "impliedStrict": true, + "modules": true, + "spread": true + } } -} +} \ No newline at end of file diff --git a/apim/azureApim.js b/apim/azureApim.js deleted file mode 100644 index d4ef5a5f..00000000 --- a/apim/azureApim.js +++ /dev/null @@ -1,36 +0,0 @@ -'use strict'; - -const BbPromise = require('bluebird'); -const deployApi = require('./lib/deployApi'); -const deployOperations = require('./lib/deployOperations'); -const loginToAzure = require('../shared/loginToAzure'); - -class AzureApim { - constructor(serverless, options) { - this.serverless = serverless; - this.options = options; - this.provider = this.serverless.getProvider('azure'); - - this.serverless.cli.log('Initializing APIM plugin'); - - Object.assign( - this, - loginToAzure, - deployApi, - deployOperations - ); - - this.hooks = { - 'deploy:deploy': () => BbPromise.bind(this) - .then(this.provider.initialize(this.serverless, this.options)) - .then(() => this.serverless.cli.log('Starting APIM deployment')) - .then(() => this.serverless.cli.log(JSON.stringify(this.options))) - .then(this.loginToAzure) - .then(this.deployApi) - .then(this.deployOperations) - .then(() => this.serverless.cli.log('Successfully deployed API Management API & Operations')) - }; - } -} - -module.exports = AzureApim; \ No newline at end of file diff --git a/apim/lib/deployApi.js b/apim/lib/deployApi.js deleted file mode 100644 index 92141661..00000000 --- a/apim/lib/deployApi.js +++ /dev/null @@ -1,10 +0,0 @@ -'use strict'; - -module.exports = { - deployApi() { - this.serverless.cli.log('Starting to deploy API'); - this.serverless.cli.log(JSON.stringify(this.options)); - - return this.provider.deployApi(this.options); - } -}; diff --git a/apim/lib/deployOperation.js b/apim/lib/deployOperation.js deleted file mode 100644 index 5ee1abca..00000000 --- a/apim/lib/deployOperation.js +++ /dev/null @@ -1,10 +0,0 @@ -'use strict'; - -module.exports = { - deployOperation() { - this.serverless.cli.log('Starting to deploy Operation'); - this.serverless.cli.log(JSON.stringify(this.options)); - - return this.provider.deployApiOperation(this.options.function); - } -}; \ No newline at end of file diff --git a/apim/lib/deployOperations.js b/apim/lib/deployOperations.js deleted file mode 100644 index 1b894e73..00000000 --- a/apim/lib/deployOperations.js +++ /dev/null @@ -1,15 +0,0 @@ -'use strict'; - -const BbPromise = require('bluebird'); - -module.exports = { - deployOperations() { - this.serverless.cli.log('Starting to deploy Operations'); - - const deployApiTasks = this.serverless.service.getAllFunctions().map((functionName) => { - return this.provider.deployApiOperation(functionName); - }); - - return BbPromise.all(deployApiTasks); - } -}; diff --git a/babel.config.js b/babel.config.js new file mode 100644 index 00000000..0b6110ef --- /dev/null +++ b/babel.config.js @@ -0,0 +1,13 @@ +const presets = [ + [ + '@babel/env', + { + targets: { + node: '8.0.0' + }, + useBuiltIns: 'usage', + }, + ], +]; + +module.exports = { presets }; \ No newline at end of file diff --git a/index.js b/index.js deleted file mode 100644 index 5763c8e7..00000000 --- a/index.js +++ /dev/null @@ -1,39 +0,0 @@ -'use strict'; - -/* -NOTE: this plugin is used to add all the differnet provider related plugins at once. -This way only one plugin needs to be added to the service in order to get access to the -whole provider implementation. -*/ - -const AzureDeploy = require('./deploy/azureDeploy'); -const AzureDeployFunction = require('./deploy/azureDeployFunction'); -const AzureProvider = require('./provider/azureProvider'); -const AzureInvoke = require('./invoke/azureInvoke'); -const AzureLogs = require('./logs/azureLogs'); -const AzureRemove = require('./remove/azureRemove'); -const AzurePackage = require('./package/azurePackage'); -const AzurePackageFunction = require('./package/azurePackageFunction'); -const AzureApim = require('./apim/azureApim'); -const AzureApimFunction = require('./apim/azureApimFunction'); - -class AzureIndex { - constructor(serverless, options) { - this.serverless = serverless; - this.options = options; - - this.serverless.setProvider(AzureProvider.getProviderName(), new AzureProvider(serverless)); - - //this.serverless.pluginManager.addPlugin(AzurePackage); - //this.serverless.pluginManager.addPlugin(AzurePackageFunction); - //this.serverless.pluginManager.addPlugin(AzureDeploy); - //this.serverless.pluginManager.addPlugin(AzureDeployFunction); - this.serverless.pluginManager.addPlugin(AzureApim); - this.serverless.pluginManager.addPlugin(AzureApimFunction); - //this.serverless.pluginManager.addPlugin(AzureInvoke); - //this.serverless.pluginManager.addPlugin(AzureLogs); - //this.serverless.pluginManager.addPlugin(AzureRemove); - } -} - -module.exports = AzureIndex; diff --git a/package-lock.json b/package-lock.json index 9c992f1c..b094aa55 100644 --- a/package-lock.json +++ b/package-lock.json @@ -4,11 +4,977 @@ "lockfileVersion": 1, "requires": true, "dependencies": { + "@azure/arm-apimanagement": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/@azure/arm-apimanagement/-/arm-apimanagement-5.1.0.tgz", + "integrity": "sha512-/HjyxUPeo7Xa6nVvcsjrR8UjkGXCfVYxjxBV1P62prpzeomTh7JxlGpWY1wXSLYrbLR2ogvV9YjQMLgBocTglA==", + "requires": { + "@azure/ms-rest-azure-js": "^1.3.2", + "@azure/ms-rest-js": "^1.8.1", + "tslib": "^1.9.3" + } + }, + "@azure/ms-rest-azure-env": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/@azure/ms-rest-azure-env/-/ms-rest-azure-env-1.1.2.tgz", + "integrity": "sha512-l7z0DPCi2Hp88w12JhDTtx5d0Y3+vhfE7JKJb9O7sEz71Cwp053N8piTtTnnk/tUor9oZHgEKi/p3tQQmLPjvA==" + }, + "@azure/ms-rest-azure-js": { + "version": "1.3.4", + "resolved": "https://registry.npmjs.org/@azure/ms-rest-azure-js/-/ms-rest-azure-js-1.3.4.tgz", + "integrity": "sha512-aRYOK1xHR7nRfFVKXinM8DXtprsRpBkivKcUNKbJYzYS+Px+95uI2eYBheO8oe4yYhDZ0htN8oRBua+DuOpYyg==", + "requires": { + "@azure/ms-rest-js": "^1.8.1", + "tslib": "^1.9.2" + } + }, + "@azure/ms-rest-js": { + "version": "1.8.6", + "resolved": "https://registry.npmjs.org/@azure/ms-rest-js/-/ms-rest-js-1.8.6.tgz", + "integrity": "sha512-PjAshR9q56XSNKHMljbOzkbR5dFaKlkG1fVkTY9+1eJ/31lF7RnslAqj909hRguLzDpkHR0VgW65lhCMAq9Juw==", + "requires": { + "@types/tunnel": "0.0.0", + "axios": "^0.18.0", + "form-data": "^2.3.2", + "tough-cookie": "^2.4.3", + "tslib": "^1.9.2", + "tunnel": "0.0.6", + "uuid": "^3.2.1", + "xml2js": "^0.4.19" + }, + "dependencies": { + "tunnel": { + "version": "0.0.6", + "resolved": "https://registry.npmjs.org/tunnel/-/tunnel-0.0.6.tgz", + "integrity": "sha512-1h/Lnq9yajKY2PEbBadPXj3VxsDDu844OnaAo52UVmIzIvwwtBPIuNvkjuzBlTWpfJyUbG3ez0KSBibQkj4ojg==" + } + } + }, + "@azure/ms-rest-nodeauth": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/@azure/ms-rest-nodeauth/-/ms-rest-nodeauth-1.0.1.tgz", + "integrity": "sha512-ga/E4lb/jElK3EQrWg/0lb2K+sC3AGyqkVjE0ofb9XqxE9CoAOy/i66ZRfOs8hk57oA27TPlsw7R8sISslqzKw==", + "requires": { + "@azure/ms-rest-azure-env": "^1.1.2", + "@azure/ms-rest-js": "^1.8.2", + "adal-node": "^0.1.28" + } + }, + "@babel/cli": { + "version": "7.4.4", + "resolved": "https://registry.npmjs.org/@babel/cli/-/cli-7.4.4.tgz", + "integrity": "sha512-XGr5YjQSjgTa6OzQZY57FAJsdeVSAKR/u/KA5exWIz66IKtv/zXtHy+fIZcMry/EgYegwuHE7vzGnrFhjdIAsQ==", + "dev": true, + "requires": { + "chokidar": "^2.0.4", + "commander": "^2.8.1", + "convert-source-map": "^1.1.0", + "fs-readdir-recursive": "^1.1.0", + "glob": "^7.0.0", + "lodash": "^4.17.11", + "mkdirp": "^0.5.1", + "output-file-sync": "^2.0.0", + "slash": "^2.0.0", + "source-map": "^0.5.0" + }, + "dependencies": { + "source-map": { + "version": "0.5.7", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", + "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=", + "dev": true + } + } + }, + "@babel/code-frame": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.0.0.tgz", + "integrity": "sha512-OfC2uemaknXr87bdLUkWog7nYuliM9Ij5HUcajsVcMCpQrcLmtxRbVFTIqmcSkSeYRBFBRxs2FiUqFJDLdiebA==", + "dev": true, + "requires": { + "@babel/highlight": "^7.0.0" + } + }, + "@babel/core": { + "version": "7.4.4", + "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.4.4.tgz", + "integrity": "sha512-lQgGX3FPRgbz2SKmhMtYgJvVzGZrmjaF4apZ2bLwofAKiSjxU0drPh4S/VasyYXwaTs+A1gvQ45BN8SQJzHsQQ==", + "dev": true, + "requires": { + "@babel/code-frame": "^7.0.0", + "@babel/generator": "^7.4.4", + "@babel/helpers": "^7.4.4", + "@babel/parser": "^7.4.4", + "@babel/template": "^7.4.4", + "@babel/traverse": "^7.4.4", + "@babel/types": "^7.4.4", + "convert-source-map": "^1.1.0", + "debug": "^4.1.0", + "json5": "^2.1.0", + "lodash": "^4.17.11", + "resolve": "^1.3.2", + "semver": "^5.4.1", + "source-map": "^0.5.0" + }, + "dependencies": { + "debug": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz", + "integrity": "sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==", + "dev": true, + "requires": { + "ms": "^2.1.1" + } + }, + "json5": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/json5/-/json5-2.1.0.tgz", + "integrity": "sha512-8Mh9h6xViijj36g7Dxi+Y4S6hNGV96vcJZr/SrlHh1LR/pEn/8j/+qIBbs44YKl69Lrfctp4QD+AdWLTMqEZAQ==", + "dev": true, + "requires": { + "minimist": "^1.2.0" + } + }, + "ms": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.1.tgz", + "integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg==", + "dev": true + }, + "source-map": { + "version": "0.5.7", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", + "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=", + "dev": true + } + } + }, + "@babel/generator": { + "version": "7.4.4", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.4.4.tgz", + "integrity": "sha512-53UOLK6TVNqKxf7RUh8NE851EHRxOOeVXKbK2bivdb+iziMyk03Sr4eaE9OELCbyZAAafAKPDwF2TPUES5QbxQ==", + "dev": true, + "requires": { + "@babel/types": "^7.4.4", + "jsesc": "^2.5.1", + "lodash": "^4.17.11", + "source-map": "^0.5.0", + "trim-right": "^1.0.1" + }, + "dependencies": { + "source-map": { + "version": "0.5.7", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", + "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=", + "dev": true + } + } + }, + "@babel/helper-annotate-as-pure": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/@babel/helper-annotate-as-pure/-/helper-annotate-as-pure-7.0.0.tgz", + "integrity": "sha512-3UYcJUj9kvSLbLbUIfQTqzcy5VX7GRZ/CCDrnOaZorFFM01aXp1+GJwuFGV4NDDoAS+mOUyHcO6UD/RfqOks3Q==", + "dev": true, + "requires": { + "@babel/types": "^7.0.0" + } + }, + "@babel/helper-builder-binary-assignment-operator-visitor": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/@babel/helper-builder-binary-assignment-operator-visitor/-/helper-builder-binary-assignment-operator-visitor-7.1.0.tgz", + "integrity": "sha512-qNSR4jrmJ8M1VMM9tibvyRAHXQs2PmaksQF7c1CGJNipfe3D8p+wgNwgso/P2A2r2mdgBWAXljNWR0QRZAMW8w==", + "dev": true, + "requires": { + "@babel/helper-explode-assignable-expression": "^7.1.0", + "@babel/types": "^7.0.0" + } + }, + "@babel/helper-call-delegate": { + "version": "7.4.4", + "resolved": "https://registry.npmjs.org/@babel/helper-call-delegate/-/helper-call-delegate-7.4.4.tgz", + "integrity": "sha512-l79boDFJ8S1c5hvQvG+rc+wHw6IuH7YldmRKsYtpbawsxURu/paVy57FZMomGK22/JckepaikOkY0MoAmdyOlQ==", + "dev": true, + "requires": { + "@babel/helper-hoist-variables": "^7.4.4", + "@babel/traverse": "^7.4.4", + "@babel/types": "^7.4.4" + } + }, + "@babel/helper-define-map": { + "version": "7.4.4", + "resolved": "https://registry.npmjs.org/@babel/helper-define-map/-/helper-define-map-7.4.4.tgz", + "integrity": "sha512-IX3Ln8gLhZpSuqHJSnTNBWGDE9kdkTEWl21A/K7PQ00tseBwbqCHTvNLHSBd9M0R5rER4h5Rsvj9vw0R5SieBg==", + "dev": true, + "requires": { + "@babel/helper-function-name": "^7.1.0", + "@babel/types": "^7.4.4", + "lodash": "^4.17.11" + } + }, + "@babel/helper-explode-assignable-expression": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/@babel/helper-explode-assignable-expression/-/helper-explode-assignable-expression-7.1.0.tgz", + "integrity": "sha512-NRQpfHrJ1msCHtKjbzs9YcMmJZOg6mQMmGRB+hbamEdG5PNpaSm95275VD92DvJKuyl0s2sFiDmMZ+EnnvufqA==", + "dev": true, + "requires": { + "@babel/traverse": "^7.1.0", + "@babel/types": "^7.0.0" + } + }, + "@babel/helper-function-name": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.1.0.tgz", + "integrity": "sha512-A95XEoCpb3TO+KZzJ4S/5uW5fNe26DjBGqf1o9ucyLyCmi1dXq/B3c8iaWTfBk3VvetUxl16e8tIrd5teOCfGw==", + "dev": true, + "requires": { + "@babel/helper-get-function-arity": "^7.0.0", + "@babel/template": "^7.1.0", + "@babel/types": "^7.0.0" + } + }, + "@babel/helper-get-function-arity": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/@babel/helper-get-function-arity/-/helper-get-function-arity-7.0.0.tgz", + "integrity": "sha512-r2DbJeg4svYvt3HOS74U4eWKsUAMRH01Z1ds1zx8KNTPtpTL5JAsdFv8BNyOpVqdFhHkkRDIg5B4AsxmkjAlmQ==", + "dev": true, + "requires": { + "@babel/types": "^7.0.0" + } + }, + "@babel/helper-hoist-variables": { + "version": "7.4.4", + "resolved": "https://registry.npmjs.org/@babel/helper-hoist-variables/-/helper-hoist-variables-7.4.4.tgz", + "integrity": "sha512-VYk2/H/BnYbZDDg39hr3t2kKyifAm1W6zHRfhx8jGjIHpQEBv9dry7oQ2f3+J703TLu69nYdxsovl0XYfcnK4w==", + "dev": true, + "requires": { + "@babel/types": "^7.4.4" + } + }, + "@babel/helper-member-expression-to-functions": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.0.0.tgz", + "integrity": "sha512-avo+lm/QmZlv27Zsi0xEor2fKcqWG56D5ae9dzklpIaY7cQMK5N8VSpaNVPPagiqmy7LrEjK1IWdGMOqPu5csg==", + "dev": true, + "requires": { + "@babel/types": "^7.0.0" + } + }, + "@babel/helper-module-imports": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.0.0.tgz", + "integrity": "sha512-aP/hlLq01DWNEiDg4Jn23i+CXxW/owM4WpDLFUbpjxe4NS3BhLVZQ5i7E0ZrxuQ/vwekIeciyamgB1UIYxxM6A==", + "dev": true, + "requires": { + "@babel/types": "^7.0.0" + } + }, + "@babel/helper-module-transforms": { + "version": "7.4.4", + "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.4.4.tgz", + "integrity": "sha512-3Z1yp8TVQf+B4ynN7WoHPKS8EkdTbgAEy0nU0rs/1Kw4pDgmvYH3rz3aI11KgxKCba2cn7N+tqzV1mY2HMN96w==", + "dev": true, + "requires": { + "@babel/helper-module-imports": "^7.0.0", + "@babel/helper-simple-access": "^7.1.0", + "@babel/helper-split-export-declaration": "^7.4.4", + "@babel/template": "^7.4.4", + "@babel/types": "^7.4.4", + "lodash": "^4.17.11" + } + }, + "@babel/helper-optimise-call-expression": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/@babel/helper-optimise-call-expression/-/helper-optimise-call-expression-7.0.0.tgz", + "integrity": "sha512-u8nd9NQePYNQV8iPWu/pLLYBqZBa4ZaY1YWRFMuxrid94wKI1QNt67NEZ7GAe5Kc/0LLScbim05xZFWkAdrj9g==", + "dev": true, + "requires": { + "@babel/types": "^7.0.0" + } + }, + "@babel/helper-plugin-utils": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.0.0.tgz", + "integrity": "sha512-CYAOUCARwExnEixLdB6sDm2dIJ/YgEAKDM1MOeMeZu9Ld/bDgVo8aiWrXwcY7OBh+1Ea2uUcVRcxKk0GJvW7QA==", + "dev": true + }, + "@babel/helper-regex": { + "version": "7.4.4", + "resolved": "https://registry.npmjs.org/@babel/helper-regex/-/helper-regex-7.4.4.tgz", + "integrity": "sha512-Y5nuB/kESmR3tKjU8Nkn1wMGEx1tjJX076HBMeL3XLQCu6vA/YRzuTW0bbb+qRnXvQGn+d6Rx953yffl8vEy7Q==", + "dev": true, + "requires": { + "lodash": "^4.17.11" + } + }, + "@babel/helper-remap-async-to-generator": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/@babel/helper-remap-async-to-generator/-/helper-remap-async-to-generator-7.1.0.tgz", + "integrity": "sha512-3fOK0L+Fdlg8S5al8u/hWE6vhufGSn0bN09xm2LXMy//REAF8kDCrYoOBKYmA8m5Nom+sV9LyLCwrFynA8/slg==", + "dev": true, + "requires": { + "@babel/helper-annotate-as-pure": "^7.0.0", + "@babel/helper-wrap-function": "^7.1.0", + "@babel/template": "^7.1.0", + "@babel/traverse": "^7.1.0", + "@babel/types": "^7.0.0" + } + }, + "@babel/helper-replace-supers": { + "version": "7.4.4", + "resolved": "https://registry.npmjs.org/@babel/helper-replace-supers/-/helper-replace-supers-7.4.4.tgz", + "integrity": "sha512-04xGEnd+s01nY1l15EuMS1rfKktNF+1CkKmHoErDppjAAZL+IUBZpzT748x262HF7fibaQPhbvWUl5HeSt1EXg==", + "dev": true, + "requires": { + "@babel/helper-member-expression-to-functions": "^7.0.0", + "@babel/helper-optimise-call-expression": "^7.0.0", + "@babel/traverse": "^7.4.4", + "@babel/types": "^7.4.4" + } + }, + "@babel/helper-simple-access": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/@babel/helper-simple-access/-/helper-simple-access-7.1.0.tgz", + "integrity": "sha512-Vk+78hNjRbsiu49zAPALxTb+JUQCz1aolpd8osOF16BGnLtseD21nbHgLPGUwrXEurZgiCOUmvs3ExTu4F5x6w==", + "dev": true, + "requires": { + "@babel/template": "^7.1.0", + "@babel/types": "^7.0.0" + } + }, + "@babel/helper-split-export-declaration": { + "version": "7.4.4", + "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.4.4.tgz", + "integrity": "sha512-Ro/XkzLf3JFITkW6b+hNxzZ1n5OQ80NvIUdmHspih1XAhtN3vPTuUFT4eQnela+2MaZ5ulH+iyP513KJrxbN7Q==", + "dev": true, + "requires": { + "@babel/types": "^7.4.4" + } + }, + "@babel/helper-wrap-function": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/@babel/helper-wrap-function/-/helper-wrap-function-7.2.0.tgz", + "integrity": "sha512-o9fP1BZLLSrYlxYEYyl2aS+Flun5gtjTIG8iln+XuEzQTs0PLagAGSXUcqruJwD5fM48jzIEggCKpIfWTcR7pQ==", + "dev": true, + "requires": { + "@babel/helper-function-name": "^7.1.0", + "@babel/template": "^7.1.0", + "@babel/traverse": "^7.1.0", + "@babel/types": "^7.2.0" + } + }, + "@babel/helpers": { + "version": "7.4.4", + "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.4.4.tgz", + "integrity": "sha512-igczbR/0SeuPR8RFfC7tGrbdTbFL3QTvH6D+Z6zNxnTe//GyqmtHmDkzrqDmyZ3eSwPqB/LhyKoU5DXsp+Vp2A==", + "dev": true, + "requires": { + "@babel/template": "^7.4.4", + "@babel/traverse": "^7.4.4", + "@babel/types": "^7.4.4" + } + }, + "@babel/highlight": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.0.0.tgz", + "integrity": "sha512-UFMC4ZeFC48Tpvj7C8UgLvtkaUuovQX+5xNWrsIoMG8o2z+XFKjKaN9iVmS84dPwVN00W4wPmqvYoZF3EGAsfw==", + "dev": true, + "requires": { + "chalk": "^2.0.0", + "esutils": "^2.0.2", + "js-tokens": "^4.0.0" + }, + "dependencies": { + "ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "dev": true, + "requires": { + "color-convert": "^1.9.0" + } + }, + "chalk": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", + "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", + "dev": true, + "requires": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + } + }, + "js-tokens": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", + "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==", + "dev": true + }, + "supports-color": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "dev": true, + "requires": { + "has-flag": "^3.0.0" + } + } + } + }, + "@babel/parser": { + "version": "7.4.4", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.4.4.tgz", + "integrity": "sha512-5pCS4mOsL+ANsFZGdvNLybx4wtqAZJ0MJjMHxvzI3bvIsz6sQvzW8XX92EYIkiPtIvcfG3Aj+Ir5VNyjnZhP7w==", + "dev": true + }, + "@babel/plugin-proposal-async-generator-functions": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-async-generator-functions/-/plugin-proposal-async-generator-functions-7.2.0.tgz", + "integrity": "sha512-+Dfo/SCQqrwx48ptLVGLdE39YtWRuKc/Y9I5Fy0P1DDBB9lsAHpjcEJQt+4IifuSOSTLBKJObJqMvaO1pIE8LQ==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.0.0", + "@babel/helper-remap-async-to-generator": "^7.1.0", + "@babel/plugin-syntax-async-generators": "^7.2.0" + } + }, + "@babel/plugin-proposal-json-strings": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-json-strings/-/plugin-proposal-json-strings-7.2.0.tgz", + "integrity": "sha512-MAFV1CA/YVmYwZG0fBQyXhmj0BHCB5egZHCKWIFVv/XCxAeVGIHfos3SwDck4LvCllENIAg7xMKOG5kH0dzyUg==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.0.0", + "@babel/plugin-syntax-json-strings": "^7.2.0" + } + }, + "@babel/plugin-proposal-object-rest-spread": { + "version": "7.4.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-object-rest-spread/-/plugin-proposal-object-rest-spread-7.4.4.tgz", + "integrity": "sha512-dMBG6cSPBbHeEBdFXeQ2QLc5gUpg4Vkaz8octD4aoW/ISO+jBOcsuxYL7bsb5WSu8RLP6boxrBIALEHgoHtO9g==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.0.0", + "@babel/plugin-syntax-object-rest-spread": "^7.2.0" + } + }, + "@babel/plugin-proposal-optional-catch-binding": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-optional-catch-binding/-/plugin-proposal-optional-catch-binding-7.2.0.tgz", + "integrity": "sha512-mgYj3jCcxug6KUcX4OBoOJz3CMrwRfQELPQ5560F70YQUBZB7uac9fqaWamKR1iWUzGiK2t0ygzjTScZnVz75g==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.0.0", + "@babel/plugin-syntax-optional-catch-binding": "^7.2.0" + } + }, + "@babel/plugin-proposal-unicode-property-regex": { + "version": "7.4.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-unicode-property-regex/-/plugin-proposal-unicode-property-regex-7.4.4.tgz", + "integrity": "sha512-j1NwnOqMG9mFUOH58JTFsA/+ZYzQLUZ/drqWUqxCYLGeu2JFZL8YrNC9hBxKmWtAuOCHPcRpgv7fhap09Fb4kA==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.0.0", + "@babel/helper-regex": "^7.4.4", + "regexpu-core": "^4.5.4" + } + }, + "@babel/plugin-syntax-async-generators": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-async-generators/-/plugin-syntax-async-generators-7.2.0.tgz", + "integrity": "sha512-1ZrIRBv2t0GSlcwVoQ6VgSLpLgiN/FVQUzt9znxo7v2Ov4jJrs8RY8tv0wvDmFN3qIdMKWrmMMW6yZ0G19MfGg==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.0.0" + } + }, + "@babel/plugin-syntax-json-strings": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-json-strings/-/plugin-syntax-json-strings-7.2.0.tgz", + "integrity": "sha512-5UGYnMSLRE1dqqZwug+1LISpA403HzlSfsg6P9VXU6TBjcSHeNlw4DxDx7LgpF+iKZoOG/+uzqoRHTdcUpiZNg==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.0.0" + } + }, + "@babel/plugin-syntax-object-rest-spread": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-object-rest-spread/-/plugin-syntax-object-rest-spread-7.2.0.tgz", + "integrity": "sha512-t0JKGgqk2We+9may3t0xDdmneaXmyxq0xieYcKHxIsrJO64n1OiMWNUtc5gQK1PA0NpdCRrtZp4z+IUaKugrSA==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.0.0" + } + }, + "@babel/plugin-syntax-optional-catch-binding": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-optional-catch-binding/-/plugin-syntax-optional-catch-binding-7.2.0.tgz", + "integrity": "sha512-bDe4xKNhb0LI7IvZHiA13kff0KEfaGX/Hv4lMA9+7TEc63hMNvfKo6ZFpXhKuEp+II/q35Gc4NoMeDZyaUbj9w==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.0.0" + } + }, + "@babel/plugin-transform-arrow-functions": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-arrow-functions/-/plugin-transform-arrow-functions-7.2.0.tgz", + "integrity": "sha512-ER77Cax1+8/8jCB9fo4Ud161OZzWN5qawi4GusDuRLcDbDG+bIGYY20zb2dfAFdTRGzrfq2xZPvF0R64EHnimg==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.0.0" + } + }, + "@babel/plugin-transform-async-to-generator": { + "version": "7.4.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-async-to-generator/-/plugin-transform-async-to-generator-7.4.4.tgz", + "integrity": "sha512-YiqW2Li8TXmzgbXw+STsSqPBPFnGviiaSp6CYOq55X8GQ2SGVLrXB6pNid8HkqkZAzOH6knbai3snhP7v0fNwA==", + "dev": true, + "requires": { + "@babel/helper-module-imports": "^7.0.0", + "@babel/helper-plugin-utils": "^7.0.0", + "@babel/helper-remap-async-to-generator": "^7.1.0" + } + }, + "@babel/plugin-transform-block-scoped-functions": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-block-scoped-functions/-/plugin-transform-block-scoped-functions-7.2.0.tgz", + "integrity": "sha512-ntQPR6q1/NKuphly49+QiQiTN0O63uOwjdD6dhIjSWBI5xlrbUFh720TIpzBhpnrLfv2tNH/BXvLIab1+BAI0w==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.0.0" + } + }, + "@babel/plugin-transform-block-scoping": { + "version": "7.4.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-block-scoping/-/plugin-transform-block-scoping-7.4.4.tgz", + "integrity": "sha512-jkTUyWZcTrwxu5DD4rWz6rDB5Cjdmgz6z7M7RLXOJyCUkFBawssDGcGh8M/0FTSB87avyJI1HsTwUXp9nKA1PA==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.0.0", + "lodash": "^4.17.11" + } + }, + "@babel/plugin-transform-classes": { + "version": "7.4.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-classes/-/plugin-transform-classes-7.4.4.tgz", + "integrity": "sha512-/e44eFLImEGIpL9qPxSRat13I5QNRgBLu2hOQJCF7VLy/otSM/sypV1+XaIw5+502RX/+6YaSAPmldk+nhHDPw==", + "dev": true, + "requires": { + "@babel/helper-annotate-as-pure": "^7.0.0", + "@babel/helper-define-map": "^7.4.4", + "@babel/helper-function-name": "^7.1.0", + "@babel/helper-optimise-call-expression": "^7.0.0", + "@babel/helper-plugin-utils": "^7.0.0", + "@babel/helper-replace-supers": "^7.4.4", + "@babel/helper-split-export-declaration": "^7.4.4", + "globals": "^11.1.0" + }, + "dependencies": { + "globals": { + "version": "11.12.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-11.12.0.tgz", + "integrity": "sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==", + "dev": true + } + } + }, + "@babel/plugin-transform-computed-properties": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-computed-properties/-/plugin-transform-computed-properties-7.2.0.tgz", + "integrity": "sha512-kP/drqTxY6Xt3NNpKiMomfgkNn4o7+vKxK2DDKcBG9sHj51vHqMBGy8wbDS/J4lMxnqs153/T3+DmCEAkC5cpA==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.0.0" + } + }, + "@babel/plugin-transform-destructuring": { + "version": "7.4.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-destructuring/-/plugin-transform-destructuring-7.4.4.tgz", + "integrity": "sha512-/aOx+nW0w8eHiEHm+BTERB2oJn5D127iye/SUQl7NjHy0lf+j7h4MKMMSOwdazGq9OxgiNADncE+SRJkCxjZpQ==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.0.0" + } + }, + "@babel/plugin-transform-dotall-regex": { + "version": "7.4.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-dotall-regex/-/plugin-transform-dotall-regex-7.4.4.tgz", + "integrity": "sha512-P05YEhRc2h53lZDjRPk/OektxCVevFzZs2Gfjd545Wde3k+yFDbXORgl2e0xpbq8mLcKJ7Idss4fAg0zORN/zg==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.0.0", + "@babel/helper-regex": "^7.4.4", + "regexpu-core": "^4.5.4" + } + }, + "@babel/plugin-transform-duplicate-keys": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-duplicate-keys/-/plugin-transform-duplicate-keys-7.2.0.tgz", + "integrity": "sha512-q+yuxW4DsTjNceUiTzK0L+AfQ0zD9rWaTLiUqHA8p0gxx7lu1EylenfzjeIWNkPy6e/0VG/Wjw9uf9LueQwLOw==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.0.0" + } + }, + "@babel/plugin-transform-exponentiation-operator": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-exponentiation-operator/-/plugin-transform-exponentiation-operator-7.2.0.tgz", + "integrity": "sha512-umh4hR6N7mu4Elq9GG8TOu9M0bakvlsREEC+ialrQN6ABS4oDQ69qJv1VtR3uxlKMCQMCvzk7vr17RHKcjx68A==", + "dev": true, + "requires": { + "@babel/helper-builder-binary-assignment-operator-visitor": "^7.1.0", + "@babel/helper-plugin-utils": "^7.0.0" + } + }, + "@babel/plugin-transform-for-of": { + "version": "7.4.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-for-of/-/plugin-transform-for-of-7.4.4.tgz", + "integrity": "sha512-9T/5Dlr14Z9TIEXLXkt8T1DU7F24cbhwhMNUziN3hB1AXoZcdzPcTiKGRn/6iOymDqtTKWnr/BtRKN9JwbKtdQ==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.0.0" + } + }, + "@babel/plugin-transform-function-name": { + "version": "7.4.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-function-name/-/plugin-transform-function-name-7.4.4.tgz", + "integrity": "sha512-iU9pv7U+2jC9ANQkKeNF6DrPy4GBa4NWQtl6dHB4Pb3izX2JOEvDTFarlNsBj/63ZEzNNIAMs3Qw4fNCcSOXJA==", + "dev": true, + "requires": { + "@babel/helper-function-name": "^7.1.0", + "@babel/helper-plugin-utils": "^7.0.0" + } + }, + "@babel/plugin-transform-literals": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-literals/-/plugin-transform-literals-7.2.0.tgz", + "integrity": "sha512-2ThDhm4lI4oV7fVQ6pNNK+sx+c/GM5/SaML0w/r4ZB7sAneD/piDJtwdKlNckXeyGK7wlwg2E2w33C/Hh+VFCg==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.0.0" + } + }, + "@babel/plugin-transform-member-expression-literals": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-member-expression-literals/-/plugin-transform-member-expression-literals-7.2.0.tgz", + "integrity": "sha512-HiU3zKkSU6scTidmnFJ0bMX8hz5ixC93b4MHMiYebmk2lUVNGOboPsqQvx5LzooihijUoLR/v7Nc1rbBtnc7FA==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.0.0" + } + }, + "@babel/plugin-transform-modules-amd": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-amd/-/plugin-transform-modules-amd-7.2.0.tgz", + "integrity": "sha512-mK2A8ucqz1qhrdqjS9VMIDfIvvT2thrEsIQzbaTdc5QFzhDjQv2CkJJ5f6BXIkgbmaoax3zBr2RyvV/8zeoUZw==", + "dev": true, + "requires": { + "@babel/helper-module-transforms": "^7.1.0", + "@babel/helper-plugin-utils": "^7.0.0" + } + }, + "@babel/plugin-transform-modules-commonjs": { + "version": "7.4.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-commonjs/-/plugin-transform-modules-commonjs-7.4.4.tgz", + "integrity": "sha512-4sfBOJt58sEo9a2BQXnZq+Q3ZTSAUXyK3E30o36BOGnJ+tvJ6YSxF0PG6kERvbeISgProodWuI9UVG3/FMY6iw==", + "dev": true, + "requires": { + "@babel/helper-module-transforms": "^7.4.4", + "@babel/helper-plugin-utils": "^7.0.0", + "@babel/helper-simple-access": "^7.1.0" + } + }, + "@babel/plugin-transform-modules-systemjs": { + "version": "7.4.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-systemjs/-/plugin-transform-modules-systemjs-7.4.4.tgz", + "integrity": "sha512-MSiModfILQc3/oqnG7NrP1jHaSPryO6tA2kOMmAQApz5dayPxWiHqmq4sWH2xF5LcQK56LlbKByCd8Aah/OIkQ==", + "dev": true, + "requires": { + "@babel/helper-hoist-variables": "^7.4.4", + "@babel/helper-plugin-utils": "^7.0.0" + } + }, + "@babel/plugin-transform-modules-umd": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-umd/-/plugin-transform-modules-umd-7.2.0.tgz", + "integrity": "sha512-BV3bw6MyUH1iIsGhXlOK6sXhmSarZjtJ/vMiD9dNmpY8QXFFQTj+6v92pcfy1iqa8DeAfJFwoxcrS/TUZda6sw==", + "dev": true, + "requires": { + "@babel/helper-module-transforms": "^7.1.0", + "@babel/helper-plugin-utils": "^7.0.0" + } + }, + "@babel/plugin-transform-named-capturing-groups-regex": { + "version": "7.4.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-named-capturing-groups-regex/-/plugin-transform-named-capturing-groups-regex-7.4.4.tgz", + "integrity": "sha512-Ki+Y9nXBlKfhD+LXaRS7v95TtTGYRAf9Y1rTDiE75zf8YQz4GDaWRXosMfJBXxnk88mGFjWdCRIeqDbon7spYA==", + "dev": true, + "requires": { + "regexp-tree": "^0.1.0" + } + }, + "@babel/plugin-transform-new-target": { + "version": "7.4.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-new-target/-/plugin-transform-new-target-7.4.4.tgz", + "integrity": "sha512-r1z3T2DNGQwwe2vPGZMBNjioT2scgWzK9BCnDEh+46z8EEwXBq24uRzd65I7pjtugzPSj921aM15RpESgzsSuA==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.0.0" + } + }, + "@babel/plugin-transform-object-super": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-object-super/-/plugin-transform-object-super-7.2.0.tgz", + "integrity": "sha512-VMyhPYZISFZAqAPVkiYb7dUe2AsVi2/wCT5+wZdsNO31FojQJa9ns40hzZ6U9f50Jlq4w6qwzdBB2uwqZ00ebg==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.0.0", + "@babel/helper-replace-supers": "^7.1.0" + } + }, + "@babel/plugin-transform-parameters": { + "version": "7.4.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-parameters/-/plugin-transform-parameters-7.4.4.tgz", + "integrity": "sha512-oMh5DUO1V63nZcu/ZVLQFqiihBGo4OpxJxR1otF50GMeCLiRx5nUdtokd+u9SuVJrvvuIh9OosRFPP4pIPnwmw==", + "dev": true, + "requires": { + "@babel/helper-call-delegate": "^7.4.4", + "@babel/helper-get-function-arity": "^7.0.0", + "@babel/helper-plugin-utils": "^7.0.0" + } + }, + "@babel/plugin-transform-property-literals": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-property-literals/-/plugin-transform-property-literals-7.2.0.tgz", + "integrity": "sha512-9q7Dbk4RhgcLp8ebduOpCbtjh7C0itoLYHXd9ueASKAG/is5PQtMR5VJGka9NKqGhYEGn5ITahd4h9QeBMylWQ==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.0.0" + } + }, + "@babel/plugin-transform-regenerator": { + "version": "7.4.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-regenerator/-/plugin-transform-regenerator-7.4.4.tgz", + "integrity": "sha512-Zz3w+pX1SI0KMIiqshFZkwnVGUhDZzpX2vtPzfJBKQQq8WsP/Xy9DNdELWivxcKOCX/Pywge4SiEaPaLtoDT4g==", + "dev": true, + "requires": { + "regenerator-transform": "^0.13.4" + } + }, + "@babel/plugin-transform-reserved-words": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-reserved-words/-/plugin-transform-reserved-words-7.2.0.tgz", + "integrity": "sha512-fz43fqW8E1tAB3DKF19/vxbpib1fuyCwSPE418ge5ZxILnBhWyhtPgz8eh1RCGGJlwvksHkyxMxh0eenFi+kFw==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.0.0" + } + }, + "@babel/plugin-transform-shorthand-properties": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-shorthand-properties/-/plugin-transform-shorthand-properties-7.2.0.tgz", + "integrity": "sha512-QP4eUM83ha9zmYtpbnyjTLAGKQritA5XW/iG9cjtuOI8s1RuL/3V6a3DeSHfKutJQ+ayUfeZJPcnCYEQzaPQqg==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.0.0" + } + }, + "@babel/plugin-transform-spread": { + "version": "7.2.2", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-spread/-/plugin-transform-spread-7.2.2.tgz", + "integrity": "sha512-KWfky/58vubwtS0hLqEnrWJjsMGaOeSBn90Ezn5Jeg9Z8KKHmELbP1yGylMlm5N6TPKeY9A2+UaSYLdxahg01w==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.0.0" + } + }, + "@babel/plugin-transform-sticky-regex": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-sticky-regex/-/plugin-transform-sticky-regex-7.2.0.tgz", + "integrity": "sha512-KKYCoGaRAf+ckH8gEL3JHUaFVyNHKe3ASNsZ+AlktgHevvxGigoIttrEJb8iKN03Q7Eazlv1s6cx2B2cQ3Jabw==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.0.0", + "@babel/helper-regex": "^7.0.0" + } + }, + "@babel/plugin-transform-template-literals": { + "version": "7.4.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-template-literals/-/plugin-transform-template-literals-7.4.4.tgz", + "integrity": "sha512-mQrEC4TWkhLN0z8ygIvEL9ZEToPhG5K7KDW3pzGqOfIGZ28Jb0POUkeWcoz8HnHvhFy6dwAT1j8OzqN8s804+g==", + "dev": true, + "requires": { + "@babel/helper-annotate-as-pure": "^7.0.0", + "@babel/helper-plugin-utils": "^7.0.0" + } + }, + "@babel/plugin-transform-typeof-symbol": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-typeof-symbol/-/plugin-transform-typeof-symbol-7.2.0.tgz", + "integrity": "sha512-2LNhETWYxiYysBtrBTqL8+La0jIoQQnIScUJc74OYvUGRmkskNY4EzLCnjHBzdmb38wqtTaixpo1NctEcvMDZw==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.0.0" + } + }, + "@babel/plugin-transform-unicode-regex": { + "version": "7.4.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-unicode-regex/-/plugin-transform-unicode-regex-7.4.4.tgz", + "integrity": "sha512-il+/XdNw01i93+M9J9u4T7/e/Ue/vWfNZE4IRUQjplu2Mqb/AFTDimkw2tdEdSH50wuQXZAbXSql0UphQke+vA==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.0.0", + "@babel/helper-regex": "^7.4.4", + "regexpu-core": "^4.5.4" + } + }, + "@babel/polyfill": { + "version": "7.4.4", + "resolved": "https://registry.npmjs.org/@babel/polyfill/-/polyfill-7.4.4.tgz", + "integrity": "sha512-WlthFLfhQQhh+A2Gn5NSFl0Huxz36x86Jn+E9OW7ibK8edKPq+KLy4apM1yDpQ8kJOVi1OVjpP4vSDLdrI04dg==", + "requires": { + "core-js": "^2.6.5", + "regenerator-runtime": "^0.13.2" + }, + "dependencies": { + "core-js": { + "version": "2.6.5", + "resolved": "https://registry.npmjs.org/core-js/-/core-js-2.6.5.tgz", + "integrity": "sha512-klh/kDpwX8hryYL14M9w/xei6vrv6sE8gTHDG7/T/+SEovB/G4ejwcfE/CBzO6Edsu+OETZMZ3wcX/EjUkrl5A==" + } + } + }, + "@babel/preset-env": { + "version": "7.4.4", + "resolved": "https://registry.npmjs.org/@babel/preset-env/-/preset-env-7.4.4.tgz", + "integrity": "sha512-FU1H+ACWqZZqfw1x2G1tgtSSYSfxJLkpaUQL37CenULFARDo+h4xJoVHzRoHbK+85ViLciuI7ME4WTIhFRBBlw==", + "dev": true, + "requires": { + "@babel/helper-module-imports": "^7.0.0", + "@babel/helper-plugin-utils": "^7.0.0", + "@babel/plugin-proposal-async-generator-functions": "^7.2.0", + "@babel/plugin-proposal-json-strings": "^7.2.0", + "@babel/plugin-proposal-object-rest-spread": "^7.4.4", + "@babel/plugin-proposal-optional-catch-binding": "^7.2.0", + "@babel/plugin-proposal-unicode-property-regex": "^7.4.4", + "@babel/plugin-syntax-async-generators": "^7.2.0", + "@babel/plugin-syntax-json-strings": "^7.2.0", + "@babel/plugin-syntax-object-rest-spread": "^7.2.0", + "@babel/plugin-syntax-optional-catch-binding": "^7.2.0", + "@babel/plugin-transform-arrow-functions": "^7.2.0", + "@babel/plugin-transform-async-to-generator": "^7.4.4", + "@babel/plugin-transform-block-scoped-functions": "^7.2.0", + "@babel/plugin-transform-block-scoping": "^7.4.4", + "@babel/plugin-transform-classes": "^7.4.4", + "@babel/plugin-transform-computed-properties": "^7.2.0", + "@babel/plugin-transform-destructuring": "^7.4.4", + "@babel/plugin-transform-dotall-regex": "^7.4.4", + "@babel/plugin-transform-duplicate-keys": "^7.2.0", + "@babel/plugin-transform-exponentiation-operator": "^7.2.0", + "@babel/plugin-transform-for-of": "^7.4.4", + "@babel/plugin-transform-function-name": "^7.4.4", + "@babel/plugin-transform-literals": "^7.2.0", + "@babel/plugin-transform-member-expression-literals": "^7.2.0", + "@babel/plugin-transform-modules-amd": "^7.2.0", + "@babel/plugin-transform-modules-commonjs": "^7.4.4", + "@babel/plugin-transform-modules-systemjs": "^7.4.4", + "@babel/plugin-transform-modules-umd": "^7.2.0", + "@babel/plugin-transform-named-capturing-groups-regex": "^7.4.4", + "@babel/plugin-transform-new-target": "^7.4.4", + "@babel/plugin-transform-object-super": "^7.2.0", + "@babel/plugin-transform-parameters": "^7.4.4", + "@babel/plugin-transform-property-literals": "^7.2.0", + "@babel/plugin-transform-regenerator": "^7.4.4", + "@babel/plugin-transform-reserved-words": "^7.2.0", + "@babel/plugin-transform-shorthand-properties": "^7.2.0", + "@babel/plugin-transform-spread": "^7.2.0", + "@babel/plugin-transform-sticky-regex": "^7.2.0", + "@babel/plugin-transform-template-literals": "^7.4.4", + "@babel/plugin-transform-typeof-symbol": "^7.2.0", + "@babel/plugin-transform-unicode-regex": "^7.4.4", + "@babel/types": "^7.4.4", + "browserslist": "^4.5.2", + "core-js-compat": "^3.0.0", + "invariant": "^2.2.2", + "js-levenshtein": "^1.1.3", + "semver": "^5.5.0" + } + }, + "@babel/template": { + "version": "7.4.4", + "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.4.4.tgz", + "integrity": "sha512-CiGzLN9KgAvgZsnivND7rkA+AeJ9JB0ciPOD4U59GKbQP2iQl+olF1l76kJOupqidozfZ32ghwBEJDhnk9MEcw==", + "dev": true, + "requires": { + "@babel/code-frame": "^7.0.0", + "@babel/parser": "^7.4.4", + "@babel/types": "^7.4.4" + } + }, + "@babel/traverse": { + "version": "7.4.4", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.4.4.tgz", + "integrity": "sha512-Gw6qqkw/e6AGzlyj9KnkabJX7VcubqPtkUQVAwkc0wUMldr3A/hezNB3Rc5eIvId95iSGkGIOe5hh1kMKf951A==", + "dev": true, + "requires": { + "@babel/code-frame": "^7.0.0", + "@babel/generator": "^7.4.4", + "@babel/helper-function-name": "^7.1.0", + "@babel/helper-split-export-declaration": "^7.4.4", + "@babel/parser": "^7.4.4", + "@babel/types": "^7.4.4", + "debug": "^4.1.0", + "globals": "^11.1.0", + "lodash": "^4.17.11" + }, + "dependencies": { + "debug": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz", + "integrity": "sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==", + "dev": true, + "requires": { + "ms": "^2.1.1" + } + }, + "globals": { + "version": "11.12.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-11.12.0.tgz", + "integrity": "sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==", + "dev": true + }, + "ms": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.1.tgz", + "integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg==", + "dev": true + } + } + }, + "@babel/types": { + "version": "7.4.4", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.4.4.tgz", + "integrity": "sha512-dOllgYdnEFOebhkKCjzSVFqw/PmmB8pH6RGOWkY4GsboQNd47b1fBThBSwlHAq9alF9vc1M3+6oqR47R50L0tQ==", + "dev": true, + "requires": { + "esutils": "^2.0.2", + "lodash": "^4.17.11", + "to-fast-properties": "^2.0.0" + } + }, "@types/node": { "version": "8.10.48", "resolved": "https://registry.npmjs.org/@types/node/-/node-8.10.48.tgz", "integrity": "sha512-c35YEBTkL4rzXY2ucpSKy+UYHjUBIIkuJbWYbsGIrKLEWU5dgJMmLkkIb3qeC3O3Tpb1ZQCwecscvJTDjDjkRw==" }, + "@types/tunnel": { + "version": "0.0.0", + "resolved": "https://registry.npmjs.org/@types/tunnel/-/tunnel-0.0.0.tgz", + "integrity": "sha512-FGDp0iBRiBdPjOgjJmn1NH0KDLN+Z8fRmo+9J7XGBhubq1DPrGrbmG4UTlGzrpbCpesMqD0sWkzi27EYkOMHyg==", + "requires": { + "@types/node": "*" + } + }, "JSONSelect": { "version": "0.4.0", "resolved": "https://registry.npmjs.org/JSONSelect/-/JSONSelect-0.4.0.tgz", @@ -307,6 +1273,15 @@ "resolved": "https://registry.npmjs.org/aws4/-/aws4-1.8.0.tgz", "integrity": "sha512-ReZxvNHIOv88FlT7rxcXIIC0fPt4KZqZbOlivyWtXLt8ESx84zd3kMC6iK5jVeS2qt+g7ftS7ye4fi06X5rtRQ==" }, + "axios": { + "version": "0.18.0", + "resolved": "https://registry.npmjs.org/axios/-/axios-0.18.0.tgz", + "integrity": "sha1-MtU+SFHv3AoRmTts0AB4nXDAUQI=", + "requires": { + "follow-redirects": "^1.3.0", + "is-buffer": "^1.1.5" + } + }, "az-login": { "version": "0.3.0", "resolved": "https://registry.npmjs.org/az-login/-/az-login-0.3.0.tgz", @@ -597,6 +1572,17 @@ "pako": "~1.0.5" } }, + "browserslist": { + "version": "4.6.0", + "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.6.0.tgz", + "integrity": "sha512-Jk0YFwXBuMOOol8n6FhgkDzn3mY9PYLYGk29zybF05SbRTsMgPqmTNeQQhOghCxq5oFqAXE3u4sYddr4C0uRhg==", + "dev": true, + "requires": { + "caniuse-lite": "^1.0.30000967", + "electron-to-chromium": "^1.3.133", + "node-releases": "^1.1.19" + } + }, "buffer": { "version": "5.2.1", "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.2.1.tgz", @@ -699,6 +1685,12 @@ "integrity": "sha1-m7UwTS4LVmmLLHWLCKPqqdqlijk=", "optional": true }, + "caniuse-lite": { + "version": "1.0.30000967", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30000967.tgz", + "integrity": "sha512-rUBIbap+VJfxTzrM4akJ00lkvVb5/n5v3EGXfWzSH5zT8aJmGzjA8HWhJ4U6kCpzxozUSnB+yvAYDRPY6mRpgQ==", + "dev": true + }, "caseless": { "version": "0.12.0", "resolved": "https://registry.npmjs.org/caseless/-/caseless-0.12.0.tgz", @@ -887,6 +1879,12 @@ "delayed-stream": "~1.0.0" } }, + "commander": { + "version": "2.20.0", + "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.0.tgz", + "integrity": "sha512-7j2y+40w61zy6YC2iRNpUe/NwhNyoXrYpHMrSunaMG64nRnaf96zO/KMQR4OyN/UnE5KLyEBnKHd4aG3rskjpQ==", + "dev": true + }, "component-emitter": { "version": "1.3.0", "resolved": "https://registry.npmjs.org/component-emitter/-/component-emitter-1.3.0.tgz", @@ -930,6 +1928,15 @@ "integrity": "sha1-wguW2MYXdIqvHBYCF2DNJ/y4y3U=", "optional": true }, + "convert-source-map": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.6.0.tgz", + "integrity": "sha512-eFu7XigvxdZ1ETfbgPBohgyQ/Z++C0eEhTor0qRwBw9unw+L0/6V8wkSuGgzdThkiS5lSpdptOQPD8Ak40a+7A==", + "dev": true, + "requires": { + "safe-buffer": "~5.1.1" + } + }, "copy-descriptor": { "version": "0.1.1", "resolved": "https://registry.npmjs.org/copy-descriptor/-/copy-descriptor-0.1.1.tgz", @@ -945,6 +1952,38 @@ "sync-exec": "~0.6.x" } }, + "core-js": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/core-js/-/core-js-3.0.1.tgz", + "integrity": "sha512-sco40rF+2KlE0ROMvydjkrVMMG1vYilP2ALoRXcYR4obqbYIuV3Bg+51GEDW+HF8n7NRA+iaA4qD0nD9lo9mew==", + "dev": true + }, + "core-js-compat": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/core-js-compat/-/core-js-compat-3.0.1.tgz", + "integrity": "sha512-2pC3e+Ht/1/gD7Sim/sqzvRplMiRnFQVlPpDVaHtY9l7zZP7knamr3VRD6NyGfHd84MrDC0tAM9ulNxYMW0T3g==", + "dev": true, + "requires": { + "browserslist": "^4.5.4", + "core-js": "3.0.1", + "core-js-pure": "3.0.1", + "semver": "^6.0.0" + }, + "dependencies": { + "semver": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.0.0.tgz", + "integrity": "sha512-0UewU+9rFapKFnlbirLi3byoOuhrSsli/z/ihNnvM24vgF+8sNBiI1LZPBSH9wJKUwaUbw+s3hToDLCXkrghrQ==", + "dev": true + } + } + }, + "core-js-pure": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/core-js-pure/-/core-js-pure-3.0.1.tgz", + "integrity": "sha512-mSxeQ6IghKW3MoyF4cz19GJ1cMm7761ON+WObSyLfTu/Jn3x7w4NwNFnrZxgl4MTSvYYepVLNuRtlB4loMwJ5g==", + "dev": true + }, "core-util-is": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", @@ -1243,6 +2282,12 @@ "safe-buffer": "^5.0.1" } }, + "electron-to-chromium": { + "version": "1.3.134", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.134.tgz", + "integrity": "sha512-C3uK2SrtWg/gSWaluLHWSHjyebVZCe4ZC0NVgTAoTq8tCR9FareRK5T7R7AS/nPZShtlEcjVMX1kQ8wi4nU68w==", + "dev": true + }, "elliptic": { "version": "6.4.1", "resolved": "https://registry.npmjs.org/elliptic/-/elliptic-6.4.1.tgz", @@ -1903,6 +2948,29 @@ "write": "^0.2.1" } }, + "follow-redirects": { + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.7.0.tgz", + "integrity": "sha512-m/pZQy4Gj287eNy94nivy5wchN3Kp+Q5WgUPNy5lJSZ3sgkVKSYV/ZChMAQVIgx1SqfZ2zBZtPA2YlXIWxxJOQ==", + "requires": { + "debug": "^3.2.6" + }, + "dependencies": { + "debug": { + "version": "3.2.6", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.6.tgz", + "integrity": "sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ==", + "requires": { + "ms": "^2.1.1" + } + }, + "ms": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.1.tgz", + "integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg==" + } + } + }, "for-in": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/for-in/-/for-in-1.0.2.tgz", @@ -1947,6 +3015,12 @@ "jsonfile": "^2.1.0" } }, + "fs-readdir-recursive": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/fs-readdir-recursive/-/fs-readdir-recursive-1.1.0.tgz", + "integrity": "sha512-GNanXlVr2pf02+sPN40XN8HG+ePaNcvM0q5mZBd668Obwb0yD5GiUbZOFgwn8kGMY6I3mdyDJzieUy3PTYyTRA==", + "dev": true + }, "fs.realpath": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", @@ -2525,6 +3599,20 @@ "resolved": "https://registry.npmjs.org/github-from-package/-/github-from-package-0.0.0.tgz", "integrity": "sha1-l/tdlr/eiXMxPyDoKI75oWf6ZM4=" }, + "glob": { + "version": "7.1.4", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.4.tgz", + "integrity": "sha512-hkLPepehmnKk41pUGm3sYxoFs/umurYfYJCerbXEyFIWcAzvpipAgVkBqqT9RBKMGjnq6kMuyYwha6csxbiM1A==", + "dev": true, + "requires": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.0.4", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + } + }, "glob-parent": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-3.1.0.tgz", @@ -2818,6 +3906,15 @@ "resolved": "https://registry.npmjs.org/interpret/-/interpret-1.2.0.tgz", "integrity": "sha512-mT34yGKMNceBQUoVn7iCDKDntA7SC6gycMAWzGx1z/CMCTV7b2AAtXlo3nRyHZ1FelRkQbQjprHSYGwzLtkVbw==" }, + "invariant": { + "version": "2.2.4", + "resolved": "https://registry.npmjs.org/invariant/-/invariant-2.2.4.tgz", + "integrity": "sha512-phJfQVBuaJM5raOpJjSfkiD6BpbCE4Ns//LaXl6wGYtUBY83nWS6Rf9tXm2e8VaK60JEjYldbPif/A2B1C2gNA==", + "dev": true, + "requires": { + "loose-envify": "^1.0.0" + } + }, "invert-kv": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/invert-kv/-/invert-kv-1.0.0.tgz", @@ -2944,6 +4041,12 @@ "kind-of": "^3.0.2" } }, + "is-plain-obj": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-1.1.0.tgz", + "integrity": "sha1-caUMhCnfync8kqOQpKA7OfzVHT4=", + "dev": true + }, "is-plain-object": { "version": "2.0.4", "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz", @@ -2986,6 +4089,11 @@ "integrity": "sha512-eXK1UInq2bPmjyX6e3VHIzMLobc4J94i4AWn+Hpq3OU5KkrRC96OAcR3PRJ/pGu6m8TRnBHP9dkXQVsT/COVIA==", "optional": true }, + "is-wsl": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/is-wsl/-/is-wsl-1.1.0.tgz", + "integrity": "sha1-HxbkqiKwTRM2tmGIpmrzxgDDpm0=" + }, "isarray": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", @@ -3039,6 +4147,12 @@ "nomnom": "1.5.2" } }, + "js-levenshtein": { + "version": "1.1.6", + "resolved": "https://registry.npmjs.org/js-levenshtein/-/js-levenshtein-1.1.6.tgz", + "integrity": "sha512-X2BB11YZtrRqY4EnQcLX5Rh373zbK4alC1FW7D7MBhL2gtcC17cTnr6DmfHZeS0s2rTHjUTMMHfG7gO8SSdw+g==", + "dev": true + }, "js-tokens": { "version": "3.0.2", "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-3.0.2.tgz", @@ -3068,6 +4182,12 @@ "resolved": "https://registry.npmjs.org/jsbn/-/jsbn-0.1.1.tgz", "integrity": "sha1-peZUwuWi3rXyAdls77yoDA7y9RM=" }, + "jsesc": { + "version": "2.5.2", + "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-2.5.2.tgz", + "integrity": "sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA==", + "dev": true + }, "json-loader": { "version": "0.5.7", "resolved": "https://registry.npmjs.org/json-loader/-/json-loader-0.5.7.tgz", @@ -3279,6 +4399,15 @@ "integrity": "sha1-MKCy2jj3N3DoKUoNIuZiXtd9AJc=", "optional": true }, + "loose-envify": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/loose-envify/-/loose-envify-1.4.0.tgz", + "integrity": "sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q==", + "dev": true, + "requires": { + "js-tokens": "^3.0.0 || ^4.0.0" + } + }, "make-error": { "version": "1.3.5", "resolved": "https://registry.npmjs.org/make-error/-/make-error-1.3.5.tgz", @@ -3666,6 +4795,15 @@ } } }, + "node-releases": { + "version": "1.1.19", + "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-1.1.19.tgz", + "integrity": "sha512-SH/B4WwovHbulIALsQllAVwqZZD1kPmKCqrhGfR29dXjLAVZMHvBjD3S6nL9D/J9QkmZ1R92/0wCMDKXUUvyyA==", + "dev": true, + "requires": { + "semver": "^5.3.0" + } + }, "nomnom": { "version": "1.5.2", "resolved": "https://registry.npmjs.org/nomnom/-/nomnom-1.5.2.tgz", @@ -3799,6 +4937,14 @@ "mimic-fn": "^1.0.0" } }, + "open": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/open/-/open-6.3.0.tgz", + "integrity": "sha512-6AHdrJxPvAXIowO/aIaeHZ8CeMdDf7qCyRNq8NwJpinmCdXhz+NZR7ie1Too94lpciCDsG+qHGO9Mt0svA4OqA==", + "requires": { + "is-wsl": "^1.1.0" + } + }, "opn": { "version": "4.0.2", "resolved": "https://registry.npmjs.org/opn/-/opn-4.0.2.tgz", @@ -3849,6 +4995,17 @@ "resolved": "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz", "integrity": "sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ=" }, + "output-file-sync": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/output-file-sync/-/output-file-sync-2.0.1.tgz", + "integrity": "sha512-mDho4qm7WgIXIGf4eYU1RHN2UU5tPfVYVSRwDJw0uTmj35DQUt/eNp19N7v6T3SrR0ESTEf2up2CGO73qI35zQ==", + "dev": true, + "requires": { + "graceful-fs": "^4.1.11", + "is-plain-obj": "^1.1.0", + "mkdirp": "^0.5.1" + } + }, "p-finally": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/p-finally/-/p-finally-1.0.0.tgz", @@ -4047,6 +5204,12 @@ "integrity": "sha1-IZMqVJ9eUv/ZqCf1cOBL5iqX2lQ=", "dev": true }, + "private": { + "version": "0.1.8", + "resolved": "https://registry.npmjs.org/private/-/private-0.1.8.tgz", + "integrity": "sha512-VvivMrbvd2nKkiG38qjULzlc+4Vx4wm/whI9pQD35YrARNnhxeiRktSOhSukRLFNlzg6Br/cJPet5J/u19r/mg==", + "dev": true + }, "process": { "version": "0.11.10", "resolved": "https://registry.npmjs.org/process/-/process-0.11.10.tgz", @@ -4239,6 +5402,35 @@ "resolve": "^1.1.6" } }, + "regenerate": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/regenerate/-/regenerate-1.4.0.tgz", + "integrity": "sha512-1G6jJVDWrt0rK99kBjvEtziZNCICAuvIPkSiUFIQxVP06RCVpq3dmDo2oi6ABpYaDYaTRr67BEhL8r1wgEZZKg==", + "dev": true + }, + "regenerate-unicode-properties": { + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/regenerate-unicode-properties/-/regenerate-unicode-properties-8.1.0.tgz", + "integrity": "sha512-LGZzkgtLY79GeXLm8Dp0BVLdQlWICzBnJz/ipWUgo59qBaZ+BHtq51P2q1uVZlppMuUAT37SDk39qUbjTWB7bA==", + "dev": true, + "requires": { + "regenerate": "^1.4.0" + } + }, + "regenerator-runtime": { + "version": "0.13.2", + "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.13.2.tgz", + "integrity": "sha512-S/TQAZJO+D3m9xeN1WTI8dLKBBiRgXBlTJvbWjCThHWZj9EvHK70Ff50/tYj2J/fvBY6JtFVwRuazHN2E7M9BA==" + }, + "regenerator-transform": { + "version": "0.13.4", + "resolved": "https://registry.npmjs.org/regenerator-transform/-/regenerator-transform-0.13.4.tgz", + "integrity": "sha512-T0QMBjK3J0MtxjPmdIMXm72Wvj2Abb0Bd4HADdfijwMdoIsyQZ6fWC7kDFhk2YinBBEMZDL7Y7wh0J1sGx3S4A==", + "dev": true, + "requires": { + "private": "^0.1.6" + } + }, "regex-not": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/regex-not/-/regex-not-1.0.2.tgz", @@ -4249,6 +5441,49 @@ "safe-regex": "^1.1.0" } }, + "regexp-tree": { + "version": "0.1.6", + "resolved": "https://registry.npmjs.org/regexp-tree/-/regexp-tree-0.1.6.tgz", + "integrity": "sha512-LFrA98Dw/heXqDojz7qKFdygZmFoiVlvE1Zp7Cq2cvF+ZA+03Gmhy0k0PQlsC1jvHPiTUSs+pDHEuSWv6+6D7w==", + "dev": true + }, + "regexpu-core": { + "version": "4.5.4", + "resolved": "https://registry.npmjs.org/regexpu-core/-/regexpu-core-4.5.4.tgz", + "integrity": "sha512-BtizvGtFQKGPUcTy56o3nk1bGRp4SZOTYrDtGNlqCQufptV5IkkLN6Emw+yunAJjzf+C9FQFtvq7IoA3+oMYHQ==", + "dev": true, + "requires": { + "regenerate": "^1.4.0", + "regenerate-unicode-properties": "^8.0.2", + "regjsgen": "^0.5.0", + "regjsparser": "^0.6.0", + "unicode-match-property-ecmascript": "^1.0.4", + "unicode-match-property-value-ecmascript": "^1.1.0" + } + }, + "regjsgen": { + "version": "0.5.0", + "resolved": "https://registry.npmjs.org/regjsgen/-/regjsgen-0.5.0.tgz", + "integrity": "sha512-RnIrLhrXCX5ow/E5/Mh2O4e/oa1/jW0eaBKTSy3LaCj+M3Bqvm97GWDp2yUtzIs4LEn65zR2yiYGFqb2ApnzDA==", + "dev": true + }, + "regjsparser": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/regjsparser/-/regjsparser-0.6.0.tgz", + "integrity": "sha512-RQ7YyokLiQBomUJuUG8iGVvkgOLxwyZM8k6d3q5SAXpg4r5TZJZigKFvC6PpD+qQ98bCDC5YelPeA3EucDoNeQ==", + "dev": true, + "requires": { + "jsesc": "~0.5.0" + }, + "dependencies": { + "jsesc": { + "version": "0.5.0", + "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-0.5.0.tgz", + "integrity": "sha1-597mbjXW/Bb3EP6R1c9p9w8IkR0=", + "dev": true + } + } + }, "remove-trailing-separator": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/remove-trailing-separator/-/remove-trailing-separator-1.1.0.tgz", @@ -4520,6 +5755,11 @@ "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==" }, + "sax": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/sax/-/sax-1.2.4.tgz", + "integrity": "sha512-NqVDv9TpANUjFm0N8uM5GxL36UgKi9/atZw+x7YFnQ8ckwFGKrl4xX4yWtrey3UJm5nP1kUbnYgLopqWNSRhWw==" + }, "semver": { "version": "5.7.0", "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.0.tgz", @@ -4733,6 +5973,12 @@ "simple-concat": "^1.0.0" } }, + "slash": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/slash/-/slash-2.0.0.tgz", + "integrity": "sha512-ZYKh3Wh2z1PpEXWr0MpSBZ0V6mZHAQfYevttO11c51CaWjGTaadiKZ+wVt1PbMlDV5qhMFslpZCemhwOK7C89A==", + "dev": true + }, "slice-ansi": { "version": "0.0.4", "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-0.0.4.tgz", @@ -5220,6 +6466,12 @@ "resolved": "https://registry.npmjs.org/to-buffer/-/to-buffer-1.1.1.tgz", "integrity": "sha512-lx9B5iv7msuFYE3dytT+KE5tap+rNYw+K4jVkb9R/asAb+pbBSM17jtunHplhBe6RRJdZx3Pn2Jph24O32mOVg==" }, + "to-fast-properties": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-2.0.0.tgz", + "integrity": "sha1-3F5pjL0HkmW8c+A3doGk5Og/YW4=", + "dev": true + }, "to-object-path": { "version": "0.3.0", "resolved": "https://registry.npmjs.org/to-object-path/-/to-object-path-0.3.0.tgz", @@ -5267,6 +6519,12 @@ } } }, + "trim-right": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/trim-right/-/trim-right-1.0.1.tgz", + "integrity": "sha1-yy4SAwZ+DI3h9hQJS5/kVwTqYAM=", + "dev": true + }, "ts-node": { "version": "3.3.0", "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-3.3.0.tgz", @@ -5326,6 +6584,11 @@ "strip-json-comments": "^2.0.0" } }, + "tslib": { + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.9.3.tgz", + "integrity": "sha512-4krF8scpejhaOgqzBEcGM7yDIEfi0/8+8zDRZhNZZ2kjmHJ4hv3zCbQWxoJGz1iw5U0Jl0nma13xzHXcncMavQ==" + }, "tty-browserify": { "version": "0.0.0", "resolved": "https://registry.npmjs.org/tty-browserify/-/tty-browserify-0.0.0.tgz", @@ -5426,6 +6689,34 @@ "resolved": "https://registry.npmjs.org/underscore/-/underscore-1.9.1.tgz", "integrity": "sha512-5/4etnCkd9c8gwgowi5/om/mYO5ajCaOgdzj/oW+0eQV9WxKBDZw5+ycmKmeaTXjInS/W0BzpGLo2xR2aBwZdg==" }, + "unicode-canonical-property-names-ecmascript": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/unicode-canonical-property-names-ecmascript/-/unicode-canonical-property-names-ecmascript-1.0.4.tgz", + "integrity": "sha512-jDrNnXWHd4oHiTZnx/ZG7gtUTVp+gCcTTKr8L0HjlwphROEW3+Him+IpvC+xcJEFegapiMZyZe02CyuOnRmbnQ==", + "dev": true + }, + "unicode-match-property-ecmascript": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/unicode-match-property-ecmascript/-/unicode-match-property-ecmascript-1.0.4.tgz", + "integrity": "sha512-L4Qoh15vTfntsn4P1zqnHulG0LdXgjSO035fEpdtp6YxXhMT51Q6vgM5lYdG/5X3MjS+k/Y9Xw4SFCY9IkR0rg==", + "dev": true, + "requires": { + "unicode-canonical-property-names-ecmascript": "^1.0.4", + "unicode-property-aliases-ecmascript": "^1.0.4" + } + }, + "unicode-match-property-value-ecmascript": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/unicode-match-property-value-ecmascript/-/unicode-match-property-value-ecmascript-1.1.0.tgz", + "integrity": "sha512-hDTHvaBk3RmFzvSl0UVrUmC3PuW9wKVnpoUDYH0JDkSIovzw+J5viQmeYHxVSBptubnr7PbH2e0fnpDRQnQl5g==", + "dev": true + }, + "unicode-property-aliases-ecmascript": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/unicode-property-aliases-ecmascript/-/unicode-property-aliases-ecmascript-1.0.5.tgz", + "integrity": "sha512-L5RAqCfXqAwR3RriF8pM0lU0w4Ryf/GgzONwi6KnL1taJQa7x1TCxdJnILX59WIGOwR57IVxn7Nej0fz1Ny6fw==", + "dev": true + }, "union-value": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/union-value/-/union-value-1.0.0.tgz", @@ -5791,6 +7082,20 @@ "mkdirp": "^0.5.1" } }, + "xml2js": { + "version": "0.4.19", + "resolved": "https://registry.npmjs.org/xml2js/-/xml2js-0.4.19.tgz", + "integrity": "sha512-esZnJZJOiJR9wWKMyuvSE1y6Dq5LCuJanqhxslH2bxM6duahNZ+HMpCLhBQGZkbX6xRf8x1Y2eJlgt2q3qo49Q==", + "requires": { + "sax": ">=0.6.0", + "xmlbuilder": "~9.0.1" + } + }, + "xmlbuilder": { + "version": "9.0.7", + "resolved": "https://registry.npmjs.org/xmlbuilder/-/xmlbuilder-9.0.7.tgz", + "integrity": "sha1-Ey7mPS7FVlxVfiD0wi35rKaGsQ0=" + }, "xmldom": { "version": "0.1.27", "resolved": "https://registry.npmjs.org/xmldom/-/xmldom-0.1.27.tgz", diff --git a/package.json b/package.json index e5ea0326..1355808d 100644 --- a/package.json +++ b/package.json @@ -3,10 +3,11 @@ "version": "0.7.0", "description": "Provider plugin for the Serverless Framework v1.x which adds support for Azure Functions.", "license": "MIT", - "main": "index.js", + "main": "./lib/index.js", "author": "Azure Functions", "scripts": { - "test": "eslint **/*.js" + "test": "eslint src/**/*.js", + "build": "cp src/shared/bindings.json lib/shared && babel src --out-dir lib --presets=@babel/env" }, "repository": { "git": "https://github.com/serverless/serverless-azure-functions" @@ -23,14 +24,21 @@ "serverless.com" ], "dependencies": { + "@azure/arm-apimanagement": "^5.1.0", + "@azure/ms-rest-nodeauth": "^1.0.1", + "@babel/polyfill": "^7.4.4", "az-login": "^0.3.0", "azure-arm-resource": "^2.0.0-preview", "bluebird": "^3.4.6", "jsonpath": "^0.2.11", "lodash": "^4.16.6", + "open": "^6.3.0", "request": "2.81.0" }, "devDependencies": { + "@babel/cli": "^7.4.4", + "@babel/core": "^7.4.4", + "@babel/preset-env": "^7.4.4", "eslint": "3.19.0" }, "optionalDependencies": { diff --git a/src/apim/apimPlugin.js b/src/apim/apimPlugin.js new file mode 100644 index 00000000..e0eb5852 --- /dev/null +++ b/src/apim/apimPlugin.js @@ -0,0 +1,24 @@ +import { deployApi } from './lib/deployApi'; +import { deployFunctions } from './lib/deployFunctions'; + +export class AzureApimPlugin { + constructor(serverless, options) { + this.serverless = serverless; + this.options = options; + + this.serverless.cli.log('Initializing Azure APIM plugin'); + + this.hooks = { + 'after:deploy:initialize': this.deploy.bind(this) + }; + } + + async deploy() { + this.serverless.cli.log('Starting APIM deployment'); + + await deployApi(this.serverless, this.options); + await deployFunctions(this.serverless, this.options); + + this.serverless.cli.log('Successfully deployed API Management API & Operations'); + } +} \ No newline at end of file diff --git a/apim/azureApimFunction.js b/src/apim/azureApimFunction.js similarity index 93% rename from apim/azureApimFunction.js rename to src/apim/azureApimFunction.js index 02683e48..adb4ba5b 100644 --- a/apim/azureApimFunction.js +++ b/src/apim/azureApimFunction.js @@ -21,7 +21,7 @@ class AzureApimFunction { ); this.hooks = { - 'deploy:functions': () => BbPromise.bind(this) + 'after:deploy:functions': () => BbPromise.bind(this) .then(this.provider.initialize(this.serverless, this.options)) .then(this.loginToAzure) .then(this.deployApi) diff --git a/src/apim/lib/deployApi.js b/src/apim/lib/deployApi.js new file mode 100644 index 00000000..d1093dbb --- /dev/null +++ b/src/apim/lib/deployApi.js @@ -0,0 +1,36 @@ +import { ApiManagementClient } from '@azure/arm-apimanagement'; + +export const deployApi = async (serverless) => { + serverless.cli.log('Starting to deploy API'); + + try { + const apimConfig = serverless.service.provider.apim; + + const client = new ApiManagementClient(serverless.variables.azureCredentials, serverless.service.provider.subscriptionId); + + await client.api.createOrUpdate(serverless.service.provider.resourceGroup, apimConfig.resourceId, apimConfig.name, { + isCurrent: true, + displayName: apimConfig.displayName, + description: apimConfig.description, + path: apimConfig.urlSuffix, + protocols: [ + apimConfig.urlScheme + ] + }); + + const functionAppResourceId = `https://management.azure.com/subscriptions/${serverless.service.provider.subscriptionId}/resourceGroups/${serverless.service.provider.resourceGroup}/providers/Microsoft.Web/sites/$${serverless.service.service}`; + + await client.backend.createOrUpdate(serverless.service.provider.resourceGroup, apimConfig.resourceId, apimConfig.name, { + credentials: { + header: { + 'x-functions-key': [`{{${apimConfig.name}}}`], + description: apimConfig.description, + protocol: apimConfig.urlScheme, + resourceId: functionAppResourceId + } + } + }); + } catch (e) { + serverless.cli.log(JSON.stringify(e, null, 4)); + } +}; diff --git a/src/apim/lib/deployFunctions.js b/src/apim/lib/deployFunctions.js new file mode 100644 index 00000000..8a243109 --- /dev/null +++ b/src/apim/lib/deployFunctions.js @@ -0,0 +1,13 @@ +import { deployFunction } from './deployOperation'; + +export const deployFunctions = (serverless) => { + serverless.cli.log('Starting to deploy Operations'); + + const deployApiTasks = serverless.service + .getAllFunctions() + .map((functionName) => { + return deployFunction(serverless, { function: functionName }); + }); + + return Promise.all(deployApiTasks); +}; diff --git a/src/apim/lib/deployOperation.js b/src/apim/lib/deployOperation.js new file mode 100644 index 00000000..0e9eff5c --- /dev/null +++ b/src/apim/lib/deployOperation.js @@ -0,0 +1,47 @@ +import { ApiManagementClient } from '@azure/arm-apimanagement'; + +/** + * Deploys a single APIM api operation for the specified function + * @param serverless The serverless framework + * @param options The plugin options + */ +export const deployOperation = async (serverless, options) => { + serverless.cli.log(`Deploying operation ${options.function}`); + + try { + const apimConfig = serverless.service.provider.apim; + const client = new ApiManagementClient(serverless.variables.azureCredentials, serverless.service.provider.subscriptionId); + + const operationConfig = { + displayName: options.operation.displayName || options.function, + description: options.operation.description || '', + urlTemplate: options.operation.path, + method: options.operation.method, + templateParameters: [], + responses: [], + }; + + await client.apiOperation.createOrUpdate(serverless.service.provider.resourceGroup, apimConfig.resourceId, apimConfig.name, options.function, operationConfig); + } catch (e) { + serverless.cli.log(`Error deploying operation ${options.function}`); + serverless.cli.log(JSON.stringify(e, null, 4)); + } +}; + +/** + * Deploys the APIM configuration for the specified function + * @param serverless The serverless framework + * @param options The plugin options + */ +export const deployFunction = async (serverless, options) => { + const functionConfig = serverless.service.functions[options.function]; + + const tasks = functionConfig.apim.operations.map((operation) => { + return deployOperation(serverless, { + function: options.function, + operation: operation + }); + }); + + await Promise.all(tasks); +}; diff --git a/config.js b/src/config.js similarity index 100% rename from config.js rename to src/config.js diff --git a/deploy/azureDeploy.js b/src/deploy/azureDeploy.js similarity index 100% rename from deploy/azureDeploy.js rename to src/deploy/azureDeploy.js diff --git a/deploy/azureDeployFunction.js b/src/deploy/azureDeployFunction.js similarity index 100% rename from deploy/azureDeployFunction.js rename to src/deploy/azureDeployFunction.js diff --git a/deploy/lib/CreateResourceGroupAndFunctionApp.js b/src/deploy/lib/CreateResourceGroupAndFunctionApp.js similarity index 100% rename from deploy/lib/CreateResourceGroupAndFunctionApp.js rename to src/deploy/lib/CreateResourceGroupAndFunctionApp.js diff --git a/deploy/lib/cleanUpFunctions.js b/src/deploy/lib/cleanUpFunctions.js similarity index 100% rename from deploy/lib/cleanUpFunctions.js rename to src/deploy/lib/cleanUpFunctions.js diff --git a/deploy/lib/uploadFunction.js b/src/deploy/lib/uploadFunction.js similarity index 100% rename from deploy/lib/uploadFunction.js rename to src/deploy/lib/uploadFunction.js diff --git a/deploy/lib/uploadFunctions.js b/src/deploy/lib/uploadFunctions.js similarity index 100% rename from deploy/lib/uploadFunctions.js rename to src/deploy/lib/uploadFunctions.js diff --git a/src/index.js b/src/index.js new file mode 100644 index 00000000..9a8058ae --- /dev/null +++ b/src/index.js @@ -0,0 +1,40 @@ +/* +NOTE: this plugin is used to add all the different provider related plugins at once. +This way only one plugin needs to be added to the service in order to get access to the +whole provider implementation. +*/ + +import '@babel/polyfill'; +// import AzureDeploy from './deploy/azureDeploy'; +// import AzureDeployFunction from './deploy/azureDeployFunction'; +// import AzureInvoke from './invoke/azureInvoke'; +// import AzureLogs from './logs/azureLogs'; +// import AzureRemove from './remove/azureRemove'; +// import AzurePackage from './package/azurePackage'; +// import AzurePackageFunction from './package/azurePackageFunction'; +import AzureProvider from './provider/azureProvider'; +import { AzureLoginPlugin } from './login/loginPlugin'; +import { AzureApimPlugin } from './apim/apimPlugin'; +//import AzureApimFunction from './apim/azureApimFunction'; + +export class AzureIndex { + constructor(serverless, options) { + this.serverless = serverless; + this.options = options; + + this.serverless.setProvider(AzureProvider.getProviderName(), new AzureProvider(serverless)); + + //this.serverless.pluginManager.addPlugin(AzurePackage); + //this.serverless.pluginManager.addPlugin(AzurePackageFunction); + //this.serverless.pluginManager.addPlugin(AzureDeploy); + //this.serverless.pluginManager.addPlugin(AzureDeployFunction); + this.serverless.pluginManager.addPlugin(AzureLoginPlugin); + this.serverless.pluginManager.addPlugin(AzureApimPlugin); + //this.serverless.pluginManager.addPlugin(AzureApimFunction); + //this.serverless.pluginManager.addPlugin(AzureInvoke); + //this.serverless.pluginManager.addPlugin(AzureLogs); + //this.serverless.pluginManager.addPlugin(AzureRemove); + } +} + +module.exports = AzureIndex; \ No newline at end of file diff --git a/invoke/azureInvoke.js b/src/invoke/azureInvoke.js similarity index 100% rename from invoke/azureInvoke.js rename to src/invoke/azureInvoke.js diff --git a/invoke/lib/invokeFunction.js b/src/invoke/lib/invokeFunction.js similarity index 100% rename from invoke/lib/invokeFunction.js rename to src/invoke/lib/invokeFunction.js diff --git a/src/login/loginPlugin.js b/src/login/loginPlugin.js new file mode 100644 index 00000000..45969833 --- /dev/null +++ b/src/login/loginPlugin.js @@ -0,0 +1,29 @@ +import open from 'open'; +import { interactiveLoginWithAuthResponse } from '@azure/ms-rest-nodeauth'; + +export class AzureLoginPlugin { + constructor(serverless, options) { + this.serverless = serverless; + this.options = options; + + this.serverless.cli.log('Initializing Azure Login plugin'); + + this.hooks = { + 'before:deploy:initialize': this.login.bind(this) + }; + } + + async login() { + this.serverless.cli.log('Logging into Azure'); + + try { + await open('https://microsoft.com/devicelogin'); + const authResult = await interactiveLoginWithAuthResponse(); + + this.serverless.variables.azureCredentials = authResult.credentials; + } + catch (e) { + this.serverless.cli.log('Error logging into azure'); + } + } +} \ No newline at end of file diff --git a/logs/azureLogs.js b/src/logs/azureLogs.js similarity index 100% rename from logs/azureLogs.js rename to src/logs/azureLogs.js diff --git a/logs/lib/retrieveLogs.js b/src/logs/lib/retrieveLogs.js similarity index 100% rename from logs/lib/retrieveLogs.js rename to src/logs/lib/retrieveLogs.js diff --git a/package/azurePackage.js b/src/package/azurePackage.js similarity index 100% rename from package/azurePackage.js rename to src/package/azurePackage.js diff --git a/package/azurePackageFunction.js b/src/package/azurePackageFunction.js similarity index 100% rename from package/azurePackageFunction.js rename to src/package/azurePackageFunction.js diff --git a/package/lib/compileEvents.js b/src/package/lib/compileEvents.js similarity index 100% rename from package/lib/compileEvents.js rename to src/package/lib/compileEvents.js diff --git a/package/lib/compileEventsForFunction.js b/src/package/lib/compileEventsForFunction.js similarity index 100% rename from package/lib/compileEventsForFunction.js rename to src/package/lib/compileEventsForFunction.js diff --git a/package/lib/webpackFunctionJson.js b/src/package/lib/webpackFunctionJson.js similarity index 100% rename from package/lib/webpackFunctionJson.js rename to src/package/lib/webpackFunctionJson.js diff --git a/provider/armTemplates/azuredeploy.json b/src/provider/armTemplates/azuredeploy.json similarity index 100% rename from provider/armTemplates/azuredeploy.json rename to src/provider/armTemplates/azuredeploy.json diff --git a/provider/armTemplates/azuredeployWithGit.json b/src/provider/armTemplates/azuredeployWithGit.json similarity index 100% rename from provider/armTemplates/azuredeployWithGit.json rename to src/provider/armTemplates/azuredeployWithGit.json diff --git a/provider/azureProvider.js b/src/provider/azureProvider.js similarity index 96% rename from provider/azureProvider.js rename to src/provider/azureProvider.js index 863129f1..d1b53ee8 100644 --- a/provider/azureProvider.js +++ b/src/provider/azureProvider.js @@ -1,5 +1,3 @@ -'use strict'; - const BbPromise = require('bluebird'); const _ = require('lodash'); const resourceManagement = require('azure-arm-resource'); @@ -9,10 +7,10 @@ const request = require('request'); const dns = require('dns'); const jsonpath = require('jsonpath'); const parseBindings = require('../shared/parseBindings'); -const { login } = require('az-login'); const config = require('../config'); +import { interactiveLoginWithAuthResponse } from '@azure/ms-rest-nodeauth'; -const pkg = require('../package.json'); +const pkg = require('../../package.json'); let resourceGroupName; let deploymentName; @@ -24,7 +22,7 @@ let principalCredentials; let existingFunctionApp = false; const deployedFunctionNames = []; -class AzureProvider { +export default class AzureProvider { static getProviderName() { return config.providerName; } @@ -63,22 +61,19 @@ class AzureProvider { return this.parsedBindings; } - Login() { - return login({ - interactiveLoginHandler: (code, message) => { - // Override the interactive login handler, in order to be - // able to append the Serverless prefix to the displayed message. - this.serverless.cli.log(message); - } - }).then((result) => { - principalCredentials = result.credentials; - subscriptionId = result.subscriptionId; + async Login() { + try { + const authResult = await interactiveLoginWithAuthResponse(); - return principalCredentials; - }).catch((error) => { + return { + principalCredentials: authResult.credentials, + subscriptionId: authResult.subscriptionId + }; + } + catch (error) { error.message = error.message || (error.body ? error.body.message : 'Failed logging in to Azure'); throw error; - }); + } } CreateResourceGroup() { @@ -636,5 +631,3 @@ class AzureProvider { }); } } - -module.exports = AzureProvider; diff --git a/remove/azureRemove.js b/src/remove/azureRemove.js similarity index 100% rename from remove/azureRemove.js rename to src/remove/azureRemove.js diff --git a/remove/lib/deleteResourceGroup.js b/src/remove/lib/deleteResourceGroup.js similarity index 100% rename from remove/lib/deleteResourceGroup.js rename to src/remove/lib/deleteResourceGroup.js diff --git a/shared/bindings.json b/src/shared/bindings.json similarity index 100% rename from shared/bindings.json rename to src/shared/bindings.json diff --git a/shared/getAdminKey.js b/src/shared/getAdminKey.js similarity index 100% rename from shared/getAdminKey.js rename to src/shared/getAdminKey.js diff --git a/shared/loginToAzure.js b/src/shared/loginToAzure.js similarity index 100% rename from shared/loginToAzure.js rename to src/shared/loginToAzure.js diff --git a/shared/parseBindings.js b/src/shared/parseBindings.js similarity index 90% rename from shared/parseBindings.js rename to src/shared/parseBindings.js index 4be5d3cd..04858679 100644 --- a/shared/parseBindings.js +++ b/src/shared/parseBindings.js @@ -1,8 +1,6 @@ 'use strict'; -const path = require('path'); - -const bindingsJson = require(path.join(__dirname, 'bindings.json')); +const bindingsJson = require('./bindings.json'); const constants = { bindings: 'bindings', @@ -13,7 +11,8 @@ const constants = { }; module.exports = { - getBindingsMetaData (serverless) { + getBindingsMetaData(serverless) { + const bindingDisplayNames = []; const bindingTypes = []; const bindingSettings = []; diff --git a/shared/utils.js b/src/shared/utils.js similarity index 100% rename from shared/utils.js rename to src/shared/utils.js From d2ab1cf5aefea711defb312bc6b7d8f60950dfe2 Mon Sep 17 00:00:00 2001 From: Wallace Breza Date: Wed, 15 May 2019 17:37:39 -0700 Subject: [PATCH 03/19] WIP: finally got full API operation working --- package-lock.json | 20 +++++ package.json | 5 +- src/apim/lib/deployApi.js | 126 ++++++++++++++++++++++++++------ src/apim/lib/deployOperation.js | 58 ++++++++++----- 4 files changed, 167 insertions(+), 42 deletions(-) diff --git a/package-lock.json b/package-lock.json index b094aa55..e322adc0 100644 --- a/package-lock.json +++ b/package-lock.json @@ -14,6 +14,26 @@ "tslib": "^1.9.3" } }, + "@azure/arm-appservice": { + "version": "5.7.0", + "resolved": "https://registry.npmjs.org/@azure/arm-appservice/-/arm-appservice-5.7.0.tgz", + "integrity": "sha512-JX7wWBpflM+xRcN9MKrO/ZA0do5Be68qidwAS1N7PCHRWGRLQgvgpbmkXcvPSNxewVRDKsgOUSB7oDKM8TAdoQ==", + "requires": { + "@azure/ms-rest-azure-js": "^1.1.0", + "@azure/ms-rest-js": "^1.1.0", + "tslib": "^1.9.3" + } + }, + "@azure/arm-resources": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/@azure/arm-resources/-/arm-resources-1.0.1.tgz", + "integrity": "sha512-wIUJmtFoxPJiyyVmVstoWU31ffNLL9+fU6MtD4SH7nFk1ikSt2lTHE3clYX51jHhKcyFwdBo6Z3IQgrOwc1jcw==", + "requires": { + "@azure/ms-rest-azure-js": "^1.2.0", + "@azure/ms-rest-js": "^1.2.0", + "tslib": "^1.9.3" + } + }, "@azure/ms-rest-azure-env": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/@azure/ms-rest-azure-env/-/ms-rest-azure-env-1.1.2.tgz", diff --git a/package.json b/package.json index 1355808d..f8540018 100644 --- a/package.json +++ b/package.json @@ -7,7 +7,7 @@ "author": "Azure Functions", "scripts": { "test": "eslint src/**/*.js", - "build": "cp src/shared/bindings.json lib/shared && babel src --out-dir lib --presets=@babel/env" + "build": "babel src --out-dir lib --presets=@babel/env && cp src/shared/bindings.json lib/shared" }, "repository": { "git": "https://github.com/serverless/serverless-azure-functions" @@ -25,8 +25,11 @@ ], "dependencies": { "@azure/arm-apimanagement": "^5.1.0", + "@azure/arm-appservice": "^5.7.0", + "@azure/arm-resources": "^1.0.1", "@azure/ms-rest-nodeauth": "^1.0.1", "@babel/polyfill": "^7.4.4", + "axios": "^0.18.0", "az-login": "^0.3.0", "azure-arm-resource": "^2.0.0-preview", "bluebird": "^3.4.6", diff --git a/src/apim/lib/deployApi.js b/src/apim/lib/deployApi.js index d1093dbb..2dd7dfb6 100644 --- a/src/apim/lib/deployApi.js +++ b/src/apim/lib/deployApi.js @@ -1,36 +1,118 @@ import { ApiManagementClient } from '@azure/arm-apimanagement'; +import { ResourceManagementClient } from '@azure/arm-resources'; +import { WebSiteManagementClient } from '@azure/arm-appservice'; +import request from 'request'; export const deployApi = async (serverless) => { serverless.cli.log('Starting to deploy API'); - try { - const apimConfig = serverless.service.provider.apim; + const apimConfig = serverless.service.provider.apim; + const resourceClient = new ResourceManagementClient(serverless.variables.azureCredentials, serverless.service.provider.subscriptionId); + const apimClient = new ApiManagementClient(serverless.variables.azureCredentials, serverless.service.provider.subscriptionId); - const client = new ApiManagementClient(serverless.variables.azureCredentials, serverless.service.provider.subscriptionId); + const resourceId = `/subscriptions/${serverless.service.provider.subscriptionId}/resourceGroups/${serverless.service.provider.resourceGroup}/providers/Microsoft.Web/sites/${serverless.service.service}`; + const functionApp = await resourceClient.resources.getById(resourceId, '2018-11-01'); - await client.api.createOrUpdate(serverless.service.provider.resourceGroup, apimConfig.resourceId, apimConfig.name, { - isCurrent: true, - displayName: apimConfig.displayName, - description: apimConfig.description, - path: apimConfig.urlSuffix, - protocols: [ - apimConfig.urlScheme - ] + await ensureApi(); + await ensureBackend(); + await ensureFunctionAppKey(); + + async function ensureApi() { + try { + await apimClient.api.createOrUpdate(serverless.service.provider.resourceGroup, apimConfig.resourceId, apimConfig.name, { + isCurrent: true, + displayName: apimConfig.displayName, + description: apimConfig.description, + path: apimConfig.urlSuffix, + protocols: [ + apimConfig.urlScheme + ] + }); + } catch (e) { + serverless.cli.log('Error creating APIM API'); + serverless.cli.log(JSON.stringify(e.body, null, 4)); + } + } + + async function ensureBackend() { + try { + const functionAppResourceId = `https://management.azure.com${resourceId}`; + + await apimClient.backend.createOrUpdate(serverless.service.provider.resourceGroup, apimConfig.resourceId, serverless.service.service, { + // credentials: { + // header: { + // 'x-functions-key': [`{{${apimConfig.name}}}`], + // } + // }, + description: serverless.service.service, + protocol: 'http', + resourceId: functionAppResourceId, + url: `https://${functionApp.properties.defaultHostName}/api` + }); + } catch (e) { + serverless.cli.log('Error creating APIM Backend'); + serverless.cli.log(JSON.stringify(e.body, null, 4)); + } + } + + function getAdminToken() { + // const webClient = new WebSiteManagementClient(serverless.variables.azureCredentials, serverless.service.provider.subscriptionId); + // const adminTokenResult = await webClient.webApps.getFunctionsAdminToken(serverless.service.provider.resourceGroup, serverless.service.service); + + return new Promise((resolve, reject) => { + const baseUrl = 'https://management.azure.com'; + const getTokenUrl = `${baseUrl}${functionApp.id}/functions/admin/token?api-version=2016-08-01`; + + request.get(getTokenUrl, { + headers: { + 'Authorization': `Bearer ${serverless.variables.azureCredentials.tokenCache._entries[0].accessToken}` + } + }, (err, response) => { + if (err) { + return reject(err); + } + + resolve(response.body.replace(/"/g, '')); + }); }); + } - const functionAppResourceId = `https://management.azure.com/subscriptions/${serverless.service.provider.subscriptionId}/resourceGroups/${serverless.service.provider.resourceGroup}/providers/Microsoft.Web/sites/$${serverless.service.service}`; + function getMasterKey(authToken) { + return new Promise((resolve, reject) => { + const apiUrl = `https://${functionApp.properties.defaultHostName}/admin/host/systemkeys/_master`; - await client.backend.createOrUpdate(serverless.service.provider.resourceGroup, apimConfig.resourceId, apimConfig.name, { - credentials: { - header: { - 'x-functions-key': [`{{${apimConfig.name}}}`], - description: apimConfig.description, - protocol: apimConfig.urlScheme, - resourceId: functionAppResourceId + request.get(apiUrl, { + json: true, + headers: { + 'Authorization': `Bearer ${authToken}` + } + }, (err, response) => { + if (err) { + return reject(err); } - } + + resolve(response.body.value); + }); }); - } catch (e) { - serverless.cli.log(JSON.stringify(e, null, 4)); + } + + async function ensureFunctionAppKey() { + try { + serverless.cli.log('Getting key'); + + const adminToken = await getAdminToken(); + const masterKey = await getMasterKey(adminToken); + + const keyName = `${serverless.service.service}-key`; + + apimClient.property.createOrUpdate(serverless.service.provider.resourceGroup, apimConfig.resourceId, keyName, { + displayName: keyName, + secret: true, + value: masterKey + }); + } catch (e) { + serverless.cli.log('Error creating APIM Property'); + serverless.cli.log(JSON.stringify(e, null, 4)); + } } }; diff --git a/src/apim/lib/deployOperation.js b/src/apim/lib/deployOperation.js index 0e9eff5c..13d59a69 100644 --- a/src/apim/lib/deployOperation.js +++ b/src/apim/lib/deployOperation.js @@ -1,5 +1,24 @@ import { ApiManagementClient } from '@azure/arm-apimanagement'; +/** + * Deploys the APIM configuration for the specified function + * @param serverless The serverless framework + * @param options The plugin options + */ +export const deployFunction = async (serverless, options) => { + const functionConfig = serverless.service.functions[options.function]; + + const tasks = functionConfig.apim.operations.map((operation) => { + return deployOperation(serverless, { + function: options.function, + operation: operation + }); + }); + + await Promise.all(tasks); +}; + + /** * Deploys a single APIM api operation for the specified function * @param serverless The serverless framework @@ -22,26 +41,27 @@ export const deployOperation = async (serverless, options) => { }; await client.apiOperation.createOrUpdate(serverless.service.provider.resourceGroup, apimConfig.resourceId, apimConfig.name, options.function, operationConfig); + await client.apiOperationPolicy.createOrUpdate(serverless.service.provider.resourceGroup, apimConfig.resourceId, apimConfig.name, options.function, { + format: 'rawxml', + value: ` + + + + + + + + + + + + + + + ` + }); } catch (e) { serverless.cli.log(`Error deploying operation ${options.function}`); serverless.cli.log(JSON.stringify(e, null, 4)); } -}; - -/** - * Deploys the APIM configuration for the specified function - * @param serverless The serverless framework - * @param options The plugin options - */ -export const deployFunction = async (serverless, options) => { - const functionConfig = serverless.service.functions[options.function]; - - const tasks = functionConfig.apim.operations.map((operation) => { - return deployOperation(serverless, { - function: options.function, - operation: operation - }); - }); - - await Promise.all(tasks); -}; +}; \ No newline at end of file From 415d6b4e3d7f88b3b876dfd4d10f50d5142ed112 Mon Sep 17 00:00:00 2001 From: Wallace Breza Date: Thu, 16 May 2019 09:11:49 -0700 Subject: [PATCH 04/19] WIP: quick update --- src/apim/lib/deployApi.js | 1 - 1 file changed, 1 deletion(-) diff --git a/src/apim/lib/deployApi.js b/src/apim/lib/deployApi.js index 2dd7dfb6..20fdf037 100644 --- a/src/apim/lib/deployApi.js +++ b/src/apim/lib/deployApi.js @@ -1,6 +1,5 @@ import { ApiManagementClient } from '@azure/arm-apimanagement'; import { ResourceManagementClient } from '@azure/arm-resources'; -import { WebSiteManagementClient } from '@azure/arm-appservice'; import request from 'request'; export const deployApi = async (serverless) => { From 5a96e14e0aa0b3820124f17f6a4a41fe357b5d03 Mon Sep 17 00:00:00 2001 From: Wallace Breza Date: Thu, 16 May 2019 12:47:48 -0700 Subject: [PATCH 05/19] WIP: Updated login plugin to read from env vars otherwise interactive login --- src/apim/apimFunctionPlugin.js | 23 ++ src/apim/apimService.js | 224 ++++++++++++++++++ .../{apimPlugin.js => apimServicePlugin.js} | 12 +- src/apim/azureApimFunction.js | 34 --- src/apim/lib/deployApi.js | 117 --------- src/apim/lib/deployFunctions.js | 13 - src/apim/lib/deployOperation.js | 67 ------ src/index.js | 6 +- src/login/loginPlugin.js | 17 +- 9 files changed, 271 insertions(+), 242 deletions(-) create mode 100644 src/apim/apimFunctionPlugin.js create mode 100644 src/apim/apimService.js rename src/apim/{apimPlugin.js => apimServicePlugin.js} (54%) delete mode 100644 src/apim/azureApimFunction.js delete mode 100644 src/apim/lib/deployApi.js delete mode 100644 src/apim/lib/deployFunctions.js delete mode 100644 src/apim/lib/deployOperation.js diff --git a/src/apim/apimFunctionPlugin.js b/src/apim/apimFunctionPlugin.js new file mode 100644 index 00000000..b904eac1 --- /dev/null +++ b/src/apim/apimFunctionPlugin.js @@ -0,0 +1,23 @@ +import { ApimService } from './apimService'; + +export class AzureApimFunctionPlugin { + constructor(serverless, options) { + this.serverless = serverless; + this.options = options; + + this.serverless.cli.log('Initializing Azure APIM function plugin'); + + this.hooks = { + 'after:deploy:function:deploy': this.deploy.bind(this) + }; + } + + async deploy() { + this.serverless.cli.log('Starting APIM function deployment'); + + const apimService = new ApimService(this.serverless, this.options); + await apimService.deployFunction(this.options); + + this.serverless.cli.log('Successfully deployed function'); + } +} \ No newline at end of file diff --git a/src/apim/apimService.js b/src/apim/apimService.js new file mode 100644 index 00000000..5e1db794 --- /dev/null +++ b/src/apim/apimService.js @@ -0,0 +1,224 @@ +import { ApiManagementClient } from '@azure/arm-apimanagement'; +import { ResourceManagementClient } from '@azure/arm-resources'; +import request from 'request'; + +/** + * APIM Service handles deployment and integration with Azure API Management + */ +export class ApimService { + constructor(serverless, options) { + this.serverless = serverless; + this.options = options; + this.config = serverless.service.provider.apim; + + this.serviceName = serverless.service.service; + this.credentials = serverless.variables.azureCredentials; + this.subscriptionId = serverless.service.provider.subscriptionId; + this.resourceGroup = serverless.service.provider.resourceGroup; + + this.resourceId = `/subscriptions/${this.subscriptionId}/resourceGroups/${this.resourceGroup}/providers/Microsoft.Web/sites/${this.serviceName}`; + + this.resourceClient = new ResourceManagementClient(this.credentials, this.subscriptionId); + this.apimClient = new ApiManagementClient(this.credentials, this.subscriptionId); + } + + /** + * Deploys the APIM top level api + */ + async deployApi() { + const functionApp = await this.resourceClient.resources.getById(this.resourceId, '2018-11-01'); + + await this.ensureApi(); + await this.ensureFunctionAppKeys(functionApp.properties.defaultHostName); + await this.ensureBackend(functionApp.properties.defaultHostName); + } + + /** + * Deploys all the functions of the serverless service to APIM + */ + async deployFunctions() { + this.serverless.cli.log('Starting to deploy API Operations'); + + const deployApiTasks = this.serverless.service + .getAllFunctions() + .map((functionName) => this.deployFunction({ function: functionName })); + + return Promise.all(deployApiTasks); + } + + /** + * Deploys the specified serverless function to APIM + * @param options + */ + async deployFunction(options) { + const functionConfig = this.serverless.service.functions[options.function]; + + const tasks = functionConfig.apim.operations.map((operation) => { + return this.deployOperation({ + function: options.function, + operation: operation + }); + }); + + await Promise.all(tasks); + } + + /** + * Deploys the APIM API referenced by the serverless service + */ + async ensureApi() { + try { + await this.apimClient.api.createOrUpdate(this.resourceGroup, this.config.resourceId, this.config.name, { + isCurrent: true, + displayName: this.config.displayName, + description: this.config.description, + path: this.config.urlSuffix, + protocols: [ + this.config.urlScheme + ] + }); + } catch (e) { + this.serverless.cli.log('Error creating APIM API'); + this.serverless.cli.log(JSON.stringify(e.body, null, 4)); + } + } + + /** + * Deploys the APIM Backend referenced by the serverless service + * @param functionAppUrl The host name for the deployed function app + */ + async ensureBackend(functionAppUrl) { + try { + const functionAppResourceId = `https://management.azure.com${this.resourceId}`; + + await this.apimClient.backend.createOrUpdate(this.resourceGroup, this.config.resourceId, this.serviceName, { + credentials: { + header: { + 'x-functions-key': [`{{${this.serviceName}-key}}`], + } + }, + description: this.serviceName, + protocol: 'http', + resourceId: functionAppResourceId, + url: `https://${functionAppUrl}/api` + }); + } catch (e) { + this.serverless.cli.log('Error creating APIM Backend'); + this.serverless.cli.log(JSON.stringify(e.body, null, 4)); + } + } + + /** + * Deploys a single APIM api operation for the specified function + * @param serverless The serverless framework + * @param options The plugin options + */ + async deployOperation(options) { + this.serverless.cli.log(`Deploying API operation ${options.function}`); + + try { + const client = new ApiManagementClient(this.credentials, this.subscriptionId); + + const operationConfig = { + displayName: options.operation.displayName || options.function, + description: options.operation.description || '', + urlTemplate: options.operation.path, + method: options.operation.method, + templateParameters: options.operation.templateParameters || [], + responses: options.operation.responses || [], + }; + + await client.apiOperation.createOrUpdate(this.resourceGroup, this.config.resourceId, this.config.name, options.function, operationConfig); + await client.apiOperationPolicy.createOrUpdate(this.resourceGroup, this.config.resourceId, this.config.name, options.function, { + format: 'rawxml', + value: ` + + + + + + + + + + + + + + + ` + }); + } catch (e) { + this.serverless.cli.log(`Error deploying API operation ${options.function}`); + this.serverless.cli.log(JSON.stringify(e, null, 4)); + } + } + + /** + * Gets the master key for the function app and stores a reference in the APIM instance + * @param functionAppUrl The host name for the Azure function app + */ + async ensureFunctionAppKeys(functionAppUrl) { + try { + const adminToken = await this.getAdminToken(); + const masterKey = await this.getMasterKey(functionAppUrl, adminToken); + + const keyName = `${this.serviceName}-key`; + + this.apimClient.property.createOrUpdate(this.resourceGroup, this.config.resourceId, keyName, { + displayName: keyName, + secret: true, + value: masterKey + }); + } catch (e) { + this.serverless.cli.log('Error creating APIM Property'); + this.serverless.cli.log(JSON.stringify(e, null, 4)); + } + } + + /** + * Gets a short lived admin token used to retrieve function keys + */ + async getAdminToken() { + return new Promise((resolve, reject) => { + const baseUrl = 'https://management.azure.com'; + const getTokenUrl = `${baseUrl}${this.resourceId}/functions/admin/token?api-version=2016-08-01`; + + request.get(getTokenUrl, { + headers: { + 'Authorization': `Bearer ${this.credentials.tokenCache._entries[0].accessToken}` + } + }, (err, response) => { + if (err) { + return reject(err); + } + + resolve(response.body.replace(/"/g, '')); + }); + }); + } + + /** + * Gets the master key for the specified function app + * @param functionAppUrl The function app url + * @param authToken The JWT access token used for authorization + */ + getMasterKey(functionAppUrl, authToken) { + return new Promise((resolve, reject) => { + const apiUrl = `https://${functionAppUrl}/admin/host/systemkeys/_master`; + + request.get(apiUrl, { + json: true, + headers: { + 'Authorization': `Bearer ${authToken}` + } + }, (err, response) => { + if (err) { + return reject(err); + } + + resolve(response.body.value); + }); + }); + } +} diff --git a/src/apim/apimPlugin.js b/src/apim/apimServicePlugin.js similarity index 54% rename from src/apim/apimPlugin.js rename to src/apim/apimServicePlugin.js index e0eb5852..04aa22ae 100644 --- a/src/apim/apimPlugin.js +++ b/src/apim/apimServicePlugin.js @@ -1,7 +1,6 @@ -import { deployApi } from './lib/deployApi'; -import { deployFunctions } from './lib/deployFunctions'; +import { ApimService } from './apimService'; -export class AzureApimPlugin { +export class AzureApimServicePlugin { constructor(serverless, options) { this.serverless = serverless; this.options = options; @@ -9,15 +8,16 @@ export class AzureApimPlugin { this.serverless.cli.log('Initializing Azure APIM plugin'); this.hooks = { - 'after:deploy:initialize': this.deploy.bind(this) + 'after:deploy:deploy': this.deploy.bind(this) }; } async deploy() { this.serverless.cli.log('Starting APIM deployment'); - await deployApi(this.serverless, this.options); - await deployFunctions(this.serverless, this.options); + const apimService = new ApimService(this.serverless, this.options); + await apimService.deployApi(); + await apimService.deployFunctions(); this.serverless.cli.log('Successfully deployed API Management API & Operations'); } diff --git a/src/apim/azureApimFunction.js b/src/apim/azureApimFunction.js deleted file mode 100644 index adb4ba5b..00000000 --- a/src/apim/azureApimFunction.js +++ /dev/null @@ -1,34 +0,0 @@ -'use strict'; - -const BbPromise = require('bluebird'); -const deployApi = require('./lib/deployApi'); -const deployOperation = require('./lib/deployOperation'); -const loginToAzure = require('../shared/loginToAzure'); - -class AzureApimFunction { - constructor(serverless, options) { - this.serverless = serverless; - this.options = options; - this.provider = this.serverless.getProvider('azure'); - - this.serverless.cli.log('Initializing APIM Function plugin'); - - Object.assign( - this, - loginToAzure, - deployApi, - deployOperation - ); - - this.hooks = { - 'after:deploy:functions': () => BbPromise.bind(this) - .then(this.provider.initialize(this.serverless, this.options)) - .then(this.loginToAzure) - .then(this.deployApi) - .then(this.deployOperation) - .then(() => this.serverless.cli.log('Successfully deployed API Management API')) - }; - } -} - -module.exports = AzureApimFunction; diff --git a/src/apim/lib/deployApi.js b/src/apim/lib/deployApi.js deleted file mode 100644 index 20fdf037..00000000 --- a/src/apim/lib/deployApi.js +++ /dev/null @@ -1,117 +0,0 @@ -import { ApiManagementClient } from '@azure/arm-apimanagement'; -import { ResourceManagementClient } from '@azure/arm-resources'; -import request from 'request'; - -export const deployApi = async (serverless) => { - serverless.cli.log('Starting to deploy API'); - - const apimConfig = serverless.service.provider.apim; - const resourceClient = new ResourceManagementClient(serverless.variables.azureCredentials, serverless.service.provider.subscriptionId); - const apimClient = new ApiManagementClient(serverless.variables.azureCredentials, serverless.service.provider.subscriptionId); - - const resourceId = `/subscriptions/${serverless.service.provider.subscriptionId}/resourceGroups/${serverless.service.provider.resourceGroup}/providers/Microsoft.Web/sites/${serverless.service.service}`; - const functionApp = await resourceClient.resources.getById(resourceId, '2018-11-01'); - - await ensureApi(); - await ensureBackend(); - await ensureFunctionAppKey(); - - async function ensureApi() { - try { - await apimClient.api.createOrUpdate(serverless.service.provider.resourceGroup, apimConfig.resourceId, apimConfig.name, { - isCurrent: true, - displayName: apimConfig.displayName, - description: apimConfig.description, - path: apimConfig.urlSuffix, - protocols: [ - apimConfig.urlScheme - ] - }); - } catch (e) { - serverless.cli.log('Error creating APIM API'); - serverless.cli.log(JSON.stringify(e.body, null, 4)); - } - } - - async function ensureBackend() { - try { - const functionAppResourceId = `https://management.azure.com${resourceId}`; - - await apimClient.backend.createOrUpdate(serverless.service.provider.resourceGroup, apimConfig.resourceId, serverless.service.service, { - // credentials: { - // header: { - // 'x-functions-key': [`{{${apimConfig.name}}}`], - // } - // }, - description: serverless.service.service, - protocol: 'http', - resourceId: functionAppResourceId, - url: `https://${functionApp.properties.defaultHostName}/api` - }); - } catch (e) { - serverless.cli.log('Error creating APIM Backend'); - serverless.cli.log(JSON.stringify(e.body, null, 4)); - } - } - - function getAdminToken() { - // const webClient = new WebSiteManagementClient(serverless.variables.azureCredentials, serverless.service.provider.subscriptionId); - // const adminTokenResult = await webClient.webApps.getFunctionsAdminToken(serverless.service.provider.resourceGroup, serverless.service.service); - - return new Promise((resolve, reject) => { - const baseUrl = 'https://management.azure.com'; - const getTokenUrl = `${baseUrl}${functionApp.id}/functions/admin/token?api-version=2016-08-01`; - - request.get(getTokenUrl, { - headers: { - 'Authorization': `Bearer ${serverless.variables.azureCredentials.tokenCache._entries[0].accessToken}` - } - }, (err, response) => { - if (err) { - return reject(err); - } - - resolve(response.body.replace(/"/g, '')); - }); - }); - } - - function getMasterKey(authToken) { - return new Promise((resolve, reject) => { - const apiUrl = `https://${functionApp.properties.defaultHostName}/admin/host/systemkeys/_master`; - - request.get(apiUrl, { - json: true, - headers: { - 'Authorization': `Bearer ${authToken}` - } - }, (err, response) => { - if (err) { - return reject(err); - } - - resolve(response.body.value); - }); - }); - } - - async function ensureFunctionAppKey() { - try { - serverless.cli.log('Getting key'); - - const adminToken = await getAdminToken(); - const masterKey = await getMasterKey(adminToken); - - const keyName = `${serverless.service.service}-key`; - - apimClient.property.createOrUpdate(serverless.service.provider.resourceGroup, apimConfig.resourceId, keyName, { - displayName: keyName, - secret: true, - value: masterKey - }); - } catch (e) { - serverless.cli.log('Error creating APIM Property'); - serverless.cli.log(JSON.stringify(e, null, 4)); - } - } -}; diff --git a/src/apim/lib/deployFunctions.js b/src/apim/lib/deployFunctions.js deleted file mode 100644 index 8a243109..00000000 --- a/src/apim/lib/deployFunctions.js +++ /dev/null @@ -1,13 +0,0 @@ -import { deployFunction } from './deployOperation'; - -export const deployFunctions = (serverless) => { - serverless.cli.log('Starting to deploy Operations'); - - const deployApiTasks = serverless.service - .getAllFunctions() - .map((functionName) => { - return deployFunction(serverless, { function: functionName }); - }); - - return Promise.all(deployApiTasks); -}; diff --git a/src/apim/lib/deployOperation.js b/src/apim/lib/deployOperation.js deleted file mode 100644 index 13d59a69..00000000 --- a/src/apim/lib/deployOperation.js +++ /dev/null @@ -1,67 +0,0 @@ -import { ApiManagementClient } from '@azure/arm-apimanagement'; - -/** - * Deploys the APIM configuration for the specified function - * @param serverless The serverless framework - * @param options The plugin options - */ -export const deployFunction = async (serverless, options) => { - const functionConfig = serverless.service.functions[options.function]; - - const tasks = functionConfig.apim.operations.map((operation) => { - return deployOperation(serverless, { - function: options.function, - operation: operation - }); - }); - - await Promise.all(tasks); -}; - - -/** - * Deploys a single APIM api operation for the specified function - * @param serverless The serverless framework - * @param options The plugin options - */ -export const deployOperation = async (serverless, options) => { - serverless.cli.log(`Deploying operation ${options.function}`); - - try { - const apimConfig = serverless.service.provider.apim; - const client = new ApiManagementClient(serverless.variables.azureCredentials, serverless.service.provider.subscriptionId); - - const operationConfig = { - displayName: options.operation.displayName || options.function, - description: options.operation.description || '', - urlTemplate: options.operation.path, - method: options.operation.method, - templateParameters: [], - responses: [], - }; - - await client.apiOperation.createOrUpdate(serverless.service.provider.resourceGroup, apimConfig.resourceId, apimConfig.name, options.function, operationConfig); - await client.apiOperationPolicy.createOrUpdate(serverless.service.provider.resourceGroup, apimConfig.resourceId, apimConfig.name, options.function, { - format: 'rawxml', - value: ` - - - - - - - - - - - - - - - ` - }); - } catch (e) { - serverless.cli.log(`Error deploying operation ${options.function}`); - serverless.cli.log(JSON.stringify(e, null, 4)); - } -}; \ No newline at end of file diff --git a/src/index.js b/src/index.js index 9a8058ae..14c83fc2 100644 --- a/src/index.js +++ b/src/index.js @@ -14,7 +14,8 @@ import '@babel/polyfill'; // import AzurePackageFunction from './package/azurePackageFunction'; import AzureProvider from './provider/azureProvider'; import { AzureLoginPlugin } from './login/loginPlugin'; -import { AzureApimPlugin } from './apim/apimPlugin'; +import { AzureApimServicePlugin } from './apim/apimServicePlugin'; +import { AzureApimFunctionPlugin } from './apim/apimFunctionPlugin'; //import AzureApimFunction from './apim/azureApimFunction'; export class AzureIndex { @@ -29,7 +30,8 @@ export class AzureIndex { //this.serverless.pluginManager.addPlugin(AzureDeploy); //this.serverless.pluginManager.addPlugin(AzureDeployFunction); this.serverless.pluginManager.addPlugin(AzureLoginPlugin); - this.serverless.pluginManager.addPlugin(AzureApimPlugin); + this.serverless.pluginManager.addPlugin(AzureApimServicePlugin); + this.serverless.pluginManager.addPlugin(AzureApimFunctionPlugin); //this.serverless.pluginManager.addPlugin(AzureApimFunction); //this.serverless.pluginManager.addPlugin(AzureInvoke); //this.serverless.pluginManager.addPlugin(AzureLogs); diff --git a/src/login/loginPlugin.js b/src/login/loginPlugin.js index 45969833..b51f26e6 100644 --- a/src/login/loginPlugin.js +++ b/src/login/loginPlugin.js @@ -1,5 +1,5 @@ import open from 'open'; -import { interactiveLoginWithAuthResponse } from '@azure/ms-rest-nodeauth'; +import { interactiveLoginWithAuthResponse, loginWithServicePrincipalSecretWithAuthResponse } from '@azure/ms-rest-nodeauth'; export class AzureLoginPlugin { constructor(serverless, options) { @@ -16,14 +16,25 @@ export class AzureLoginPlugin { async login() { this.serverless.cli.log('Logging into Azure'); + let authResult = null; + + const clientId = process.env.azureServicePrincipalClientId; + const secret = process.env.azureServicePrincipalPassword; + const tenantId = process.env.azureServicePrincipalTenantId; + try { - await open('https://microsoft.com/devicelogin'); - const authResult = await interactiveLoginWithAuthResponse(); + if (clientId && secret && tenantId) { + authResult = await loginWithServicePrincipalSecretWithAuthResponse(clientId, secret, tenantId); + } else { + await open('https://microsoft.com/devicelogin'); + authResult = await interactiveLoginWithAuthResponse(); + } this.serverless.variables.azureCredentials = authResult.credentials; } catch (e) { this.serverless.cli.log('Error logging into azure'); + this.serverless.cli.log(e); } } } \ No newline at end of file From 4cbd291ede3171a7fced087e9b7242fc7a099e92 Mon Sep 17 00:00:00 2001 From: Wallace Breza Date: Thu, 16 May 2019 12:52:04 -0700 Subject: [PATCH 06/19] Added lib/ to git ignore --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index 959eadb0..87a78313 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ node_modules/ +lib/ *.dll From fd8578a2d1fa0760b5c98ef5840a8ca5bcdf2438 Mon Sep 17 00:00:00 2001 From: Tanner Barlow Date: Thu, 16 May 2019 13:51:10 -0700 Subject: [PATCH 07/19] Remove loginToAzure refs --- src/deploy/azureDeploy.js | 3 --- src/deploy/azureDeployFunction.js | 3 --- src/invoke/azureInvoke.js | 3 --- src/logs/azureLogs.js | 5 +---- src/remove/azureRemove.js | 3 --- src/shared/loginToAzure.js | 9 --------- 6 files changed, 1 insertion(+), 25 deletions(-) delete mode 100644 src/shared/loginToAzure.js diff --git a/src/deploy/azureDeploy.js b/src/deploy/azureDeploy.js index e89ef2b6..dc3277eb 100644 --- a/src/deploy/azureDeploy.js +++ b/src/deploy/azureDeploy.js @@ -4,7 +4,6 @@ const BbPromise = require('bluebird'); const CreateResourceGroupAndFunctionApp = require('./lib/CreateResourceGroupAndFunctionApp'); const uploadFunctions = require('./lib/uploadFunctions'); const cleanUpFunctions = require('./lib/cleanUpFunctions'); -const loginToAzure = require('../shared/loginToAzure'); class AzureDeploy { constructor (serverless, options) { @@ -14,7 +13,6 @@ class AzureDeploy { Object.assign( this, - loginToAzure, cleanUpFunctions, CreateResourceGroupAndFunctionApp, uploadFunctions @@ -23,7 +21,6 @@ class AzureDeploy { this.hooks = { 'before:deploy:deploy': () => BbPromise.bind(this) .then(this.provider.initialize(this.serverless, this.options)) - .then(this.loginToAzure) .then(this.cleanUpFunctions), 'deploy:deploy': () => BbPromise.bind(this) diff --git a/src/deploy/azureDeployFunction.js b/src/deploy/azureDeployFunction.js index 14b7432e..eccd835b 100644 --- a/src/deploy/azureDeployFunction.js +++ b/src/deploy/azureDeployFunction.js @@ -2,7 +2,6 @@ const BbPromise = require('bluebird'); const uploadFunction = require('./lib/uploadFunction'); -const loginToAzure = require('../shared/loginToAzure'); class AzureDeployFunction { constructor (serverless, options) { @@ -12,7 +11,6 @@ class AzureDeployFunction { Object.assign( this, - loginToAzure, uploadFunction ); @@ -23,7 +21,6 @@ class AzureDeployFunction { 'deploy:function:deploy': () => BbPromise.bind(this) .then(this.provider.initialize(this.serverless,this.options)) - .then(this.loginToAzure) .then(this.uploadFunction) .then(() => this.serverless.cli.log('Successfully uploaded Function')) }; diff --git a/src/invoke/azureInvoke.js b/src/invoke/azureInvoke.js index 133251b2..2c9160f7 100644 --- a/src/invoke/azureInvoke.js +++ b/src/invoke/azureInvoke.js @@ -3,7 +3,6 @@ const BbPromise = require('bluebird'); const invokeFunction = require('./lib/invokeFunction'); const getAdminKey = require('../shared/getAdminKey'); -const loginToAzure = require('../shared/loginToAzure'); const path = require('path'); class AzureInvoke { @@ -14,7 +13,6 @@ class AzureInvoke { Object.assign( this, - loginToAzure, getAdminKey, invokeFunction ); @@ -35,7 +33,6 @@ class AzureInvoke { // TODO: See ./lib/invokeFunction.js:L10 'before:invoke:invoke': () => BbPromise.bind(this) .then(this.provider.initialize(this.serverless,this.options)) - .then(this.loginToAzure) .then(this.getAdminKey), 'invoke:invoke': () => BbPromise.bind(this) diff --git a/src/logs/azureLogs.js b/src/logs/azureLogs.js index a5b58bdf..df492b46 100644 --- a/src/logs/azureLogs.js +++ b/src/logs/azureLogs.js @@ -2,7 +2,6 @@ const BbPromise = require('bluebird'); const retrieveLogs = require('./lib/retrieveLogs'); -const loginToAzure = require('../shared/loginToAzure'); class AzureLogs { constructor (serverless, options) { @@ -12,14 +11,12 @@ class AzureLogs { Object.assign( this, - loginToAzure, retrieveLogs ); this.hooks = { 'before:logs:logs': () => BbPromise.bind(this) - .then(this.provider.initialize(this.serverless,this.options)) - .then(this.loginToAzure), + .then(this.provider.initialize(this.serverless,this.options)), 'logs:logs': () => BbPromise.bind(this) .then(this.provider.initialize(this.serverless,this.options)) diff --git a/src/remove/azureRemove.js b/src/remove/azureRemove.js index 8e95a8ad..1ec71d87 100644 --- a/src/remove/azureRemove.js +++ b/src/remove/azureRemove.js @@ -2,7 +2,6 @@ const BbPromise = require('bluebird'); const deleteResourceGroup = require('./lib/deleteResourceGroup'); -const loginToAzure = require('../shared/loginToAzure'); class AzureRemove { constructor (serverless, options) { @@ -12,14 +11,12 @@ class AzureRemove { Object.assign( this, - loginToAzure, deleteResourceGroup ); this.hooks = { 'remove:remove': () => BbPromise.bind(this) .then(this.provider.initialize(this.serverless,this.options)) - .then(this.loginToAzure) .then(this.deleteResourceGroup) .then(() => this.serverless.cli.log('Service successfully removed')) }; diff --git a/src/shared/loginToAzure.js b/src/shared/loginToAzure.js deleted file mode 100644 index 4ccaf4db..00000000 --- a/src/shared/loginToAzure.js +++ /dev/null @@ -1,9 +0,0 @@ -'use strict'; - -module.exports = { - loginToAzure () { - this.serverless.cli.log('Logging in to Azure'); - - return this.provider.Login(); - } -}; From c79be38917285db7a8a7aa7b92f7d453a961118a Mon Sep 17 00:00:00 2001 From: Wallace Breza Date: Fri, 17 May 2019 16:35:08 -0700 Subject: [PATCH 08/19] More updates --- .gitignore | 2 +- package.json | 1 + src/deploy/azureDeploy.js | 35 -- src/deploy/azureDeployFunction.js | 30 -- .../lib/CreateResourceGroupAndFunctionApp.js | 8 - src/deploy/lib/cleanUpFunctions.js | 9 - src/deploy/lib/uploadFunction.js | 12 - src/deploy/lib/uploadFunctions.js | 19 - src/index.js | 38 +- src/{ => plugins}/apim/apimFunctionPlugin.js | 6 +- src/{ => plugins}/apim/apimServicePlugin.js | 8 +- .../deploy/azureDeployFunctionPlugin.js | 27 ++ src/plugins/deploy/azureDeployPlugin.js | 34 ++ src/{ => plugins}/invoke/azureInvoke.js | 2 +- .../invoke/lib/invokeFunction.js | 0 src/{ => plugins}/login/loginPlugin.js | 11 +- src/{ => plugins}/logs/azureLogs.js | 0 src/{ => plugins}/logs/lib/retrieveLogs.js | 0 src/{ => plugins}/package/azurePackage.js | 0 .../package/azurePackageFunction.js | 0 .../package/lib/compileEvents.js | 2 +- .../package/lib/compileEventsForFunction.js | 2 +- .../package/lib/webpackFunctionJson.js | 0 src/{ => plugins}/remove/azureRemove.js | 0 .../remove/lib/deleteResourceGroup.js | 0 src/provider/azureProvider.js | 375 +----------------- src/{apim => services}/apimService.js | 86 ++-- src/services/functionAppService.js | 310 +++++++++++++++ src/services/resourceService.js | 36 ++ src/shared/utils.js | 12 +- 30 files changed, 481 insertions(+), 584 deletions(-) delete mode 100644 src/deploy/azureDeploy.js delete mode 100644 src/deploy/azureDeployFunction.js delete mode 100644 src/deploy/lib/CreateResourceGroupAndFunctionApp.js delete mode 100644 src/deploy/lib/cleanUpFunctions.js delete mode 100644 src/deploy/lib/uploadFunction.js delete mode 100644 src/deploy/lib/uploadFunctions.js rename src/{ => plugins}/apim/apimFunctionPlugin.js (71%) rename src/{ => plugins}/apim/apimServicePlugin.js (61%) create mode 100644 src/plugins/deploy/azureDeployFunctionPlugin.js create mode 100644 src/plugins/deploy/azureDeployPlugin.js rename src/{ => plugins}/invoke/azureInvoke.js (95%) rename src/{ => plugins}/invoke/lib/invokeFunction.js (100%) rename src/{ => plugins}/login/loginPlugin.js (64%) rename src/{ => plugins}/logs/azureLogs.js (100%) rename src/{ => plugins}/logs/lib/retrieveLogs.js (100%) rename src/{ => plugins}/package/azurePackage.js (100%) rename src/{ => plugins}/package/azurePackageFunction.js (100%) rename src/{ => plugins}/package/lib/compileEvents.js (91%) rename src/{ => plugins}/package/lib/compileEventsForFunction.js (88%) rename src/{ => plugins}/package/lib/webpackFunctionJson.js (100%) rename src/{ => plugins}/remove/azureRemove.js (100%) rename src/{ => plugins}/remove/lib/deleteResourceGroup.js (100%) rename src/{apim => services}/apimService.js (72%) create mode 100644 src/services/functionAppService.js create mode 100644 src/services/resourceService.js diff --git a/.gitignore b/.gitignore index 87a78313..f2dcb4ff 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,3 @@ node_modules/ -lib/ +/lib *.dll diff --git a/package.json b/package.json index f8540018..8e855a64 100644 --- a/package.json +++ b/package.json @@ -7,6 +7,7 @@ "author": "Azure Functions", "scripts": { "test": "eslint src/**/*.js", + "prebuild": "npm test", "build": "babel src --out-dir lib --presets=@babel/env && cp src/shared/bindings.json lib/shared" }, "repository": { diff --git a/src/deploy/azureDeploy.js b/src/deploy/azureDeploy.js deleted file mode 100644 index dc3277eb..00000000 --- a/src/deploy/azureDeploy.js +++ /dev/null @@ -1,35 +0,0 @@ -'use strict'; - -const BbPromise = require('bluebird'); -const CreateResourceGroupAndFunctionApp = require('./lib/CreateResourceGroupAndFunctionApp'); -const uploadFunctions = require('./lib/uploadFunctions'); -const cleanUpFunctions = require('./lib/cleanUpFunctions'); - -class AzureDeploy { - constructor (serverless, options) { - this.serverless = serverless; - this.options = options; - this.provider = this.serverless.getProvider('azure'); - - Object.assign( - this, - cleanUpFunctions, - CreateResourceGroupAndFunctionApp, - uploadFunctions - ); - - this.hooks = { - 'before:deploy:deploy': () => BbPromise.bind(this) - .then(this.provider.initialize(this.serverless, this.options)) - .then(this.cleanUpFunctions), - - 'deploy:deploy': () => BbPromise.bind(this) - .then(this.provider.initialize(this.serverless,this.options)) - .then(this.CreateResourceGroupAndFunctionApp) - .then(this.uploadFunctions) - .then(() => this.serverless.cli.log('Successfully created Function App')) - }; - } -} - -module.exports = AzureDeploy; diff --git a/src/deploy/azureDeployFunction.js b/src/deploy/azureDeployFunction.js deleted file mode 100644 index eccd835b..00000000 --- a/src/deploy/azureDeployFunction.js +++ /dev/null @@ -1,30 +0,0 @@ -'use strict'; - -const BbPromise = require('bluebird'); -const uploadFunction = require('./lib/uploadFunction'); - -class AzureDeployFunction { - constructor (serverless, options) { - this.serverless = serverless; - this.options = options; - this.provider = this.serverless.getProvider('azure'); - - Object.assign( - this, - uploadFunction - ); - - this.hooks = { - // Spawn 'package:function' to create the single-function zip artifact - 'deploy:function:packageFunction': () => this.serverless.pluginManager - .spawn('package:function'), - - 'deploy:function:deploy': () => BbPromise.bind(this) - .then(this.provider.initialize(this.serverless,this.options)) - .then(this.uploadFunction) - .then(() => this.serverless.cli.log('Successfully uploaded Function')) - }; - } -} - -module.exports = AzureDeployFunction; diff --git a/src/deploy/lib/CreateResourceGroupAndFunctionApp.js b/src/deploy/lib/CreateResourceGroupAndFunctionApp.js deleted file mode 100644 index 522d4ada..00000000 --- a/src/deploy/lib/CreateResourceGroupAndFunctionApp.js +++ /dev/null @@ -1,8 +0,0 @@ -'use strict'; - -module.exports = { - CreateResourceGroupAndFunctionApp () { - return this.provider.CreateResourceGroup() - .then(() => this.provider.CreateFunctionApp()); - } -}; diff --git a/src/deploy/lib/cleanUpFunctions.js b/src/deploy/lib/cleanUpFunctions.js deleted file mode 100644 index 7485d89c..00000000 --- a/src/deploy/lib/cleanUpFunctions.js +++ /dev/null @@ -1,9 +0,0 @@ -'use strict'; - -module.exports = { - cleanUpFunctions () { - return this.provider.isExistingFunctionApp() - .then(() => this.provider.getDeployedFunctionsNames()) - .then(() => this.provider.cleanUpFunctionsBeforeDeploy(this.serverless.service.getAllFunctions())); - } -}; diff --git a/src/deploy/lib/uploadFunction.js b/src/deploy/lib/uploadFunction.js deleted file mode 100644 index ad019d58..00000000 --- a/src/deploy/lib/uploadFunction.js +++ /dev/null @@ -1,12 +0,0 @@ -'use strict'; -const path = require('path'); - -module.exports = { - uploadFunction () { - const functionName = this.options.function; - - return this.provider.uploadFunction(functionName) - .then(() => this.provider.runKuduCommand('mv '+ path.join(functionName, functionName +'-function.json') +' '+ path.join(functionName, 'function.json'))) - .then(() => this.provider.syncTriggers()); - } -}; diff --git a/src/deploy/lib/uploadFunctions.js b/src/deploy/lib/uploadFunctions.js deleted file mode 100644 index 981c07d3..00000000 --- a/src/deploy/lib/uploadFunctions.js +++ /dev/null @@ -1,19 +0,0 @@ -'use strict'; - -const BbPromise = require('bluebird'); -const path = require('path'); - -module.exports = { - uploadFunctions () { - const createFunctionPromises = []; - - this.serverless.service.getAllFunctions().forEach((functionName) => { - - createFunctionPromises.push(this.provider.uploadFunction(functionName) - .then(() => this.provider.runKuduCommand('mv '+ path.join(functionName, functionName +'-function.json') +' '+ path.join(functionName, 'function.json')))); - }); - - return BbPromise.all(createFunctionPromises) - .then(() => this.provider.syncTriggers()); - } -}; diff --git a/src/index.js b/src/index.js index 14c83fc2..793fe225 100644 --- a/src/index.js +++ b/src/index.js @@ -5,18 +5,17 @@ whole provider implementation. */ import '@babel/polyfill'; -// import AzureDeploy from './deploy/azureDeploy'; -// import AzureDeployFunction from './deploy/azureDeployFunction'; -// import AzureInvoke from './invoke/azureInvoke'; -// import AzureLogs from './logs/azureLogs'; -// import AzureRemove from './remove/azureRemove'; -// import AzurePackage from './package/azurePackage'; -// import AzurePackageFunction from './package/azurePackageFunction'; +import AzureInvoke from './plugins/invoke/azureInvoke'; +import AzureLogs from './plugins/logs/azureLogs'; +import AzureRemove from './plugins/remove/azureRemove'; +import AzurePackage from './plugins/package/azurePackage'; +import AzurePackageFunction from './plugins/package/azurePackageFunction'; import AzureProvider from './provider/azureProvider'; -import { AzureLoginPlugin } from './login/loginPlugin'; -import { AzureApimServicePlugin } from './apim/apimServicePlugin'; -import { AzureApimFunctionPlugin } from './apim/apimFunctionPlugin'; -//import AzureApimFunction from './apim/azureApimFunction'; +import { AzureDeployPlugin } from './plugins/deploy/azureDeployPlugin'; +import { AzureDeployFunctionPlugin } from './plugins/deploy/azureDeployFunctionPlugin'; +import { AzureLoginPlugin } from './plugins/login/loginPlugin'; +import { AzureApimServicePlugin } from './plugins/apim/apimServicePlugin'; +import { AzureApimFunctionPlugin } from './plugins/apim/apimFunctionPlugin'; export class AzureIndex { constructor(serverless, options) { @@ -25,17 +24,18 @@ export class AzureIndex { this.serverless.setProvider(AzureProvider.getProviderName(), new AzureProvider(serverless)); - //this.serverless.pluginManager.addPlugin(AzurePackage); - //this.serverless.pluginManager.addPlugin(AzurePackageFunction); - //this.serverless.pluginManager.addPlugin(AzureDeploy); - //this.serverless.pluginManager.addPlugin(AzureDeployFunction); + // To be refactored + this.serverless.pluginManager.addPlugin(AzurePackage); + this.serverless.pluginManager.addPlugin(AzurePackageFunction); + this.serverless.pluginManager.addPlugin(AzureInvoke); + this.serverless.pluginManager.addPlugin(AzureLogs); + this.serverless.pluginManager.addPlugin(AzureRemove); + // Refactored this.serverless.pluginManager.addPlugin(AzureLoginPlugin); + this.serverless.pluginManager.addPlugin(AzureDeployPlugin); + this.serverless.pluginManager.addPlugin(AzureDeployFunctionPlugin); this.serverless.pluginManager.addPlugin(AzureApimServicePlugin); this.serverless.pluginManager.addPlugin(AzureApimFunctionPlugin); - //this.serverless.pluginManager.addPlugin(AzureApimFunction); - //this.serverless.pluginManager.addPlugin(AzureInvoke); - //this.serverless.pluginManager.addPlugin(AzureLogs); - //this.serverless.pluginManager.addPlugin(AzureRemove); } } diff --git a/src/apim/apimFunctionPlugin.js b/src/plugins/apim/apimFunctionPlugin.js similarity index 71% rename from src/apim/apimFunctionPlugin.js rename to src/plugins/apim/apimFunctionPlugin.js index b904eac1..09aec6b5 100644 --- a/src/apim/apimFunctionPlugin.js +++ b/src/plugins/apim/apimFunctionPlugin.js @@ -1,12 +1,10 @@ -import { ApimService } from './apimService'; +import { ApimService } from '../../services/apimService'; export class AzureApimFunctionPlugin { constructor(serverless, options) { this.serverless = serverless; this.options = options; - this.serverless.cli.log('Initializing Azure APIM function plugin'); - this.hooks = { 'after:deploy:function:deploy': this.deploy.bind(this) }; @@ -18,6 +16,6 @@ export class AzureApimFunctionPlugin { const apimService = new ApimService(this.serverless, this.options); await apimService.deployFunction(this.options); - this.serverless.cli.log('Successfully deployed function'); + this.serverless.cli.log('Finished APIM function deployment'); } } \ No newline at end of file diff --git a/src/apim/apimServicePlugin.js b/src/plugins/apim/apimServicePlugin.js similarity index 61% rename from src/apim/apimServicePlugin.js rename to src/plugins/apim/apimServicePlugin.js index 04aa22ae..22944c1a 100644 --- a/src/apim/apimServicePlugin.js +++ b/src/plugins/apim/apimServicePlugin.js @@ -1,24 +1,22 @@ -import { ApimService } from './apimService'; +import { ApimService } from '../../services/apimService'; export class AzureApimServicePlugin { constructor(serverless, options) { this.serverless = serverless; this.options = options; - this.serverless.cli.log('Initializing Azure APIM plugin'); - this.hooks = { 'after:deploy:deploy': this.deploy.bind(this) }; } async deploy() { - this.serverless.cli.log('Starting APIM deployment'); + this.serverless.cli.log('Starting APIM service deployment'); const apimService = new ApimService(this.serverless, this.options); await apimService.deployApi(); await apimService.deployFunctions(); - this.serverless.cli.log('Successfully deployed API Management API & Operations'); + this.serverless.cli.log('Finished APIM service deployment'); } } \ No newline at end of file diff --git a/src/plugins/deploy/azureDeployFunctionPlugin.js b/src/plugins/deploy/azureDeployFunctionPlugin.js new file mode 100644 index 00000000..db912600 --- /dev/null +++ b/src/plugins/deploy/azureDeployFunctionPlugin.js @@ -0,0 +1,27 @@ +import { FunctionAppService } from '../../services/functionAppService'; + +export class AzureDeployFunctionPlugin { + constructor(serverless, options) { + this.serverless = serverless; + this.options = options; + + this.hooks = { + 'deploy:function:packageFunction': this.beforeDeploy.bind(this), + 'deploy:function:deploy': this.deploy.bind(this, options) + }; + } + + async beforeDeploy() { + // Spawn 'package:function' to create the single-function zip artifact + this.serverless.pluginManager.spawn('package:function'); + } + + async deploy() { + const functionAppService = new FunctionAppService(this.serverless, this.options); + const functionApp = await functionAppService.get(); + + await functionAppService.deleteFunction(this.options.function); + await functionAppService.uploadFunction(functionApp, this.options.function); + await functionAppService.syncTriggers(functionApp); + } +} diff --git a/src/plugins/deploy/azureDeployPlugin.js b/src/plugins/deploy/azureDeployPlugin.js new file mode 100644 index 00000000..23005683 --- /dev/null +++ b/src/plugins/deploy/azureDeployPlugin.js @@ -0,0 +1,34 @@ +import { ResourceService } from '../../services/resourceService'; +import { FunctionAppService } from '../../services/functionAppService'; + +export class AzureDeployPlugin { + constructor(serverless, options) { + this.serverless = serverless; + this.options = options; + + this.hooks = { + 'before:deploy:deploy': this.beforeDeploy.bind(this), + 'deploy:deploy': this.deploy.bind(this) + }; + } + + async beforeDeploy() { + const functionAppService = new FunctionAppService(this.serverless, this.options); + const functionApp = await functionAppService.get(); + + if (functionApp) { + await functionAppService.cleanUp(functionApp); + } + } + + async deploy() { + const resourceService = new ResourceService(this.serverless, this.options); + await resourceService.deployResourceGroup(); + + const functionAppService = new FunctionAppService(this.serverless, this.options); + const functionApp = await functionAppService.deploy(); + + await functionAppService.uploadFunctions(functionApp); + await functionAppService.syncTriggers(functionApp); + } +} diff --git a/src/invoke/azureInvoke.js b/src/plugins/invoke/azureInvoke.js similarity index 95% rename from src/invoke/azureInvoke.js rename to src/plugins/invoke/azureInvoke.js index 2c9160f7..15fbae36 100644 --- a/src/invoke/azureInvoke.js +++ b/src/plugins/invoke/azureInvoke.js @@ -2,7 +2,7 @@ const BbPromise = require('bluebird'); const invokeFunction = require('./lib/invokeFunction'); -const getAdminKey = require('../shared/getAdminKey'); +const getAdminKey = require('../../shared/getAdminKey'); const path = require('path'); class AzureInvoke { diff --git a/src/invoke/lib/invokeFunction.js b/src/plugins/invoke/lib/invokeFunction.js similarity index 100% rename from src/invoke/lib/invokeFunction.js rename to src/plugins/invoke/lib/invokeFunction.js diff --git a/src/login/loginPlugin.js b/src/plugins/login/loginPlugin.js similarity index 64% rename from src/login/loginPlugin.js rename to src/plugins/login/loginPlugin.js index b51f26e6..cc6e5bd1 100644 --- a/src/login/loginPlugin.js +++ b/src/plugins/login/loginPlugin.js @@ -5,8 +5,7 @@ export class AzureLoginPlugin { constructor(serverless, options) { this.serverless = serverless; this.options = options; - - this.serverless.cli.log('Initializing Azure Login plugin'); + this.provider = this.serverless.getProvider('azure'); this.hooks = { 'before:deploy:initialize': this.login.bind(this) @@ -18,19 +17,25 @@ export class AzureLoginPlugin { let authResult = null; + const subscriptionId = process.env.azureSubId; const clientId = process.env.azureServicePrincipalClientId; const secret = process.env.azureServicePrincipalPassword; const tenantId = process.env.azureServicePrincipalTenantId; try { - if (clientId && secret && tenantId) { + if (subscriptionId && clientId && secret && tenantId) { authResult = await loginWithServicePrincipalSecretWithAuthResponse(clientId, secret, tenantId); } else { await open('https://microsoft.com/devicelogin'); authResult = await interactiveLoginWithAuthResponse(); } + this.provider.credentials = authResult.credentials; + this.provider.subscriptionId = authResult.subscriptionId || subscriptionId; + this.provider.accessToken = authResult.credentials.tokenCache._entries[0].accessToken; + this.serverless.variables.azureAccessToken = authResult.credentials.tokenCache._entries[0].accessToken; this.serverless.variables.azureCredentials = authResult.credentials; + this.serverless.variables.subscriptionId = authResult.subscriptionId || subscriptionId; } catch (e) { this.serverless.cli.log('Error logging into azure'); diff --git a/src/logs/azureLogs.js b/src/plugins/logs/azureLogs.js similarity index 100% rename from src/logs/azureLogs.js rename to src/plugins/logs/azureLogs.js diff --git a/src/logs/lib/retrieveLogs.js b/src/plugins/logs/lib/retrieveLogs.js similarity index 100% rename from src/logs/lib/retrieveLogs.js rename to src/plugins/logs/lib/retrieveLogs.js diff --git a/src/package/azurePackage.js b/src/plugins/package/azurePackage.js similarity index 100% rename from src/package/azurePackage.js rename to src/plugins/package/azurePackage.js diff --git a/src/package/azurePackageFunction.js b/src/plugins/package/azurePackageFunction.js similarity index 100% rename from src/package/azurePackageFunction.js rename to src/plugins/package/azurePackageFunction.js diff --git a/src/package/lib/compileEvents.js b/src/plugins/package/lib/compileEvents.js similarity index 91% rename from src/package/lib/compileEvents.js rename to src/plugins/package/lib/compileEvents.js index 8ce56f5a..d88a3f99 100644 --- a/src/package/lib/compileEvents.js +++ b/src/plugins/package/lib/compileEvents.js @@ -1,7 +1,7 @@ 'use strict'; const BbPromise = require('bluebird'); -const utils = require('../../shared/utils'); +const utils = require('../../../shared/utils'); module.exports = { compileEvents() { diff --git a/src/package/lib/compileEventsForFunction.js b/src/plugins/package/lib/compileEventsForFunction.js similarity index 88% rename from src/package/lib/compileEventsForFunction.js rename to src/plugins/package/lib/compileEventsForFunction.js index 50939f48..f4e129a8 100644 --- a/src/package/lib/compileEventsForFunction.js +++ b/src/plugins/package/lib/compileEventsForFunction.js @@ -1,6 +1,6 @@ 'use strict'; -const utils = require('../../shared/utils'); +const utils = require('../../../shared/utils'); module.exports = { compileEventsForFunction() { diff --git a/src/package/lib/webpackFunctionJson.js b/src/plugins/package/lib/webpackFunctionJson.js similarity index 100% rename from src/package/lib/webpackFunctionJson.js rename to src/plugins/package/lib/webpackFunctionJson.js diff --git a/src/remove/azureRemove.js b/src/plugins/remove/azureRemove.js similarity index 100% rename from src/remove/azureRemove.js rename to src/plugins/remove/azureRemove.js diff --git a/src/remove/lib/deleteResourceGroup.js b/src/plugins/remove/lib/deleteResourceGroup.js similarity index 100% rename from src/remove/lib/deleteResourceGroup.js rename to src/plugins/remove/lib/deleteResourceGroup.js diff --git a/src/provider/azureProvider.js b/src/provider/azureProvider.js index d1b53ee8..db52f0f9 100644 --- a/src/provider/azureProvider.js +++ b/src/provider/azureProvider.js @@ -1,26 +1,13 @@ const BbPromise = require('bluebird'); -const _ = require('lodash'); -const resourceManagement = require('azure-arm-resource'); const path = require('path'); const fs = require('fs'); const request = require('request'); -const dns = require('dns'); -const jsonpath = require('jsonpath'); const parseBindings = require('../shared/parseBindings'); const config = require('../config'); -import { interactiveLoginWithAuthResponse } from '@azure/ms-rest-nodeauth'; -const pkg = require('../../package.json'); - -let resourceGroupName; -let deploymentName; let functionAppName; -let subscriptionId; let functionsAdminKey; let invocationId; -let principalCredentials; -let existingFunctionApp = false; -const deployedFunctionNames = []; export default class AzureProvider { static getProviderName() { @@ -46,8 +33,6 @@ export default class AzureProvider { return new BbPromise((resolve) => { functionAppName = this.serverless.service.service; - resourceGroupName = this.serverless.service.provider.resourceGroup || `${functionAppName}-rg`; - deploymentName = this.serverless.service.provider.deploymentName || `${resourceGroupName}-deployment`; resolve(); }); @@ -61,152 +46,12 @@ export default class AzureProvider { return this.parsedBindings; } - async Login() { - try { - const authResult = await interactiveLoginWithAuthResponse(); - - return { - principalCredentials: authResult.credentials, - subscriptionId: authResult.subscriptionId - }; - } - catch (error) { - error.message = error.message || (error.body ? error.body.message : 'Failed logging in to Azure'); - throw error; - } - } - - CreateResourceGroup() { - const groupParameters = { - location: this.serverless.service.provider.location, - tags: { sampletag: 'sampleValue' } - }; - - this.serverless.cli.log(`Creating resource group: ${resourceGroupName}`); - const resourceClient = new resourceManagement.ResourceManagementClient(principalCredentials, subscriptionId); - resourceClient.addUserAgentInfo(`${pkg.name}/${pkg.version}`); - - return new BbPromise((resolve, reject) => { - resourceClient.resourceGroups.createOrUpdate(resourceGroupName, - groupParameters, (error, result) => { - if (error) return reject(error); - resolve(result); - }); - }); - } - - CreateFunctionApp() { - this.serverless.cli.log(`Creating function app: ${functionAppName}`); - const resourceClient = new resourceManagement.ResourceManagementClient(principalCredentials, subscriptionId); - let parameters = { functionAppName: { value: functionAppName } }; - resourceClient.addUserAgentInfo(`${pkg.name}/${pkg.version}`); - - const gitUrl = this.serverless.service.provider.gitUrl; - - if (gitUrl) { - parameters = { - functionAppName: { value: functionAppName }, - gitUrl: { value: gitUrl } - }; - } - - let templateFilePath = path.join(__dirname, 'armTemplates', 'azuredeploy.json'); - - if (gitUrl) { - templateFilePath = path.join(__dirname, 'armTemplates', 'azuredeployWithGit.json'); - } - if (this.serverless.service.provider.armTemplate) { - templateFilePath = path.join(this.serverless.config.servicePath, this.serverless.service.provider.armTemplate.file); - const userParameters = this.serverless.service.provider.armTemplate.parameters; - const userParametersKeys = Object.keys(userParameters); - - for (let paramIndex = 0; paramIndex < userParametersKeys.length; paramIndex++) { - const item = {}; - - item[userParametersKeys[paramIndex]] = { 'value': userParameters[userParametersKeys[paramIndex]] }; - parameters = _.merge(parameters, item); - } - } - - let template = JSON.parse(fs.readFileSync(templateFilePath, 'utf8')); - - // Check if there are custom environment variables defined that need to be - // added to the ARM template used in the deployment. - const environmentVariables = this.serverless.service.provider.environment; - if (environmentVariables) { - const appSettingsPath = '$.resources[?(@.kind=="functionapp")].properties.siteConfig.appSettings'; - - jsonpath.apply(template, appSettingsPath, function (appSettingsList) { - Object.keys(environmentVariables).forEach(function (key) { - appSettingsList.push({ - name: key, - value: environmentVariables[key] - }); - }); - - return appSettingsList; - }); - } - - const deploymentParameters = { - properties: { - mode: 'Incremental', - parameters, - template - } - }; - - return new BbPromise((resolve, reject) => { - resourceClient.deployments.createOrUpdate(resourceGroupName, - deploymentName, - deploymentParameters, (error, result) => { - if (error) return reject(error); - - this.serverless.cli.log('Waiting for Kudu endpoint...'); - - setTimeout(() => { - resolve(result); - }, 10000); - }); - }); - } - - DeleteDeployment() { - this.serverless.cli.log(`Deleting deployment: ${deploymentName}`); - const resourceClient = new resourceManagement.ResourceManagementClient(principalCredentials, subscriptionId); - resourceClient.addUserAgentInfo(`${pkg.name}/${pkg.version}`); - - return new BbPromise((resolve, reject) => { - resourceClient.deployments.deleteMethod(resourceGroupName, - deploymentName, (error, result) => { - if (error) return reject(error); - resolve(result); - }); - }); - } - - DeleteResourceGroup() { - this.serverless.cli.log(`Deleting resource group: ${resourceGroupName}`); - const resourceClient = new resourceManagement.ResourceManagementClient(principalCredentials, subscriptionId); - resourceClient.addUserAgentInfo(`${pkg.name}/${pkg.version}`); - - return new BbPromise((resolve, reject) => { - resourceClient.resourceGroups.deleteMethod(resourceGroupName, (error, result) => { - if (error) { - reject(error); - } else { - resolve(result); - } - }); - }); - } - getAdminKey() { const options = { url: `https://${functionAppName}${config.scmDomain}${config.masterKeyApiPath}`, json: true, headers: { - Authorization: config.bearer + principalCredentials.tokenCache._entries[0].accessToken + Authorization: config.bearer + this.credentials.tokenCache._entries[0].accessToken } }; @@ -250,69 +95,11 @@ export default class AzureProvider { }); } - isExistingFunctionApp() { - const host = functionAppName + config.scmDomain; - - return new BbPromise((resolve, reject) => { - dns.resolve4(host, (err) => { - if (err) { - if (err.message.includes('ENOTFOUND')) { - resolve(existingFunctionApp); - } else { - reject(err); - } - } else { - existingFunctionApp = true; - resolve(existingFunctionApp); - } - }); - }); - } - - getDeployedFunctionsNames() { - const requestUrl = `https://${functionAppName}${config.scmDomain}${config.functionsApiPath}`; - const options = { - host: functionAppName + config.scmDomain, - method: 'get', - url: requestUrl, - json: true, - headers: { - Authorization: config.bearer + principalCredentials.tokenCache._entries[0].accessToken, - Accept: 'application/json,*/*' - } - }; - - return new BbPromise((resolve, reject) => { - if (existingFunctionApp) { - this.serverless.cli.log('Looking for deployed functions that are not part of the current deployment...'); - request(options, (err, res, body) => { - if (err) { - if (err.message.includes('ENOTFOUND')) { - resolve(res); - } else { - reject(err); - } - } else { - if (res.statusCode === 200) { - - for (let functionNamesIndex = 0; functionNamesIndex < body.length; functionNamesIndex++) { - deployedFunctionNames.push(body[functionNamesIndex].name); - } - } - resolve(res); - } - }); - } else { - resolve('New service...'); - } - }); - } - getLogsStream(functionName) { const logOptions = { url: `https://${functionAppName}${config.scmDomain}${config.logStreamApiPath}${functionName}`, headers: { - Authorization: config.bearer + principalCredentials.tokenCache._entries[0].accessToken, + Authorization: config.bearer + this.credentials.tokenCache._entries[0].accessToken, Accept: '*/*' } }; @@ -332,7 +119,7 @@ export default class AzureProvider { method: 'GET', json: true, headers: { - Authorization: config.bearer + principalCredentials.tokenCache._entries[0].accessToken + Authorization: config.bearer + this.credentials.tokenCache._entries[0].accessToken } }; @@ -355,7 +142,7 @@ export default class AzureProvider { method: 'GET', json: true, headers: { - Authorization: config.bearer + principalCredentials.tokenCache._entries[0].accessToken + Authorization: config.bearer + this.credentials.tokenCache._entries[0].accessToken } }; @@ -436,110 +223,6 @@ export default class AzureProvider { }); } - syncTriggers() { - const requestUrl = [ - `https://management.azure.com/subscriptions/${subscriptionId}`, - `/resourceGroups/${resourceGroupName}/providers/Microsoft.Web/sites/`, - `${functionAppName}/functions/synctriggers?api-version=2015-08-01` - ].join(''); - const options = { - host: 'management.azure.com', - method: 'post', - body: {}, - url: requestUrl, - json: true, - headers: { - Authorization: config.bearer + principalCredentials.tokenCache._entries[0].accessToken, - 'Accept': 'application/json,*/*' - } - }; - - return new BbPromise((resolve, reject) => { - request(options, (err, res) => { - if (err) { - reject(err); - } - this.serverless.cli.log(`Syncing Triggers....Response statuscode: ${res.statusCode}`); - resolve(res); - }); - }); - - } - - runKuduCommand(command) { - this.serverless.cli.log(`Running Kudu command ${command}...`); - const requestUrl = `https://${functionAppName}${config.scmDomain}${config.scmCommandApiPath}`; - let postBody = { - command: command, - dir: 'site\\wwwroot' - }; - let options = { - host: functionAppName + config.scmDomain, - method: 'post', - body: postBody, - url: requestUrl, - json: true, - headers: { - Authorization: config.bearer + principalCredentials.tokenCache._entries[0].accessToken, - Accept: 'application/json' - } - }; - - return new BbPromise((resolve, reject) => { - request(options, (err, res, body) => { - if (err) return reject(err); - - // - // TODO: There is a case where the body will contain an error, but it's - // not actually an error. These are warnings from npm install. - // - - if (res.statusCode !== 200) { - return body && body.Error ? reject(body.Error) : reject('Error executing command, try again later.'); - } - - resolve(res); - }); - }); - } - - cleanUpFunctionsBeforeDeploy(serverlessFunctions) { - const deleteFunctionPromises = []; - - deployedFunctionNames.forEach((functionName) => { - if (serverlessFunctions.indexOf(functionName) < 0) { - this.serverless.cli.log(`Deleting function : ${functionName}`); - deleteFunctionPromises.push(this.deleteFunction(functionName)); - } - }); - - return BbPromise.all(deleteFunctionPromises); - } - - deleteFunction(functionName) { - const requestUrl = `https://${functionAppName}${config.scmDomain}${config.scmVfsPath}${functionName}/?recursive=true`; - const options = { - host: functionAppName + config.scmDomain, - method: 'delete', - url: requestUrl, - json: true, - headers: { - Authorization: config.bearer + principalCredentials.tokenCache._entries[0].accessToken, - Accept: '*/*' - } - }; - - return new BbPromise((resolve, reject) => { - request(options, (err, res) => { - if (err) { - reject(err); - } else { - resolve(res); - } - }); - }); - } - uploadPackageJson() { const packageJsonFilePath = path.join(this.serverless.config.servicePath, 'package.json'); this.serverless.cli.log('Uploading package.json...'); @@ -551,7 +234,7 @@ export default class AzureProvider { url: requestUrl, json: true, headers: { - Authorization: config.bearer + principalCredentials.tokenCache._entries[0].accessToken, + Authorization: config.bearer + this.credentials.tokenCache._entries[0].accessToken, Accept: '*/*' } }; @@ -582,52 +265,4 @@ export default class AzureProvider { resolve(); }); } - - uploadFunction(functionName) { - return new BbPromise((resolve, reject) => { - this.serverless.cli.log(`Uploading function: ${functionName}`); - - var functionZipFile = ''; - - if (this.serverless.service.functions[functionName].package.artifact) { - functionZipFile = this.serverless.service.functions[functionName].package.artifact; - } else if (this.serverless.service.artifact) { - functionZipFile = this.serverless.service.artifact; - } else { - reject('Could not find zip package'); - } - - const requestUrl = `https://${functionAppName}${config.scmDomain}${config.scmZipApiPath}/${functionName}/`; - const options = { - url: requestUrl, - headers: { - Authorization: config.bearer + principalCredentials.tokenCache._entries[0].accessToken, - Accept: '*/*' - } - }; - - fs.createReadStream(functionZipFile) - .pipe(request.put(options, (uploadZipErr, uploadZipResponse) => { - if (uploadZipErr) { - reject(uploadZipErr); - } else { - resolve(uploadZipResponse); - } - })); - }); - } - - deployApi() { - return new BbPromise((resolve) => { - this.serverless.cli.log('Deploying APIM API'); - setTimeout(resolve, 1000); - }); - } - - deployApiOperation(functionName) { - return new BbPromise((resolve) => { - this.serverless.cli.log(`Deploying APIM operation for function: ${functionName}`); - setTimeout(resolve, 1000); - }); - } } diff --git a/src/apim/apimService.js b/src/services/apimService.js similarity index 72% rename from src/apim/apimService.js rename to src/services/apimService.js index 5e1db794..2cce4874 100644 --- a/src/apim/apimService.js +++ b/src/services/apimService.js @@ -1,6 +1,6 @@ import { ApiManagementClient } from '@azure/arm-apimanagement'; import { ResourceManagementClient } from '@azure/arm-resources'; -import request from 'request'; +import { FunctionAppService } from './functionAppService'; /** * APIM Service handles deployment and integration with Azure API Management @@ -13,30 +13,40 @@ export class ApimService { this.serviceName = serverless.service.service; this.credentials = serverless.variables.azureCredentials; - this.subscriptionId = serverless.service.provider.subscriptionId; - this.resourceGroup = serverless.service.provider.resourceGroup; + this.subscriptionId = serverless.variables.subscriptionId; + this.resourceGroup = serverless.service.provider.resourceGroup || `${this.serviceName}-rg`; + this.deploymentName = serverless.service.provider.deploymentName || `${this.resourceGroup}-deployment`; this.resourceId = `/subscriptions/${this.subscriptionId}/resourceGroups/${this.resourceGroup}/providers/Microsoft.Web/sites/${this.serviceName}`; this.resourceClient = new ResourceManagementClient(this.credentials, this.subscriptionId); this.apimClient = new ApiManagementClient(this.credentials, this.subscriptionId); + this.functionAppService = new FunctionAppService(serverless, options); } /** * Deploys the APIM top level api */ async deployApi() { - const functionApp = await this.resourceClient.resources.getById(this.resourceId, '2018-11-01'); + if (!this.config) { + return; + } + + const functionApp = await this.functionAppService.get(); await this.ensureApi(); - await this.ensureFunctionAppKeys(functionApp.properties.defaultHostName); - await this.ensureBackend(functionApp.properties.defaultHostName); + await this.ensureFunctionAppKeys(functionApp); + await this.ensureBackend(functionApp); } /** * Deploys all the functions of the serverless service to APIM */ async deployFunctions() { + if (!this.config) { + return; + } + this.serverless.cli.log('Starting to deploy API Operations'); const deployApiTasks = this.serverless.service @@ -53,6 +63,10 @@ export class ApimService { async deployFunction(options) { const functionConfig = this.serverless.service.functions[options.function]; + if (!functionConfig.apim) { + return; + } + const tasks = functionConfig.apim.operations.map((operation) => { return this.deployOperation({ function: options.function, @@ -87,9 +101,9 @@ export class ApimService { * Deploys the APIM Backend referenced by the serverless service * @param functionAppUrl The host name for the deployed function app */ - async ensureBackend(functionAppUrl) { + async ensureBackend(functionApp) { try { - const functionAppResourceId = `https://management.azure.com${this.resourceId}`; + const functionAppResourceId = `https://management.azure.com${functionApp.id}`; await this.apimClient.backend.createOrUpdate(this.resourceGroup, this.config.resourceId, this.serviceName, { credentials: { @@ -100,7 +114,7 @@ export class ApimService { description: this.serviceName, protocol: 'http', resourceId: functionAppResourceId, - url: `https://${functionAppUrl}/api` + url: `https://${functionApp.defaultHostName}/api` }); } catch (e) { this.serverless.cli.log('Error creating APIM Backend'); @@ -114,7 +128,7 @@ export class ApimService { * @param options The plugin options */ async deployOperation(options) { - this.serverless.cli.log(`Deploying API operation ${options.function}`); + this.serverless.cli.log(`-> Deploying API operation ${options.function}`); try { const client = new ApiManagementClient(this.credentials, this.subscriptionId); @@ -158,11 +172,9 @@ export class ApimService { * Gets the master key for the function app and stores a reference in the APIM instance * @param functionAppUrl The host name for the Azure function app */ - async ensureFunctionAppKeys(functionAppUrl) { + async ensureFunctionAppKeys(functionApp) { try { - const adminToken = await this.getAdminToken(); - const masterKey = await this.getMasterKey(functionAppUrl, adminToken); - + const masterKey = await this.functionAppService.getMasterKey(functionApp); const keyName = `${this.serviceName}-key`; this.apimClient.property.createOrUpdate(this.resourceGroup, this.config.resourceId, keyName, { @@ -175,50 +187,4 @@ export class ApimService { this.serverless.cli.log(JSON.stringify(e, null, 4)); } } - - /** - * Gets a short lived admin token used to retrieve function keys - */ - async getAdminToken() { - return new Promise((resolve, reject) => { - const baseUrl = 'https://management.azure.com'; - const getTokenUrl = `${baseUrl}${this.resourceId}/functions/admin/token?api-version=2016-08-01`; - - request.get(getTokenUrl, { - headers: { - 'Authorization': `Bearer ${this.credentials.tokenCache._entries[0].accessToken}` - } - }, (err, response) => { - if (err) { - return reject(err); - } - - resolve(response.body.replace(/"/g, '')); - }); - }); - } - - /** - * Gets the master key for the specified function app - * @param functionAppUrl The function app url - * @param authToken The JWT access token used for authorization - */ - getMasterKey(functionAppUrl, authToken) { - return new Promise((resolve, reject) => { - const apiUrl = `https://${functionAppUrl}/admin/host/systemkeys/_master`; - - request.get(apiUrl, { - json: true, - headers: { - 'Authorization': `Bearer ${authToken}` - } - }, (err, response) => { - if (err) { - return reject(err); - } - - resolve(response.body.value); - }); - }); - } } diff --git a/src/services/functionAppService.js b/src/services/functionAppService.js new file mode 100644 index 00000000..75d2e6a7 --- /dev/null +++ b/src/services/functionAppService.js @@ -0,0 +1,310 @@ +import fs from 'fs'; +import path from 'path'; +import axios from 'axios'; +import request from 'request'; +import jsonpath from 'jsonpath'; +import _ from 'lodash'; +import { ResourceManagementClient } from '@azure/arm-resources'; +import { WebSiteManagementClient } from '@azure/arm-appservice'; + +export class FunctionAppService { + constructor(serverless, options) { + this.serverless = serverless; + this.options = options; + + this.baseUrl = 'https://management.azure.com'; + this.serviceName = serverless.service.service; + this.credentials = serverless.variables.azureCredentials; + this.subscriptionId = serverless.variables.subscriptionId; + this.resourceGroup = serverless.service.provider.resourceGroup || `${this.serviceName}-rg`; + this.deploymentName = serverless.service.provider.deploymentName || `${this.resourceGroup}-deployment`; + + this.resourceId = `/subscriptions/${this.subscriptionId}/resourceGroups/${this.resourceGroup}/providers/Microsoft.Web/sites/${this.serviceName}`; + this.resourceClient = new ResourceManagementClient(this.credentials, this.subscriptionId); + this.webClient = new WebSiteManagementClient(this.credentials, this.subscriptionId); + } + + async get() { + const response = await this.webClient.webApps.get(this.resourceGroup, this.serviceName); + if (response.error && response.error.code === 'ResourceNotFound') { + return null; + } + + return response; + } + + async getMasterKey(functionApp) { + functionApp = functionApp || await this.get(); + const adminToken = await this._getAuthKey(functionApp); + + return await this._getMasterKey(functionApp.defaultHostName, adminToken); + } + + async deleteFunction(functionName) { + this.serverless.cli.log(`-> Deleting function: ${functionName}`); + return await this.webClient.webApps.deleteFunction(this.resourceGroup, this.serviceName, functionName); + } + + async syncTriggers(functionApp) { + this.serverless.cli.log('Syncing function triggers'); + + const syncTriggersUrl = `${this.baseUrl}${functionApp.id}/syncfunctiontriggers?api-version=2016-08-01`; + + await axios.post(syncTriggersUrl, { + headers: { + 'Authorization': `Bearer ${this.credentials.tokenCache._entries[0].accessToken}` + } + }); + } + + async cleanUp(functionApp) { + this.serverless.cli.log('Cleaning up existing functions'); + const deleteTasks = []; + + const serviceFunctions = this.serverless.service.getAllFunctions(); + const deployedFunctions = await this.listFunctions(functionApp); + + deployedFunctions.forEach((func) => { + if (serviceFunctions.includes(func.name)) { + this.serverless.cli.log(`-> Deleting function '${func.name}'`); + deleteTasks.push(this.deleteFunction(func.name)); + } + }); + + return await Promise.all(deleteTasks); + } + + async listFunctions(functionApp) { + const getTokenUrl = `${this.baseUrl}${functionApp.id}/functions?api-version=2016-08-01`; + + const response = await axios.get(getTokenUrl, { + headers: { + 'Authorization': `Bearer ${this.credentials.tokenCache._entries[0].accessToken}` + } + }); + + return response.data.value || []; + } + + async uploadFunctions(functionApp) { + this.serverless.cli.log('Creating azure functions'); + this.serverless.cli.log('-> Uploading service package'); + + const scmDomain = functionApp.enabledHostNames[0]; + const serviceZipFile = this.serverless.service.artifact; + + // Upload zip package + const requestOptions = { + method: 'POST', + uri: `https://${scmDomain}/api/zipdeploy`, + headers: { + Authorization: `Bearer ${this.credentials.tokenCache._entries[0].accessToken}`, + } + }; + + await this._sendFile(requestOptions, serviceZipFile); + + // Perform additional operations per function + const serviceFunctions = this.serverless.service.getAllFunctions(); + const uploadTasks = serviceFunctions.map((functionName) => this.uploadFunction(functionApp, functionName)); + + return await Promise.all(uploadTasks); + } + + async uploadFunction(functionApp, functionName) { + this.serverless.cli.log(`-> Creating function: ${functionName}`); + + const scmDomain = functionApp.enabledHostNames[0]; + + // Upload function artifact if it exists, otherwise the full service is handled in 'uploadFunctions' method + const functionZipFile = this.serverless.service.functions[functionName].package.artifact; + if (functionZipFile) { + this.serverless.cli.log(`-> Uploading function package: ${functionName}`); + + const requestOptions = { + method: 'PUT', + uri: `https://${scmDomain}/api/zip/site/wwwroot/${functionName}`, + headers: { + Authorization: `Bearer ${this.credentials.tokenCache._entries[0].accessToken}`, + } + }; + + await this._sendFile(requestOptions, functionZipFile); + } + + // Rename function json + const fromPath = `${functionName}-function.json`; + const toPath = path.join(functionName, 'function.json'); + const command = `mv ${fromPath} ${toPath}`; + await this._runKuduCommand(functionApp, command); + } + + async deploy() { + this.serverless.cli.log(`Creating function app: ${this.serviceName}`); + let parameters = { functionAppName: { value: this.serviceName } }; + + const gitUrl = this.serverless.service.provider.gitUrl; + + if (gitUrl) { + parameters = { + functionAppName: { value: this.serviceName }, + gitUrl: { value: gitUrl } + }; + } + + let templateFilePath = path.join(__dirname, 'armTemplates', 'azuredeploy.json'); + + if (gitUrl) { + templateFilePath = path.join(__dirname, 'armTemplates', 'azuredeployWithGit.json'); + } + + if (this.serverless.service.provider.armTemplate) { + this.serverless.cli.log(`-> Deploying custom ARM template: ${this.serverless.service.provider.armTemplate.file}`); + templateFilePath = path.join(this.serverless.config.servicePath, this.serverless.service.provider.armTemplate.file); + const userParameters = this.serverless.service.provider.armTemplate.parameters; + const userParametersKeys = Object.keys(userParameters); + + for (let paramIndex = 0; paramIndex < userParametersKeys.length; paramIndex++) { + const item = {}; + + item[userParametersKeys[paramIndex]] = { 'value': userParameters[userParametersKeys[paramIndex]] }; + parameters = _.merge(parameters, item); + } + } + + let template = JSON.parse(fs.readFileSync(templateFilePath, 'utf8')); + + // Check if there are custom environment variables defined that need to be + // added to the ARM template used in the deployment. + const environmentVariables = this.serverless.service.provider.environment; + if (environmentVariables) { + const appSettingsPath = '$.resources[?(@.kind=="functionapp")].properties.siteConfig.appSettings'; + + jsonpath.apply(template, appSettingsPath, function (appSettingsList) { + Object.keys(environmentVariables).forEach(function (key) { + appSettingsList.push({ + name: key, + value: environmentVariables[key] + }); + }); + + return appSettingsList; + }); + } + + const deploymentParameters = { + properties: { + mode: 'Incremental', + parameters, + template + } + }; + + // Deploy ARM template + await this.resourceClient.deployments.createOrUpdate(this.resourceGroup, this.deploymentName, deploymentParameters); + + // Return function app + return await this.get(); + } + + /** + * Uploads the specified file via HTTP request + * @param requestOptions The HTTP request options + * @param filePath The local file path + */ + _sendFile(requestOptions, filePath) { + return new Promise((resolve, reject) => { + fs.createReadStream(filePath) + .pipe(request(requestOptions, (err, response) => { + if (err) { + return reject(err); + } + resolve(response); + })); + }); + } + + _wait(timeout) { + return new Promise((resolve) => setTimeout(resolve, timeout)); + } + + _waitForCondition(predicate, interval = 2000) { + return new Promise((resolve, reject) => { + let retries = 0; + const id = setInterval(async () => { + if (retries >= 20) { + clearInterval(id); + return reject('Failed conditional check 20 times'); + } + + retries++; + const result = await predicate(); + if (result) { + clearInterval(id); + resolve(result); + } + }, interval); + }); + } + + async _runKuduCommand(functionApp, command) { + this.serverless.cli.log(`-> Running Kudu command ${command}...`); + + const scmDomain = functionApp.enabledHostNames[0]; + const requestUrl = `https://${scmDomain}/api/command`; + + // TODO: There is a case where the body will contain an error, but it's + // not actually an error. These are warnings from npm install. + const response = await axios.post(requestUrl, + { + command: command, + dir: 'site\\wwwroot' + }, + { + headers: { + Authorization: `Bearer ${this.credentials.tokenCache._entries[0].accessToken}`, + Accept: 'application/json' + } + }); + + if (response.status !== 200) { + if (response.data && response.data.Error) { + throw new Error(response.data.Error); + } + throw new Error(`Error executing ${command} command, try again later.`); + } + } + + /** + * Gets a short lived admin token used to retrieve function keys + */ + async _getAuthKey(functionApp) { + const getTokenUrl = `${this.baseUrl}${functionApp.id}/functions/admin/token?api-version=2016-08-01`; + + const response = await axios.get(getTokenUrl, { + headers: { + 'Authorization': `Bearer ${this.credentials.tokenCache._entries[0].accessToken}` + } + }); + + return response.data.replace(/"/g, ''); + } + + /** + * Gets the master key for the specified function app + * @param functionAppUrl The function app url + * @param authToken The JWT access token used for authorization + */ + async _getMasterKey(functionAppUrl, authToken) { + const apiUrl = `https://${functionAppUrl}/admin/host/systemkeys/_master`; + + const response = await axios.get(apiUrl, { + json: true, + headers: { + 'Authorization': `Bearer ${authToken}` + } + }); + + return response.data.value; + } +} \ No newline at end of file diff --git a/src/services/resourceService.js b/src/services/resourceService.js new file mode 100644 index 00000000..e24cfd45 --- /dev/null +++ b/src/services/resourceService.js @@ -0,0 +1,36 @@ +import { ResourceManagementClient } from '@azure/arm-resources'; + +export class ResourceService { + constructor(serverless, options) { + this.serverless = serverless; + this.options = options; + + this.serviceName = serverless.service.service; + this.credentials = serverless.variables.azureCredentials; + this.subscriptionId = serverless.variables.subscriptionId; + this.resourceGroup = serverless.service.provider.resourceGroup || `${this.serviceName}-rg`; + this.deploymentName = serverless.service.provider.deploymentName || `${this.resourceGroup}-deployment`; + + this.resourceClient = new ResourceManagementClient(this.credentials, this.subscriptionId); + } + + async deployResourceGroup() { + this.serverless.cli.log(`Creating resource group: ${this.resourceGroup}`); + + const groupParameters = { + location: this.serverless.service.provider.location + }; + + return await this.resourceClient.resourceGroups.createOrUpdate(this.resourceGroup, groupParameters); + } + + async deleteDeployment() { + this.serverless.cli.log(`Deleting deployment: ${this.deploymentName}`); + return await this.resourceClient.deployments.deleteMethod(this.resourceGroup, this.deploymentName); + } + + async deleteResourceGroup() { + this.serverless.cli.log(`Deleting resource group: ${this.resourceGroup}`); + return await this.resourceClient.resourceGroups.deleteMethod(this.resourceGroup); + } +} \ No newline at end of file diff --git a/src/shared/utils.js b/src/shared/utils.js index 12ea316a..983376ac 100644 --- a/src/shared/utils.js +++ b/src/shared/utils.js @@ -25,7 +25,7 @@ const constants = { }; module.exports = { - 'getFunctionMetaData': function (functionName, parsedBindings, serverless) { + getFunctionMetaData: function (functionName, parsedBindings, serverless) { const bindings = []; let bindingSettingsNames = []; let bindingSettings = []; @@ -95,7 +95,7 @@ module.exports = { params.functionsJson = functionsJson; const entryPointAndHandlerPath = this.getEntryPointAndHandlerPath(handler); - if( functionObject.scriptFile ){ + if (functionObject.scriptFile) { entryPointAndHandlerPath.handlerPath = functionObject.scriptFile; } const metaData = { @@ -107,7 +107,7 @@ module.exports = { return metaData; }, - 'getBindingUserSettingsMetaData': function (azureSettings, bindingType, bindingTypeIndex, bindingDisplayNames) { + getBindingUserSettingsMetaData: function (azureSettings, bindingType, bindingTypeIndex, bindingDisplayNames) { let bindingDisplayNamesIndex = bindingTypeIndex; const bindingUserSettings = {}; @@ -130,7 +130,7 @@ module.exports = { return bindingUserSettingsMetaData; }, - 'getEntryPointAndHandlerPath': function (handler) { + getEntryPointAndHandlerPath: function (handler) { let handlerPath = 'handler.js'; let entryPoint = handler; const handlerSplit = handler.split('.'); @@ -147,7 +147,7 @@ module.exports = { return metaData; }, - 'getHttpOutBinding': function (bindingUserSettings) { + getHttpOutBinding: function (bindingUserSettings) { const binding = {}; binding[constants.type] = 'http'; @@ -160,7 +160,7 @@ module.exports = { return binding; }, - 'getBinding': function (bindingType, bindingSettings, bindingUserSettings) { + getBinding: function (bindingType, bindingSettings, bindingUserSettings) { const binding = {}; binding[constants.type] = bindingType; From 689ded0ee143cf73873c28e35056533be30fcb26 Mon Sep 17 00:00:00 2001 From: Wallace Breza Date: Fri, 17 May 2019 18:19:48 -0700 Subject: [PATCH 09/19] ugh... --- .eslintrc.json | 2 +- package.json | 2 +- src/plugins/deploy/azureDeployPlugin.js | 16 ++++++- src/plugins/login/loginPlugin.js | 2 + src/services/apimService.js | 14 ++---- src/services/baseService.js | 30 +++++++++++++ src/services/functionAppService.js | 57 ++++++------------------- src/services/resourceService.js | 12 ++---- 8 files changed, 69 insertions(+), 66 deletions(-) create mode 100644 src/services/baseService.js diff --git a/.eslintrc.json b/.eslintrc.json index 6cfd9309..30759957 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -20,7 +20,7 @@ "no-console": 0 }, "parserOptions": { - "ecmaVersion": 8, + "ecmaVersion": 2018, "sourceType": "module", "ecmaFeatures": { "arrowFunctions": true, diff --git a/package.json b/package.json index 8e855a64..d58d06cf 100644 --- a/package.json +++ b/package.json @@ -7,7 +7,7 @@ "author": "Azure Functions", "scripts": { "test": "eslint src/**/*.js", - "prebuild": "npm test", + "prebuild": "rm lib/ -rf && npm test", "build": "babel src --out-dir lib --presets=@babel/env && cp src/shared/bindings.json lib/shared" }, "repository": { diff --git a/src/plugins/deploy/azureDeployPlugin.js b/src/plugins/deploy/azureDeployPlugin.js index 23005683..ce6eaa4b 100644 --- a/src/plugins/deploy/azureDeployPlugin.js +++ b/src/plugins/deploy/azureDeployPlugin.js @@ -8,7 +8,8 @@ export class AzureDeployPlugin { this.hooks = { 'before:deploy:deploy': this.beforeDeploy.bind(this), - 'deploy:deploy': this.deploy.bind(this) + 'deploy:deploy': this.deploy.bind(this), + 'sync:sync': this }; } @@ -21,6 +22,19 @@ export class AzureDeployPlugin { } } + async sync() { + const functionAppService = new FunctionAppService(this.serverless, this.options); + const functionApp = await functionAppService.get(); + + await functionAppService.syncTriggers(functionApp); + } + + async upload() { + const functionAppService = new FunctionAppService(this.serverless, this.options); + const functionApp = await functionAppService.get(); + await functionAppService.uploadFunctions(functionApp); + } + async deploy() { const resourceService = new ResourceService(this.serverless, this.options); await resourceService.deployResourceGroup(); diff --git a/src/plugins/login/loginPlugin.js b/src/plugins/login/loginPlugin.js index cc6e5bd1..73eb54e0 100644 --- a/src/plugins/login/loginPlugin.js +++ b/src/plugins/login/loginPlugin.js @@ -8,6 +8,8 @@ export class AzureLoginPlugin { this.provider = this.serverless.getProvider('azure'); this.hooks = { + 'before:upload:upload': this.login.bind(this), + 'before:sync:sync': this.login.bind(this), 'before:deploy:initialize': this.login.bind(this) }; } diff --git a/src/services/apimService.js b/src/services/apimService.js index 2cce4874..4ee63da4 100644 --- a/src/services/apimService.js +++ b/src/services/apimService.js @@ -1,22 +1,14 @@ import { ApiManagementClient } from '@azure/arm-apimanagement'; import { ResourceManagementClient } from '@azure/arm-resources'; import { FunctionAppService } from './functionAppService'; +import { BaseService } from './baseService'; /** * APIM Service handles deployment and integration with Azure API Management */ -export class ApimService { +export class ApimService extends BaseService { constructor(serverless, options) { - this.serverless = serverless; - this.options = options; - this.config = serverless.service.provider.apim; - - this.serviceName = serverless.service.service; - this.credentials = serverless.variables.azureCredentials; - this.subscriptionId = serverless.variables.subscriptionId; - this.resourceGroup = serverless.service.provider.resourceGroup || `${this.serviceName}-rg`; - this.deploymentName = serverless.service.provider.deploymentName || `${this.resourceGroup}-deployment`; - + super(serverless, options); this.resourceId = `/subscriptions/${this.subscriptionId}/resourceGroups/${this.resourceGroup}/providers/Microsoft.Web/sites/${this.serviceName}`; this.resourceClient = new ResourceManagementClient(this.credentials, this.subscriptionId); diff --git a/src/services/baseService.js b/src/services/baseService.js new file mode 100644 index 00000000..7198ec35 --- /dev/null +++ b/src/services/baseService.js @@ -0,0 +1,30 @@ +import axios from 'axios'; + +export class BaseService { + constructor(serverless, options) { + this.serverless = serverless; + this.options = options; + + this.baseUrl = 'https://management.azure.com'; + this.serviceName = serverless.service.service; + this.credentials = serverless.variables.azureCredentials; + this.subscriptionId = serverless.variables.subscriptionId; + this.resourceGroup = serverless.service.provider.resourceGroup || `${this.serviceName}-rg`; + this.deploymentName = serverless.service.provider.deploymentName || `${this.resourceGroup}-deployment`; + } + + async sendApiRequest(method, relativeUrl, options = {}) { + const defaultHeaders = { + 'Authorization': `Bearer ${this.credentials.tokenCache._entries[0].accessToken}` + }; + + const allHeaders = Object.assign({}, defaultHeaders, options.headers); + + const requestOptions = Object.assign({}, options, { + method: method, + headers: allHeaders, + }); + + return await axios(relativeUrl, requestOptions); + } +} \ No newline at end of file diff --git a/src/services/functionAppService.js b/src/services/functionAppService.js index 75d2e6a7..be1fa749 100644 --- a/src/services/functionAppService.js +++ b/src/services/functionAppService.js @@ -1,23 +1,15 @@ import fs from 'fs'; import path from 'path'; -import axios from 'axios'; import request from 'request'; import jsonpath from 'jsonpath'; import _ from 'lodash'; import { ResourceManagementClient } from '@azure/arm-resources'; import { WebSiteManagementClient } from '@azure/arm-appservice'; +import { BaseService } from './baseService'; -export class FunctionAppService { +export class FunctionAppService extends BaseService { constructor(serverless, options) { - this.serverless = serverless; - this.options = options; - - this.baseUrl = 'https://management.azure.com'; - this.serviceName = serverless.service.service; - this.credentials = serverless.variables.azureCredentials; - this.subscriptionId = serverless.variables.subscriptionId; - this.resourceGroup = serverless.service.provider.resourceGroup || `${this.serviceName}-rg`; - this.deploymentName = serverless.service.provider.deploymentName || `${this.resourceGroup}-deployment`; + super(serverless, options); this.resourceId = `/subscriptions/${this.subscriptionId}/resourceGroups/${this.resourceGroup}/providers/Microsoft.Web/sites/${this.serviceName}`; this.resourceClient = new ResourceManagementClient(this.credentials, this.subscriptionId); @@ -49,12 +41,7 @@ export class FunctionAppService { this.serverless.cli.log('Syncing function triggers'); const syncTriggersUrl = `${this.baseUrl}${functionApp.id}/syncfunctiontriggers?api-version=2016-08-01`; - - await axios.post(syncTriggersUrl, { - headers: { - 'Authorization': `Bearer ${this.credentials.tokenCache._entries[0].accessToken}` - } - }); + await this.sendApiRequest('POST', syncTriggersUrl); } async cleanUp(functionApp) { @@ -76,12 +63,7 @@ export class FunctionAppService { async listFunctions(functionApp) { const getTokenUrl = `${this.baseUrl}${functionApp.id}/functions?api-version=2016-08-01`; - - const response = await axios.get(getTokenUrl, { - headers: { - 'Authorization': `Bearer ${this.credentials.tokenCache._entries[0].accessToken}` - } - }); + const response = await this.sendApiRequest('GET', getTokenUrl); return response.data.value || []; } @@ -255,17 +237,11 @@ export class FunctionAppService { // TODO: There is a case where the body will contain an error, but it's // not actually an error. These are warnings from npm install. - const response = await axios.post(requestUrl, - { - command: command, - dir: 'site\\wwwroot' - }, - { - headers: { - Authorization: `Bearer ${this.credentials.tokenCache._entries[0].accessToken}`, - Accept: 'application/json' - } - }); + const data = { + command: command, + dir: 'site\\wwwroot' + }; + const response = await this.sendApiRequest('POST', requestUrl, data); if (response.status !== 200) { if (response.data && response.data.Error) { @@ -279,13 +255,8 @@ export class FunctionAppService { * Gets a short lived admin token used to retrieve function keys */ async _getAuthKey(functionApp) { - const getTokenUrl = `${this.baseUrl}${functionApp.id}/functions/admin/token?api-version=2016-08-01`; - - const response = await axios.get(getTokenUrl, { - headers: { - 'Authorization': `Bearer ${this.credentials.tokenCache._entries[0].accessToken}` - } - }); + const adminTokenUrl = `${this.baseUrl}${functionApp.id}/functions/admin/token?api-version=2016-08-01`; + const response = await this.sendApiRequest('GET', adminTokenUrl); return response.data.replace(/"/g, ''); } @@ -296,9 +267,9 @@ export class FunctionAppService { * @param authToken The JWT access token used for authorization */ async _getMasterKey(functionAppUrl, authToken) { - const apiUrl = `https://${functionAppUrl}/admin/host/systemkeys/_master`; + const keyUrl = `https://${functionAppUrl}/admin/host/systemkeys/_master`; - const response = await axios.get(apiUrl, { + const response = await this.sendApiRequest('GET', keyUrl, { json: true, headers: { 'Authorization': `Bearer ${authToken}` diff --git a/src/services/resourceService.js b/src/services/resourceService.js index e24cfd45..95d165e7 100644 --- a/src/services/resourceService.js +++ b/src/services/resourceService.js @@ -1,15 +1,9 @@ import { ResourceManagementClient } from '@azure/arm-resources'; +import { BaseService } from './baseService'; -export class ResourceService { +export class ResourceService extends BaseService { constructor(serverless, options) { - this.serverless = serverless; - this.options = options; - - this.serviceName = serverless.service.service; - this.credentials = serverless.variables.azureCredentials; - this.subscriptionId = serverless.variables.subscriptionId; - this.resourceGroup = serverless.service.provider.resourceGroup || `${this.serviceName}-rg`; - this.deploymentName = serverless.service.provider.deploymentName || `${this.resourceGroup}-deployment`; + super(serverless, options); this.resourceClient = new ResourceManagementClient(this.credentials, this.subscriptionId); } From ae003b07a4cc15847459313650df3cff8d57d603 Mon Sep 17 00:00:00 2001 From: Wallace Breza Date: Mon, 20 May 2019 08:46:44 -0700 Subject: [PATCH 10/19] WIP: Fixed pathing issues on upload --- src/plugins/deploy/azureDeployPlugin.js | 3 +- src/services/baseService.js | 23 ++++++++++++ src/services/functionAppService.js | 48 ++++++++++--------------- 3 files changed, 43 insertions(+), 31 deletions(-) diff --git a/src/plugins/deploy/azureDeployPlugin.js b/src/plugins/deploy/azureDeployPlugin.js index ce6eaa4b..f38e23db 100644 --- a/src/plugins/deploy/azureDeployPlugin.js +++ b/src/plugins/deploy/azureDeployPlugin.js @@ -8,8 +8,7 @@ export class AzureDeployPlugin { this.hooks = { 'before:deploy:deploy': this.beforeDeploy.bind(this), - 'deploy:deploy': this.deploy.bind(this), - 'sync:sync': this + 'deploy:deploy': this.deploy.bind(this) }; } diff --git a/src/services/baseService.js b/src/services/baseService.js index 7198ec35..36e9224c 100644 --- a/src/services/baseService.js +++ b/src/services/baseService.js @@ -27,4 +27,27 @@ export class BaseService { return await axios(relativeUrl, requestOptions); } + + _wait(timeout) { + return new Promise((resolve) => setTimeout(resolve, timeout)); + } + + _waitForCondition(predicate, interval = 2000) { + return new Promise((resolve, reject) => { + let retries = 0; + const id = setInterval(async () => { + if (retries >= 20) { + clearInterval(id); + return reject('Failed conditional check 20 times'); + } + + retries++; + const result = await predicate(); + if (result) { + clearInterval(id); + resolve(result); + } + }, interval); + }); + } } \ No newline at end of file diff --git a/src/services/functionAppService.js b/src/services/functionAppService.js index be1fa749..61164450 100644 --- a/src/services/functionAppService.js +++ b/src/services/functionAppService.js @@ -18,7 +18,7 @@ export class FunctionAppService extends BaseService { async get() { const response = await this.webClient.webApps.get(this.resourceGroup, this.serviceName); - if (response.error && response.error.code === 'ResourceNotFound') { + if (response.error && (response.error.code === 'ResourceNotFound' || response.error.code === 'ResourceGroupNotFound')) { return null; } @@ -70,21 +70,6 @@ export class FunctionAppService extends BaseService { async uploadFunctions(functionApp) { this.serverless.cli.log('Creating azure functions'); - this.serverless.cli.log('-> Uploading service package'); - - const scmDomain = functionApp.enabledHostNames[0]; - const serviceZipFile = this.serverless.service.artifact; - - // Upload zip package - const requestOptions = { - method: 'POST', - uri: `https://${scmDomain}/api/zipdeploy`, - headers: { - Authorization: `Bearer ${this.credentials.tokenCache._entries[0].accessToken}`, - } - }; - - await this._sendFile(requestOptions, serviceZipFile); // Perform additional operations per function const serviceFunctions = this.serverless.service.getAllFunctions(); @@ -99,26 +84,29 @@ export class FunctionAppService extends BaseService { const scmDomain = functionApp.enabledHostNames[0]; // Upload function artifact if it exists, otherwise the full service is handled in 'uploadFunctions' method - const functionZipFile = this.serverless.service.functions[functionName].package.artifact; + const functionZipFile = this.serverless.service.functions[functionName].package.artifact || this.serverless.service.artifact; if (functionZipFile) { this.serverless.cli.log(`-> Uploading function package: ${functionName}`); const requestOptions = { method: 'PUT', - uri: `https://${scmDomain}/api/zip/site/wwwroot/${functionName}`, + uri: `https://${scmDomain}/api/zip/site/wwwroot/${functionName}/`, + json: true, headers: { Authorization: `Bearer ${this.credentials.tokenCache._entries[0].accessToken}`, + Accept: '*/*' } }; await this._sendFile(requestOptions, functionZipFile); - } + this.serverless.cli.log(`-> Function package uploaded successfully: ${functionName}`); - // Rename function json - const fromPath = `${functionName}-function.json`; - const toPath = path.join(functionName, 'function.json'); - const command = `mv ${fromPath} ${toPath}`; - await this._runKuduCommand(functionApp, command); + // Rename function json + const fromPath = path.join(functionName, `${functionName}-function.json`); + const toPath = path.join(functionName, 'function.json'); + const command = `mv ${fromPath} ${toPath}`; + await this._runKuduCommand(functionApp, command); + } } async deploy() { @@ -199,6 +187,7 @@ export class FunctionAppService extends BaseService { fs.createReadStream(filePath) .pipe(request(requestOptions, (err, response) => { if (err) { + this.serverless.cli.log(JSON.stringify(err, null, 4)); return reject(err); } resolve(response); @@ -237,11 +226,12 @@ export class FunctionAppService extends BaseService { // TODO: There is a case where the body will contain an error, but it's // not actually an error. These are warnings from npm install. - const data = { - command: command, - dir: 'site\\wwwroot' - }; - const response = await this.sendApiRequest('POST', requestUrl, data); + const response = await this.sendApiRequest('POST', requestUrl, { + data: { + command: command, + dir: 'site\\wwwroot' + } + }); if (response.status !== 200) { if (response.data && response.data.Error) { From b08f1159f38fa2064e9172a7077afb193add41d6 Mon Sep 17 00:00:00 2001 From: Wallace Breza Date: Mon, 20 May 2019 14:01:45 -0700 Subject: [PATCH 11/19] WIP: removed login hooks that aren't needed --- package.json | 2 +- src/plugins/login/loginPlugin.js | 2 -- src/services/functionAppService.js | 2 +- 3 files changed, 2 insertions(+), 4 deletions(-) diff --git a/package.json b/package.json index d58d06cf..595334c6 100644 --- a/package.json +++ b/package.json @@ -37,7 +37,7 @@ "jsonpath": "^0.2.11", "lodash": "^4.16.6", "open": "^6.3.0", - "request": "2.81.0" + "request": "^2.81.0" }, "devDependencies": { "@babel/cli": "^7.4.4", diff --git a/src/plugins/login/loginPlugin.js b/src/plugins/login/loginPlugin.js index 73eb54e0..cc6e5bd1 100644 --- a/src/plugins/login/loginPlugin.js +++ b/src/plugins/login/loginPlugin.js @@ -8,8 +8,6 @@ export class AzureLoginPlugin { this.provider = this.serverless.getProvider('azure'); this.hooks = { - 'before:upload:upload': this.login.bind(this), - 'before:sync:sync': this.login.bind(this), 'before:deploy:initialize': this.login.bind(this) }; } diff --git a/src/services/functionAppService.js b/src/services/functionAppService.js index 61164450..d0c26969 100644 --- a/src/services/functionAppService.js +++ b/src/services/functionAppService.js @@ -268,4 +268,4 @@ export class FunctionAppService extends BaseService { return response.data.value; } -} \ No newline at end of file +} From fe56d3ef7957837ad476909b91c39630bbeffe0d Mon Sep 17 00:00:00 2001 From: Wallace Breza Date: Mon, 20 May 2019 14:15:40 -0700 Subject: [PATCH 12/19] Migratged file extensions to ts --- src/{config.js => config.ts} | 0 src/{index.js => index.ts} | 0 ...mFunctionPlugin.js => apimFunctionPlugin.ts} | 0 ...pimServicePlugin.js => apimServicePlugin.ts} | 0 ...onPlugin.js => azureDeployFunctionPlugin.ts} | 0 ...zureDeployPlugin.js => azureDeployPlugin.ts} | 0 .../invoke/{azureInvoke.js => azureInvoke.ts} | 0 .../{invokeFunction.js => invokeFunction.ts} | 0 .../login/{loginPlugin.js => loginPlugin.ts} | 0 src/plugins/logs/{azureLogs.js => azureLogs.ts} | 0 .../lib/{retrieveLogs.js => retrieveLogs.ts} | 0 .../{azurePackage.js => azurePackage.ts} | 0 ...ckageFunction.js => azurePackageFunction.ts} | 0 .../lib/{compileEvents.js => compileEvents.ts} | 0 ...rFunction.js => compileEventsForFunction.ts} | 0 ...ckFunctionJson.js => webpackFunctionJson.ts} | 0 .../remove/{azureRemove.js => azureRemove.ts} | 0 ...eResourceGroup.js => deleteResourceGroup.ts} | 0 .../{azureProvider.js => azureProvider.ts} | 0 src/services/{apimService.js => apimService.ts} | 0 src/services/{baseService.js => baseService.ts} | 0 ...ctionAppService.js => functionAppService.ts} | 0 .../{resourceService.js => resourceService.ts} | 0 src/shared/{getAdminKey.js => getAdminKey.ts} | 0 .../{parseBindings.js => parseBindings.ts} | 0 src/shared/{utils.js => utils.ts} | 0 tsconfig.json | 17 +++++++++++++++++ 27 files changed, 17 insertions(+) rename src/{config.js => config.ts} (100%) rename src/{index.js => index.ts} (100%) rename src/plugins/apim/{apimFunctionPlugin.js => apimFunctionPlugin.ts} (100%) rename src/plugins/apim/{apimServicePlugin.js => apimServicePlugin.ts} (100%) rename src/plugins/deploy/{azureDeployFunctionPlugin.js => azureDeployFunctionPlugin.ts} (100%) rename src/plugins/deploy/{azureDeployPlugin.js => azureDeployPlugin.ts} (100%) rename src/plugins/invoke/{azureInvoke.js => azureInvoke.ts} (100%) rename src/plugins/invoke/lib/{invokeFunction.js => invokeFunction.ts} (100%) rename src/plugins/login/{loginPlugin.js => loginPlugin.ts} (100%) rename src/plugins/logs/{azureLogs.js => azureLogs.ts} (100%) rename src/plugins/logs/lib/{retrieveLogs.js => retrieveLogs.ts} (100%) rename src/plugins/package/{azurePackage.js => azurePackage.ts} (100%) rename src/plugins/package/{azurePackageFunction.js => azurePackageFunction.ts} (100%) rename src/plugins/package/lib/{compileEvents.js => compileEvents.ts} (100%) rename src/plugins/package/lib/{compileEventsForFunction.js => compileEventsForFunction.ts} (100%) rename src/plugins/package/lib/{webpackFunctionJson.js => webpackFunctionJson.ts} (100%) rename src/plugins/remove/{azureRemove.js => azureRemove.ts} (100%) rename src/plugins/remove/lib/{deleteResourceGroup.js => deleteResourceGroup.ts} (100%) rename src/provider/{azureProvider.js => azureProvider.ts} (100%) rename src/services/{apimService.js => apimService.ts} (100%) rename src/services/{baseService.js => baseService.ts} (100%) rename src/services/{functionAppService.js => functionAppService.ts} (100%) rename src/services/{resourceService.js => resourceService.ts} (100%) rename src/shared/{getAdminKey.js => getAdminKey.ts} (100%) rename src/shared/{parseBindings.js => parseBindings.ts} (100%) rename src/shared/{utils.js => utils.ts} (100%) create mode 100644 tsconfig.json diff --git a/src/config.js b/src/config.ts similarity index 100% rename from src/config.js rename to src/config.ts diff --git a/src/index.js b/src/index.ts similarity index 100% rename from src/index.js rename to src/index.ts diff --git a/src/plugins/apim/apimFunctionPlugin.js b/src/plugins/apim/apimFunctionPlugin.ts similarity index 100% rename from src/plugins/apim/apimFunctionPlugin.js rename to src/plugins/apim/apimFunctionPlugin.ts diff --git a/src/plugins/apim/apimServicePlugin.js b/src/plugins/apim/apimServicePlugin.ts similarity index 100% rename from src/plugins/apim/apimServicePlugin.js rename to src/plugins/apim/apimServicePlugin.ts diff --git a/src/plugins/deploy/azureDeployFunctionPlugin.js b/src/plugins/deploy/azureDeployFunctionPlugin.ts similarity index 100% rename from src/plugins/deploy/azureDeployFunctionPlugin.js rename to src/plugins/deploy/azureDeployFunctionPlugin.ts diff --git a/src/plugins/deploy/azureDeployPlugin.js b/src/plugins/deploy/azureDeployPlugin.ts similarity index 100% rename from src/plugins/deploy/azureDeployPlugin.js rename to src/plugins/deploy/azureDeployPlugin.ts diff --git a/src/plugins/invoke/azureInvoke.js b/src/plugins/invoke/azureInvoke.ts similarity index 100% rename from src/plugins/invoke/azureInvoke.js rename to src/plugins/invoke/azureInvoke.ts diff --git a/src/plugins/invoke/lib/invokeFunction.js b/src/plugins/invoke/lib/invokeFunction.ts similarity index 100% rename from src/plugins/invoke/lib/invokeFunction.js rename to src/plugins/invoke/lib/invokeFunction.ts diff --git a/src/plugins/login/loginPlugin.js b/src/plugins/login/loginPlugin.ts similarity index 100% rename from src/plugins/login/loginPlugin.js rename to src/plugins/login/loginPlugin.ts diff --git a/src/plugins/logs/azureLogs.js b/src/plugins/logs/azureLogs.ts similarity index 100% rename from src/plugins/logs/azureLogs.js rename to src/plugins/logs/azureLogs.ts diff --git a/src/plugins/logs/lib/retrieveLogs.js b/src/plugins/logs/lib/retrieveLogs.ts similarity index 100% rename from src/plugins/logs/lib/retrieveLogs.js rename to src/plugins/logs/lib/retrieveLogs.ts diff --git a/src/plugins/package/azurePackage.js b/src/plugins/package/azurePackage.ts similarity index 100% rename from src/plugins/package/azurePackage.js rename to src/plugins/package/azurePackage.ts diff --git a/src/plugins/package/azurePackageFunction.js b/src/plugins/package/azurePackageFunction.ts similarity index 100% rename from src/plugins/package/azurePackageFunction.js rename to src/plugins/package/azurePackageFunction.ts diff --git a/src/plugins/package/lib/compileEvents.js b/src/plugins/package/lib/compileEvents.ts similarity index 100% rename from src/plugins/package/lib/compileEvents.js rename to src/plugins/package/lib/compileEvents.ts diff --git a/src/plugins/package/lib/compileEventsForFunction.js b/src/plugins/package/lib/compileEventsForFunction.ts similarity index 100% rename from src/plugins/package/lib/compileEventsForFunction.js rename to src/plugins/package/lib/compileEventsForFunction.ts diff --git a/src/plugins/package/lib/webpackFunctionJson.js b/src/plugins/package/lib/webpackFunctionJson.ts similarity index 100% rename from src/plugins/package/lib/webpackFunctionJson.js rename to src/plugins/package/lib/webpackFunctionJson.ts diff --git a/src/plugins/remove/azureRemove.js b/src/plugins/remove/azureRemove.ts similarity index 100% rename from src/plugins/remove/azureRemove.js rename to src/plugins/remove/azureRemove.ts diff --git a/src/plugins/remove/lib/deleteResourceGroup.js b/src/plugins/remove/lib/deleteResourceGroup.ts similarity index 100% rename from src/plugins/remove/lib/deleteResourceGroup.js rename to src/plugins/remove/lib/deleteResourceGroup.ts diff --git a/src/provider/azureProvider.js b/src/provider/azureProvider.ts similarity index 100% rename from src/provider/azureProvider.js rename to src/provider/azureProvider.ts diff --git a/src/services/apimService.js b/src/services/apimService.ts similarity index 100% rename from src/services/apimService.js rename to src/services/apimService.ts diff --git a/src/services/baseService.js b/src/services/baseService.ts similarity index 100% rename from src/services/baseService.js rename to src/services/baseService.ts diff --git a/src/services/functionAppService.js b/src/services/functionAppService.ts similarity index 100% rename from src/services/functionAppService.js rename to src/services/functionAppService.ts diff --git a/src/services/resourceService.js b/src/services/resourceService.ts similarity index 100% rename from src/services/resourceService.js rename to src/services/resourceService.ts diff --git a/src/shared/getAdminKey.js b/src/shared/getAdminKey.ts similarity index 100% rename from src/shared/getAdminKey.js rename to src/shared/getAdminKey.ts diff --git a/src/shared/parseBindings.js b/src/shared/parseBindings.ts similarity index 100% rename from src/shared/parseBindings.js rename to src/shared/parseBindings.ts diff --git a/src/shared/utils.js b/src/shared/utils.ts similarity index 100% rename from src/shared/utils.js rename to src/shared/utils.ts diff --git a/tsconfig.json b/tsconfig.json new file mode 100644 index 00000000..ce049c5a --- /dev/null +++ b/tsconfig.json @@ -0,0 +1,17 @@ +{ + "compilerOptions": { + "target": "es6", + "module": "commonjs", + "declaration": true, + "outDir": "./lib", + "strict": false, + "resolveJsonModule": true, + }, + "include": [ + "src" + ], + "exclude": [ + "node_modules", + "src/**/*.test.ts" + ], +} \ No newline at end of file From aacc505028edf13517b8f0e43652f486a6a56e78 Mon Sep 17 00:00:00 2001 From: Wallace Breza Date: Mon, 20 May 2019 14:23:37 -0700 Subject: [PATCH 13/19] wip: starting converting files --- src/index.ts | 5 +---- src/shared/getAdminKey.ts | 10 +++------- src/shared/parseBindings.ts | 2 -- tsconfig.json | 6 +----- 4 files changed, 5 insertions(+), 18 deletions(-) diff --git a/src/index.ts b/src/index.ts index 793fe225..58fe427a 100644 --- a/src/index.ts +++ b/src/index.ts @@ -18,10 +18,7 @@ import { AzureApimServicePlugin } from './plugins/apim/apimServicePlugin'; import { AzureApimFunctionPlugin } from './plugins/apim/apimFunctionPlugin'; export class AzureIndex { - constructor(serverless, options) { - this.serverless = serverless; - this.options = options; - + constructor(private serverless, private options) { this.serverless.setProvider(AzureProvider.getProviderName(), new AzureProvider(serverless)); // To be refactored diff --git a/src/shared/getAdminKey.ts b/src/shared/getAdminKey.ts index 74ca01d0..0205ed92 100644 --- a/src/shared/getAdminKey.ts +++ b/src/shared/getAdminKey.ts @@ -1,7 +1,3 @@ -'use strict'; - -module.exports = { - getAdminKey () { - return this.provider.getAdminKey(); - } -}; +export const getAdminKey = () => { + return this.provider.getAdminKey(); +} \ No newline at end of file diff --git a/src/shared/parseBindings.ts b/src/shared/parseBindings.ts index 04858679..d1cc5ba9 100644 --- a/src/shared/parseBindings.ts +++ b/src/shared/parseBindings.ts @@ -1,5 +1,3 @@ -'use strict'; - const bindingsJson = require('./bindings.json'); const constants = { diff --git a/tsconfig.json b/tsconfig.json index ce049c5a..943ef96b 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -9,9 +9,5 @@ }, "include": [ "src" - ], - "exclude": [ - "node_modules", - "src/**/*.test.ts" - ], + ] } \ No newline at end of file From b93afb54cb8124865b62dcfcaa7add8cd165074e Mon Sep 17 00:00:00 2001 From: Tanner Barlow Date: Mon, 20 May 2019 14:38:28 -0700 Subject: [PATCH 14/19] Make plugins directory typescript compatible --- src/plugins/apim/apimFunctionPlugin.ts | 6 +++--- src/plugins/apim/apimServicePlugin.ts | 6 +++--- .../deploy/azureDeployFunctionPlugin.ts | 6 +++--- src/plugins/deploy/azureDeployPlugin.ts | 5 ++--- src/plugins/invoke/azureInvoke.ts | 21 ++++++++++++------- src/plugins/invoke/lib/invokeFunction.ts | 1 - src/plugins/login/loginPlugin.ts | 12 +++++------ src/plugins/logs/azureLogs.ts | 14 ++++++++----- src/plugins/logs/lib/retrieveLogs.ts | 1 - src/plugins/package/azurePackage.ts | 15 ++++++++----- src/plugins/package/azurePackageFunction.ts | 12 +++++++---- src/plugins/package/lib/compileEvents.ts | 5 ++--- .../package/lib/compileEventsForFunction.ts | 1 - .../package/lib/webpackFunctionJson.ts | 16 +++++++------- src/plugins/remove/azureRemove.ts | 12 +++++++---- src/plugins/remove/lib/deleteResourceGroup.ts | 1 - src/provider/azureProvider.ts | 7 +++---- src/services/baseService.ts | 4 +--- src/services/functionAppService.ts | 10 ++++----- src/shared/utils.ts | 1 - 20 files changed, 82 insertions(+), 74 deletions(-) diff --git a/src/plugins/apim/apimFunctionPlugin.ts b/src/plugins/apim/apimFunctionPlugin.ts index 09aec6b5..31e708d1 100644 --- a/src/plugins/apim/apimFunctionPlugin.ts +++ b/src/plugins/apim/apimFunctionPlugin.ts @@ -1,9 +1,9 @@ import { ApimService } from '../../services/apimService'; export class AzureApimFunctionPlugin { - constructor(serverless, options) { - this.serverless = serverless; - this.options = options; + hooks: any; + + constructor(private serverless, private options) { this.hooks = { 'after:deploy:function:deploy': this.deploy.bind(this) diff --git a/src/plugins/apim/apimServicePlugin.ts b/src/plugins/apim/apimServicePlugin.ts index 22944c1a..b62ab3c0 100644 --- a/src/plugins/apim/apimServicePlugin.ts +++ b/src/plugins/apim/apimServicePlugin.ts @@ -1,9 +1,9 @@ import { ApimService } from '../../services/apimService'; export class AzureApimServicePlugin { - constructor(serverless, options) { - this.serverless = serverless; - this.options = options; + hooks: any; + + constructor(private serverless, private options) { this.hooks = { 'after:deploy:deploy': this.deploy.bind(this) diff --git a/src/plugins/deploy/azureDeployFunctionPlugin.ts b/src/plugins/deploy/azureDeployFunctionPlugin.ts index db912600..f439b0e3 100644 --- a/src/plugins/deploy/azureDeployFunctionPlugin.ts +++ b/src/plugins/deploy/azureDeployFunctionPlugin.ts @@ -1,9 +1,9 @@ import { FunctionAppService } from '../../services/functionAppService'; export class AzureDeployFunctionPlugin { - constructor(serverless, options) { - this.serverless = serverless; - this.options = options; + hooks: any; + + constructor(private serverless, private options) { this.hooks = { 'deploy:function:packageFunction': this.beforeDeploy.bind(this), diff --git a/src/plugins/deploy/azureDeployPlugin.ts b/src/plugins/deploy/azureDeployPlugin.ts index f38e23db..ddcd5735 100644 --- a/src/plugins/deploy/azureDeployPlugin.ts +++ b/src/plugins/deploy/azureDeployPlugin.ts @@ -2,9 +2,8 @@ import { ResourceService } from '../../services/resourceService'; import { FunctionAppService } from '../../services/functionAppService'; export class AzureDeployPlugin { - constructor(serverless, options) { - this.serverless = serverless; - this.options = options; + hooks: any; + constructor(private serverless, private options) { this.hooks = { 'before:deploy:deploy': this.beforeDeploy.bind(this), diff --git a/src/plugins/invoke/azureInvoke.ts b/src/plugins/invoke/azureInvoke.ts index 15fbae36..3d02f192 100644 --- a/src/plugins/invoke/azureInvoke.ts +++ b/src/plugins/invoke/azureInvoke.ts @@ -1,12 +1,17 @@ -'use strict'; -const BbPromise = require('bluebird'); +import { Promise } from 'bluebird'; const invokeFunction = require('./lib/invokeFunction'); const getAdminKey = require('../../shared/getAdminKey'); -const path = require('path'); +import { join, isAbsolute } from 'path'; class AzureInvoke { - constructor (serverless, options) { + + hooks: any; + provider: any; + invokeFunction: any; + getAdminKey: any; + + constructor (private serverless, private options) { this.serverless = serverless; this.options = options; this.provider = this.serverless.getProvider('azure'); @@ -18,9 +23,9 @@ class AzureInvoke { ); if (this.options.path) { - const absolutePath = path.isAbsolute(this.options.path) + const absolutePath = isAbsolute(this.options.path) ? this.options.path - : path.join(this.serverless.config.servicePath, this.options.path); + : join(this.serverless.config.servicePath, this.options.path); if (!this.serverless.utils.fileExistsSync(absolutePath)) { throw new this.serverless.classes.Error('The file you provided does not exist.'); @@ -31,11 +36,11 @@ class AzureInvoke { this.hooks = { // TODO: See ./lib/invokeFunction.js:L10 - 'before:invoke:invoke': () => BbPromise.bind(this) + 'before:invoke:invoke': () => Promise.bind(this) .then(this.provider.initialize(this.serverless,this.options)) .then(this.getAdminKey), - 'invoke:invoke': () => BbPromise.bind(this) + 'invoke:invoke': () => Promise.bind(this) .then(this.provider.initialize(this.serverless,this.options)) .then(this.invokeFunction) }; diff --git a/src/plugins/invoke/lib/invokeFunction.ts b/src/plugins/invoke/lib/invokeFunction.ts index f1e4b5f0..c94f0f6a 100644 --- a/src/plugins/invoke/lib/invokeFunction.ts +++ b/src/plugins/invoke/lib/invokeFunction.ts @@ -1,4 +1,3 @@ -'use strict'; module.exports = { invokeFunction () { diff --git a/src/plugins/login/loginPlugin.ts b/src/plugins/login/loginPlugin.ts index cc6e5bd1..cdd42a50 100644 --- a/src/plugins/login/loginPlugin.ts +++ b/src/plugins/login/loginPlugin.ts @@ -1,10 +1,12 @@ import open from 'open'; import { interactiveLoginWithAuthResponse, loginWithServicePrincipalSecretWithAuthResponse } from '@azure/ms-rest-nodeauth'; +import AzureProvider from '../../provider/azureProvider'; export class AzureLoginPlugin { - constructor(serverless, options) { - this.serverless = serverless; - this.options = options; + provider: AzureProvider; + hooks: any; + + constructor(private serverless, private options) { this.provider = this.serverless.getProvider('azure'); this.hooks = { @@ -29,10 +31,6 @@ export class AzureLoginPlugin { await open('https://microsoft.com/devicelogin'); authResult = await interactiveLoginWithAuthResponse(); } - - this.provider.credentials = authResult.credentials; - this.provider.subscriptionId = authResult.subscriptionId || subscriptionId; - this.provider.accessToken = authResult.credentials.tokenCache._entries[0].accessToken; this.serverless.variables.azureAccessToken = authResult.credentials.tokenCache._entries[0].accessToken; this.serverless.variables.azureCredentials = authResult.credentials; this.serverless.variables.subscriptionId = authResult.subscriptionId || subscriptionId; diff --git a/src/plugins/logs/azureLogs.ts b/src/plugins/logs/azureLogs.ts index df492b46..99bd90cb 100644 --- a/src/plugins/logs/azureLogs.ts +++ b/src/plugins/logs/azureLogs.ts @@ -1,10 +1,14 @@ -'use strict'; -const BbPromise = require('bluebird'); +import { Promise } from 'bluebird'; +import AzureProvider from '../../provider/azureProvider'; const retrieveLogs = require('./lib/retrieveLogs'); class AzureLogs { - constructor (serverless, options) { + provider: AzureProvider + hooks: any; + retrieveLogs: any; + + constructor (private serverless, private options) { this.serverless = serverless; this.options = options; this.provider = this.serverless.getProvider('azure'); @@ -15,10 +19,10 @@ class AzureLogs { ); this.hooks = { - 'before:logs:logs': () => BbPromise.bind(this) + 'before:logs:logs': () => Promise.bind(this) .then(this.provider.initialize(this.serverless,this.options)), - 'logs:logs': () => BbPromise.bind(this) + 'logs:logs': () => Promise.bind(this) .then(this.provider.initialize(this.serverless,this.options)) .then(this.retrieveLogs) }; diff --git a/src/plugins/logs/lib/retrieveLogs.ts b/src/plugins/logs/lib/retrieveLogs.ts index 93260327..413ff112 100644 --- a/src/plugins/logs/lib/retrieveLogs.ts +++ b/src/plugins/logs/lib/retrieveLogs.ts @@ -1,4 +1,3 @@ -'use strict'; module.exports = { retrieveLogs () { diff --git a/src/plugins/package/azurePackage.ts b/src/plugins/package/azurePackage.ts index fe290922..cd2dc798 100644 --- a/src/plugins/package/azurePackage.ts +++ b/src/plugins/package/azurePackage.ts @@ -1,11 +1,16 @@ -'use strict'; -const BbPromise = require('bluebird'); +import { Promise } from 'bluebird'; +import AzureProvider from '../../provider/azureProvider'; const compileEvents = require('./lib/compileEvents'); const webpackFunctionJson = require('./lib/webpackFunctionJson'); class AzurePackage { - constructor (serverless, options) { + provider: AzureProvider + hooks: any; + compileEvents: any; + webpackFunctionJson: any; + + constructor (private serverless, private options) { this.serverless = serverless; this.options = options; this.provider = this.serverless.getProvider('azure'); @@ -17,12 +22,12 @@ class AzurePackage { ); this.hooks = { - 'package:setupProviderConfiguration': () => BbPromise.bind(this) + 'package:setupProviderConfiguration': () => Promise.bind(this) .then(() => this.serverless.cli.log('Building Azure Events Hooks')) .then(this.provider.initialize(this.serverless, this.options)) .then(this.compileEvents), - 'before:webpack:package:packageModules': () => BbPromise.bind(this) + 'before:webpack:package:packageModules': () => Promise.bind(this) .then(this.provider.initialize(this.serverless, this.options)) .then(this.webpackFunctionJson.bind(this)) }; diff --git a/src/plugins/package/azurePackageFunction.ts b/src/plugins/package/azurePackageFunction.ts index a9038a9f..29b68bc7 100644 --- a/src/plugins/package/azurePackageFunction.ts +++ b/src/plugins/package/azurePackageFunction.ts @@ -1,10 +1,14 @@ -'use strict'; -const BbPromise = require('bluebird'); +import { Promise } from 'bluebird'; +import AzureProvider from '../../provider/azureProvider'; const compileEventsForFunction = require('./lib/compileEventsForFunction'); class AzurePackageFunction { - constructor (serverless, options) { + provider: AzureProvider; + hooks: any; + compileEventsForFunction: any; + + constructor (private serverless, private options) { this.serverless = serverless; this.options = options; this.provider = this.serverless.getProvider('azure'); @@ -15,7 +19,7 @@ class AzurePackageFunction { ); this.hooks = { - 'before:deploy:function:packageFunction': () => BbPromise.bind(this) + 'before:deploy:function:packageFunction': () => Promise.bind(this) .then(() => this.serverless.cli.log('Building Azure Events Hooks')) .then(this.provider.initialize(this.serverless, this.options)) .then(this.compileEventsForFunction), diff --git a/src/plugins/package/lib/compileEvents.ts b/src/plugins/package/lib/compileEvents.ts index d88a3f99..276e03cd 100644 --- a/src/plugins/package/lib/compileEvents.ts +++ b/src/plugins/package/lib/compileEvents.ts @@ -1,6 +1,5 @@ -'use strict'; -const BbPromise = require('bluebird'); +import { Promise } from 'bluebird'; const utils = require('../../../shared/utils'); module.exports = { @@ -13,7 +12,7 @@ module.exports = { createEventsPromises.push(this.provider.createEventsBindings(functionName, metaData.entryPoint, metaData.handlerPath, metaData.params)); }); - return BbPromise.all(createEventsPromises); + return Promise.all(createEventsPromises); } }; diff --git a/src/plugins/package/lib/compileEventsForFunction.ts b/src/plugins/package/lib/compileEventsForFunction.ts index f4e129a8..b1eaa121 100644 --- a/src/plugins/package/lib/compileEventsForFunction.ts +++ b/src/plugins/package/lib/compileEventsForFunction.ts @@ -1,4 +1,3 @@ -'use strict'; const utils = require('../../../shared/utils'); diff --git a/src/plugins/package/lib/webpackFunctionJson.ts b/src/plugins/package/lib/webpackFunctionJson.ts index 30de0b99..4cfbd9db 100644 --- a/src/plugins/package/lib/webpackFunctionJson.ts +++ b/src/plugins/package/lib/webpackFunctionJson.ts @@ -1,8 +1,6 @@ -'use strict'; const fs = require('fs'); -const path = require('path'); -const BbPromise = require('bluebird'); - +import { join } from 'path'; +import { Promise } from 'bluebird'; module.exports = { webpackFunctionJson () { const webpackJsonPromises = []; @@ -13,17 +11,17 @@ module.exports = { }); } - return BbPromise.all(webpackJsonPromises); + return Promise.all(webpackJsonPromises); } }; function moveJsonFile(functionName) { - const dirPath = path.join(this.serverless.config.servicePath, '.webpack', functionName); + const dirPath = join(this.serverless.config.servicePath, '.webpack', functionName); const jsonFileName = `${functionName}-function.json`; - const jsonFileSrcPath = path.join(this.serverless.config.servicePath, jsonFileName); - const jsonFileDestPath = path.join(dirPath, jsonFileName); + const jsonFileSrcPath = join(this.serverless.config.servicePath, jsonFileName); + const jsonFileDestPath = join(dirPath, jsonFileName); - const fileMovedPromise = new BbPromise((resolve) => { + const fileMovedPromise = new Promise((resolve) => { if (fs.existsSync(dirPath) && fs.statSync(dirPath).isDirectory()) { if (fs.existsSync(jsonFileSrcPath)) { this.serverless.cli.log(`Moving ${jsonFileName} to .webpack directory.`); diff --git a/src/plugins/remove/azureRemove.ts b/src/plugins/remove/azureRemove.ts index 1ec71d87..6a576011 100644 --- a/src/plugins/remove/azureRemove.ts +++ b/src/plugins/remove/azureRemove.ts @@ -1,10 +1,14 @@ -'use strict'; -const BbPromise = require('bluebird'); +import { Promise } from 'bluebird'; +import AzureProvider from '../../provider/azureProvider'; const deleteResourceGroup = require('./lib/deleteResourceGroup'); class AzureRemove { - constructor (serverless, options) { + provider: AzureProvider; + hooks: any; + deleteResourceGroup: any; + + constructor (private serverless, private options) { this.serverless = serverless; this.options = options; this.provider = this.serverless.getProvider('azure'); @@ -15,7 +19,7 @@ class AzureRemove { ); this.hooks = { - 'remove:remove': () => BbPromise.bind(this) + 'remove:remove': () => Promise.bind(this) .then(this.provider.initialize(this.serverless,this.options)) .then(this.deleteResourceGroup) .then(() => this.serverless.cli.log('Service successfully removed')) diff --git a/src/plugins/remove/lib/deleteResourceGroup.ts b/src/plugins/remove/lib/deleteResourceGroup.ts index abf58fb1..b7ce0b3f 100644 --- a/src/plugins/remove/lib/deleteResourceGroup.ts +++ b/src/plugins/remove/lib/deleteResourceGroup.ts @@ -1,4 +1,3 @@ -'use strict'; module.exports = { deleteResourceGroup () { diff --git a/src/provider/azureProvider.ts b/src/provider/azureProvider.ts index db52f0f9..86e9ee28 100644 --- a/src/provider/azureProvider.ts +++ b/src/provider/azureProvider.ts @@ -1,5 +1,4 @@ -const BbPromise = require('bluebird'); -const path = require('path'); +import { Promise } from 'bluebird');import { join } from 'path'; const fs = require('fs'); const request = require('request'); const parseBindings = require('../shared/parseBindings'); @@ -224,7 +223,7 @@ export default class AzureProvider { } uploadPackageJson() { - const packageJsonFilePath = path.join(this.serverless.config.servicePath, 'package.json'); + const packageJsonFilePath = join(this.serverless.config.servicePath, 'package.json'); this.serverless.cli.log('Uploading package.json...'); const requestUrl = `https://${functionAppName}${config.scmDomain}${config.scmVfsPath}package.json`; @@ -261,7 +260,7 @@ export default class AzureProvider { const functionJSON = params.functionsJson; functionJSON.entryPoint = entryPoint; functionJSON.scriptFile = filePath; - fs.writeFileSync(path.join(this.serverless.config.servicePath, functionName + '-function.json'), JSON.stringify(functionJSON, null, 4)); + fs.writeFileSync(join(this.serverless.config.servicePath, functionName + '-function.json'), JSON.stringify(functionJSON, null, 4)); resolve(); }); } diff --git a/src/services/baseService.ts b/src/services/baseService.ts index 36e9224c..cfd82679 100644 --- a/src/services/baseService.ts +++ b/src/services/baseService.ts @@ -1,9 +1,7 @@ import axios from 'axios'; export class BaseService { - constructor(serverless, options) { - this.serverless = serverless; - this.options = options; +constructor(private serverless, private options) { this.baseUrl = 'https://management.azure.com'; this.serviceName = serverless.service.service; diff --git a/src/services/functionAppService.ts b/src/services/functionAppService.ts index d0c26969..aacfe17c 100644 --- a/src/services/functionAppService.ts +++ b/src/services/functionAppService.ts @@ -102,8 +102,8 @@ export class FunctionAppService extends BaseService { this.serverless.cli.log(`-> Function package uploaded successfully: ${functionName}`); // Rename function json - const fromPath = path.join(functionName, `${functionName}-function.json`); - const toPath = path.join(functionName, 'function.json'); + const fromPath = join(functionName, `${functionName}-function.json`); + const toPath = join(functionName, 'function.json'); const command = `mv ${fromPath} ${toPath}`; await this._runKuduCommand(functionApp, command); } @@ -122,15 +122,15 @@ export class FunctionAppService extends BaseService { }; } - let templateFilePath = path.join(__dirname, 'armTemplates', 'azuredeploy.json'); + let templateFilePath = join(__dirname, 'armTemplates', 'azuredeploy.json'); if (gitUrl) { - templateFilePath = path.join(__dirname, 'armTemplates', 'azuredeployWithGit.json'); + templateFilePath = join(__dirname, 'armTemplates', 'azuredeployWithGit.json'); } if (this.serverless.service.provider.armTemplate) { this.serverless.cli.log(`-> Deploying custom ARM template: ${this.serverless.service.provider.armTemplate.file}`); - templateFilePath = path.join(this.serverless.config.servicePath, this.serverless.service.provider.armTemplate.file); + templateFilePath = join(this.serverless.config.servicePath, this.serverless.service.provider.armTemplate.file); const userParameters = this.serverless.service.provider.armTemplate.parameters; const userParametersKeys = Object.keys(userParameters); diff --git a/src/shared/utils.ts b/src/shared/utils.ts index 983376ac..3ae340cd 100644 --- a/src/shared/utils.ts +++ b/src/shared/utils.ts @@ -1,4 +1,3 @@ -'use strict'; const constants = { type: 'type', From bb698486120ab44c31da12ba5be60612e3d76bfa Mon Sep 17 00:00:00 2001 From: Wallace Breza Date: Mon, 20 May 2019 14:44:32 -0700 Subject: [PATCH 15/19] Migrated shared and services dirs --- src/config.ts | 4 +- src/services/apimService.ts | 8 +- src/services/baseService.ts | 20 +- src/services/functionAppService.ts | 15 +- src/services/resourceService.ts | 2 + src/shared/getAdminKey.ts | 2 +- src/shared/parseBindings.ts | 51 +++-- src/shared/utils.ts | 290 ++++++++++++++--------------- 8 files changed, 203 insertions(+), 189 deletions(-) diff --git a/src/config.ts b/src/config.ts index b7978636..ba5cf2c6 100644 --- a/src/config.ts +++ b/src/config.ts @@ -1,4 +1,4 @@ -module.exports = { +export const constants = { bearer: 'Bearer ', functionAppApiPath: '/api/', functionAppDomain: '.azurewebsites.net', @@ -15,3 +15,5 @@ module.exports = { scmVfsPath: '/api/vfs/site/wwwroot/', scmZipApiPath: '/api/zip/site/wwwroot/' }; + +export default constants; \ No newline at end of file diff --git a/src/services/apimService.ts b/src/services/apimService.ts index 4ee63da4..35cd8719 100644 --- a/src/services/apimService.ts +++ b/src/services/apimService.ts @@ -7,10 +7,16 @@ import { BaseService } from './baseService'; * APIM Service handles deployment and integration with Azure API Management */ export class ApimService extends BaseService { + private resourceId: string; + private resourceClient: ResourceManagementClient; + private apimClient: ApiManagementClient; + private functionAppService: FunctionAppService; + private config: any; + constructor(serverless, options) { super(serverless, options); this.resourceId = `/subscriptions/${this.subscriptionId}/resourceGroups/${this.resourceGroup}/providers/Microsoft.Web/sites/${this.serviceName}`; - + this.config = this.serverless.service.provider.apim; this.resourceClient = new ResourceManagementClient(this.credentials, this.subscriptionId); this.apimClient = new ApiManagementClient(this.credentials, this.subscriptionId); this.functionAppService = new FunctionAppService(serverless, options); diff --git a/src/services/baseService.ts b/src/services/baseService.ts index 36e9224c..0a8ad920 100644 --- a/src/services/baseService.ts +++ b/src/services/baseService.ts @@ -1,10 +1,14 @@ import axios from 'axios'; -export class BaseService { - constructor(serverless, options) { - this.serverless = serverless; - this.options = options; - +export abstract class BaseService { + protected baseUrl: string; + protected serviceName: string; + protected credentials: any; + protected subscriptionId: string; + protected resourceGroup: string; + protected deploymentName: string; + + constructor(protected serverless, protected options) { this.baseUrl = 'https://management.azure.com'; this.serviceName = serverless.service.service; this.credentials = serverless.variables.azureCredentials; @@ -13,7 +17,7 @@ export class BaseService { this.deploymentName = serverless.service.provider.deploymentName || `${this.resourceGroup}-deployment`; } - async sendApiRequest(method, relativeUrl, options = {}) { + async sendApiRequest(method: string, relativeUrl: string, options: any = {}) { const defaultHeaders = { 'Authorization': `Bearer ${this.credentials.tokenCache._entries[0].accessToken}` }; @@ -28,11 +32,11 @@ export class BaseService { return await axios(relativeUrl, requestOptions); } - _wait(timeout) { + protected wait(timeout: number) { return new Promise((resolve) => setTimeout(resolve, timeout)); } - _waitForCondition(predicate, interval = 2000) { + protected waitForCondition(predicate: () => boolean, interval: number = 2000) { return new Promise((resolve, reject) => { let retries = 0; const id = setInterval(async () => { diff --git a/src/services/functionAppService.ts b/src/services/functionAppService.ts index d0c26969..b99b70d5 100644 --- a/src/services/functionAppService.ts +++ b/src/services/functionAppService.ts @@ -1,13 +1,18 @@ -import fs from 'fs'; -import path from 'path'; +import * as fs from 'fs'; +import * as path from 'path'; import request from 'request'; import jsonpath from 'jsonpath'; import _ from 'lodash'; import { ResourceManagementClient } from '@azure/arm-resources'; import { WebSiteManagementClient } from '@azure/arm-appservice'; import { BaseService } from './baseService'; +import { Deployment } from '@azure/arm-resources/esm/models'; export class FunctionAppService extends BaseService { + private resourceId: string; + private resourceClient: ResourceManagementClient; + private webClient: WebSiteManagementClient; + constructor(serverless, options) { super(serverless, options); @@ -17,7 +22,7 @@ export class FunctionAppService extends BaseService { } async get() { - const response = await this.webClient.webApps.get(this.resourceGroup, this.serviceName); + const response: any = await this.webClient.webApps.get(this.resourceGroup, this.serviceName); if (response.error && (response.error.code === 'ResourceNotFound' || response.error.code === 'ResourceGroupNotFound')) { return null; } @@ -111,7 +116,7 @@ export class FunctionAppService extends BaseService { async deploy() { this.serverless.cli.log(`Creating function app: ${this.serviceName}`); - let parameters = { functionAppName: { value: this.serviceName } }; + let parameters: any = { functionAppName: { value: this.serviceName } }; const gitUrl = this.serverless.service.provider.gitUrl; @@ -162,7 +167,7 @@ export class FunctionAppService extends BaseService { }); } - const deploymentParameters = { + const deploymentParameters: Deployment = { properties: { mode: 'Incremental', parameters, diff --git a/src/services/resourceService.ts b/src/services/resourceService.ts index 95d165e7..260f837e 100644 --- a/src/services/resourceService.ts +++ b/src/services/resourceService.ts @@ -2,6 +2,8 @@ import { ResourceManagementClient } from '@azure/arm-resources'; import { BaseService } from './baseService'; export class ResourceService extends BaseService { + private resourceClient: ResourceManagementClient; + constructor(serverless, options) { super(serverless, options); diff --git a/src/shared/getAdminKey.ts b/src/shared/getAdminKey.ts index 0205ed92..41568a79 100644 --- a/src/shared/getAdminKey.ts +++ b/src/shared/getAdminKey.ts @@ -1,3 +1,3 @@ -export const getAdminKey = () => { +export function getAdminKey() { return this.provider.getAdminKey(); } \ No newline at end of file diff --git a/src/shared/parseBindings.ts b/src/shared/parseBindings.ts index d1cc5ba9..e8a6bebe 100644 --- a/src/shared/parseBindings.ts +++ b/src/shared/parseBindings.ts @@ -8,37 +8,34 @@ const constants = { type: 'type' }; -module.exports = { - getBindingsMetaData(serverless) { +export function getBindingsMetaData(serverless) { + const bindingDisplayNames = []; + const bindingTypes = []; + const bindingSettings = []; + const bindingSettingsNames = []; - const bindingDisplayNames = []; - const bindingTypes = []; - const bindingSettings = []; - const bindingSettingsNames = []; + serverless.cli.log('Parsing Azure Functions Bindings.json...'); - serverless.cli.log('Parsing Azure Functions Bindings.json...'); + for (let bindingsIndex = 0; bindingsIndex < bindingsJson[constants.bindings].length; bindingsIndex++) { + const settingsNames = []; - for (let bindingsIndex = 0; bindingsIndex < bindingsJson[constants.bindings].length; bindingsIndex++) { - const settingsNames = []; + bindingTypes.push(bindingsJson[constants.bindings][bindingsIndex][constants.type]); + bindingDisplayNames.push(bindingsJson[constants.bindings][bindingsIndex][constants.displayName].toLowerCase()); + bindingSettings[bindingsIndex] = bindingsJson[constants.bindings][bindingsIndex][constants.settings]; - bindingTypes.push(bindingsJson[constants.bindings][bindingsIndex][constants.type]); - bindingDisplayNames.push(bindingsJson[constants.bindings][bindingsIndex][constants.displayName].toLowerCase()); - bindingSettings[bindingsIndex] = bindingsJson[constants.bindings][bindingsIndex][constants.settings]; - - for (let bindingSettingsIndex = 0; bindingSettingsIndex < bindingSettings[bindingsIndex].length; bindingSettingsIndex++) { - settingsNames.push(bindingSettings[bindingsIndex][bindingSettingsIndex][constants.name]); - } - - bindingSettingsNames[bindingsIndex] = settingsNames; + for (let bindingSettingsIndex = 0; bindingSettingsIndex < bindingSettings[bindingsIndex].length; bindingSettingsIndex++) { + settingsNames.push(bindingSettings[bindingsIndex][bindingSettingsIndex][constants.name]); } - const parsedBindings = { - bindingDisplayNames: bindingDisplayNames, - bindingTypes: bindingTypes, - bindingSettings: bindingSettings, - bindingSettingsNames: bindingSettingsNames - }; - - return parsedBindings; + bindingSettingsNames[bindingsIndex] = settingsNames; } -}; + + const parsedBindings = { + bindingDisplayNames: bindingDisplayNames, + bindingTypes: bindingTypes, + bindingSettings: bindingSettings, + bindingSettingsNames: bindingSettingsNames + }; + + return parsedBindings; +} diff --git a/src/shared/utils.ts b/src/shared/utils.ts index 983376ac..1f3674a6 100644 --- a/src/shared/utils.ts +++ b/src/shared/utils.ts @@ -1,5 +1,3 @@ -'use strict'; - const constants = { type: 'type', direction: 'direction', @@ -24,184 +22,184 @@ const constants = { entryPoint: 'entryPoint' }; -module.exports = { - getFunctionMetaData: function (functionName, parsedBindings, serverless) { - const bindings = []; - let bindingSettingsNames = []; - let bindingSettings = []; - let bindingUserSettings = {}; - let bindingType; - const functionsJson = { disabled: false, bindings: [] }; - const functionObject = serverless.service.getFunction(functionName); - const handler = functionObject.handler; - const events = functionObject.events; - const params = {}; - - const bindingTypes = parsedBindings.bindingTypes; - const bindingDisplayNames = parsedBindings.bindingDisplayNames; - - for (let eventsIndex = 0; eventsIndex < events.length; eventsIndex++) { - bindingType = Object.keys(functionObject.events[eventsIndex])[0]; - - if (eventsIndex === 0) { - bindingType += constants.trigger; - } +export function getFunctionMetaData(functionName, parsedBindings, serverless) { + const bindings = []; + let bindingSettingsNames = []; + let bindingSettings = []; + let bindingUserSettings = {}; + let bindingType; + const functionsJson = { disabled: false, bindings: [] }; + const functionObject = serverless.service.getFunction(functionName); + const handler = functionObject.handler; + const events = functionObject.events; + const params: any = { + functionJson: null + }; + + const bindingTypes = parsedBindings.bindingTypes; + const bindingDisplayNames = parsedBindings.bindingDisplayNames; + + for (let eventsIndex = 0; eventsIndex < events.length; eventsIndex++) { + bindingType = Object.keys(functionObject.events[eventsIndex])[0]; + + if (eventsIndex === 0) { + bindingType += constants.trigger; + } - const index = bindingTypes.indexOf(bindingType); + const index = bindingTypes.indexOf(bindingType); - if (index < 0) { - throw new Error(`Binding ${bindingType} not supported`); - } + if (index < 0) { + throw new Error(`Binding ${bindingType} not supported`); + } - serverless.cli.log(`Building binding for function: ${functionName} event: ${bindingType}`); + serverless.cli.log(`Building binding for function: ${functionName} event: ${bindingType}`); - bindingUserSettings = {}; - const azureSettings = events[eventsIndex][constants.xAzureSettings]; - let bindingTypeIndex = bindingTypes.indexOf(bindingType); - const bindingUserSettingsMetaData = this.getBindingUserSettingsMetaData(azureSettings, bindingType, bindingTypeIndex, bindingDisplayNames); + bindingUserSettings = {}; + const azureSettings = events[eventsIndex][constants.xAzureSettings]; + let bindingTypeIndex = bindingTypes.indexOf(bindingType); + const bindingUserSettingsMetaData = this.getBindingUserSettingsMetaData(azureSettings, bindingType, bindingTypeIndex, bindingDisplayNames); - bindingTypeIndex = bindingUserSettingsMetaData.index; - bindingUserSettings = bindingUserSettingsMetaData.userSettings; + bindingTypeIndex = bindingUserSettingsMetaData.index; + bindingUserSettings = bindingUserSettingsMetaData.userSettings; - if (bindingType.includes(constants.queue) && functionObject.events[eventsIndex].queue) { - bindingUserSettings[constants.queueName] = functionObject.events[eventsIndex].queue; - } + if (bindingType.includes(constants.queue) && functionObject.events[eventsIndex].queue) { + bindingUserSettings[constants.queueName] = functionObject.events[eventsIndex].queue; + } - if (bindingTypeIndex < 0) { - throw new Error('Binding not supported'); - } + if (bindingTypeIndex < 0) { + throw new Error('Binding not supported'); + } - bindingSettings = parsedBindings.bindingSettings[bindingTypeIndex]; - bindingSettingsNames = parsedBindings.bindingSettingsNames[bindingTypeIndex]; + bindingSettings = parsedBindings.bindingSettings[bindingTypeIndex]; + bindingSettingsNames = parsedBindings.bindingSettingsNames[bindingTypeIndex]; - if (azureSettings) { - for (let azureSettingKeyIndex = 0; azureSettingKeyIndex < Object.keys(azureSettings).length; azureSettingKeyIndex++) { - const key = Object.keys(azureSettings)[azureSettingKeyIndex]; + if (azureSettings) { + for (let azureSettingKeyIndex = 0; azureSettingKeyIndex < Object.keys(azureSettings).length; azureSettingKeyIndex++) { + const key = Object.keys(azureSettings)[azureSettingKeyIndex]; - if (bindingSettingsNames.indexOf(key) >= 0) { - bindingUserSettings[key] = azureSettings[key]; - } + if (bindingSettingsNames.indexOf(key) >= 0) { + bindingUserSettings[key] = azureSettings[key]; } } - - bindings.push(this.getBinding(bindingType, bindingSettings, bindingUserSettings, serverless)); } - if (bindingType === constants.httpTrigger) { - bindings.push(this.getHttpOutBinding(bindingUserSettings)); - } + bindings.push(this.getBinding(bindingType, bindingSettings, bindingUserSettings, serverless)); + } - functionsJson.bindings = bindings; - params.functionsJson = functionsJson; + if (bindingType === constants.httpTrigger) { + bindings.push(this.getHttpOutBinding(bindingUserSettings)); + } - const entryPointAndHandlerPath = this.getEntryPointAndHandlerPath(handler); - if (functionObject.scriptFile) { - entryPointAndHandlerPath.handlerPath = functionObject.scriptFile; - } - const metaData = { - entryPoint: entryPointAndHandlerPath[constants.entryPoint], - handlerPath: entryPointAndHandlerPath.handlerPath, - params: params - }; + functionsJson.bindings = bindings; + params.functionsJson = functionsJson; - return metaData; - }, + const entryPointAndHandlerPath = this.getEntryPointAndHandlerPath(handler); + if (functionObject.scriptFile) { + entryPointAndHandlerPath.handlerPath = functionObject.scriptFile; + } + const metaData = { + entryPoint: entryPointAndHandlerPath[constants.entryPoint], + handlerPath: entryPointAndHandlerPath.handlerPath, + params: params + }; - getBindingUserSettingsMetaData: function (azureSettings, bindingType, bindingTypeIndex, bindingDisplayNames) { - let bindingDisplayNamesIndex = bindingTypeIndex; - const bindingUserSettings = {}; + return metaData; +}; - if (azureSettings) { - const directionIndex = Object.keys(azureSettings).indexOf(constants.direction); +export function getBindingUserSettingsMetaData(azureSettings, bindingType, bindingTypeIndex, bindingDisplayNames) { + let bindingDisplayNamesIndex = bindingTypeIndex; + const bindingUserSettings = {}; - if (directionIndex >= 0) { - const key = Object.keys(azureSettings)[directionIndex]; - const displayName = `$${bindingType}${azureSettings[key]}_displayName`; + if (azureSettings) { + const directionIndex = Object.keys(azureSettings).indexOf(constants.direction); - bindingDisplayNamesIndex = bindingDisplayNames.indexOf(displayName.toLowerCase()); - bindingUserSettings[constants.direction] = azureSettings[key]; - } - } - const bindingUserSettingsMetaData = { - index: bindingDisplayNamesIndex, - userSettings: bindingUserSettings - }; - - return bindingUserSettingsMetaData; - }, - - getEntryPointAndHandlerPath: function (handler) { - let handlerPath = 'handler.js'; - let entryPoint = handler; - const handlerSplit = handler.split('.'); - - if (handlerSplit.length > 1) { - entryPoint = handlerSplit[handlerSplit.length - 1]; - handlerPath = `${handler.substring(0, handler.lastIndexOf('.'))}.js`; + if (directionIndex >= 0) { + const key = Object.keys(azureSettings)[directionIndex]; + const displayName = `$${bindingType}${azureSettings[key]}_displayName`; + + bindingDisplayNamesIndex = bindingDisplayNames.indexOf(displayName.toLowerCase()); + bindingUserSettings[constants.direction] = azureSettings[key]; } - const metaData = { - entryPoint: entryPoint, - handlerPath: handlerPath - }; + } + const bindingUserSettingsMetaData = { + index: bindingDisplayNamesIndex, + userSettings: bindingUserSettings + }; - return metaData; - }, + return bindingUserSettingsMetaData; +}; - getHttpOutBinding: function (bindingUserSettings) { - const binding = {}; +export function getEntryPointAndHandlerPath(handler) { + let handlerPath = 'handler.js'; + let entryPoint = handler; + const handlerSplit = handler.split('.'); - binding[constants.type] = 'http'; - binding[constants.direction] = constants.outDirection; - binding[constants.name] = '$return'; - if (bindingUserSettings[constants.webHookType]) { - binding[constants.name] = 'res'; - } + if (handlerSplit.length > 1) { + entryPoint = handlerSplit[handlerSplit.length - 1]; + handlerPath = `${handler.substring(0, handler.lastIndexOf('.'))}.js`; + } + const metaData = { + entryPoint: entryPoint, + handlerPath: handlerPath + }; - return binding; - }, + return metaData; +}; - getBinding: function (bindingType, bindingSettings, bindingUserSettings) { - const binding = {}; +export function getHttpOutBinding(bindingUserSettings) { + const binding = {}; - binding[constants.type] = bindingType; - if (bindingUserSettings && bindingUserSettings[constants.direction]) { - binding[constants.direction] = bindingUserSettings[constants.direction]; - } else if (bindingType.includes(constants.trigger)) { - binding[constants.direction] = constants.inDirection; - } else { - binding[constants.direction] = constants.outDirection; - } + binding[constants.type] = 'http'; + binding[constants.direction] = constants.outDirection; + binding[constants.name] = '$return'; + if (bindingUserSettings[constants.webHookType]) { + binding[constants.name] = 'res'; + } - for (let bindingSettingsIndex = 0; bindingSettingsIndex < bindingSettings.length; bindingSettingsIndex++) { - const name = bindingSettings[bindingSettingsIndex][constants.name]; + return binding; +} - if (bindingUserSettings && bindingUserSettings[name] !== undefined && bindingUserSettings[name] !== null) { - binding[name] = bindingUserSettings[name]; - continue; - } - const value = bindingSettings[bindingSettingsIndex][constants.value]; - const required = bindingSettings[bindingSettingsIndex][constants.required]; - const resource = bindingSettings[bindingSettingsIndex][constants.resource]; - - if (required) { - const defaultValue = bindingSettings[bindingSettingsIndex][constants.defaultValue]; - - if (defaultValue) { - binding[name] = defaultValue; - } else if (name === constants.connection && resource.toLowerCase() === constants.storage) { - binding[name] = 'AzureWebJobsStorage'; - } else { - throw new Error(`Required property ${name} is missing for binding:${bindingType}`); - } - } +export function getBinding(bindingType, bindingSettings, bindingUserSettings) { + const binding = {}; + + binding[constants.type] = bindingType; + if (bindingUserSettings && bindingUserSettings[constants.direction]) { + binding[constants.direction] = bindingUserSettings[constants.direction]; + } else if (bindingType.includes(constants.trigger)) { + binding[constants.direction] = constants.inDirection; + } else { + binding[constants.direction] = constants.outDirection; + } - if (value === constants.enum && name !== constants.webHookType) { - const enumValues = bindingSettings[bindingSettingsIndex][constants.enum]; + for (let bindingSettingsIndex = 0; bindingSettingsIndex < bindingSettings.length; bindingSettingsIndex++) { + const name = bindingSettings[bindingSettingsIndex][constants.name]; - binding[name] = enumValues[0][constants.value]; + if (bindingUserSettings && bindingUserSettings[name] !== undefined && bindingUserSettings[name] !== null) { + binding[name] = bindingUserSettings[name]; + continue; + } + const value = bindingSettings[bindingSettingsIndex][constants.value]; + const required = bindingSettings[bindingSettingsIndex][constants.required]; + const resource = bindingSettings[bindingSettingsIndex][constants.resource]; + + if (required) { + const defaultValue = bindingSettings[bindingSettingsIndex][constants.defaultValue]; + + if (defaultValue) { + binding[name] = defaultValue; + } else if (name === constants.connection && resource.toLowerCase() === constants.storage) { + binding[name] = 'AzureWebJobsStorage'; + } else { + throw new Error(`Required property ${name} is missing for binding:${bindingType}`); } } - return binding; + if (value === constants.enum && name !== constants.webHookType) { + const enumValues = bindingSettings[bindingSettingsIndex][constants.enum]; + + binding[name] = enumValues[0][constants.value]; + } } + + return binding; }; From b9834b9ed74dbedd177fafc42f5ac2d94cdd2f2f Mon Sep 17 00:00:00 2001 From: Wallace Breza Date: Mon, 20 May 2019 14:50:52 -0700 Subject: [PATCH 16/19] Converted provider to typescript --- src/provider/azureProvider.ts | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/provider/azureProvider.ts b/src/provider/azureProvider.ts index 86e9ee28..b1a6f9dc 100644 --- a/src/provider/azureProvider.ts +++ b/src/provider/azureProvider.ts @@ -9,14 +9,19 @@ let functionsAdminKey; let invocationId; export default class AzureProvider { + private serverless: any; + private options: any; + private provider: any; + private credentials: any; + private parsedBindings: any; + static getProviderName() { return config.providerName; } constructor(serverless) { - this.provider = this; this.serverless = serverless; - + this.provider = this; this.serverless.setProvider(config.providerName, this); } From a44686f871743c8f9e8dde738bddc40281b08846 Mon Sep 17 00:00:00 2001 From: Wallace Breza Date: Mon, 20 May 2019 15:01:14 -0700 Subject: [PATCH 17/19] Typescript compiles --- src/index.ts | 10 ++++----- src/plugins/invoke/azureInvoke.ts | 5 +---- src/plugins/login/loginPlugin.ts | 2 +- src/plugins/logs/azureLogs.ts | 4 +--- src/plugins/package/azurePackage.ts | 4 +--- src/plugins/package/azurePackageFunction.ts | 4 +--- src/plugins/remove/azureRemove.ts | 4 +--- src/provider/azureProvider.ts | 24 ++++++++++----------- src/services/functionAppService.ts | 10 ++++----- 9 files changed, 28 insertions(+), 39 deletions(-) diff --git a/src/index.ts b/src/index.ts index 58fe427a..696f8313 100644 --- a/src/index.ts +++ b/src/index.ts @@ -5,11 +5,11 @@ whole provider implementation. */ import '@babel/polyfill'; -import AzureInvoke from './plugins/invoke/azureInvoke'; -import AzureLogs from './plugins/logs/azureLogs'; -import AzureRemove from './plugins/remove/azureRemove'; -import AzurePackage from './plugins/package/azurePackage'; -import AzurePackageFunction from './plugins/package/azurePackageFunction'; +import { AzureInvoke } from './plugins/invoke/azureInvoke'; +import { AzureLogs } from './plugins/logs/azureLogs'; +import { AzureRemove } from './plugins/remove/azureRemove'; +import { AzurePackage } from './plugins/package/azurePackage'; +import { AzurePackageFunction } from './plugins/package/azurePackageFunction'; import AzureProvider from './provider/azureProvider'; import { AzureDeployPlugin } from './plugins/deploy/azureDeployPlugin'; import { AzureDeployFunctionPlugin } from './plugins/deploy/azureDeployFunctionPlugin'; diff --git a/src/plugins/invoke/azureInvoke.ts b/src/plugins/invoke/azureInvoke.ts index 3d02f192..37d61836 100644 --- a/src/plugins/invoke/azureInvoke.ts +++ b/src/plugins/invoke/azureInvoke.ts @@ -4,8 +4,7 @@ const invokeFunction = require('./lib/invokeFunction'); const getAdminKey = require('../../shared/getAdminKey'); import { join, isAbsolute } from 'path'; -class AzureInvoke { - +export class AzureInvoke { hooks: any; provider: any; invokeFunction: any; @@ -46,5 +45,3 @@ class AzureInvoke { }; } } - -module.exports = AzureInvoke; diff --git a/src/plugins/login/loginPlugin.ts b/src/plugins/login/loginPlugin.ts index 324531d5..09b9fba2 100644 --- a/src/plugins/login/loginPlugin.ts +++ b/src/plugins/login/loginPlugin.ts @@ -1,4 +1,4 @@ -import { open } from 'open'; +import * as open from 'open'; import { interactiveLoginWithAuthResponse, loginWithServicePrincipalSecretWithAuthResponse } from '@azure/ms-rest-nodeauth'; import AzureProvider from '../../provider/azureProvider'; diff --git a/src/plugins/logs/azureLogs.ts b/src/plugins/logs/azureLogs.ts index 99bd90cb..fe856ee5 100644 --- a/src/plugins/logs/azureLogs.ts +++ b/src/plugins/logs/azureLogs.ts @@ -3,7 +3,7 @@ import { Promise } from 'bluebird'; import AzureProvider from '../../provider/azureProvider'; const retrieveLogs = require('./lib/retrieveLogs'); -class AzureLogs { +export class AzureLogs { provider: AzureProvider hooks: any; retrieveLogs: any; @@ -28,5 +28,3 @@ class AzureLogs { }; } } - -module.exports = AzureLogs; diff --git a/src/plugins/package/azurePackage.ts b/src/plugins/package/azurePackage.ts index cd2dc798..3cab2671 100644 --- a/src/plugins/package/azurePackage.ts +++ b/src/plugins/package/azurePackage.ts @@ -4,7 +4,7 @@ import AzureProvider from '../../provider/azureProvider'; const compileEvents = require('./lib/compileEvents'); const webpackFunctionJson = require('./lib/webpackFunctionJson'); -class AzurePackage { +export class AzurePackage { provider: AzureProvider hooks: any; compileEvents: any; @@ -33,5 +33,3 @@ class AzurePackage { }; } } - -module.exports = AzurePackage; diff --git a/src/plugins/package/azurePackageFunction.ts b/src/plugins/package/azurePackageFunction.ts index 29b68bc7..fda880aa 100644 --- a/src/plugins/package/azurePackageFunction.ts +++ b/src/plugins/package/azurePackageFunction.ts @@ -3,7 +3,7 @@ import { Promise } from 'bluebird'; import AzureProvider from '../../provider/azureProvider'; const compileEventsForFunction = require('./lib/compileEventsForFunction'); -class AzurePackageFunction { +export class AzurePackageFunction { provider: AzureProvider; hooks: any; compileEventsForFunction: any; @@ -26,5 +26,3 @@ class AzurePackageFunction { }; } } - -module.exports = AzurePackageFunction; diff --git a/src/plugins/remove/azureRemove.ts b/src/plugins/remove/azureRemove.ts index 6a576011..d52daee1 100644 --- a/src/plugins/remove/azureRemove.ts +++ b/src/plugins/remove/azureRemove.ts @@ -3,7 +3,7 @@ import { Promise } from 'bluebird'; import AzureProvider from '../../provider/azureProvider'; const deleteResourceGroup = require('./lib/deleteResourceGroup'); -class AzureRemove { +export class AzureRemove { provider: AzureProvider; hooks: any; deleteResourceGroup: any; @@ -26,5 +26,3 @@ class AzureRemove { }; } } - -module.exports = AzureRemove; diff --git a/src/provider/azureProvider.ts b/src/provider/azureProvider.ts index b1a6f9dc..6d147741 100644 --- a/src/provider/azureProvider.ts +++ b/src/provider/azureProvider.ts @@ -1,4 +1,4 @@ -import { Promise } from 'bluebird');import { join } from 'path'; +import { join } from 'path'; const fs = require('fs'); const request = require('request'); const parseBindings = require('../shared/parseBindings'); @@ -14,7 +14,7 @@ export default class AzureProvider { private provider: any; private credentials: any; private parsedBindings: any; - + static getProviderName() { return config.providerName; } @@ -35,7 +35,7 @@ export default class AzureProvider { config.functionAppDomain = this.serverless.service.provider.functionAppDomain || config.functionAppDomain; config.scmDomain = this.serverless.service.provider.scmDomain || config.scmDomain; - return new BbPromise((resolve) => { + return new Promise((resolve) => { functionAppName = this.serverless.service.service; resolve(); @@ -59,7 +59,7 @@ export default class AzureProvider { } }; - return new BbPromise((resolve, reject) => { + return new Promise((resolve, reject) => { request(options, (err, response, body) => { if (err) return reject(err); if (response.statusCode !== 200) return reject(body); @@ -84,7 +84,7 @@ export default class AzureProvider { } }; - return new BbPromise((resolve, reject) => { + return new Promise((resolve, reject) => { this.serverless.cli.log('Pinging host status...'); request(options, (err, res, body) => { if (err) return reject(err); @@ -127,7 +127,7 @@ export default class AzureProvider { } }; - return new BbPromise((resolve, reject) => { + return new Promise((resolve, reject) => { request(options, (err, response, body) => { if (err) return reject(err); if (response.statusCode !== 200) return reject(body); @@ -150,7 +150,7 @@ export default class AzureProvider { } }; - return new BbPromise((resolve, reject) => { + return new Promise((resolve, reject) => { request(options, (err, response, body) => { if (err) return reject(err); if (response.statusCode !== 200) return reject(body); @@ -170,7 +170,7 @@ export default class AzureProvider { eventData = JSON.parse(eventData); } catch (error) { - return BbPromise.reject('The specified input data isn\'t a valid JSON string. ' + + return Promise.reject('The specified input data isn\'t a valid JSON string. ' + 'Please correct it and try invoking the function again.'); } } @@ -180,7 +180,7 @@ export default class AzureProvider { .join('&'); } - return new BbPromise((resolve, reject) => { + return new Promise((resolve, reject) => { const options = { headers: { 'x-functions-key': functionsAdminKey @@ -216,7 +216,7 @@ export default class AzureProvider { } }; - return new BbPromise((resolve, reject) => { + return new Promise((resolve, reject) => { request(options, (err, res) => { if (err) { reject(err); @@ -243,7 +243,7 @@ export default class AzureProvider { } }; - return new BbPromise((resolve, reject) => { + return new Promise((resolve, reject) => { if (fs.existsSync(packageJsonFilePath)) { fs.createReadStream(packageJsonFilePath) .pipe(request.put(options, (err) => { @@ -261,7 +261,7 @@ export default class AzureProvider { } createEventsBindings(functionName, entryPoint, filePath, params) { - return new BbPromise((resolve) => { + return new Promise((resolve) => { const functionJSON = params.functionsJson; functionJSON.entryPoint = entryPoint; functionJSON.scriptFile = filePath; diff --git a/src/services/functionAppService.ts b/src/services/functionAppService.ts index cda8c291..b99b70d5 100644 --- a/src/services/functionAppService.ts +++ b/src/services/functionAppService.ts @@ -107,8 +107,8 @@ export class FunctionAppService extends BaseService { this.serverless.cli.log(`-> Function package uploaded successfully: ${functionName}`); // Rename function json - const fromPath = join(functionName, `${functionName}-function.json`); - const toPath = join(functionName, 'function.json'); + const fromPath = path.join(functionName, `${functionName}-function.json`); + const toPath = path.join(functionName, 'function.json'); const command = `mv ${fromPath} ${toPath}`; await this._runKuduCommand(functionApp, command); } @@ -127,15 +127,15 @@ export class FunctionAppService extends BaseService { }; } - let templateFilePath = join(__dirname, 'armTemplates', 'azuredeploy.json'); + let templateFilePath = path.join(__dirname, 'armTemplates', 'azuredeploy.json'); if (gitUrl) { - templateFilePath = join(__dirname, 'armTemplates', 'azuredeployWithGit.json'); + templateFilePath = path.join(__dirname, 'armTemplates', 'azuredeployWithGit.json'); } if (this.serverless.service.provider.armTemplate) { this.serverless.cli.log(`-> Deploying custom ARM template: ${this.serverless.service.provider.armTemplate.file}`); - templateFilePath = join(this.serverless.config.servicePath, this.serverless.service.provider.armTemplate.file); + templateFilePath = path.join(this.serverless.config.servicePath, this.serverless.service.provider.armTemplate.file); const userParameters = this.serverless.service.provider.armTemplate.parameters; const userParametersKeys = Object.keys(userParameters); From 565eef83fdc7e594dad1aad68cae509f90b22ad8 Mon Sep 17 00:00:00 2001 From: Wallace Breza Date: Mon, 20 May 2019 19:57:28 -0700 Subject: [PATCH 18/19] fix: Added serverless typings and updated usages --- package-lock.json | 303 ++++++++++++++---- package.json | 4 +- src/index.ts | 6 +- src/plugins/apim/apimFunctionPlugin.ts | 8 +- src/plugins/apim/apimServicePlugin.ts | 8 +- .../deploy/azureDeployFunctionPlugin.ts | 5 +- src/plugins/deploy/azureDeployPlugin.ts | 13 +- src/plugins/invoke/azureInvoke.ts | 42 +-- src/plugins/invoke/lib/invokeFunction.ts | 27 +- src/plugins/login/loginPlugin.ts | 17 +- src/plugins/logs/azureLogs.ts | 21 +- src/plugins/logs/lib/retrieveLogs.ts | 14 +- src/plugins/package/azurePackage.ts | 31 +- src/plugins/package/azurePackageFunction.ts | 22 +- src/plugins/package/lib/compileEvents.ts | 22 +- .../package/lib/compileEventsForFunction.ts | 14 +- .../package/lib/webpackFunctionJson.ts | 28 +- src/plugins/remove/azureRemove.ts | 27 +- src/plugins/remove/lib/deleteResourceGroup.ts | 13 +- src/provider/azureProvider.ts | 37 +-- 20 files changed, 394 insertions(+), 268 deletions(-) diff --git a/package-lock.json b/package-lock.json index cae0a1d2..78ea2bc4 100644 --- a/package-lock.json +++ b/package-lock.json @@ -987,6 +987,15 @@ "resolved": "https://registry.npmjs.org/@types/node/-/node-8.10.48.tgz", "integrity": "sha512-c35YEBTkL4rzXY2ucpSKy+UYHjUBIIkuJbWYbsGIrKLEWU5dgJMmLkkIb3qeC3O3Tpb1ZQCwecscvJTDjDjkRw==" }, + "@types/open": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/@types/open/-/open-6.1.0.tgz", + "integrity": "sha512-sdB0OltczakZfdn5DYg3ZbHoQeYtU8Vbo4dys0U98gikn++M4gGDI02dzEWXPMP5uXGSjGx9GnK/yLlJMfGjlg==", + "dev": true, + "requires": { + "@types/node": "*" + } + }, "@types/serverless": { "version": "1.18.2", "resolved": "https://registry.npmjs.org/@types/serverless/-/serverless-1.18.2.tgz", @@ -1082,6 +1091,7 @@ "version": "0.1.4", "resolved": "https://registry.npmjs.org/align-text/-/align-text-0.1.4.tgz", "integrity": "sha1-DNkKVhCT810KmSVsIrcGlDP60Rc=", + "optional": true, "requires": { "kind-of": "^3.0.2", "longest": "^1.0.1", @@ -1123,6 +1133,7 @@ "version": "1.3.0", "resolved": "https://registry.npmjs.org/archiver-utils/-/archiver-utils-1.3.0.tgz", "integrity": "sha1-5QtMCccL89aA4y/xt5lOn52JUXQ=", + "optional": true, "requires": { "glob": "^7.0.0", "graceful-fs": "^4.1.0", @@ -1136,6 +1147,7 @@ "version": "7.1.4", "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.4.tgz", "integrity": "sha512-hkLPepehmnKk41pUGm3sYxoFs/umurYfYJCerbXEyFIWcAzvpipAgVkBqqT9RBKMGjnq6kMuyYwha6csxbiM1A==", + "optional": true, "requires": { "fs.realpath": "^1.0.0", "inflight": "^1.0.4", @@ -1149,6 +1161,7 @@ "version": "1.0.0", "resolved": "https://registry.npmjs.org/lazystream/-/lazystream-1.0.0.tgz", "integrity": "sha1-9plf4PggOS9hOWvolGJAe7dxaOQ=", + "optional": true, "requires": { "readable-stream": "^2.0.5" } @@ -1176,22 +1189,26 @@ "arr-diff": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/arr-diff/-/arr-diff-4.0.0.tgz", - "integrity": "sha1-1kYQdP6/7HHn4VI1dhoyml3HxSA=" + "integrity": "sha1-1kYQdP6/7HHn4VI1dhoyml3HxSA=", + "optional": true }, "arr-flatten": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/arr-flatten/-/arr-flatten-1.1.0.tgz", - "integrity": "sha512-L3hKV5R/p5o81R7O02IGnwpDmkp6E982XhtbuwSe3O4qOtMMMtodicASA1Cny2U+aCXcNpml+m4dPsvsJ3jatg==" + "integrity": "sha512-L3hKV5R/p5o81R7O02IGnwpDmkp6E982XhtbuwSe3O4qOtMMMtodicASA1Cny2U+aCXcNpml+m4dPsvsJ3jatg==", + "optional": true }, "arr-union": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/arr-union/-/arr-union-3.1.0.tgz", - "integrity": "sha1-45sJrqne+Gao8gbiiK9jkZuuOcQ=" + "integrity": "sha1-45sJrqne+Gao8gbiiK9jkZuuOcQ=", + "optional": true }, "array-unique": { "version": "0.3.2", "resolved": "https://registry.npmjs.org/array-unique/-/array-unique-0.3.2.tgz", - "integrity": "sha1-qJS3XUvE9s1nnvMkSp/Y9Gri1Cg=" + "integrity": "sha1-qJS3XUvE9s1nnvMkSp/Y9Gri1Cg=", + "optional": true }, "arrify": { "version": "1.0.1", @@ -1211,6 +1228,7 @@ "version": "4.10.1", "resolved": "https://registry.npmjs.org/asn1.js/-/asn1.js-4.10.1.tgz", "integrity": "sha512-p32cOF5q0Zqs9uBiONKYLm6BClCoBCM5O9JfeUSlnQLBTxYdTK+pW+nXflm8UkKd2UYlEbYz5qEi0JuZR9ckSw==", + "optional": true, "requires": { "bn.js": "^4.0.0", "inherits": "^2.0.1", @@ -1252,7 +1270,8 @@ "assign-symbols": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/assign-symbols/-/assign-symbols-1.0.0.tgz", - "integrity": "sha1-WWZ/QfrdTyDMvCu5a41Pf3jsA2c=" + "integrity": "sha1-WWZ/QfrdTyDMvCu5a41Pf3jsA2c=", + "optional": true }, "async": { "version": "2.6.0", @@ -1276,7 +1295,8 @@ "atob": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/atob/-/atob-2.1.2.tgz", - "integrity": "sha512-Wm6ukoaOGJi/73p/cl2GvLjTI5JM1k/O14isD73YML8StrH/7/lRFgmg8nICZgD3bZZvjwCGxtMOD3wWNAu8cg==" + "integrity": "sha512-Wm6ukoaOGJi/73p/cl2GvLjTI5JM1k/O14isD73YML8StrH/7/lRFgmg8nICZgD3bZZvjwCGxtMOD3wWNAu8cg==", + "optional": true }, "aws-sign2": { "version": "0.7.0", @@ -1361,6 +1381,7 @@ "version": "0.11.2", "resolved": "https://registry.npmjs.org/base/-/base-0.11.2.tgz", "integrity": "sha512-5T6P4xPgpp0YDFvSWwEZ4NoE3aM4QBQXDzmVbraCkFj8zHM+mba8SyqB5DbZWyR7mYHo6Y7BdQo3MoA4m0TeQg==", + "optional": true, "requires": { "cache-base": "^1.0.1", "class-utils": "^0.3.5", @@ -1375,6 +1396,7 @@ "version": "1.0.0", "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz", "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=", + "optional": true, "requires": { "is-descriptor": "^1.0.0" } @@ -1383,6 +1405,7 @@ "version": "1.0.0", "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", + "optional": true, "requires": { "kind-of": "^6.0.0" } @@ -1391,6 +1414,7 @@ "version": "1.0.0", "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", + "optional": true, "requires": { "kind-of": "^6.0.0" } @@ -1399,6 +1423,7 @@ "version": "1.0.2", "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", + "optional": true, "requires": { "is-accessor-descriptor": "^1.0.0", "is-data-descriptor": "^1.0.0", @@ -1408,7 +1433,8 @@ "kind-of": { "version": "6.0.2", "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.2.tgz", - "integrity": "sha512-s5kLOcnH0XqDO+FvuaLX8DDjZ18CGFk7VygH40QoKPUQhW4e2rvM0rwUq0t8IQDOwYSeLK01U90OjzBTme2QqA==" + "integrity": "sha512-s5kLOcnH0XqDO+FvuaLX8DDjZ18CGFk7VygH40QoKPUQhW4e2rvM0rwUq0t8IQDOwYSeLK01U90OjzBTme2QqA==", + "optional": true } } }, @@ -1450,12 +1476,14 @@ "bluebird": { "version": "3.5.4", "resolved": "https://registry.npmjs.org/bluebird/-/bluebird-3.5.4.tgz", - "integrity": "sha512-FG+nFEZChJrbQ9tIccIfZJBz3J7mLrAhxakAbnrJWn8d7aKOC+LWifa0G+p4ZqKp4y13T7juYvdhq9NzKdsrjw==" + "integrity": "sha512-FG+nFEZChJrbQ9tIccIfZJBz3J7mLrAhxakAbnrJWn8d7aKOC+LWifa0G+p4ZqKp4y13T7juYvdhq9NzKdsrjw==", + "optional": true }, "bn.js": { "version": "4.11.8", "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.8.tgz", - "integrity": "sha512-ItfYfPLkWHUjckQCk8xC+LwxgK8NYcXywGigJgSwOP8Y2iyWT4f2vsZnoOXTTbo+o5yXmIUJ4gn5538SO5S3gA==" + "integrity": "sha512-ItfYfPLkWHUjckQCk8xC+LwxgK8NYcXywGigJgSwOP8Y2iyWT4f2vsZnoOXTTbo+o5yXmIUJ4gn5538SO5S3gA==", + "optional": true }, "boom": { "version": "2.10.1", @@ -1478,6 +1506,7 @@ "version": "2.3.2", "resolved": "https://registry.npmjs.org/braces/-/braces-2.3.2.tgz", "integrity": "sha512-aNdbnj9P8PjdXU4ybaWLK2IF3jc/EoDYbC7AazW6to3TRsfXxscC9UXOB5iDiEQrkyIbWp2SLQda4+QAa7nc3w==", + "optional": true, "requires": { "arr-flatten": "^1.1.0", "array-unique": "^0.3.2", @@ -1495,6 +1524,7 @@ "version": "2.0.1", "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "optional": true, "requires": { "is-extendable": "^0.1.0" } @@ -1504,12 +1534,14 @@ "brorand": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/brorand/-/brorand-1.1.0.tgz", - "integrity": "sha1-EsJe/kCkXjwyPrhnWgoM5XsiNx8=" + "integrity": "sha1-EsJe/kCkXjwyPrhnWgoM5XsiNx8=", + "optional": true }, "browserify-aes": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/browserify-aes/-/browserify-aes-1.2.0.tgz", "integrity": "sha512-+7CHXqGuspUn/Sl5aO7Ea0xWGAtETPXNSAjHo48JfLdPWcMng33Xe4znFvQweqc/uzk5zSOI3H52CYnjCfb5hA==", + "optional": true, "requires": { "buffer-xor": "^1.0.3", "cipher-base": "^1.0.0", @@ -1546,6 +1578,7 @@ "version": "4.0.1", "resolved": "https://registry.npmjs.org/browserify-rsa/-/browserify-rsa-4.0.1.tgz", "integrity": "sha1-IeCr+vbyApzy+vsTNWenAdQTVSQ=", + "optional": true, "requires": { "bn.js": "^4.1.0", "randombytes": "^2.0.1" @@ -1613,7 +1646,8 @@ "buffer-crc32": { "version": "0.2.13", "resolved": "https://registry.npmjs.org/buffer-crc32/-/buffer-crc32-0.2.13.tgz", - "integrity": "sha1-DTM+PwDqxQqhRUq9MO+MKl2ackI=" + "integrity": "sha1-DTM+PwDqxQqhRUq9MO+MKl2ackI=", + "optional": true }, "buffer-equal-constant-time": { "version": "1.0.1", @@ -1634,7 +1668,8 @@ "buffer-xor": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/buffer-xor/-/buffer-xor-1.0.3.tgz", - "integrity": "sha1-JuYe0UIvtw3ULm42cp7VHYVf6Nk=" + "integrity": "sha1-JuYe0UIvtw3ULm42cp7VHYVf6Nk=", + "optional": true }, "builtin-modules": { "version": "1.1.1", @@ -1652,6 +1687,7 @@ "version": "1.0.1", "resolved": "https://registry.npmjs.org/cache-base/-/cache-base-1.0.1.tgz", "integrity": "sha512-AKcdTnFSWATd5/GCPRxr2ChwIJ85CeyrEyjRHlKxQ56d4XJMGym0uAiKn0xbLOGOl3+yRpOTi484dVCEc5AUzQ==", + "optional": true, "requires": { "collection-visit": "^1.0.0", "component-emitter": "^1.2.1", @@ -1761,6 +1797,7 @@ "version": "1.0.4", "resolved": "https://registry.npmjs.org/cipher-base/-/cipher-base-1.0.4.tgz", "integrity": "sha512-Kkht5ye6ZGmwv40uUDZztayT2ThLQGfnj/T71N/XzeZeo3nf8foyW7zGTsPYkEya3m5f3cAypH+qe7YOrM1U2Q==", + "optional": true, "requires": { "inherits": "^2.0.1", "safe-buffer": "^5.0.1" @@ -1781,6 +1818,7 @@ "version": "0.3.6", "resolved": "https://registry.npmjs.org/class-utils/-/class-utils-0.3.6.tgz", "integrity": "sha512-qOhPa/Fj7s6TY8H8esGu5QNpMMQxz79h+urzrNYN6mn+9BnxlDGf5QZ+XeCDsxSjPqsSR56XOZOJmpeurnLMeg==", + "optional": true, "requires": { "arr-union": "^3.1.0", "define-property": "^0.2.5", @@ -1792,6 +1830,7 @@ "version": "0.2.5", "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", + "optional": true, "requires": { "is-descriptor": "^0.1.0" } @@ -1844,6 +1883,7 @@ "version": "1.0.0", "resolved": "https://registry.npmjs.org/collection-visit/-/collection-visit-1.0.0.tgz", "integrity": "sha1-S8A3PBZLwykbTTaMgpzxqApZ3KA=", + "optional": true, "requires": { "map-visit": "^1.0.0", "object-visit": "^1.0.0" @@ -1884,7 +1924,8 @@ "component-emitter": { "version": "1.3.0", "resolved": "https://registry.npmjs.org/component-emitter/-/component-emitter-1.3.0.tgz", - "integrity": "sha512-Rd3se6QB+sO1TwqZjscQrurpEPIfO0/yYnSin6Q/rD3mOutHvUrCAhJub3r90uNb+SESBuE0QYoB90YdfatsRg==" + "integrity": "sha512-Rd3se6QB+sO1TwqZjscQrurpEPIfO0/yYnSin6Q/rD3mOutHvUrCAhJub3r90uNb+SESBuE0QYoB90YdfatsRg==", + "optional": true }, "concat-map": { "version": "0.0.1", @@ -1935,7 +1976,8 @@ "copy-descriptor": { "version": "0.1.1", "resolved": "https://registry.npmjs.org/copy-descriptor/-/copy-descriptor-0.1.1.tgz", - "integrity": "sha1-Z29us8OZl8LuGsOpJP1hJHSPV40=" + "integrity": "sha1-Z29us8OZl8LuGsOpJP1hJHSPV40=", + "optional": true }, "copy-paste": { "version": "1.3.0", @@ -2006,6 +2048,7 @@ "version": "1.2.0", "resolved": "https://registry.npmjs.org/create-hash/-/create-hash-1.2.0.tgz", "integrity": "sha512-z00bCGNHDG8mHAkP7CtT1qVu+bFQUPjYq/4Iv3C3kWjTFV10zIjfSoeqXo9Asws8gwSHDGj/hl2u4OGIjapeCg==", + "optional": true, "requires": { "cipher-base": "^1.0.1", "inherits": "^2.0.1", @@ -2018,6 +2061,7 @@ "version": "1.1.7", "resolved": "https://registry.npmjs.org/create-hmac/-/create-hmac-1.1.7.tgz", "integrity": "sha512-MJG9liiZ+ogc4TzUwuvbER1JRdgvUFSB5+VR/g5h82fGaIRWMWddtKBHi7/sVhfjQZ6SehlyhvQYrcYkaUIpLg==", + "optional": true, "requires": { "cipher-base": "^1.0.3", "create-hash": "^1.1.0", @@ -2115,12 +2159,14 @@ "decamelize": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz", - "integrity": "sha1-9lNNFRSCabIDUue+4m9QH5oZEpA=" + "integrity": "sha1-9lNNFRSCabIDUue+4m9QH5oZEpA=", + "optional": true }, "decode-uri-component": { "version": "0.2.0", "resolved": "https://registry.npmjs.org/decode-uri-component/-/decode-uri-component-0.2.0.tgz", - "integrity": "sha1-6zkTMzRYd1y4TNGh+uBiEGu4dUU=" + "integrity": "sha1-6zkTMzRYd1y4TNGh+uBiEGu4dUU=", + "optional": true }, "decompress-response": { "version": "3.3.0", @@ -2145,6 +2191,7 @@ "version": "2.0.2", "resolved": "https://registry.npmjs.org/define-property/-/define-property-2.0.2.tgz", "integrity": "sha512-jwK2UV4cnPpbcG7+VRARKTZPUWowwXA8bzH5NP6ud0oeAxyYPuGZUAC7hMugpCdz4BeSZl2Dl9k66CHJ/46ZYQ==", + "optional": true, "requires": { "is-descriptor": "^1.0.2", "isobject": "^3.0.1" @@ -2154,6 +2201,7 @@ "version": "1.0.0", "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", + "optional": true, "requires": { "kind-of": "^6.0.0" } @@ -2162,6 +2210,7 @@ "version": "1.0.0", "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", + "optional": true, "requires": { "kind-of": "^6.0.0" } @@ -2170,6 +2219,7 @@ "version": "1.0.2", "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", + "optional": true, "requires": { "is-accessor-descriptor": "^1.0.0", "is-data-descriptor": "^1.0.0", @@ -2179,7 +2229,8 @@ "kind-of": { "version": "6.0.2", "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.2.tgz", - "integrity": "sha512-s5kLOcnH0XqDO+FvuaLX8DDjZ18CGFk7VygH40QoKPUQhW4e2rvM0rwUq0t8IQDOwYSeLK01U90OjzBTme2QqA==" + "integrity": "sha512-s5kLOcnH0XqDO+FvuaLX8DDjZ18CGFk7VygH40QoKPUQhW4e2rvM0rwUq0t8IQDOwYSeLK01U90OjzBTme2QqA==", + "optional": true } } }, @@ -2277,6 +2328,7 @@ "version": "6.4.1", "resolved": "https://registry.npmjs.org/elliptic/-/elliptic-6.4.1.tgz", "integrity": "sha512-BsXLz5sqX8OHcsh7CqBMztyXARmGQ3LWPtGjJi6DiJHq5C/qvi9P3OqgswKSDftbu8+IoI/QDTAm2fFnQ9SZSQ==", + "optional": true, "requires": { "bn.js": "^4.4.0", "brorand": "^1.0.1", @@ -2317,6 +2369,7 @@ "version": "0.1.7", "resolved": "https://registry.npmjs.org/errno/-/errno-0.1.7.tgz", "integrity": "sha512-MfrRBDWzIWifgq6tJj60gkAwtLNb6sQPlcFrSOflcP1aFmmruKQ2wRnze/8V6kgyz7H3FF8Npzv78mZ7XLLflg==", + "optional": true, "requires": { "prr": "~1.0.1" } @@ -2674,6 +2727,7 @@ "version": "1.0.3", "resolved": "https://registry.npmjs.org/evp_bytestokey/-/evp_bytestokey-1.0.3.tgz", "integrity": "sha512-/f2Go4TognH/KvCISP7OUsHn85hT9nUkxxA9BEWxFn+Oj9o8ZNLm/40hdlgSLyuOimsrTKLUMEorQexp/aPQeA==", + "optional": true, "requires": { "md5.js": "^1.3.4", "safe-buffer": "^5.1.1" @@ -2704,6 +2758,7 @@ "version": "2.1.4", "resolved": "https://registry.npmjs.org/expand-brackets/-/expand-brackets-2.1.4.tgz", "integrity": "sha1-t3c14xXOMPa27/D4OwQVGiJEliI=", + "optional": true, "requires": { "debug": "^2.3.3", "define-property": "^0.2.5", @@ -2718,6 +2773,7 @@ "version": "0.2.5", "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", + "optional": true, "requires": { "is-descriptor": "^0.1.0" } @@ -2726,6 +2782,7 @@ "version": "2.0.1", "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "optional": true, "requires": { "is-extendable": "^0.1.0" } @@ -2746,6 +2803,7 @@ "version": "3.0.2", "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-3.0.2.tgz", "integrity": "sha1-Jqcarwc7OfshJxcnRhMcJwQCjbg=", + "optional": true, "requires": { "assign-symbols": "^1.0.0", "is-extendable": "^1.0.1" @@ -2755,6 +2813,7 @@ "version": "1.0.1", "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-1.0.1.tgz", "integrity": "sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==", + "optional": true, "requires": { "is-plain-object": "^2.0.4" } @@ -2775,6 +2834,7 @@ "version": "2.0.4", "resolved": "https://registry.npmjs.org/extglob/-/extglob-2.0.4.tgz", "integrity": "sha512-Nmb6QXkELsuBr24CJSkilo6UHHgbekK5UiZgfE6UHD3Eb27YC6oD+bhcT+tJ6cl8dmsgdQxnWlcry8ksBIBLpw==", + "optional": true, "requires": { "array-unique": "^0.3.2", "define-property": "^1.0.0", @@ -2790,6 +2850,7 @@ "version": "1.0.0", "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz", "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=", + "optional": true, "requires": { "is-descriptor": "^1.0.0" } @@ -2798,6 +2859,7 @@ "version": "2.0.1", "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "optional": true, "requires": { "is-extendable": "^0.1.0" } @@ -2806,6 +2868,7 @@ "version": "1.0.0", "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", + "optional": true, "requires": { "kind-of": "^6.0.0" } @@ -2814,6 +2877,7 @@ "version": "1.0.0", "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", + "optional": true, "requires": { "kind-of": "^6.0.0" } @@ -2822,6 +2886,7 @@ "version": "1.0.2", "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", + "optional": true, "requires": { "is-accessor-descriptor": "^1.0.0", "is-data-descriptor": "^1.0.0", @@ -2831,7 +2896,8 @@ "kind-of": { "version": "6.0.2", "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.2.tgz", - "integrity": "sha512-s5kLOcnH0XqDO+FvuaLX8DDjZ18CGFk7VygH40QoKPUQhW4e2rvM0rwUq0t8IQDOwYSeLK01U90OjzBTme2QqA==" + "integrity": "sha512-s5kLOcnH0XqDO+FvuaLX8DDjZ18CGFk7VygH40QoKPUQhW4e2rvM0rwUq0t8IQDOwYSeLK01U90OjzBTme2QqA==", + "optional": true } } }, @@ -2878,6 +2944,7 @@ "version": "4.0.0", "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-4.0.0.tgz", "integrity": "sha1-1USBHUKPmOsGpj3EAtJAPDKMOPc=", + "optional": true, "requires": { "extend-shallow": "^2.0.1", "is-number": "^3.0.0", @@ -2889,6 +2956,7 @@ "version": "2.0.1", "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "optional": true, "requires": { "is-extendable": "^0.1.0" } @@ -2942,7 +3010,8 @@ "for-in": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/for-in/-/for-in-1.0.2.tgz", - "integrity": "sha1-gQaNKVqBQuwKxybG4iAMMPttXoA=" + "integrity": "sha1-gQaNKVqBQuwKxybG4iAMMPttXoA=", + "optional": true }, "forever-agent": { "version": "0.6.1", @@ -2963,6 +3032,7 @@ "version": "0.2.1", "resolved": "https://registry.npmjs.org/fragment-cache/-/fragment-cache-0.2.1.tgz", "integrity": "sha1-QpD60n8T6Jvn8zeZxrxaCr//DRk=", + "optional": true, "requires": { "map-cache": "^0.2.2" } @@ -3017,7 +3087,8 @@ }, "ansi-regex": { "version": "2.1.1", - "bundled": true + "bundled": true, + "optional": true }, "aproba": { "version": "1.2.0", @@ -3035,11 +3106,13 @@ }, "balanced-match": { "version": "1.0.0", - "bundled": true + "bundled": true, + "optional": true }, "brace-expansion": { "version": "1.1.11", "bundled": true, + "optional": true, "requires": { "balanced-match": "^1.0.0", "concat-map": "0.0.1" @@ -3052,15 +3125,18 @@ }, "code-point-at": { "version": "1.1.0", - "bundled": true + "bundled": true, + "optional": true }, "concat-map": { "version": "0.0.1", - "bundled": true + "bundled": true, + "optional": true }, "console-control-strings": { "version": "1.1.0", - "bundled": true + "bundled": true, + "optional": true }, "core-util-is": { "version": "1.0.2", @@ -3163,7 +3239,8 @@ }, "inherits": { "version": "2.0.3", - "bundled": true + "bundled": true, + "optional": true }, "ini": { "version": "1.3.5", @@ -3173,6 +3250,7 @@ "is-fullwidth-code-point": { "version": "1.0.0", "bundled": true, + "optional": true, "requires": { "number-is-nan": "^1.0.0" } @@ -3185,17 +3263,20 @@ "minimatch": { "version": "3.0.4", "bundled": true, + "optional": true, "requires": { "brace-expansion": "^1.1.7" } }, "minimist": { "version": "0.0.8", - "bundled": true + "bundled": true, + "optional": true }, "minipass": { "version": "2.3.5", "bundled": true, + "optional": true, "requires": { "safe-buffer": "^5.1.2", "yallist": "^3.0.0" @@ -3212,6 +3293,7 @@ "mkdirp": { "version": "0.5.1", "bundled": true, + "optional": true, "requires": { "minimist": "0.0.8" } @@ -3284,7 +3366,8 @@ }, "number-is-nan": { "version": "1.0.1", - "bundled": true + "bundled": true, + "optional": true }, "object-assign": { "version": "4.1.1", @@ -3294,6 +3377,7 @@ "once": { "version": "1.4.0", "bundled": true, + "optional": true, "requires": { "wrappy": "1" } @@ -3369,7 +3453,8 @@ }, "safe-buffer": { "version": "5.1.2", - "bundled": true + "bundled": true, + "optional": true }, "safer-buffer": { "version": "2.1.2", @@ -3399,6 +3484,7 @@ "string-width": { "version": "1.0.2", "bundled": true, + "optional": true, "requires": { "code-point-at": "^1.0.0", "is-fullwidth-code-point": "^1.0.0", @@ -3416,6 +3502,7 @@ "strip-ansi": { "version": "3.0.1", "bundled": true, + "optional": true, "requires": { "ansi-regex": "^2.0.0" } @@ -3454,11 +3541,13 @@ }, "wrappy": { "version": "1.0.2", - "bundled": true + "bundled": true, + "optional": true }, "yallist": { "version": "3.0.3", - "bundled": true + "bundled": true, + "optional": true } } }, @@ -3530,7 +3619,8 @@ "get-value": { "version": "2.0.6", "resolved": "https://registry.npmjs.org/get-value/-/get-value-2.0.6.tgz", - "integrity": "sha1-3BXKHGcjh8p2vTesCjlbogQqLCg=" + "integrity": "sha1-3BXKHGcjh8p2vTesCjlbogQqLCg=", + "optional": true }, "getpass": { "version": "0.1.7", @@ -3628,6 +3718,7 @@ "version": "1.0.0", "resolved": "https://registry.npmjs.org/has-value/-/has-value-1.0.0.tgz", "integrity": "sha1-GLKB2lhbHFxR3vJMkw7SmgvmsXc=", + "optional": true, "requires": { "get-value": "^2.0.6", "has-values": "^1.0.0", @@ -3638,6 +3729,7 @@ "version": "1.0.0", "resolved": "https://registry.npmjs.org/has-values/-/has-values-1.0.0.tgz", "integrity": "sha1-lbC2P+whRmGab+V/51Yo1aOe/k8=", + "optional": true, "requires": { "is-number": "^3.0.0", "kind-of": "^4.0.0" @@ -3647,6 +3739,7 @@ "version": "4.0.0", "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-4.0.0.tgz", "integrity": "sha1-IIE989cSkosgc3hpGkUGb65y3Vc=", + "optional": true, "requires": { "is-buffer": "^1.1.5" } @@ -3657,6 +3750,7 @@ "version": "3.0.4", "resolved": "https://registry.npmjs.org/hash-base/-/hash-base-3.0.4.tgz", "integrity": "sha1-X8hoaEfs1zSZQDMZprCj8/auSRg=", + "optional": true, "requires": { "inherits": "^2.0.1", "safe-buffer": "^5.0.1" @@ -3666,6 +3760,7 @@ "version": "1.1.7", "resolved": "https://registry.npmjs.org/hash.js/-/hash.js-1.1.7.tgz", "integrity": "sha512-taOaskGt4z4SOANNseOviYDvjEJinIkRgmp7LbKP2YTTmVxWBl87s/uzK9r+44BclBSp2X7K1hqeNfz9JbBeXA==", + "optional": true, "requires": { "inherits": "^2.0.3", "minimalistic-assert": "^1.0.1" @@ -3686,6 +3781,7 @@ "version": "1.0.1", "resolved": "https://registry.npmjs.org/hmac-drbg/-/hmac-drbg-1.0.1.tgz", "integrity": "sha1-0nRXAQJabHdabFRXk+1QL8DGSaE=", + "optional": true, "requires": { "hash.js": "^1.0.3", "minimalistic-assert": "^1.0.0", @@ -3865,6 +3961,7 @@ "version": "0.1.6", "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz", "integrity": "sha1-qeEss66Nh2cn7u84Q/igiXtcmNY=", + "optional": true, "requires": { "kind-of": "^3.0.2" } @@ -3902,6 +3999,7 @@ "version": "0.1.4", "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz", "integrity": "sha1-C17mSDiOLIYCgueT8YVv7D8wG1Y=", + "optional": true, "requires": { "kind-of": "^3.0.2" } @@ -3910,6 +4008,7 @@ "version": "0.1.6", "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.6.tgz", "integrity": "sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg==", + "optional": true, "requires": { "is-accessor-descriptor": "^0.1.6", "is-data-descriptor": "^0.1.4", @@ -3919,19 +4018,22 @@ "kind-of": { "version": "5.1.0", "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz", - "integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==" + "integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==", + "optional": true } } }, "is-extendable": { "version": "0.1.1", "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-0.1.1.tgz", - "integrity": "sha1-YrEQ4omkcUGOPsNqYX1HLjAd/Ik=" + "integrity": "sha1-YrEQ4omkcUGOPsNqYX1HLjAd/Ik=", + "optional": true }, "is-extglob": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", - "integrity": "sha1-qIwCU1eR8C7TfHahueqXc8gz+MI=" + "integrity": "sha1-qIwCU1eR8C7TfHahueqXc8gz+MI=", + "optional": true }, "is-fullwidth-code-point": { "version": "2.0.0", @@ -3970,6 +4072,7 @@ "version": "3.0.0", "resolved": "https://registry.npmjs.org/is-number/-/is-number-3.0.0.tgz", "integrity": "sha1-JP1iAaR4LPUFYcgQJ2r8fRLXEZU=", + "optional": true, "requires": { "kind-of": "^3.0.2" } @@ -3984,6 +4087,7 @@ "version": "2.0.4", "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz", "integrity": "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==", + "optional": true, "requires": { "isobject": "^3.0.1" } @@ -4018,7 +4122,8 @@ "is-windows": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/is-windows/-/is-windows-1.0.2.tgz", - "integrity": "sha512-eXK1UInq2bPmjyX6e3VHIzMLobc4J94i4AWn+Hpq3OU5KkrRC96OAcR3PRJ/pGu6m8TRnBHP9dkXQVsT/COVIA==" + "integrity": "sha512-eXK1UInq2bPmjyX6e3VHIzMLobc4J94i4AWn+Hpq3OU5KkrRC96OAcR3PRJ/pGu6m8TRnBHP9dkXQVsT/COVIA==", + "optional": true }, "is-wsl": { "version": "1.1.0", @@ -4039,7 +4144,8 @@ "isobject": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", - "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=" + "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=", + "optional": true }, "isstream": { "version": "0.1.2", @@ -4233,6 +4339,7 @@ "version": "3.2.2", "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "optional": true, "requires": { "is-buffer": "^1.1.5" } @@ -4325,7 +4432,8 @@ "longest": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/longest/-/longest-1.0.1.tgz", - "integrity": "sha1-MKCy2jj3N3DoKUoNIuZiXtd9AJc=" + "integrity": "sha1-MKCy2jj3N3DoKUoNIuZiXtd9AJc=", + "optional": true }, "loose-envify": { "version": "1.4.0", @@ -4345,12 +4453,14 @@ "map-cache": { "version": "0.2.2", "resolved": "https://registry.npmjs.org/map-cache/-/map-cache-0.2.2.tgz", - "integrity": "sha1-wyq9C9ZSXZsFFkW7TyasXcmKDb8=" + "integrity": "sha1-wyq9C9ZSXZsFFkW7TyasXcmKDb8=", + "optional": true }, "map-visit": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/map-visit/-/map-visit-1.0.0.tgz", "integrity": "sha1-7Nyo8TFE5mDxtb1B8S80edmN+48=", + "optional": true, "requires": { "object-visit": "^1.0.0" } @@ -4359,6 +4469,7 @@ "version": "1.3.5", "resolved": "https://registry.npmjs.org/md5.js/-/md5.js-1.3.5.tgz", "integrity": "sha512-xitP+WxNPcTTOgnTJcrhM0xvdPepipPSf3I8EIpGKeFLjt3PlJLIDG3u8EX53ZIubkb+5U2+3rELYpEhHhzdkg==", + "optional": true, "requires": { "hash-base": "^3.0.0", "inherits": "^2.0.1", @@ -4378,6 +4489,7 @@ "version": "0.4.1", "resolved": "https://registry.npmjs.org/memory-fs/-/memory-fs-0.4.1.tgz", "integrity": "sha1-OpoguEYlI+RHz7x+i7gO1me/xVI=", + "optional": true, "requires": { "errno": "^0.1.3", "readable-stream": "^2.0.1" @@ -4387,6 +4499,7 @@ "version": "3.1.10", "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-3.1.10.tgz", "integrity": "sha512-MWikgl9n9M3w+bpsY3He8L+w9eF9338xRl8IAO5viDizwSzziFEyUzo2xrrloB64ADbTf8uA8vRqqttDTOmccg==", + "optional": true, "requires": { "arr-diff": "^4.0.0", "array-unique": "^0.3.2", @@ -4406,7 +4519,8 @@ "kind-of": { "version": "6.0.2", "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.2.tgz", - "integrity": "sha512-s5kLOcnH0XqDO+FvuaLX8DDjZ18CGFk7VygH40QoKPUQhW4e2rvM0rwUq0t8IQDOwYSeLK01U90OjzBTme2QqA==" + "integrity": "sha512-s5kLOcnH0XqDO+FvuaLX8DDjZ18CGFk7VygH40QoKPUQhW4e2rvM0rwUq0t8IQDOwYSeLK01U90OjzBTme2QqA==", + "optional": true } } }, @@ -4446,12 +4560,14 @@ "minimalistic-assert": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/minimalistic-assert/-/minimalistic-assert-1.0.1.tgz", - "integrity": "sha512-UtJcAD4yEaGtjPezWuO9wC4nwUnVH/8/Im3yEHQP4b67cXlD/Qr9hdITCU1xDbSEXg2XKNaP8jsReV7vQd00/A==" + "integrity": "sha512-UtJcAD4yEaGtjPezWuO9wC4nwUnVH/8/Im3yEHQP4b67cXlD/Qr9hdITCU1xDbSEXg2XKNaP8jsReV7vQd00/A==", + "optional": true }, "minimalistic-crypto-utils": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/minimalistic-crypto-utils/-/minimalistic-crypto-utils-1.0.1.tgz", - "integrity": "sha1-9sAMHAsIIkblxNmd+4x8CDsrWCo=" + "integrity": "sha1-9sAMHAsIIkblxNmd+4x8CDsrWCo=", + "optional": true }, "minimatch": { "version": "3.0.4", @@ -4470,6 +4586,7 @@ "version": "1.3.1", "resolved": "https://registry.npmjs.org/mixin-deep/-/mixin-deep-1.3.1.tgz", "integrity": "sha512-8ZItLHeEgaqEvd5lYBXfm4EZSFCX29Jb9K+lAHhDKzReKBQKj3R+7NOF6tjqYi9t4oI8VUfaWITJQm86wnXGNQ==", + "optional": true, "requires": { "for-in": "^1.0.2", "is-extendable": "^1.0.1" @@ -4479,6 +4596,7 @@ "version": "1.0.1", "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-1.0.1.tgz", "integrity": "sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==", + "optional": true, "requires": { "is-plain-object": "^2.0.4" } @@ -4610,6 +4728,7 @@ "version": "1.2.13", "resolved": "https://registry.npmjs.org/nanomatch/-/nanomatch-1.2.13.tgz", "integrity": "sha512-fpoe2T0RbHwBTBUOftAfBPaDEi06ufaUai0mE6Yn1kacc3SnTErfb/h+X94VXzI64rKFHYImXSvdwGGCmwOqCA==", + "optional": true, "requires": { "arr-diff": "^4.0.0", "array-unique": "^0.3.2", @@ -4627,7 +4746,8 @@ "kind-of": { "version": "6.0.2", "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.2.tgz", - "integrity": "sha512-s5kLOcnH0XqDO+FvuaLX8DDjZ18CGFk7VygH40QoKPUQhW4e2rvM0rwUq0t8IQDOwYSeLK01U90OjzBTme2QqA==" + "integrity": "sha512-s5kLOcnH0XqDO+FvuaLX8DDjZ18CGFk7VygH40QoKPUQhW4e2rvM0rwUq0t8IQDOwYSeLK01U90OjzBTme2QqA==", + "optional": true } } }, @@ -4757,6 +4877,7 @@ "version": "2.1.1", "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-2.1.1.tgz", "integrity": "sha1-GrKLVW4Zg2Oowab35vogE3/mrtk=", + "optional": true, "requires": { "remove-trailing-separator": "^1.0.1" } @@ -4800,6 +4921,7 @@ "version": "0.1.0", "resolved": "https://registry.npmjs.org/object-copy/-/object-copy-0.1.0.tgz", "integrity": "sha1-fn2Fi3gb18mRpBupde04EnVOmYw=", + "optional": true, "requires": { "copy-descriptor": "^0.1.0", "define-property": "^0.2.5", @@ -4810,6 +4932,7 @@ "version": "0.2.5", "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", + "optional": true, "requires": { "is-descriptor": "^0.1.0" } @@ -4820,6 +4943,7 @@ "version": "1.0.1", "resolved": "https://registry.npmjs.org/object-visit/-/object-visit-1.0.1.tgz", "integrity": "sha1-95xEk68MU3e1n+OdOV5BBC3QRbs=", + "optional": true, "requires": { "isobject": "^3.0.0" } @@ -4828,6 +4952,7 @@ "version": "1.3.0", "resolved": "https://registry.npmjs.org/object.pick/-/object.pick-1.3.0.tgz", "integrity": "sha1-h6EKxMFpS9Lhy/U1kaZhQftd10c=", + "optional": true, "requires": { "isobject": "^3.0.1" } @@ -4957,6 +5082,7 @@ "version": "5.1.4", "resolved": "https://registry.npmjs.org/parse-asn1/-/parse-asn1-5.1.4.tgz", "integrity": "sha512-Qs5duJcuvNExRfFZ99HDD3z4mAi3r9Wl/FOjEOijlxwCZs7E7mW2vjTpgQ4J8LpTF8x5v+1Vn5UQFejmWT11aw==", + "optional": true, "requires": { "asn1.js": "^4.0.0", "browserify-aes": "^1.0.0", @@ -4984,7 +5110,8 @@ "pascalcase": { "version": "0.1.1", "resolved": "https://registry.npmjs.org/pascalcase/-/pascalcase-0.1.1.tgz", - "integrity": "sha1-s2PlXoAGym/iF4TS2yK9FdeRfxQ=" + "integrity": "sha1-s2PlXoAGym/iF4TS2yK9FdeRfxQ=", + "optional": true }, "path-browserify": { "version": "0.0.0", @@ -5039,6 +5166,7 @@ "version": "3.0.17", "resolved": "https://registry.npmjs.org/pbkdf2/-/pbkdf2-3.0.17.tgz", "integrity": "sha512-U/il5MsrZp7mGg3mSQfn742na2T+1/vHDCG5/iTI3X9MKUuYUZVLQhyRsg06mCgDBTd57TxzgZt7P+fYfjRLtA==", + "optional": true, "requires": { "create-hash": "^1.1.2", "create-hmac": "^1.1.4", @@ -5055,7 +5183,8 @@ "pify": { "version": "2.3.0", "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", - "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=" + "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=", + "optional": true }, "pinkie": { "version": "2.0.4", @@ -5079,7 +5208,8 @@ "posix-character-classes": { "version": "0.1.1", "resolved": "https://registry.npmjs.org/posix-character-classes/-/posix-character-classes-0.1.1.tgz", - "integrity": "sha1-AerA/jta9xoqbAL+q7jB/vfgDqs=" + "integrity": "sha1-AerA/jta9xoqbAL+q7jB/vfgDqs=", + "optional": true }, "prebuild-install": { "version": "5.3.0", @@ -5136,7 +5266,8 @@ "prr": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/prr/-/prr-1.0.1.tgz", - "integrity": "sha1-0/wRS6BplaRexok/SEzrHXj19HY=" + "integrity": "sha1-0/wRS6BplaRexok/SEzrHXj19HY=", + "optional": true }, "pseudomap": { "version": "1.0.2", @@ -5198,6 +5329,7 @@ "version": "2.1.0", "resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.1.0.tgz", "integrity": "sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ==", + "optional": true, "requires": { "safe-buffer": "^5.1.0" } @@ -5339,6 +5471,7 @@ "version": "1.0.2", "resolved": "https://registry.npmjs.org/regex-not/-/regex-not-1.0.2.tgz", "integrity": "sha512-J6SDjUgDxQj5NusnOtdFxDwN/+HWykR8GELwctJ7mdqhcyy1xEc4SRFHUXvxTp661YaVKAjfRLZ9cCqS6tn32A==", + "optional": true, "requires": { "extend-shallow": "^3.0.2", "safe-regex": "^1.1.0" @@ -5390,17 +5523,20 @@ "remove-trailing-separator": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/remove-trailing-separator/-/remove-trailing-separator-1.1.0.tgz", - "integrity": "sha1-wkvOKig62tW8P1jg1IJJuSN52O8=" + "integrity": "sha1-wkvOKig62tW8P1jg1IJJuSN52O8=", + "optional": true }, "repeat-element": { "version": "1.1.3", "resolved": "https://registry.npmjs.org/repeat-element/-/repeat-element-1.1.3.tgz", - "integrity": "sha512-ahGq0ZnV5m5XtZLMb+vP76kcAM5nkLqk0lpqAuojSKGgQtn4eRi4ZZGm2olo2zKFH+sMsWaqOCW1dqAnOru72g==" + "integrity": "sha512-ahGq0ZnV5m5XtZLMb+vP76kcAM5nkLqk0lpqAuojSKGgQtn4eRi4ZZGm2olo2zKFH+sMsWaqOCW1dqAnOru72g==", + "optional": true }, "repeat-string": { "version": "1.6.1", "resolved": "https://registry.npmjs.org/repeat-string/-/repeat-string-1.6.1.tgz", - "integrity": "sha1-jcrkcOHIirwtYA//Sndihtp15jc=" + "integrity": "sha1-jcrkcOHIirwtYA//Sndihtp15jc=", + "optional": true }, "request": { "version": "2.81.0", @@ -5553,7 +5689,8 @@ "resolve-url": { "version": "0.2.1", "resolved": "https://registry.npmjs.org/resolve-url/-/resolve-url-0.2.1.tgz", - "integrity": "sha1-LGN/53yJOv0qZj/iGqkIAGjiBSo=" + "integrity": "sha1-LGN/53yJOv0qZj/iGqkIAGjiBSo=", + "optional": true }, "restore-cursor": { "version": "2.0.0", @@ -5567,7 +5704,8 @@ "ret": { "version": "0.1.15", "resolved": "https://registry.npmjs.org/ret/-/ret-0.1.15.tgz", - "integrity": "sha512-TTlYpa+OL+vMMNG24xSlQGEJ3B/RzEfUlLct7b5G/ytav+wPrplCpVMFuwzXbkecJrb6IYo1iFb0S9v37754mg==" + "integrity": "sha512-TTlYpa+OL+vMMNG24xSlQGEJ3B/RzEfUlLct7b5G/ytav+wPrplCpVMFuwzXbkecJrb6IYo1iFb0S9v37754mg==", + "optional": true }, "right-align": { "version": "0.1.3", @@ -5607,6 +5745,7 @@ "version": "2.0.2", "resolved": "https://registry.npmjs.org/ripemd160/-/ripemd160-2.0.2.tgz", "integrity": "sha512-ii4iagi25WusVoiC4B4lq7pbXfAp3D9v5CwfkY33vffw2+pkDjY1D8GaN7spsxvCSx8dkPqOZCEZyfxcmJG2IA==", + "optional": true, "requires": { "hash-base": "^3.0.0", "inherits": "^2.0.1" @@ -5642,6 +5781,7 @@ "version": "1.1.0", "resolved": "https://registry.npmjs.org/safe-regex/-/safe-regex-1.1.0.tgz", "integrity": "sha1-QKNmnzsHfR6UPURinhV91IAjvy4=", + "optional": true, "requires": { "ret": "~0.1.10" } @@ -5730,6 +5870,7 @@ "version": "7.1.4", "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.4.tgz", "integrity": "sha512-hkLPepehmnKk41pUGm3sYxoFs/umurYfYJCerbXEyFIWcAzvpipAgVkBqqT9RBKMGjnq6kMuyYwha6csxbiM1A==", + "optional": true, "requires": { "fs.realpath": "^1.0.0", "inflight": "^1.0.4", @@ -5771,6 +5912,7 @@ "version": "2.0.0", "resolved": "https://registry.npmjs.org/set-value/-/set-value-2.0.0.tgz", "integrity": "sha512-hw0yxk9GT/Hr5yJEYnHNKYXkIA8mVJgd9ditYZCe16ZczcaELYYcfvaXesNACk2O8O0nTiPQcQhGUQj8JLzeeg==", + "optional": true, "requires": { "extend-shallow": "^2.0.1", "is-extendable": "^0.1.1", @@ -5782,6 +5924,7 @@ "version": "2.0.1", "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "optional": true, "requires": { "is-extendable": "^0.1.0" } @@ -5798,6 +5941,7 @@ "version": "2.4.11", "resolved": "https://registry.npmjs.org/sha.js/-/sha.js-2.4.11.tgz", "integrity": "sha512-QMEp5B7cftE7APOjk5Y6xgrbWu+WkLVQwk8JNjZ8nKRciZaByEW6MubieAiToS7+dwvrjGhH8jRXz3MVd0AYqQ==", + "optional": true, "requires": { "inherits": "^2.0.1", "safe-buffer": "^5.0.1" @@ -5881,6 +6025,7 @@ "version": "0.8.2", "resolved": "https://registry.npmjs.org/snapdragon/-/snapdragon-0.8.2.tgz", "integrity": "sha512-FtyOnWN/wCHTVXOMwvSv26d+ko5vWlIDD6zoUJ7LW8vh+ZBC8QdljveRP+crNrtBwioEUWy/4dMtbBjA4ioNlg==", + "optional": true, "requires": { "base": "^0.11.1", "debug": "^2.2.0", @@ -5896,6 +6041,7 @@ "version": "0.2.5", "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", + "optional": true, "requires": { "is-descriptor": "^0.1.0" } @@ -5904,6 +6050,7 @@ "version": "2.0.1", "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "optional": true, "requires": { "is-extendable": "^0.1.0" } @@ -5911,7 +6058,8 @@ "source-map": { "version": "0.5.7", "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", - "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=" + "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=", + "optional": true } } }, @@ -5919,6 +6067,7 @@ "version": "2.1.1", "resolved": "https://registry.npmjs.org/snapdragon-node/-/snapdragon-node-2.1.1.tgz", "integrity": "sha512-O27l4xaMYt/RSQ5TR3vpWCAB5Kb/czIcqUFOM/C4fYcLnbZUc1PkjTAMjof2pBWaSTwOUd6qUHcFGVGj7aIwnw==", + "optional": true, "requires": { "define-property": "^1.0.0", "isobject": "^3.0.0", @@ -5929,6 +6078,7 @@ "version": "1.0.0", "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz", "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=", + "optional": true, "requires": { "is-descriptor": "^1.0.0" } @@ -5937,6 +6087,7 @@ "version": "1.0.0", "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", + "optional": true, "requires": { "kind-of": "^6.0.0" } @@ -5945,6 +6096,7 @@ "version": "1.0.0", "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", + "optional": true, "requires": { "kind-of": "^6.0.0" } @@ -5953,6 +6105,7 @@ "version": "1.0.2", "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", + "optional": true, "requires": { "is-accessor-descriptor": "^1.0.0", "is-data-descriptor": "^1.0.0", @@ -5962,7 +6115,8 @@ "kind-of": { "version": "6.0.2", "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.2.tgz", - "integrity": "sha512-s5kLOcnH0XqDO+FvuaLX8DDjZ18CGFk7VygH40QoKPUQhW4e2rvM0rwUq0t8IQDOwYSeLK01U90OjzBTme2QqA==" + "integrity": "sha512-s5kLOcnH0XqDO+FvuaLX8DDjZ18CGFk7VygH40QoKPUQhW4e2rvM0rwUq0t8IQDOwYSeLK01U90OjzBTme2QqA==", + "optional": true } } }, @@ -5970,6 +6124,7 @@ "version": "3.0.1", "resolved": "https://registry.npmjs.org/snapdragon-util/-/snapdragon-util-3.0.1.tgz", "integrity": "sha512-mbKkMdQKsjX4BAL4bRYTj21edOf8cN7XHdYUJEe+Zn99hVEYcMvKPct1IqNe7+AZPirn8BCDOQBHQZknqmKlZQ==", + "optional": true, "requires": { "kind-of": "^3.2.0" } @@ -5985,7 +6140,8 @@ "source-list-map": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/source-list-map/-/source-list-map-2.0.1.tgz", - "integrity": "sha512-qnQ7gVMxGNxsiL4lEuJwe/To8UnK7fAnmbGEEH8RpLouuKbeEm0lhbQVFIrNSuB+G7tVrAlVsZgETT5nljf+Iw==" + "integrity": "sha512-qnQ7gVMxGNxsiL4lEuJwe/To8UnK7fAnmbGEEH8RpLouuKbeEm0lhbQVFIrNSuB+G7tVrAlVsZgETT5nljf+Iw==", + "optional": true }, "source-map": { "version": "0.7.3", @@ -5997,6 +6153,7 @@ "version": "0.5.2", "resolved": "https://registry.npmjs.org/source-map-resolve/-/source-map-resolve-0.5.2.tgz", "integrity": "sha512-MjqsvNwyz1s0k81Goz/9vRBe9SZdB09Bdw+/zYyO+3CuPk6fouTaxscHkgtE8jKvf01kVfl8riHzERQ/kefaSA==", + "optional": true, "requires": { "atob": "^2.1.1", "decode-uri-component": "^0.2.0", @@ -6025,7 +6182,8 @@ "source-map-url": { "version": "0.4.0", "resolved": "https://registry.npmjs.org/source-map-url/-/source-map-url-0.4.0.tgz", - "integrity": "sha1-PpNdfd1zYxuXZZlW1VEo6HtQhKM=" + "integrity": "sha1-PpNdfd1zYxuXZZlW1VEo6HtQhKM=", + "optional": true }, "spdx-correct": { "version": "3.1.0", @@ -6040,12 +6198,14 @@ "spdx-exceptions": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/spdx-exceptions/-/spdx-exceptions-2.2.0.tgz", - "integrity": "sha512-2XQACfElKi9SlVb1CYadKDXvoajPgBVPn/gOQLrTvHdElaVhr7ZEbqJaRnJLVNeaI4cMEAgVCeBMKF6MWRDCRA==" + "integrity": "sha512-2XQACfElKi9SlVb1CYadKDXvoajPgBVPn/gOQLrTvHdElaVhr7ZEbqJaRnJLVNeaI4cMEAgVCeBMKF6MWRDCRA==", + "optional": true }, "spdx-expression-parse": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/spdx-expression-parse/-/spdx-expression-parse-3.0.0.tgz", "integrity": "sha512-Yg6D3XpRD4kkOmTpdgbUiEJFKghJH03fiC1OPll5h/0sO6neh2jqRDVHOQ4o/LMea0tgCkbMgea5ip/e+MkWyg==", + "optional": true, "requires": { "spdx-exceptions": "^2.1.0", "spdx-license-ids": "^3.0.0" @@ -6054,12 +6214,14 @@ "spdx-license-ids": { "version": "3.0.4", "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.4.tgz", - "integrity": "sha512-7j8LYJLeY/Yb6ACbQ7F76qy5jHkp0U6jgBfJsk97bwWlVUnUWsAgpyaCvo17h0/RQGnQ036tVDomiwoI4pDkQA==" + "integrity": "sha512-7j8LYJLeY/Yb6ACbQ7F76qy5jHkp0U6jgBfJsk97bwWlVUnUWsAgpyaCvo17h0/RQGnQ036tVDomiwoI4pDkQA==", + "optional": true }, "split-string": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/split-string/-/split-string-3.1.0.tgz", "integrity": "sha512-NzNVhJDYpwceVVii8/Hu6DKfD2G+NrQHlS/V/qgv763EYudVwEcMQNxd2lh+0VrUByXN/oJkl5grOhYWvQUYiw==", + "optional": true, "requires": { "extend-shallow": "^3.0.0" } @@ -6120,6 +6282,7 @@ "version": "0.1.2", "resolved": "https://registry.npmjs.org/static-extend/-/static-extend-0.1.2.tgz", "integrity": "sha1-YICcOcv/VTNyJv1eC1IPNB8ftcY=", + "optional": true, "requires": { "define-property": "^0.2.5", "object-copy": "^0.1.0" @@ -6129,6 +6292,7 @@ "version": "0.2.5", "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", + "optional": true, "requires": { "is-descriptor": "^0.1.0" } @@ -6260,7 +6424,8 @@ "tapable": { "version": "0.2.9", "resolved": "https://registry.npmjs.org/tapable/-/tapable-0.2.9.tgz", - "integrity": "sha512-2wsvQ+4GwBvLPLWsNfLCDYGsW6xb7aeC6utq2Qh0PFwgEy7K7dsma9Jsmb2zSQj7GvYAyUGSntLtsv++GmgL1A==" + "integrity": "sha512-2wsvQ+4GwBvLPLWsNfLCDYGsW6xb7aeC6utq2Qh0PFwgEy7K7dsma9Jsmb2zSQj7GvYAyUGSntLtsv++GmgL1A==", + "optional": true }, "tar-fs": { "version": "1.16.3", @@ -6347,6 +6512,7 @@ "version": "0.3.0", "resolved": "https://registry.npmjs.org/to-object-path/-/to-object-path-0.3.0.tgz", "integrity": "sha1-KXWIt7Dn4KwI4E5nL4XB9JmeF68=", + "optional": true, "requires": { "kind-of": "^3.0.2" } @@ -6355,6 +6521,7 @@ "version": "3.0.2", "resolved": "https://registry.npmjs.org/to-regex/-/to-regex-3.0.2.tgz", "integrity": "sha512-FWtleNAtZ/Ki2qtqej2CXTOayOH9bHDQF+Q48VpWyDXjbYxA4Yz8iDB31zXOBUlOHHKidDbqGVrTUvQMPmBGBw==", + "optional": true, "requires": { "define-property": "^2.0.2", "extend-shallow": "^3.0.2", @@ -6366,6 +6533,7 @@ "version": "2.1.1", "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-2.1.1.tgz", "integrity": "sha1-fIDBe53+vlmeJzZ+DU3VWQFB2zg=", + "optional": true, "requires": { "is-number": "^3.0.0", "repeat-string": "^1.6.1" @@ -6589,6 +6757,7 @@ "version": "1.0.0", "resolved": "https://registry.npmjs.org/union-value/-/union-value-1.0.0.tgz", "integrity": "sha1-XHHDTLW61dzr4+oM0IIHulqhrqQ=", + "optional": true, "requires": { "arr-union": "^3.1.0", "get-value": "^2.0.6", @@ -6600,6 +6769,7 @@ "version": "2.0.1", "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "optional": true, "requires": { "is-extendable": "^0.1.0" } @@ -6608,6 +6778,7 @@ "version": "0.4.3", "resolved": "https://registry.npmjs.org/set-value/-/set-value-0.4.3.tgz", "integrity": "sha1-fbCPnT0i3H945Trzw79GZuzfzPE=", + "optional": true, "requires": { "extend-shallow": "^2.0.1", "is-extendable": "^0.1.1", @@ -6627,6 +6798,7 @@ "version": "1.0.0", "resolved": "https://registry.npmjs.org/unset-value/-/unset-value-1.0.0.tgz", "integrity": "sha1-g3aHP30jNRef+x5vw6jtDfyKtVk=", + "optional": true, "requires": { "has-value": "^0.3.1", "isobject": "^3.0.0" @@ -6636,6 +6808,7 @@ "version": "0.3.1", "resolved": "https://registry.npmjs.org/has-value/-/has-value-0.3.1.tgz", "integrity": "sha1-ex9YutpiyoJ+wKIHgCVlSEWZXh8=", + "optional": true, "requires": { "get-value": "^2.0.3", "has-values": "^0.1.4", @@ -6646,6 +6819,7 @@ "version": "2.1.0", "resolved": "https://registry.npmjs.org/isobject/-/isobject-2.1.0.tgz", "integrity": "sha1-8GVWEJaj8dou9GJy+BXIQNh+DIk=", + "optional": true, "requires": { "isarray": "1.0.0" } @@ -6655,7 +6829,8 @@ "has-values": { "version": "0.1.4", "resolved": "https://registry.npmjs.org/has-values/-/has-values-0.1.4.tgz", - "integrity": "sha1-bWHeldkd/Km5oCCJrThL/49it3E=" + "integrity": "sha1-bWHeldkd/Km5oCCJrThL/49it3E=", + "optional": true } } }, @@ -6676,7 +6851,8 @@ "urix": { "version": "0.1.0", "resolved": "https://registry.npmjs.org/urix/-/urix-0.1.0.tgz", - "integrity": "sha1-2pN/emLiH+wf0Y1Js1wpNQZ6bHI=" + "integrity": "sha1-2pN/emLiH+wf0Y1Js1wpNQZ6bHI=", + "optional": true }, "url": { "version": "0.11.0", @@ -6699,7 +6875,8 @@ "use": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/use/-/use-3.1.1.tgz", - "integrity": "sha512-cwESVXlO3url9YWlFW/TA9cshCEhtu7IKJ/p5soJ/gGpj7vbvFrAY/eIioQ6Dw23KjZhYgiIo8HOs1nQ2vr/oQ==" + "integrity": "sha512-cwESVXlO3url9YWlFW/TA9cshCEhtu7IKJ/p5soJ/gGpj7vbvFrAY/eIioQ6Dw23KjZhYgiIo8HOs1nQ2vr/oQ==", + "optional": true }, "user-home": { "version": "2.0.0", @@ -6841,6 +7018,7 @@ "version": "1.3.0", "resolved": "https://registry.npmjs.org/webpack-sources/-/webpack-sources-1.3.0.tgz", "integrity": "sha512-OiVgSrbGu7NEnEvQJJgdSFPl2qWKkWq5lHMhgiToIiN9w34EBnjYzSYs+VbL5KoYiLNtFFa7BZIKxRED3I32pA==", + "optional": true, "requires": { "source-list-map": "^2.0.0", "source-map": "~0.6.1" @@ -6849,7 +7027,8 @@ "source-map": { "version": "0.6.1", "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==" + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "optional": true } } }, diff --git a/package.json b/package.json index b8d5be6e..f44e506f 100644 --- a/package.json +++ b/package.json @@ -8,7 +8,7 @@ "scripts": { "test": "eslint src/**/*.js", "prebuild": "rm lib/ -rf && npm test", - "build": "babel src --out-dir lib --presets=@babel/env && cp src/shared/bindings.json lib/shared" + "build": "tsc && cp src/shared/bindings.json lib/shared" }, "repository": { "git": "https://github.com/serverless/serverless-azure-functions" @@ -33,7 +33,6 @@ "axios": "^0.18.0", "az-login": "^0.3.0", "azure-arm-resource": "^2.0.0-preview", - "bluebird": "^3.4.6", "jsonpath": "^0.2.11", "lodash": "^4.16.6", "open": "^6.3.0", @@ -43,6 +42,7 @@ "@babel/cli": "^7.4.4", "@babel/core": "^7.4.4", "@babel/preset-env": "^7.4.4", + "@types/open": "^6.1.0", "@types/serverless": "^1.18.2", "eslint": "3.19.0" }, diff --git a/src/index.ts b/src/index.ts index 696f8313..bfe2d26e 100644 --- a/src/index.ts +++ b/src/index.ts @@ -4,7 +4,7 @@ This way only one plugin needs to be added to the service in order to get access whole provider implementation. */ -import '@babel/polyfill'; +import * as Serverless from 'serverless'; import { AzureInvoke } from './plugins/invoke/azureInvoke'; import { AzureLogs } from './plugins/logs/azureLogs'; import { AzureRemove } from './plugins/remove/azureRemove'; @@ -18,8 +18,8 @@ import { AzureApimServicePlugin } from './plugins/apim/apimServicePlugin'; import { AzureApimFunctionPlugin } from './plugins/apim/apimFunctionPlugin'; export class AzureIndex { - constructor(private serverless, private options) { - this.serverless.setProvider(AzureProvider.getProviderName(), new AzureProvider(serverless)); + constructor(private serverless: Serverless, private options) { + this.serverless.setProvider(AzureProvider.getProviderName(), new AzureProvider(serverless) as any); // To be refactored this.serverless.pluginManager.addPlugin(AzurePackage); diff --git a/src/plugins/apim/apimFunctionPlugin.ts b/src/plugins/apim/apimFunctionPlugin.ts index 31e708d1..c96acba2 100644 --- a/src/plugins/apim/apimFunctionPlugin.ts +++ b/src/plugins/apim/apimFunctionPlugin.ts @@ -1,16 +1,16 @@ +import * as Serverless from 'serverless'; import { ApimService } from '../../services/apimService'; export class AzureApimFunctionPlugin { - hooks: any; - - constructor(private serverless, private options) { + public hooks: { [eventName: string]: Promise }; + constructor(private serverless: Serverless, private options: Serverless.Options) { this.hooks = { 'after:deploy:function:deploy': this.deploy.bind(this) }; } - async deploy() { + private async deploy() { this.serverless.cli.log('Starting APIM function deployment'); const apimService = new ApimService(this.serverless, this.options); diff --git a/src/plugins/apim/apimServicePlugin.ts b/src/plugins/apim/apimServicePlugin.ts index b62ab3c0..7cecb977 100644 --- a/src/plugins/apim/apimServicePlugin.ts +++ b/src/plugins/apim/apimServicePlugin.ts @@ -1,16 +1,16 @@ +import * as Serverless from 'serverless'; import { ApimService } from '../../services/apimService'; export class AzureApimServicePlugin { - hooks: any; - - constructor(private serverless, private options) { + public hooks: { [eventName: string]: Promise }; + constructor(private serverless: Serverless, private options: Serverless.Options) { this.hooks = { 'after:deploy:deploy': this.deploy.bind(this) }; } - async deploy() { + private async deploy() { this.serverless.cli.log('Starting APIM service deployment'); const apimService = new ApimService(this.serverless, this.options); diff --git a/src/plugins/deploy/azureDeployFunctionPlugin.ts b/src/plugins/deploy/azureDeployFunctionPlugin.ts index f439b0e3..1786ca65 100644 --- a/src/plugins/deploy/azureDeployFunctionPlugin.ts +++ b/src/plugins/deploy/azureDeployFunctionPlugin.ts @@ -1,10 +1,9 @@ import { FunctionAppService } from '../../services/functionAppService'; export class AzureDeployFunctionPlugin { - hooks: any; - - constructor(private serverless, private options) { + public hooks: { [eventName: string]: Promise }; + constructor(private serverless, private options) { this.hooks = { 'deploy:function:packageFunction': this.beforeDeploy.bind(this), 'deploy:function:deploy': this.deploy.bind(this, options) diff --git a/src/plugins/deploy/azureDeployPlugin.ts b/src/plugins/deploy/azureDeployPlugin.ts index ddcd5735..53bd7093 100644 --- a/src/plugins/deploy/azureDeployPlugin.ts +++ b/src/plugins/deploy/azureDeployPlugin.ts @@ -1,17 +1,18 @@ +import * as Serverless from 'serverless'; import { ResourceService } from '../../services/resourceService'; import { FunctionAppService } from '../../services/functionAppService'; export class AzureDeployPlugin { - hooks: any; - constructor(private serverless, private options) { + public hooks: { [eventName: string]: Promise }; + constructor(private serverless: Serverless, private options: Serverless.Options) { this.hooks = { 'before:deploy:deploy': this.beforeDeploy.bind(this), 'deploy:deploy': this.deploy.bind(this) }; } - async beforeDeploy() { + private async beforeDeploy() { const functionAppService = new FunctionAppService(this.serverless, this.options); const functionApp = await functionAppService.get(); @@ -20,20 +21,20 @@ export class AzureDeployPlugin { } } - async sync() { + private async sync() { const functionAppService = new FunctionAppService(this.serverless, this.options); const functionApp = await functionAppService.get(); await functionAppService.syncTriggers(functionApp); } - async upload() { + private async upload() { const functionAppService = new FunctionAppService(this.serverless, this.options); const functionApp = await functionAppService.get(); await functionAppService.uploadFunctions(functionApp); } - async deploy() { + private async deploy() { const resourceService = new ResourceService(this.serverless, this.options); await resourceService.deployResourceGroup(); diff --git a/src/plugins/invoke/azureInvoke.ts b/src/plugins/invoke/azureInvoke.ts index 37d61836..024fe3a3 100644 --- a/src/plugins/invoke/azureInvoke.ts +++ b/src/plugins/invoke/azureInvoke.ts @@ -1,19 +1,16 @@ - -import { Promise } from 'bluebird'; -const invokeFunction = require('./lib/invokeFunction'); -const getAdminKey = require('../../shared/getAdminKey'); +import * as Serverless from 'serverless'; +import { invokeFunction } from './lib/invokeFunction'; +import { getAdminKey } from '../../shared/getAdminKey'; import { join, isAbsolute } from 'path'; export class AzureInvoke { - hooks: any; - provider: any; - invokeFunction: any; - getAdminKey: any; + public hooks: { [eventName: string]: Promise }; + private invokeFunction: () => Promise; + private getAdminKey: () => Promise; - constructor (private serverless, private options) { + constructor(private serverless: Serverless, private options: Serverless.Options) { this.serverless = serverless; this.options = options; - this.provider = this.serverless.getProvider('azure'); Object.assign( this, @@ -21,27 +18,22 @@ export class AzureInvoke { invokeFunction ); - if (this.options.path) { - const absolutePath = isAbsolute(this.options.path) - ? this.options.path - : join(this.serverless.config.servicePath, this.options.path); + const path = this.options['path']; + + if (path) { + const absolutePath = isAbsolute(path) + ? path + : join(this.serverless.config.servicePath, path); if (!this.serverless.utils.fileExistsSync(absolutePath)) { - throw new this.serverless.classes.Error('The file you provided does not exist.'); + throw new Error('The file you provided does not exist.'); } - this.options.data = this.serverless.utils.readFileSync(absolutePath); + this.options['data'] = this.serverless.utils.readFileSync(absolutePath); } this.hooks = { - - // TODO: See ./lib/invokeFunction.js:L10 - 'before:invoke:invoke': () => Promise.bind(this) - .then(this.provider.initialize(this.serverless,this.options)) - .then(this.getAdminKey), - - 'invoke:invoke': () => Promise.bind(this) - .then(this.provider.initialize(this.serverless,this.options)) - .then(this.invokeFunction) + 'before:invoke:invoke': this.getAdminKey.bind(this), + 'invoke:invoke': this.invokeFunction.bind(this) }; } } diff --git a/src/plugins/invoke/lib/invokeFunction.ts b/src/plugins/invoke/lib/invokeFunction.ts index c94f0f6a..8b11eb18 100644 --- a/src/plugins/invoke/lib/invokeFunction.ts +++ b/src/plugins/invoke/lib/invokeFunction.ts @@ -1,17 +1,14 @@ +export function invokeFunction(): Promise { + const func = this.options.function; + const functionObject = this.serverless.service.getFunction(func); + const eventType = Object.keys(functionObject.events[0])[0]; -module.exports = { - invokeFunction () { - const func = this.options.function; - const functionObject = this.serverless.service.getFunction(func); - const eventType = Object.keys(functionObject.events[0])[0]; - - if (!this.options.data) { - this.options.data = {}; - } - - return this.provider.invoke(func, eventType, this.options.data); - // TODO: Github issue: https://github.com/Azure/azure-webjobs-sdk-script/issues/1122 - // .then(() => this.provider.getInvocationId(func)) - // .then(() => this.provider.getLogsForInvocationId()); + if (!this.options.data) { + this.options.data = {}; } -}; + + return this.provider.invoke(func, eventType, this.options.data); + // TODO: Github issue: https://github.com/Azure/azure-webjobs-sdk-script/issues/1122 + // .then(() => this.provider.getInvocationId(func)) + // .then(() => this.provider.getLogsForInvocationId()); +} \ No newline at end of file diff --git a/src/plugins/login/loginPlugin.ts b/src/plugins/login/loginPlugin.ts index 09b9fba2..8b877af9 100644 --- a/src/plugins/login/loginPlugin.ts +++ b/src/plugins/login/loginPlugin.ts @@ -1,13 +1,14 @@ +import * as Serverless from 'serverless'; import * as open from 'open'; import { interactiveLoginWithAuthResponse, loginWithServicePrincipalSecretWithAuthResponse } from '@azure/ms-rest-nodeauth'; import AzureProvider from '../../provider/azureProvider'; export class AzureLoginPlugin { private provider: AzureProvider; - private hooks: any; + public hooks: { [eventName: string]: Promise }; - constructor(private serverless, private options) { - this.provider = this.serverless.getProvider('azure'); + constructor(private serverless: Serverless, private options: Serverless.Options) { + this.provider = (this.serverless.getProvider('azure') as any) as AzureProvider; this.hooks = { 'before:deploy:initialize': this.login.bind(this) @@ -31,9 +32,13 @@ export class AzureLoginPlugin { await open('https://microsoft.com/devicelogin'); authResult = await interactiveLoginWithAuthResponse(); } - this.serverless.variables.azureAccessToken = authResult.credentials.tokenCache._entries[0].accessToken; - this.serverless.variables.azureCredentials = authResult.credentials; - this.serverless.variables.subscriptionId = authResult.subscriptionId || subscriptionId; + + // TODO: This is temporary until the azure provider goes away + this.provider.credentials = authResult.credentials; + + this.serverless.variables['azureAccessToken'] = authResult.credentials.tokenCache._entries[0].accessToken; + this.serverless.variables['azureCredentials'] = authResult.credentials; + this.serverless.variables['subscriptionId'] = authResult.subscriptionId || subscriptionId; } catch (e) { this.serverless.cli.log('Error logging into azure'); diff --git a/src/plugins/logs/azureLogs.ts b/src/plugins/logs/azureLogs.ts index fe856ee5..b3b44a9e 100644 --- a/src/plugins/logs/azureLogs.ts +++ b/src/plugins/logs/azureLogs.ts @@ -1,17 +1,13 @@ - -import { Promise } from 'bluebird'; -import AzureProvider from '../../provider/azureProvider'; -const retrieveLogs = require('./lib/retrieveLogs'); +import * as Serverless from 'serverless'; +import { retrieveLogs } from './lib/retrieveLogs'; export class AzureLogs { - provider: AzureProvider - hooks: any; - retrieveLogs: any; + public hooks: { [eventName: string]: Promise }; + private retrieveLogs: () => Promise; - constructor (private serverless, private options) { + constructor(private serverless: Serverless, private options: Serverless.Options) { this.serverless = serverless; this.options = options; - this.provider = this.serverless.getProvider('azure'); Object.assign( this, @@ -19,12 +15,7 @@ export class AzureLogs { ); this.hooks = { - 'before:logs:logs': () => Promise.bind(this) - .then(this.provider.initialize(this.serverless,this.options)), - - 'logs:logs': () => Promise.bind(this) - .then(this.provider.initialize(this.serverless,this.options)) - .then(this.retrieveLogs) + 'logs:logs': this.retrieveLogs.bind(this) }; } } diff --git a/src/plugins/logs/lib/retrieveLogs.ts b/src/plugins/logs/lib/retrieveLogs.ts index 413ff112..0dfc8a04 100644 --- a/src/plugins/logs/lib/retrieveLogs.ts +++ b/src/plugins/logs/lib/retrieveLogs.ts @@ -1,10 +1,8 @@ -module.exports = { - retrieveLogs () { - const functionName = this.options.function; +export function retrieveLogs(): Promise { + const functionName = this.options.function; - return this.provider.getAdminKey() - .then(() => this.provider.pingHostStatus(functionName)) - .then(() => this.provider.getLogsStream(functionName)); - } -}; + return this.provider.getAdminKey() + .then(() => this.provider.pingHostStatus(functionName)) + .then(() => this.provider.getLogsStream(functionName)); +} diff --git a/src/plugins/package/azurePackage.ts b/src/plugins/package/azurePackage.ts index 3cab2671..fc5e8045 100644 --- a/src/plugins/package/azurePackage.ts +++ b/src/plugins/package/azurePackage.ts @@ -1,19 +1,19 @@ -import { Promise } from 'bluebird'; +import * as Serverless from 'serverless'; import AzureProvider from '../../provider/azureProvider'; -const compileEvents = require('./lib/compileEvents'); -const webpackFunctionJson = require('./lib/webpackFunctionJson'); +import { compileEvents } from './lib/compileEvents'; +import { webpackFunctionJson } from './lib/webpackFunctionJson'; export class AzurePackage { provider: AzureProvider - hooks: any; - compileEvents: any; - webpackFunctionJson: any; + public hooks: { [eventName: string]: Promise }; - constructor (private serverless, private options) { + private compileEvents: () => Promise; + private webpackFunctionJson: () => Promise; + + constructor(private serverless: Serverless, private options: Serverless.Options) { this.serverless = serverless; this.options = options; - this.provider = this.serverless.getProvider('azure'); Object.assign( this, @@ -22,14 +22,13 @@ export class AzurePackage { ); this.hooks = { - 'package:setupProviderConfiguration': () => Promise.bind(this) - .then(() => this.serverless.cli.log('Building Azure Events Hooks')) - .then(this.provider.initialize(this.serverless, this.options)) - .then(this.compileEvents), - - 'before:webpack:package:packageModules': () => Promise.bind(this) - .then(this.provider.initialize(this.serverless, this.options)) - .then(this.webpackFunctionJson.bind(this)) + 'package:setupProviderConfiguration': this.setupProviderConfiguration.bind(this), + 'before:webpack:package:packageModules': this.webpackFunctionJson.bind(this) }; } + + private async setupProviderConfiguration() { + this.serverless.cli.log('Building Azure Events Hooks'); + return await this.compileEvents(); + } } diff --git a/src/plugins/package/azurePackageFunction.ts b/src/plugins/package/azurePackageFunction.ts index fda880aa..d64849f1 100644 --- a/src/plugins/package/azurePackageFunction.ts +++ b/src/plugins/package/azurePackageFunction.ts @@ -1,17 +1,13 @@ -import { Promise } from 'bluebird'; -import AzureProvider from '../../provider/azureProvider'; -const compileEventsForFunction = require('./lib/compileEventsForFunction'); +import { compileEventsForFunction } from './lib/compileEventsForFunction'; export class AzurePackageFunction { - provider: AzureProvider; - hooks: any; - compileEventsForFunction: any; + public hooks: { [eventName: string]: Promise }; + private compileEventsForFunction: () => Promise; - constructor (private serverless, private options) { + constructor(private serverless, private options) { this.serverless = serverless; this.options = options; - this.provider = this.serverless.getProvider('azure'); Object.assign( this, @@ -19,10 +15,12 @@ export class AzurePackageFunction { ); this.hooks = { - 'before:deploy:function:packageFunction': () => Promise.bind(this) - .then(() => this.serverless.cli.log('Building Azure Events Hooks')) - .then(this.provider.initialize(this.serverless, this.options)) - .then(this.compileEventsForFunction), + 'before:deploy:function:packageFunction': this.packageFunction.bind(this) }; } + + private async packageFunction() { + this.serverless.cli.log('Building Azure Events Hooks'); + await this.compileEventsForFunction(); + } } diff --git a/src/plugins/package/lib/compileEvents.ts b/src/plugins/package/lib/compileEvents.ts index 276e03cd..08a0a031 100644 --- a/src/plugins/package/lib/compileEvents.ts +++ b/src/plugins/package/lib/compileEvents.ts @@ -1,18 +1,14 @@ +import * as utils from '../../../shared/utils'; -import { Promise } from 'bluebird'; -const utils = require('../../../shared/utils'); +export function compileEvents(): Promise { + const createEventsPromises = []; -module.exports = { - compileEvents() { - const createEventsPromises = []; + this.serverless.service.getAllFunctions().forEach((functionName) => { + const metaData = utils.getFunctionMetaData(functionName, this.provider.getParsedBindings(), this.serverless); - this.serverless.service.getAllFunctions().forEach((functionName) => { - const metaData = utils.getFunctionMetaData(functionName, this.provider.getParsedBindings(), this.serverless); + createEventsPromises.push(this.provider.createEventsBindings(functionName, metaData.entryPoint, metaData.handlerPath, metaData.params)); + }); - createEventsPromises.push(this.provider.createEventsBindings(functionName, metaData.entryPoint, metaData.handlerPath, metaData.params)); - }); - - return Promise.all(createEventsPromises); - } -}; + return Promise.all(createEventsPromises); +} diff --git a/src/plugins/package/lib/compileEventsForFunction.ts b/src/plugins/package/lib/compileEventsForFunction.ts index b1eaa121..1b713165 100644 --- a/src/plugins/package/lib/compileEventsForFunction.ts +++ b/src/plugins/package/lib/compileEventsForFunction.ts @@ -1,12 +1,10 @@ -const utils = require('../../../shared/utils'); +import * as utils from '../../../shared/utils'; -module.exports = { - compileEventsForFunction() { - const functionName = this.options.function; - const metaData = utils.getFunctionMetaData(functionName, this.provider.getParsedBindings(), this.serverless); +export function compileEventsForFunction(): Promise { + const functionName = this.options.function; + const metaData = utils.getFunctionMetaData(functionName, this.provider.getParsedBindings(), this.serverless); - return this.provider.createEventsBindings(functionName, metaData.entryPoint, metaData.handlerPath, metaData.params); - } -}; + return this.provider.createEventsBindings(functionName, metaData.entryPoint, metaData.handlerPath, metaData.params); +} diff --git a/src/plugins/package/lib/webpackFunctionJson.ts b/src/plugins/package/lib/webpackFunctionJson.ts index 4cfbd9db..dbb38279 100644 --- a/src/plugins/package/lib/webpackFunctionJson.ts +++ b/src/plugins/package/lib/webpackFunctionJson.ts @@ -1,27 +1,25 @@ -const fs = require('fs'); +import * as fs from 'fs'; import { join } from 'path'; -import { Promise } from 'bluebird'; -module.exports = { - webpackFunctionJson () { - const webpackJsonPromises = []; - if (fs.existsSync('.webpack')) { - this.serverless.service.getAllFunctions().forEach((functionName) => { - webpackJsonPromises.push(moveJsonFile.call(this, functionName)); - }); - } +export function webpackFunctionJson(): Promise { + const webpackJsonPromises = []; - return Promise.all(webpackJsonPromises); + if (fs.existsSync('.webpack')) { + this.serverless.service.getAllFunctions().forEach((functionName) => { + webpackJsonPromises.push(moveJsonFile.call(this, functionName)); + }); } -}; -function moveJsonFile(functionName) { + return Promise.all(webpackJsonPromises); +} + +function moveJsonFile(functionName): Promise { const dirPath = join(this.serverless.config.servicePath, '.webpack', functionName); const jsonFileName = `${functionName}-function.json`; const jsonFileSrcPath = join(this.serverless.config.servicePath, jsonFileName); const jsonFileDestPath = join(dirPath, jsonFileName); - const fileMovedPromise = new Promise((resolve) => { + return new Promise((resolve) => { if (fs.existsSync(dirPath) && fs.statSync(dirPath).isDirectory()) { if (fs.existsSync(jsonFileSrcPath)) { this.serverless.cli.log(`Moving ${jsonFileName} to .webpack directory.`); @@ -34,6 +32,4 @@ function moveJsonFile(functionName) { resolve(); }); - - return fileMovedPromise; } diff --git a/src/plugins/remove/azureRemove.ts b/src/plugins/remove/azureRemove.ts index d52daee1..04d5600e 100644 --- a/src/plugins/remove/azureRemove.ts +++ b/src/plugins/remove/azureRemove.ts @@ -1,28 +1,23 @@ - -import { Promise } from 'bluebird'; -import AzureProvider from '../../provider/azureProvider'; -const deleteResourceGroup = require('./lib/deleteResourceGroup'); +import * as Serverless from 'serverless'; +import { deleteResourceGroup } from './lib/deleteResourceGroup'; export class AzureRemove { - provider: AzureProvider; - hooks: any; - deleteResourceGroup: any; - - constructor (private serverless, private options) { - this.serverless = serverless; - this.options = options; - this.provider = this.serverless.getProvider('azure'); + public hooks: { [eventName: string]: Promise }; + deleteResourceGroup: () => Promise; + constructor(private serverless: Serverless, private options: Serverless.Options) { Object.assign( this, deleteResourceGroup ); this.hooks = { - 'remove:remove': () => Promise.bind(this) - .then(this.provider.initialize(this.serverless,this.options)) - .then(this.deleteResourceGroup) - .then(() => this.serverless.cli.log('Service successfully removed')) + 'remove:remove': this.deleteResourceGroup.bind(this) }; } + + private async remove() { + await this.deleteResourceGroup(); + this.serverless.cli.log('Service successfully removed'); + } } diff --git a/src/plugins/remove/lib/deleteResourceGroup.ts b/src/plugins/remove/lib/deleteResourceGroup.ts index b7ce0b3f..82c78d1d 100644 --- a/src/plugins/remove/lib/deleteResourceGroup.ts +++ b/src/plugins/remove/lib/deleteResourceGroup.ts @@ -1,8 +1,5 @@ - -module.exports = { - deleteResourceGroup () { - return this.provider.Login() - .then(() => this.provider.DeleteDeployment()) - .then(() => this.provider.DeleteResourceGroup()); - } -}; +export function deleteResourceGroup(): Promise { + return this.provider.Login() + .then(() => this.provider.DeleteDeployment()) + .then(() => this.provider.DeleteResourceGroup()); +} diff --git a/src/provider/azureProvider.ts b/src/provider/azureProvider.ts index 6d147741..3501d4b9 100644 --- a/src/provider/azureProvider.ts +++ b/src/provider/azureProvider.ts @@ -1,4 +1,5 @@ import { join } from 'path'; +import * as Serverless from 'serverless'; const fs = require('fs'); const request = require('request'); const parseBindings = require('../shared/parseBindings'); @@ -9,39 +10,23 @@ let functionsAdminKey; let invocationId; export default class AzureProvider { + public credentials: any; + private serverless: any; private options: any; private provider: any; - private credentials: any; private parsedBindings: any; static getProviderName() { return config.providerName; } - constructor(serverless) { + constructor(serverless: Serverless) { this.serverless = serverless; this.provider = this; this.serverless.setProvider(config.providerName, this); } - initialize(serverless, options) { - this.serverless = serverless; - this.options = options; - - // Overrides function app domains. - // In instances where the function app is deployed in an App Service Environment (ASE) - // the domains will be prefixed with a custom sub domain - config.functionAppDomain = this.serverless.service.provider.functionAppDomain || config.functionAppDomain; - config.scmDomain = this.serverless.service.provider.scmDomain || config.scmDomain; - - return new Promise((resolve) => { - functionAppName = this.serverless.service.service; - - resolve(); - }); - } - getParsedBindings() { if (!this.parsedBindings) { this.parsedBindings = parseBindings.getBindingsMetaData(this.serverless); @@ -50,7 +35,7 @@ export default class AzureProvider { return this.parsedBindings; } - getAdminKey() { + getAdminKey(): Promise { const options = { url: `https://${functionAppName}${config.scmDomain}${config.masterKeyApiPath}`, json: true, @@ -71,7 +56,7 @@ export default class AzureProvider { }); } - pingHostStatus(functionName) { + pingHostStatus(functionName): Promise { const requestUrl = `https://${functionAppName}${config.functionAppDomain}/admin/functions/${functionName}/status`; const options = { host: functionAppName + config.functionAppDomain, @@ -117,7 +102,7 @@ export default class AzureProvider { .pipe(process.stdout); } - getInvocationId(functionName) { + getInvocationId(functionName): Promise { const options = { url: `https://${functionAppName}${config.scmDomain}${config.logInvocationsApiPath + functionAppName}-${functionName}/invocations?limit=5`, method: 'GET', @@ -139,7 +124,7 @@ export default class AzureProvider { }); } - getLogsForInvocationId() { + getLogsForInvocationId(): Promise { this.serverless.cli.log(`Logs for InvocationId: ${invocationId}`); const options = { url: `https://${functionAppName}${config.scmDomain}${config.logOutputApiPath}${invocationId}`, @@ -160,7 +145,7 @@ export default class AzureProvider { }); } - invoke(functionName, eventType, eventData) { + invoke(functionName, eventType, eventData): Promise { if (eventType === 'http') { let queryString = ''; @@ -227,7 +212,7 @@ export default class AzureProvider { }); } - uploadPackageJson() { + uploadPackageJson(): Promise { const packageJsonFilePath = join(this.serverless.config.servicePath, 'package.json'); this.serverless.cli.log('Uploading package.json...'); @@ -260,7 +245,7 @@ export default class AzureProvider { }); } - createEventsBindings(functionName, entryPoint, filePath, params) { + createEventsBindings(functionName, entryPoint, filePath, params): Promise { return new Promise((resolve) => { const functionJSON = params.functionsJson; functionJSON.entryPoint = entryPoint; From 5bc2c04ea944bfa1a1ff4ec21aec312ce416fbe8 Mon Sep 17 00:00:00 2001 From: Wallace Breza Date: Mon, 20 May 2019 20:52:23 -0700 Subject: [PATCH 19/19] fix: Added serverless typings --- .../deploy/azureDeployFunctionPlugin.ts | 3 ++- src/plugins/invoke/azureInvoke.ts | 3 --- src/plugins/logs/azureLogs.ts | 3 --- src/plugins/package/azurePackage.ts | 3 --- src/plugins/package/azurePackageFunction.ts | 6 ++---- src/provider/azureProvider.ts | 3 --- src/services/apimService.ts | 13 +++++-------- src/services/baseService.ts | 13 +++++++------ src/services/functionAppService.ts | 19 +++++++++---------- src/services/resourceService.ts | 7 ++++--- 10 files changed, 29 insertions(+), 44 deletions(-) diff --git a/src/plugins/deploy/azureDeployFunctionPlugin.ts b/src/plugins/deploy/azureDeployFunctionPlugin.ts index 1786ca65..314dbb70 100644 --- a/src/plugins/deploy/azureDeployFunctionPlugin.ts +++ b/src/plugins/deploy/azureDeployFunctionPlugin.ts @@ -1,9 +1,10 @@ +import * as Serverless from 'serverless'; import { FunctionAppService } from '../../services/functionAppService'; export class AzureDeployFunctionPlugin { public hooks: { [eventName: string]: Promise }; - constructor(private serverless, private options) { + constructor(private serverless: Serverless, private options: Serverless.Options) { this.hooks = { 'deploy:function:packageFunction': this.beforeDeploy.bind(this), 'deploy:function:deploy': this.deploy.bind(this, options) diff --git a/src/plugins/invoke/azureInvoke.ts b/src/plugins/invoke/azureInvoke.ts index 024fe3a3..ac3d705d 100644 --- a/src/plugins/invoke/azureInvoke.ts +++ b/src/plugins/invoke/azureInvoke.ts @@ -9,9 +9,6 @@ export class AzureInvoke { private getAdminKey: () => Promise; constructor(private serverless: Serverless, private options: Serverless.Options) { - this.serverless = serverless; - this.options = options; - Object.assign( this, getAdminKey, diff --git a/src/plugins/logs/azureLogs.ts b/src/plugins/logs/azureLogs.ts index b3b44a9e..47e4e635 100644 --- a/src/plugins/logs/azureLogs.ts +++ b/src/plugins/logs/azureLogs.ts @@ -6,9 +6,6 @@ export class AzureLogs { private retrieveLogs: () => Promise; constructor(private serverless: Serverless, private options: Serverless.Options) { - this.serverless = serverless; - this.options = options; - Object.assign( this, retrieveLogs diff --git a/src/plugins/package/azurePackage.ts b/src/plugins/package/azurePackage.ts index fc5e8045..2ab38047 100644 --- a/src/plugins/package/azurePackage.ts +++ b/src/plugins/package/azurePackage.ts @@ -12,9 +12,6 @@ export class AzurePackage { private webpackFunctionJson: () => Promise; constructor(private serverless: Serverless, private options: Serverless.Options) { - this.serverless = serverless; - this.options = options; - Object.assign( this, compileEvents, diff --git a/src/plugins/package/azurePackageFunction.ts b/src/plugins/package/azurePackageFunction.ts index d64849f1..014123aa 100644 --- a/src/plugins/package/azurePackageFunction.ts +++ b/src/plugins/package/azurePackageFunction.ts @@ -1,14 +1,12 @@ +import * as Serverless from 'serverless'; import { compileEventsForFunction } from './lib/compileEventsForFunction'; export class AzurePackageFunction { public hooks: { [eventName: string]: Promise }; private compileEventsForFunction: () => Promise; - constructor(private serverless, private options) { - this.serverless = serverless; - this.options = options; - + constructor(private serverless: Serverless, private options: Serverless.Options) { Object.assign( this, compileEventsForFunction diff --git a/src/provider/azureProvider.ts b/src/provider/azureProvider.ts index 3501d4b9..0dfd1c73 100644 --- a/src/provider/azureProvider.ts +++ b/src/provider/azureProvider.ts @@ -13,8 +13,6 @@ export default class AzureProvider { public credentials: any; private serverless: any; - private options: any; - private provider: any; private parsedBindings: any; static getProviderName() { @@ -23,7 +21,6 @@ export default class AzureProvider { constructor(serverless: Serverless) { this.serverless = serverless; - this.provider = this; this.serverless.setProvider(config.providerName, this); } diff --git a/src/services/apimService.ts b/src/services/apimService.ts index 35cd8719..ceda0a91 100644 --- a/src/services/apimService.ts +++ b/src/services/apimService.ts @@ -1,5 +1,5 @@ +import * as Serverless from 'serverless'; import { ApiManagementClient } from '@azure/arm-apimanagement'; -import { ResourceManagementClient } from '@azure/arm-resources'; import { FunctionAppService } from './functionAppService'; import { BaseService } from './baseService'; @@ -7,17 +7,14 @@ import { BaseService } from './baseService'; * APIM Service handles deployment and integration with Azure API Management */ export class ApimService extends BaseService { - private resourceId: string; - private resourceClient: ResourceManagementClient; private apimClient: ApiManagementClient; private functionAppService: FunctionAppService; private config: any; - constructor(serverless, options) { + constructor(serverless: Serverless, options: Serverless.Options) { super(serverless, options); - this.resourceId = `/subscriptions/${this.subscriptionId}/resourceGroups/${this.resourceGroup}/providers/Microsoft.Web/sites/${this.serviceName}`; - this.config = this.serverless.service.provider.apim; - this.resourceClient = new ResourceManagementClient(this.credentials, this.subscriptionId); + + this.config = this.serverless.service.provider['apim']; this.apimClient = new ApiManagementClient(this.credentials, this.subscriptionId); this.functionAppService = new FunctionAppService(serverless, options); } @@ -59,7 +56,7 @@ export class ApimService extends BaseService { * @param options */ async deployFunction(options) { - const functionConfig = this.serverless.service.functions[options.function]; + const functionConfig = this.serverless.service['functions'][options.function]; if (!functionConfig.apim) { return; diff --git a/src/services/baseService.ts b/src/services/baseService.ts index 0a8ad920..0d36aa42 100644 --- a/src/services/baseService.ts +++ b/src/services/baseService.ts @@ -1,3 +1,4 @@ +import * as Serverless from 'serverless'; import axios from 'axios'; export abstract class BaseService { @@ -8,13 +9,13 @@ export abstract class BaseService { protected resourceGroup: string; protected deploymentName: string; - constructor(protected serverless, protected options) { + constructor(protected serverless: Serverless, protected options: Serverless.Options) { this.baseUrl = 'https://management.azure.com'; - this.serviceName = serverless.service.service; - this.credentials = serverless.variables.azureCredentials; - this.subscriptionId = serverless.variables.subscriptionId; - this.resourceGroup = serverless.service.provider.resourceGroup || `${this.serviceName}-rg`; - this.deploymentName = serverless.service.provider.deploymentName || `${this.resourceGroup}-deployment`; + this.serviceName = serverless.service['service']; + this.credentials = serverless.variables['azureCredentials']; + this.subscriptionId = serverless.variables['subscriptionId']; + this.resourceGroup = serverless.service.provider['resourceGroup'] || `${this.serviceName}-rg`; + this.deploymentName = serverless.service.provider['deploymentName'] || `${this.resourceGroup}-deployment`; } async sendApiRequest(method: string, relativeUrl: string, options: any = {}) { diff --git a/src/services/functionAppService.ts b/src/services/functionAppService.ts index b99b70d5..b80338a4 100644 --- a/src/services/functionAppService.ts +++ b/src/services/functionAppService.ts @@ -1,3 +1,4 @@ +import * as Serverless from 'serverless'; import * as fs from 'fs'; import * as path from 'path'; import request from 'request'; @@ -9,14 +10,12 @@ import { BaseService } from './baseService'; import { Deployment } from '@azure/arm-resources/esm/models'; export class FunctionAppService extends BaseService { - private resourceId: string; private resourceClient: ResourceManagementClient; private webClient: WebSiteManagementClient; - constructor(serverless, options) { + constructor(serverless: Serverless, options: Serverless.Options) { super(serverless, options); - this.resourceId = `/subscriptions/${this.subscriptionId}/resourceGroups/${this.resourceGroup}/providers/Microsoft.Web/sites/${this.serviceName}`; this.resourceClient = new ResourceManagementClient(this.credentials, this.subscriptionId); this.webClient = new WebSiteManagementClient(this.credentials, this.subscriptionId); } @@ -89,7 +88,7 @@ export class FunctionAppService extends BaseService { const scmDomain = functionApp.enabledHostNames[0]; // Upload function artifact if it exists, otherwise the full service is handled in 'uploadFunctions' method - const functionZipFile = this.serverless.service.functions[functionName].package.artifact || this.serverless.service.artifact; + const functionZipFile = this.serverless.service['functions'][functionName].package.artifact || this.serverless.service['artifact']; if (functionZipFile) { this.serverless.cli.log(`-> Uploading function package: ${functionName}`); @@ -118,7 +117,7 @@ export class FunctionAppService extends BaseService { this.serverless.cli.log(`Creating function app: ${this.serviceName}`); let parameters: any = { functionAppName: { value: this.serviceName } }; - const gitUrl = this.serverless.service.provider.gitUrl; + const gitUrl = this.serverless.service.provider['gitUrl']; if (gitUrl) { parameters = { @@ -133,10 +132,10 @@ export class FunctionAppService extends BaseService { templateFilePath = path.join(__dirname, 'armTemplates', 'azuredeployWithGit.json'); } - if (this.serverless.service.provider.armTemplate) { - this.serverless.cli.log(`-> Deploying custom ARM template: ${this.serverless.service.provider.armTemplate.file}`); - templateFilePath = path.join(this.serverless.config.servicePath, this.serverless.service.provider.armTemplate.file); - const userParameters = this.serverless.service.provider.armTemplate.parameters; + if (this.serverless.service.provider['armTemplate']) { + this.serverless.cli.log(`-> Deploying custom ARM template: ${this.serverless.service.provider['armTemplate'].file}`); + templateFilePath = path.join(this.serverless.config.servicePath, this.serverless.service.provider['armTemplate'].file); + const userParameters = this.serverless.service.provider['armTemplate'].parameters; const userParametersKeys = Object.keys(userParameters); for (let paramIndex = 0; paramIndex < userParametersKeys.length; paramIndex++) { @@ -151,7 +150,7 @@ export class FunctionAppService extends BaseService { // Check if there are custom environment variables defined that need to be // added to the ARM template used in the deployment. - const environmentVariables = this.serverless.service.provider.environment; + const environmentVariables = this.serverless.service.provider['environment']; if (environmentVariables) { const appSettingsPath = '$.resources[?(@.kind=="functionapp")].properties.siteConfig.appSettings'; diff --git a/src/services/resourceService.ts b/src/services/resourceService.ts index 260f837e..c2f0436d 100644 --- a/src/services/resourceService.ts +++ b/src/services/resourceService.ts @@ -1,10 +1,11 @@ +import * as Serverless from 'serverless'; import { ResourceManagementClient } from '@azure/arm-resources'; import { BaseService } from './baseService'; export class ResourceService extends BaseService { private resourceClient: ResourceManagementClient; - - constructor(serverless, options) { + + constructor(serverless: Serverless, options: Serverless.Options) { super(serverless, options); this.resourceClient = new ResourceManagementClient(this.credentials, this.subscriptionId); @@ -14,7 +15,7 @@ export class ResourceService extends BaseService { this.serverless.cli.log(`Creating resource group: ${this.resourceGroup}`); const groupParameters = { - location: this.serverless.service.provider.location + location: this.serverless.service.provider['location'] }; return await this.resourceClient.resourceGroups.createOrUpdate(this.resourceGroup, groupParameters);