From d2749674a0b85d2ac4d23ca25ba80fcdf8cfb097 Mon Sep 17 00:00:00 2001 From: Muthurathinam Date: Tue, 7 May 2019 11:38:53 +0530 Subject: [PATCH 01/23] Changes: * Removed polyfill dependencies for fetch and promise * Removed Browserify and replaced it with rollup --- .gitignore | 3 +- babel.config.js | 30 + browser-wrapper-dependency.js | 11 - browser-wrapper.js | 11 - browserify-with-dependencies.js | 15 - browserify.js | 17 - package-lock.json | 2312 ++++++++++++++++--------------- package.json | 25 +- rollup.config.js | 22 +- samples/browser/package.json | 2 +- samples/browser/src/index.html | 2 +- spec/core/Client.ts | 2 +- spec/development/test-helper.ts | 3 +- spec/test-helper.ts | 3 +- src/PolyFill.ts | 11 - src/index.ts | 2 - tsconfig-base.json | 1 + tsconfig-cjs.json | 1 - 18 files changed, 1236 insertions(+), 1237 deletions(-) create mode 100644 babel.config.js delete mode 100644 browser-wrapper-dependency.js delete mode 100644 browser-wrapper.js delete mode 100644 browserify-with-dependencies.js delete mode 100644 browserify.js delete mode 100644 src/PolyFill.ts diff --git a/.gitignore b/.gitignore index d5ed1a219..1125861f1 100644 --- a/.gitignore +++ b/.gitignore @@ -20,8 +20,7 @@ src/**/*.d.ts samples/node/secrets.json samples/browser/src/secrets.js -samples/browser/src/graph-js-sdk-core.js -samples/browser/src/graph-js-sdk-web.js +samples/browser/src/graph-js-sdk.js samples/browser/src/graph-es-sdk.js spec/**/*.js diff --git a/babel.config.js b/babel.config.js new file mode 100644 index 000000000..15cad8417 --- /dev/null +++ b/babel.config.js @@ -0,0 +1,30 @@ +module.exports = function(api) { + api.cache(true); + const presets = [ + [ + "@babel/preset-env", + { + targets: { + edge: 12, + }, + }, + ], + ]; + + const plugins = [ + [ + "@babel/plugin-transform-runtime", + { + absoluteRuntime: false, + corejs: false, + helpers: true, + regenerator: true, + useESModules: false, + }, + ], + ]; + return { + presets, + plugins, + }; +}; diff --git a/browser-wrapper-dependency.js b/browser-wrapper-dependency.js deleted file mode 100644 index 55c2e36a1..000000000 --- a/browser-wrapper-dependency.js +++ /dev/null @@ -1,11 +0,0 @@ -/** - * ------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. - * See License in the project root for license information. - * ------------------------------------------------------------------------------------------- - */ - -/** - * Initializes PolyFilling - */ -require("./lib/src/PolyFill"); diff --git a/browser-wrapper.js b/browser-wrapper.js deleted file mode 100644 index caf167d69..000000000 --- a/browser-wrapper.js +++ /dev/null @@ -1,11 +0,0 @@ -/** - * ------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. - * See License in the project root for license information. - * ------------------------------------------------------------------------------------------- - */ - -/** - * Adds exports in index.js to the MicrosoftGraph property in window object - */ -window.MicrosoftGraph = require("./lib/src/browser/index.js"); diff --git a/browserify-with-dependencies.js b/browserify-with-dependencies.js deleted file mode 100644 index 2270ce6d2..000000000 --- a/browserify-with-dependencies.js +++ /dev/null @@ -1,15 +0,0 @@ -/** - * ------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. - * See License in the project root for license information. - * ------------------------------------------------------------------------------------------- - */ - -/** - * Initializes browserify, adds wrapper files and outputs the browserified file - */ -const Browserify = require("browserify"); -const browserify = Browserify(); -browserify.add("./browser-wrapper.js"); -browserify.add("./browser-wrapper-dependency.js"); -browserify.bundle().pipe(process.stdout); diff --git a/browserify.js b/browserify.js deleted file mode 100644 index cf43d5f19..000000000 --- a/browserify.js +++ /dev/null @@ -1,17 +0,0 @@ -/** - * ------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. - * See License in the project root for license information. - * ------------------------------------------------------------------------------------------- - */ - -/** - * Initializes browserify, adds a wrapper file and outputs the browserified file - */ -const Browserify = require("browserify"); -const browserify = Browserify(); -browserify.add("./browser-wrapper.js"); -browserify.add("./browser-wrapper-dependency.js"); -browserify.exclude("isomorphic-fetch"); -browserify.exclude("es6-promise"); -browserify.bundle().pipe(process.stdout); diff --git a/package-lock.json b/package-lock.json index c68f4057b..464ff2322 100644 --- a/package-lock.json +++ b/package-lock.json @@ -13,6 +13,255 @@ "@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" + } + } + } + }, + "@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" + } + }, + "@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", @@ -24,13 +273,529 @@ "js-tokens": "^4.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" + } + }, + "@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-runtime": { + "version": "7.4.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-runtime/-/plugin-transform-runtime-7.4.4.tgz", + "integrity": "sha512-aMVojEjPszvau3NRg+TIH14ynZLvPewH4xhlCW1w6A3rkxTS1m4uwzRclYR9oS+rl/dr+kT+pzbfHuAWP/lc7Q==", + "dev": true, + "requires": { + "@babel/helper-module-imports": "^7.0.0", + "@babel/helper-plugin-utils": "^7.0.0", + "resolve": "^1.8.1", + "semver": "^5.5.1" + } + }, + "@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/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/runtime": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.0.0.tgz", - "integrity": "sha512-7hGhzlcmg01CvH1EHdSPVXYX1aJ8KCEyz6I9xYIi/asDtzBPMyMhVibhM/K6g/5qnKBwjZtp10bNZIEFTRW1MA==", + "version": "7.4.4", + "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.4.4.tgz", + "integrity": "sha512-w0+uT71b6Yi7i5SE0co4NioIpSYS6lLiXvCzWzGSKvpK5vdQtCbICHMj+gbAKAOtxiV6HsVh/MBdaF9EQ6faSg==", + "requires": { + "regenerator-runtime": "^0.13.2" + } + }, + "@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" + } + } + } + }, + "@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": { - "regenerator-runtime": "^0.12.0" + "esutils": "^2.0.2", + "lodash": "^4.17.11", + "to-fast-properties": "^2.0.0" } }, "@samverschueren/stream-to-observable": { @@ -48,12 +813,6 @@ "integrity": "sha512-EYNwp3bU+98cpU4lAWYYL7Zz+2gryWH1qbdDTidVd6hkiR6weksdbMadyXKXNPEkQFhXM+hVO9ZygomHXp+AIw==", "dev": true }, - "@types/isomorphic-fetch": { - "version": "0.0.35", - "resolved": "https://registry.npmjs.org/@types/isomorphic-fetch/-/isomorphic-fetch-0.0.35.tgz", - "integrity": "sha512-DaZNUvLDCAnCTjgwxgiL1eQdxIKEpNLOlTNtAgnZc50bG2copGhRrFN9/PxPBuJe+tZVLCbQ7ls0xveXVRPkvw==", - "dev": true - }, "@types/mocha": { "version": "5.2.6", "resolved": "https://registry.npmjs.org/@types/mocha/-/mocha-5.2.6.tgz", @@ -61,19 +820,24 @@ "dev": true }, "@types/node": { - "version": "11.13.4", - "resolved": "https://registry.npmjs.org/@types/node/-/node-11.13.4.tgz", - "integrity": "sha512-+rabAZZ3Yn7tF/XPGHupKIL5EcAbrLxnTr/hgQICxbeuAfWtT0UZSfULE+ndusckBItcv4o6ZeOJplQikVcLvQ==", + "version": "11.13.9", + "resolved": "https://registry.npmjs.org/@types/node/-/node-11.13.9.tgz", + "integrity": "sha512-NJ4yuEVw5podZbINp3tEqUIImMSAEHaCXRiWCf3KC32l6hIKf0iPJEh2uZdT0fELfRYk310yLmMXqy2leZQUbg==", "dev": true }, - "JSONStream": { - "version": "1.3.5", - "resolved": "https://registry.npmjs.org/JSONStream/-/JSONStream-1.3.5.tgz", - "integrity": "sha512-E+iruNOY8VV9s4JEbe1aNEm6MiszPRr/UfcHMz0TQh1BXSxHK+ASV1R6W4HpjBhSeS+54PIsAMCBmwD06LLsqQ==", + "@types/normalize-package-data": { + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/@types/normalize-package-data/-/normalize-package-data-2.4.0.tgz", + "integrity": "sha512-f5j5b/Gf71L+dbqxIpQ4Z2WlmI/mPJ0fOkGGmFgtb6sAu97EPczzbS3/tJKxmcYDj55OX6ssqwDAWOHIYDRDGA==", + "dev": true + }, + "@types/resolve": { + "version": "0.0.8", + "resolved": "https://registry.npmjs.org/@types/resolve/-/resolve-0.0.8.tgz", + "integrity": "sha512-auApPaJf3NPfe18hSoJkp8EbZzer2ISk7o8mCC3M9he/a04+gbMF97NkpD2S8riMGvm4BMRI59/SZQSaLTKpsQ==", "dev": true, "requires": { - "jsonparse": "^1.2.0", - "through": ">=2.2.7 <3" + "@types/node": "*" } }, "acorn": { @@ -82,30 +846,6 @@ "integrity": "sha512-jPTiwtOxaHNaAPg/dmrJ/beuzLRnXtB0kQPQ8JpotKJgTB6rX6c8mlf315941pyjBSaPg8NHXS9fhP4u17DpGA==", "dev": true }, - "acorn-dynamic-import": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/acorn-dynamic-import/-/acorn-dynamic-import-4.0.0.tgz", - "integrity": "sha512-d3OEjQV4ROpoflsnUA8HozoIR504TFxNivYEUi6uwz0IYhBkTDXGuWlNdMtybRt3nqVx/L6XqMt0FxkXuWKZhw==", - "dev": true - }, - "acorn-node": { - "version": "1.6.2", - "resolved": "https://registry.npmjs.org/acorn-node/-/acorn-node-1.6.2.tgz", - "integrity": "sha512-rIhNEZuNI8ibQcL7ANm/mGyPukIaZsRNX9psFNQURyJW0nu6k8wjSDld20z6v2mDBWqX13pIEnk9gGZJHIlEXg==", - "dev": true, - "requires": { - "acorn": "^6.0.2", - "acorn-dynamic-import": "^4.0.0", - "acorn-walk": "^6.1.0", - "xtend": "^4.0.1" - } - }, - "acorn-walk": { - "version": "6.1.1", - "resolved": "https://registry.npmjs.org/acorn-walk/-/acorn-walk-6.1.1.tgz", - "integrity": "sha512-OtUw6JUTgxA2QoqqmrmQ7F2NYqiBPi/L2jqHyFtllhOUvXYQXf0Z1CYUinIfyT4bTCGmrA7gX9FvHA81uzCoVw==", - "dev": true - }, "ansi-colors": { "version": "3.2.3", "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-3.2.3.tgz", @@ -166,24 +906,6 @@ "integrity": "sha1-45sJrqne+Gao8gbiiK9jkZuuOcQ=", "dev": true }, - "array-filter": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/array-filter/-/array-filter-0.0.1.tgz", - "integrity": "sha1-fajPLiZijtcygDWB/SH2fKzS7uw=", - "dev": true - }, - "array-map": { - "version": "0.0.0", - "resolved": "https://registry.npmjs.org/array-map/-/array-map-0.0.0.tgz", - "integrity": "sha1-iKK6tz0c97zVwbEYoAP2b2ZfpmI=", - "dev": true - }, - "array-reduce": { - "version": "0.0.0", - "resolved": "https://registry.npmjs.org/array-reduce/-/array-reduce-0.0.0.tgz", - "integrity": "sha1-FziZ0//Rx9k4PkR5Ul2+J4yrXys=", - "dev": true - }, "array-union": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/array-union/-/array-union-1.0.2.tgz", @@ -203,112 +925,31 @@ "version": "0.3.2", "resolved": "https://registry.npmjs.org/array-unique/-/array-unique-0.3.2.tgz", "integrity": "sha1-qJS3XUvE9s1nnvMkSp/Y9Gri1Cg=", - "dev": true - }, - "arrify": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/arrify/-/arrify-1.0.1.tgz", - "integrity": "sha1-iYUI2iIm84DfkEcoRWhJwVAaSw0=", - "dev": true - }, - "asn1.js": { - "version": "4.10.1", - "resolved": "https://registry.npmjs.org/asn1.js/-/asn1.js-4.10.1.tgz", - "integrity": "sha512-p32cOF5q0Zqs9uBiONKYLm6BClCoBCM5O9JfeUSlnQLBTxYdTK+pW+nXflm8UkKd2UYlEbYz5qEi0JuZR9ckSw==", - "dev": true, - "requires": { - "bn.js": "^4.0.0", - "inherits": "^2.0.1", - "minimalistic-assert": "^1.0.0" - } - }, - "assert": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/assert/-/assert-1.4.1.tgz", - "integrity": "sha1-mZEtWRg2tab1s0XA8H7vwI/GXZE=", - "dev": true, - "requires": { - "util": "0.10.3" - }, - "dependencies": { - "inherits": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.1.tgz", - "integrity": "sha1-sX0I0ya0Qj5Wjv9xn5GwscvfafE=", - "dev": true - }, - "util": { - "version": "0.10.3", - "resolved": "https://registry.npmjs.org/util/-/util-0.10.3.tgz", - "integrity": "sha1-evsa/lCAUkZInj23/g7TeTNqwPk=", - "dev": true, - "requires": { - "inherits": "2.0.1" - } - } - } - }, - "assertion-error": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/assertion-error/-/assertion-error-1.1.0.tgz", - "integrity": "sha512-jgsaNduz+ndvGyFt3uSuWqvy4lCnIJiovtouQN5JZHOKCS2QuhEdbcQHFhVksz2N2U9hXJo8odG7ETyWlEeuDw==", - "dev": true - }, - "assign-symbols": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/assign-symbols/-/assign-symbols-1.0.0.tgz", - "integrity": "sha1-WWZ/QfrdTyDMvCu5a41Pf3jsA2c=", - "dev": true - }, - "atob": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/atob/-/atob-2.1.2.tgz", - "integrity": "sha512-Wm6ukoaOGJi/73p/cl2GvLjTI5JM1k/O14isD73YML8StrH/7/lRFgmg8nICZgD3bZZvjwCGxtMOD3wWNAu8cg==", - "dev": true - }, - "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" - }, - "dependencies": { - "ansi-styles": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz", - "integrity": "sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=", - "dev": true - }, - "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" - } - }, - "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 - }, - "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 - } - } + "dev": true + }, + "arrify": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/arrify/-/arrify-1.0.1.tgz", + "integrity": "sha1-iYUI2iIm84DfkEcoRWhJwVAaSw0=", + "dev": true + }, + "assertion-error": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/assertion-error/-/assertion-error-1.1.0.tgz", + "integrity": "sha512-jgsaNduz+ndvGyFt3uSuWqvy4lCnIJiovtouQN5JZHOKCS2QuhEdbcQHFhVksz2N2U9hXJo8odG7ETyWlEeuDw==", + "dev": true + }, + "assign-symbols": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/assign-symbols/-/assign-symbols-1.0.0.tgz", + "integrity": "sha1-WWZ/QfrdTyDMvCu5a41Pf3jsA2c=", + "dev": true + }, + "atob": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/atob/-/atob-2.1.2.tgz", + "integrity": "sha512-Wm6ukoaOGJi/73p/cl2GvLjTI5JM1k/O14isD73YML8StrH/7/lRFgmg8nICZgD3bZZvjwCGxtMOD3wWNAu8cg==", + "dev": true }, "balanced-match": { "version": "1.0.0", @@ -371,18 +1012,6 @@ } } }, - "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==", - "dev": 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==", - "dev": true - }, "brace-expansion": { "version": "1.1.11", "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", @@ -422,184 +1051,21 @@ } } }, - "brorand": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/brorand/-/brorand-1.1.0.tgz", - "integrity": "sha1-EsJe/kCkXjwyPrhnWgoM5XsiNx8=", - "dev": true - }, - "browser-pack": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/browser-pack/-/browser-pack-6.1.0.tgz", - "integrity": "sha512-erYug8XoqzU3IfcU8fUgyHqyOXqIE4tUTTQ+7mqUjQlvnXkOO6OlT9c/ZoJVHYoAaqGxr09CN53G7XIsO4KtWA==", - "dev": true, - "requires": { - "JSONStream": "^1.0.3", - "combine-source-map": "~0.8.0", - "defined": "^1.0.0", - "safe-buffer": "^5.1.1", - "through2": "^2.0.0", - "umd": "^3.0.0" - } - }, - "browser-resolve": { - "version": "1.11.3", - "resolved": "https://registry.npmjs.org/browser-resolve/-/browser-resolve-1.11.3.tgz", - "integrity": "sha512-exDi1BYWB/6raKHmDTCicQfTkqwN5fioMFV4j8BsfMU4R2DK/QfZfK7kOVkmWCNANf0snkBzqGqAJBao9gZMdQ==", - "dev": true, - "requires": { - "resolve": "1.1.7" - }, - "dependencies": { - "resolve": { - "version": "1.1.7", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.1.7.tgz", - "integrity": "sha1-IDEU2CrSxe2ejgQRs5ModeiJ6Xs=", - "dev": true - } - } - }, "browser-stdout": { "version": "1.3.1", "resolved": "https://registry.npmjs.org/browser-stdout/-/browser-stdout-1.3.1.tgz", "integrity": "sha512-qhAVI1+Av2X7qelOfAIYwXONood6XlZE/fXaBSmW/T5SzLAmCgzi+eiWE7fUvbHaeNBQH13UftjpXxsfLkMpgw==", "dev": true }, - "browserify": { - "version": "16.2.3", - "resolved": "https://registry.npmjs.org/browserify/-/browserify-16.2.3.tgz", - "integrity": "sha512-zQt/Gd1+W+IY+h/xX2NYMW4orQWhqSwyV+xsblycTtpOuB27h1fZhhNQuipJ4t79ohw4P4mMem0jp/ZkISQtjQ==", - "dev": true, - "requires": { - "JSONStream": "^1.0.3", - "assert": "^1.4.0", - "browser-pack": "^6.0.1", - "browser-resolve": "^1.11.0", - "browserify-zlib": "~0.2.0", - "buffer": "^5.0.2", - "cached-path-relative": "^1.0.0", - "concat-stream": "^1.6.0", - "console-browserify": "^1.1.0", - "constants-browserify": "~1.0.0", - "crypto-browserify": "^3.0.0", - "defined": "^1.0.0", - "deps-sort": "^2.0.0", - "domain-browser": "^1.2.0", - "duplexer2": "~0.1.2", - "events": "^2.0.0", - "glob": "^7.1.0", - "has": "^1.0.0", - "htmlescape": "^1.1.0", - "https-browserify": "^1.0.0", - "inherits": "~2.0.1", - "insert-module-globals": "^7.0.0", - "labeled-stream-splicer": "^2.0.0", - "mkdirp": "^0.5.0", - "module-deps": "^6.0.0", - "os-browserify": "~0.3.0", - "parents": "^1.0.1", - "path-browserify": "~0.0.0", - "process": "~0.11.0", - "punycode": "^1.3.2", - "querystring-es3": "~0.2.0", - "read-only-stream": "^2.0.0", - "readable-stream": "^2.0.2", - "resolve": "^1.1.4", - "shasum": "^1.0.0", - "shell-quote": "^1.6.1", - "stream-browserify": "^2.0.0", - "stream-http": "^2.0.0", - "string_decoder": "^1.1.1", - "subarg": "^1.0.0", - "syntax-error": "^1.1.1", - "through2": "^2.0.0", - "timers-browserify": "^1.0.1", - "tty-browserify": "0.0.1", - "url": "~0.11.0", - "util": "~0.10.1", - "vm-browserify": "^1.0.0", - "xtend": "^4.0.0" - } - }, - "browserify-aes": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/browserify-aes/-/browserify-aes-1.2.0.tgz", - "integrity": "sha512-+7CHXqGuspUn/Sl5aO7Ea0xWGAtETPXNSAjHo48JfLdPWcMng33Xe4znFvQweqc/uzk5zSOI3H52CYnjCfb5hA==", - "dev": 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==", - "dev": 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==", - "dev": 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=", - "dev": 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=", - "dev": 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==", - "dev": 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==", + "browserslist": { + "version": "4.5.6", + "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.5.6.tgz", + "integrity": "sha512-o/hPOtbU9oX507lIqon+UvPYqpx3mHc8cV3QemSBTXwkG8gSQSK6UKvXcE/DcleU3+A59XTUHyCvZ5qGy8xVAg==", "dev": true, "requires": { - "base64-js": "^1.0.2", - "ieee754": "^1.1.4" + "caniuse-lite": "^1.0.30000963", + "electron-to-chromium": "^1.3.127", + "node-releases": "^1.1.17" } }, "buffer-from": { @@ -608,22 +1074,10 @@ "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=", - "dev": true - }, "builtin-modules": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/builtin-modules/-/builtin-modules-1.1.1.tgz", - "integrity": "sha1-Jw8HbFpywC9bZaR9+Uxf46J4iS8=", - "dev": true - }, - "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=", + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/builtin-modules/-/builtin-modules-3.1.0.tgz", + "integrity": "sha512-k0KL0aWZuBt2lrxrcASWDfwOLMnodeQjodT/1SxEQAXsHANgo6ZC/VEaSEHCXt7aSTZ4/4H5LKa+tBXmW7Vtvw==", "dev": true }, "cache-base": { @@ -643,12 +1097,6 @@ "unset-value": "^1.0.0" } }, - "cached-path-relative": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/cached-path-relative/-/cached-path-relative-1.0.2.tgz", - "integrity": "sha512-5r2GqsoEb4qMTTN9J+WzXfjov+hjxT+j3u5K+kIVNIwAd99DLCJE9pBIMP1qVeybV6JiijL385Oz0DcYxfbOIg==", - "dev": true - }, "caller-callsite": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/caller-callsite/-/caller-callsite-2.0.0.tgz", @@ -679,6 +1127,12 @@ "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==", "dev": true }, + "caniuse-lite": { + "version": "1.0.30000965", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30000965.tgz", + "integrity": "sha512-BpMi+Aq8AgNjjrfornip07/BTUN65CTCe+fmZJxnmnL9CUZlPqtLIRdC6pgxMFOohg4yf/f775f/NE4AZeoIDA==", + "dev": true + }, "chai": { "version": "4.2.0", "resolved": "https://registry.npmjs.org/chai/-/chai-4.2.0.tgz", @@ -716,16 +1170,6 @@ "integrity": "sha512-5tK7EtrZ0N+OLFMthtqOj4fI2Jeb88C4CAZPu25LDVUgXJ0A3Js4PMGqrn0JU1W0Mh1/Z8wZzYPxqUrXeBboCQ==", "dev": true }, - "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==", - "dev": true, - "requires": { - "inherits": "^2.0.1", - "safe-buffer": "^5.0.1" - } - }, "class-utils": { "version": "0.3.6", "resolved": "https://registry.npmjs.org/class-utils/-/class-utils-0.3.6.tgz", @@ -890,18 +1334,6 @@ "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=", "dev": true }, - "combine-source-map": { - "version": "0.8.0", - "resolved": "https://registry.npmjs.org/combine-source-map/-/combine-source-map-0.8.0.tgz", - "integrity": "sha1-pY0N8ELBhvz4IqjoAV9UUNLXmos=", - "dev": true, - "requires": { - "convert-source-map": "~1.1.0", - "inline-source-map": "~0.6.0", - "lodash.memoize": "~3.0.3", - "source-map": "~0.5.3" - } - }, "commander": { "version": "2.20.0", "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.0.tgz", @@ -909,9 +1341,9 @@ "dev": true }, "component-emitter": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/component-emitter/-/component-emitter-1.2.1.tgz", - "integrity": "sha1-E3kY1teCg/ffemt8WmPhQOaUJeY=", + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/component-emitter/-/component-emitter-1.3.0.tgz", + "integrity": "sha512-Rd3se6QB+sO1TwqZjscQrurpEPIfO0/yYnSin6Q/rD3mOutHvUrCAhJub3r90uNb+SESBuE0QYoB90YdfatsRg==", "dev": true }, "concat-map": { @@ -920,45 +1352,53 @@ "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=", "dev": true }, - "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=", + "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": { - "date-now": "^0.1.4" + "safe-buffer": "~5.1.1" } }, - "constants-browserify": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/constants-browserify/-/constants-browserify-1.0.0.tgz", - "integrity": "sha1-wguW2MYXdIqvHBYCF2DNJ/y4y3U=", - "dev": true - }, - "convert-source-map": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.1.3.tgz", - "integrity": "sha1-SCnId+n+SbMWHzvzZziI4gRpmGA=", - "dev": true - }, "copy-descriptor": { "version": "0.1.1", "resolved": "https://registry.npmjs.org/copy-descriptor/-/copy-descriptor-0.1.1.tgz", "integrity": "sha1-Z29us8OZl8LuGsOpJP1hJHSPV40=", "dev": true }, + "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", @@ -977,43 +1417,6 @@ "parse-json": "^4.0.0" } }, - "create-ecdh": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/create-ecdh/-/create-ecdh-4.0.3.tgz", - "integrity": "sha512-GbEHQPMOswGpKXM9kCWVrremUcBmjteUaQ01T9rkKCPDXfUHX0IoP9LpHYo2NPFampa4e+/pFDc3jQdxrxQLaw==", - "dev": 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==", - "dev": 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==", - "dev": 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": "6.0.5", "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-6.0.5.tgz", @@ -1027,43 +1430,12 @@ "which": "^1.2.9" } }, - "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==", - "dev": 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" - } - }, - "dash-ast": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/dash-ast/-/dash-ast-1.0.0.tgz", - "integrity": "sha512-Vy4dx7gquTeMcQR/hDkYLGUnwVil6vk4FOOct+djUnHOUWt+zJPJAaRIXaAFkPXtJjvlY7o3rfRu0/3hpnwoUA==", - "dev": true - }, "date-fns": { "version": "1.30.1", "resolved": "https://registry.npmjs.org/date-fns/-/date-fns-1.30.1.tgz", "integrity": "sha512-hBSVCvSmWC+QypYObzwGOd9wqdDpOt+0wl0KbU+R+uuZBS1jN8VsD1ss3irQDknRj5NvxiTF6oj/nDRnN/UQNw==", "dev": true }, - "date-now": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/date-now/-/date-now-0.1.4.tgz", - "integrity": "sha1-6vQ5/U1ISK105cx9vvIAZyueNFs=", - "dev": true - }, "debug": { "version": "3.2.6", "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.6.tgz", @@ -1150,12 +1522,6 @@ } } }, - "defined": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/defined/-/defined-1.0.0.tgz", - "integrity": "sha1-yY2bzvdWdBiOEQlpFRGZ45sfppM=", - "dev": true - }, "del": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/del/-/del-3.0.0.tgz", @@ -1170,92 +1536,24 @@ "rimraf": "^2.2.8" } }, - "deps-sort": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/deps-sort/-/deps-sort-2.0.0.tgz", - "integrity": "sha1-CRckkC6EZYJg65EHSMzNGvbiH7U=", - "dev": true, - "requires": { - "JSONStream": "^1.0.3", - "shasum": "^1.0.0", - "subarg": "^1.0.0", - "through2": "^2.0.0" - } - }, - "des.js": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/des.js/-/des.js-1.0.0.tgz", - "integrity": "sha1-wHTS4qpqipoH29YfmhXCzYPsjsw=", - "dev": true, - "requires": { - "inherits": "^2.0.1", - "minimalistic-assert": "^1.0.0" - } - }, - "detective": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/detective/-/detective-5.2.0.tgz", - "integrity": "sha512-6SsIx+nUUbuK0EthKjv0zrdnajCCXVYGmbYYiYjFVpzcjwEs/JMDZ8tPRG29J/HhN56t3GJp2cGSWDRjjot8Pg==", - "dev": true, - "requires": { - "acorn-node": "^1.6.1", - "defined": "^1.0.0", - "minimist": "^1.1.1" - } - }, "diff": { "version": "3.5.0", "resolved": "https://registry.npmjs.org/diff/-/diff-3.5.0.tgz", "integrity": "sha512-A46qtFgd+g7pDZinpnwiRJtxbC1hpgf0uzP3iG89scHk0AUC7A1TGxf5OiiOUv/JMZR8GOt8hL900hV0bOy5xA==", "dev": 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==", - "dev": true, - "requires": { - "bn.js": "^4.1.0", - "miller-rabin": "^4.0.0", - "randombytes": "^2.0.0" - } - }, - "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==", + "electron-to-chromium": { + "version": "1.3.130", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.130.tgz", + "integrity": "sha512-UY2DI+gsnqGtQJqO8wXN0DnpJY+29FwJafACj0h18ZShn5besKnrRq6+lXWUbKzdxw92QQcnTqRLgNByOKXcUg==", "dev": true }, - "duplexer2": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/duplexer2/-/duplexer2-0.1.4.tgz", - "integrity": "sha1-ixLauHjA1p4+eJEFFmKjL8a93ME=", - "dev": true, - "requires": { - "readable-stream": "^2.0.2" - } - }, "elegant-spinner": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/elegant-spinner/-/elegant-spinner-1.0.1.tgz", "integrity": "sha1-2wQ1IcldfjA/2PNFvtwzSc+wcp4=", "dev": true }, - "elliptic": { - "version": "6.4.1", - "resolved": "https://registry.npmjs.org/elliptic/-/elliptic-6.4.1.tgz", - "integrity": "sha512-BsXLz5sqX8OHcsh7CqBMztyXARmGQ3LWPtGjJi6DiJHq5C/qvi9P3OqgswKSDftbu8+IoI/QDTAm2fFnQ9SZSQ==", - "dev": 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" - } - }, "emoji-regex": { "version": "7.0.3", "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-7.0.3.tgz", @@ -1330,28 +1628,18 @@ "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==", "dev": true }, + "estree-walker": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-0.6.0.tgz", + "integrity": "sha512-peq1RfVAVzr3PU/jL31RaOjUKLoZJpObQWJJ+LgfcxDUifyLZ1RjPQZTl0pzj2uJ45b7A7XpyppXvxdEqzo4rw==", + "dev": true + }, "esutils": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.2.tgz", "integrity": "sha1-Cr9PHKpbyx96nYrMbepPqqBLrJs=", "dev": true }, - "events": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/events/-/events-2.1.0.tgz", - "integrity": "sha512-3Zmiobend8P9DjmKAty0Era4jV8oJ0yGYe2nJJAxgymF9+N8F2m0hhZiMoWtcfepExzNKZumFU3ksdQbInGWCg==", - "dev": 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==", - "dev": true, - "requires": { - "md5.js": "^1.3.4", - "safe-buffer": "^5.1.1" - } - }, "execa": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/execa/-/execa-1.0.0.tgz", @@ -1612,12 +1900,6 @@ "simple-git": "^1.85.0" } }, - "get-assigned-identifiers": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/get-assigned-identifiers/-/get-assigned-identifiers-1.2.0.tgz", - "integrity": "sha512-mBBwmeGTrxEMO4pMaaf/uUEFHnYtwr8FTe8Y/mer4rcV/bye0qGm6pw1bGZFGStxC5O76c5ZAVBGnqHmOaJpdQ==", - "dev": true - }, "get-caller-file": { "version": "2.0.5", "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", @@ -1637,9 +1919,9 @@ "dev": true }, "get-stdin": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/get-stdin/-/get-stdin-6.0.0.tgz", - "integrity": "sha512-jp4tHawyV7+fkkSKyvjuLZswblUtz+SQKzSWnBbii16BuZksJlU1wuBYXY75r+duh/llF1ur6oNwi+2ZzjKZ7g==", + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/get-stdin/-/get-stdin-7.0.0.tgz", + "integrity": "sha512-zRKcywvrXlXsA0v0i9Io4KDRaAw7+a1ZpjRwl9Wox8PFlVCCHra7E9c4kqXCoCM9nR5tBkaTTZRBoCm60bFqTQ==", "dev": true }, "get-stream": { @@ -1671,6 +1953,12 @@ "path-is-absolute": "^1.0.0" } }, + "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 + }, "globby": { "version": "6.1.0", "resolved": "https://registry.npmjs.org/globby/-/globby-6.1.0.tgz", @@ -1760,75 +2048,32 @@ } } }, - "hash-base": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/hash-base/-/hash-base-3.0.4.tgz", - "integrity": "sha1-X8hoaEfs1zSZQDMZprCj8/auSRg=", - "dev": 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==", - "dev": true, - "requires": { - "inherits": "^2.0.3", - "minimalistic-assert": "^1.0.1" - } - }, "he": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/he/-/he-1.2.0.tgz", "integrity": "sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw==", "dev": true }, - "hmac-drbg": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/hmac-drbg/-/hmac-drbg-1.0.1.tgz", - "integrity": "sha1-0nRXAQJabHdabFRXk+1QL8DGSaE=", - "dev": true, - "requires": { - "hash.js": "^1.0.3", - "minimalistic-assert": "^1.0.0", - "minimalistic-crypto-utils": "^1.0.1" - } - }, "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==", "dev": true }, - "htmlescape": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/htmlescape/-/htmlescape-1.1.1.tgz", - "integrity": "sha1-OgPtwiFLyjtmQko+eVk0lQnLA1E=", - "dev": true - }, - "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=", - "dev": true - }, "husky": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/husky/-/husky-1.3.1.tgz", - "integrity": "sha512-86U6sVVVf4b5NYSZ0yvv88dRgBSSXXmHaiq5pP4KDj5JVzdwKgBjEtUPOm8hcoytezFwbU+7gotXNhpHdystlg==", + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/husky/-/husky-2.2.0.tgz", + "integrity": "sha512-lG33E7zq6v//H/DQIojPEi1ZL9ebPFt3MxUMD8MR0lrS2ljEPiuUUxlziKIs/o9EafF0chL7bAtLQkcPvXmdnA==", "dev": true, "requires": { - "cosmiconfig": "^5.0.7", + "cosmiconfig": "^5.2.0", "execa": "^1.0.0", "find-up": "^3.0.0", - "get-stdin": "^6.0.0", + "get-stdin": "^7.0.0", "is-ci": "^2.0.0", - "pkg-dir": "^3.0.0", + "pkg-dir": "^4.1.0", "please-upgrade-node": "^3.1.1", - "read-pkg": "^4.0.1", + "read-pkg": "^5.0.0", "run-node": "^1.0.0", "slash": "^2.0.0" } @@ -1841,12 +2086,6 @@ "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==", - "dev": true - }, "import-fresh": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-2.0.0.tgz", @@ -1879,31 +2118,13 @@ "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=", "dev": true }, - "inline-source-map": { - "version": "0.6.2", - "resolved": "https://registry.npmjs.org/inline-source-map/-/inline-source-map-0.6.2.tgz", - "integrity": "sha1-+Tk0ccGKedFyT4Y/o4tYY3Ct4qU=", + "invariant": { + "version": "2.2.4", + "resolved": "https://registry.npmjs.org/invariant/-/invariant-2.2.4.tgz", + "integrity": "sha512-phJfQVBuaJM5raOpJjSfkiD6BpbCE4Ns//LaXl6wGYtUBY83nWS6Rf9tXm2e8VaK60JEjYldbPif/A2B1C2gNA==", "dev": true, "requires": { - "source-map": "~0.5.3" - } - }, - "insert-module-globals": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/insert-module-globals/-/insert-module-globals-7.2.0.tgz", - "integrity": "sha512-VE6NlW+WGn2/AeOMd496AHFYmE7eLKkUY6Ty31k4og5vmA3Fjuwe9v6ifH6Xx/Hz27QvdoMoviw1/pqWRB09Sw==", - "dev": true, - "requires": { - "JSONStream": "^1.0.3", - "acorn-node": "^1.5.2", - "combine-source-map": "^0.8.0", - "concat-stream": "^1.6.1", - "is-buffer": "^1.1.0", - "path-is-absolute": "^1.0.1", - "process": "~0.11.0", - "through2": "^2.0.0", - "undeclared-identifiers": "^1.1.2", - "xtend": "^4.0.0" + "loose-envify": "^1.0.0" } }, "invert-kv": { @@ -2040,6 +2261,12 @@ "is-extglob": "^2.1.1" } }, + "is-module": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-module/-/is-module-1.0.0.tgz", + "integrity": "sha1-Mlj7afeMFNW4FdZkM2tM/7ZEFZE=", + "dev": true + }, "is-number": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/is-number/-/is-number-3.0.0.tgz", @@ -2197,6 +2424,12 @@ } } }, + "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": "4.0.0", "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", @@ -2213,58 +2446,33 @@ "esprima": "^4.0.0" } }, + "jsesc": { + "version": "2.5.2", + "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-2.5.2.tgz", + "integrity": "sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA==", + "dev": true + }, "json-parse-better-errors": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/json-parse-better-errors/-/json-parse-better-errors-1.0.2.tgz", "integrity": "sha512-mrqyZKfX5EhL7hvqcV6WG1yYjnjeuYDzDhhcAAUrq8Po85NBQBJP+ZDUT75qZQ98IkUoBqdkExkukOU7Ts2wrw==", "dev": true }, - "json-stable-stringify": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/json-stable-stringify/-/json-stable-stringify-0.0.1.tgz", - "integrity": "sha1-YRwj6BTbN1Un34URk9tZ3Sryf0U=", + "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": { - "jsonify": "~0.0.0" + "minimist": "^1.2.0" } }, - "jsonify": { - "version": "0.0.0", - "resolved": "https://registry.npmjs.org/jsonify/-/jsonify-0.0.0.tgz", - "integrity": "sha1-LHS27kHZPKUbe1qu6PUDYx0lKnM=", - "dev": true - }, - "jsonparse": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/jsonparse/-/jsonparse-1.3.1.tgz", - "integrity": "sha1-P02uSpH6wxX3EGL4UhzCOfE2YoA=", - "dev": true - }, "kind-of": { "version": "6.0.2", "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.2.tgz", "integrity": "sha512-s5kLOcnH0XqDO+FvuaLX8DDjZ18CGFk7VygH40QoKPUQhW4e2rvM0rwUq0t8IQDOwYSeLK01U90OjzBTme2QqA==", "dev": true }, - "labeled-stream-splicer": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/labeled-stream-splicer/-/labeled-stream-splicer-2.0.1.tgz", - "integrity": "sha512-MC94mHZRvJ3LfykJlTUipBqenZz1pacOZEMhhQ8dMGcDHs0SBE5GbsavUXV7YtP3icBW17W0Zy1I0lfASmo9Pg==", - "dev": true, - "requires": { - "inherits": "^2.0.1", - "isarray": "^2.0.4", - "stream-splicer": "^2.0.0" - }, - "dependencies": { - "isarray": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-2.0.4.tgz", - "integrity": "sha512-GMxXOiUirWg1xTKRipM0Ek07rX+ubx4nNVElTJdNLYmNO/2YrDkgJGw9CljXn+r4EWiDQg/8lsRdHyg2PJuUaA==", - "dev": true - } - } - }, "lcid": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/lcid/-/lcid-2.0.0.tgz", @@ -2429,12 +2637,6 @@ "integrity": "sha512-cQKh8igo5QUhZ7lg38DYWAxMvjSAKG0A8wGSVimP07SIUEK2UO+arSRKbRZWtelMtN5V0Hkwh5ryOto/SshYIg==", "dev": true }, - "lodash.memoize": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/lodash.memoize/-/lodash.memoize-3.0.4.tgz", - "integrity": "sha1-LcvSwofLwKVcxCMovQxzYVDVPj8=", - "dev": true - }, "log-symbols": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-2.2.0.tgz", @@ -2455,6 +2657,24 @@ "wrap-ansi": "^3.0.1" } }, + "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" + } + }, + "magic-string": { + "version": "0.25.2", + "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.25.2.tgz", + "integrity": "sha512-iLs9mPjh9IuTtRsqqhNGYcZXGei0Nh/A4xirrsqW7c+QhKVFL2vm7U09ru6cHRD22azaP/wMDgI+HCqbETMTtg==", + "dev": true, + "requires": { + "sourcemap-codec": "^1.4.4" + } + }, "map-age-cleaner": { "version": "0.1.3", "resolved": "https://registry.npmjs.org/map-age-cleaner/-/map-age-cleaner-0.1.3.tgz", @@ -2488,17 +2708,6 @@ "escape-string-regexp": "^1.0.4" } }, - "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==", - "dev": true, - "requires": { - "hash-base": "^3.0.0", - "inherits": "^2.0.1", - "safe-buffer": "^5.1.2" - } - }, "mem": { "version": "4.3.0", "resolved": "https://registry.npmjs.org/mem/-/mem-4.3.0.tgz", @@ -2548,34 +2757,12 @@ "to-regex": "^3.0.2" } }, - "miller-rabin": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/miller-rabin/-/miller-rabin-4.0.1.tgz", - "integrity": "sha512-115fLhvZVqWwHPbClyntxEVfVDfl9DLLTuJvq3g2O/Oxi8AiNouAHvDSzHS0viUJc+V5vm3eq91Xwqn9dp4jRA==", - "dev": true, - "requires": { - "bn.js": "^4.0.0", - "brorand": "^1.0.1" - } - }, "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==", "dev": true }, - "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==", - "dev": 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=", - "dev": true - }, "minimatch": { "version": "3.0.4", "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", @@ -2630,9 +2817,9 @@ } }, "mocha": { - "version": "6.1.3", - "resolved": "https://registry.npmjs.org/mocha/-/mocha-6.1.3.tgz", - "integrity": "sha512-QdE/w//EPHrqgT5PNRUjRVHy6IJAzAf1R8n2O8W8K2RZ+NbPfOD5cBDp+PGa2Gptep37C/TdBiaNwakppEzEbg==", + "version": "6.1.4", + "resolved": "https://registry.npmjs.org/mocha/-/mocha-6.1.4.tgz", + "integrity": "sha512-PN8CIy4RXsIoxoFJzS4QNnCH4psUCPWc4/rPrst/ecSJJbLBkubMiyGCP2Kj/9YnWbotFqAoeXyXMucj7gwCFg==", "dev": true, "requires": { "ansi-colors": "3.2.3", @@ -2644,7 +2831,7 @@ "glob": "7.1.3", "growl": "1.10.5", "he": "1.2.0", - "js-yaml": "3.13.0", + "js-yaml": "3.13.1", "log-symbols": "2.2.0", "minimatch": "3.0.4", "mkdirp": "0.5.1", @@ -2660,16 +2847,6 @@ "yargs-unparser": "1.5.0" }, "dependencies": { - "js-yaml": { - "version": "3.13.0", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.13.0.tgz", - "integrity": "sha512-pZZoSxcCYco+DIKBTimr67J6Hy+EYGZDY/HCWC+iAEA9h1ByhMXAIVUXMcMFpOCxQ/xjXmPI2MkDL5HRm5eFrQ==", - "dev": true, - "requires": { - "argparse": "^1.0.7", - "esprima": "^4.0.0" - } - }, "supports-color": { "version": "6.0.0", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-6.0.0.tgz", @@ -2681,29 +2858,6 @@ } } }, - "module-deps": { - "version": "6.2.0", - "resolved": "https://registry.npmjs.org/module-deps/-/module-deps-6.2.0.tgz", - "integrity": "sha512-hKPmO06so6bL/ZvqVNVqdTVO8UAYsi3tQWlCa+z9KuWhoN4KDQtb5hcqQQv58qYiDE21wIvnttZEPiDgEbpwbA==", - "dev": true, - "requires": { - "JSONStream": "^1.0.3", - "browser-resolve": "^1.7.0", - "cached-path-relative": "^1.0.0", - "concat-stream": "~1.6.0", - "defined": "^1.0.0", - "detective": "^5.0.2", - "duplexer2": "^0.1.2", - "inherits": "^2.0.1", - "parents": "^1.0.0", - "readable-stream": "^2.0.2", - "resolve": "^1.4.0", - "stream-combiner2": "^1.1.1", - "subarg": "^1.0.0", - "through2": "^2.0.0", - "xtend": "^4.0.0" - } - }, "ms": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.1.tgz", @@ -2771,6 +2925,15 @@ "is-stream": "^1.0.1" } }, + "node-releases": { + "version": "1.1.17", + "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-1.1.17.tgz", + "integrity": "sha512-/SCjetyta1m7YXLgtACZGDYJdCSIBAWorDWkGCGZlydP2Ll7J48l7j/JxNYZ+xsgSPbWfdulVS/aY+GdjUsQ7Q==", + "dev": true, + "requires": { + "semver": "^5.3.0" + } + }, "normalize-package-data": { "version": "2.5.0", "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-2.5.0.tgz", @@ -2919,12 +3082,6 @@ "mimic-fn": "^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=", - "dev": true - }, "os-locale": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/os-locale/-/os-locale-3.1.0.tgz", @@ -2984,35 +3141,6 @@ "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", "dev": true }, - "pako": { - "version": "1.0.10", - "resolved": "https://registry.npmjs.org/pako/-/pako-1.0.10.tgz", - "integrity": "sha512-0DTvPVU3ed8+HNXOu5Bs+o//Mbdj9VNQMUOe9oKCwh8l0GNwpTDMKCWbRjgtD291AWnkAgkqA/LOnQS8AmS1tw==", - "dev": true - }, - "parents": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/parents/-/parents-1.0.1.tgz", - "integrity": "sha1-/t1NK/GTp3dF/nHjcdc8MwfZx1E=", - "dev": true, - "requires": { - "path-platform": "~0.11.15" - } - }, - "parse-asn1": { - "version": "5.1.4", - "resolved": "https://registry.npmjs.org/parse-asn1/-/parse-asn1-5.1.4.tgz", - "integrity": "sha512-Qs5duJcuvNExRfFZ99HDD3z4mAi3r9Wl/FOjEOijlxwCZs7E7mW2vjTpgQ4J8LpTF8x5v+1Vn5UQFejmWT11aw==", - "dev": 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": "4.0.0", "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-4.0.0.tgz", @@ -3029,12 +3157,6 @@ "integrity": "sha1-s2PlXoAGym/iF4TS2yK9FdeRfxQ=", "dev": true }, - "path-browserify": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/path-browserify/-/path-browserify-0.0.1.tgz", - "integrity": "sha512-BapA40NHICOS+USX9SN4tyhq+A2RrN/Ws5F0Z5aMHDp98Fl86lX8Oti8B7uN93L4Ifv4fHOEA+pQw87gmMO/lQ==", - "dev": true - }, "path-exists": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz", @@ -3065,31 +3187,12 @@ "integrity": "sha512-GSmOT2EbHrINBf9SR7CDELwlJ8AENk3Qn7OikK4nFYAu3Ote2+JYNVvkpAEQm3/TLNEJFD/xZJjzyxg3KBWOzw==", "dev": true }, - "path-platform": { - "version": "0.11.15", - "resolved": "https://registry.npmjs.org/path-platform/-/path-platform-0.11.15.tgz", - "integrity": "sha1-6GQhf3TDaFDwhSt43Hv31KVyG/I=", - "dev": true - }, "pathval": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/pathval/-/pathval-1.1.0.tgz", "integrity": "sha1-uULm1L3mUwBe9rcTYd74cn0GReA=", "dev": true }, - "pbkdf2": { - "version": "3.0.17", - "resolved": "https://registry.npmjs.org/pbkdf2/-/pbkdf2-3.0.17.tgz", - "integrity": "sha512-U/il5MsrZp7mGg3mSQfn742na2T+1/vHDCG5/iTI3X9MKUuYUZVLQhyRsg06mCgDBTd57TxzgZt7P+fYfjRLtA==", - "dev": 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" - } - }, "pify": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", @@ -3112,9 +3215,9 @@ } }, "pkg-dir": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-3.0.0.tgz", - "integrity": "sha512-/E57AYkoeQ25qkxMj5PBOVgF8Kiu/h7cYS30Z5+R7WaiCCBfLq58ZI/dSeaEKb9WVJV5n/03QwrN3IeWIFllvw==", + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-4.1.0.tgz", + "integrity": "sha512-55k9QN4saZ8q518lE6EFgYiu95u3BWkSajCifhdQjvLvmr8IpnRbhI+UGpWJQfa0KzDguHeeWT1ccO1PmkOi3A==", "dev": true, "requires": { "find-up": "^3.0.0" @@ -3141,10 +3244,10 @@ "integrity": "sha512-sXe5lSt2WQlCbydGETgfm1YBShgOX4HxQkFPvbxkcwgDvGDeqVau8h+12+lmSVlP3rHPz0oavfddSZg/q+Szjw==", "dev": true }, - "process": { - "version": "0.11.10", - "resolved": "https://registry.npmjs.org/process/-/process-0.11.10.tgz", - "integrity": "sha1-czIwDoQBYb2j5podHZGn1LwW8YI=", + "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-nextick-args": { @@ -3159,20 +3262,6 @@ "integrity": "sha512-CGuc0VUTGthpJXL36ydB6jnbyOf/rAHFvmVrJlH+Rg0DqqLFQGAP6hIaxD/G0OAmBJPhXDHuEJigrp0e0wFV6g==", "dev": true }, - "public-encrypt": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/public-encrypt/-/public-encrypt-4.0.3.tgz", - "integrity": "sha512-zVpa8oKZSz5bTMTFClc1fQOnyyEzpl5ozpi1B5YcvBrdohMjH2rfsBtyXcuNuwjsDIXmBYlF2N5FlJYhR29t8Q==", - "dev": 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": "3.0.0", "resolved": "https://registry.npmjs.org/pump/-/pump-3.0.0.tgz", @@ -3183,61 +3272,16 @@ "once": "^1.3.1" } }, - "punycode": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.4.1.tgz", - "integrity": "sha1-wNWmOycYgArY4esPpSachN1BhF4=", - "dev": true - }, - "querystring": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/querystring/-/querystring-0.2.0.tgz", - "integrity": "sha1-sgmEkgO7Jd+CDadW50cAWHhSFiA=", - "dev": true - }, - "querystring-es3": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/querystring-es3/-/querystring-es3-0.2.1.tgz", - "integrity": "sha1-nsYfeQSYdXB9aUFFlv2Qek1xHnM=", - "dev": true - }, - "randombytes": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.1.0.tgz", - "integrity": "sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ==", - "dev": 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==", - "dev": true, - "requires": { - "randombytes": "^2.0.5", - "safe-buffer": "^5.1.0" - } - }, - "read-only-stream": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/read-only-stream/-/read-only-stream-2.0.0.tgz", - "integrity": "sha1-JyT9aoET1zdkrCiNQ4YnDB2/F/A=", - "dev": true, - "requires": { - "readable-stream": "^2.0.2" - } - }, "read-pkg": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-4.0.1.tgz", - "integrity": "sha1-ljYlN48+HE1IyFhytabsfV0JMjc=", + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-5.1.1.tgz", + "integrity": "sha512-dFcTLQi6BZ+aFUaICg7er+/usEoqFdQxiEBsEMNGoipenihtxxtdrQuBXvyANCEI8VuUIVYFgeHGx9sLLvim4w==", "dev": true, "requires": { - "normalize-package-data": "^2.3.2", + "@types/normalize-package-data": "^2.4.0", + "normalize-package-data": "^2.5.0", "parse-json": "^4.0.0", - "pify": "^3.0.0" + "type-fest": "^0.4.1" } }, "readable-stream": { @@ -3266,12 +3310,35 @@ } } }, - "regenerator-runtime": { - "version": "0.12.1", - "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.12.1.tgz", - "integrity": "sha512-odxIc1/vDlo4iZcfXqRYFj0vpXFNoGdKMAUieAlFYO6m/nl5e9KR/beGf41z4a1FI+aQgtjhuaSlDxQ0hmkrHg==", + "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.0.2", + "resolved": "https://registry.npmjs.org/regenerate-unicode-properties/-/regenerate-unicode-properties-8.0.2.tgz", + "integrity": "sha512-SbA/iNrBUf6Pv2zU8Ekv1Qbhv92yxL4hiDa2siuxs4KKn4oOoMDHXjAf7+Nz9qinUQ46B1LcWEi/PhJfPWpZWQ==", + "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", @@ -3282,6 +3349,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 + } + } + }, "repeat-element": { "version": "1.1.3", "resolved": "https://registry.npmjs.org/repeat-element/-/repeat-element-1.1.3.tgz", @@ -3307,9 +3417,9 @@ "dev": true }, "resolve": { - "version": "1.10.0", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.10.0.tgz", - "integrity": "sha512-3sUr9aq5OfSg2S9pNtPA9hL1FVEAjvfOC4leW0SNf/mpnaakz2a9femSd6LqAww2RaFctwyf1lCqnTHuF1rxDg==", + "version": "1.10.1", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.10.1.tgz", + "integrity": "sha512-KuIe4mf++td/eFb6wkaPbMDnP6kObCaEtIDuHOUED6MNUo4K670KZUHuuvYPZDxNF0WVLw49n06M2m2dXphEzA==", "dev": true, "requires": { "path-parse": "^1.0.6" @@ -3352,25 +3462,49 @@ "glob": "^7.1.3" } }, - "ripemd160": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/ripemd160/-/ripemd160-2.0.2.tgz", - "integrity": "sha512-ii4iagi25WusVoiC4B4lq7pbXfAp3D9v5CwfkY33vffw2+pkDjY1D8GaN7spsxvCSx8dkPqOZCEZyfxcmJG2IA==", + "rollup": { + "version": "1.10.1", + "resolved": "https://registry.npmjs.org/rollup/-/rollup-1.10.1.tgz", + "integrity": "sha512-pW353tmBE7QP622ITkGxtqF0d5gSRCVPD9xqM+fcPjudeZfoXMFW2sCzsTe2TU/zU1xamIjiS9xuFCPVT9fESw==", "dev": true, "requires": { - "hash-base": "^3.0.0", - "inherits": "^2.0.1" + "@types/estree": "0.0.39", + "@types/node": "^11.13.5", + "acorn": "^6.1.1" } }, - "rollup": { - "version": "1.10.0", - "resolved": "https://registry.npmjs.org/rollup/-/rollup-1.10.0.tgz", - "integrity": "sha512-U9t/JaKtO0+X0pSmLVKMrAZEixrbVzITf193TiEhfoVKCnd7pDimIFo94IxUCgbn6+v5VmduHkubx2VV1s0Ftw==", + "rollup-plugin-babel": { + "version": "4.3.2", + "resolved": "https://registry.npmjs.org/rollup-plugin-babel/-/rollup-plugin-babel-4.3.2.tgz", + "integrity": "sha512-KfnizE258L/4enADKX61ozfwGHoqYauvoofghFJBhFnpH9Sb9dNPpWg8QHOaAfVASUYV8w0mCx430i9z0LJoJg==", "dev": true, "requires": { - "@types/estree": "0.0.39", - "@types/node": "^11.13.4", - "acorn": "^6.1.1" + "@babel/helper-module-imports": "^7.0.0", + "rollup-pluginutils": "^2.3.0" + } + }, + "rollup-plugin-commonjs": { + "version": "9.3.4", + "resolved": "https://registry.npmjs.org/rollup-plugin-commonjs/-/rollup-plugin-commonjs-9.3.4.tgz", + "integrity": "sha512-DTZOvRoiVIHHLFBCL4pFxOaJt8pagxsVldEXBOn6wl3/V21wVaj17HFfyzTsQUuou3sZL3lEJZVWKPFblJfI6w==", + "dev": true, + "requires": { + "estree-walker": "^0.6.0", + "magic-string": "^0.25.2", + "resolve": "^1.10.0", + "rollup-pluginutils": "^2.6.0" + } + }, + "rollup-plugin-node-resolve": { + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/rollup-plugin-node-resolve/-/rollup-plugin-node-resolve-4.2.3.tgz", + "integrity": "sha512-r+WaesPzdGEynpLZLALFEDugA4ACa5zn7bc/+LVX4vAXQQ8IgDHv0xfsSvJ8tDXUtprfBtrDtRFg27ifKjcJTg==", + "dev": true, + "requires": { + "@types/resolve": "0.0.8", + "builtin-modules": "^3.1.0", + "is-module": "^1.0.0", + "resolve": "^1.10.0" } }, "rollup-plugin-terser": { @@ -3385,6 +3519,16 @@ "terser": "^3.14.1" } }, + "rollup-pluginutils": { + "version": "2.6.0", + "resolved": "https://registry.npmjs.org/rollup-pluginutils/-/rollup-pluginutils-2.6.0.tgz", + "integrity": "sha512-aGQwspEF8oPKvg37u3p7h0cYNwmJR1sCBMZGZ5b9qy8HGtETknqjzcxrDRrcAnJNXN18lBH4Q9vZYth/p4n8jQ==", + "dev": true, + "requires": { + "estree-walker": "^0.6.0", + "micromatch": "^3.1.10" + } + }, "run-node": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/run-node/-/run-node-1.0.0.tgz", @@ -3392,9 +3536,9 @@ "dev": true }, "rxjs": { - "version": "6.4.0", - "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-6.4.0.tgz", - "integrity": "sha512-Z9Yfa11F6B9Sg/BK9MnqnQ+aQYicPLtilXBp2yUtDt2JRCE0h26d33EnfO3ZxoNxG0T92OUucP3Ct7cpfkdFfw==", + "version": "6.5.1", + "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-6.5.1.tgz", + "integrity": "sha512-y0j31WJc83wPu31vS1VlAFW5JGrnGC+j+TtGAa1fRQphy48+fDYiDmX8tjGloToEsMkxnouOg/1IzXGKkJnZMg==", "dev": true, "requires": { "tslib": "^1.9.0" @@ -3433,9 +3577,9 @@ "dev": true }, "serialize-javascript": { - "version": "1.6.1", - "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-1.6.1.tgz", - "integrity": "sha512-A5MOagrPFga4YaKQSWHryl7AXvbQkEqpw4NNYMTNYUNV51bA8ABHgYFpqKx+YFFrw59xMV1qGH1R4AgoNIVgCw==", + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-1.7.0.tgz", + "integrity": "sha512-ke8UG8ulpFOxO8f8gRYabHQe/ZntKlcig2Mp+8+URDP1D8vJZ0KUt7LYo07q25Z/+JVSgpr/cui9PIp5H6/+nA==", "dev": true }, "set-blocking": { @@ -3467,26 +3611,6 @@ } } }, - "sha.js": { - "version": "2.4.11", - "resolved": "https://registry.npmjs.org/sha.js/-/sha.js-2.4.11.tgz", - "integrity": "sha512-QMEp5B7cftE7APOjk5Y6xgrbWu+WkLVQwk8JNjZ8nKRciZaByEW6MubieAiToS7+dwvrjGhH8jRXz3MVd0AYqQ==", - "dev": true, - "requires": { - "inherits": "^2.0.1", - "safe-buffer": "^5.0.1" - } - }, - "shasum": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/shasum/-/shasum-1.0.2.tgz", - "integrity": "sha1-5wEjENj0F/TetXEhUOVni4euVl8=", - "dev": true, - "requires": { - "json-stable-stringify": "~0.0.0", - "sha.js": "~2.4.4" - } - }, "shebang-command": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-1.2.0.tgz", @@ -3502,30 +3626,12 @@ "integrity": "sha1-2kL0l0DAtC2yypcoVxyxkMmO/qM=", "dev": true }, - "shell-quote": { - "version": "1.6.1", - "resolved": "https://registry.npmjs.org/shell-quote/-/shell-quote-1.6.1.tgz", - "integrity": "sha1-9HgZSczkAmlxJ0MOo7PFR29IF2c=", - "dev": true, - "requires": { - "array-filter": "~0.0.0", - "array-map": "~0.0.0", - "array-reduce": "~0.0.0", - "jsonify": "~0.0.0" - } - }, "signal-exit": { "version": "3.0.2", "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.2.tgz", "integrity": "sha1-tf3AjxKH6hF4Yo5BXiUTK3NkbG0=", "dev": true }, - "simple-concat": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/simple-concat/-/simple-concat-1.0.0.tgz", - "integrity": "sha1-c0TLuLbib7J9ZrL8hvn21Zl1IcY=", - "dev": true - }, "simple-git": { "version": "1.110.0", "resolved": "https://registry.npmjs.org/simple-git/-/simple-git-1.110.0.tgz", @@ -3723,6 +3829,12 @@ "integrity": "sha1-PpNdfd1zYxuXZZlW1VEo6HtQhKM=", "dev": true }, + "sourcemap-codec": { + "version": "1.4.4", + "resolved": "https://registry.npmjs.org/sourcemap-codec/-/sourcemap-codec-1.4.4.tgz", + "integrity": "sha512-CYAPYdBu34781kLHkaW3m6b/uUSyMOC2R61gcYMWooeuaGtjof86ZA/8T+qVPPt7np1085CR9hmMGrySwEc8Xg==", + "dev": true + }, "spdx-correct": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/spdx-correct/-/spdx-correct-3.1.0.tgz", @@ -3797,49 +3909,6 @@ } } }, - "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==", - "dev": true, - "requires": { - "inherits": "~2.0.1", - "readable-stream": "^2.0.2" - } - }, - "stream-combiner2": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/stream-combiner2/-/stream-combiner2-1.1.1.tgz", - "integrity": "sha1-+02KFCDqNidk4hrUeAOXvry0HL4=", - "dev": true, - "requires": { - "duplexer2": "~0.1.0", - "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==", - "dev": 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" - } - }, - "stream-splicer": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/stream-splicer/-/stream-splicer-2.0.0.tgz", - "integrity": "sha1-G2O+Q4oTPktnHMGTUZdgAXWRDYM=", - "dev": true, - "requires": { - "inherits": "^2.0.1", - "readable-stream": "^2.0.2" - } - }, "string-argv": { "version": "0.0.2", "resolved": "https://registry.npmjs.org/string-argv/-/string-argv-0.0.2.tgz", @@ -3857,15 +3926,6 @@ "strip-ansi": "^3.0.0" } }, - "string_decoder": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.2.0.tgz", - "integrity": "sha512-6YqyX6ZWEYguAxgZzHGL7SsCeGx3V2TtOTqZz1xSTSWnqsbWwbptafNyvf/ACquZUXV3DANr5BDIwNYe1mN42w==", - "dev": true, - "requires": { - "safe-buffer": "~5.1.0" - } - }, "stringify-object": { "version": "3.3.0", "resolved": "https://registry.npmjs.org/stringify-object/-/stringify-object-3.3.0.tgz", @@ -3898,15 +3958,6 @@ "integrity": "sha1-PFMZQukIwml8DsNEhYwobHygpgo=", "dev": true }, - "subarg": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/subarg/-/subarg-1.0.0.tgz", - "integrity": "sha1-9izxdYHplrSPyWVpn1TAauJouNI=", - "dev": true, - "requires": { - "minimist": "^1.1.0" - } - }, "supports-color": { "version": "5.5.0", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", @@ -3928,15 +3979,6 @@ "integrity": "sha512-16GbgwTmFMYFyQMLvtQjvNWh30dsFe1cAW5Fg1wm5+dg84L9Pe36mftsIRU95/W2YsISxsz/xq4VB23sqpgb/A==", "dev": true }, - "syntax-error": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/syntax-error/-/syntax-error-1.4.0.tgz", - "integrity": "sha512-YPPlu67mdnHGTup2A8ff7BC2Pjq0e0Yp/IyTFN03zWO0RcK07uLcbi7C2KpGR2FvWbaB0+bfE27a+sBKebSo7w==", - "dev": true, - "requires": { - "acorn-node": "^1.2.0" - } - }, "terser": { "version": "3.17.0", "resolved": "https://registry.npmjs.org/terser/-/terser-3.17.0.tgz", @@ -3956,35 +3998,10 @@ } } }, - "through": { - "version": "2.3.8", - "resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz", - "integrity": "sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU=", - "dev": true - }, - "through2": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/through2/-/through2-2.0.5.tgz", - "integrity": "sha512-/mrRod8xqpA+IHSLyGCQ2s8SPHiCDEeQJSep1jqLYeEUClOFG2Qsh+4FU6G9VeqpZnGW/Su8LQGc4YKni5rYSQ==", - "dev": true, - "requires": { - "readable-stream": "~2.3.6", - "xtend": "~4.0.1" - } - }, - "timers-browserify": { - "version": "1.4.2", - "resolved": "https://registry.npmjs.org/timers-browserify/-/timers-browserify-1.4.2.tgz", - "integrity": "sha1-ycWLV1voQHN1y14kYtrO50NZ9B0=", - "dev": true, - "requires": { - "process": "~0.11.0" - } - }, - "to-arraybuffer": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/to-arraybuffer/-/to-arraybuffer-1.0.1.tgz", - "integrity": "sha1-fSKbH8xjfkZsoIEYCDanqr/4P0M=", + "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": { @@ -4035,18 +4052,24 @@ "integrity": "sha1-riF2gXXRVZ1IvvNUILL0li8JwzA=", "dev": true }, + "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 + }, "tslib": { "version": "1.9.3", "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.9.3.tgz", "integrity": "sha512-4krF8scpejhaOgqzBEcGM7yDIEfi0/8+8zDRZhNZZ2kjmHJ4hv3zCbQWxoJGz1iw5U0Jl0nma13xzHXcncMavQ==" }, "tslint": { - "version": "5.15.0", - "resolved": "https://registry.npmjs.org/tslint/-/tslint-5.15.0.tgz", - "integrity": "sha512-6bIEujKR21/3nyeoX2uBnE8s+tMXCQXhqMmaIPJpHmXJoBJPTLcI7/VHRtUwMhnLVdwLqqY3zmd8Dxqa5CVdJA==", + "version": "5.16.0", + "resolved": "https://registry.npmjs.org/tslint/-/tslint-5.16.0.tgz", + "integrity": "sha512-UxG2yNxJ5pgGwmMzPMYh/CCnCnh0HfPgtlVRDs1ykZklufFBL1ZoTlWFRz2NQjcoEiDoRp+JyT0lhBbbH/obyA==", "dev": true, "requires": { - "babel-code-frame": "^6.22.0", + "@babel/code-frame": "^7.0.0", "builtin-modules": "^1.1.1", "chalk": "^2.3.0", "commander": "^2.12.1", @@ -4059,6 +4082,14 @@ "semver": "^5.3.0", "tslib": "^1.8.0", "tsutils": "^2.29.0" + }, + "dependencies": { + "builtin-modules": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/builtin-modules/-/builtin-modules-1.1.1.tgz", + "integrity": "sha1-Jw8HbFpywC9bZaR9+Uxf46J4iS8=", + "dev": true + } } }, "tslint-config-prettier": { @@ -4076,28 +4107,22 @@ "tslib": "^1.8.1" } }, - "tty-browserify": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/tty-browserify/-/tty-browserify-0.0.1.tgz", - "integrity": "sha512-C3TaO7K81YvjCgQH9Q1S3R3P3BtN3RIM8n+OvX4il1K1zgE8ZhI0op7kClgkxtutIE8hQrcrHBXvIheqKUUCxw==", - "dev": true - }, "type-detect": { "version": "4.0.8", "resolved": "https://registry.npmjs.org/type-detect/-/type-detect-4.0.8.tgz", "integrity": "sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g==", "dev": true }, - "typedarray": { - "version": "0.0.6", - "resolved": "https://registry.npmjs.org/typedarray/-/typedarray-0.0.6.tgz", - "integrity": "sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c=", + "type-fest": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.4.1.tgz", + "integrity": "sha512-IwzA/LSfD2vC1/YDYMv/zHP4rDF1usCwllsDpbolT3D4fUepIO7f9K70jjmUewU/LmGUKJcwcVtDCpnKk4BPMw==", "dev": true }, "typescript": { - "version": "3.4.3", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-3.4.3.tgz", - "integrity": "sha512-FFgHdPt4T/duxx6Ndf7hwgMZZjZpB+U0nMNGVCYPq0rEzWKjEDobm4J6yb3CS7naZ0yURFqdw9Gwc7UOh/P9oQ==", + "version": "3.4.5", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-3.4.5.tgz", + "integrity": "sha512-YycBxUb49UUhdNMU5aJ7z5Ej2XGmaIBL0x34vZ82fn3hGvD+bgrMrVDpatgz2f7YxUMJxMkbWxJZeAvDxVe7Vw==", "dev": true }, "uglify-es": { @@ -4124,25 +4149,34 @@ } } }, - "umd": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/umd/-/umd-3.0.3.tgz", - "integrity": "sha512-4IcGSufhFshvLNcMCV80UnQVlZ5pMOC8mvNPForqwA4+lzYQuetTESLDQkeLmihq8bRcnpbQa48Wb8Lh16/xow==", + "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 }, - "undeclared-identifiers": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/undeclared-identifiers/-/undeclared-identifiers-1.1.3.tgz", - "integrity": "sha512-pJOW4nxjlmfwKApE4zvxLScM/njmwj/DiUBv7EabwE4O8kRUy+HIwxQtZLBPll/jx1LJyBcqNfB3/cpv9EZwOw==", + "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": { - "acorn-node": "^1.3.0", - "dash-ast": "^1.0.0", - "get-assigned-identifiers": "^1.2.0", - "simple-concat": "^1.0.0", - "xtend": "^4.0.1" + "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", @@ -4224,39 +4258,12 @@ "integrity": "sha1-2pN/emLiH+wf0Y1Js1wpNQZ6bHI=", "dev": true }, - "url": { - "version": "0.11.0", - "resolved": "https://registry.npmjs.org/url/-/url-0.11.0.tgz", - "integrity": "sha1-ODjpfPxgUh63PFJajlW/3Z4uKPE=", - "dev": 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=", - "dev": 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==", "dev": true }, - "util": { - "version": "0.10.4", - "resolved": "https://registry.npmjs.org/util/-/util-0.10.4.tgz", - "integrity": "sha512-0Pm9hTQ3se5ll1XihRic3FDIku70C+iHUdT/W926rSgHV5QgXsYbKZN8MSC3tJtSkhuROzvsQjAaFENRXr+19A==", - "dev": 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", @@ -4273,12 +4280,6 @@ "spdx-expression-parse": "^3.0.0" } }, - "vm-browserify": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/vm-browserify/-/vm-browserify-1.1.0.tgz", - "integrity": "sha512-iq+S7vZJE60yejDYM0ek6zg308+UZsdtPExWP9VZoCFCz1zkJoXFnAX7aZfd/ZwrkidzdUZL0C/ryW+JwAiIGw==", - "dev": true - }, "whatwg-fetch": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/whatwg-fetch/-/whatwg-fetch-3.0.0.tgz", @@ -4357,12 +4358,6 @@ "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=", "dev": true }, - "xtend": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.1.tgz", - "integrity": "sha1-pcbVMr5lbiPbgg77lDofBJmNY68=", - "dev": true - }, "y18n": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/y18n/-/y18n-4.0.0.tgz", @@ -4530,6 +4525,23 @@ "property-expr": "^1.5.0", "synchronous-promise": "^2.0.5", "toposort": "^2.0.2" + }, + "dependencies": { + "@babel/runtime": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.0.0.tgz", + "integrity": "sha512-7hGhzlcmg01CvH1EHdSPVXYX1aJ8KCEyz6I9xYIi/asDtzBPMyMhVibhM/K6g/5qnKBwjZtp10bNZIEFTRW1MA==", + "dev": true, + "requires": { + "regenerator-runtime": "^0.12.0" + } + }, + "regenerator-runtime": { + "version": "0.12.1", + "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.12.1.tgz", + "integrity": "sha512-odxIc1/vDlo4iZcfXqRYFj0vpXFNoGdKMAUieAlFYO6m/nl5e9KR/beGf41z4a1FI+aQgtjhuaSlDxQ0hmkrHg==", + "dev": true + } } } } diff --git a/package.json b/package.json index df5a3d272..a78e366de 100644 --- a/package.json +++ b/package.json @@ -11,34 +11,37 @@ ], "types": "./lib/src/index.d.ts", "dependencies": { + "@babel/runtime": "^7.4.4", "es6-promise": "^4.2.6", "isomorphic-fetch": "^2.2.1", "tslib": "^1.9.3" }, "devDependencies": { - "@types/isomorphic-fetch": "0.0.35", + "@babel/core": "^7.4.4", + "@babel/plugin-transform-runtime": "^7.4.4", + "@babel/preset-env": "^7.4.4", "@types/mocha": "^5.2.6", - "@types/node": "^11.13.4", - "browserify": "^16.2.3", + "@types/node": "^11.13.9", "chai": "^4.2.0", - "husky": "^1.3.1", + "husky": "^2.2.0", "lint-staged": "^8.1.5", - "mocha": "^6.1.3", + "mocha": "^6.1.4", "msal": "^0.2.4", "prettier": "^1.17.0", - "rollup": "^1.10.0", + "rollup": "^1.10.1", + "rollup-plugin-babel": "^4.3.2", + "rollup-plugin-commonjs": "^9.3.4", + "rollup-plugin-node-resolve": "^4.2.3", "rollup-plugin-terser": "^4.0.4", - "tslint": "^5.15.0", + "tslint": "^5.16.0", "tslint-config-prettier": "^1.18.0", - "typescript": "^3.4.3", + "typescript": "^3.4.5", "uglify-es": "^3.3.9" }, "scripts": { - "web:js": "node browserify-with-dependencies.js > lib/graph-js-sdk-web.js && uglifyjs ./lib/graph-js-sdk-web.js --output ./lib/graph-js-sdk-web.js", - "core:js": "node browserify.js > lib/graph-js-sdk-core.js && uglifyjs ./lib/graph-js-sdk-core.js --output ./lib/graph-js-sdk-core.js", "build:es": "tsc --p tsconfig-es.json", "build:cjs": "tsc --p tsconfig-cjs.json", - "build": "npm run build:cjs && npm run build:es && rollup -c && npm run web:js && npm run core:js", + "build": "npm run build:cjs && npm run build:es && rollup -c", "test": "npm run build:cjs && mocha lib/spec/content && mocha lib/spec/core && mocha lib/spec/middleware && mocha lib/spec/tasks", "test:content": "tsc --p spec/tsconfig.json && mocha spec/content", "test:core": "tsc --p spec/tsconfig.json && mocha spec/core", diff --git a/rollup.config.js b/rollup.config.js index dcecfb1c0..c5d4e797d 100644 --- a/rollup.config.js +++ b/rollup.config.js @@ -1,4 +1,7 @@ import { terser } from "rollup-plugin-terser"; +import resolve from "rollup-plugin-node-resolve"; +import babel from "rollup-plugin-babel"; +import commonjs from "rollup-plugin-commonjs"; const config = [ { @@ -8,7 +11,24 @@ const config = [ format: "es", name: "MicrosoftGraph", }, - plugins: [terser()], + plugins: [resolve(), terser()], + }, + { + input: ["lib/es/browser/index.js"], + output: { + file: "lib/graph-js-sdk.js", + format: "iife", + name: "MicrosoftGraph", + }, + plugins: [ + resolve(), + babel({ + runtimeHelpers: true, + exclude: "node_modules/**", + }), + commonjs({ include: "node_modules/**" }), + terser(), + ], }, ]; diff --git a/samples/browser/package.json b/samples/browser/package.json index 000730141..463c02c35 100644 --- a/samples/browser/package.json +++ b/samples/browser/package.json @@ -4,7 +4,7 @@ "description": "", "main": "./src/main.js", "scripts": { - "copy": "copyfiles -f ../../lib/graph-js-sdk-web.js ./src", + "copy": "copyfiles -f ../../lib/graph-js-sdk.js ./src", "start": "npm run copy && light-server --config .lightrc" }, "author": "", diff --git a/samples/browser/src/index.html b/samples/browser/src/index.html index a5b00e812..897d4fd1c 100644 --- a/samples/browser/src/index.html +++ b/samples/browser/src/index.html @@ -4,7 +4,7 @@ Sample For Browser - + diff --git a/spec/core/Client.ts b/spec/core/Client.ts index 5caf4a26c..64165e8e7 100644 --- a/spec/core/Client.ts +++ b/spec/core/Client.ts @@ -6,12 +6,12 @@ */ import { assert } from "chai"; +import "isomorphic-fetch"; import { Client } from "../../src/Client"; import { AuthProvider } from "../../src/IAuthProvider"; import { ClientOptions } from "../../src/IClientOptions"; import { Options } from "../../src/IOptions"; -import "../../src/PolyFill"; import { DummyAuthenticationProvider } from "../DummyAuthenticationProvider"; import { DummyHTTPMessageHandler } from "../DummyHTTPMessageHandler"; diff --git a/spec/development/test-helper.ts b/spec/development/test-helper.ts index 02f2403ed..9c662dec0 100644 --- a/spec/development/test-helper.ts +++ b/spec/development/test-helper.ts @@ -5,8 +5,9 @@ * ------------------------------------------------------------------------------------------- */ +import "isomorphic-fetch"; + import { Client } from "../../src/index"; -import "../../src/PolyFill"; import { HardCodedAuthenticationProvider } from "./HardCodedAuthenticationProvider"; diff --git a/spec/test-helper.ts b/spec/test-helper.ts index 3043ed90c..83082ed7b 100644 --- a/spec/test-helper.ts +++ b/spec/test-helper.ts @@ -5,8 +5,9 @@ * ------------------------------------------------------------------------------------------- */ +import "isomorphic-fetch"; + import { Client } from "../src/index"; -import "../src/PolyFill"; import { DummyAuthenticationProvider } from "./DummyAuthenticationProvider"; diff --git a/src/PolyFill.ts b/src/PolyFill.ts deleted file mode 100644 index d66537783..000000000 --- a/src/PolyFill.ts +++ /dev/null @@ -1,11 +0,0 @@ -/** - * ------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. - * See License in the project root for license information. - * ------------------------------------------------------------------------------------------- - */ - -import * as es6Promise from "es6-promise"; -import "isomorphic-fetch"; - -es6Promise.polyfill(); diff --git a/src/index.ts b/src/index.ts index 685f45bcd..85c7a1407 100644 --- a/src/index.ts +++ b/src/index.ts @@ -5,8 +5,6 @@ * ------------------------------------------------------------------------------------------- */ -import "./PolyFill"; - export * from "./content/BatchRequestContent"; export * from "./content/BatchResponseContent"; diff --git a/tsconfig-base.json b/tsconfig-base.json index b54e40b8c..bcd34dddb 100644 --- a/tsconfig-base.json +++ b/tsconfig-base.json @@ -1,5 +1,6 @@ { "compilerOptions": { + "importHelpers": true, "noEmitOnError": true, "noImplicitAny": false, "moduleResolution": "node", diff --git a/tsconfig-cjs.json b/tsconfig-cjs.json index 2ee4501d5..3cc1c3494 100644 --- a/tsconfig-cjs.json +++ b/tsconfig-cjs.json @@ -1,7 +1,6 @@ { "extends": "./tsconfig-base.json", "compilerOptions": { - "importHelpers": true, "module": "commonjs", "target": "es5", "lib": ["dom", "esnext"], From 454c0a3fb63774438a1d96b7fb37dfd3524a4c9f Mon Sep 17 00:00:00 2001 From: Muthurathinam Date: Tue, 7 May 2019 14:54:45 +0530 Subject: [PATCH 02/23] Updated readme with installation guide --- README.md | 18 +++++++++++++----- babel.config.js | 2 +- 2 files changed, 14 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 5d8940b33..72eeb5b19 100644 --- a/README.md +++ b/README.md @@ -16,24 +16,32 @@ The Microsoft Graph JavaScript client library is a lightweight wrapper around th npm install @microsoft/microsoft-graph-client ``` -import `@microsoft/microsoft-graph-client` into your module. +import `@microsoft/microsoft-graph-client` into your module and also you will need polyfill for fetch like [isomorphic-fetch](https://github.com/matthew-andrews/isomorphic-fetch). ```typescript +import "isomorphic-fetch"; import { Client } from "@microsoft/microsoft-graph-client"; ``` +You will also need Promise polyfill like [es6-promise](https://github.com/stefanpenner/es6-promise) for [older Node.js](https://node.green/#ES2015-built-ins-Promise). + ### Via Script Tag -Include `lib/graph-js-sdk-web.js` in your page. +Include [graph-js-sdk.js](https://cdn.jsdelivr.net/npm/@microsoft/microsoft-graph-client/lib/graph-js-sdk.js) in your HTML page. ```HTML - + ``` -Incase if your application ships with [es6-promise](https://www.npmjs.com/package/es6-promise) and [isomorphic-fetch](https://www.npmjs.com/package/isomorphic-fetch) just use `lib/graph-js-sdk-core.js` +In case your browser doesn't have support for [Fetch](https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API) [[support](https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API#Browser_compatibility)] or [Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise) [[support](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise#Browser_compatibility)], you need to use polyfills like [github/fetch](https://github.com/github/fetch) for fetch and [es6-promise](https://github.com/stefanpenner/es6-promise) for promise. ```HTML - + + + + + + ``` ## Getting started diff --git a/babel.config.js b/babel.config.js index 15cad8417..edd8cf7ea 100644 --- a/babel.config.js +++ b/babel.config.js @@ -5,7 +5,7 @@ module.exports = function(api) { "@babel/preset-env", { targets: { - edge: 12, + ie: 11, }, }, ], From 4b1406b7d8166267474a12de8f15c08cebe08e29 Mon Sep 17 00:00:00 2001 From: Muthurathinam Date: Wed, 8 May 2019 16:20:38 +0530 Subject: [PATCH 03/23] Changes: * Modified params passed in for initializaiton of MSAL provider - Breaking change * Fixed @nextLink property in Batching * Added negative value check for default values in retry and redirect handlers * Fixed - Auth handler replaces the authorization header * Fixed - Telemetry handler replaces the sdkVersion header --- samples/browser/src/index.html | 8 - samples/browser/src/main.js | 15 +- spec/content/BatchResponseContent.ts | 2 +- spec/middleware/MiddlewareUtil.ts | 232 ++++++++++++++++-- spec/middleware/RedirectHandlerOptions.ts | 8 + spec/middleware/RetryHandlerOptions.ts | 27 ++ src/MSALAuthenticationProvider.ts | 53 +--- src/browser/MSALAuthenticationProvider.ts | 55 +---- src/content/BatchResponseContent.ts | 6 +- src/middleware/AuthenticationHandler.ts | 4 +- src/middleware/MiddlewareUtil.ts | 50 +++- src/middleware/TelemetryHandler.ts | 4 +- .../options/RedirectHandlerOptions.ts | 5 + src/middleware/options/RetryHandlerOptions.ts | 12 + src/tasks/PageIterator.ts | 3 +- 15 files changed, 353 insertions(+), 131 deletions(-) diff --git a/samples/browser/src/index.html b/samples/browser/src/index.html index 897d4fd1c..a6ddc5ee4 100644 --- a/samples/browser/src/index.html +++ b/samples/browser/src/index.html @@ -12,17 +12,9 @@ -

Hello - !

diff --git a/samples/browser/src/main.js b/samples/browser/src/main.js index 15457c105..c5eb2eb02 100644 --- a/samples/browser/src/main.js +++ b/samples/browser/src/main.js @@ -6,28 +6,23 @@ window.addEventListener( false, ); -let client, scopes; +let client; const init = async () => { - scopes = ["user.read", "profile", "User.ReadWrite", "User.Readwrite.All", "User.Invite.All", "contacts.read", "Notes.ReadWrite", "Notes.Read", "Notes.Create", "Files.Read", "Files.Read.All", "Files.ReadWrite", "Files.ReadWrite.All", "Mail.Read", "Mail.ReadWrite", "Mail.Send"]; + const scopes = ["user.read", "profile", "User.ReadWrite", "User.Readwrite.All", "User.Invite.All", "contacts.read", "Notes.ReadWrite", "Notes.Read", "Notes.Create", "Files.Read", "Files.Read.All", "Files.ReadWrite", "Files.ReadWrite.All", "Mail.Read", "Mail.ReadWrite", "Mail.Send"]; const callback = (errorDesc, token, error, tokenType) => {}; const options = { redirectUri: "http://localhost:8080", }; const userAgentApplication = new Msal.UserAgentApplication(Secrets.clientId, undefined, callback, options); - let msalProvider = new MicrosoftGraph.MSALAuthenticationProvider(userAgentApplication, scopes); - client = new MicrosoftGraph.Client({ + const msalOptions = new MicrosoftGraph.MSALAuthenticationProviderOptions(scopes); + const msalProvider = new MicrosoftGraph.MSALAuthenticationProvider(userAgentApplication, msalOptions); + client = MicrosoftGraph.Client.initWithMiddleware({ debugLogging: true, authProvider: msalProvider, }); bindEvents(); - - // let displayName = await request.getDisplayName(); - // ui.setDisplayName(displayName); - - // let profileImg = await request.getProfilePicture(); - // ui.setProfilePicture(profileImg); }; const bindEvents = () => { diff --git a/spec/content/BatchResponseContent.ts b/spec/content/BatchResponseContent.ts index 505420f40..4bf28c34e 100644 --- a/spec/content/BatchResponseContent.ts +++ b/spec/content/BatchResponseContent.ts @@ -48,7 +48,7 @@ describe("BatchResponseContent.ts", () => { const responses = [redirect, forbidden]; const batchRes = new BatchResponseContent({ responses, - "@nextLink": "dummy nextlink", + "@odata.nextLink": "dummy nextlink", }); batchRes.update({ responses: [okWithoutBody, okWithBody], diff --git a/spec/middleware/MiddlewareUtil.ts b/spec/middleware/MiddlewareUtil.ts index 9bd845a46..f77f10103 100644 --- a/spec/middleware/MiddlewareUtil.ts +++ b/spec/middleware/MiddlewareUtil.ts @@ -8,14 +8,75 @@ import { assert } from "chai"; import { FetchOptions } from "../../src/IFetchOptions"; -import { generateUUID, getRequestHeader, setRequestHeader } from "../../src/middleware/MiddlewareUtil"; +import { appendRequestHeader, generateUUID, getRequestHeader, setRequestHeader } from "../../src/middleware/MiddlewareUtil"; describe("MiddlewareUtil.ts", async () => { + describe("getRequestHeader", () => { + const key: string = "Content-Type"; + const value: string = "application/json"; + const url = "dummy_url"; + it("Should get header from request object", () => { + const request: Request = new Request(url, { + method: "test", + headers: { + version: "version", + [key]: value, + }, + }); + const headerValue: string = getRequestHeader(request, undefined, key); + assert.equal(headerValue, value); + }); + + it("Should get header from headers object", () => { + const options: FetchOptions = { + method: "test", + headers: { + version: "version", + [key]: value, + }, + }; + const headerValue: string = getRequestHeader(url, options, key); + assert.equal(headerValue, value); + }); + + it("Should get header from Headers instance", () => { + const options: FetchOptions = { + method: "test", + headers: new Headers({ + version: "version", + [key]: value, + }), + }; + const headerValue: string = getRequestHeader(url, options, key); + assert.equal(headerValue, value); + }); + + it("Should get header from array of headers", () => { + const options: FetchOptions = { + method: "test", + headers: [["version", "version"], [key, value]], + }; + const headerValue: string = getRequestHeader(url, options, key); + assert.equal(headerValue, value); + }); + }); + describe("setRequestHeader", () => { const key: string = "Content-Type"; const value: string = "application/json"; const url = "dummy_url"; it("Should set header in request object", () => { + const request: Request = new Request(url, { + method: "test", + headers: { + version: "version", + }, + }); + setRequestHeader(request, undefined, key, value); + assert.equal(request.headers.get(key), value); + }); + + it("Should replace header in request object if the header is already present", () => { const request: Request = new Request(url, { method: "test", headers: { @@ -33,7 +94,7 @@ describe("MiddlewareUtil.ts", async () => { }; setRequestHeader(url, options, key, value); assert.isDefined(options.headers); - assert.equal(options.headers[key], value); + assert.equal((options.headers as Headers).get(key), value); }); it("Should set header in headers object", () => { @@ -47,6 +108,18 @@ describe("MiddlewareUtil.ts", async () => { assert.equal(options.headers[key], value); }); + it("Should replace header in headers object if header is already present", () => { + const options: FetchOptions = { + method: "test", + headers: { + version: "version", + [key]: value, + }, + }; + setRequestHeader(url, options, key, value); + assert.equal(options.headers[key], value); + }); + it("Should set header in Headers instance", () => { const options: FetchOptions = { method: "test", @@ -57,6 +130,16 @@ describe("MiddlewareUtil.ts", async () => { assert.equal((options.headers as Headers).get(key), value); }); + it("Should replace header in Headers instance if header is already present", () => { + const options: FetchOptions = { + method: "test", + headers: new Headers({ version: "version", [key]: value }), + }; + setRequestHeader(url, options, key, value); + assert.isDefined(options.headers); + assert.equal((options.headers as Headers).get(key), value); + }); + it("Should set header in array of headers", () => { const options: FetchOptions = { method: "test", @@ -66,13 +149,49 @@ describe("MiddlewareUtil.ts", async () => { assert.isDefined(options.headers); assert.equal(options.headers[1][1], value); }); + + it("Should replace header in array of headers if header is already present", () => { + const options: FetchOptions = { + method: "test", + headers: [[key, "dummy/type"]], + }; + setRequestHeader(url, options, key, value); + assert.isDefined(options.headers); + assert.equal((options.headers as string[][]).length, 1); + assert.equal(options.headers[0][0], key); + assert.equal(options.headers[0][1], value); + }); }); - describe("getRequestHeader", () => { + describe("appendRequestHeader", () => { const key: string = "Content-Type"; const value: string = "application/json"; + const firstValue: string = "text/html"; const url = "dummy_url"; - it("Should get header from request object", () => { + it("Should set header in request object if the header is not present", () => { + const request: Request = new Request(url, { + method: "test", + headers: { + version: "version", + }, + }); + appendRequestHeader(request, undefined, key, value); + assert.equal(request.headers.get(key), value); + }); + /* + it("Should append header in request object", () => { + const request: Request = new Request(url, { + method: "test", + headers: { + version: "version", + [key]: firstValue, + }, + }); + appendRequestHeader(request, undefined, key, value); + assert.equal(request.headers.get(key), `${firstValue}, ${value}`); + }); + + it("Should append header in request object even if the value is duplicate", () => { const request: Request = new Request(url, { method: "test", headers: { @@ -80,42 +199,117 @@ describe("MiddlewareUtil.ts", async () => { [key]: value, }, }); - const headerValue: string = getRequestHeader(request, undefined, key); - assert.equal(headerValue, value); + appendRequestHeader(request, undefined, key, value); + assert.equal(request.headers.get(key), `${value}, ${value}`); + }); +*/ + it("Should set header for empty headers", () => { + const options: FetchOptions = { + method: "test", + }; + appendRequestHeader(url, options, key, value); + assert.isDefined(options.headers); + assert.equal((options.headers as Headers).get(key), value); }); - it("Should get header from headers object", () => { + it("Should set header in headers object if header is not present", () => { const options: FetchOptions = { method: "test", headers: { version: "version", - [key]: value, }, }; - const headerValue: string = getRequestHeader(url, options, key); - assert.equal(headerValue, value); + appendRequestHeader(url, options, key, value); + assert.equal(options.headers[key], value); }); - it("Should get header from Headers instance", () => { + it("Should append header in headers object", () => { const options: FetchOptions = { method: "test", - headers: new Headers({ + headers: { + version: "version", + [key]: firstValue, + }, + }; + appendRequestHeader(url, options, key, value); + assert.equal(options.headers[key], `${firstValue}, ${value}`); + }); + + it("Should append header in headers object even if the value is duplicate", () => { + const options: FetchOptions = { + method: "test", + headers: { version: "version", [key]: value, - }), + }, }; - const headerValue: string = getRequestHeader(url, options, key); - assert.equal(headerValue, value); + appendRequestHeader(url, options, key, value); + assert.equal(options.headers[key], `${value}, ${value}`); }); - it("Should get header from array of headers", () => { + it("Should set header in Headers instance if header is not present", () => { const options: FetchOptions = { method: "test", - headers: [["version", "version"], [key, value]], + headers: new Headers({ version: "version" }), }; - const headerValue: string = getRequestHeader(url, options, key); - assert.equal(headerValue, value); + appendRequestHeader(url, options, key, value); + assert.isDefined(options.headers); + assert.equal((options.headers as Headers).get(key), value); + }); + /* + it("Should append header in Headers instance", () => { + const options: FetchOptions = { + method: "test", + headers: new Headers({ version: "version", [key]: firstValue }), + }; + appendRequestHeader(url, options, key, value); + assert.isDefined(options.headers); + assert.equal((options.headers as Headers).get(key), `${firstValue}, ${value}`); + }); + + it("Should append header in Headers instance even if the value is duplicate", () => { + const options: FetchOptions = { + method: "test", + headers: new Headers({ version: "version", [key]: value }), + }; + appendRequestHeader(url, options, key, value); + assert.isDefined(options.headers); + assert.equal((options.headers as Headers).get(key), `${value}, ${value}`); + }); +*/ + it("Should set header in array of headers if the header is not present", () => { + const options: FetchOptions = { + method: "test", + headers: [["version", "version"]], + }; + appendRequestHeader(url, options, key, value); + assert.isDefined(options.headers); + assert.equal(options.headers[1][1], value); }); + /* + it("Should append header in array of headers", () => { + const options: FetchOptions = { + method: "test", + headers: [[key, firstValue]], + }; + appendRequestHeader(url, options, key, value); + assert.isDefined(options.headers); + assert.equal((options.headers as string[][]).length, 1); + assert.equal(options.headers[0][0], key); + assert.equal(options.headers[0][1], `${firstValue}, ${value}`); + }); + + it("Should append header in array of headers even if the value is duplicate", () => { + const options: FetchOptions = { + method: "test", + headers: [[key, value]], + }; + appendRequestHeader(url, options, key, value); + assert.isDefined(options.headers); + assert.equal((options.headers as string[][]).length, 1); + assert.equal(options.headers[0][0], key); + assert.equal(options.headers[0][1], `${value}, ${value}`); + });*/ }); describe("generateUUID", () => { diff --git a/spec/middleware/RedirectHandlerOptions.ts b/spec/middleware/RedirectHandlerOptions.ts index be69256c5..05cad5b1e 100644 --- a/spec/middleware/RedirectHandlerOptions.ts +++ b/spec/middleware/RedirectHandlerOptions.ts @@ -32,6 +32,14 @@ describe("RedirectHandlerOptions.ts", () => { assert.equal(error.name, "MaxLimitExceeded"); } }); + it("Should throw error for setting max redirects to negative", () => { + try { + const options = new RedirectHandlerOptions(-10); + throw new Error("Something wrong with the max redirects value redirection"); + } catch (error) { + assert.equal(error.name, "MinExpectationNotMet"); + } + }); /* tslint:disable: no-string-literal */ it("Should initialize instance with default options", () => { diff --git a/spec/middleware/RetryHandlerOptions.ts b/spec/middleware/RetryHandlerOptions.ts index 09762b491..4b9cdb99e 100644 --- a/spec/middleware/RetryHandlerOptions.ts +++ b/spec/middleware/RetryHandlerOptions.ts @@ -50,6 +50,33 @@ describe("RetryHandlerOptions.ts", () => { } }); + it("Should throw error for both delay and maxRetries are negative", () => { + try { + const options = new RetryHandlerOptions(-1, -100); + throw new Error("Something wrong with the delay and maxRetries max limit validation"); + } catch (error) { + assert.equal(error.name, "MinExpectationNotMet"); + } + }); + + it("Should throw error for delay is negative", () => { + try { + const options = new RetryHandlerOptions(-5, 2); + throw new Error("Something wrong with the delay max limit validation"); + } catch (error) { + assert.equal(error.name, "MinExpectationNotMet"); + } + }); + + it("Should throw error for maxRetries is negative", () => { + try { + const options = new RetryHandlerOptions(1, -10); + throw new Error("Something wrong with the maxRetries max limit validation"); + } catch (error) { + assert.equal(error.name, "MinExpectationNotMet"); + } + }); + it("Should accept all the given values", () => { try { const delay: number = 1; diff --git a/src/MSALAuthenticationProvider.ts b/src/MSALAuthenticationProvider.ts index 911389f1b..2aad69f71 100644 --- a/src/MSALAuthenticationProvider.ts +++ b/src/MSALAuthenticationProvider.ts @@ -23,29 +23,27 @@ import { MSALAuthenticationProviderOptions } from "./MSALAuthenticationProviderO export class MSALAuthenticationProvider implements AuthenticationProvider { /** * @private - * A member holding the list of graph scopes + * A member holding an instance of MSALAuthenticationProviderOptions */ - private scopes: string[]; + private options: MSALAuthenticationProviderOptions; /** - * @public - * A member holding an instance of UserAgentApplication returned from MSAL + * @private + * A member holding an instance of UserAgentApplication */ - public userAgentApplication: UserAgentApplication; + private userAgentApplication: UserAgentApplication; /** * @public * @constructor * Creates an instance of MSALAuthenticationProvider - * @param {string | UserAgentApplication} clientIdOrUserAgentApplication - The clientId value of an application or an instance of UserAgentApplication - * @param {string[]} scopes - An array of graph scopes - * @param {any} [options] - An options object for MSAL initialization + * @param {UserAgentApplication} userAgentApplication - An instance of UserAgentApplication + * @param {MSALAuthenticationProviderOptions} options - An instance of MSALAuthenticationProviderOptions * @returns An instance of MSALAuthenticationProvider */ - public constructor(clientIdOrUserAgentApplication: string | UserAgentApplication, scopes: string[], options?: any) { - const callback = (errorDesc, token, error, tokenType) => {}; // tslint:disable-line: no-empty - this.scopes = scopes; - this.userAgentApplication = typeof clientIdOrUserAgentApplication === "string" ? new UserAgentApplication(clientIdOrUserAgentApplication, undefined, callback, options) : clientIdOrUserAgentApplication; + public constructor(userAgentApplication: UserAgentApplication, options: MSALAuthenticationProviderOptions) { + this.options = options; + this.userAgentApplication = userAgentApplication; } /** @@ -56,18 +54,18 @@ export class MSALAuthenticationProvider implements AuthenticationProvider { * @returns The promise that resolves to an access token */ public async getAccessToken(authenticationProviderOptions?: AuthenticationProviderOptions): Promise { - const options = authenticationProviderOptions as MSALAuthenticationProviderOptions; + const options: MSALAuthenticationProviderOptions = authenticationProviderOptions as MSALAuthenticationProviderOptions; let scopes: string[]; if (typeof options !== "undefined") { scopes = options.scopes; } if (typeof scopes === "undefined" || scopes.length === 0) { - scopes = this.scopes; + scopes = this.options.scopes; } if (scopes.length === 0) { const error = new Error(); error.name = "EmptyScopes"; - error.message = "Scopes cannot be empty, Please provide a scope"; + error.message = "Scopes cannot be empty, Please provide a scopes"; throw error; } try { @@ -88,29 +86,4 @@ export class MSALAuthenticationProvider implements AuthenticationProvider { } } } - - /** - * @public - * To add the scopes to the existing set of scopes - * @param {string[]} scopes - The array of graph scope values - * @returns Nothing - */ - public addScopes(scopes: string[]): void { - if (scopes.length === 0) { - const error = new Error(); - error.name = "EmptyScopes"; - error.message = "Scopes array cannot be empty"; - throw error; - } - this.scopes = Array.from(new Set(this.scopes.concat(scopes))); - } - - /** - * @public - * To clear the graph scopes - * @returns Nothing - */ - public clearScopes(): void { - this.scopes = []; - } } diff --git a/src/browser/MSALAuthenticationProvider.ts b/src/browser/MSALAuthenticationProvider.ts index ef37109f8..8fb8ea56b 100644 --- a/src/browser/MSALAuthenticationProvider.ts +++ b/src/browser/MSALAuthenticationProvider.ts @@ -27,31 +27,27 @@ declare const Msal: any; export class MSALAuthenticationProvider implements AuthenticationProvider { /** * @private - * A member holding the list of graph scopes + * A member holding an instance of MSALAuthenticationProviderOptions */ - private scopes: string[]; + private options: MSALAuthenticationProviderOptions; /** - * @public - * A member holding an instance of UserAgentApplication returned from MSAL + * @private + * A member holding an instance of UserAgentApplication */ - public userAgentApplication: any; + private userAgentApplication: any; /** * @public * @constructor * Creates an instance of MSALAuthenticationProvider - * @param {string | any} clientIdOrUserAgentApplication - The clientId value of an application or an instance of UserAgentApplication - * @param {string[]} scopes - An array of graph scopes - * @param {any} [options] - An options object for MSAL initialization + * @param {any} userAgentApplication - An instance of UserAgentApplication + * @param {MSALAuthenticationProviderOptions} options - An instance of MSALAuthenticationProviderOptions * @returns An instance of MSALAuthenticationProvider */ - public constructor(clientIdOrUserAgentApplication: string | any, scopes: string[], options?: any) { - const callback = (errorDesc, token, error, tokenType) => { - // tslint:disable-line: no-empty - }; - this.scopes = scopes; - this.userAgentApplication = typeof clientIdOrUserAgentApplication === "string" ? new Msal.UserAgentApplication(clientIdOrUserAgentApplication, undefined, callback, options) : clientIdOrUserAgentApplication; + public constructor(userAgentApplication: any, options: MSALAuthenticationProviderOptions) { + this.options = options; + this.userAgentApplication = userAgentApplication; } /** @@ -62,18 +58,18 @@ export class MSALAuthenticationProvider implements AuthenticationProvider { * @returns The promise that resolves to an access token */ public async getAccessToken(authenticationProviderOptions?: AuthenticationProviderOptions): Promise { - const options = authenticationProviderOptions as MSALAuthenticationProviderOptions; + const options: MSALAuthenticationProviderOptions = authenticationProviderOptions as MSALAuthenticationProviderOptions; let scopes: string[]; if (typeof options !== "undefined") { scopes = options.scopes; } if (typeof scopes === "undefined" || scopes.length === 0) { - scopes = this.scopes; + scopes = this.options.scopes; } if (scopes.length === 0) { const error = new Error(); error.name = "EmptyScopes"; - error.message = "Scopes cannot be empty, Please provide a scope"; + error.message = "Scopes cannot be empty, Please provide a scopes"; throw error; } try { @@ -94,29 +90,4 @@ export class MSALAuthenticationProvider implements AuthenticationProvider { } } } - - /** - * @public - * To add the scopes to the existing set of scopes - * @param {string[]} scopes - The array of graph scope values - * @returns Nothing - */ - public addScopes(scopes: string[]): void { - if (scopes.length === 0) { - const error = new Error(); - error.name = "EmptyScopes"; - error.message = "Scopes array cannot be empty"; - throw error; - } - this.scopes = Array.from(new Set(this.scopes.concat(scopes))); - } - - /** - * @public - * To clear the graph scopes - * @returns Nothing - */ - public clearScopes(): void { - this.scopes = []; - } } diff --git a/src/content/BatchResponseContent.ts b/src/content/BatchResponseContent.ts index 910b8ac54..3c4d04f56 100644 --- a/src/content/BatchResponseContent.ts +++ b/src/content/BatchResponseContent.ts @@ -21,11 +21,11 @@ interface KeyValuePairObject { * @interface * Signature representing Batch response body * @property {KeyValuePairObject[]} responses - An array of key value pair representing response object for every request - * @property {string} [@nextLink] - The nextLink value to get next set of responses in case of asynchronous batch requests + * @property {string} [@odata.nextLink] - The nextLink value to get next set of responses in case of asynchronous batch requests */ interface BatchResponseBody { responses: KeyValuePairObject[]; - "@nextLink"?: string; + "@odata.nextLink"?: string; } /** @@ -79,7 +79,7 @@ export class BatchResponseContent { * @returns Nothing */ public update(response: BatchResponseBody): void { - this.nextLink = response["@nextLink"]; + this.nextLink = response["@odata.nextLink"]; const responses = response.responses; for (let i = 0, l = responses.length; i < l; i++) { this.responses.set(responses[i].id, this.createResponseObject(responses[i])); diff --git a/src/middleware/AuthenticationHandler.ts b/src/middleware/AuthenticationHandler.ts index 81935d607..0fdf3a717 100644 --- a/src/middleware/AuthenticationHandler.ts +++ b/src/middleware/AuthenticationHandler.ts @@ -15,7 +15,7 @@ import { Context } from "../IContext"; import { Middleware } from "./IMiddleware"; import { MiddlewareControl } from "./MiddlewareControl"; -import { setRequestHeader } from "./MiddlewareUtil"; +import { appendRequestHeader } from "./MiddlewareUtil"; import { AuthenticationHandlerOptions } from "./options/AuthenticationHandlerOptions"; import { FeatureUsageFlag, TelemetryHandlerOptions } from "./options/TelemetryHandlerOptions"; @@ -77,7 +77,7 @@ export class AuthenticationHandler implements Middleware { } const token: string = await authenticationProvider.getAccessToken(authenticationProviderOptions); const bearerKey: string = `Bearer ${token}`; - setRequestHeader(context.request, context.options, AuthenticationHandler.AUTHORIZATION_HEADER, bearerKey); + appendRequestHeader(context.request, context.options, AuthenticationHandler.AUTHORIZATION_HEADER, bearerKey); TelemetryHandlerOptions.updateFeatureUsageFlag(context, FeatureUsageFlag.AUTHENTICATION_HANDLER_ENABLED); return await this.nextMiddleware.execute(context); } catch (error) { diff --git a/src/middleware/MiddlewareUtil.ts b/src/middleware/MiddlewareUtil.ts index 2738e5133..dc80b5869 100644 --- a/src/middleware/MiddlewareUtil.ts +++ b/src/middleware/MiddlewareUtil.ts @@ -71,14 +71,25 @@ export const setRequestHeader = (request: RequestInfo, options: FetchOptions | u (request as Request).headers.set(key, value); } else if (typeof options !== "undefined") { if (options.headers === undefined) { - options.headers = { + options.headers = new Headers({ [key]: value, - }; + }); } else { if (options.headers instanceof Headers) { (options.headers as Headers).set(key, value); } else if (options.headers instanceof Array) { - (options.headers as string[][]).push([key, value]); + let i = 0; + const l = options.headers.length; + for (; i < l; i++) { + const header = options.headers[i]; + if (header[0] === key) { + header[1] = value; + break; + } + } + if (i === l) { + (options.headers as string[][]).push([key, value]); + } } else { Object.assign(options.headers, { [key]: value }); } @@ -86,6 +97,39 @@ export const setRequestHeader = (request: RequestInfo, options: FetchOptions | u } }; +/** + * @constant + * To append the header value to the given request + * @param {RequestInfo} request - The request object or the url string + * @param {FetchOptions|undefined} options - The request options object + * @param {string} key - The header key string + * @param {string } value - The header value string + * @returns Nothing + */ +export const appendRequestHeader = (request: RequestInfo, options: FetchOptions | undefined, key: string, value: string): void => { + if (request instanceof Request) { + (request as Request).headers.append(key, value); + } else if (typeof options !== "undefined") { + if (options.headers === undefined) { + options.headers = new Headers({ + [key]: value, + }); + } else { + if (options.headers instanceof Headers) { + (options.headers as Headers).append(key, value); + } else if (options.headers instanceof Array) { + (options.headers as string[][]).push([key, value]); + } else if (options.headers === undefined) { + options.headers = { [key]: value }; + } else if (options.headers[key] === undefined) { + options.headers[key] = value; + } else { + options.headers[key] += `, ${value}`; + } + } + } +}; + /** * @constant * To clone the request with the new url diff --git a/src/middleware/TelemetryHandler.ts b/src/middleware/TelemetryHandler.ts index f7f178df6..0d114d9be 100644 --- a/src/middleware/TelemetryHandler.ts +++ b/src/middleware/TelemetryHandler.ts @@ -14,7 +14,7 @@ import { Context } from "../IContext"; import { Middleware } from "./IMiddleware"; import { MiddlewareControl } from "./MiddlewareControl"; -import { generateUUID, getRequestHeader, setRequestHeader } from "./MiddlewareUtil"; +import { appendRequestHeader, generateUUID, getRequestHeader, setRequestHeader } from "./MiddlewareUtil"; import { TelemetryHandlerOptions } from "./options/TelemetryHandlerOptions"; /** @@ -80,7 +80,7 @@ export class TelemetryHandler implements Middleware { const featureUsage: string = options.getFeatureUsage(); sdkVersionValue += ` (${TelemetryHandler.FEATURE_USAGE_STRING}=${featureUsage})`; } - setRequestHeader(context.request, context.options, TelemetryHandler.SDK_VERSION_HEADER, sdkVersionValue); + appendRequestHeader(context.request, context.options, TelemetryHandler.SDK_VERSION_HEADER, sdkVersionValue); return await this.nextMiddleware.execute(context); } catch (error) { throw error; diff --git a/src/middleware/options/RedirectHandlerOptions.ts b/src/middleware/options/RedirectHandlerOptions.ts index 76ce97332..49f12ae8c 100644 --- a/src/middleware/options/RedirectHandlerOptions.ts +++ b/src/middleware/options/RedirectHandlerOptions.ts @@ -69,6 +69,11 @@ export class RedirectHandlerOptions implements MiddlewareOptions { error.name = "MaxLimitExceeded"; throw error; } + if (maxRedirects < 0) { + const error = new Error(`MaxRedirects should not be negative`); + error.name = "MinExpectationNotMet"; + throw error; + } this.maxRedirects = maxRedirects; this.shouldRedirect = shouldRedirect; } diff --git a/src/middleware/options/RetryHandlerOptions.ts b/src/middleware/options/RetryHandlerOptions.ts index 00521f9e8..cda2fa682 100644 --- a/src/middleware/options/RetryHandlerOptions.ts +++ b/src/middleware/options/RetryHandlerOptions.ts @@ -100,6 +100,18 @@ export class RetryHandlerOptions implements MiddlewareOptions { const error = new Error(`MaxRetries should not be more than ${RetryHandlerOptions.MAX_MAX_RETRIES}`); error.name = "MaxLimitExceeded"; throw error; + } else if (delay < 0 && maxRetries < 0) { + const error = new Error(`Delay and MaxRetries should not be negative`); + error.name = "MinExpectationNotMet"; + throw error; + } else if (delay < 0) { + const error = new Error(`Delay should not be negative`); + error.name = "MinExpectationNotMet"; + throw error; + } else if (maxRetries < 0) { + const error = new Error(`MaxRetries should not be negative`); + error.name = "MinExpectationNotMet"; + throw error; } this.delay = Math.min(delay, RetryHandlerOptions.MAX_DELAY); this.maxRetries = Math.min(maxRetries, RetryHandlerOptions.MAX_MAX_RETRIES); diff --git a/src/tasks/PageIterator.ts b/src/tasks/PageIterator.ts index 7fafbbe7e..3fa90e4f8 100644 --- a/src/tasks/PageIterator.ts +++ b/src/tasks/PageIterator.ts @@ -14,7 +14,8 @@ import { Client } from "../index"; /** * Signature representing PageCollection * @property {any[]} value - The collection value - * @property {string} [@odata.nextLink] - The nextLine value + * @property {string} [@odata.nextLink] - The nextLink value + * @property {string} [@odata.deltaLink] - The deltaLink value * @property {any} Additional - Any number of additional properties (This is to accept the any additional data returned by in the response to the nextLink request) */ export interface PageCollection { From da2c5e38a3594e0f7f9252e90ff62bff6b83e8cd Mon Sep 17 00:00:00 2001 From: Muthurathinam Date: Wed, 8 May 2019 16:45:55 +0530 Subject: [PATCH 04/23] Added tests for middleware util append request header method --- spec/middleware/MiddlewareUtil.ts | 43 ++++++++++------ spec/package-lock.json | 86 ++++++++++++++----------------- spec/package.json | 9 ++-- 3 files changed, 73 insertions(+), 65 deletions(-) diff --git a/spec/middleware/MiddlewareUtil.ts b/spec/middleware/MiddlewareUtil.ts index f77f10103..9669c59f7 100644 --- a/spec/middleware/MiddlewareUtil.ts +++ b/spec/middleware/MiddlewareUtil.ts @@ -6,6 +6,7 @@ */ import { assert } from "chai"; +import { NFHeaders } from "node-fetch"; import { FetchOptions } from "../../src/IFetchOptions"; import { appendRequestHeader, generateUUID, getRequestHeader, setRequestHeader } from "../../src/middleware/MiddlewareUtil"; @@ -178,7 +179,7 @@ describe("MiddlewareUtil.ts", async () => { appendRequestHeader(request, undefined, key, value); assert.equal(request.headers.get(key), value); }); - /* + it("Should append header in request object", () => { const request: Request = new Request(url, { method: "test", @@ -188,7 +189,9 @@ describe("MiddlewareUtil.ts", async () => { }, }); appendRequestHeader(request, undefined, key, value); - assert.equal(request.headers.get(key), `${firstValue}, ${value}`); + const values = (request.headers as NFHeaders).getAll(key); + assert.equal(values[0], firstValue); + assert.equal(values[1], value); }); it("Should append header in request object even if the value is duplicate", () => { @@ -200,16 +203,18 @@ describe("MiddlewareUtil.ts", async () => { }, }); appendRequestHeader(request, undefined, key, value); - assert.equal(request.headers.get(key), `${value}, ${value}`); + const values = (request.headers as NFHeaders).getAll(key); + assert.equal(values[0], value); + assert.equal(values[1], value); }); -*/ + it("Should set header for empty headers", () => { const options: FetchOptions = { method: "test", }; appendRequestHeader(url, options, key, value); assert.isDefined(options.headers); - assert.equal((options.headers as Headers).get(key), value); + assert.equal((options.headers as NFHeaders).get(key), value); }); it("Should set header in headers object if header is not present", () => { @@ -256,7 +261,7 @@ describe("MiddlewareUtil.ts", async () => { assert.isDefined(options.headers); assert.equal((options.headers as Headers).get(key), value); }); - /* + it("Should append header in Headers instance", () => { const options: FetchOptions = { method: "test", @@ -264,7 +269,9 @@ describe("MiddlewareUtil.ts", async () => { }; appendRequestHeader(url, options, key, value); assert.isDefined(options.headers); - assert.equal((options.headers as Headers).get(key), `${firstValue}, ${value}`); + const values = (options.headers as NFHeaders).getAll(key); + assert.equal(values[0], firstValue); + assert.equal(values[1], value); }); it("Should append header in Headers instance even if the value is duplicate", () => { @@ -274,9 +281,11 @@ describe("MiddlewareUtil.ts", async () => { }; appendRequestHeader(url, options, key, value); assert.isDefined(options.headers); - assert.equal((options.headers as Headers).get(key), `${value}, ${value}`); + const values = (options.headers as NFHeaders).getAll(key); + assert.equal(values[0], value); + assert.equal(values[1], value); }); -*/ + it("Should set header in array of headers if the header is not present", () => { const options: FetchOptions = { method: "test", @@ -286,7 +295,7 @@ describe("MiddlewareUtil.ts", async () => { assert.isDefined(options.headers); assert.equal(options.headers[1][1], value); }); - /* + it("Should append header in array of headers", () => { const options: FetchOptions = { method: "test", @@ -294,9 +303,11 @@ describe("MiddlewareUtil.ts", async () => { }; appendRequestHeader(url, options, key, value); assert.isDefined(options.headers); - assert.equal((options.headers as string[][]).length, 1); + assert.equal((options.headers as string[][]).length, 2); assert.equal(options.headers[0][0], key); - assert.equal(options.headers[0][1], `${firstValue}, ${value}`); + assert.equal(options.headers[0][1], firstValue); + assert.equal(options.headers[1][0], key); + assert.equal(options.headers[1][1], value); }); it("Should append header in array of headers even if the value is duplicate", () => { @@ -306,10 +317,12 @@ describe("MiddlewareUtil.ts", async () => { }; appendRequestHeader(url, options, key, value); assert.isDefined(options.headers); - assert.equal((options.headers as string[][]).length, 1); + assert.equal((options.headers as string[][]).length, 2); assert.equal(options.headers[0][0], key); - assert.equal(options.headers[0][1], `${value}, ${value}`); - });*/ + assert.equal(options.headers[0][1], value); + assert.equal(options.headers[1][0], key); + assert.equal(options.headers[1][1], value); + }); }); describe("generateUUID", () => { diff --git a/spec/package-lock.json b/spec/package-lock.json index 1e2aabc52..6cdf8a5e2 100644 --- a/spec/package-lock.json +++ b/spec/package-lock.json @@ -3,9 +3,9 @@ "lockfileVersion": 1, "dependencies": { "@microsoft/microsoft-graph-client": { - "version": "1.5.2", - "resolved": "https://registry.npmjs.org/@microsoft/microsoft-graph-client/-/microsoft-graph-client-1.5.2.tgz", - "integrity": "sha512-lUsFLQMmi94r5+Eabmi5FBvlmxsqHPzdqm4suegFmcmnOI5+4OCLADORkRFRJXcWzTKB2ypR9x/mGv7f3r9DzA==", + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/@microsoft/microsoft-graph-client/-/microsoft-graph-client-1.6.0.tgz", + "integrity": "sha512-jgOgWZOyrmFbeyiddCUOQ0Kd42JUz7x3F6de0iLlSxP2yT2xJlnhZGAtHPnJZgDS2KRBbPwuRd+dmiJdpOBMWQ==", "dev": true, "requires": { "es6-promise": "^4.2.6", @@ -14,14 +14,9 @@ } }, "@microsoft/microsoft-graph-types": { - "version": "1.7.0", - "resolved": "https://registry.npmjs.org/@microsoft/microsoft-graph-types/-/microsoft-graph-types-1.7.0.tgz", - "integrity": "sha512-Mxu5H+69F8T5NzV4+U8FkTvpIYYWHsmRZzfAuOlIO0zJJGlVyRIVqpq4NmOdUXGC00vZ73ONgCuzuaksxqDm/Q==", - "dev": true - }, - "@microsoft/microsoft-graph-types-beta": { - "version": "github:microsoftgraph/msgraph-typescript-typings#616369376c8152574e9cf7ab065b7f42215d450d", - "from": "github:microsoftgraph/msgraph-typescript-typings#beta", + "version": "1.8.0", + "resolved": "https://registry.npmjs.org/@microsoft/microsoft-graph-types/-/microsoft-graph-types-1.8.0.tgz", + "integrity": "sha512-FJt1O2lIHUazcmh+ROZaD2mAea6q6UkZCPbTCIlYwskyQJL+il+x+fJbIPLHy1c+xSh6HvZUV0R8O8RKDS3KAg==", "dev": true }, "@types/chai": { @@ -37,6 +32,14 @@ "dev": true, "requires": { "@types/node": "*" + }, + "dependencies": { + "@types/node": { + "version": "12.0.0", + "resolved": "https://registry.npmjs.org/@types/node/-/node-12.0.0.tgz", + "integrity": "sha512-Jrb/x3HT4PTJp6a4avhmJCDEVrPdqLfl3e8GGMbpkGGdwAV5UGlIs4vVEfsHHfylZVOKZWpOqmqFH8CbfOZ6kg==", + "dev": true + } } }, "@types/isomorphic-fetch": { @@ -52,9 +55,9 @@ "dev": true }, "@types/node": { - "version": "11.13.4", - "resolved": "https://registry.npmjs.org/@types/node/-/node-11.13.4.tgz", - "integrity": "sha512-+rabAZZ3Yn7tF/XPGHupKIL5EcAbrLxnTr/hgQICxbeuAfWtT0UZSfULE+ndusckBItcv4o6ZeOJplQikVcLvQ==", + "version": "12.0.0", + "resolved": "https://registry.npmjs.org/@types/node/-/node-12.0.0.tgz", + "integrity": "sha512-Jrb/x3HT4PTJp6a4avhmJCDEVrPdqLfl3e8GGMbpkGGdwAV5UGlIs4vVEfsHHfylZVOKZWpOqmqFH8CbfOZ6kg==", "dev": true }, "assertion-error": { @@ -168,49 +171,40 @@ "requires": { "node-fetch": "^1.0.1", "whatwg-fetch": ">=0.10.0" + }, + "dependencies": { + "node-fetch": { + "version": "1.7.3", + "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-1.7.3.tgz", + "integrity": "sha512-NhZ4CsKx7cYm2vSrBAr2PvFOe6sWDf0UYLRqA6svUYg7+/TSfVAu49jYC4BvQ4Sms9SZgdqGBgroqfDhJdTyKQ==", + "dev": true, + "requires": { + "encoding": "^0.1.11", + "is-stream": "^1.0.1" + } + } } }, "mime-db": { - "version": "1.38.0", - "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.38.0.tgz", - "integrity": "sha512-bqVioMFFzc2awcdJZIzR3HjZFX20QhilVS7hytkKrv7xFAn8bM1gzc/FOX2awLISvWe0PV8ptFKcon+wZ5qYkg==", + "version": "1.40.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.40.0.tgz", + "integrity": "sha512-jYdeOMPy9vnxEqFRRo6ZvTZ8d9oPb+k18PKoYNYUe2stVEBPPwsln/qWzdbmaIvnhZ9v2P+CuecK+fpUfsV2mA==", "dev": true }, "mime-types": { - "version": "2.1.22", - "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.22.tgz", - "integrity": "sha512-aGl6TZGnhm/li6F7yx82bJiBZwgiEa4Hf6CNr8YO+r5UHr53tSTYZb102zyU50DOWWKeOv0uQLRL0/9EiKWCog==", + "version": "2.1.24", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.24.tgz", + "integrity": "sha512-WaFHS3MCl5fapm3oLxU4eYDw77IQM2ACcxQ9RIxfaC3ooc6PFuBMGZZsYpvoXS5D5QTWPieo1jjLdAm3TBP3cQ==", "dev": true, "requires": { - "mime-db": "~1.38.0" - } - }, - "msal": { - "version": "0.2.4", - "resolved": "https://registry.npmjs.org/msal/-/msal-0.2.4.tgz", - "integrity": "sha512-/DPtEBL8M4gwSjEYZy4ep+j1ZaawA9XEKJi4nPxmQLT85rLNZLARrxhIRwzwXtkPNewoB+zdoNKzETW8ZrTOFQ==", - "dev": true, - "requires": { - "tslib": "1.7.1" - }, - "dependencies": { - "tslib": { - "version": "1.7.1", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.7.1.tgz", - "integrity": "sha1-vIAEFkaRkjp5/oN4u+s9ogF1OOw=", - "dev": true - } + "mime-db": "1.40.0" } }, "node-fetch": { - "version": "1.7.3", - "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-1.7.3.tgz", - "integrity": "sha512-NhZ4CsKx7cYm2vSrBAr2PvFOe6sWDf0UYLRqA6svUYg7+/TSfVAu49jYC4BvQ4Sms9SZgdqGBgroqfDhJdTyKQ==", - "dev": true, - "requires": { - "encoding": "^0.1.11", - "is-stream": "^1.0.1" - } + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.5.0.tgz", + "integrity": "sha512-YuZKluhWGJwCcUu4RlZstdAxr8bFfOVHakc1mplwHkk8J+tqM1Y5yraYvIUpeX8aY7+crCwiELJq7Vl0o0LWXw==", + "dev": true }, "pathval": { "version": "1.1.0", diff --git a/spec/package.json b/spec/package.json index af5ff6d06..5dbd156ec 100644 --- a/spec/package.json +++ b/spec/package.json @@ -1,17 +1,18 @@ { "devDependencies": { - "@microsoft/microsoft-graph-client": "^1.4.0", - "@microsoft/microsoft-graph-types": "^1.7.0", + "@microsoft/microsoft-graph-client": "^1.6.0", + "@microsoft/microsoft-graph-types": "^1.8.0", "@microsoft/microsoft-graph-types-beta": "microsoftgraph/msgraph-typescript-typings#beta", "@types/chai": "^4.1.7", "@types/form-data": "^2.2.1", "@types/isomorphic-fetch": "0.0.35", "@types/mocha": "^5.2.6", - "@types/node": "^11.9.5", + "@types/node": "^12.0.0", "chai": "^4.2.0", "es6-promise": "^4.2.6", "form-data": "^2.3.3", "isomorphic-fetch": "^2.2.1", - "msal": "^0.2.4" + "msal": "^0.2.4", + "node-fetch": "^2.5.0" } } From ee554ad87df00aba89f848c97f79a865363f81cd Mon Sep 17 00:00:00 2001 From: Muthurathinam Date: Thu, 9 May 2019 11:11:59 +0530 Subject: [PATCH 05/23] Upgraded to msal 1.0.0 and made corresponding changes (breaking changes by msal) --- README.md | 39 ++++++++++-------- package-lock.json | 17 +++----- package.json | 2 +- samples/browser/src/index.html | 2 +- samples/browser/src/main.js | 16 ++++---- spec/package-lock.json | 16 ++++++++ spec/package.json | 2 +- src/MSALAuthenticationProvider.ts | 50 ++++++++++++++--------- src/browser/MSALAuthenticationProvider.ts | 49 ++++++++++++++-------- 9 files changed, 118 insertions(+), 75 deletions(-) diff --git a/README.md b/README.md index 72eeb5b19..310a282c2 100644 --- a/README.md +++ b/README.md @@ -57,7 +57,7 @@ Register your application to use Microsoft Graph API using one of the following The Microsoft Graph JavaScript Client Library has an adapter implementation ([MSALAuthenticationProvider](src/MSALAuthenticationProvider.ts)) for [MSAL](https://github.com/AzureAD/microsoft-authentication-library-for-js/tree/dev/lib/msal-core) (Microsoft Authentication Library) which takes care of getting the `accessToken`. MSAL library does not ship with this library, user has to include it externally (For including MSAL, refer [this](https://github.com/AzureAD/microsoft-authentication-library-for-js/tree/dev/lib/msal-core#installation)). -> **Note:** MSAL is supported only for frontend applications, for server-side authentication you have to implement your own AuthenticationProvider. Refer implementing [Custom Authentication Provider](./docs/CustomAuthenticationProvider.md). +> **Important Note:** MSAL is supported only for frontend applications, for server-side authentication you have to implement your own AuthenticationProvider. Refer implementing [Custom Authentication Provider](./docs/CustomAuthenticationProvider.md). #### Creating an instance of MSALAuthenticationProvider in browser environment @@ -68,17 +68,21 @@ Refer devDependencies in [package.json](./package.json) for the compatible msal ``` ```typescript -const clientId = "your_client_id"; // Client Id of the registered application -const callback = (errorDesc, token, error, tokenType) => {}; -// An Optional options for initializing the MSAL @see https://github.com/AzureAD/microsoft-authentication-library-for-js/wiki/MSAL-basics#configuration-options -const options = { - redirectUri: "Your redirect URI", + +// Configuration options for MSAL @see https://github.com/AzureAD/microsoft-authentication-library-for-js/wiki/MSAL.js-1.0.0-api-release#configuration-options +const msalConfig = { + auth: { + clientId: "your_client_id"; // Client Id of the registered application + redirectUri: "your_redirect_uri", + }, }; const graphScopes = ["user.read", "mail.send"]; // An array of graph scopes -// Initialize the MSAL @see https://github.com/AzureAD/microsoft-authentication-library-for-js/wiki/MSAL-basics#initialization-of-msal -const userAgentApplication = new Msal.UserAgentApplication(clientId, undefined, callback, options); -const authProvider = new MicrosoftGraph.MSALAuthenticationProvider(userAgentApplication, graphScopes); +// Important Note: This library implements loginRedirect and acquireTokenPopup flow, remember this while initializing the msal +// Initialize the MSAL @see https://github.com/AzureAD/microsoft-authentication-library-for-js#1-instantiate-the-useragentapplication +const msalInstance = new Msal.UserAgentApplication(msalConfig); +const options = new MicrosoftGraph.MSALAuthenticationProviderOptions(graphScopes); +const authProvider = new MicrosoftGraph.MSALAuthenticationProvider(msalInstance, options); ``` #### Creating an instance of MSALAuthenticationProvider in node environment @@ -94,17 +98,20 @@ import { UserAgentApplication } from "msal"; import { MSALAuthenticationProvider } from "./node_modules/@microsoft/microsoft-graph-client/lib/src/MSALAuthenticationProvider"; -const clientId = "your_client_id"; // Client Id of the registered application -const callback = (errorDesc, token, error, tokenType) => {}; // An Optional options for initializing the MSAL @see https://github.com/AzureAD/microsoft-authentication-library-for-js/wiki/MSAL-basics#configuration-options -const options = { - redirectUri: "Your redirect URI", +const msalConfig = { + auth: { + clientId: "your_client_id"; // Client Id of the registered application + redirectUri: "your_redirect_uri", + }, }; const graphScopes = ["user.read", "mail.send"]; // An array of graph scopes -// Initialize the MSAL @see https://github.com/AzureAD/microsoft-authentication-library-for-js/wiki/MSAL-basics#initialization-of-msal -const userAgentApplication = new UserAgentApplication(clientId, undefined, callback, options); -const authProvider = new MSALAuthenticationProvider(userAgentApplication, scopes); +// Important Note: This library implements loginRedirect and acquireTokenPopup flow, remember this while initializing the msal +// Initialize the MSAL @see https://github.com/AzureAD/microsoft-authentication-library-for-js#1-instantiate-the-useragentapplication +const msalInstance = new UserAgentApplication(msalConfig); +const options = new MicrosoftGraph.MSALAuthenticationProviderOptions(graphScopes); +const authProvider = new MSALAuthenticationProvider(msalInstance, options); ``` User can integrate own preferred authentication library by implementing `IAuthenticationProvider` interface. Refer implementing [Custom Authentication Provider](./docs/CustomAuthenticationProvider.md). diff --git a/package-lock.json b/package-lock.json index 464ff2322..42c7e9ce5 100644 --- a/package-lock.json +++ b/package-lock.json @@ -2865,20 +2865,13 @@ "dev": true }, "msal": { - "version": "0.2.4", - "resolved": "https://registry.npmjs.org/msal/-/msal-0.2.4.tgz", - "integrity": "sha512-/DPtEBL8M4gwSjEYZy4ep+j1ZaawA9XEKJi4nPxmQLT85rLNZLARrxhIRwzwXtkPNewoB+zdoNKzETW8ZrTOFQ==", + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/msal/-/msal-1.0.0.tgz", + "integrity": "sha512-tw1QYtBjRzmxjjrV5q53Oa42APxHq3YpZxlM6n0H4dTwah4Xx3yEIShG03aQUhRHqu0UBk9yHJ5TZreNzMiYdg==", "dev": true, "requires": { - "tslib": "1.7.1" - }, - "dependencies": { - "tslib": { - "version": "1.7.1", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.7.1.tgz", - "integrity": "sha1-vIAEFkaRkjp5/oN4u+s9ogF1OOw=", - "dev": true - } + "atob": "~2.1.1", + "tslib": "^1.9.3" } }, "nanomatch": { diff --git a/package.json b/package.json index a78e366de..a9f4cff20 100644 --- a/package.json +++ b/package.json @@ -26,7 +26,7 @@ "husky": "^2.2.0", "lint-staged": "^8.1.5", "mocha": "^6.1.4", - "msal": "^0.2.4", + "msal": "^1.0.0", "prettier": "^1.17.0", "rollup": "^1.10.1", "rollup-plugin-babel": "^4.3.2", diff --git a/samples/browser/src/index.html b/samples/browser/src/index.html index a6ddc5ee4..8c52af8bb 100644 --- a/samples/browser/src/index.html +++ b/samples/browser/src/index.html @@ -3,7 +3,7 @@ Sample For Browser - + diff --git a/samples/browser/src/main.js b/samples/browser/src/main.js index c5eb2eb02..ce6438bf9 100644 --- a/samples/browser/src/main.js +++ b/samples/browser/src/main.js @@ -8,15 +8,17 @@ window.addEventListener( let client; const init = async () => { - const scopes = ["user.read", "profile", "User.ReadWrite", "User.Readwrite.All", "User.Invite.All", "contacts.read", "Notes.ReadWrite", "Notes.Read", "Notes.Create", "Files.Read", "Files.Read.All", "Files.ReadWrite", "Files.ReadWrite.All", "Mail.Read", "Mail.ReadWrite", "Mail.Send"]; - - const callback = (errorDesc, token, error, tokenType) => {}; - const options = { - redirectUri: "http://localhost:8080", + const scopes = ["user.read", "profile", "User.ReadWrite", "Files.Read", "Files.Read.All", "Files.ReadWrite", "Files.ReadWrite.All", "Mail.Read", "Mail.ReadWrite", "Mail.Send"]; + const msalConfig = { + auth: { + clientId: Secrets.clientId, + redirectUri: "http://localhost:8080", + }, }; - const userAgentApplication = new Msal.UserAgentApplication(Secrets.clientId, undefined, callback, options); + + var msalInstance = new Msal.UserAgentApplication(msalConfig); const msalOptions = new MicrosoftGraph.MSALAuthenticationProviderOptions(scopes); - const msalProvider = new MicrosoftGraph.MSALAuthenticationProvider(userAgentApplication, msalOptions); + const msalProvider = new MicrosoftGraph.MSALAuthenticationProvider(msalInstance, msalOptions); client = MicrosoftGraph.Client.initWithMiddleware({ debugLogging: true, authProvider: msalProvider, diff --git a/spec/package-lock.json b/spec/package-lock.json index 6cdf8a5e2..af419b0ff 100644 --- a/spec/package-lock.json +++ b/spec/package-lock.json @@ -72,6 +72,12 @@ "integrity": "sha1-x57Zf380y48robyXkLzDZkdLS3k=", "dev": true }, + "atob": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/atob/-/atob-2.1.2.tgz", + "integrity": "sha512-Wm6ukoaOGJi/73p/cl2GvLjTI5JM1k/O14isD73YML8StrH/7/lRFgmg8nICZgD3bZZvjwCGxtMOD3wWNAu8cg==", + "dev": true + }, "chai": { "version": "4.2.0", "resolved": "https://registry.npmjs.org/chai/-/chai-4.2.0.tgz", @@ -200,6 +206,16 @@ "mime-db": "1.40.0" } }, + "msal": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/msal/-/msal-1.0.0.tgz", + "integrity": "sha512-tw1QYtBjRzmxjjrV5q53Oa42APxHq3YpZxlM6n0H4dTwah4Xx3yEIShG03aQUhRHqu0UBk9yHJ5TZreNzMiYdg==", + "dev": true, + "requires": { + "atob": "~2.1.1", + "tslib": "^1.9.3" + } + }, "node-fetch": { "version": "2.5.0", "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.5.0.tgz", diff --git a/spec/package.json b/spec/package.json index 5dbd156ec..2dc10bd6b 100644 --- a/spec/package.json +++ b/spec/package.json @@ -12,7 +12,7 @@ "es6-promise": "^4.2.6", "form-data": "^2.3.3", "isomorphic-fetch": "^2.2.1", - "msal": "^0.2.4", + "msal": "^1.0.0", "node-fetch": "^2.5.0" } } diff --git a/src/MSALAuthenticationProvider.ts b/src/MSALAuthenticationProvider.ts index 2aad69f71..e70e1403f 100644 --- a/src/MSALAuthenticationProvider.ts +++ b/src/MSALAuthenticationProvider.ts @@ -9,7 +9,7 @@ * @module MSALAuthenticationProvider */ -import { UserAgentApplication } from "msal"; +import { AuthenticationParameters, AuthResponse, InteractionRequiredAuthError, UserAgentApplication } from "msal"; import { AuthenticationProvider } from "./IAuthenticationProvider"; import { AuthenticationProviderOptions } from "./IAuthenticationProviderOptions"; @@ -29,21 +29,21 @@ export class MSALAuthenticationProvider implements AuthenticationProvider { /** * @private - * A member holding an instance of UserAgentApplication + * A member holding an instance of MSAL UserAgentApplication */ - private userAgentApplication: UserAgentApplication; + private msalInstance: UserAgentApplication; /** * @public * @constructor * Creates an instance of MSALAuthenticationProvider - * @param {UserAgentApplication} userAgentApplication - An instance of UserAgentApplication + * @param {UserAgentApplication} msalInstance - An instance of MSAL UserAgentApplication * @param {MSALAuthenticationProviderOptions} options - An instance of MSALAuthenticationProviderOptions * @returns An instance of MSALAuthenticationProvider */ - public constructor(userAgentApplication: UserAgentApplication, options: MSALAuthenticationProviderOptions) { + public constructor(msalInstance: UserAgentApplication, options: MSALAuthenticationProviderOptions) { this.options = options; - this.userAgentApplication = userAgentApplication; + this.msalInstance = msalInstance; } /** @@ -68,21 +68,33 @@ export class MSALAuthenticationProvider implements AuthenticationProvider { error.message = "Scopes cannot be empty, Please provide a scopes"; throw error; } - try { - const accessToken: string = await this.userAgentApplication.acquireTokenSilent(scopes); - return accessToken; - } catch (errorMsg) { + if (this.msalInstance.getAccount()) { + const tokenRequest: AuthenticationParameters = { + scopes, + }; try { - const idToken: string = await this.userAgentApplication.loginPopup(scopes); - try { - const accessToken: string = await this.userAgentApplication.acquireTokenSilent(scopes); - return accessToken; - } catch (error) { - const accessToken: string = await this.userAgentApplication.acquireTokenPopup(scopes); - return accessToken; + const authResponse: AuthResponse = await this.msalInstance.acquireTokenSilent(tokenRequest); + return authResponse.accessToken; + } catch (error) { + if (error instanceof InteractionRequiredAuthError) { + try { + const authResponse: AuthResponse = await this.msalInstance.acquireTokenPopup(tokenRequest); + return authResponse.accessToken; + } catch (error) { + throw error; + } } - } catch (errorMsg) { - throw new Error(errorMsg); + } + } else { + try { + const tokenRequest: AuthenticationParameters = { + scopes, + }; + await this.msalInstance.loginPopup(tokenRequest); + const authResponse: AuthResponse = await this.msalInstance.acquireTokenSilent(tokenRequest); + return authResponse.accessToken; + } catch (error) { + throw error; } } } diff --git a/src/browser/MSALAuthenticationProvider.ts b/src/browser/MSALAuthenticationProvider.ts index 8fb8ea56b..55d73233a 100644 --- a/src/browser/MSALAuthenticationProvider.ts +++ b/src/browser/MSALAuthenticationProvider.ts @@ -33,21 +33,21 @@ export class MSALAuthenticationProvider implements AuthenticationProvider { /** * @private - * A member holding an instance of UserAgentApplication + * A member holding an instance of MSAL */ - private userAgentApplication: any; + private msalInstance: any; /** * @public * @constructor * Creates an instance of MSALAuthenticationProvider - * @param {any} userAgentApplication - An instance of UserAgentApplication + * @param {any} msalInstance - An instance of MSAL UserAgentApplication * @param {MSALAuthenticationProviderOptions} options - An instance of MSALAuthenticationProviderOptions * @returns An instance of MSALAuthenticationProvider */ - public constructor(userAgentApplication: any, options: MSALAuthenticationProviderOptions) { + public constructor(msalInstance: any, options: MSALAuthenticationProviderOptions) { this.options = options; - this.userAgentApplication = userAgentApplication; + this.msalInstance = msalInstance; } /** @@ -72,21 +72,34 @@ export class MSALAuthenticationProvider implements AuthenticationProvider { error.message = "Scopes cannot be empty, Please provide a scopes"; throw error; } - try { - const accessToken: string = await this.userAgentApplication.acquireTokenSilent(scopes); - return accessToken; - } catch (errorMsg) { + + if (this.msalInstance.getAccount()) { + const tokenRequest = { + scopes, + }; try { - const idToken: string = await this.userAgentApplication.loginPopup(scopes); - try { - const accessToken: string = await this.userAgentApplication.acquireTokenSilent(scopes); - return accessToken; - } catch (error) { - const accessToken: string = await this.userAgentApplication.acquireTokenPopup(scopes); - return accessToken; + const authResponse = await this.msalInstance.acquireTokenSilent(tokenRequest); + return authResponse.accessToken; + } catch (error) { + if (error.name === "InteractionRequiredAuthError") { + try { + const authResponse = await this.msalInstance.acquireTokenPopup(tokenRequest); + return authResponse.accessToken; + } catch (error) { + throw error; + } } - } catch (errorMsg) { - throw new Error(errorMsg); + } + } else { + try { + const tokenRequest = { + scopes, + }; + await this.msalInstance.loginPopup(tokenRequest); + const authResponse = await this.msalInstance.acquireTokenSilent(tokenRequest); + return authResponse.accessToken; + } catch (error) { + throw error; } } } From edd80e40d61e49ba7ee6b5041f5f113e898082a2 Mon Sep 17 00:00:00 2001 From: Muthurathinam Date: Thu, 9 May 2019 11:14:40 +0530 Subject: [PATCH 06/23] fix readme typo --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 310a282c2..1cce99fbb 100644 --- a/README.md +++ b/README.md @@ -78,7 +78,7 @@ const msalConfig = { }; const graphScopes = ["user.read", "mail.send"]; // An array of graph scopes -// Important Note: This library implements loginRedirect and acquireTokenPopup flow, remember this while initializing the msal +// Important Note: This library implements loginPopup and acquireTokenPopup flow, remember this while initializing the msal // Initialize the MSAL @see https://github.com/AzureAD/microsoft-authentication-library-for-js#1-instantiate-the-useragentapplication const msalInstance = new Msal.UserAgentApplication(msalConfig); const options = new MicrosoftGraph.MSALAuthenticationProviderOptions(graphScopes); @@ -107,7 +107,7 @@ const msalConfig = { }; const graphScopes = ["user.read", "mail.send"]; // An array of graph scopes -// Important Note: This library implements loginRedirect and acquireTokenPopup flow, remember this while initializing the msal +// Important Note: This library implements loginPopup and acquireTokenPopup flow, remember this while initializing the msal // Initialize the MSAL @see https://github.com/AzureAD/microsoft-authentication-library-for-js#1-instantiate-the-useragentapplication const msalInstance = new UserAgentApplication(msalConfig); const options = new MicrosoftGraph.MSALAuthenticationProviderOptions(graphScopes); From 10217b1be09d07ddf50496140c86b4e82e0303b6 Mon Sep 17 00:00:00 2001 From: Muthurathinam Date: Tue, 21 May 2019 11:03:04 +0530 Subject: [PATCH 07/23] Bug Fixes: * https://github.com/microsoftgraph/msgraph-sdk-javascript/issues/169 * https://github.com/microsoftgraph/msgraph-sdk-javascript/issues/158 * https://github.com/microsoftgraph/msgraph-sdk-javascript/issues/151 --- docs/CallingPattern.md | 39 +++-- package-lock.json | 291 +++++++++++++++++------------------- spec/package-lock.json | 5 + src/GraphResponseHandler.ts | 31 ++-- 4 files changed, 176 insertions(+), 190 deletions(-) diff --git a/docs/CallingPattern.md b/docs/CallingPattern.md index 7949bf176..7e9345760 100644 --- a/docs/CallingPattern.md +++ b/docs/CallingPattern.md @@ -4,11 +4,11 @@ All calls to Microsoft Graph are chained together starting with **.api()**, then ## Path supports the following formats -* `me` -* `/me` -* `https://graph.microsoft.com/v1.0/me` -* `https://graph.microsoft.com/beta/me` -* `me/events?$filter=startswith(subject, "Adventure")` +- `me` +- `/me` +- `https://graph.microsoft.com/v1.0/me` +- `https://graph.microsoft.com/beta/me` +- `me/events?$filter=startswith(subject, "Adventure")` ## Promise based calling @@ -16,10 +16,10 @@ Getting user details with `async`/`await`, ```typescript try { - let res = await client.api("/me").get(); - console.log(res); + let res = await client.api("/me").get(); + console.log(res); } catch (error) { - throw error; + throw error; } ``` @@ -27,13 +27,14 @@ Getting user details with `then`/`catch`, ```typescript client - .api('/me') - .get() - .then((res) => { - console.log(res); - }).catch((err) => { - console.log(err); - }); + .api("/me") + .get() + .then((res) => { + console.log(res); + }) + .catch((err) => { + console.log(err); + }); ``` ## Callback based calling @@ -41,9 +42,7 @@ client Getting user details by passing `callback`, ```typescript -client - .api('/me') - .get((err, res, rawResponse) => { - console.log(res); - }); +client.api("/me").get((err, res) => { + console.log(res); +}); ``` diff --git a/package-lock.json b/package-lock.json index 8cd2c90ae..e0959d8d0 100644 --- a/package-lock.json +++ b/package-lock.json @@ -33,17 +33,6 @@ "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" - } - } } }, "@babel/generator": { @@ -774,17 +763,6 @@ "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" - } - } } }, "@babel/types": { @@ -820,9 +798,9 @@ "dev": true }, "@types/node": { - "version": "11.13.9", - "resolved": "https://registry.npmjs.org/@types/node/-/node-11.13.9.tgz", - "integrity": "sha512-NJ4yuEVw5podZbINp3tEqUIImMSAEHaCXRiWCf3KC32l6hIKf0iPJEh2uZdT0fELfRYk310yLmMXqy2leZQUbg==", + "version": "11.13.11", + "resolved": "https://registry.npmjs.org/@types/node/-/node-11.13.11.tgz", + "integrity": "sha512-blLeR+KIy26km1OU8yTLUlSyVCOvT6+wPq/77tIA+uSHHa4yYQosn+bbaJqPtWId0wjVClUtD7aXzDbZeKWqig==", "dev": true }, "@types/normalize-package-data": { @@ -1058,14 +1036,14 @@ "dev": true }, "browserslist": { - "version": "4.5.6", - "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.5.6.tgz", - "integrity": "sha512-o/hPOtbU9oX507lIqon+UvPYqpx3mHc8cV3QemSBTXwkG8gSQSK6UKvXcE/DcleU3+A59XTUHyCvZ5qGy8xVAg==", + "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.30000963", - "electron-to-chromium": "^1.3.127", - "node-releases": "^1.1.17" + "caniuse-lite": "^1.0.30000967", + "electron-to-chromium": "^1.3.133", + "node-releases": "^1.1.19" } }, "buffer-from": { @@ -1128,9 +1106,9 @@ "dev": true }, "caniuse-lite": { - "version": "1.0.30000965", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30000965.tgz", - "integrity": "sha512-BpMi+Aq8AgNjjrfornip07/BTUN65CTCe+fmZJxnmnL9CUZlPqtLIRdC6pgxMFOohg4yf/f775f/NE4AZeoIDA==", + "version": "1.0.30000969", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30000969.tgz", + "integrity": "sha512-Kus0yxkoAJgVc0bax7S4gLSlFifCa7MnSZL9p9VuS/HIKEL4seaqh28KIQAAO50cD/rJ5CiJkJFapkdDAlhFxQ==", "dev": true }, "chai": { @@ -1367,21 +1345,14 @@ "integrity": "sha1-Z29us8OZl8LuGsOpJP1hJHSPV40=", "dev": true }, - "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==", + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/core-js-compat/-/core-js-compat-3.1.1.tgz", + "integrity": "sha512-RH3kv8NFovFRMdeTEUgu8nMquEWKEVttOY3JFi8mN75sg72zygPqWbpWNTUw4JYEU43562tlzhdWsWqXmdFAnQ==", "dev": true, "requires": { - "browserslist": "^4.5.4", - "core-js": "3.0.1", - "core-js-pure": "3.0.1", + "browserslist": "^4.6.0", + "core-js-pure": "3.1.1", "semver": "^6.0.0" }, "dependencies": { @@ -1394,9 +1365,9 @@ } }, "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==", + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/core-js-pure/-/core-js-pure-3.1.1.tgz", + "integrity": "sha512-jH3ZJ0CJ0wwDvWY0olbOComLo6tbWg4kE2x0j4+wlqYnofwF9mYm98YvADuENUzGw69IddmWFCF1FQ2S0jP96A==", "dev": true }, "core-util-is": { @@ -1406,14 +1377,14 @@ "dev": true }, "cosmiconfig": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/cosmiconfig/-/cosmiconfig-5.2.0.tgz", - "integrity": "sha512-nxt+Nfc3JAqf4WIWd0jXLjTJZmsPLrA9DDc4nRw2KFJQJK7DNooqSXrNI7tzLG50CF8axczly5UV929tBmh/7g==", + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/cosmiconfig/-/cosmiconfig-5.2.1.tgz", + "integrity": "sha512-H65gsXo1SKjf8zmrJ67eJk8aIRKV5ff2D4uKZIBZShbhGSpEmsQOPW/SKMKYhSTrqR7ufy6RP69rPogdaPh/kA==", "dev": true, "requires": { "import-fresh": "^2.0.0", "is-directory": "^0.3.1", - "js-yaml": "^3.13.0", + "js-yaml": "^3.13.1", "parse-json": "^4.0.0" } }, @@ -1437,9 +1408,9 @@ "dev": true }, "debug": { - "version": "3.2.6", - "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.6.tgz", - "integrity": "sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ==", + "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" @@ -1543,9 +1514,9 @@ "dev": true }, "electron-to-chromium": { - "version": "1.3.130", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.130.tgz", - "integrity": "sha512-UY2DI+gsnqGtQJqO8wXN0DnpJY+29FwJafACj0h18ZShn5besKnrRq6+lXWUbKzdxw92QQcnTqRLgNByOKXcUg==", + "version": "1.3.135", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.135.tgz", + "integrity": "sha512-xXLNstRdVsisPF3pL3H9TVZo2XkMILfqtD6RiWIUmDK2sFX1Bjwqmd8LBp0Kuo2FgKO63JXPoEVGm8WyYdwP0Q==", "dev": true }, "elegant-spinner": { @@ -1940,9 +1911,9 @@ "dev": true }, "glob": { - "version": "7.1.3", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.3.tgz", - "integrity": "sha512-vcfuiIxogLV4DlGBHIUOwI0IbrJ8HWPc4MU7HzviGeNho/UJDfi6B5p3sHeWIQ0KGIU0Jpxi5ZHxemQfLkkAwQ==", + "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", @@ -2061,9 +2032,9 @@ "dev": true }, "husky": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/husky/-/husky-2.2.0.tgz", - "integrity": "sha512-lG33E7zq6v//H/DQIojPEi1ZL9ebPFt3MxUMD8MR0lrS2ljEPiuUUxlziKIs/o9EafF0chL7bAtLQkcPvXmdnA==", + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/husky/-/husky-2.3.0.tgz", + "integrity": "sha512-A/ZQSEILoq+mQM3yC3RIBSaw1bYXdkKnyyKVSUiJl+iBjVZc5LQEXdGY1ZjrDxC4IzfRPiJ0IqzEQGCN5TQa/A==", "dev": true, "requires": { "cosmiconfig": "^5.2.0", @@ -2073,9 +2044,9 @@ "is-ci": "^2.0.0", "pkg-dir": "^4.1.0", "please-upgrade-node": "^3.1.1", - "read-pkg": "^5.0.0", + "read-pkg": "^5.1.1", "run-node": "^1.0.0", - "slash": "^2.0.0" + "slash": "^3.0.0" } }, "iconv-lite": { @@ -2483,14 +2454,14 @@ } }, "lint-staged": { - "version": "8.1.5", - "resolved": "https://registry.npmjs.org/lint-staged/-/lint-staged-8.1.5.tgz", - "integrity": "sha512-e5ZavfnSLcBJE1BTzRTqw6ly8OkqVyO3GL2M6teSmTBYQ/2BuueD5GIt2RPsP31u/vjKdexUyDCxSyK75q4BDA==", + "version": "8.1.7", + "resolved": "https://registry.npmjs.org/lint-staged/-/lint-staged-8.1.7.tgz", + "integrity": "sha512-egT0goFhIFoOGk6rasPngTFh2qDqxZddM0PwI58oi66RxCDcn5uDwxmiasWIF0qGnchHSYVJ8HPRD5LrFo7TKA==", "dev": true, "requires": { "chalk": "^2.3.1", "commander": "^2.14.1", - "cosmiconfig": "^5.0.2", + "cosmiconfig": "^5.2.0", "debug": "^3.1.0", "dedent": "^0.7.0", "del": "^3.0.0", @@ -2512,7 +2483,18 @@ "staged-git-files": "1.1.2", "string-argv": "^0.0.2", "stringify-object": "^3.2.2", - "yup": "^0.26.10" + "yup": "^0.27.0" + }, + "dependencies": { + "debug": { + "version": "3.2.6", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.6.tgz", + "integrity": "sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ==", + "dev": true, + "requires": { + "ms": "^2.1.1" + } + } } }, "listr": { @@ -2847,6 +2829,29 @@ "yargs-unparser": "1.5.0" }, "dependencies": { + "debug": { + "version": "3.2.6", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.6.tgz", + "integrity": "sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ==", + "dev": true, + "requires": { + "ms": "^2.1.1" + } + }, + "glob": { + "version": "7.1.3", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.3.tgz", + "integrity": "sha512-vcfuiIxogLV4DlGBHIUOwI0IbrJ8HWPc4MU7HzviGeNho/UJDfi6B5p3sHeWIQ0KGIU0Jpxi5ZHxemQfLkkAwQ==", + "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" + } + }, "supports-color": { "version": "6.0.0", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-6.0.0.tgz", @@ -2919,9 +2924,9 @@ } }, "node-releases": { - "version": "1.1.17", - "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-1.1.17.tgz", - "integrity": "sha512-/SCjetyta1m7YXLgtACZGDYJdCSIBAWorDWkGCGZlydP2Ll7J48l7j/JxNYZ+xsgSPbWfdulVS/aY+GdjUsQ7Q==", + "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" @@ -3232,9 +3237,9 @@ "dev": true }, "prettier": { - "version": "1.17.0", - "resolved": "https://registry.npmjs.org/prettier/-/prettier-1.17.0.tgz", - "integrity": "sha512-sXe5lSt2WQlCbydGETgfm1YBShgOX4HxQkFPvbxkcwgDvGDeqVau8h+12+lmSVlP3rHPz0oavfddSZg/q+Szjw==", + "version": "1.17.1", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-1.17.1.tgz", + "integrity": "sha512-TzGRNvuUSmPgwivDqkZ9tM/qTGW9hqDKWOE9YHiyQdixlKbv7kvEqsmDPrcHJTKwthU774TQwZXVtaQ/mMsvjg==", "dev": true }, "private": { @@ -3290,17 +3295,6 @@ "safe-buffer": "~5.1.1", "string_decoder": "~1.1.1", "util-deprecate": "~1.0.1" - }, - "dependencies": { - "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==", - "dev": true, - "requires": { - "safe-buffer": "~5.1.0" - } - } } }, "regenerate": { @@ -3310,9 +3304,9 @@ "dev": true }, "regenerate-unicode-properties": { - "version": "8.0.2", - "resolved": "https://registry.npmjs.org/regenerate-unicode-properties/-/regenerate-unicode-properties-8.0.2.tgz", - "integrity": "sha512-SbA/iNrBUf6Pv2zU8Ekv1Qbhv92yxL4hiDa2siuxs4KKn4oOoMDHXjAf7+Nz9qinUQ46B1LcWEi/PhJfPWpZWQ==", + "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" @@ -3343,9 +3337,9 @@ } }, "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==", + "version": "0.1.8", + "resolved": "https://registry.npmjs.org/regexp-tree/-/regexp-tree-0.1.8.tgz", + "integrity": "sha512-9ASu7tuCKzdFa2YKfJmnmlilFrIJ8HFfE6MCs4aDLUw4gTBAaNwTTx/gw8Qo97fsV+UTVQXTmz9sHByeC8sKZg==", "dev": true }, "regexpu-core": { @@ -3410,9 +3404,9 @@ "dev": true }, "resolve": { - "version": "1.10.1", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.10.1.tgz", - "integrity": "sha512-KuIe4mf++td/eFb6wkaPbMDnP6kObCaEtIDuHOUED6MNUo4K670KZUHuuvYPZDxNF0WVLw49n06M2m2dXphEzA==", + "version": "1.11.0", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.11.0.tgz", + "integrity": "sha512-WL2pBDjqT6pGUNSUzMw00o4T7If+z4H2x3Gz893WoUQ5KW8Vr9txp00ykiP16VBaZF5+j/OcXJHZ9+PCvdiDKw==", "dev": true, "requires": { "path-parse": "^1.0.6" @@ -3456,14 +3450,22 @@ } }, "rollup": { - "version": "1.10.1", - "resolved": "https://registry.npmjs.org/rollup/-/rollup-1.10.1.tgz", - "integrity": "sha512-pW353tmBE7QP622ITkGxtqF0d5gSRCVPD9xqM+fcPjudeZfoXMFW2sCzsTe2TU/zU1xamIjiS9xuFCPVT9fESw==", + "version": "1.12.3", + "resolved": "https://registry.npmjs.org/rollup/-/rollup-1.12.3.tgz", + "integrity": "sha512-ueWhPijWN+GaPgD3l77hXih/gcDXmYph6sWeQegwBYtaqAE834e8u+MC2wT6FKIUsz1DBOyOXAQXUZB+rjWDoQ==", "dev": true, "requires": { "@types/estree": "0.0.39", - "@types/node": "^11.13.5", + "@types/node": "^12.0.2", "acorn": "^6.1.1" + }, + "dependencies": { + "@types/node": { + "version": "12.0.2", + "resolved": "https://registry.npmjs.org/@types/node/-/node-12.0.2.tgz", + "integrity": "sha512-5tabW/i+9mhrfEOUcLDu2xBPsHJ+X5Orqy9FKpale3SjDA17j5AEpYq5vfy3oAeAHGcvANRCO3NV3d2D6q3NiA==", + "dev": true + } } }, "rollup-plugin-babel": { @@ -3489,9 +3491,9 @@ } }, "rollup-plugin-node-resolve": { - "version": "4.2.3", - "resolved": "https://registry.npmjs.org/rollup-plugin-node-resolve/-/rollup-plugin-node-resolve-4.2.3.tgz", - "integrity": "sha512-r+WaesPzdGEynpLZLALFEDugA4ACa5zn7bc/+LVX4vAXQQ8IgDHv0xfsSvJ8tDXUtprfBtrDtRFg27ifKjcJTg==", + "version": "4.2.4", + "resolved": "https://registry.npmjs.org/rollup-plugin-node-resolve/-/rollup-plugin-node-resolve-4.2.4.tgz", + "integrity": "sha512-t/64I6l7fZ9BxqD3XlX4ZeO6+5RLKyfpwE2CiPNUKa+GocPlQhf/C208ou8y3AwtNsc6bjSk/8/6y/YAyxCIvw==", "dev": true, "requires": { "@types/resolve": "0.0.8", @@ -3513,9 +3515,9 @@ } }, "rollup-pluginutils": { - "version": "2.6.0", - "resolved": "https://registry.npmjs.org/rollup-pluginutils/-/rollup-pluginutils-2.6.0.tgz", - "integrity": "sha512-aGQwspEF8oPKvg37u3p7h0cYNwmJR1sCBMZGZ5b9qy8HGtETknqjzcxrDRrcAnJNXN18lBH4Q9vZYth/p4n8jQ==", + "version": "2.7.1", + "resolved": "https://registry.npmjs.org/rollup-pluginutils/-/rollup-pluginutils-2.7.1.tgz", + "integrity": "sha512-3nRf3buQGR9qz/IsSzhZAJyoK663kzseps8itkYHr+Z7ESuaffEPfgRinxbCRA0pf0gzLqkNKkSb8aNVTq75NA==", "dev": true, "requires": { "estree-walker": "^0.6.0", @@ -3529,9 +3531,9 @@ "dev": true }, "rxjs": { - "version": "6.5.1", - "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-6.5.1.tgz", - "integrity": "sha512-y0j31WJc83wPu31vS1VlAFW5JGrnGC+j+TtGAa1fRQphy48+fDYiDmX8tjGloToEsMkxnouOg/1IzXGKkJnZMg==", + "version": "6.5.2", + "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-6.5.2.tgz", + "integrity": "sha512-HUb7j3kvb7p7eCUHE3FqjoDsC1xfZQ4AHFWfTKSpZ+sAhhz5X1WX0ZuUqWbzB2QhSLp3DoLUG+hMdEDKqWo2Zg==", "dev": true, "requires": { "tslib": "^1.9.0" @@ -3626,29 +3628,18 @@ "dev": true }, "simple-git": { - "version": "1.110.0", - "resolved": "https://registry.npmjs.org/simple-git/-/simple-git-1.110.0.tgz", - "integrity": "sha512-UYY0rQkknk0P5eb+KW+03F4TevZ9ou0H+LoGaj7iiVgpnZH4wdj/HTViy/1tNNkmIPcmtxuBqXWiYt2YwlRKOQ==", + "version": "1.113.0", + "resolved": "https://registry.npmjs.org/simple-git/-/simple-git-1.113.0.tgz", + "integrity": "sha512-i9WVsrK2u0G/cASI9nh7voxOk9mhanWY9eGtWBDSYql6m49Yk5/Fan6uZsDr/xmzv8n+eQ8ahKCoEr8cvU3h+g==", "dev": true, "requires": { "debug": "^4.0.1" - }, - "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" - } - } } }, "slash": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/slash/-/slash-2.0.0.tgz", - "integrity": "sha512-ZYKh3Wh2z1PpEXWr0MpSBZ0V6mZHAQfYevttO11c51CaWjGTaadiKZ+wVt1PbMlDV5qhMFslpZCemhwOK7C89A==", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz", + "integrity": "sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==", "dev": true }, "slice-ansi": { @@ -3919,6 +3910,15 @@ "strip-ansi": "^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==", + "dev": true, + "requires": { + "safe-buffer": "~5.1.0" + } + }, "stringify-object": { "version": "3.3.0", "resolved": "https://registry.npmjs.org/stringify-object/-/stringify-object-3.3.0.tgz", @@ -3967,9 +3967,9 @@ "dev": true }, "synchronous-promise": { - "version": "2.0.7", - "resolved": "https://registry.npmjs.org/synchronous-promise/-/synchronous-promise-2.0.7.tgz", - "integrity": "sha512-16GbgwTmFMYFyQMLvtQjvNWh30dsFe1cAW5Fg1wm5+dg84L9Pe36mftsIRU95/W2YsISxsz/xq4VB23sqpgb/A==", + "version": "2.0.8", + "resolved": "https://registry.npmjs.org/synchronous-promise/-/synchronous-promise-2.0.8.tgz", + "integrity": "sha512-xYavZtFC1vKgJu0AOSYdrLeikNCsNwmUeZaV1XF9cMqEhBVVxLq6rEbYzOGrF1MV2MNPkhsJqqiXuQ4a76CEUg==", "dev": true }, "terser": { @@ -4507,34 +4507,17 @@ } }, "yup": { - "version": "0.26.10", - "resolved": "https://registry.npmjs.org/yup/-/yup-0.26.10.tgz", - "integrity": "sha512-keuNEbNSnsOTOuGCt3UJW69jDE3O4P+UHAakO7vSeFMnjaitcmlbij/a3oNb9g1Y1KvSKH/7O1R2PQ4m4TRylw==", + "version": "0.27.0", + "resolved": "https://registry.npmjs.org/yup/-/yup-0.27.0.tgz", + "integrity": "sha512-v1yFnE4+u9za42gG/b/081E7uNW9mUj3qtkmelLbW5YPROZzSH/KUUyJu9Wt8vxFJcT9otL/eZopS0YK1L5yPQ==", "dev": true, "requires": { - "@babel/runtime": "7.0.0", + "@babel/runtime": "^7.0.0", "fn-name": "~2.0.1", - "lodash": "^4.17.10", + "lodash": "^4.17.11", "property-expr": "^1.5.0", - "synchronous-promise": "^2.0.5", + "synchronous-promise": "^2.0.6", "toposort": "^2.0.2" - }, - "dependencies": { - "@babel/runtime": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.0.0.tgz", - "integrity": "sha512-7hGhzlcmg01CvH1EHdSPVXYX1aJ8KCEyz6I9xYIi/asDtzBPMyMhVibhM/K6g/5qnKBwjZtp10bNZIEFTRW1MA==", - "dev": true, - "requires": { - "regenerator-runtime": "^0.12.0" - } - }, - "regenerator-runtime": { - "version": "0.12.1", - "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.12.1.tgz", - "integrity": "sha512-odxIc1/vDlo4iZcfXqRYFj0vpXFNoGdKMAUieAlFYO6m/nl5e9KR/beGf41z4a1FI+aQgtjhuaSlDxQ0hmkrHg==", - "dev": true - } } } } diff --git a/spec/package-lock.json b/spec/package-lock.json index af419b0ff..9d16f3dd4 100644 --- a/spec/package-lock.json +++ b/spec/package-lock.json @@ -19,6 +19,11 @@ "integrity": "sha512-FJt1O2lIHUazcmh+ROZaD2mAea6q6UkZCPbTCIlYwskyQJL+il+x+fJbIPLHy1c+xSh6HvZUV0R8O8RKDS3KAg==", "dev": true }, + "@microsoft/microsoft-graph-types-beta": { + "version": "github:microsoftgraph/msgraph-typescript-typings#6d0c54f38a49f889df1c0a8225733aef22c0bb88", + "from": "github:microsoftgraph/msgraph-typescript-typings#beta", + "dev": true + }, "@types/chai": { "version": "4.1.7", "resolved": "https://registry.npmjs.org/@types/chai/-/chai-4.1.7.tgz", diff --git a/src/GraphResponseHandler.ts b/src/GraphResponseHandler.ts index 0a0bfbd3f..1065ccb8b 100644 --- a/src/GraphResponseHandler.ts +++ b/src/GraphResponseHandler.ts @@ -96,8 +96,7 @@ export class GraphResponseHandler { * @returns A promise that resolves to the converted response content */ private static async convertResponse(rawResponse: Response, responseType?: ResponseType): Promise { - const clonedRawResponse: Response = rawResponse.clone(); - if (clonedRawResponse.status === 204) { + if (rawResponse.status === 204) { // NO CONTENT return Promise.resolve(); } @@ -105,37 +104,37 @@ export class GraphResponseHandler { try { switch (responseType) { case ResponseType.ARRAYBUFFER: - responseValue = await clonedRawResponse.arrayBuffer(); + responseValue = await rawResponse.arrayBuffer(); break; case ResponseType.BLOB: - responseValue = await clonedRawResponse.blob(); + responseValue = await rawResponse.blob(); break; case ResponseType.DOCUMENT: - responseValue = await GraphResponseHandler.parseDocumentResponse(clonedRawResponse, DocumentType.TEXT_XML); + responseValue = await GraphResponseHandler.parseDocumentResponse(rawResponse, DocumentType.TEXT_XML); break; case ResponseType.JSON: - responseValue = await clonedRawResponse.json(); + responseValue = await rawResponse.json(); break; case ResponseType.STREAM: - responseValue = await Promise.resolve(clonedRawResponse.body); + responseValue = await Promise.resolve(rawResponse.body); break; case ResponseType.TEXT: - responseValue = await clonedRawResponse.text(); + responseValue = await rawResponse.text(); break; default: - const contentType = clonedRawResponse.headers.get("Content-type"); + const contentType = rawResponse.headers.get("Content-type"); if (contentType !== null) { const mimeType = contentType.split(";")[0]; if (new RegExp(ContentTypeRegexStr.DOCUMENT).test(mimeType)) { - responseValue = await GraphResponseHandler.parseDocumentResponse(clonedRawResponse, mimeType as DocumentType); + responseValue = await GraphResponseHandler.parseDocumentResponse(rawResponse, mimeType as DocumentType); } else if (new RegExp(ContentTypeRegexStr.IMAGE).test(mimeType)) { - responseValue = clonedRawResponse.blob(); + responseValue = rawResponse.blob(); } else if (mimeType === ContentType.TEXT_PLAIN) { - responseValue = await clonedRawResponse.text(); + responseValue = await rawResponse.text(); } else if (mimeType === ContentType.APPLICATION_JSON) { - responseValue = await clonedRawResponse.json(); + responseValue = await rawResponse.json(); } else { - responseValue = Promise.resolve(clonedRawResponse.body); + responseValue = Promise.resolve(rawResponse.body); } } else { /** @@ -149,7 +148,7 @@ export class GraphResponseHandler { * * So assuming it as a stream type so returning the body. */ - responseValue = Promise.resolve(clonedRawResponse.body); + responseValue = Promise.resolve(rawResponse.body); } break; } @@ -178,7 +177,7 @@ export class GraphResponseHandler { if (rawResponse.ok) { // Status Code 2XX if (typeof callback === "function") { - callback(null, response, rawResponse); + callback(null, response); } else { return response; } From 47093b1523795a71fdb633ed5f2307b5425e26b8 Mon Sep 17 00:00:00 2001 From: Muthurathinam Date: Fri, 24 May 2019 14:50:11 +0530 Subject: [PATCH 08/23] Renamed MSALAuthenticationProvider and MSALAuthenticationProviderOptions to ImplicitMSALAuthenticationProvider and ImplicitMSALAuthenticationProviderOptions --- README.md | 16 +++++++------- docs/CreatingClientInstance.md | 6 ++--- docs/CustomMiddlewareChain.md | 6 ++--- docs/GettingRawResponse.md | 2 +- samples/browser/src/main.js | 4 ++-- .../AuthenticationHandlerOptions.ts | 4 ++-- ...licitMSALAuthenticationProviderOptions.ts} | 6 ++--- ... => ImplicitMSALAuthenticationProvider.ts} | 22 +++++++++---------- ...licitMSALAuthenticationProviderOptions.ts} | 10 ++++----- ... => ImplicitMSALAuthenticationProvider.ts} | 22 +++++++++---------- src/browser/index.ts | 4 ++-- 11 files changed, 51 insertions(+), 51 deletions(-) rename spec/middleware/{MSALAuthenticationProviderOptions.ts => ImplicitMSALAuthenticationProviderOptions.ts} (69%) rename src/{MSALAuthenticationProvider.ts => ImplicitMSALAuthenticationProvider.ts} (75%) rename src/{MSALAuthenticationProviderOptions.ts => ImplicitMSALAuthenticationProviderOptions.ts} (67%) rename src/browser/{MSALAuthenticationProvider.ts => ImplicitMSALAuthenticationProvider.ts} (72%) diff --git a/README.md b/README.md index 2e837d811..b7b878fcb 100644 --- a/README.md +++ b/README.md @@ -55,11 +55,11 @@ Register your application to use Microsoft Graph API using one of the following ### 2. Authenticate for the Microsoft Graph service -The Microsoft Graph JavaScript Client Library has an adapter implementation ([MSALAuthenticationProvider](src/MSALAuthenticationProvider.ts)) for [MSAL](https://github.com/AzureAD/microsoft-authentication-library-for-js/tree/dev/lib/msal-core) (Microsoft Authentication Library) which takes care of getting the `accessToken`. MSAL library does not ship with this library, user has to include it externally (For including MSAL, refer [this](https://github.com/AzureAD/microsoft-authentication-library-for-js/tree/dev/lib/msal-core#installation)). +The Microsoft Graph JavaScript Client Library has an adapter implementation ([ImplicitMSALAuthenticationProvider](src/ImplicitMSALAuthenticationProvider.ts)) for [MSAL](https://github.com/AzureAD/microsoft-authentication-library-for-js/tree/dev/lib/msal-core) (Microsoft Authentication Library) which takes care of getting the `accessToken`. MSAL library does not ship with this library, user has to include it externally (For including MSAL, refer [this](https://github.com/AzureAD/microsoft-authentication-library-for-js/tree/dev/lib/msal-core#installation)). > **Important Note:** MSAL is supported only for frontend applications, for server-side authentication you have to implement your own AuthenticationProvider. Refer implementing [Custom Authentication Provider](./docs/CustomAuthenticationProvider.md). -#### Creating an instance of MSALAuthenticationProvider in browser environment +#### Creating an instance of ImplicitMSALAuthenticationProvider in browser environment Refer devDependencies in [package.json](./package.json) for the compatible msal version and update that version in below. @@ -81,11 +81,11 @@ const graphScopes = ["user.read", "mail.send"]; // An array of graph scopes // Important Note: This library implements loginPopup and acquireTokenPopup flow, remember this while initializing the msal // Initialize the MSAL @see https://github.com/AzureAD/microsoft-authentication-library-for-js#1-instantiate-the-useragentapplication const msalInstance = new Msal.UserAgentApplication(msalConfig); -const options = new MicrosoftGraph.MSALAuthenticationProviderOptions(graphScopes); -const authProvider = new MicrosoftGraph.MSALAuthenticationProvider(msalInstance, options); +const options = new MicrosoftGraph.ImplicitMSALAuthenticationProviderOptions(graphScopes); +const authProvider = new MicrosoftGraph.ImplicitMSALAuthenticationProvider(msalInstance, options); ``` -#### Creating an instance of MSALAuthenticationProvider in node environment +#### Creating an instance of ImplicitMSALAuthenticationProvider in node environment Refer devDependencies in [package.json](./package.json) for the compatible msal version and update that version in below. @@ -96,7 +96,7 @@ npm install msal@ ```typescript import { UserAgentApplication } from "msal"; -import { MSALAuthenticationProvider } from "./node_modules/@microsoft/microsoft-graph-client/lib/src/MSALAuthenticationProvider"; +import { ImplicitMSALAuthenticationProvider } from "./node_modules/@microsoft/microsoft-graph-client/lib/src/ImplicitMSALAuthenticationProvider"; // An Optional options for initializing the MSAL @see https://github.com/AzureAD/microsoft-authentication-library-for-js/wiki/MSAL-basics#configuration-options const msalConfig = { @@ -110,8 +110,8 @@ const graphScopes = ["user.read", "mail.send"]; // An array of graph scopes // Important Note: This library implements loginPopup and acquireTokenPopup flow, remember this while initializing the msal // Initialize the MSAL @see https://github.com/AzureAD/microsoft-authentication-library-for-js#1-instantiate-the-useragentapplication const msalInstance = new UserAgentApplication(msalConfig); -const options = new MicrosoftGraph.MSALAuthenticationProviderOptions(graphScopes); -const authProvider = new MSALAuthenticationProvider(msalInstance, options); +const options = new MicrosoftGraph.ImplicitMSALAuthenticationProviderOptions(graphScopes); +const authProvider = new ImplicitMSALAuthenticationProvider(msalInstance, options); ``` User can integrate own preferred authentication library by implementing `IAuthenticationProvider` interface. Refer implementing [Custom Authentication Provider](./docs/CustomAuthenticationProvider.md). diff --git a/docs/CreatingClientInstance.md b/docs/CreatingClientInstance.md index 7aa92f8f3..945e790fa 100644 --- a/docs/CreatingClientInstance.md +++ b/docs/CreatingClientInstance.md @@ -10,12 +10,12 @@ In order to instantiate a Client object, one has to pass in the `authProvider` o Pass an instance of a class which implements [AuthenticationProvider](../src/IAuthenticationProvider.ts) interface as `authProvider` in [ClientOptions](../src/IClientOptions.ts), which will instantiate the Client with default set of middleware chain. -Library is shipped with one such authentication provider named [MSALAuthenticationProvider](../src/MSALAuthenticationProvider.ts). This MSALAuthenticationProvider depends on an authentication library [msal.js](https://github.com/AzureAD/microsoft-authentication-library-for-js) which is not shipped along with the library, one has to externally include msal.js to use MSALAuthenticationProvider. +Library is shipped with one such authentication provider named [ImplicitMSALAuthenticationProvider](../src/ImplicitMSALAuthenticationProvider.ts). This ImplicitMSALAuthenticationProvider depends on an authentication library [msal.js](https://github.com/AzureAD/microsoft-authentication-library-for-js) which is not shipped along with the library, one has to externally include msal.js to use ImplicitMSALAuthenticationProvider. ```typescript -// Instantiating Client with MSALAuthenticationProvider +// Instantiating Client with ImplicitMSALAuthenticationProvider let clientOptions: ClientOptions = { - authProvider: new MSALAuthenticationProvider(, , ) + authProvider: new ImplicitMSALAuthenticationProvider(, , ) }; const client = Client.initWithMiddleware(clientOptions); ``` diff --git a/docs/CustomMiddlewareChain.md b/docs/CustomMiddlewareChain.md index 0e0acdb32..e42bdd59c 100644 --- a/docs/CustomMiddlewareChain.md +++ b/docs/CustomMiddlewareChain.md @@ -68,14 +68,14 @@ Can use own middlewares and the ones shipped with the library [[Here](../src/mid Using AuthenticationHandler [one shipped with the library] and MyLoggingHandler, and MyHttpMessageHandler [custom ones] to create a middleware chain here. -NOTE: Instead of MSALAuthenticationProvider, one can provide his own Authentication Handler. For more about using custom authentication provider, refer [here](./CustomAuthenticationProvider.md). +NOTE: Instead of ImplicitMSALAuthenticationProvider, one can provide his own Authentication Handler. For more about using custom authentication provider, refer [here](./CustomAuthenticationProvider.md). ```typescript -import { MSALAuthenticationProvider } from "@microsoft/microsoft-graph-client"; +import { ImplicitMSALAuthenticationProvider } from "@microsoft/microsoft-graph-client"; import { MyLoggingHandler } from "./MyLoggingHandler"; import { MyHttpMessageHandler } from "./MyHttpMessageHandler"; -let authProvider = new MSALAuthenticationProvider("", ["user.read"]); +let authProvider = new ImplicitMSALAuthenticationProvider("", ["user.read"]); let authenticationHandler = new AuthenticationHandler(authProvider); let myLoggingHandler = new MyLoggingHandler(); let myHttpMessageHandler = new MyHttpMessageHandler(); diff --git a/docs/GettingRawResponse.md b/docs/GettingRawResponse.md index 5f7940c6a..142cd063e 100644 --- a/docs/GettingRawResponse.md +++ b/docs/GettingRawResponse.md @@ -27,6 +27,6 @@ client .select("displayName") .responseType(ResponseType.RAW) .get((error, rawResponse) => { - console.log(rawResponse) + console.log(rawResponse); }); ``` diff --git a/samples/browser/src/main.js b/samples/browser/src/main.js index ce6438bf9..50a199974 100644 --- a/samples/browser/src/main.js +++ b/samples/browser/src/main.js @@ -17,8 +17,8 @@ const init = async () => { }; var msalInstance = new Msal.UserAgentApplication(msalConfig); - const msalOptions = new MicrosoftGraph.MSALAuthenticationProviderOptions(scopes); - const msalProvider = new MicrosoftGraph.MSALAuthenticationProvider(msalInstance, msalOptions); + const msalOptions = new MicrosoftGraph.ImplicitMSALAuthenticationProviderOptions(scopes); + const msalProvider = new MicrosoftGraph.ImplicitMSALAuthenticationProvider(msalInstance, msalOptions); client = MicrosoftGraph.Client.initWithMiddleware({ debugLogging: true, authProvider: msalProvider, diff --git a/spec/middleware/AuthenticationHandlerOptions.ts b/spec/middleware/AuthenticationHandlerOptions.ts index 1bf0d6cb6..00564aa0b 100644 --- a/spec/middleware/AuthenticationHandlerOptions.ts +++ b/spec/middleware/AuthenticationHandlerOptions.ts @@ -7,13 +7,13 @@ import { assert } from "chai"; +import { ImplicitMSALAuthenticationProviderOptions } from "../../src/ImplicitMSALAuthenticationProviderOptions"; import { AuthenticationHandlerOptions } from "../../src/middleware/options/AuthenticationHandlerOptions"; -import { MSALAuthenticationProviderOptions } from "../../src/MSALAuthenticationProviderOptions"; import { DummyAuthenticationProvider } from "../DummyAuthenticationProvider"; describe("AuthenticationHandlerOptions.ts", () => { const dummyAuthProvider = new DummyAuthenticationProvider(); - const msalAuthProviderOptions = new MSALAuthenticationProviderOptions([]); + const msalAuthProviderOptions = new ImplicitMSALAuthenticationProviderOptions([]); it("Should create an instance with all the given options", () => { const options = new AuthenticationHandlerOptions(dummyAuthProvider, msalAuthProviderOptions); assert.equal(options.authenticationProvider, dummyAuthProvider); diff --git a/spec/middleware/MSALAuthenticationProviderOptions.ts b/spec/middleware/ImplicitMSALAuthenticationProviderOptions.ts similarity index 69% rename from spec/middleware/MSALAuthenticationProviderOptions.ts rename to spec/middleware/ImplicitMSALAuthenticationProviderOptions.ts index 43c025c9a..c98edc1c4 100644 --- a/spec/middleware/MSALAuthenticationProviderOptions.ts +++ b/spec/middleware/ImplicitMSALAuthenticationProviderOptions.ts @@ -7,12 +7,12 @@ import { assert } from "chai"; -import { MSALAuthenticationProviderOptions } from "../../src/MSALAuthenticationProviderOptions"; +import { ImplicitMSALAuthenticationProviderOptions } from "../../src/ImplicitMSALAuthenticationProviderOptions"; -describe("MSALAuthenticationProviderOptions.ts", () => { +describe("ImplicitMSALAuthenticationProviderOptions.ts", () => { it("Should create an instance with all the given options", () => { const scopes = ["dummy.scope"]; - const options = new MSALAuthenticationProviderOptions(scopes); + const options = new ImplicitMSALAuthenticationProviderOptions(scopes); assert.isDefined(options.scopes); assert.equal(options.scopes, scopes); }); diff --git a/src/MSALAuthenticationProvider.ts b/src/ImplicitMSALAuthenticationProvider.ts similarity index 75% rename from src/MSALAuthenticationProvider.ts rename to src/ImplicitMSALAuthenticationProvider.ts index e70e1403f..32433ebb3 100644 --- a/src/MSALAuthenticationProvider.ts +++ b/src/ImplicitMSALAuthenticationProvider.ts @@ -6,26 +6,26 @@ */ /** - * @module MSALAuthenticationProvider + * @module ImplicitMSALAuthenticationProvider */ import { AuthenticationParameters, AuthResponse, InteractionRequiredAuthError, UserAgentApplication } from "msal"; import { AuthenticationProvider } from "./IAuthenticationProvider"; import { AuthenticationProviderOptions } from "./IAuthenticationProviderOptions"; -import { MSALAuthenticationProviderOptions } from "./MSALAuthenticationProviderOptions"; +import { ImplicitMSALAuthenticationProviderOptions } from "./ImplicitMSALAuthenticationProviderOptions"; /** * @class - * Class representing MSALAuthenticationProvider + * Class representing ImplicitMSALAuthenticationProvider * @extends AuthenticationProvider */ -export class MSALAuthenticationProvider implements AuthenticationProvider { +export class ImplicitMSALAuthenticationProvider implements AuthenticationProvider { /** * @private - * A member holding an instance of MSALAuthenticationProviderOptions + * A member holding an instance of ImplicitMSALAuthenticationProviderOptions */ - private options: MSALAuthenticationProviderOptions; + private options: ImplicitMSALAuthenticationProviderOptions; /** * @private @@ -36,12 +36,12 @@ export class MSALAuthenticationProvider implements AuthenticationProvider { /** * @public * @constructor - * Creates an instance of MSALAuthenticationProvider + * Creates an instance of ImplicitMSALAuthenticationProvider * @param {UserAgentApplication} msalInstance - An instance of MSAL UserAgentApplication - * @param {MSALAuthenticationProviderOptions} options - An instance of MSALAuthenticationProviderOptions - * @returns An instance of MSALAuthenticationProvider + * @param {ImplicitMSALAuthenticationProviderOptions} options - An instance of ImplicitMSALAuthenticationProviderOptions + * @returns An instance of ImplicitMSALAuthenticationProvider */ - public constructor(msalInstance: UserAgentApplication, options: MSALAuthenticationProviderOptions) { + public constructor(msalInstance: UserAgentApplication, options: ImplicitMSALAuthenticationProviderOptions) { this.options = options; this.msalInstance = msalInstance; } @@ -54,7 +54,7 @@ export class MSALAuthenticationProvider implements AuthenticationProvider { * @returns The promise that resolves to an access token */ public async getAccessToken(authenticationProviderOptions?: AuthenticationProviderOptions): Promise { - const options: MSALAuthenticationProviderOptions = authenticationProviderOptions as MSALAuthenticationProviderOptions; + const options: ImplicitMSALAuthenticationProviderOptions = authenticationProviderOptions as ImplicitMSALAuthenticationProviderOptions; let scopes: string[]; if (typeof options !== "undefined") { scopes = options.scopes; diff --git a/src/MSALAuthenticationProviderOptions.ts b/src/ImplicitMSALAuthenticationProviderOptions.ts similarity index 67% rename from src/MSALAuthenticationProviderOptions.ts rename to src/ImplicitMSALAuthenticationProviderOptions.ts index f34b5b552..b24d1e8e7 100644 --- a/src/MSALAuthenticationProviderOptions.ts +++ b/src/ImplicitMSALAuthenticationProviderOptions.ts @@ -6,7 +6,7 @@ */ /** - * @module MSALAuthenticationProviderOptions + * @module ImplicitMSALAuthenticationProviderOptions */ import { AuthenticationProviderOptions } from "./IAuthenticationProviderOptions"; @@ -14,9 +14,9 @@ import { AuthenticationProviderOptions } from "./IAuthenticationProviderOptions" /** * @class * @implements AuthenticationProviderOptions - * Class representing MSALAuthenticationProviderOptions + * Class representing ImplicitMSALAuthenticationProviderOptions */ -export class MSALAuthenticationProviderOptions implements AuthenticationProviderOptions { +export class ImplicitMSALAuthenticationProviderOptions implements AuthenticationProviderOptions { /** * @public * A member holding array of scopes @@ -26,9 +26,9 @@ export class MSALAuthenticationProviderOptions implements AuthenticationProvider /** * @public * @constructor - * To create an instance of MSALAuthenticationProviderOptions + * To create an instance of ImplicitMSALAuthenticationProviderOptions * @param {string[]} scopes - An array of scopes - * @returns An instance of MSALAuthenticationProviderOptions + * @returns An instance of ImplicitMSALAuthenticationProviderOptions */ public constructor(scopes: string[]) { this.scopes = scopes; diff --git a/src/browser/MSALAuthenticationProvider.ts b/src/browser/ImplicitMSALAuthenticationProvider.ts similarity index 72% rename from src/browser/MSALAuthenticationProvider.ts rename to src/browser/ImplicitMSALAuthenticationProvider.ts index 55d73233a..72ef2799e 100644 --- a/src/browser/MSALAuthenticationProvider.ts +++ b/src/browser/ImplicitMSALAuthenticationProvider.ts @@ -6,12 +6,12 @@ */ /** - * @module MSALAuthenticationProvider + * @module ImplicitMSALAuthenticationProvider */ import { AuthenticationProvider } from "../IAuthenticationProvider"; import { AuthenticationProviderOptions } from "../IAuthenticationProviderOptions"; -import { MSALAuthenticationProviderOptions } from "../MSALAuthenticationProviderOptions"; +import { ImplicitMSALAuthenticationProviderOptions } from "../ImplicitMSALAuthenticationProviderOptions"; /** * @constant @@ -21,15 +21,15 @@ declare const Msal: any; /** * @class - * Class representing MSALAuthenticationProvider + * Class representing ImplicitMSALAuthenticationProvider * @extends AuthenticationProvider */ -export class MSALAuthenticationProvider implements AuthenticationProvider { +export class ImplicitMSALAuthenticationProvider implements AuthenticationProvider { /** * @private - * A member holding an instance of MSALAuthenticationProviderOptions + * A member holding an instance of ImplicitMSALAuthenticationProviderOptions */ - private options: MSALAuthenticationProviderOptions; + private options: ImplicitMSALAuthenticationProviderOptions; /** * @private @@ -40,12 +40,12 @@ export class MSALAuthenticationProvider implements AuthenticationProvider { /** * @public * @constructor - * Creates an instance of MSALAuthenticationProvider + * Creates an instance of ImplicitMSALAuthenticationProvider * @param {any} msalInstance - An instance of MSAL UserAgentApplication - * @param {MSALAuthenticationProviderOptions} options - An instance of MSALAuthenticationProviderOptions - * @returns An instance of MSALAuthenticationProvider + * @param {ImplicitMSALAuthenticationProviderOptions} options - An instance of ImplicitMSALAuthenticationProviderOptions + * @returns An instance of ImplicitMSALAuthenticationProvider */ - public constructor(msalInstance: any, options: MSALAuthenticationProviderOptions) { + public constructor(msalInstance: any, options: ImplicitMSALAuthenticationProviderOptions) { this.options = options; this.msalInstance = msalInstance; } @@ -58,7 +58,7 @@ export class MSALAuthenticationProvider implements AuthenticationProvider { * @returns The promise that resolves to an access token */ public async getAccessToken(authenticationProviderOptions?: AuthenticationProviderOptions): Promise { - const options: MSALAuthenticationProviderOptions = authenticationProviderOptions as MSALAuthenticationProviderOptions; + const options: ImplicitMSALAuthenticationProviderOptions = authenticationProviderOptions as ImplicitMSALAuthenticationProviderOptions; let scopes: string[]; if (typeof options !== "undefined") { scopes = options.scopes; diff --git a/src/browser/index.ts b/src/browser/index.ts index cd8a300ab..e96222d36 100644 --- a/src/browser/index.ts +++ b/src/browser/index.ts @@ -35,6 +35,6 @@ export * from "../IContext"; export * from "../IFetchOptions"; export * from "../IGraphRequestCallback"; export * from "../IOptions"; -export * from "./MSALAuthenticationProvider"; -export * from "../MSALAuthenticationProviderOptions"; +export * from "./ImplicitMSALAuthenticationProvider"; +export * from "../ImplicitMSALAuthenticationProviderOptions"; export * from "../ResponseType"; From 7cbe4817acb458fb984736fe308f3f515eb64e0c Mon Sep 17 00:00:00 2001 From: Muthurathinam <6259786+muthurathinam@users.noreply.github.com> Date: Fri, 24 May 2019 15:59:22 +0530 Subject: [PATCH 09/23] Update README.md --- README.md | 2 -- 1 file changed, 2 deletions(-) diff --git a/README.md b/README.md index b7b878fcb..f3a071261 100644 --- a/README.md +++ b/README.md @@ -23,8 +23,6 @@ import "isomorphic-fetch"; import { Client } from "@microsoft/microsoft-graph-client"; ``` -You will also need Promise polyfill like [es6-promise](https://github.com/stefanpenner/es6-promise) for [older Node.js](https://node.green/#ES2015-built-ins-Promise). - ### Via Script Tag Include [graph-js-sdk.js](https://cdn.jsdelivr.net/npm/@microsoft/microsoft-graph-client/lib/graph-js-sdk.js) in your HTML page. From 10df55f71e5e2ed708198df8fe5964dce0d2de9e Mon Sep 17 00:00:00 2001 From: Muthurathinam <6259786+muthurathinam@users.noreply.github.com> Date: Fri, 24 May 2019 16:01:12 +0530 Subject: [PATCH 10/23] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index f3a071261..c7f418faf 100644 --- a/README.md +++ b/README.md @@ -16,7 +16,7 @@ The Microsoft Graph JavaScript client library is a lightweight wrapper around th npm install @microsoft/microsoft-graph-client ``` -import `@microsoft/microsoft-graph-client` into your module and also you will need polyfill for fetch like [isomorphic-fetch](https://github.com/matthew-andrews/isomorphic-fetch). +import `@microsoft/microsoft-graph-client` into your module and also you will need polyfill for fetch like [node-fetch](https://github.com/bitinn/node-fetch). ```typescript import "isomorphic-fetch"; From c2cb47a06b26f90a3d56c8ba8243a7b1846243fa Mon Sep 17 00:00:00 2001 From: Muthurathinam Date: Fri, 24 May 2019 16:11:13 +0530 Subject: [PATCH 11/23] Removing unnecessary dependencies --- package-lock.json | 18 ++++++++++-------- package.json | 3 +-- 2 files changed, 11 insertions(+), 10 deletions(-) diff --git a/package-lock.json b/package-lock.json index e0959d8d0..f47d89d14 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1535,6 +1535,7 @@ "version": "0.1.12", "resolved": "https://registry.npmjs.org/encoding/-/encoding-0.1.12.tgz", "integrity": "sha1-U4tm8+5izRq1HsMjgp0flIDHS+s=", + "dev": true, "requires": { "iconv-lite": "~0.4.13" } @@ -1582,11 +1583,6 @@ "is-symbol": "^1.0.2" } }, - "es6-promise": { - "version": "4.2.6", - "resolved": "https://registry.npmjs.org/es6-promise/-/es6-promise-4.2.6.tgz", - "integrity": "sha512-aRVgGdnmW2OiySVPUC9e6m+plolMAJKjZnQlCwNSuK5yQ0JN61DZSO1X1Ufd1foqWRAlig0rhduTCHe7sVtK5Q==" - }, "escape-string-regexp": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", @@ -2053,6 +2049,7 @@ "version": "0.4.24", "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz", "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==", + "dev": true, "requires": { "safer-buffer": ">= 2.1.2 < 3" } @@ -2330,7 +2327,8 @@ "is-stream": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-1.1.0.tgz", - "integrity": "sha1-EtSj3U5o4Lec6428hBc66A2RykQ=" + "integrity": "sha1-EtSj3U5o4Lec6428hBc66A2RykQ=", + "dev": true }, "is-symbol": { "version": "1.0.2", @@ -2369,6 +2367,7 @@ "version": "2.2.1", "resolved": "https://registry.npmjs.org/isomorphic-fetch/-/isomorphic-fetch-2.2.1.tgz", "integrity": "sha1-YRrhrPFPXoH3KVB0coGf6XM1WKk=", + "dev": true, "requires": { "node-fetch": "^1.0.1", "whatwg-fetch": ">=0.10.0" @@ -2918,6 +2917,7 @@ "version": "1.7.3", "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-1.7.3.tgz", "integrity": "sha512-NhZ4CsKx7cYm2vSrBAr2PvFOe6sWDf0UYLRqA6svUYg7+/TSfVAu49jYC4BvQ4Sms9SZgdqGBgroqfDhJdTyKQ==", + "dev": true, "requires": { "encoding": "^0.1.11", "is-stream": "^1.0.1" @@ -3557,7 +3557,8 @@ "safer-buffer": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", - "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==" + "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==", + "dev": true }, "semver": { "version": "5.7.0", @@ -4276,7 +4277,8 @@ "whatwg-fetch": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/whatwg-fetch/-/whatwg-fetch-3.0.0.tgz", - "integrity": "sha512-9GSJUgz1D4MfyKU7KRqwOjXCXTqWdFNvEr7eUBYchQiVc744mqK/MzXPNR2WsPkmkOa4ywfg8C2n8h+13Bey1Q==" + "integrity": "sha512-9GSJUgz1D4MfyKU7KRqwOjXCXTqWdFNvEr7eUBYchQiVc744mqK/MzXPNR2WsPkmkOa4ywfg8C2n8h+13Bey1Q==", + "dev": true }, "which": { "version": "1.3.1", diff --git a/package.json b/package.json index d5be54496..afdd58e54 100644 --- a/package.json +++ b/package.json @@ -12,8 +12,6 @@ "types": "./lib/src/index.d.ts", "dependencies": { "@babel/runtime": "^7.4.4", - "es6-promise": "^4.2.6", - "isomorphic-fetch": "^2.2.1", "tslib": "^1.9.3" }, "devDependencies": { @@ -24,6 +22,7 @@ "@types/node": "^11.13.9", "chai": "^4.2.0", "husky": "^2.2.0", + "isomorphic-fetch": "^2.2.1", "lint-staged": "^8.1.5", "mocha": "^6.1.4", "msal": "^1.0.0", From b3a27137cddac728eab0ad4d312a56974e79198a Mon Sep 17 00:00:00 2001 From: Muthurathinam <6259786+muthurathinam@users.noreply.github.com> Date: Fri, 24 May 2019 16:13:39 +0530 Subject: [PATCH 12/23] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index c7f418faf..653922836 100644 --- a/README.md +++ b/README.md @@ -16,7 +16,7 @@ The Microsoft Graph JavaScript client library is a lightweight wrapper around th npm install @microsoft/microsoft-graph-client ``` -import `@microsoft/microsoft-graph-client` into your module and also you will need polyfill for fetch like [node-fetch](https://github.com/bitinn/node-fetch). +import `@microsoft/microsoft-graph-client` into your module and also you will need polyfills for fetch like [node-fetch](https://github.com/bitinn/node-fetch). ```typescript import "isomorphic-fetch"; From 1f860b125cf74c85b85ae28a59c65fdbf7a55fa8 Mon Sep 17 00:00:00 2001 From: Muthurathinam <6259786+muthurathinam@users.noreply.github.com> Date: Fri, 24 May 2019 16:17:36 +0530 Subject: [PATCH 13/23] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 653922836..8310e60bd 100644 --- a/README.md +++ b/README.md @@ -16,7 +16,7 @@ The Microsoft Graph JavaScript client library is a lightweight wrapper around th npm install @microsoft/microsoft-graph-client ``` -import `@microsoft/microsoft-graph-client` into your module and also you will need polyfills for fetch like [node-fetch](https://github.com/bitinn/node-fetch). +import `@microsoft/microsoft-graph-client` into your module and also you will need polyfills for fetch like [isomorphic-fetch](https://www.npmjs.com/package/isomorphic-fetch). ```typescript import "isomorphic-fetch"; From 930a96ca170c0c9e6ff88355cdb1a9f170dfb779 Mon Sep 17 00:00:00 2001 From: Muthurathinam <6259786+muthurathinam@users.noreply.github.com> Date: Sat, 25 May 2019 09:29:48 +0530 Subject: [PATCH 14/23] Update README.md --- README.md | 1 - 1 file changed, 1 deletion(-) diff --git a/README.md b/README.md index 8310e60bd..ec2069d62 100644 --- a/README.md +++ b/README.md @@ -38,7 +38,6 @@ In case your browser doesn't have support for [Fetch](https://developer.mozilla. - ``` From fe072046f273b7c3dc2d035364de4a7c8b0400fd Mon Sep 17 00:00:00 2001 From: Muthurathinam Date: Tue, 28 May 2019 10:56:23 +0530 Subject: [PATCH 15/23] Renaming ImplicitMSALAuthenticationProviderOptions to MSALAuthenticationProviderOptions --- README.md | 4 ++-- samples/browser/src/main.js | 2 +- spec/middleware/AuthenticationHandlerOptions.ts | 4 ++-- ...tions.ts => MSALAuthenticationProviderOptions.ts} | 6 +++--- src/ImplicitMSALAuthenticationProvider.ts | 12 ++++++------ ...tions.ts => MSALAuthenticationProviderOptions.ts} | 10 +++++----- src/browser/ImplicitMSALAuthenticationProvider.ts | 12 ++++++------ src/browser/index.ts | 2 +- 8 files changed, 26 insertions(+), 26 deletions(-) rename spec/middleware/{ImplicitMSALAuthenticationProviderOptions.ts => MSALAuthenticationProviderOptions.ts} (69%) rename src/{ImplicitMSALAuthenticationProviderOptions.ts => MSALAuthenticationProviderOptions.ts} (67%) diff --git a/README.md b/README.md index c7f418faf..503b3611e 100644 --- a/README.md +++ b/README.md @@ -79,7 +79,7 @@ const graphScopes = ["user.read", "mail.send"]; // An array of graph scopes // Important Note: This library implements loginPopup and acquireTokenPopup flow, remember this while initializing the msal // Initialize the MSAL @see https://github.com/AzureAD/microsoft-authentication-library-for-js#1-instantiate-the-useragentapplication const msalInstance = new Msal.UserAgentApplication(msalConfig); -const options = new MicrosoftGraph.ImplicitMSALAuthenticationProviderOptions(graphScopes); +const options = new MicrosoftGraph.MSALAuthenticationProviderOptions(graphScopes); const authProvider = new MicrosoftGraph.ImplicitMSALAuthenticationProvider(msalInstance, options); ``` @@ -108,7 +108,7 @@ const graphScopes = ["user.read", "mail.send"]; // An array of graph scopes // Important Note: This library implements loginPopup and acquireTokenPopup flow, remember this while initializing the msal // Initialize the MSAL @see https://github.com/AzureAD/microsoft-authentication-library-for-js#1-instantiate-the-useragentapplication const msalInstance = new UserAgentApplication(msalConfig); -const options = new MicrosoftGraph.ImplicitMSALAuthenticationProviderOptions(graphScopes); +const options = new MicrosoftGraph.MSALAuthenticationProviderOptions(graphScopes); const authProvider = new ImplicitMSALAuthenticationProvider(msalInstance, options); ``` diff --git a/samples/browser/src/main.js b/samples/browser/src/main.js index 50a199974..dab7baab5 100644 --- a/samples/browser/src/main.js +++ b/samples/browser/src/main.js @@ -17,7 +17,7 @@ const init = async () => { }; var msalInstance = new Msal.UserAgentApplication(msalConfig); - const msalOptions = new MicrosoftGraph.ImplicitMSALAuthenticationProviderOptions(scopes); + const msalOptions = new MicrosoftGraph.MSALAuthenticationProviderOptions(scopes); const msalProvider = new MicrosoftGraph.ImplicitMSALAuthenticationProvider(msalInstance, msalOptions); client = MicrosoftGraph.Client.initWithMiddleware({ debugLogging: true, diff --git a/spec/middleware/AuthenticationHandlerOptions.ts b/spec/middleware/AuthenticationHandlerOptions.ts index 00564aa0b..1bf0d6cb6 100644 --- a/spec/middleware/AuthenticationHandlerOptions.ts +++ b/spec/middleware/AuthenticationHandlerOptions.ts @@ -7,13 +7,13 @@ import { assert } from "chai"; -import { ImplicitMSALAuthenticationProviderOptions } from "../../src/ImplicitMSALAuthenticationProviderOptions"; import { AuthenticationHandlerOptions } from "../../src/middleware/options/AuthenticationHandlerOptions"; +import { MSALAuthenticationProviderOptions } from "../../src/MSALAuthenticationProviderOptions"; import { DummyAuthenticationProvider } from "../DummyAuthenticationProvider"; describe("AuthenticationHandlerOptions.ts", () => { const dummyAuthProvider = new DummyAuthenticationProvider(); - const msalAuthProviderOptions = new ImplicitMSALAuthenticationProviderOptions([]); + const msalAuthProviderOptions = new MSALAuthenticationProviderOptions([]); it("Should create an instance with all the given options", () => { const options = new AuthenticationHandlerOptions(dummyAuthProvider, msalAuthProviderOptions); assert.equal(options.authenticationProvider, dummyAuthProvider); diff --git a/spec/middleware/ImplicitMSALAuthenticationProviderOptions.ts b/spec/middleware/MSALAuthenticationProviderOptions.ts similarity index 69% rename from spec/middleware/ImplicitMSALAuthenticationProviderOptions.ts rename to spec/middleware/MSALAuthenticationProviderOptions.ts index c98edc1c4..43c025c9a 100644 --- a/spec/middleware/ImplicitMSALAuthenticationProviderOptions.ts +++ b/spec/middleware/MSALAuthenticationProviderOptions.ts @@ -7,12 +7,12 @@ import { assert } from "chai"; -import { ImplicitMSALAuthenticationProviderOptions } from "../../src/ImplicitMSALAuthenticationProviderOptions"; +import { MSALAuthenticationProviderOptions } from "../../src/MSALAuthenticationProviderOptions"; -describe("ImplicitMSALAuthenticationProviderOptions.ts", () => { +describe("MSALAuthenticationProviderOptions.ts", () => { it("Should create an instance with all the given options", () => { const scopes = ["dummy.scope"]; - const options = new ImplicitMSALAuthenticationProviderOptions(scopes); + const options = new MSALAuthenticationProviderOptions(scopes); assert.isDefined(options.scopes); assert.equal(options.scopes, scopes); }); diff --git a/src/ImplicitMSALAuthenticationProvider.ts b/src/ImplicitMSALAuthenticationProvider.ts index 32433ebb3..3b05c64e9 100644 --- a/src/ImplicitMSALAuthenticationProvider.ts +++ b/src/ImplicitMSALAuthenticationProvider.ts @@ -13,7 +13,7 @@ import { AuthenticationParameters, AuthResponse, InteractionRequiredAuthError, U import { AuthenticationProvider } from "./IAuthenticationProvider"; import { AuthenticationProviderOptions } from "./IAuthenticationProviderOptions"; -import { ImplicitMSALAuthenticationProviderOptions } from "./ImplicitMSALAuthenticationProviderOptions"; +import { MSALAuthenticationProviderOptions } from "./MSALAuthenticationProviderOptions"; /** * @class @@ -23,9 +23,9 @@ import { ImplicitMSALAuthenticationProviderOptions } from "./ImplicitMSALAuthent export class ImplicitMSALAuthenticationProvider implements AuthenticationProvider { /** * @private - * A member holding an instance of ImplicitMSALAuthenticationProviderOptions + * A member holding an instance of MSALAuthenticationProviderOptions */ - private options: ImplicitMSALAuthenticationProviderOptions; + private options: MSALAuthenticationProviderOptions; /** * @private @@ -38,10 +38,10 @@ export class ImplicitMSALAuthenticationProvider implements AuthenticationProvide * @constructor * Creates an instance of ImplicitMSALAuthenticationProvider * @param {UserAgentApplication} msalInstance - An instance of MSAL UserAgentApplication - * @param {ImplicitMSALAuthenticationProviderOptions} options - An instance of ImplicitMSALAuthenticationProviderOptions + * @param {MSALAuthenticationProviderOptions} options - An instance of MSALAuthenticationProviderOptions * @returns An instance of ImplicitMSALAuthenticationProvider */ - public constructor(msalInstance: UserAgentApplication, options: ImplicitMSALAuthenticationProviderOptions) { + public constructor(msalInstance: UserAgentApplication, options: MSALAuthenticationProviderOptions) { this.options = options; this.msalInstance = msalInstance; } @@ -54,7 +54,7 @@ export class ImplicitMSALAuthenticationProvider implements AuthenticationProvide * @returns The promise that resolves to an access token */ public async getAccessToken(authenticationProviderOptions?: AuthenticationProviderOptions): Promise { - const options: ImplicitMSALAuthenticationProviderOptions = authenticationProviderOptions as ImplicitMSALAuthenticationProviderOptions; + const options: MSALAuthenticationProviderOptions = authenticationProviderOptions as MSALAuthenticationProviderOptions; let scopes: string[]; if (typeof options !== "undefined") { scopes = options.scopes; diff --git a/src/ImplicitMSALAuthenticationProviderOptions.ts b/src/MSALAuthenticationProviderOptions.ts similarity index 67% rename from src/ImplicitMSALAuthenticationProviderOptions.ts rename to src/MSALAuthenticationProviderOptions.ts index b24d1e8e7..f34b5b552 100644 --- a/src/ImplicitMSALAuthenticationProviderOptions.ts +++ b/src/MSALAuthenticationProviderOptions.ts @@ -6,7 +6,7 @@ */ /** - * @module ImplicitMSALAuthenticationProviderOptions + * @module MSALAuthenticationProviderOptions */ import { AuthenticationProviderOptions } from "./IAuthenticationProviderOptions"; @@ -14,9 +14,9 @@ import { AuthenticationProviderOptions } from "./IAuthenticationProviderOptions" /** * @class * @implements AuthenticationProviderOptions - * Class representing ImplicitMSALAuthenticationProviderOptions + * Class representing MSALAuthenticationProviderOptions */ -export class ImplicitMSALAuthenticationProviderOptions implements AuthenticationProviderOptions { +export class MSALAuthenticationProviderOptions implements AuthenticationProviderOptions { /** * @public * A member holding array of scopes @@ -26,9 +26,9 @@ export class ImplicitMSALAuthenticationProviderOptions implements Authentication /** * @public * @constructor - * To create an instance of ImplicitMSALAuthenticationProviderOptions + * To create an instance of MSALAuthenticationProviderOptions * @param {string[]} scopes - An array of scopes - * @returns An instance of ImplicitMSALAuthenticationProviderOptions + * @returns An instance of MSALAuthenticationProviderOptions */ public constructor(scopes: string[]) { this.scopes = scopes; diff --git a/src/browser/ImplicitMSALAuthenticationProvider.ts b/src/browser/ImplicitMSALAuthenticationProvider.ts index 72ef2799e..6cb030e5a 100644 --- a/src/browser/ImplicitMSALAuthenticationProvider.ts +++ b/src/browser/ImplicitMSALAuthenticationProvider.ts @@ -11,7 +11,7 @@ import { AuthenticationProvider } from "../IAuthenticationProvider"; import { AuthenticationProviderOptions } from "../IAuthenticationProviderOptions"; -import { ImplicitMSALAuthenticationProviderOptions } from "../ImplicitMSALAuthenticationProviderOptions"; +import { MSALAuthenticationProviderOptions } from "../MSALAuthenticationProviderOptions"; /** * @constant @@ -27,9 +27,9 @@ declare const Msal: any; export class ImplicitMSALAuthenticationProvider implements AuthenticationProvider { /** * @private - * A member holding an instance of ImplicitMSALAuthenticationProviderOptions + * A member holding an instance of MSALAuthenticationProviderOptions */ - private options: ImplicitMSALAuthenticationProviderOptions; + private options: MSALAuthenticationProviderOptions; /** * @private @@ -42,10 +42,10 @@ export class ImplicitMSALAuthenticationProvider implements AuthenticationProvide * @constructor * Creates an instance of ImplicitMSALAuthenticationProvider * @param {any} msalInstance - An instance of MSAL UserAgentApplication - * @param {ImplicitMSALAuthenticationProviderOptions} options - An instance of ImplicitMSALAuthenticationProviderOptions + * @param {MSALAuthenticationProviderOptions} options - An instance of MSALAuthenticationProviderOptions * @returns An instance of ImplicitMSALAuthenticationProvider */ - public constructor(msalInstance: any, options: ImplicitMSALAuthenticationProviderOptions) { + public constructor(msalInstance: any, options: MSALAuthenticationProviderOptions) { this.options = options; this.msalInstance = msalInstance; } @@ -58,7 +58,7 @@ export class ImplicitMSALAuthenticationProvider implements AuthenticationProvide * @returns The promise that resolves to an access token */ public async getAccessToken(authenticationProviderOptions?: AuthenticationProviderOptions): Promise { - const options: ImplicitMSALAuthenticationProviderOptions = authenticationProviderOptions as ImplicitMSALAuthenticationProviderOptions; + const options: MSALAuthenticationProviderOptions = authenticationProviderOptions as MSALAuthenticationProviderOptions; let scopes: string[]; if (typeof options !== "undefined") { scopes = options.scopes; diff --git a/src/browser/index.ts b/src/browser/index.ts index e96222d36..dd5a0bec3 100644 --- a/src/browser/index.ts +++ b/src/browser/index.ts @@ -36,5 +36,5 @@ export * from "../IFetchOptions"; export * from "../IGraphRequestCallback"; export * from "../IOptions"; export * from "./ImplicitMSALAuthenticationProvider"; -export * from "../ImplicitMSALAuthenticationProviderOptions"; +export * from "../MSALAuthenticationProviderOptions"; export * from "../ResponseType"; From e90f4f89082b50897cf02c2d1c34eac4b9bfbd18 Mon Sep 17 00:00:00 2001 From: Muthurathinam Date: Wed, 29 May 2019 14:23:02 +0530 Subject: [PATCH 16/23] Added babel polyfill in readme --- README.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/README.md b/README.md index efe1d5fa4..490dfa0c5 100644 --- a/README.md +++ b/README.md @@ -39,6 +39,9 @@ In case your browser doesn't have support for [Fetch](https://developer.mozilla. + + + ``` ## Getting started From 5803f2c6a5d0aa3f1df7fef3abe7a34cc0f1910c Mon Sep 17 00:00:00 2001 From: Muthurathinam Date: Wed, 29 May 2019 14:35:11 +0530 Subject: [PATCH 17/23] Bump version with 2.0.0-Preview.1 --- package-lock.json | 2 +- package.json | 2 +- src/Constants.ts | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index f47d89d14..42aa6a031 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "@microsoft/microsoft-graph-client", - "version": "1.7.0", + "version": "2.0.0-Preview.1", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index afdd58e54..26397db51 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "@microsoft/microsoft-graph-client", "//": "NOTE: The version here should match exactly the exported const PACKAGE_VERSION in Constants.ts. If you change it here, also change it there.", - "version": "1.7.0", + "version": "2.0.0-Preview.1", "description": "Microsoft Graph Client Library", "main": "lib/src/index.js", "module": "lib/es/index.js", diff --git a/src/Constants.ts b/src/Constants.ts index 09259ad86..4c1c92848 100644 --- a/src/Constants.ts +++ b/src/Constants.ts @@ -27,4 +27,4 @@ export const GRAPH_BASE_URL = "https://graph.microsoft.com/"; * @NOTE: This should be kept up to date with the version used in package.json. * If you are changing this please ensure you are also changing it in package.json. */ -export const PACKAGE_VERSION = "1.7.0"; +export const PACKAGE_VERSION = "2.0.0-Preview.1"; From 441cfa01fddc589552641e554627b876e20c9075 Mon Sep 17 00:00:00 2001 From: Muthurathinam Date: Thu, 30 May 2019 10:19:28 +0530 Subject: [PATCH 18/23] Auto generation of version file and fix review comments --- .huskyrc | 2 +- README.md | 4 +- docs/CreatingClientInstance.md | 14 +- gulpfile.js | 30 + package-lock.json | 2027 ++++++++++++++++++++++++++- package.json | 6 +- scripts/src/gulpfile.js | 6 +- spec/middleware/TelemetryHandler.ts | 2 +- spec/package-lock.json | 11 - spec/package.json | 1 - src/Constants.ts | 8 - src/Version.ts | 15 + src/middleware/TelemetryHandler.ts | 2 +- 13 files changed, 2075 insertions(+), 53 deletions(-) create mode 100644 gulpfile.js create mode 100644 src/Version.ts diff --git a/.huskyrc b/.huskyrc index 23568dcbc..65c9cae87 100644 --- a/.huskyrc +++ b/.huskyrc @@ -1,5 +1,5 @@ { "hooks": { - "pre-commit": "lint-staged && npm run lint && npm run test" + "pre-commit": "npm run pre-build && lint-staged && npm run lint && npm run test" } } diff --git a/README.md b/README.md index 490dfa0c5..49586b30c 100644 --- a/README.md +++ b/README.md @@ -57,7 +57,7 @@ Register your application to use Microsoft Graph API using one of the following The Microsoft Graph JavaScript Client Library has an adapter implementation ([ImplicitMSALAuthenticationProvider](src/ImplicitMSALAuthenticationProvider.ts)) for [MSAL](https://github.com/AzureAD/microsoft-authentication-library-for-js/tree/dev/lib/msal-core) (Microsoft Authentication Library) which takes care of getting the `accessToken`. MSAL library does not ship with this library, user has to include it externally (For including MSAL, refer [this](https://github.com/AzureAD/microsoft-authentication-library-for-js/tree/dev/lib/msal-core#installation)). -> **Important Note:** MSAL is supported only for frontend applications, for server-side authentication you have to implement your own AuthenticationProvider. Refer implementing [Custom Authentication Provider](./docs/CustomAuthenticationProvider.md). +> **Important Note:** MSAL is supported only for frontend applications, for server-side authentication you have to implement your own AuthenticationProvider. Learn how you can create a [Custom Authentication Provider](./docs/CustomAuthenticationProvider.md). #### Creating an instance of ImplicitMSALAuthenticationProvider in browser environment @@ -101,7 +101,7 @@ import { ImplicitMSALAuthenticationProvider } from "./node_modules/@microsoft/mi // An Optional options for initializing the MSAL @see https://github.com/AzureAD/microsoft-authentication-library-for-js/wiki/MSAL-basics#configuration-options const msalConfig = { auth: { - clientId: "your_client_id"; // Client Id of the registered application + clientId: "your_client_id", // Client Id of the registered application redirectUri: "your_redirect_uri", }, }; diff --git a/docs/CreatingClientInstance.md b/docs/CreatingClientInstance.md index 945e790fa..a4551167d 100644 --- a/docs/CreatingClientInstance.md +++ b/docs/CreatingClientInstance.md @@ -14,8 +14,20 @@ Library is shipped with one such authentication provider named [ImplicitMSALAuth ```typescript // Instantiating Client with ImplicitMSALAuthenticationProvider + +// An Optional options for initializing the MSAL @see https://github.com/AzureAD/microsoft-authentication-library-for-js/wiki/MSAL-basics#configuration-options +const msalConfig = { + auth: { + clientId: // Client Id of the registered application + }, +}; + +// Important Note: This library implements loginPopup and acquireTokenPopup flow, remember this while initializing the msal +// Initialize the MSAL @see https://github.com/AzureAD/microsoft-authentication-library-for-js#1-instantiate-the-useragentapplication +const msalInstance = new UserAgentApplication(msalConfig); +const options = new MicrosoftGraph.MSALAuthenticationProviderOptions(); // An array of graph scopes let clientOptions: ClientOptions = { - authProvider: new ImplicitMSALAuthenticationProvider(, , ) + authProvider: new ImplicitMSALAuthenticationProvider(msalInstance, options) }; const client = Client.initWithMiddleware(clientOptions); ``` diff --git a/gulpfile.js b/gulpfile.js new file mode 100644 index 000000000..dfffe4675 --- /dev/null +++ b/gulpfile.js @@ -0,0 +1,30 @@ +const { series } = require("gulp"); + +const licenseStr = `/** + * ------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. + * See License in the project root for license information. + * ------------------------------------------------------------------------------------------- + */ +`; + +const moduleHeader = `/** + * @module Version + */ +`; + +const versionFile = `${licenseStr} +// THIS FILE IS AUTO GENERATED +// ANY CHANGES WILL BE LOST DURING BUILD + +${moduleHeader} +export const PACKAGE_VERSION = "[VERSION]"; +`; + +async function setVersion() { + var pkg = require("./package.json"); + var fs = require("fs"); + fs.writeFileSync("src/Version.ts", versionFile.replace("[VERSION]", pkg.version)); +} + +exports.setVersion = series(setVersion); diff --git a/package-lock.json b/package-lock.json index 42aa6a031..e011f5bb9 100644 --- a/package-lock.json +++ b/package-lock.json @@ -836,6 +836,15 @@ "integrity": "sha512-cBhpre4ma+U0T1oM5fXg7Dy1Jw7zzwv7lt/GoCpr+hDQJoYnKVPLL4dCvSEFMmQurOQvSrwT7SL/DAlhBI97RQ==", "dev": true }, + "ansi-gray": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/ansi-gray/-/ansi-gray-0.1.1.tgz", + "integrity": "sha1-KWLPVOyXksSFEKPetSRDaGHvclE=", + "dev": true, + "requires": { + "ansi-wrap": "0.1.0" + } + }, "ansi-regex": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", @@ -851,12 +860,43 @@ "color-convert": "^1.9.0" } }, + "ansi-wrap": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/ansi-wrap/-/ansi-wrap-0.1.0.tgz", + "integrity": "sha1-qCJQ3bABXponyoLoLqYDu/pF768=", + "dev": true + }, "any-observable": { "version": "0.3.0", "resolved": "https://registry.npmjs.org/any-observable/-/any-observable-0.3.0.tgz", "integrity": "sha512-/FQM1EDkTsf63Ub2C6O7GuYFDsSXUwsaZDurV0np41ocwq0jthUAYCmhBX9f+KwlaCgIuWyr/4WlUQUBfKfZog==", "dev": true }, + "anymatch": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-2.0.0.tgz", + "integrity": "sha512-5teOsQWABXHHBFP9y3skS5P3d/WfWXpv3FUpy+LorMrNYaT9pI4oLMQX7jzQ2KklNpGpWHzdCXTDT2Y3XGlZBw==", + "dev": true, + "requires": { + "micromatch": "^3.1.4", + "normalize-path": "^2.1.1" + } + }, + "append-buffer": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/append-buffer/-/append-buffer-1.0.2.tgz", + "integrity": "sha1-2CIM9GYIFSXv6lBhTz3mUU36WPE=", + "dev": true, + "requires": { + "buffer-equal": "^1.0.0" + } + }, + "archy": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/archy/-/archy-1.0.0.tgz", + "integrity": "sha1-+cjBN1fMHde8N5rHeyxipcKGjEA=", + "dev": true + }, "argparse": { "version": "1.0.10", "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", @@ -872,18 +912,102 @@ "integrity": "sha1-1kYQdP6/7HHn4VI1dhoyml3HxSA=", "dev": true }, + "arr-filter": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/arr-filter/-/arr-filter-1.1.2.tgz", + "integrity": "sha1-Q/3d0JHo7xGqTEXZzcGOLf8XEe4=", + "dev": true, + "requires": { + "make-iterator": "^1.0.0" + } + }, "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==", "dev": true }, + "arr-map": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/arr-map/-/arr-map-2.0.2.tgz", + "integrity": "sha1-Onc0X/wc814qkYJWAfnljy4kysQ=", + "dev": true, + "requires": { + "make-iterator": "^1.0.0" + } + }, "arr-union": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/arr-union/-/arr-union-3.1.0.tgz", "integrity": "sha1-45sJrqne+Gao8gbiiK9jkZuuOcQ=", "dev": true }, + "array-each": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/array-each/-/array-each-1.0.1.tgz", + "integrity": "sha1-p5SvDAWrF1KEbudTofIRoFugxE8=", + "dev": true + }, + "array-initial": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/array-initial/-/array-initial-1.1.0.tgz", + "integrity": "sha1-L6dLJnOTccOUe9enrcc74zSz15U=", + "dev": true, + "requires": { + "array-slice": "^1.0.0", + "is-number": "^4.0.0" + }, + "dependencies": { + "is-number": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-4.0.0.tgz", + "integrity": "sha512-rSklcAIlf1OmFdyAqbnWTLVelsQ58uvZ66S/ZyawjWqIviTWCjg2PzVGw8WUA+nNuPTqb4wgA+NszrJ+08LlgQ==", + "dev": true + } + } + }, + "array-last": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/array-last/-/array-last-1.3.0.tgz", + "integrity": "sha512-eOCut5rXlI6aCOS7Z7kCplKRKyiFQ6dHFBem4PwlwKeNFk2/XxTrhRh5T9PyaEWGy/NHTZWbY+nsZlNFJu9rYg==", + "dev": true, + "requires": { + "is-number": "^4.0.0" + }, + "dependencies": { + "is-number": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-4.0.0.tgz", + "integrity": "sha512-rSklcAIlf1OmFdyAqbnWTLVelsQ58uvZ66S/ZyawjWqIviTWCjg2PzVGw8WUA+nNuPTqb4wgA+NszrJ+08LlgQ==", + "dev": true + } + } + }, + "array-slice": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/array-slice/-/array-slice-1.1.0.tgz", + "integrity": "sha512-B1qMD3RBP7O8o0H2KbrXDyB0IccejMF15+87Lvlor12ONPRHP6gTjXMNkt/d3ZuOGbAe66hFmaCfECI24Ufp6w==", + "dev": true + }, + "array-sort": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/array-sort/-/array-sort-1.0.0.tgz", + "integrity": "sha512-ihLeJkonmdiAsD7vpgN3CRcx2J2S0TiYW+IS/5zHBI7mKUq3ySvBdzzBfD236ubDBQFiiyG3SWCPc+msQ9KoYg==", + "dev": true, + "requires": { + "default-compare": "^1.0.0", + "get-value": "^2.0.6", + "kind-of": "^5.0.2" + }, + "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==", + "dev": true + } + } + }, "array-union": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/array-union/-/array-union-1.0.2.tgz", @@ -923,12 +1047,64 @@ "integrity": "sha1-WWZ/QfrdTyDMvCu5a41Pf3jsA2c=", "dev": true }, + "async-done": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/async-done/-/async-done-1.3.1.tgz", + "integrity": "sha512-R1BaUeJ4PMoLNJuk+0tLJgjmEqVsdN118+Z8O+alhnQDQgy0kmD5Mqi0DNEmMx2LM0Ed5yekKu+ZXYvIHceicg==", + "dev": true, + "requires": { + "end-of-stream": "^1.1.0", + "once": "^1.3.2", + "process-nextick-args": "^1.0.7", + "stream-exhaust": "^1.0.1" + }, + "dependencies": { + "process-nextick-args": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-1.0.7.tgz", + "integrity": "sha1-FQ4gt1ZZCtP5EJPyWk8q2L/zC6M=", + "dev": true + } + } + }, + "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==", + "dev": true + }, + "async-settle": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/async-settle/-/async-settle-1.0.0.tgz", + "integrity": "sha1-HQqRS7Aldb7IqPOnTlCA9yssDGs=", + "dev": true, + "requires": { + "async-done": "^1.2.2" + } + }, "atob": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/atob/-/atob-2.1.2.tgz", "integrity": "sha512-Wm6ukoaOGJi/73p/cl2GvLjTI5JM1k/O14isD73YML8StrH/7/lRFgmg8nICZgD3bZZvjwCGxtMOD3wWNAu8cg==", "dev": true }, + "bach": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/bach/-/bach-1.2.0.tgz", + "integrity": "sha1-Szzpa/JxNPeaG0FKUcFONMO9mIA=", + "dev": true, + "requires": { + "arr-filter": "^1.1.1", + "arr-flatten": "^1.0.1", + "arr-map": "^2.0.0", + "array-each": "^1.0.0", + "array-initial": "^1.0.0", + "array-last": "^1.1.1", + "async-done": "^1.2.2", + "async-settle": "^1.0.0", + "now-and-later": "^2.0.0" + } + }, "balanced-match": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz", @@ -990,6 +1166,12 @@ } } }, + "binary-extensions": { + "version": "1.13.1", + "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-1.13.1.tgz", + "integrity": "sha512-Un7MIEDdUC5gNpcGDV97op1Ywk748MpHcFTHoYs6qnj1Z3j7I53VG3nwZhKzoBZmbdRNnb6WRdFlwl7tSDuZGw==", + "dev": true + }, "brace-expansion": { "version": "1.1.11", "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", @@ -1046,6 +1228,12 @@ "node-releases": "^1.1.19" } }, + "buffer-equal": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/buffer-equal/-/buffer-equal-1.0.0.tgz", + "integrity": "sha1-WWFrSYME1Var1GaWayLu2j7KX74=", + "dev": true + }, "buffer-from": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.1.tgz", @@ -1142,6 +1330,34 @@ "integrity": "sha1-V00xLt2Iu13YkS6Sht1sCu1KrII=", "dev": true }, + "chokidar": { + "version": "2.1.6", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-2.1.6.tgz", + "integrity": "sha512-V2jUo67OKkc6ySiRpJrjlpJKl9kDuG+Xb8VgsGzb+aEouhgS1D0weyPU4lEzdAcsCAvrih2J2BqyXqHWvVLw5g==", + "dev": 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==", + "dev": true + } + } + }, "ci-info": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-2.0.0.tgz", @@ -1281,12 +1497,52 @@ } } }, + "clone": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/clone/-/clone-2.1.2.tgz", + "integrity": "sha1-G39Ln1kfHo+DZwQBYANFoCiHQ18=", + "dev": true + }, + "clone-buffer": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/clone-buffer/-/clone-buffer-1.0.0.tgz", + "integrity": "sha1-4+JbIHrE5wGvch4staFnksrD3Fg=", + "dev": true + }, + "clone-stats": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/clone-stats/-/clone-stats-1.0.0.tgz", + "integrity": "sha1-s3gt/4u1R04Yuba/D9/ngvh3doA=", + "dev": true + }, + "cloneable-readable": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/cloneable-readable/-/cloneable-readable-1.1.3.tgz", + "integrity": "sha512-2EF8zTQOxYq70Y4XKtorQupqF0m49MBz2/yf5Bj+MHjvpG3Hy7sImifnqD6UA+TKYxeSV+u6qqQPawN5UvnpKQ==", + "dev": true, + "requires": { + "inherits": "^2.0.1", + "process-nextick-args": "^2.0.0", + "readable-stream": "^2.3.5" + } + }, "code-point-at": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/code-point-at/-/code-point-at-1.1.0.tgz", "integrity": "sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c=", "dev": true }, + "collection-map": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/collection-map/-/collection-map-1.0.0.tgz", + "integrity": "sha1-rqDwb40mx4DCt1SUOFVEsiVa8Yw=", + "dev": true, + "requires": { + "arr-map": "^2.0.2", + "for-own": "^1.0.0", + "make-iterator": "^1.0.0" + } + }, "collection-visit": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/collection-visit/-/collection-visit-1.0.0.tgz", @@ -1312,6 +1568,12 @@ "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=", "dev": true }, + "color-support": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/color-support/-/color-support-1.1.3.tgz", + "integrity": "sha512-qiBjkpbMLO/HL68y+lh4q0/O1MZFj2RX6X/KmMa3+gJD3z+WwI1ZzDHysvqHGS3mP6mznPckpXmw1nI9cJjyRg==", + "dev": true + }, "commander": { "version": "2.20.0", "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.0.tgz", @@ -1330,6 +1592,18 @@ "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=", "dev": true }, + "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" + } + }, "convert-source-map": { "version": "1.6.0", "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.6.0.tgz", @@ -1345,6 +1619,16 @@ "integrity": "sha1-Z29us8OZl8LuGsOpJP1hJHSPV40=", "dev": true }, + "copy-props": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/copy-props/-/copy-props-2.0.4.tgz", + "integrity": "sha512-7cjuUME+p+S3HZlbllgsn2CDwS+5eCCX16qBgNC4jgSTf49qR1VKy/Zhl400m0IQXl/bPGEVqncgUUMjrr4s8A==", + "dev": true, + "requires": { + "each-props": "^1.3.0", + "is-plain-object": "^2.0.1" + } + }, "core-js-compat": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/core-js-compat/-/core-js-compat-3.1.1.tgz", @@ -1401,6 +1685,15 @@ "which": "^1.2.9" } }, + "d": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/d/-/d-1.0.0.tgz", + "integrity": "sha1-dUu1v+VUUdpppYuU1F9MWwRi1Y8=", + "dev": true, + "requires": { + "es5-ext": "^0.10.9" + } + }, "date-fns": { "version": "1.30.1", "resolved": "https://registry.npmjs.org/date-fns/-/date-fns-1.30.1.tgz", @@ -1443,6 +1736,29 @@ "type-detect": "^4.0.0" } }, + "default-compare": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/default-compare/-/default-compare-1.0.0.tgz", + "integrity": "sha512-QWfXlM0EkAbqOCbD/6HjdwT19j7WCkMyiRhWilc4H9/5h/RzTF9gv5LYh1+CmDV5d1rki6KAWLtQale0xt20eQ==", + "dev": true, + "requires": { + "kind-of": "^5.0.2" + }, + "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==", + "dev": true + } + } + }, + "default-resolution": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/default-resolution/-/default-resolution-2.0.0.tgz", + "integrity": "sha1-vLgrqnKtebQmp2cy8aga1t8m1oQ=", + "dev": true + }, "define-properties": { "version": "1.1.3", "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.1.3.tgz", @@ -1507,12 +1823,40 @@ "rimraf": "^2.2.8" } }, + "detect-file": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/detect-file/-/detect-file-1.0.0.tgz", + "integrity": "sha1-8NZtA2cqglyxtzvbP+YjEMjlUrc=", + "dev": true + }, "diff": { "version": "3.5.0", "resolved": "https://registry.npmjs.org/diff/-/diff-3.5.0.tgz", "integrity": "sha512-A46qtFgd+g7pDZinpnwiRJtxbC1hpgf0uzP3iG89scHk0AUC7A1TGxf5OiiOUv/JMZR8GOt8hL900hV0bOy5xA==", "dev": true }, + "duplexify": { + "version": "3.7.1", + "resolved": "https://registry.npmjs.org/duplexify/-/duplexify-3.7.1.tgz", + "integrity": "sha512-07z8uv2wMyS51kKhD1KsdXJg5WQ6t93RneqRxUHnskXVtlYYkLqM0gqStQZ3pj073g687jPCHrqNfCzawLYh5g==", + "dev": true, + "requires": { + "end-of-stream": "^1.0.0", + "inherits": "^2.0.1", + "readable-stream": "^2.0.0", + "stream-shift": "^1.0.0" + } + }, + "each-props": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/each-props/-/each-props-1.3.2.tgz", + "integrity": "sha512-vV0Hem3zAGkJAyU7JSjixeU66rwdynTAa1vofCrSA5fEln+m67Az9CcnkVD776/fsN/UjIWmBDoNRS6t6G9RfA==", + "dev": true, + "requires": { + "is-plain-object": "^2.0.1", + "object.defaults": "^1.1.0" + } + }, "electron-to-chromium": { "version": "1.3.135", "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.135.tgz", @@ -1583,6 +1927,50 @@ "is-symbol": "^1.0.2" } }, + "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==", + "dev": true, + "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=", + "dev": true, + "requires": { + "d": "1", + "es5-ext": "^0.10.35", + "es6-symbol": "^3.1.1" + } + }, + "es6-symbol": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/es6-symbol/-/es6-symbol-3.1.1.tgz", + "integrity": "sha1-vwDvT9q2uhtG7Le2KbTH7VcVzHc=", + "dev": true, + "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=", + "dev": true, + "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", @@ -1672,6 +2060,21 @@ } } }, + "expand-tilde": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/expand-tilde/-/expand-tilde-2.0.2.tgz", + "integrity": "sha1-l+gBqgUt8CRU3kawK/YhZCzchQI=", + "dev": true, + "requires": { + "homedir-polyfill": "^1.0.1" + } + }, + "extend": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.2.tgz", + "integrity": "sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==", + "dev": true + }, "extend-shallow": { "version": "3.0.2", "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-3.0.2.tgz", @@ -1758,6 +2161,18 @@ } } }, + "fancy-log": { + "version": "1.3.3", + "resolved": "https://registry.npmjs.org/fancy-log/-/fancy-log-1.3.3.tgz", + "integrity": "sha512-k9oEhlyc0FrVh25qYuSELjr8oxsCoc4/LEZfg2iJJrfEk/tZL9bCoJE47gqAvI2m/AUjluCS4+3I0eTx8n3AEw==", + "dev": true, + "requires": { + "ansi-gray": "^0.1.1", + "color-support": "^1.1.3", + "parse-node-version": "^1.0.0", + "time-stamp": "^1.0.0" + } + }, "figures": { "version": "1.7.0", "resolved": "https://registry.npmjs.org/figures/-/figures-1.7.0.tgz", @@ -1806,6 +2221,37 @@ "locate-path": "^3.0.0" } }, + "findup-sync": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/findup-sync/-/findup-sync-3.0.0.tgz", + "integrity": "sha512-YbffarhcicEhOrm4CtrwdKBdCuz576RLdhJDsIfvNtxUuhdRet1qZcsMjqbePtAseKdAnDyM/IyXbu7PRPRLYg==", + "dev": true, + "requires": { + "detect-file": "^1.0.0", + "is-glob": "^4.0.0", + "micromatch": "^3.0.4", + "resolve-dir": "^1.0.1" + } + }, + "fined": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/fined/-/fined-1.2.0.tgz", + "integrity": "sha512-ZYDqPLGxDkDhDZBjZBb+oD1+j0rA4E0pXY50eplAAOPg2N/gUBSSk5IM1/QhPfyVo19lJ+CvXpqfvk+b2p/8Ng==", + "dev": true, + "requires": { + "expand-tilde": "^2.0.2", + "is-plain-object": "^2.0.3", + "object.defaults": "^1.1.0", + "object.pick": "^1.2.0", + "parse-filepath": "^1.0.1" + } + }, + "flagged-respawn": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/flagged-respawn/-/flagged-respawn-1.0.1.tgz", + "integrity": "sha512-lNaHNVymajmk0OJMBn8fVUAU1BtDeKIqKoVhk4xAALB57aALg6b4W0MfJ/cUE0g9YBXy5XhSlPIpYIJ7HaY/3Q==", + "dev": true + }, "flat": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/flat/-/flat-4.1.0.tgz", @@ -1823,6 +2269,16 @@ } } }, + "flush-write-stream": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/flush-write-stream/-/flush-write-stream-1.1.1.tgz", + "integrity": "sha512-3Z4XhFZ3992uIq0XOqb9AreonueSYphE6oYbpt5+3u06JWklbsPkNv3ZKkP9Bz/r+1MWCaMoSQ28P85+1Yc77w==", + "dev": true, + "requires": { + "inherits": "^2.0.3", + "readable-stream": "^2.3.6" + } + }, "fn-name": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/fn-name/-/fn-name-2.0.1.tgz", @@ -1835,6 +2291,15 @@ "integrity": "sha1-gQaNKVqBQuwKxybG4iAMMPttXoA=", "dev": true }, + "for-own": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/for-own/-/for-own-1.0.0.tgz", + "integrity": "sha1-xjMy9BXO3EsE2/5wz4NklMU8tEs=", + "dev": true, + "requires": { + "for-in": "^1.0.1" + } + }, "fragment-cache": { "version": "0.2.1", "resolved": "https://registry.npmjs.org/fragment-cache/-/fragment-cache-0.2.1.tgz", @@ -1844,35 +2309,574 @@ "map-cache": "^0.2.2" } }, + "fs-mkdirp-stream": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fs-mkdirp-stream/-/fs-mkdirp-stream-1.0.0.tgz", + "integrity": "sha1-C3gV/DIBxqaeFNuYzgmMFpNSWes=", + "dev": true, + "requires": { + "graceful-fs": "^4.1.11", + "through2": "^2.0.3" + } + }, "fs.realpath": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=", "dev": true }, - "function-bind": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", - "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==", - "dev": true - }, - "g-status": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/g-status/-/g-status-2.0.2.tgz", - "integrity": "sha512-kQoE9qH+T1AHKgSSD0Hkv98bobE90ILQcXAF4wvGgsr7uFqNvwmh8j+Lq3l0RVt3E3HjSbv2B9biEGcEtpHLCA==", + "fsevents": { + "version": "1.2.9", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-1.2.9.tgz", + "integrity": "sha512-oeyj2H3EjjonWcFjD5NvZNE9Rqe4UW+nQBU2HNeKw0koVLEFIhtyETyAakeAM3de7Z/SW5kcA+fZUait9EApnw==", "dev": true, + "optional": true, "requires": { - "arrify": "^1.0.1", - "matcher": "^1.0.0", - "simple-git": "^1.85.0" - } - }, - "get-caller-file": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", - "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", - "dev": true - }, + "nan": "^2.12.1", + "node-pre-gyp": "^0.12.0" + }, + "dependencies": { + "abbrev": { + "version": "1.1.1", + "bundled": true, + "dev": true, + "optional": true + }, + "ansi-regex": { + "version": "2.1.1", + "bundled": true, + "dev": true + }, + "aproba": { + "version": "1.2.0", + "bundled": true, + "dev": true, + "optional": true + }, + "are-we-there-yet": { + "version": "1.1.5", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "delegates": "^1.0.0", + "readable-stream": "^2.0.6" + } + }, + "balanced-match": { + "version": "1.0.0", + "bundled": true, + "dev": true + }, + "brace-expansion": { + "version": "1.1.11", + "bundled": true, + "dev": true, + "requires": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "chownr": { + "version": "1.1.1", + "bundled": true, + "dev": true, + "optional": true + }, + "code-point-at": { + "version": "1.1.0", + "bundled": true, + "dev": true + }, + "concat-map": { + "version": "0.0.1", + "bundled": true, + "dev": true + }, + "console-control-strings": { + "version": "1.1.0", + "bundled": true, + "dev": true + }, + "core-util-is": { + "version": "1.0.2", + "bundled": true, + "dev": true, + "optional": true + }, + "debug": { + "version": "4.1.1", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "ms": "^2.1.1" + } + }, + "deep-extend": { + "version": "0.6.0", + "bundled": true, + "dev": true, + "optional": true + }, + "delegates": { + "version": "1.0.0", + "bundled": true, + "dev": true, + "optional": true + }, + "detect-libc": { + "version": "1.0.3", + "bundled": true, + "dev": true, + "optional": true + }, + "fs-minipass": { + "version": "1.2.5", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "minipass": "^2.2.1" + } + }, + "fs.realpath": { + "version": "1.0.0", + "bundled": true, + "dev": true, + "optional": true + }, + "gauge": { + "version": "2.7.4", + "bundled": true, + "dev": 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, + "dev": 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, + "dev": true, + "optional": true + }, + "iconv-lite": { + "version": "0.4.24", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "safer-buffer": ">= 2.1.2 < 3" + } + }, + "ignore-walk": { + "version": "3.0.1", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "minimatch": "^3.0.4" + } + }, + "inflight": { + "version": "1.0.6", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "once": "^1.3.0", + "wrappy": "1" + } + }, + "inherits": { + "version": "2.0.3", + "bundled": true, + "dev": true + }, + "ini": { + "version": "1.3.5", + "bundled": true, + "dev": true, + "optional": true + }, + "is-fullwidth-code-point": { + "version": "1.0.0", + "bundled": true, + "dev": true, + "requires": { + "number-is-nan": "^1.0.0" + } + }, + "isarray": { + "version": "1.0.0", + "bundled": true, + "dev": true, + "optional": true + }, + "minimatch": { + "version": "3.0.4", + "bundled": true, + "dev": true, + "requires": { + "brace-expansion": "^1.1.7" + } + }, + "minimist": { + "version": "0.0.8", + "bundled": true, + "dev": true + }, + "minipass": { + "version": "2.3.5", + "bundled": true, + "dev": true, + "requires": { + "safe-buffer": "^5.1.2", + "yallist": "^3.0.0" + } + }, + "minizlib": { + "version": "1.2.1", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "minipass": "^2.2.1" + } + }, + "mkdirp": { + "version": "0.5.1", + "bundled": true, + "dev": true, + "requires": { + "minimist": "0.0.8" + } + }, + "ms": { + "version": "2.1.1", + "bundled": true, + "dev": true, + "optional": true + }, + "needle": { + "version": "2.3.0", + "bundled": true, + "dev": 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, + "dev": 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, + "dev": true, + "optional": true, + "requires": { + "abbrev": "1", + "osenv": "^0.1.4" + } + }, + "npm-bundled": { + "version": "1.0.6", + "bundled": true, + "dev": true, + "optional": true + }, + "npm-packlist": { + "version": "1.4.1", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "ignore-walk": "^3.0.1", + "npm-bundled": "^1.0.1" + } + }, + "npmlog": { + "version": "4.1.2", + "bundled": true, + "dev": 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, + "dev": true + }, + "object-assign": { + "version": "4.1.1", + "bundled": true, + "dev": true, + "optional": true + }, + "once": { + "version": "1.4.0", + "bundled": true, + "dev": true, + "requires": { + "wrappy": "1" + } + }, + "os-homedir": { + "version": "1.0.2", + "bundled": true, + "dev": true, + "optional": true + }, + "os-tmpdir": { + "version": "1.0.2", + "bundled": true, + "dev": true, + "optional": true + }, + "osenv": { + "version": "0.1.5", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "os-homedir": "^1.0.0", + "os-tmpdir": "^1.0.0" + } + }, + "path-is-absolute": { + "version": "1.0.1", + "bundled": true, + "dev": true, + "optional": true + }, + "process-nextick-args": { + "version": "2.0.0", + "bundled": true, + "dev": true, + "optional": true + }, + "rc": { + "version": "1.2.8", + "bundled": true, + "dev": 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, + "dev": true, + "optional": true + } + } + }, + "readable-stream": { + "version": "2.3.6", + "bundled": true, + "dev": 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, + "dev": true, + "optional": true, + "requires": { + "glob": "^7.1.3" + } + }, + "safe-buffer": { + "version": "5.1.2", + "bundled": true, + "dev": true + }, + "safer-buffer": { + "version": "2.1.2", + "bundled": true, + "dev": true, + "optional": true + }, + "sax": { + "version": "1.2.4", + "bundled": true, + "dev": true, + "optional": true + }, + "semver": { + "version": "5.7.0", + "bundled": true, + "dev": true, + "optional": true + }, + "set-blocking": { + "version": "2.0.0", + "bundled": true, + "dev": true, + "optional": true + }, + "signal-exit": { + "version": "3.0.2", + "bundled": true, + "dev": true, + "optional": true + }, + "string-width": { + "version": "1.0.2", + "bundled": true, + "dev": 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, + "dev": true, + "optional": true, + "requires": { + "safe-buffer": "~5.1.0" + } + }, + "strip-ansi": { + "version": "3.0.1", + "bundled": true, + "dev": true, + "requires": { + "ansi-regex": "^2.0.0" + } + }, + "strip-json-comments": { + "version": "2.0.1", + "bundled": true, + "dev": true, + "optional": true + }, + "tar": { + "version": "4.4.8", + "bundled": true, + "dev": 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, + "dev": true, + "optional": true + }, + "wide-align": { + "version": "1.1.3", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "string-width": "^1.0.2 || 2" + } + }, + "wrappy": { + "version": "1.0.2", + "bundled": true, + "dev": true + }, + "yallist": { + "version": "3.0.3", + "bundled": true, + "dev": true + } + } + }, + "function-bind": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", + "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==", + "dev": true + }, + "g-status": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/g-status/-/g-status-2.0.2.tgz", + "integrity": "sha512-kQoE9qH+T1AHKgSSD0Hkv98bobE90ILQcXAF4wvGgsr7uFqNvwmh8j+Lq3l0RVt3E3HjSbv2B9biEGcEtpHLCA==", + "dev": true, + "requires": { + "arrify": "^1.0.1", + "matcher": "^1.0.0", + "simple-git": "^1.85.0" + } + }, + "get-caller-file": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", + "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", + "dev": true + }, "get-func-name": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/get-func-name/-/get-func-name-2.0.0.tgz", @@ -1920,6 +2924,83 @@ "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", + "integrity": "sha1-nmr2KZ2NO9K9QEMIMr0RPfkGxa4=", + "dev": 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=", + "dev": true, + "requires": { + "is-extglob": "^2.1.0" + } + } + } + }, + "glob-stream": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/glob-stream/-/glob-stream-6.1.0.tgz", + "integrity": "sha1-cEXJlBOz65SIjYOrRtC0BMx73eQ=", + "dev": true, + "requires": { + "extend": "^3.0.0", + "glob": "^7.1.1", + "glob-parent": "^3.1.0", + "is-negated-glob": "^1.0.0", + "ordered-read-streams": "^1.0.0", + "pumpify": "^1.3.5", + "readable-stream": "^2.1.5", + "remove-trailing-separator": "^1.0.1", + "to-absolute-glob": "^2.0.0", + "unique-stream": "^2.0.2" + } + }, + "glob-watcher": { + "version": "5.0.3", + "resolved": "https://registry.npmjs.org/glob-watcher/-/glob-watcher-5.0.3.tgz", + "integrity": "sha512-8tWsULNEPHKQ2MR4zXuzSmqbdyV5PtwwCaWSGQ1WwHsJ07ilNeN1JB8ntxhckbnpSHaf9dXFUHzIWvm1I13dsg==", + "dev": true, + "requires": { + "anymatch": "^2.0.0", + "async-done": "^1.2.0", + "chokidar": "^2.0.0", + "is-negated-glob": "^1.0.0", + "just-debounce": "^1.0.0", + "object.defaults": "^1.1.0" + } + }, + "global-modules": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/global-modules/-/global-modules-1.0.0.tgz", + "integrity": "sha512-sKzpEkf11GpOFuw0Zzjzmt4B4UZwjOcG757PPvrfhxcLFbq0wpsgpOqxpxtxFiCG4DtG93M6XRVbF2oGdev7bg==", + "dev": true, + "requires": { + "global-prefix": "^1.0.1", + "is-windows": "^1.0.1", + "resolve-dir": "^1.0.0" + } + }, + "global-prefix": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/global-prefix/-/global-prefix-1.0.2.tgz", + "integrity": "sha1-2/dDxsFJklk8ZVVoy2btMsASLr4=", + "dev": true, + "requires": { + "expand-tilde": "^2.0.2", + "homedir-polyfill": "^1.0.1", + "ini": "^1.3.4", + "is-windows": "^1.0.1", + "which": "^1.2.14" + } + }, "globals": { "version": "11.12.0", "resolved": "https://registry.npmjs.org/globals/-/globals-11.12.0.tgz", @@ -1947,12 +3028,190 @@ } } }, + "glogg": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/glogg/-/glogg-1.0.2.tgz", + "integrity": "sha512-5mwUoSuBk44Y4EshyiqcH95ZntbDdTQqA3QYSrxmzj28Ai0vXBGMH1ApSANH14j2sIRtqCEyg6PfsuP7ElOEDA==", + "dev": true, + "requires": { + "sparkles": "^1.0.0" + } + }, + "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==", + "dev": true + }, "growl": { "version": "1.10.5", "resolved": "https://registry.npmjs.org/growl/-/growl-1.10.5.tgz", "integrity": "sha512-qBr4OuELkhPenW6goKVXiv47US3clb3/IbuWF9KNKEijAy9oeHxU9IgzjvJhHkUzhaj7rOUD7+YGWqUjLp5oSA==", "dev": true }, + "gulp": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/gulp/-/gulp-4.0.2.tgz", + "integrity": "sha512-dvEs27SCZt2ibF29xYgmnwwCYZxdxhQ/+LFWlbAW8y7jt68L/65402Lz3+CKy0Ov4rOs+NERmDq7YlZaDqUIfA==", + "dev": true, + "requires": { + "glob-watcher": "^5.0.3", + "gulp-cli": "^2.2.0", + "undertaker": "^1.2.1", + "vinyl-fs": "^3.0.0" + }, + "dependencies": { + "ansi-colors": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-1.1.0.tgz", + "integrity": "sha512-SFKX67auSNoVR38N3L+nvsPjOE0bybKTYbkf5tRvushrAPQ9V75huw0ZxBkKVeRU9kqH3d6HA4xTckbwZ4ixmA==", + "dev": true, + "requires": { + "ansi-wrap": "^0.1.0" + } + }, + "camelcase": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-3.0.0.tgz", + "integrity": "sha1-MvxLn82vhF/N9+c7uXysImHwqwo=", + "dev": true + }, + "cliui": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-3.2.0.tgz", + "integrity": "sha1-EgYBU3qRbSmUD5NNo7SNWFo5IT0=", + "dev": true, + "requires": { + "string-width": "^1.0.1", + "strip-ansi": "^3.0.1", + "wrap-ansi": "^2.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==", + "dev": true + }, + "gulp-cli": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/gulp-cli/-/gulp-cli-2.2.0.tgz", + "integrity": "sha512-rGs3bVYHdyJpLqR0TUBnlcZ1O5O++Zs4bA0ajm+zr3WFCfiSLjGwoCBqFs18wzN+ZxahT9DkOK5nDf26iDsWjA==", + "dev": true, + "requires": { + "ansi-colors": "^1.0.1", + "archy": "^1.0.0", + "array-sort": "^1.0.0", + "color-support": "^1.1.3", + "concat-stream": "^1.6.0", + "copy-props": "^2.0.1", + "fancy-log": "^1.3.2", + "gulplog": "^1.0.0", + "interpret": "^1.1.0", + "isobject": "^3.0.1", + "liftoff": "^3.1.0", + "matchdep": "^2.0.0", + "mute-stdout": "^1.0.0", + "pretty-hrtime": "^1.0.0", + "replace-homedir": "^1.0.0", + "semver-greatest-satisfied-range": "^1.1.0", + "v8flags": "^3.0.1", + "yargs": "^7.1.0" + } + }, + "invert-kv": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/invert-kv/-/invert-kv-1.0.0.tgz", + "integrity": "sha1-EEqOSqym09jNFXqO+L+rLXo//bY=", + "dev": true + }, + "lcid": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/lcid/-/lcid-1.0.0.tgz", + "integrity": "sha1-MIrMr6C8SDo4Z7S28rlQYlHRuDU=", + "dev": true, + "requires": { + "invert-kv": "^1.0.0" + } + }, + "os-locale": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/os-locale/-/os-locale-1.4.0.tgz", + "integrity": "sha1-IPnxeuKe00XoveWDsT0gCYA8FNk=", + "dev": true, + "requires": { + "lcid": "^1.0.0" + } + }, + "require-main-filename": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-1.0.1.tgz", + "integrity": "sha1-l/cXtp1IeE9fUmpsWqj/3aBVpNE=", + "dev": true + }, + "which-module": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/which-module/-/which-module-1.0.0.tgz", + "integrity": "sha1-u6Y8qGGUiZT/MHc2CJ47lgJsKk8=", + "dev": true + }, + "wrap-ansi": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-2.1.0.tgz", + "integrity": "sha1-2Pw9KE3QV5T+hJc8rs3Rz4JP3YU=", + "dev": true, + "requires": { + "string-width": "^1.0.1", + "strip-ansi": "^3.0.1" + } + }, + "y18n": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/y18n/-/y18n-3.2.1.tgz", + "integrity": "sha1-bRX7qITAhnnA136I53WegR4H+kE=", + "dev": true + }, + "yargs": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-7.1.0.tgz", + "integrity": "sha1-a6MY6xaWFyf10oT46gA+jWFU0Mg=", + "dev": true, + "requires": { + "camelcase": "^3.0.0", + "cliui": "^3.2.0", + "decamelize": "^1.1.1", + "get-caller-file": "^1.0.1", + "os-locale": "^1.4.0", + "read-pkg-up": "^1.0.1", + "require-directory": "^2.1.1", + "require-main-filename": "^1.0.1", + "set-blocking": "^2.0.0", + "string-width": "^1.0.2", + "which-module": "^1.0.0", + "y18n": "^3.2.1", + "yargs-parser": "^5.0.0" + } + }, + "yargs-parser": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-5.0.0.tgz", + "integrity": "sha1-J17PDX/+Bcd+ZOfIbkzZS/DhIoo=", + "dev": true, + "requires": { + "camelcase": "^3.0.0" + } + } + } + }, + "gulplog": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/gulplog/-/gulplog-1.0.0.tgz", + "integrity": "sha1-4oxNRdBey77YGDY86PnFkmIp/+U=", + "dev": true, + "requires": { + "glogg": "^1.0.0" + } + }, "has": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", @@ -2021,6 +3280,15 @@ "integrity": "sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw==", "dev": true }, + "homedir-polyfill": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/homedir-polyfill/-/homedir-polyfill-1.0.3.tgz", + "integrity": "sha512-eSmmWE5bZTK2Nou4g0AI3zZ9rswp7GRKoKXS1BLUkvPviOqs4YTN1djQIqrXy9k5gEtdLPy86JjRwsNM9tnDcA==", + "dev": 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", @@ -2086,6 +3354,18 @@ "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=", "dev": true }, + "ini": { + "version": "1.3.5", + "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.5.tgz", + "integrity": "sha512-RZY5huIKCMRWDUqZlEi72f/lmXKMvuszcMBduliQ3nnWbx9X/ZBQO7DijMEYS9EhHBb2qacRUMtC7svLwe0lcw==", + "dev": true + }, + "interpret": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/interpret/-/interpret-1.2.0.tgz", + "integrity": "sha512-mT34yGKMNceBQUoVn7iCDKDntA7SC6gycMAWzGx1z/CMCTV7b2AAtXlo3nRyHZ1FelRkQbQjprHSYGwzLtkVbw==", + "dev": true + }, "invariant": { "version": "2.2.4", "resolved": "https://registry.npmjs.org/invariant/-/invariant-2.2.4.tgz", @@ -2101,6 +3381,16 @@ "integrity": "sha512-wPVv/y/QQ/Uiirj/vh3oP+1Ww+AWehmi1g5fFWGPF6IpCBCDVrhgHRMvrLfdYcwDh3QJbGXDW4JAuzxElLSqKA==", "dev": true }, + "is-absolute": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-absolute/-/is-absolute-1.0.0.tgz", + "integrity": "sha512-dOWoqflvcydARa360Gvv18DZ/gRuHKi2NU/wU5X1ZFzdYfH29nkiNZsF3mp4OJ3H4yo9Mx8A/uAGNzpzPN3yBA==", + "dev": true, + "requires": { + "is-relative": "^1.0.0", + "is-windows": "^1.0.1" + } + }, "is-accessor-descriptor": { "version": "0.1.6", "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz", @@ -2127,6 +3417,15 @@ "integrity": "sha1-d8mYQFJ6qOyxqLppe4BkWnqSap0=", "dev": 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=", + "dev": 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", @@ -2235,6 +3534,12 @@ "integrity": "sha1-Mlj7afeMFNW4FdZkM2tM/7ZEFZE=", "dev": true }, + "is-negated-glob": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-negated-glob/-/is-negated-glob-1.0.0.tgz", + "integrity": "sha1-aRC8pdqMleeEtXUbl2z1oQ/uNtI=", + "dev": true + }, "is-number": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/is-number/-/is-number-3.0.0.tgz", @@ -2324,6 +3629,15 @@ "integrity": "sha1-/S2INUXEa6xaYz57mgnof6LLUGk=", "dev": true }, + "is-relative": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-relative/-/is-relative-1.0.0.tgz", + "integrity": "sha512-Kw/ReK0iqwKeu0MITLFuj0jbPAmEiOsIwyIXvvbfa6QfmN9pkD1M+8pdk7Rl/dTKbH34/XBFMbgD4iMJhLQbGA==", + "dev": true, + "requires": { + "is-unc-path": "^1.0.0" + } + }, "is-stream": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-1.1.0.tgz", @@ -2339,6 +3653,27 @@ "has-symbols": "^1.0.0" } }, + "is-unc-path": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-unc-path/-/is-unc-path-1.0.0.tgz", + "integrity": "sha512-mrGpVd0fs7WWLfVsStvgF6iEJnbjDFZh9/emhRDcGWTduTfNHd9CHeUwH3gYIjdbwo4On6hunkztwOaAw0yllQ==", + "dev": true, + "requires": { + "unc-path-regex": "^0.1.2" + } + }, + "is-utf8": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/is-utf8/-/is-utf8-0.2.1.tgz", + "integrity": "sha1-Sw2hRCEE0bM2NA6AeX6GXPOffXI=", + "dev": true + }, + "is-valid-glob": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-valid-glob/-/is-valid-glob-1.0.0.tgz", + "integrity": "sha1-Kb8+/3Ab4tTTFdusw5vDn+j2Aao=", + "dev": true + }, "is-windows": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/is-windows/-/is-windows-1.0.2.tgz", @@ -2428,6 +3763,12 @@ "integrity": "sha512-mrqyZKfX5EhL7hvqcV6WG1yYjnjeuYDzDhhcAAUrq8Po85NBQBJP+ZDUT75qZQ98IkUoBqdkExkukOU7Ts2wrw==", "dev": true }, + "json-stable-stringify-without-jsonify": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz", + "integrity": "sha1-nbe1lJatPzz+8wp1FC0tkwrXJlE=", + "dev": true + }, "json5": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/json5/-/json5-2.1.0.tgz", @@ -2437,12 +3778,37 @@ "minimist": "^1.2.0" } }, + "just-debounce": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/just-debounce/-/just-debounce-1.0.0.tgz", + "integrity": "sha1-h/zPrv/AtozRnVX2cilD+SnqNeo=", + "dev": true + }, "kind-of": { "version": "6.0.2", "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.2.tgz", "integrity": "sha512-s5kLOcnH0XqDO+FvuaLX8DDjZ18CGFk7VygH40QoKPUQhW4e2rvM0rwUq0t8IQDOwYSeLK01U90OjzBTme2QqA==", "dev": true }, + "last-run": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/last-run/-/last-run-1.1.1.tgz", + "integrity": "sha1-RblpQsF7HHnHchmCWbqUO+v4yls=", + "dev": true, + "requires": { + "default-resolution": "^2.0.0", + "es6-weak-map": "^2.0.1" + } + }, + "lazystream": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/lazystream/-/lazystream-1.0.0.tgz", + "integrity": "sha1-9plf4PggOS9hOWvolGJAe7dxaOQ=", + "dev": true, + "requires": { + "readable-stream": "^2.0.5" + } + }, "lcid": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/lcid/-/lcid-2.0.0.tgz", @@ -2452,6 +3818,31 @@ "invert-kv": "^2.0.0" } }, + "lead": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/lead/-/lead-1.0.0.tgz", + "integrity": "sha1-bxT5mje+Op3XhPVJVpDlkDRm7kI=", + "dev": true, + "requires": { + "flush-write-stream": "^1.0.2" + } + }, + "liftoff": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/liftoff/-/liftoff-3.1.0.tgz", + "integrity": "sha512-DlIPlJUkCV0Ips2zf2pJP0unEoT1kwYhiiPUGF3s/jtxTCjziNLoiVVh+jqWOWeFi6mmwQ5fNxvAUyPad4Dfog==", + "dev": true, + "requires": { + "extend": "^3.0.0", + "findup-sync": "^3.0.0", + "fined": "^1.0.1", + "flagged-respawn": "^1.0.0", + "is-plain-object": "^2.0.4", + "object.map": "^1.0.0", + "rechoir": "^0.6.2", + "resolve": "^1.1.7" + } + }, "lint-staged": { "version": "8.1.7", "resolved": "https://registry.npmjs.org/lint-staged/-/lint-staged-8.1.7.tgz", @@ -2602,6 +3993,36 @@ } } }, + "load-json-file": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-1.1.0.tgz", + "integrity": "sha1-lWkFcI1YtLq0wiYbBPWfMcmTdMA=", + "dev": true, + "requires": { + "graceful-fs": "^4.1.2", + "parse-json": "^2.2.0", + "pify": "^2.0.0", + "pinkie-promise": "^2.0.0", + "strip-bom": "^2.0.0" + }, + "dependencies": { + "parse-json": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-2.2.0.tgz", + "integrity": "sha1-9ID0BDTvgHQfhGkJn43qGPVaTck=", + "dev": true, + "requires": { + "error-ex": "^1.2.0" + } + }, + "pify": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", + "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=", + "dev": true + } + } + }, "locate-path": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-3.0.0.tgz", @@ -2653,7 +4074,16 @@ "integrity": "sha512-iLs9mPjh9IuTtRsqqhNGYcZXGei0Nh/A4xirrsqW7c+QhKVFL2vm7U09ru6cHRD22azaP/wMDgI+HCqbETMTtg==", "dev": true, "requires": { - "sourcemap-codec": "^1.4.4" + "sourcemap-codec": "^1.4.4" + } + }, + "make-iterator": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/make-iterator/-/make-iterator-1.0.1.tgz", + "integrity": "sha512-pxiuXh0iVEq7VM7KMIhs5gxsfxCux2URptUQaXo4iZZJxBAzTPOLE2BumO5dbfVYq/hBJFBR/a1mFDmOx5AGmw==", + "dev": true, + "requires": { + "kind-of": "^6.0.2" } }, "map-age-cleaner": { @@ -2680,6 +4110,41 @@ "object-visit": "^1.0.0" } }, + "matchdep": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/matchdep/-/matchdep-2.0.0.tgz", + "integrity": "sha1-xvNINKDY28OzfCfui7yyfHd1WC4=", + "dev": true, + "requires": { + "findup-sync": "^2.0.0", + "micromatch": "^3.0.4", + "resolve": "^1.4.0", + "stack-trace": "0.0.10" + }, + "dependencies": { + "findup-sync": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/findup-sync/-/findup-sync-2.0.0.tgz", + "integrity": "sha1-kyaxSIwi0aYIhlCoaQGy2akKLLw=", + "dev": true, + "requires": { + "detect-file": "^1.0.0", + "is-glob": "^3.1.0", + "micromatch": "^3.0.4", + "resolve-dir": "^1.0.1" + } + }, + "is-glob": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-3.1.0.tgz", + "integrity": "sha1-e6WuJCF4BKxwcHuWkiVnSGzD6Eo=", + "dev": true, + "requires": { + "is-extglob": "^2.1.0" + } + } + } + }, "matcher": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/matcher/-/matcher-1.1.1.tgz", @@ -2878,6 +4343,19 @@ "tslib": "^1.9.3" } }, + "mute-stdout": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/mute-stdout/-/mute-stdout-1.0.1.tgz", + "integrity": "sha512-kDcwXR4PS7caBpuRYYBUz9iVixUk3anO3f5OYFiIPwK/20vCzKCHyKoulbiDY1S53zD2bxUpxN/IJ+TnXjfvxg==", + "dev": true + }, + "nan": { + "version": "2.14.0", + "resolved": "https://registry.npmjs.org/nan/-/nan-2.14.0.tgz", + "integrity": "sha512-INOFj37C7k3AfaNTtX8RhsTw7qRy7eLET14cROi9+5HAVbbHuIWUHEauBv5qT4Av2tWasiTY1Jw6puUNqRJXQg==", + "dev": true, + "optional": true + }, "nanomatch": { "version": "1.2.13", "resolved": "https://registry.npmjs.org/nanomatch/-/nanomatch-1.2.13.tgz", @@ -2897,6 +4375,12 @@ "to-regex": "^3.0.1" } }, + "next-tick": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/next-tick/-/next-tick-1.0.0.tgz", + "integrity": "sha1-yobR/ogoFpsBICCOPchCS524NCw=", + "dev": true + }, "nice-try": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/nice-try/-/nice-try-1.0.5.tgz", @@ -2944,6 +4428,24 @@ "validate-npm-package-license": "^3.0.1" } }, + "normalize-path": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-2.1.1.tgz", + "integrity": "sha1-GrKLVW4Zg2Oowab35vogE3/mrtk=", + "dev": true, + "requires": { + "remove-trailing-separator": "^1.0.1" + } + }, + "now-and-later": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/now-and-later/-/now-and-later-2.0.1.tgz", + "integrity": "sha512-KGvQ0cB70AQfg107Xvs/Fbu+dGmZoTRJp2TaPwcwQm3/7PteUyN2BCgk8KBMPGBUXZdVwyWS8fDCGFygBm19UQ==", + "dev": true, + "requires": { + "once": "^1.3.2" + } + }, "npm-path": { "version": "2.0.4", "resolved": "https://registry.npmjs.org/npm-path/-/npm-path-2.0.4.tgz", @@ -3043,6 +4545,18 @@ "object-keys": "^1.0.11" } }, + "object.defaults": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/object.defaults/-/object.defaults-1.1.0.tgz", + "integrity": "sha1-On+GgzS0B96gbaFtiNXNKeQ1/s8=", + "dev": true, + "requires": { + "array-each": "^1.0.1", + "array-slice": "^1.0.0", + "for-own": "^1.0.0", + "isobject": "^3.0.0" + } + }, "object.getownpropertydescriptors": { "version": "2.0.3", "resolved": "https://registry.npmjs.org/object.getownpropertydescriptors/-/object.getownpropertydescriptors-2.0.3.tgz", @@ -3053,6 +4567,16 @@ "es-abstract": "^1.5.1" } }, + "object.map": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/object.map/-/object.map-1.0.1.tgz", + "integrity": "sha1-z4Plncj8wK1fQlDh94s7gb2AHTc=", + "dev": true, + "requires": { + "for-own": "^1.0.0", + "make-iterator": "^1.0.0" + } + }, "object.pick": { "version": "1.3.0", "resolved": "https://registry.npmjs.org/object.pick/-/object.pick-1.3.0.tgz", @@ -3062,6 +4586,16 @@ "isobject": "^3.0.1" } }, + "object.reduce": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/object.reduce/-/object.reduce-1.0.1.tgz", + "integrity": "sha1-b+NI8qx/oPlcpiEiZZkJaCW7A60=", + "dev": true, + "requires": { + "for-own": "^1.0.0", + "make-iterator": "^1.0.0" + } + }, "once": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", @@ -3080,6 +4614,15 @@ "mimic-fn": "^1.0.0" } }, + "ordered-read-streams": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/ordered-read-streams/-/ordered-read-streams-1.0.1.tgz", + "integrity": "sha1-d8DLN8QVJdZBZtmQ/61+xqDhNj4=", + "dev": true, + "requires": { + "readable-stream": "^2.0.1" + } + }, "os-locale": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/os-locale/-/os-locale-3.1.0.tgz", @@ -3139,6 +4682,17 @@ "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", "dev": true }, + "parse-filepath": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/parse-filepath/-/parse-filepath-1.0.2.tgz", + "integrity": "sha1-pjISf1Oq89FYdvWHLz/6x2PWyJE=", + "dev": true, + "requires": { + "is-absolute": "^1.0.0", + "map-cache": "^0.2.0", + "path-root": "^0.1.1" + } + }, "parse-json": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-4.0.0.tgz", @@ -3149,12 +4703,30 @@ "json-parse-better-errors": "^1.0.1" } }, + "parse-node-version": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/parse-node-version/-/parse-node-version-1.0.1.tgz", + "integrity": "sha512-3YHlOa/JgH6Mnpr05jP9eDG254US9ek25LyIxZlDItp2iJtwyaXQb57lBYLdT3MowkUFYEV2XXNAYIPlESvJlA==", + "dev": true + }, + "parse-passwd": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/parse-passwd/-/parse-passwd-1.0.0.tgz", + "integrity": "sha1-bVuTSkVpk7I9N/QKOC1vFmao5cY=", + "dev": true + }, "pascalcase": { "version": "0.1.1", "resolved": "https://registry.npmjs.org/pascalcase/-/pascalcase-0.1.1.tgz", "integrity": "sha1-s2PlXoAGym/iF4TS2yK9FdeRfxQ=", "dev": true }, + "path-dirname": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/path-dirname/-/path-dirname-1.0.2.tgz", + "integrity": "sha1-zDPSTVJeCZpTiMAzbG4yuRYGCeA=", + "dev": true + }, "path-exists": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz", @@ -3185,6 +4757,40 @@ "integrity": "sha512-GSmOT2EbHrINBf9SR7CDELwlJ8AENk3Qn7OikK4nFYAu3Ote2+JYNVvkpAEQm3/TLNEJFD/xZJjzyxg3KBWOzw==", "dev": true }, + "path-root": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/path-root/-/path-root-0.1.1.tgz", + "integrity": "sha1-mkpoFMrBwM1zNgqV8yCDyOpHRbc=", + "dev": true, + "requires": { + "path-root-regex": "^0.1.0" + } + }, + "path-root-regex": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/path-root-regex/-/path-root-regex-0.1.2.tgz", + "integrity": "sha1-v8zcjfWxLcUsi0PsONGNcsBLqW0=", + "dev": true + }, + "path-type": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/path-type/-/path-type-1.1.0.tgz", + "integrity": "sha1-WcRPfuSR2nBNpBXaWkBwuk+P5EE=", + "dev": true, + "requires": { + "graceful-fs": "^4.1.2", + "pify": "^2.0.0", + "pinkie-promise": "^2.0.0" + }, + "dependencies": { + "pify": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", + "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=", + "dev": true + } + } + }, "pathval": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/pathval/-/pathval-1.1.0.tgz", @@ -3242,6 +4848,12 @@ "integrity": "sha512-TzGRNvuUSmPgwivDqkZ9tM/qTGW9hqDKWOE9YHiyQdixlKbv7kvEqsmDPrcHJTKwthU774TQwZXVtaQ/mMsvjg==", "dev": true }, + "pretty-hrtime": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/pretty-hrtime/-/pretty-hrtime-1.0.3.tgz", + "integrity": "sha1-t+PqQkNaTJsnWdmeDyAesZWALuE=", + "dev": true + }, "private": { "version": "0.1.8", "resolved": "https://registry.npmjs.org/private/-/private-0.1.8.tgz", @@ -3270,6 +4882,29 @@ "once": "^1.3.1" } }, + "pumpify": { + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/pumpify/-/pumpify-1.5.1.tgz", + "integrity": "sha512-oClZI37HvuUJJxSKKrC17bZ9Cu0ZYhEAGPsPUy9KlMUmv9dKX2o77RUmq7f3XjIxbwyGwYzbzQ1L2Ks8sIradQ==", + "dev": true, + "requires": { + "duplexify": "^3.6.0", + "inherits": "^2.0.3", + "pump": "^2.0.0" + }, + "dependencies": { + "pump": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/pump/-/pump-2.0.1.tgz", + "integrity": "sha512-ruPMNRkN3MHP1cWJc9OWr+T/xDP0jhXYCLfJcBuX54hhfIBnaQmAUMfDcG4DM5UMWByBbJY69QSphm3jtDKIkA==", + "dev": true, + "requires": { + "end-of-stream": "^1.1.0", + "once": "^1.3.1" + } + } + } + }, "read-pkg": { "version": "5.1.1", "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-5.1.1.tgz", @@ -3282,6 +4917,48 @@ "type-fest": "^0.4.1" } }, + "read-pkg-up": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-1.0.1.tgz", + "integrity": "sha1-nWPBMnbAZZGNV/ACpX9AobZD+wI=", + "dev": true, + "requires": { + "find-up": "^1.0.0", + "read-pkg": "^1.0.0" + }, + "dependencies": { + "find-up": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-1.1.2.tgz", + "integrity": "sha1-ay6YIrGizgpgq2TWEOzK1TyyTQ8=", + "dev": true, + "requires": { + "path-exists": "^2.0.0", + "pinkie-promise": "^2.0.0" + } + }, + "path-exists": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-2.1.0.tgz", + "integrity": "sha1-D+tsZPD8UY2adU3V77YscCJ2H0s=", + "dev": true, + "requires": { + "pinkie-promise": "^2.0.0" + } + }, + "read-pkg": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-1.1.0.tgz", + "integrity": "sha1-9f+qXs0pyzHAR0vKfXVra7KePyg=", + "dev": true, + "requires": { + "load-json-file": "^1.0.0", + "normalize-package-data": "^2.3.2", + "path-type": "^1.0.0" + } + } + } + }, "readable-stream": { "version": "2.3.6", "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz", @@ -3297,6 +4974,26 @@ "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==", + "dev": true, + "requires": { + "graceful-fs": "^4.1.11", + "micromatch": "^3.1.10", + "readable-stream": "^2.0.2" + } + }, + "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" + } + }, "regenerate": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/regenerate/-/regenerate-1.4.0.tgz", @@ -3379,6 +5076,33 @@ } } }, + "remove-bom-buffer": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/remove-bom-buffer/-/remove-bom-buffer-3.0.0.tgz", + "integrity": "sha512-8v2rWhaakv18qcvNeli2mZ/TMTL2nEyAKRvzo1WtnZBl15SHyEhrCu2/xKlJyUFKHiHgfXIyuY6g2dObJJycXQ==", + "dev": true, + "requires": { + "is-buffer": "^1.1.5", + "is-utf8": "^0.2.1" + } + }, + "remove-bom-stream": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/remove-bom-stream/-/remove-bom-stream-1.2.0.tgz", + "integrity": "sha1-BfGlk/FuQuH7kOv1nejlaVJflSM=", + "dev": true, + "requires": { + "remove-bom-buffer": "^3.0.0", + "safe-buffer": "^5.1.0", + "through2": "^2.0.3" + } + }, + "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=", + "dev": true + }, "repeat-element": { "version": "1.1.3", "resolved": "https://registry.npmjs.org/repeat-element/-/repeat-element-1.1.3.tgz", @@ -3391,6 +5115,23 @@ "integrity": "sha1-jcrkcOHIirwtYA//Sndihtp15jc=", "dev": true }, + "replace-ext": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/replace-ext/-/replace-ext-1.0.0.tgz", + "integrity": "sha1-3mMSg3P8v3w8z6TeWkgMRaZ5WOs=", + "dev": true + }, + "replace-homedir": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/replace-homedir/-/replace-homedir-1.0.0.tgz", + "integrity": "sha1-6H9tUTuSjd6AgmDBK+f+xv9ueYw=", + "dev": true, + "requires": { + "homedir-polyfill": "^1.0.1", + "is-absolute": "^1.0.0", + "remove-trailing-separator": "^1.1.0" + } + }, "require-directory": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", @@ -3412,12 +5153,31 @@ "path-parse": "^1.0.6" } }, + "resolve-dir": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/resolve-dir/-/resolve-dir-1.0.1.tgz", + "integrity": "sha1-eaQGRMNivoLybv/nOcm7U4IEb0M=", + "dev": true, + "requires": { + "expand-tilde": "^2.0.0", + "global-modules": "^1.0.0" + } + }, "resolve-from": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-3.0.0.tgz", "integrity": "sha1-six699nWiBvItuZTM17rywoYh0g=", "dev": true }, + "resolve-options": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/resolve-options/-/resolve-options-1.1.0.tgz", + "integrity": "sha1-MrueOcBtZzONyTeMDW1gdFZq0TE=", + "dev": true, + "requires": { + "value-or-function": "^3.0.0" + } + }, "resolve-url": { "version": "0.2.1", "resolved": "https://registry.npmjs.org/resolve-url/-/resolve-url-0.2.1.tgz", @@ -3572,6 +5332,15 @@ "integrity": "sha1-De4hahyUGrN+nvsXiPavxf9VN/w=", "dev": true }, + "semver-greatest-satisfied-range": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/semver-greatest-satisfied-range/-/semver-greatest-satisfied-range-1.1.0.tgz", + "integrity": "sha1-E+jCZYq5aRywzXEJMkAoDTb3els=", + "dev": true, + "requires": { + "sver-compat": "^1.5.0" + } + }, "serialize-javascript": { "version": "1.7.0", "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-1.7.0.tgz", @@ -3820,6 +5589,12 @@ "integrity": "sha512-CYAPYdBu34781kLHkaW3m6b/uUSyMOC2R61gcYMWooeuaGtjof86ZA/8T+qVPPt7np1085CR9hmMGrySwEc8Xg==", "dev": true }, + "sparkles": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/sparkles/-/sparkles-1.0.1.tgz", + "integrity": "sha512-dSO0DDYUahUt/0/pD/Is3VIm5TGJjludZ0HVymmhYF6eNA53PVLhnUk0znSYbH8IYBuJdCE+1luR22jNLMaQdw==", + "dev": true + }, "spdx-correct": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/spdx-correct/-/spdx-correct-3.1.0.tgz", @@ -3867,6 +5642,12 @@ "integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=", "dev": true }, + "stack-trace": { + "version": "0.0.10", + "resolved": "https://registry.npmjs.org/stack-trace/-/stack-trace-0.0.10.tgz", + "integrity": "sha1-VHxws0fo0ytOEI6hoqFZ5f3eGcA=", + "dev": true + }, "staged-git-files": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/staged-git-files/-/staged-git-files-1.1.2.tgz", @@ -3894,6 +5675,18 @@ } } }, + "stream-exhaust": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/stream-exhaust/-/stream-exhaust-1.0.2.tgz", + "integrity": "sha512-b/qaq/GlBK5xaq1yrK9/zFcyRSTNxmcZwFLGSTG0mXgZl/4Z6GgiyYOXOvY7N3eEvFRAG1bkDRz5EPGSvPYQlw==", + "dev": true + }, + "stream-shift": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/stream-shift/-/stream-shift-1.0.0.tgz", + "integrity": "sha1-1cdSgl5TZ+eG944Y5EXqIjoVWVI=", + "dev": true + }, "string-argv": { "version": "0.0.2", "resolved": "https://registry.npmjs.org/string-argv/-/string-argv-0.0.2.tgz", @@ -3940,6 +5733,15 @@ "ansi-regex": "^2.0.0" } }, + "strip-bom": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-2.0.0.tgz", + "integrity": "sha1-YhmoVhZSBJHzV4i9vxRHqZx+aw4=", + "dev": true, + "requires": { + "is-utf8": "^0.2.0" + } + }, "strip-eof": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/strip-eof/-/strip-eof-1.0.0.tgz", @@ -3961,6 +5763,16 @@ "has-flag": "^3.0.0" } }, + "sver-compat": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/sver-compat/-/sver-compat-1.5.0.tgz", + "integrity": "sha1-PPh9/rTQe0o/FIJ7wYaz/QxkXNg=", + "dev": true, + "requires": { + "es6-iterator": "^2.0.1", + "es6-symbol": "^3.1.1" + } + }, "symbol-observable": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/symbol-observable/-/symbol-observable-1.2.0.tgz", @@ -3992,6 +5804,42 @@ } } }, + "through2": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/through2/-/through2-2.0.5.tgz", + "integrity": "sha512-/mrRod8xqpA+IHSLyGCQ2s8SPHiCDEeQJSep1jqLYeEUClOFG2Qsh+4FU6G9VeqpZnGW/Su8LQGc4YKni5rYSQ==", + "dev": true, + "requires": { + "readable-stream": "~2.3.6", + "xtend": "~4.0.1" + } + }, + "through2-filter": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/through2-filter/-/through2-filter-3.0.0.tgz", + "integrity": "sha512-jaRjI2WxN3W1V8/FMZ9HKIBXixtiqs3SQSX4/YGIiP3gL6djW48VoZq9tDqeCWs3MT8YY5wb/zli8VW8snY1CA==", + "dev": true, + "requires": { + "through2": "~2.0.0", + "xtend": "~4.0.0" + } + }, + "time-stamp": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/time-stamp/-/time-stamp-1.1.0.tgz", + "integrity": "sha1-dkpaEa9QVhkhsTPztE5hhofg9cM=", + "dev": true + }, + "to-absolute-glob": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/to-absolute-glob/-/to-absolute-glob-2.0.2.tgz", + "integrity": "sha1-GGX0PZ50sIItufFFt4z/fQ98hJs=", + "dev": true, + "requires": { + "is-absolute": "^1.0.0", + "is-negated-glob": "^1.0.0" + } + }, "to-fast-properties": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-2.0.0.tgz", @@ -4040,6 +5888,15 @@ "repeat-string": "^1.6.1" } }, + "to-through": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/to-through/-/to-through-2.0.0.tgz", + "integrity": "sha1-/JKtq6ByZHvAtn1rA2ZKoZUJOvY=", + "dev": true, + "requires": { + "through2": "^2.0.3" + } + }, "toposort": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/toposort/-/toposort-2.0.2.tgz", @@ -4113,6 +5970,12 @@ "integrity": "sha512-IwzA/LSfD2vC1/YDYMv/zHP4rDF1usCwllsDpbolT3D4fUepIO7f9K70jjmUewU/LmGUKJcwcVtDCpnKk4BPMw==", "dev": true }, + "typedarray": { + "version": "0.0.6", + "resolved": "https://registry.npmjs.org/typedarray/-/typedarray-0.0.6.tgz", + "integrity": "sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c=", + "dev": true + }, "typescript": { "version": "3.4.5", "resolved": "https://registry.npmjs.org/typescript/-/typescript-3.4.5.tgz", @@ -4143,6 +6006,35 @@ } } }, + "unc-path-regex": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/unc-path-regex/-/unc-path-regex-0.1.2.tgz", + "integrity": "sha1-5z3T17DXxe2G+6xrCufYxqadUPo=", + "dev": true + }, + "undertaker": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/undertaker/-/undertaker-1.2.1.tgz", + "integrity": "sha512-71WxIzDkgYk9ZS+spIB8iZXchFhAdEo2YU8xYqBYJ39DIUIqziK78ftm26eecoIY49X0J2MLhG4hr18Yp6/CMA==", + "dev": true, + "requires": { + "arr-flatten": "^1.0.1", + "arr-map": "^2.0.0", + "bach": "^1.0.0", + "collection-map": "^1.0.0", + "es6-weak-map": "^2.0.1", + "last-run": "^1.1.0", + "object.defaults": "^1.0.0", + "object.reduce": "^1.0.0", + "undertaker-registry": "^1.0.0" + } + }, + "undertaker-registry": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/undertaker-registry/-/undertaker-registry-1.0.1.tgz", + "integrity": "sha1-XkvaMI5KiirlhPm5pDWaSZglzFA=", + "dev": true + }, "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", @@ -4206,6 +6098,16 @@ } } }, + "unique-stream": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/unique-stream/-/unique-stream-2.3.1.tgz", + "integrity": "sha512-2nY4TnBE70yoxHkDli7DMazpWiP7xMdCYqU2nBRO0UB+ZpEkGsSija7MvmvnZFUeC+mrgiUfcHSr3LmRFIg4+A==", + "dev": true, + "requires": { + "json-stable-stringify-without-jsonify": "^1.0.1", + "through2-filter": "^3.0.0" + } + }, "unset-value": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/unset-value/-/unset-value-1.0.0.tgz", @@ -4246,6 +6148,12 @@ } } }, + "upath": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/upath/-/upath-1.1.2.tgz", + "integrity": "sha512-kXpym8nmDmlCBr7nKdIx8P2jNBa+pBpIUFRnKJ4dr8htyYGJFokkr2ZvERRtUN+9SY+JqXouNgUPtv6JQva/2Q==", + "dev": true + }, "urix": { "version": "0.1.0", "resolved": "https://registry.npmjs.org/urix/-/urix-0.1.0.tgz", @@ -4264,6 +6172,15 @@ "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=", "dev": true }, + "v8flags": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/v8flags/-/v8flags-3.1.3.tgz", + "integrity": "sha512-amh9CCg3ZxkzQ48Mhcb8iX7xpAfYJgePHxWMQCBWECpOSqJUXgY26ncA61UTV0BkPqfhcy6mzwCIoP4ygxpW8w==", + "dev": 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", @@ -4274,6 +6191,66 @@ "spdx-expression-parse": "^3.0.0" } }, + "value-or-function": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/value-or-function/-/value-or-function-3.0.0.tgz", + "integrity": "sha1-HCQ6ULWVwb5Up1S/7OhWO5/42BM=", + "dev": true + }, + "vinyl": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/vinyl/-/vinyl-2.2.0.tgz", + "integrity": "sha512-MBH+yP0kC/GQ5GwBqrTPTzEfiiLjta7hTtvQtbxBgTeSXsmKQRQecjibMbxIXzVT3Y9KJK+drOz1/k+vsu8Nkg==", + "dev": true, + "requires": { + "clone": "^2.1.1", + "clone-buffer": "^1.0.0", + "clone-stats": "^1.0.0", + "cloneable-readable": "^1.0.0", + "remove-trailing-separator": "^1.0.1", + "replace-ext": "^1.0.0" + } + }, + "vinyl-fs": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/vinyl-fs/-/vinyl-fs-3.0.3.tgz", + "integrity": "sha512-vIu34EkyNyJxmP0jscNzWBSygh7VWhqun6RmqVfXePrOwi9lhvRs//dOaGOTRUQr4tx7/zd26Tk5WeSVZitgng==", + "dev": true, + "requires": { + "fs-mkdirp-stream": "^1.0.0", + "glob-stream": "^6.1.0", + "graceful-fs": "^4.0.0", + "is-valid-glob": "^1.0.0", + "lazystream": "^1.0.0", + "lead": "^1.0.0", + "object.assign": "^4.0.4", + "pumpify": "^1.3.5", + "readable-stream": "^2.3.3", + "remove-bom-buffer": "^3.0.0", + "remove-bom-stream": "^1.2.0", + "resolve-options": "^1.1.0", + "through2": "^2.0.0", + "to-through": "^2.0.0", + "value-or-function": "^3.0.0", + "vinyl": "^2.0.0", + "vinyl-sourcemap": "^1.1.0" + } + }, + "vinyl-sourcemap": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/vinyl-sourcemap/-/vinyl-sourcemap-1.1.0.tgz", + "integrity": "sha1-kqgAWTo4cDqM2xHYswCtS+Y7PhY=", + "dev": true, + "requires": { + "append-buffer": "^1.0.2", + "convert-source-map": "^1.5.0", + "graceful-fs": "^4.1.6", + "normalize-path": "^2.1.1", + "now-and-later": "^2.0.0", + "remove-bom-buffer": "^3.0.0", + "vinyl": "^2.0.0" + } + }, "whatwg-fetch": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/whatwg-fetch/-/whatwg-fetch-3.0.0.tgz", @@ -4353,6 +6330,12 @@ "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=", "dev": true }, + "xtend": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.1.tgz", + "integrity": "sha1-pcbVMr5lbiPbgg77lDofBJmNY68=", + "dev": true + }, "y18n": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/y18n/-/y18n-4.0.0.tgz", diff --git a/package.json b/package.json index 26397db51..28d4fe286 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,5 @@ { "name": "@microsoft/microsoft-graph-client", - "//": "NOTE: The version here should match exactly the exported const PACKAGE_VERSION in Constants.ts. If you change it here, also change it there.", "version": "2.0.0-Preview.1", "description": "Microsoft Graph Client Library", "main": "lib/src/index.js", @@ -21,6 +20,7 @@ "@types/mocha": "^5.2.6", "@types/node": "^11.13.9", "chai": "^4.2.0", + "gulp": "^4.0.2", "husky": "^2.2.0", "isomorphic-fetch": "^2.2.1", "lint-staged": "^8.1.5", @@ -38,9 +38,11 @@ "uglify-es": "^3.3.9" }, "scripts": { + "setVersion": "gulp setVersion", "build:es": "tsc --p tsconfig-es.json", "build:cjs": "tsc --p tsconfig-cjs.json", - "build": "npm run build:cjs && npm run build:es && rollup -c", + "pre-build": "npm run setVersion", + "build": "npm run pre-build && npm run build:cjs && npm run build:es && rollup -c", "test": "npm run build:cjs && mocha lib/spec/content && mocha lib/spec/core && mocha lib/spec/middleware && mocha lib/spec/tasks", "test:content": "tsc --p spec/tsconfig.json && mocha spec/content", "test:core": "tsc --p spec/tsconfig.json && mocha spec/core", diff --git a/scripts/src/gulpfile.js b/scripts/src/gulpfile.js index 6125bef93..964bcd90f 100644 --- a/scripts/src/gulpfile.js +++ b/scripts/src/gulpfile.js @@ -13,10 +13,10 @@ function ReplaceVersionInJson () { .pipe(dest("../../")); } -function ReplaceVersionInConstants () { - return src(["../../src/Constants.ts"]) +function ReplaceVersionInVersionFile () { + return src(["../../src/Version.ts"]) .pipe(replace(/PACKAGE_VERSION ?= ?".*?"/g, `PACKAGE_VERSION = "${argv.newVersion}"`)) .pipe(dest("../../src")); } -exports.ReplaceVersion = series(ReplaceVersionInJson, ReplaceVersionInConstants); +exports.ReplaceVersion = series(ReplaceVersionInJson, ReplaceVersionInVersionFile); diff --git a/spec/middleware/TelemetryHandler.ts b/spec/middleware/TelemetryHandler.ts index 26e39fba8..81f5c7809 100644 --- a/spec/middleware/TelemetryHandler.ts +++ b/spec/middleware/TelemetryHandler.ts @@ -7,11 +7,11 @@ import { assert } from "chai"; -import { PACKAGE_VERSION } from "../../src/Constants"; import { Context } from "../../src/IContext"; import { MiddlewareControl } from "../../src/middleware/MiddlewareControl"; import { FeatureUsageFlag, TelemetryHandlerOptions } from "../../src/middleware/options/TelemetryHandlerOptions"; import { TelemetryHandler } from "../../src/middleware/TelemetryHandler"; +import { PACKAGE_VERSION } from "../../src/Version"; import { DummyHTTPMessageHandler } from "../DummyHTTPMessageHandler"; describe("TelemetryHandler.ts", () => { diff --git a/spec/package-lock.json b/spec/package-lock.json index 9d16f3dd4..de8f2994e 100644 --- a/spec/package-lock.json +++ b/spec/package-lock.json @@ -2,17 +2,6 @@ "requires": true, "lockfileVersion": 1, "dependencies": { - "@microsoft/microsoft-graph-client": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/@microsoft/microsoft-graph-client/-/microsoft-graph-client-1.6.0.tgz", - "integrity": "sha512-jgOgWZOyrmFbeyiddCUOQ0Kd42JUz7x3F6de0iLlSxP2yT2xJlnhZGAtHPnJZgDS2KRBbPwuRd+dmiJdpOBMWQ==", - "dev": true, - "requires": { - "es6-promise": "^4.2.6", - "isomorphic-fetch": "^2.2.1", - "tslib": "^1.9.3" - } - }, "@microsoft/microsoft-graph-types": { "version": "1.8.0", "resolved": "https://registry.npmjs.org/@microsoft/microsoft-graph-types/-/microsoft-graph-types-1.8.0.tgz", diff --git a/spec/package.json b/spec/package.json index 2dc10bd6b..ff1dfe2b9 100644 --- a/spec/package.json +++ b/spec/package.json @@ -1,6 +1,5 @@ { "devDependencies": { - "@microsoft/microsoft-graph-client": "^1.6.0", "@microsoft/microsoft-graph-types": "^1.8.0", "@microsoft/microsoft-graph-types-beta": "microsoftgraph/msgraph-typescript-typings#beta", "@types/chai": "^4.1.7", diff --git a/src/Constants.ts b/src/Constants.ts index 4c1c92848..d22efcf74 100644 --- a/src/Constants.ts +++ b/src/Constants.ts @@ -20,11 +20,3 @@ export const GRAPH_API_VERSION = "v1.0"; * A Default base url for a request */ export const GRAPH_BASE_URL = "https://graph.microsoft.com/"; - -/** - * @constant - * A package version - * @NOTE: This should be kept up to date with the version used in package.json. - * If you are changing this please ensure you are also changing it in package.json. - */ -export const PACKAGE_VERSION = "2.0.0-Preview.1"; diff --git a/src/Version.ts b/src/Version.ts new file mode 100644 index 000000000..8d7420d0c --- /dev/null +++ b/src/Version.ts @@ -0,0 +1,15 @@ +/** + * ------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. + * See License in the project root for license information. + * ------------------------------------------------------------------------------------------- + */ + +// THIS FILE IS AUTO GENERATED +// ANY CHANGES WILL BE LOST DURING BUILD + +/** + * @module Version + */ + +export const PACKAGE_VERSION = "2.0.0-Preview.1"; diff --git a/src/middleware/TelemetryHandler.ts b/src/middleware/TelemetryHandler.ts index 0d114d9be..4e9225825 100644 --- a/src/middleware/TelemetryHandler.ts +++ b/src/middleware/TelemetryHandler.ts @@ -9,8 +9,8 @@ * @module TelemetryHandler */ -import { PACKAGE_VERSION } from "../Constants"; import { Context } from "../IContext"; +import { PACKAGE_VERSION } from "../Version"; import { Middleware } from "./IMiddleware"; import { MiddlewareControl } from "./MiddlewareControl"; From 97143042bec20b939cfc66338f804ebc9bd2e518 Mon Sep 17 00:00:00 2001 From: Muthurathinam Date: Thu, 30 May 2019 10:21:47 +0530 Subject: [PATCH 19/23] 2.0.0-Preview.0 --- package-lock.json | 2 +- package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/package-lock.json b/package-lock.json index e011f5bb9..8795c3c2b 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "@microsoft/microsoft-graph-client", - "version": "2.0.0-Preview.1", + "version": "2.0.0-Preview.0", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index 28d4fe286..fbc0d668d 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@microsoft/microsoft-graph-client", - "version": "2.0.0-Preview.1", + "version": "2.0.0-Preview.0", "description": "Microsoft Graph Client Library", "main": "lib/src/index.js", "module": "lib/es/index.js", From 01d698c1800d77d18cf970dea8cac3d65dcfe0e4 Mon Sep 17 00:00:00 2001 From: Muthurathinam Date: Thu, 30 May 2019 10:24:01 +0530 Subject: [PATCH 20/23] Picking correct preview version --- package-lock.json | 2 +- package.json | 2 +- src/Version.ts | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index 8795c3c2b..e011f5bb9 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "@microsoft/microsoft-graph-client", - "version": "2.0.0-Preview.0", + "version": "2.0.0-Preview.1", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index fbc0d668d..28d4fe286 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@microsoft/microsoft-graph-client", - "version": "2.0.0-Preview.0", + "version": "2.0.0-Preview.1", "description": "Microsoft Graph Client Library", "main": "lib/src/index.js", "module": "lib/es/index.js", diff --git a/src/Version.ts b/src/Version.ts index 8d7420d0c..f181533b3 100644 --- a/src/Version.ts +++ b/src/Version.ts @@ -12,4 +12,4 @@ * @module Version */ -export const PACKAGE_VERSION = "2.0.0-Preview.1"; +export const PACKAGE_VERSION = "2.0.0-Preview.0"; From e7c7f01a536910e317db2b9f1e85dd741edb4e5a Mon Sep 17 00:00:00 2001 From: Muthurathinam Date: Thu, 30 May 2019 10:31:40 +0530 Subject: [PATCH 21/23] Precommit hook will now add generated Version.ts file to commit --- .huskyrc | 2 +- src/Version.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.huskyrc b/.huskyrc index 65c9cae87..d8d81fd78 100644 --- a/.huskyrc +++ b/.huskyrc @@ -1,5 +1,5 @@ { "hooks": { - "pre-commit": "npm run pre-build && lint-staged && npm run lint && npm run test" + "pre-commit": "npm run pre-build && git add src/Version.ts && lint-staged && npm run lint && npm run test" } } diff --git a/src/Version.ts b/src/Version.ts index f181533b3..8d7420d0c 100644 --- a/src/Version.ts +++ b/src/Version.ts @@ -12,4 +12,4 @@ * @module Version */ -export const PACKAGE_VERSION = "2.0.0-Preview.0"; +export const PACKAGE_VERSION = "2.0.0-Preview.1"; From 0d30e21826123b5d7fa68fd2d5b5246b8b2312f6 Mon Sep 17 00:00:00 2001 From: Muthurathinam Date: Fri, 31 May 2019 09:33:45 +0530 Subject: [PATCH 22/23] Fix CI build error in gulpfile.js: async funcitons are not supported in node v6 --- gulpfile.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/gulpfile.js b/gulpfile.js index dfffe4675..f29abd129 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -21,10 +21,11 @@ ${moduleHeader} export const PACKAGE_VERSION = "[VERSION]"; `; -async function setVersion() { +function setVersion(cb) { var pkg = require("./package.json"); var fs = require("fs"); fs.writeFileSync("src/Version.ts", versionFile.replace("[VERSION]", pkg.version)); + cb(); } -exports.setVersion = series(setVersion); +exports.setVersion = setVersion; From 032f5599fe9216ccda91f96d4b61baa431b8e331 Mon Sep 17 00:00:00 2001 From: Muthurathinam Date: Wed, 19 Jun 2019 12:00:42 +0530 Subject: [PATCH 23/23] Renamed msalInstance as msalApplication --- README.md | 8 ++++---- docs/CreatingClientInstance.md | 4 ++-- samples/browser/src/main.js | 4 ++-- src/ImplicitMSALAuthenticationProvider.ts | 18 +++++++++--------- .../ImplicitMSALAuthenticationProvider.ts | 18 +++++++++--------- 5 files changed, 26 insertions(+), 26 deletions(-) diff --git a/README.md b/README.md index dfd7d2b51..ced52f908 100644 --- a/README.md +++ b/README.md @@ -80,9 +80,9 @@ const graphScopes = ["user.read", "mail.send"]; // An array of graph scopes // Important Note: This library implements loginPopup and acquireTokenPopup flow, remember this while initializing the msal // Initialize the MSAL @see https://github.com/AzureAD/microsoft-authentication-library-for-js#1-instantiate-the-useragentapplication -const msalInstance = new Msal.UserAgentApplication(msalConfig); +const msalApplication = new Msal.UserAgentApplication(msalConfig); const options = new MicrosoftGraph.MSALAuthenticationProviderOptions(graphScopes); -const authProvider = new MicrosoftGraph.ImplicitMSALAuthenticationProvider(msalInstance, options); +const authProvider = new MicrosoftGraph.ImplicitMSALAuthenticationProvider(msalApplication, options); ``` #### Creating an instance of ImplicitMSALAuthenticationProvider in node environment @@ -109,9 +109,9 @@ const graphScopes = ["user.read", "mail.send"]; // An array of graph scopes // Important Note: This library implements loginPopup and acquireTokenPopup flow, remember this while initializing the msal // Initialize the MSAL @see https://github.com/AzureAD/microsoft-authentication-library-for-js#1-instantiate-the-useragentapplication -const msalInstance = new UserAgentApplication(msalConfig); +const msalApplication = new UserAgentApplication(msalConfig); const options = new MicrosoftGraph.MSALAuthenticationProviderOptions(graphScopes); -const authProvider = new ImplicitMSALAuthenticationProvider(msalInstance, options); +const authProvider = new ImplicitMSALAuthenticationProvider(msalApplication, options); ``` User can integrate own preferred authentication library by implementing `IAuthenticationProvider` interface. Refer implementing [Custom Authentication Provider](./docs/CustomAuthenticationProvider.md). diff --git a/docs/CreatingClientInstance.md b/docs/CreatingClientInstance.md index a4551167d..52e81828b 100644 --- a/docs/CreatingClientInstance.md +++ b/docs/CreatingClientInstance.md @@ -24,10 +24,10 @@ const msalConfig = { // Important Note: This library implements loginPopup and acquireTokenPopup flow, remember this while initializing the msal // Initialize the MSAL @see https://github.com/AzureAD/microsoft-authentication-library-for-js#1-instantiate-the-useragentapplication -const msalInstance = new UserAgentApplication(msalConfig); +const msalApplication = new UserAgentApplication(msalConfig); const options = new MicrosoftGraph.MSALAuthenticationProviderOptions(); // An array of graph scopes let clientOptions: ClientOptions = { - authProvider: new ImplicitMSALAuthenticationProvider(msalInstance, options) + authProvider: new ImplicitMSALAuthenticationProvider(msalApplication, options) }; const client = Client.initWithMiddleware(clientOptions); ``` diff --git a/samples/browser/src/main.js b/samples/browser/src/main.js index dab7baab5..8fe681f02 100644 --- a/samples/browser/src/main.js +++ b/samples/browser/src/main.js @@ -16,9 +16,9 @@ const init = async () => { }, }; - var msalInstance = new Msal.UserAgentApplication(msalConfig); + var msalApplication = new Msal.UserAgentApplication(msalConfig); const msalOptions = new MicrosoftGraph.MSALAuthenticationProviderOptions(scopes); - const msalProvider = new MicrosoftGraph.ImplicitMSALAuthenticationProvider(msalInstance, msalOptions); + const msalProvider = new MicrosoftGraph.ImplicitMSALAuthenticationProvider(msalApplication, msalOptions); client = MicrosoftGraph.Client.initWithMiddleware({ debugLogging: true, authProvider: msalProvider, diff --git a/src/ImplicitMSALAuthenticationProvider.ts b/src/ImplicitMSALAuthenticationProvider.ts index 3b05c64e9..c5f4150c9 100644 --- a/src/ImplicitMSALAuthenticationProvider.ts +++ b/src/ImplicitMSALAuthenticationProvider.ts @@ -31,19 +31,19 @@ export class ImplicitMSALAuthenticationProvider implements AuthenticationProvide * @private * A member holding an instance of MSAL UserAgentApplication */ - private msalInstance: UserAgentApplication; + private msalApplication: UserAgentApplication; /** * @public * @constructor * Creates an instance of ImplicitMSALAuthenticationProvider - * @param {UserAgentApplication} msalInstance - An instance of MSAL UserAgentApplication + * @param {UserAgentApplication} msalApplication - An instance of MSAL UserAgentApplication * @param {MSALAuthenticationProviderOptions} options - An instance of MSALAuthenticationProviderOptions * @returns An instance of ImplicitMSALAuthenticationProvider */ - public constructor(msalInstance: UserAgentApplication, options: MSALAuthenticationProviderOptions) { + public constructor(msalApplication: UserAgentApplication, options: MSALAuthenticationProviderOptions) { this.options = options; - this.msalInstance = msalInstance; + this.msalApplication = msalApplication; } /** @@ -68,17 +68,17 @@ export class ImplicitMSALAuthenticationProvider implements AuthenticationProvide error.message = "Scopes cannot be empty, Please provide a scopes"; throw error; } - if (this.msalInstance.getAccount()) { + if (this.msalApplication.getAccount()) { const tokenRequest: AuthenticationParameters = { scopes, }; try { - const authResponse: AuthResponse = await this.msalInstance.acquireTokenSilent(tokenRequest); + const authResponse: AuthResponse = await this.msalApplication.acquireTokenSilent(tokenRequest); return authResponse.accessToken; } catch (error) { if (error instanceof InteractionRequiredAuthError) { try { - const authResponse: AuthResponse = await this.msalInstance.acquireTokenPopup(tokenRequest); + const authResponse: AuthResponse = await this.msalApplication.acquireTokenPopup(tokenRequest); return authResponse.accessToken; } catch (error) { throw error; @@ -90,8 +90,8 @@ export class ImplicitMSALAuthenticationProvider implements AuthenticationProvide const tokenRequest: AuthenticationParameters = { scopes, }; - await this.msalInstance.loginPopup(tokenRequest); - const authResponse: AuthResponse = await this.msalInstance.acquireTokenSilent(tokenRequest); + await this.msalApplication.loginPopup(tokenRequest); + const authResponse: AuthResponse = await this.msalApplication.acquireTokenSilent(tokenRequest); return authResponse.accessToken; } catch (error) { throw error; diff --git a/src/browser/ImplicitMSALAuthenticationProvider.ts b/src/browser/ImplicitMSALAuthenticationProvider.ts index 6cb030e5a..b57e2fd3c 100644 --- a/src/browser/ImplicitMSALAuthenticationProvider.ts +++ b/src/browser/ImplicitMSALAuthenticationProvider.ts @@ -35,19 +35,19 @@ export class ImplicitMSALAuthenticationProvider implements AuthenticationProvide * @private * A member holding an instance of MSAL */ - private msalInstance: any; + private msalApplication: any; /** * @public * @constructor * Creates an instance of ImplicitMSALAuthenticationProvider - * @param {any} msalInstance - An instance of MSAL UserAgentApplication + * @param {any} msalApplication - An instance of MSAL UserAgentApplication * @param {MSALAuthenticationProviderOptions} options - An instance of MSALAuthenticationProviderOptions * @returns An instance of ImplicitMSALAuthenticationProvider */ - public constructor(msalInstance: any, options: MSALAuthenticationProviderOptions) { + public constructor(msalApplication: any, options: MSALAuthenticationProviderOptions) { this.options = options; - this.msalInstance = msalInstance; + this.msalApplication = msalApplication; } /** @@ -73,17 +73,17 @@ export class ImplicitMSALAuthenticationProvider implements AuthenticationProvide throw error; } - if (this.msalInstance.getAccount()) { + if (this.msalApplication.getAccount()) { const tokenRequest = { scopes, }; try { - const authResponse = await this.msalInstance.acquireTokenSilent(tokenRequest); + const authResponse = await this.msalApplication.acquireTokenSilent(tokenRequest); return authResponse.accessToken; } catch (error) { if (error.name === "InteractionRequiredAuthError") { try { - const authResponse = await this.msalInstance.acquireTokenPopup(tokenRequest); + const authResponse = await this.msalApplication.acquireTokenPopup(tokenRequest); return authResponse.accessToken; } catch (error) { throw error; @@ -95,8 +95,8 @@ export class ImplicitMSALAuthenticationProvider implements AuthenticationProvide const tokenRequest = { scopes, }; - await this.msalInstance.loginPopup(tokenRequest); - const authResponse = await this.msalInstance.acquireTokenSilent(tokenRequest); + await this.msalApplication.loginPopup(tokenRequest); + const authResponse = await this.msalApplication.acquireTokenSilent(tokenRequest); return authResponse.accessToken; } catch (error) { throw error;