diff --git a/.vscode/launch.json b/.vscode/launch.json index b96928407f69..9a902f1bc5e7 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -4,34 +4,6 @@ // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 "version": "0.2.0", "configurations": [ - { - "type": "node", - "request": "launch", - "name": "EPH Tests", - "program": "${workspaceFolder}/processor/node_modules/mocha/bin/_mocha", - "args": [ - "-u", - "tdd", - "-r", - "ts-node/register", - "-t", - "999999", - "--colors", - "${workspaceFolder}/processor/tests/eph.spec.ts" - ], - "internalConsoleOptions": "openOnSessionStart", - "envFile": "${workspaceFolder}/processor/.env" // You can take a look at the sample.env file for supported environment variables. - }, - { - "type": "node", - "request": "launch", - "name": "EPH Example", - "program": "${workspaceFolder}/processor/examples/singleEph.ts", - "outFiles": [ - "${workspaceFolder}/processor/dist/**/*.js" - ], - "envFile": "${workspaceFolder}/processor/.env" // You can take a look at the sample.env file for supported environment variables. - }, { "type": "node", "request": "launch", diff --git a/processor/.vscode/launch.json b/processor/.vscode/launch.json new file mode 100644 index 000000000000..f284bff5a8fa --- /dev/null +++ b/processor/.vscode/launch.json @@ -0,0 +1,36 @@ +{ + // Use IntelliSense to learn about possible attributes. + // Hover to view descriptions of existing attributes. + // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 + "version": "0.2.0", + "configurations": [ + { + "type": "node", + "request": "launch", + "name": "EPH Tests", + "program": "${workspaceFolder}/node_modules/mocha/bin/_mocha", + "args": [ + "-u", + "tdd", + "--timeout", + "999999", + "--colors", + "${workspaceFolder}/test-dist/index.js" + ], + "internalConsoleOptions": "openOnSessionStart", + "preLaunchTask": "npm: build-test", + "envFile": "${workspaceFolder}/.env" // You can take a look at the sample.env file for supported environment variables. + }, + { + "type": "node", + "request": "launch", + "name": "EPH Example", + "program": "${workspaceFolder}/examples/singleEph.ts", + "outFiles": [ + "${workspaceFolder}/dist-esm/**/*.js" + ], + "preLaunchTask": "npm: build-samples", + "envFile": "${workspaceFolder}/.env" // You can take a look at the sample.env file for supported environment variables. + } + ] +} diff --git a/processor/examples/README.md b/processor/examples/README.md new file mode 100644 index 000000000000..af7d180f4ea1 --- /dev/null +++ b/processor/examples/README.md @@ -0,0 +1,48 @@ +## Getting started with samples ## + +## Building the library +- Clone the repo and cd to the repo directory +```bash +git clone https://github.com/Azure/azure-event-hubs-node.git +cd processor +``` +- Install typescript, ts-node globally (required for running the samples) +```bash +npm i -g typescript +npm i -g ts-node +``` +- NPM install from the root of the package +```bash +npm i +``` +- Build the project +```bash +npm run build +``` + +## Before executing a sample +- Go to the [Azure Portal](https://portal.azure.com). +- Here are the docs which would help you create a event hubs and eventhub/iothub resources in the portal : + - [Azure Event Hubs - NodeJS DOCS](https://docs.microsoft.com/en-us/azure/event-hubs/event-hubs-node-get-started-send). + - [Azure IoT Hubs - NodeJS DOCS](https://docs.microsoft.com/en-us/azure/iot-hub/iot-hub-node-node-module-twin-getstarted). +- In the portal, go to **Dashboard > Event Hubs > _your-eventhubs-namespace_**. +- Note down the "Primary Connection String" of **RootManageSharedAccessKey** at **Shared access policies** in the **Settings** section. +- Note down the name of the event hub that you created +> _Note : **RootManageSharedAccessKey** is automatically created for the namespace and has permissions for the entire namespace. If you want to use restricted access, refer [Shared Access Signatures](https://docs.microsoft.com/en-us/azure/service-bus-messaging/service-bus-sas), create the Access Keys exclusive to the specific created Queue/Topic._ +- You would also need an Azure Storage Account for all the `*Eph.ts` examples. The docs are at +[Create a storage account](https://docs.microsoft.com/en-us/azure/storage/common/storage-quickstart-create-account?tabs=azure-portal). After the storage account is created, find the connection string at **Access keys** tab in the **Settings** section. +Before running a sample, update it with the connection string and the hub name you have noted down above. +- to load environment variables from an `.env` file, please refer to [NPM dotenv package](https://www.npmjs.com/package/dotenv) for more details. See the [sample.env](../../sample.env) for an example. + +## Executing a sample +- The samples are to be run using ts-node, after changing your current working directory to the `examples` folder. + +```bash +cd examples +ts-node .ts +``` +- For debugging: +[VS Code - Debugging](https://code.visualstudio.com/docs/editor/debugging#_launch-configurations) - Update the `EPH Example` configuration in `launch.json` by changing the `program` attrbute to point to the sample you want to debug. +```bash +"program": "${workspaceFolder}/processor/examples/.ts" +``` diff --git a/processor/examples/iothubEph.ts b/processor/examples/iothubEph.ts index 45b9bc7a18bd..898c176e15e4 100644 --- a/processor/examples/iothubEph.ts +++ b/processor/examples/iothubEph.ts @@ -4,7 +4,7 @@ import { EventProcessorHost, OnReceivedError, OnReceivedMessage, EventData, PartitionContext, delay } from "../lib"; -import * as dotenv from "dotenv"; +import dotenv from "dotenv"; dotenv.config(); const storageCS = process.env.STORAGE_CONNECTION_STRING; diff --git a/processor/examples/multiEph.ts b/processor/examples/multiEph.ts index d4c73b041f79..7da34130be9c 100644 --- a/processor/examples/multiEph.ts +++ b/processor/examples/multiEph.ts @@ -4,7 +4,7 @@ import { EventProcessorHost, OnReceivedError, OnReceivedMessage, EventData, PartitionContext, delay } from "../lib"; -import * as dotenv from "dotenv"; +import dotenv from "dotenv"; dotenv.config(); // set the values from environment variables. diff --git a/processor/examples/sendBatch.ts b/processor/examples/sendBatch.ts index 69326b264681..91eab286918e 100644 --- a/processor/examples/sendBatch.ts +++ b/processor/examples/sendBatch.ts @@ -2,7 +2,7 @@ // Licensed under the MIT License. import { EventHubClient, EventData, delay } from "@azure/event-hubs"; -import * as dotenv from "dotenv"; +import dotenv from "dotenv"; dotenv.config(); const connectionString = "EVENTHUB_CONNECTION_STRING"; diff --git a/processor/examples/singleEph.ts b/processor/examples/singleEph.ts index 218139bbd61a..dd04d25cdb75 100644 --- a/processor/examples/singleEph.ts +++ b/processor/examples/singleEph.ts @@ -4,7 +4,7 @@ import { EventProcessorHost, OnReceivedError, OnReceivedMessage, EventData, PartitionContext, delay } from "../lib"; -import * as dotenv from "dotenv"; +import dotenv from "dotenv"; dotenv.config(); const path = process.env.EVENTHUB_NAME; diff --git a/processor/examples/tsconfig.json b/processor/examples/tsconfig.json new file mode 100644 index 000000000000..c400c95a8623 --- /dev/null +++ b/processor/examples/tsconfig.json @@ -0,0 +1,13 @@ +{ + "extends": "../tsconfig.json", + "compilerOptions": { + "module": "commonjs" + }, + "include": [ + "**/*.ts" + ], + "exclude": [ + "../node_modules", + "../typings/**", + ] +} diff --git a/processor/lib/azureBlob.ts b/processor/lib/azureBlob.ts index 8bf95e5de1f1..b193d87fddf7 100644 --- a/processor/lib/azureBlob.ts +++ b/processor/lib/azureBlob.ts @@ -34,72 +34,72 @@ export class AzureBlob { } } - async ensureContainerExists(): Promise { - return await this._blobService.ensureContainerExists(this._containerName); + ensureContainerExists(): Promise { + return this._blobService.ensureContainerExists(this._containerName); } - async doesContainerExist(): Promise { - return await this._blobService.doesContainerExist(this._containerName); + doesContainerExist(): Promise { + return this._blobService.doesContainerExist(this._containerName); } - async doesBlobExist(): Promise { - return await this._blobService.doesBlobExist(this._containerName, this._blobPath); + doesBlobExist(): Promise { + return this._blobService.doesBlobExist(this._containerName, this._blobPath); } - async ensureBlobExists(text: string): Promise { - return await this._blobService.ensureBlobExists(this._containerName, this._blobPath, text); + ensureBlobExists(text: string): Promise { + return this._blobService.ensureBlobExists(this._containerName, this._blobPath, text); } - async renewLease(leaseId: string, + renewLease(leaseId: string, options: StorageBlobService.LeaseRequestOptions): Promise { - return await this._blobService.renewLease(this._containerName, this._blobPath, leaseId, options); + return this._blobService.renewLease(this._containerName, this._blobPath, leaseId, options); } - async releaseLease(leaseId: string, + releaseLease(leaseId: string, options?: StorageBlobService.LeaseRequestOptions): Promise { - return await this._blobService.releaseLease(this._containerName, this._blobPath, leaseId, options); + return this._blobService.releaseLease(this._containerName, this._blobPath, leaseId, options); } - async updateContent(text: string, + updateContent(text: string, options?: StorageBlobService.CreateBlobRequestOptions): Promise { - return await this._blobService.updateContent(this._containerName, this._blobPath, text, options); + return this._blobService.updateContent(this._containerName, this._blobPath, text, options); } - async getContent(options?: StorageBlobService.GetBlobRequestOptions): Promise { - return await this._blobService.getContent(this._containerName, this._blobPath, options); + getContent(options?: StorageBlobService.GetBlobRequestOptions): Promise { + return this._blobService.getContent(this._containerName, this._blobPath, options); } - async changeLease(currentLeaseId: string, + changeLease(currentLeaseId: string, proposedLeaseId: string): Promise { - return await this._blobService.changeLease(this._containerName, + return this._blobService.changeLease(this._containerName, this._blobPath, currentLeaseId, proposedLeaseId); } - async getBlobProperties(): Promise { - return await this._blobService.getBlobProperties(this._containerName, this._blobPath); + getBlobProperties(): Promise { + return this._blobService.getBlobProperties(this._containerName, this._blobPath); } - async getBlobMetadata(): Promise { - return await this._blobService.getBlobMetadata(this._containerName, this._blobPath); + getBlobMetadata(): Promise { + return this._blobService.getBlobMetadata(this._containerName, this._blobPath); } - async setBlobMetadata(metadata: Dictionary, + setBlobMetadata(metadata: Dictionary, options?: StorageBlobService.BlobRequestOptions): Promise { - return await this._blobService.setBlobMetadata(this._containerName, this._blobPath, + return this._blobService.setBlobMetadata(this._containerName, this._blobPath, metadata, options); } - async listBlobsSegmented(options?: StorageBlobService.ListBlobsSegmentedRequestOptions): + listBlobsSegmented(options?: StorageBlobService.ListBlobsSegmentedRequestOptions): Promise { - return await this._blobService.listBlobsSegmented(this._containerName, options); + return this._blobService.listBlobsSegmented(this._containerName, options); } - async acquireLease(options: StorageBlobService.AcquireLeaseRequestOptions): + acquireLease(options: StorageBlobService.AcquireLeaseRequestOptions): Promise { - return await this._blobService.acquireLease(this._containerName, this._blobPath, options); + return this._blobService.acquireLease(this._containerName, this._blobPath, options); } - async deleteBlobIfExists(): Promise { - return await this._blobService.deleteBlobIfExists(this._containerName, this._blobPath); + deleteBlobIfExists(): Promise { + return this._blobService.deleteBlobIfExists(this._containerName, this._blobPath); } } diff --git a/processor/lib/azureStorageCheckpointLeaseManager.ts b/processor/lib/azureStorageCheckpointLeaseManager.ts index 433a0f25770d..491d06ba94c4 100644 --- a/processor/lib/azureStorageCheckpointLeaseManager.ts +++ b/processor/lib/azureStorageCheckpointLeaseManager.ts @@ -1,7 +1,7 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -import * as uuid from "uuid/v4"; +import uuid from "uuid/v4"; import { CheckpointInfo } from "./checkpointInfo"; import { CheckpointManager } from "./checkpointManager"; import { LeaseManager } from "./leaseManager"; @@ -19,7 +19,7 @@ import { leaseIdMismatchWithLeaseOperation, leaseIdMismatchWithBlobOperation } from "./util/constants"; import * as log from "./log"; -const path = require("path-browserify"); +import path from "path"; /** * @ignore @@ -76,8 +76,8 @@ export class AzureStorageCheckpointLeaseManager implements CheckpointManager, Le } } - async leaseStoreExists(): Promise { - return await this._context.blobService!.doesContainerExist(this._context.storageContainerName!); + leaseStoreExists(): Promise { + return this._context.blobService!.doesContainerExist(this._context.storageContainerName!); } async createLeaseStoreIfNotExists(): Promise { @@ -351,9 +351,9 @@ export class AzureStorageCheckpointLeaseManager implements CheckpointManager, Le return result; } - async checkpointStoreExists(): Promise { + checkpointStoreExists(): Promise { log.checkpointLeaseMgr(this._context.withHost("Checking whether the checkpoint store exists.")); - return await this.leaseStoreExists(); + return this.leaseStoreExists(); } async deleteCheckpointStore(): Promise { diff --git a/processor/lib/blobService.ts b/processor/lib/blobService.ts index 28be5e74253c..ddcd368c711f 100644 --- a/processor/lib/blobService.ts +++ b/processor/lib/blobService.ts @@ -6,7 +6,7 @@ import { createBlobService, BlobService as StorageBlobService, ServiceResponse } import * as log from "./log"; import { validateType, getStorageError } from "./util/utils"; import { defaultMaximumExecutionTimeInMs } from "./util/constants"; -const path = require("path-browserify"); +import path from "path"; /** * @ignore */ diff --git a/processor/lib/eventProcessorHost.ts b/processor/lib/eventProcessorHost.ts index eb433ee7188e..1f55292452c2 100644 --- a/processor/lib/eventProcessorHost.ts +++ b/processor/lib/eventProcessorHost.ts @@ -1,7 +1,7 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -import * as uuid from "uuid/v4"; +import uuid from "uuid/v4"; import { TokenProvider, EventHubRuntimeInformation, EventHubPartitionRuntimeInformation, AadTokenProvider, EventHubClient @@ -67,8 +67,8 @@ export class EventProcessorHost { * Provides the eventhub runtime information. * @returns {Promise} */ - async getHubRuntimeInformation(): Promise { - return await this._context.getHubRuntimeInformation(); + getHubRuntimeInformation(): Promise { + return this._context.getHubRuntimeInformation(); } /** @@ -77,15 +77,15 @@ export class EventProcessorHost { * * @returns {EventHubPartitionRuntimeInformation} EventHubPartitionRuntimeInformation */ - async getPartitionInformation(partitionId: string | number): Promise { - return await this._context.getPartitionInformation(partitionId); + getPartitionInformation(partitionId: string | number): Promise { + return this._context.getPartitionInformation(partitionId); } /** * Provides an array of partitionIds. * @returns {Promise} */ - async getPartitionIds(): Promise { + getPartitionIds(): Promise { return this._context.getPartitionIds(); } diff --git a/processor/lib/hostContext.ts b/processor/lib/hostContext.ts index ba1976cc0ac6..eceb1725505d 100644 --- a/processor/lib/hostContext.ts +++ b/processor/lib/hostContext.ts @@ -1,12 +1,12 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -import * as uuid from "uuid/v4"; +import uuid from "uuid/v4"; import { EventHubClient, EventPosition, TokenProvider, DefaultDataTransformer, Dictionary, EventHubRuntimeInformation, EventHubPartitionRuntimeInformation, EventHubConnectionConfig } from "@azure/event-hubs"; -import * as AsyncLock from "async-lock"; +import AsyncLock from "async-lock"; import { LeaseManager } from "./leaseManager"; import { PumpManager } from "./pumpManager"; import { PartitionManager } from "./partitionManager"; diff --git a/processor/lib/log.ts b/processor/lib/log.ts index 09f6999484ef..b38b76e3e0d0 100644 --- a/processor/lib/log.ts +++ b/processor/lib/log.ts @@ -1,7 +1,7 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -import * as debugModule from "debug"; +import debugModule from "debug"; /** * @ignore * log statements for error diff --git a/processor/lib/partitionScanner.ts b/processor/lib/partitionScanner.ts index 7c5aefaaa42e..dee1b0563440 100644 --- a/processor/lib/partitionScanner.ts +++ b/processor/lib/partitionScanner.ts @@ -207,7 +207,7 @@ export class PartitionScanner { } else if (lease) { this._leaseOwnedByOthers.set(lease.partitionId, lease); } - return; + return Promise.resolve(); }).catch((err) => { const msg = `An error occurred while getting/acquiring lease for partitionId ` + `'${thisLease.partitionId}': ${err ? err.stack : JSON.stringify(err)}`; diff --git a/processor/package-lock.json b/processor/package-lock.json index 6af7a981f794..e078bfc9ad92 100644 --- a/processor/package-lock.json +++ b/processor/package-lock.json @@ -34,6 +34,140 @@ "uuid": "^3.3.2" } }, + "@babel/code-frame": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.0.0.tgz", + "integrity": "sha512-OfC2uemaknXr87bdLUkWog7nYuliM9Ij5HUcajsVcMCpQrcLmtxRbVFTIqmcSkSeYRBFBRxs2FiUqFJDLdiebA==", + "dev": true, + "requires": { + "@babel/highlight": "^7.0.0" + } + }, + "@babel/generator": { + "version": "7.3.2", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.3.2.tgz", + "integrity": "sha512-f3QCuPppXxtZOEm5GWPra/uYUjmNQlu9pbAD8D/9jze4pTY83rTtB1igTBSwvkeNlC5gR24zFFkz+2WHLFQhqQ==", + "dev": true, + "requires": { + "@babel/types": "^7.3.2", + "jsesc": "^2.5.1", + "lodash": "^4.17.10", + "source-map": "^0.5.0", + "trim-right": "^1.0.1" + }, + "dependencies": { + "source-map": { + "version": "0.5.7", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", + "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=", + "dev": true + } + } + }, + "@babel/helper-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-split-export-declaration": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.0.0.tgz", + "integrity": "sha512-MXkOJqva62dfC0w85mEf/LucPPS/1+04nmmRMPEBUB++hiiThQ2zPtX/mEWQ3mtzCEjIJvPY8nuwxXtQeQwUag==", + "dev": true, + "requires": { + "@babel/types": "^7.0.0" + } + }, + "@babel/highlight": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.0.0.tgz", + "integrity": "sha512-UFMC4ZeFC48Tpvj7C8UgLvtkaUuovQX+5xNWrsIoMG8o2z+XFKjKaN9iVmS84dPwVN00W4wPmqvYoZF3EGAsfw==", + "dev": true, + "requires": { + "chalk": "^2.0.0", + "esutils": "^2.0.2", + "js-tokens": "^4.0.0" + }, + "dependencies": { + "js-tokens": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", + "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==", + "dev": true + } + } + }, + "@babel/parser": { + "version": "7.3.2", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.3.2.tgz", + "integrity": "sha512-QzNUC2RO1gadg+fs21fi0Uu0OuGNzRKEmgCxoLNzbCdoprLwjfmZwzUrpUNfJPaVRwBpDY47A17yYEGWyRelnQ==", + "dev": true + }, + "@babel/template": { + "version": "7.2.2", + "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.2.2.tgz", + "integrity": "sha512-zRL0IMM02AUDwghf5LMSSDEz7sBCO2YnNmpg3uWTZj/v1rcG2BmQUvaGU8GhU8BvfMh1k2KIAYZ7Ji9KXPUg7g==", + "dev": true, + "requires": { + "@babel/code-frame": "^7.0.0", + "@babel/parser": "^7.2.2", + "@babel/types": "^7.2.2" + } + }, + "@babel/traverse": { + "version": "7.2.3", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.2.3.tgz", + "integrity": "sha512-Z31oUD/fJvEWVR0lNZtfgvVt512ForCTNKYcJBGbPb1QZfve4WGH8Wsy7+Mev33/45fhP/hwQtvgusNdcCMgSw==", + "dev": true, + "requires": { + "@babel/code-frame": "^7.0.0", + "@babel/generator": "^7.2.2", + "@babel/helper-function-name": "^7.1.0", + "@babel/helper-split-export-declaration": "^7.0.0", + "@babel/parser": "^7.2.3", + "@babel/types": "^7.2.2", + "debug": "^4.1.0", + "globals": "^11.1.0", + "lodash": "^4.17.10" + }, + "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.3.2", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.3.2.tgz", + "integrity": "sha512-3Y6H8xlUlpbGR+XvawiH0UXehqydTmNmEpozWcXymqwcrwYAl5KMvKtQ+TF6f6E08V6Jur7v/ykdDSF+WDEIXQ==", + "dev": true, + "requires": { + "esutils": "^2.0.2", + "lodash": "^4.17.10", + "to-fast-properties": "^2.0.0" + } + }, "@microsoft/api-extractor": { "version": "6.3.0", "resolved": "https://registry.npmjs.org/@microsoft/api-extractor/-/api-extractor-6.3.0.tgz", @@ -158,6 +292,12 @@ "@types/node": "*" } }, + "@types/estree": { + "version": "0.0.39", + "resolved": "https://registry.npmjs.org/@types/estree/-/estree-0.0.39.tgz", + "integrity": "sha512-EYNwp3bU+98cpU4lAWYYL7Zz+2gryWH1qbdDTidVd6hkiR6weksdbMadyXKXNPEkQFhXM+hVO9ZygomHXp+AIw==", + "dev": true + }, "@types/fs-extra": { "version": "5.0.4", "resolved": "https://registry.npmjs.org/@types/fs-extra/-/fs-extra-5.0.4.tgz", @@ -241,6 +381,33 @@ "sprintf-js": "~1.0.2" } }, + "arr-diff": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/arr-diff/-/arr-diff-2.0.0.tgz", + "integrity": "sha1-jzuCf5Vai9ZpaX5KQlasPOrjVs8=", + "dev": true, + "requires": { + "arr-flatten": "^1.0.1" + } + }, + "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-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-unique": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/array-unique/-/array-unique-0.2.1.tgz", + "integrity": "sha1-odl8yvy8JiXMcPrc6zalDFiwGlM=", + "dev": true + }, "arrify": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/arrify/-/arrify-1.0.1.tgz", @@ -274,6 +441,12 @@ "lodash": "^4.14.0" } }, + "async-array-reduce": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/async-array-reduce/-/async-array-reduce-0.2.1.tgz", + "integrity": "sha1-yL4BCitc0A3qlsgRFgNGk9/dgtE=", + "dev": true + }, "async-lock": { "version": "1.1.3", "resolved": "https://registry.npmjs.org/async-lock/-/async-lock-1.1.3.tgz", @@ -284,6 +457,12 @@ "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", "integrity": "sha1-x57Zf380y48robyXkLzDZkdLS3k=" }, + "atob": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/atob/-/atob-2.1.2.tgz", + "integrity": "sha512-Wm6ukoaOGJi/73p/cl2GvLjTI5JM1k/O14isD73YML8StrH/7/lRFgmg8nICZgD3bZZvjwCGxtMOD3wWNAu8cg==", + "dev": true + }, "aws-sign2": { "version": "0.7.0", "resolved": "https://registry.npmjs.org/aws-sign2/-/aws-sign2-0.7.0.tgz", @@ -381,6 +560,17 @@ "concat-map": "0.0.1" } }, + "braces": { + "version": "1.8.5", + "resolved": "https://registry.npmjs.org/braces/-/braces-1.8.5.tgz", + "integrity": "sha1-uneWLhLf+WnWt2cR6RS3N4V79qc=", + "dev": true, + "requires": { + "expand-range": "^1.8.1", + "preserve": "^0.2.0", + "repeat-element": "^1.1.2" + } + }, "browser-stdout": { "version": "1.3.1", "resolved": "https://registry.npmjs.org/browser-stdout/-/browser-stdout-1.3.1.tgz", @@ -516,6 +706,29 @@ "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=" }, + "cross-env": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/cross-env/-/cross-env-5.2.0.tgz", + "integrity": "sha512-jtdNFfFW1hB7sMhr/H6rW1Z45LFqyI431m3qU6bFXcQ3Eh7LtBuG3h74o7ohHZ3crrRkkqHlo4jYHFPcjroANg==", + "dev": true, + "requires": { + "cross-spawn": "^6.0.5", + "is-windows": "^1.0.0" + } + }, + "cross-spawn": { + "version": "6.0.5", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-6.0.5.tgz", + "integrity": "sha512-eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ==", + "dev": true, + "requires": { + "nice-try": "^1.0.4", + "path-key": "^2.0.1", + "semver": "^5.5.0", + "shebang-command": "^1.2.0", + "which": "^1.2.9" + } + }, "dashdash": { "version": "1.14.1", "resolved": "https://registry.npmjs.org/dashdash/-/dashdash-1.14.1.tgz", @@ -537,6 +750,12 @@ "ms": "^2.1.1" } }, + "decode-uri-component": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/decode-uri-component/-/decode-uri-component-0.2.0.tgz", + "integrity": "sha1-6zkTMzRYd1y4TNGh+uBiEGu4dUU=", + "dev": true + }, "deep-eql": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/deep-eql/-/deep-eql-3.0.1.tgz", @@ -598,17 +817,59 @@ "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==", "dev": true }, + "estree-walker": { + "version": "0.5.2", + "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-0.5.2.tgz", + "integrity": "sha512-XpCnW/AE10ws/kDAs37cngSkvgIR8aN3G0MS85m7dUpuK2EREo9VJ00uvw6Dg/hXEpfsE1I1TvJOJr+Z+TL+ig==", + "dev": true + }, "esutils": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.2.tgz", "integrity": "sha1-Cr9PHKpbyx96nYrMbepPqqBLrJs=", "dev": true }, + "expand-brackets": { + "version": "0.1.5", + "resolved": "https://registry.npmjs.org/expand-brackets/-/expand-brackets-0.1.5.tgz", + "integrity": "sha1-3wcoTjQqgHzXM6xa9yQR5YHRF3s=", + "dev": true, + "requires": { + "is-posix-bracket": "^0.1.0" + } + }, + "expand-range": { + "version": "1.8.2", + "resolved": "https://registry.npmjs.org/expand-range/-/expand-range-1.8.2.tgz", + "integrity": "sha1-opnv/TNf4nIeuujiV+x5ZE/IUzc=", + "dev": true, + "requires": { + "fill-range": "^2.1.0" + } + }, + "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==" }, + "extglob": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/extglob/-/extglob-0.3.2.tgz", + "integrity": "sha1-Lhj/PS9JqydlzskCPwEdqo2DSaE=", + "dev": true, + "requires": { + "is-extglob": "^1.0.0" + } + }, "extsprintf": { "version": "1.3.0", "resolved": "https://registry.npmjs.org/extsprintf/-/extsprintf-1.3.0.tgz", @@ -624,6 +885,40 @@ "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.0.0.tgz", "integrity": "sha1-1RQsDK7msRifh9OnYREGT4bIu/I=" }, + "filename-regex": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/filename-regex/-/filename-regex-2.0.1.tgz", + "integrity": "sha1-wcS5vuPglyXdsQa3XB4wH+LxiyY=", + "dev": true + }, + "fill-range": { + "version": "2.2.4", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-2.2.4.tgz", + "integrity": "sha512-cnrcCbj01+j2gTG921VZPnHbjmdAf8oQV/iGeV2kZxGSyfYjjTyY79ErsK1WJWMpw6DaApEX72binqJE+/d+5Q==", + "dev": true, + "requires": { + "is-number": "^2.1.0", + "isobject": "^2.0.0", + "randomatic": "^3.0.0", + "repeat-element": "^1.1.2", + "repeat-string": "^1.5.2" + } + }, + "for-in": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/for-in/-/for-in-1.0.2.tgz", + "integrity": "sha1-gQaNKVqBQuwKxybG4iAMMPttXoA=", + "dev": true + }, + "for-own": { + "version": "0.1.5", + "resolved": "https://registry.npmjs.org/for-own/-/for-own-0.1.5.tgz", + "integrity": "sha1-UmXGgaTylNq78XyVCbZ2OqhFEM4=", + "dev": true, + "requires": { + "for-in": "^1.0.1" + } + }, "forever-agent": { "version": "0.6.1", "resolved": "https://registry.npmjs.org/forever-agent/-/forever-agent-0.6.1.tgz", @@ -694,6 +989,55 @@ "path-is-absolute": "^1.0.0" } }, + "glob-base": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/glob-base/-/glob-base-0.3.0.tgz", + "integrity": "sha1-27Fk9iIbHAscz4Kuoyi0l98Oo8Q=", + "dev": true, + "requires": { + "glob-parent": "^2.0.0", + "is-glob": "^2.0.0" + } + }, + "glob-parent": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-2.0.0.tgz", + "integrity": "sha1-gTg9ctsFT8zPUzbaqQLxgvbtuyg=", + "dev": true, + "requires": { + "is-glob": "^2.0.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.11.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-11.11.0.tgz", + "integrity": "sha512-WHq43gS+6ufNOEqlrDBxVEbb8ntfXrfAUU2ZOpCxrBdGKW3gyv8mCxAfIBD0DroPKGrJ2eSsXsLtY9MPntsyTw==", + "dev": true + }, "graceful-fs": { "version": "4.1.15", "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.1.15.tgz", @@ -735,6 +1079,32 @@ "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", "dev": true }, + "has-glob": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/has-glob/-/has-glob-1.0.0.tgz", + "integrity": "sha1-mqqe7b/7G6OZCnsAEPtnjuAIEgc=", + "dev": true, + "requires": { + "is-glob": "^3.0.0" + }, + "dependencies": { + "is-extglob": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", + "integrity": "sha1-qIwCU1eR8C7TfHahueqXc8gz+MI=", + "dev": true + }, + "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" + } + } + } + }, "hash-base": { "version": "3.0.4", "resolved": "https://registry.npmjs.org/hash-base/-/hash-base-3.0.4.tgz", @@ -750,6 +1120,15 @@ "integrity": "sha1-k0EP0hsAlzUVH4howvJx80J+I/0=", "dev": true }, + "homedir-polyfill": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/homedir-polyfill/-/homedir-polyfill-1.0.1.tgz", + "integrity": "sha1-TCu8inWJmP7r9e1oWA921GdotLw=", + "dev": true, + "requires": { + "parse-passwd": "^1.0.0" + } + }, "http-signature": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/http-signature/-/http-signature-1.2.0.tgz", @@ -775,11 +1154,80 @@ "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=" }, + "ini": { + "version": "1.3.5", + "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.5.tgz", + "integrity": "sha512-RZY5huIKCMRWDUqZlEi72f/lmXKMvuszcMBduliQ3nnWbx9X/ZBQO7DijMEYS9EhHBb2qacRUMtC7svLwe0lcw==", + "dev": true + }, "is-buffer": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-2.0.2.tgz", "integrity": "sha512-imvkm8cOGKeZ/NwkAd+FAURi0hsL9gr3kvdi0r3MnqChcOdPaQRIOQiOU+sD40XzUIe6nFmSHYtQjbkDvaQbEg==" }, + "is-dotfile": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/is-dotfile/-/is-dotfile-1.0.3.tgz", + "integrity": "sha1-pqLzL/0t+wT1yiXs0Pa4PPeYoeE=", + "dev": true + }, + "is-equal-shallow": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/is-equal-shallow/-/is-equal-shallow-0.1.3.tgz", + "integrity": "sha1-IjgJj8Ih3gvPpdnqxMRdY4qhxTQ=", + "dev": true, + "requires": { + "is-primitive": "^2.0.0" + } + }, + "is-extendable": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-0.1.1.tgz", + "integrity": "sha1-YrEQ4omkcUGOPsNqYX1HLjAd/Ik=", + "dev": true + }, + "is-extglob": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-1.0.0.tgz", + "integrity": "sha1-rEaBd8SUNAWgkvyPKXYMb/xiBsA=", + "dev": true + }, + "is-glob": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-2.0.1.tgz", + "integrity": "sha1-0Jb5JqPe1WAPP9/ZEZjLCIjC2GM=", + "dev": true, + "requires": { + "is-extglob": "^1.0.0" + } + }, + "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": "2.1.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-2.1.0.tgz", + "integrity": "sha1-Afy7s5NGOlSPL0ZszhbezknbkI8=", + "dev": true, + "requires": { + "kind-of": "^3.0.2" + } + }, + "is-posix-bracket": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/is-posix-bracket/-/is-posix-bracket-0.1.1.tgz", + "integrity": "sha1-MzTceXdDaOkvAW5vvAqI9c1ua8Q=", + "dev": true + }, + "is-primitive": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-primitive/-/is-primitive-2.0.0.tgz", + "integrity": "sha1-IHurkWOEmcB7Kt8kCkGochADRXU=", + "dev": true + }, "is-stream": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-1.1.0.tgz", @@ -790,16 +1238,85 @@ "resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz", "integrity": "sha1-5HnICFjfDBsR3dppQPlgEfzaSpo=" }, + "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", + "integrity": "sha512-eXK1UInq2bPmjyX6e3VHIzMLobc4J94i4AWn+Hpq3OU5KkrRC96OAcR3PRJ/pGu6m8TRnBHP9dkXQVsT/COVIA==", + "dev": true + }, "isarray": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=" }, + "isexe": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", + "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=", + "dev": true + }, + "isobject": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-2.1.0.tgz", + "integrity": "sha1-8GVWEJaj8dou9GJy+BXIQNh+DIk=", + "dev": true, + "requires": { + "isarray": "1.0.0" + } + }, "isstream": { "version": "0.1.2", "resolved": "https://registry.npmjs.org/isstream/-/isstream-0.1.2.tgz", "integrity": "sha1-R+Y/evVa+m+S4VAOaQ64uFKcCZo=" }, + "istanbul-lib-coverage": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.3.tgz", + "integrity": "sha512-dKWuzRGCs4G+67VfW9pBFFz2Jpi4vSp/k7zBcJ888ofV5Mi1g5CUML5GvMvV6u9Cjybftu+E8Cgp+k0dI1E5lw==", + "dev": true + }, + "istanbul-lib-instrument": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/istanbul-lib-instrument/-/istanbul-lib-instrument-3.1.0.tgz", + "integrity": "sha512-ooVllVGT38HIk8MxDj/OIHXSYvH+1tq/Vb38s8ixt9GoJadXska4WkGY+0wkmtYCZNYtaARniH/DixUGGLZ0uA==", + "dev": true, + "requires": { + "@babel/generator": "^7.0.0", + "@babel/parser": "^7.0.0", + "@babel/template": "^7.0.0", + "@babel/traverse": "^7.0.0", + "@babel/types": "^7.0.0", + "istanbul-lib-coverage": "^2.0.3", + "semver": "^5.5.0" + } + }, + "jest-worker": { + "version": "24.0.0", + "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-24.0.0.tgz", + "integrity": "sha512-s64/OThpfQvoCeHG963MiEZOAAxu8kHsaL/rCMF7lpdzo7vgF0CtPml9hfguOMgykgH/eOm4jFP4ibfHLruytg==", + "dev": true, + "requires": { + "merge-stream": "^1.0.1", + "supports-color": "^6.1.0" + }, + "dependencies": { + "supports-color": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-6.1.0.tgz", + "integrity": "sha512-qe1jfm1Mg7Nq/NSh6XE24gPXROEVsWHxC1LIx//XNlD9iw7YZQGjZNjYN7xGaEG6iKdA8EtNFW6R0gjnVXp+wQ==", + "dev": true, + "requires": { + "has-flag": "^3.0.0" + } + } + } + }, "jju": { "version": "1.3.0", "resolved": "https://registry.npmjs.org/jju/-/jju-1.3.0.tgz", @@ -828,6 +1345,12 @@ "integrity": "sha1-peZUwuWi3rXyAdls77yoDA7y9RM=", "optional": true }, + "jsesc": { + "version": "2.5.2", + "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-2.5.2.tgz", + "integrity": "sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA==", + "dev": true + }, "json-edm-parser": { "version": "0.1.2", "resolved": "https://registry.npmjs.org/json-edm-parser/-/json-edm-parser-0.1.2.tgz", @@ -900,6 +1423,23 @@ "safe-buffer": "^5.0.1" } }, + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dev": true, + "requires": { + "is-buffer": "^1.1.5" + }, + "dependencies": { + "is-buffer": { + "version": "1.1.6", + "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.6.tgz", + "integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==", + "dev": true + } + } + }, "lodash": { "version": "4.17.11", "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.11.tgz", @@ -917,12 +1457,41 @@ "integrity": "sha1-QVxEePK8wwEgwizhDtMib30+GOA=", "dev": true }, + "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" + } + }, "make-error": { "version": "1.3.5", "resolved": "https://registry.npmjs.org/make-error/-/make-error-1.3.5.tgz", "integrity": "sha512-c3sIjNUow0+8swNwVpqoH4YCShKNFkMaw6oH1mNS2haDZQqkeZFlHS3dhoeEbKKmJB4vXpJucU6oH75aDYeE9g==", "dev": true }, + "matched": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/matched/-/matched-1.0.2.tgz", + "integrity": "sha512-7ivM1jFZVTOOS77QsR+TtYHH0ecdLclMkqbf5qiJdX2RorqfhsL65QHySPZgDE0ZjHoh+mQUNHTanNXIlzXd0Q==", + "dev": true, + "requires": { + "arr-union": "^3.1.0", + "async-array-reduce": "^0.2.1", + "glob": "^7.1.2", + "has-glob": "^1.0.0", + "is-valid-glob": "^1.0.0", + "resolve-dir": "^1.0.0" + } + }, + "math-random": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/math-random/-/math-random-1.0.4.tgz", + "integrity": "sha512-rUxjysqif/BZQH2yhd5Aaq7vXMSx9NdEsQcyA07uEzIvxgI7zIr33gGsh+RU0/XjmQpCW7RsVof1vlkvQVCK5A==", + "dev": true + }, "md5.js": { "version": "1.3.4", "resolved": "http://registry.npmjs.org/md5.js/-/md5.js-1.3.4.tgz", @@ -932,10 +1501,40 @@ "inherits": "^2.0.1" } }, - "mime-db": { - "version": "1.36.0", - "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.36.0.tgz", - "integrity": "sha512-L+xvyD9MkoYMXb1jAmzI/lWYAxAMCPvIBSWur0PZ5nOf5euahRLVqH//FKW9mWp2lkqUgYiXPgkzfMUFi4zVDw==" + "merge-stream": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/merge-stream/-/merge-stream-1.0.1.tgz", + "integrity": "sha1-QEEgLVCKNCugAXQAjfDCUbjBNeE=", + "dev": true, + "requires": { + "readable-stream": "^2.0.1" + } + }, + "micromatch": { + "version": "2.3.11", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-2.3.11.tgz", + "integrity": "sha1-hmd8l9FyCzY0MdBNDRUpO9OMFWU=", + "dev": true, + "requires": { + "arr-diff": "^2.0.0", + "array-unique": "^0.2.1", + "braces": "^1.8.2", + "expand-brackets": "^0.1.4", + "extglob": "^0.3.1", + "filename-regex": "^2.0.0", + "is-extglob": "^1.0.0", + "is-glob": "^2.0.1", + "kind-of": "^3.0.2", + "normalize-path": "^2.0.1", + "object.omit": "^2.0.0", + "parse-glob": "^3.0.4", + "regex-cache": "^0.4.2" + } + }, + "mime-db": { + "version": "1.36.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.36.0.tgz", + "integrity": "sha512-L+xvyD9MkoYMXb1jAmzI/lWYAxAMCPvIBSWur0PZ5nOf5euahRLVqH//FKW9mWp2lkqUgYiXPgkzfMUFi4zVDw==" }, "mime-types": { "version": "2.1.20", @@ -990,71 +1589,1130 @@ "dependencies": { "debug": { "version": "3.1.0", - "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", - "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", + "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", + "dev": true, + "requires": { + "ms": "2.0.0" + } + }, + "ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", + "dev": true + } + } + }, + "moment": { + "version": "2.22.2", + "resolved": "https://registry.npmjs.org/moment/-/moment-2.22.2.tgz", + "integrity": "sha1-PCV/mDn8DpP/UxSWMiOeuQeD/2Y=" + }, + "ms": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.1.tgz", + "integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg==" + }, + "ms-rest": { + "version": "2.3.7", + "resolved": "https://registry.npmjs.org/ms-rest/-/ms-rest-2.3.7.tgz", + "integrity": "sha512-zZwuckC/Uv8F1Jr1bW+U1tsDTErWhtH6W4mpxvRrta4YrKwkFeLMt53RsaDOWTqMFsVpjNuCfznV1uxeGUF3/g==", + "requires": { + "duplexer": "^0.1.1", + "is-buffer": "^1.1.6", + "is-stream": "^1.1.0", + "moment": "^2.21.0", + "request": "^2.88.0", + "through": "^2.3.8", + "tunnel": "0.0.5", + "uuid": "^3.2.1" + }, + "dependencies": { + "is-buffer": { + "version": "1.1.6", + "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.6.tgz", + "integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==" + } + } + }, + "ms-rest-azure": { + "version": "2.5.9", + "resolved": "https://registry.npmjs.org/ms-rest-azure/-/ms-rest-azure-2.5.9.tgz", + "integrity": "sha512-qonobzWLS7Jl6qwgTuA/SfyCtnv7olvCRKrcF8nzXSj68ds4Oj3K64ntzgQajroKa0hKVMcPUFbTk1IYMGvu8w==", + "requires": { + "adal-node": "^0.1.28", + "async": "2.6.0", + "moment": "^2.22.2", + "ms-rest": "^2.3.2", + "request": "^2.88.0", + "uuid": "^3.2.1" + } + }, + "nice-try": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/nice-try/-/nice-try-1.0.5.tgz", + "integrity": "sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ==", + "dev": true + }, + "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" + } + }, + "nyc": { + "version": "13.3.0", + "resolved": "https://registry.npmjs.org/nyc/-/nyc-13.3.0.tgz", + "integrity": "sha512-P+FwIuro2aFG6B0Esd9ZDWUd51uZrAEoGutqZxzrVmYl3qSfkLgcQpBPBjtDFsUQLFY1dvTQJPOyeqr8S9GF8w==", + "dev": true, + "requires": { + "archy": "^1.0.0", + "arrify": "^1.0.1", + "caching-transform": "^3.0.1", + "convert-source-map": "^1.6.0", + "find-cache-dir": "^2.0.0", + "find-up": "^3.0.0", + "foreground-child": "^1.5.6", + "glob": "^7.1.3", + "istanbul-lib-coverage": "^2.0.3", + "istanbul-lib-hook": "^2.0.3", + "istanbul-lib-instrument": "^3.1.0", + "istanbul-lib-report": "^2.0.4", + "istanbul-lib-source-maps": "^3.0.2", + "istanbul-reports": "^2.1.1", + "make-dir": "^1.3.0", + "merge-source-map": "^1.1.0", + "resolve-from": "^4.0.0", + "rimraf": "^2.6.3", + "signal-exit": "^3.0.2", + "spawn-wrap": "^1.4.2", + "test-exclude": "^5.1.0", + "uuid": "^3.3.2", + "yargs": "^12.0.5", + "yargs-parser": "^11.1.1" + }, + "dependencies": { + "ansi-regex": { + "version": "3.0.0", + "bundled": true, + "dev": true + }, + "append-transform": { + "version": "1.0.0", + "bundled": true, + "dev": true, + "requires": { + "default-require-extensions": "^2.0.0" + } + }, + "archy": { + "version": "1.0.0", + "bundled": true, + "dev": true + }, + "arrify": { + "version": "1.0.1", + "bundled": true, + "dev": true + }, + "async": { + "version": "2.6.2", + "bundled": true, + "dev": true, + "requires": { + "lodash": "^4.17.11" + } + }, + "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" + } + }, + "caching-transform": { + "version": "3.0.1", + "bundled": true, + "dev": true, + "requires": { + "hasha": "^3.0.0", + "make-dir": "^1.3.0", + "package-hash": "^3.0.0", + "write-file-atomic": "^2.3.0" + } + }, + "camelcase": { + "version": "5.0.0", + "bundled": true, + "dev": true + }, + "cliui": { + "version": "4.1.0", + "bundled": true, + "dev": true, + "requires": { + "string-width": "^2.1.1", + "strip-ansi": "^4.0.0", + "wrap-ansi": "^2.0.0" + } + }, + "code-point-at": { + "version": "1.1.0", + "bundled": true, + "dev": true + }, + "commander": { + "version": "2.17.1", + "bundled": true, + "dev": true, + "optional": true + }, + "commondir": { + "version": "1.0.1", + "bundled": true, + "dev": true + }, + "concat-map": { + "version": "0.0.1", + "bundled": true, + "dev": true + }, + "convert-source-map": { + "version": "1.6.0", + "bundled": true, + "dev": true, + "requires": { + "safe-buffer": "~5.1.1" + } + }, + "cross-spawn": { + "version": "4.0.2", + "bundled": true, + "dev": true, + "requires": { + "lru-cache": "^4.0.1", + "which": "^1.2.9" + } + }, + "debug": { + "version": "4.1.1", + "bundled": true, + "dev": true, + "requires": { + "ms": "^2.1.1" + } + }, + "decamelize": { + "version": "1.2.0", + "bundled": true, + "dev": true + }, + "default-require-extensions": { + "version": "2.0.0", + "bundled": true, + "dev": true, + "requires": { + "strip-bom": "^3.0.0" + } + }, + "end-of-stream": { + "version": "1.4.1", + "bundled": true, + "dev": true, + "requires": { + "once": "^1.4.0" + } + }, + "error-ex": { + "version": "1.3.2", + "bundled": true, + "dev": true, + "requires": { + "is-arrayish": "^0.2.1" + } + }, + "es6-error": { + "version": "4.1.1", + "bundled": true, + "dev": true + }, + "execa": { + "version": "1.0.0", + "bundled": true, + "dev": true, + "requires": { + "cross-spawn": "^6.0.0", + "get-stream": "^4.0.0", + "is-stream": "^1.1.0", + "npm-run-path": "^2.0.0", + "p-finally": "^1.0.0", + "signal-exit": "^3.0.0", + "strip-eof": "^1.0.0" + }, + "dependencies": { + "cross-spawn": { + "version": "6.0.5", + "bundled": true, + "dev": true, + "requires": { + "nice-try": "^1.0.4", + "path-key": "^2.0.1", + "semver": "^5.5.0", + "shebang-command": "^1.2.0", + "which": "^1.2.9" + } + } + } + }, + "find-cache-dir": { + "version": "2.0.0", + "bundled": true, + "dev": true, + "requires": { + "commondir": "^1.0.1", + "make-dir": "^1.0.0", + "pkg-dir": "^3.0.0" + } + }, + "find-up": { + "version": "3.0.0", + "bundled": true, + "dev": true, + "requires": { + "locate-path": "^3.0.0" + } + }, + "foreground-child": { + "version": "1.5.6", + "bundled": true, + "dev": true, + "requires": { + "cross-spawn": "^4", + "signal-exit": "^3.0.0" + } + }, + "fs.realpath": { + "version": "1.0.0", + "bundled": true, + "dev": true + }, + "get-caller-file": { + "version": "1.0.3", + "bundled": true, + "dev": true + }, + "get-stream": { + "version": "4.1.0", + "bundled": true, + "dev": true, + "requires": { + "pump": "^3.0.0" + } + }, + "glob": { + "version": "7.1.3", + "bundled": true, + "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" + } + }, + "graceful-fs": { + "version": "4.1.15", + "bundled": true, + "dev": true + }, + "handlebars": { + "version": "4.1.0", + "bundled": true, + "dev": true, + "requires": { + "async": "^2.5.0", + "optimist": "^0.6.1", + "source-map": "^0.6.1", + "uglify-js": "^3.1.4" + }, + "dependencies": { + "source-map": { + "version": "0.6.1", + "bundled": true, + "dev": true + } + } + }, + "has-flag": { + "version": "3.0.0", + "bundled": true, + "dev": true + }, + "hasha": { + "version": "3.0.0", + "bundled": true, + "dev": true, + "requires": { + "is-stream": "^1.0.1" + } + }, + "hosted-git-info": { + "version": "2.7.1", + "bundled": true, + "dev": true + }, + "imurmurhash": { + "version": "0.1.4", + "bundled": true, + "dev": true + }, + "inflight": { + "version": "1.0.6", + "bundled": true, + "dev": true, + "requires": { + "once": "^1.3.0", + "wrappy": "1" + } + }, + "inherits": { + "version": "2.0.3", + "bundled": true, + "dev": true + }, + "invert-kv": { + "version": "2.0.0", + "bundled": true, + "dev": true + }, + "is-arrayish": { + "version": "0.2.1", + "bundled": true, + "dev": true + }, + "is-fullwidth-code-point": { + "version": "2.0.0", + "bundled": true, + "dev": true + }, + "is-stream": { + "version": "1.1.0", + "bundled": true, + "dev": true + }, + "isexe": { + "version": "2.0.0", + "bundled": true, + "dev": true + }, + "istanbul-lib-coverage": { + "version": "2.0.3", + "bundled": true, + "dev": true + }, + "istanbul-lib-hook": { + "version": "2.0.3", + "bundled": true, + "dev": true, + "requires": { + "append-transform": "^1.0.0" + } + }, + "istanbul-lib-report": { + "version": "2.0.4", + "bundled": true, + "dev": true, + "requires": { + "istanbul-lib-coverage": "^2.0.3", + "make-dir": "^1.3.0", + "supports-color": "^6.0.0" + }, + "dependencies": { + "supports-color": { + "version": "6.1.0", + "bundled": true, + "dev": true, + "requires": { + "has-flag": "^3.0.0" + } + } + } + }, + "istanbul-lib-source-maps": { + "version": "3.0.2", + "bundled": true, + "dev": true, + "requires": { + "debug": "^4.1.1", + "istanbul-lib-coverage": "^2.0.3", + "make-dir": "^1.3.0", + "rimraf": "^2.6.2", + "source-map": "^0.6.1" + }, + "dependencies": { + "source-map": { + "version": "0.6.1", + "bundled": true, + "dev": true + } + } + }, + "istanbul-reports": { + "version": "2.1.1", + "bundled": true, + "dev": true, + "requires": { + "handlebars": "^4.1.0" + } + }, + "json-parse-better-errors": { + "version": "1.0.2", + "bundled": true, + "dev": true + }, + "lcid": { + "version": "2.0.0", + "bundled": true, + "dev": true, + "requires": { + "invert-kv": "^2.0.0" + } + }, + "load-json-file": { + "version": "4.0.0", + "bundled": true, + "dev": true, + "requires": { + "graceful-fs": "^4.1.2", + "parse-json": "^4.0.0", + "pify": "^3.0.0", + "strip-bom": "^3.0.0" + } + }, + "locate-path": { + "version": "3.0.0", + "bundled": true, + "dev": true, + "requires": { + "p-locate": "^3.0.0", + "path-exists": "^3.0.0" + } + }, + "lodash": { + "version": "4.17.11", + "bundled": true, + "dev": true + }, + "lodash.flattendeep": { + "version": "4.4.0", + "bundled": true, + "dev": true + }, + "lru-cache": { + "version": "4.1.5", + "bundled": true, + "dev": true, + "requires": { + "pseudomap": "^1.0.2", + "yallist": "^2.1.2" + } + }, + "make-dir": { + "version": "1.3.0", + "bundled": true, + "dev": true, + "requires": { + "pify": "^3.0.0" + } + }, + "map-age-cleaner": { + "version": "0.1.3", + "bundled": true, + "dev": true, + "requires": { + "p-defer": "^1.0.0" + } + }, + "mem": { + "version": "4.1.0", + "bundled": true, + "dev": true, + "requires": { + "map-age-cleaner": "^0.1.1", + "mimic-fn": "^1.0.0", + "p-is-promise": "^2.0.0" + } + }, + "merge-source-map": { + "version": "1.1.0", + "bundled": true, + "dev": true, + "requires": { + "source-map": "^0.6.1" + }, + "dependencies": { + "source-map": { + "version": "0.6.1", + "bundled": true, + "dev": true + } + } + }, + "mimic-fn": { + "version": "1.2.0", + "bundled": true, + "dev": true + }, + "minimatch": { + "version": "3.0.4", + "bundled": true, + "dev": true, + "requires": { + "brace-expansion": "^1.1.7" + } + }, + "minimist": { + "version": "0.0.10", + "bundled": true, + "dev": true + }, + "mkdirp": { + "version": "0.5.1", + "bundled": true, + "dev": true, + "requires": { + "minimist": "0.0.8" + }, + "dependencies": { + "minimist": { + "version": "0.0.8", + "bundled": true, + "dev": true + } + } + }, + "ms": { + "version": "2.1.1", + "bundled": true, + "dev": true + }, + "nice-try": { + "version": "1.0.5", + "bundled": true, + "dev": true + }, + "normalize-package-data": { + "version": "2.5.0", + "bundled": true, + "dev": true, + "requires": { + "hosted-git-info": "^2.1.4", + "resolve": "^1.10.0", + "semver": "2 || 3 || 4 || 5", + "validate-npm-package-license": "^3.0.1" + } + }, + "npm-run-path": { + "version": "2.0.2", + "bundled": true, + "dev": true, + "requires": { + "path-key": "^2.0.0" + } + }, + "number-is-nan": { + "version": "1.0.1", + "bundled": true, + "dev": true + }, + "once": { + "version": "1.4.0", + "bundled": true, + "dev": true, + "requires": { + "wrappy": "1" + } + }, + "optimist": { + "version": "0.6.1", + "bundled": true, + "dev": true, + "requires": { + "minimist": "~0.0.1", + "wordwrap": "~0.0.2" + } + }, + "os-homedir": { + "version": "1.0.2", + "bundled": true, + "dev": true + }, + "os-locale": { + "version": "3.1.0", + "bundled": true, + "dev": true, + "requires": { + "execa": "^1.0.0", + "lcid": "^2.0.0", + "mem": "^4.0.0" + } + }, + "p-defer": { + "version": "1.0.0", + "bundled": true, + "dev": true + }, + "p-finally": { + "version": "1.0.0", + "bundled": true, + "dev": true + }, + "p-is-promise": { + "version": "2.0.0", + "bundled": true, + "dev": true + }, + "p-limit": { + "version": "2.1.0", + "bundled": true, + "dev": true, + "requires": { + "p-try": "^2.0.0" + } + }, + "p-locate": { + "version": "3.0.0", + "bundled": true, + "dev": true, + "requires": { + "p-limit": "^2.0.0" + } + }, + "p-try": { + "version": "2.0.0", + "bundled": true, + "dev": true + }, + "package-hash": { + "version": "3.0.0", + "bundled": true, + "dev": true, + "requires": { + "graceful-fs": "^4.1.15", + "hasha": "^3.0.0", + "lodash.flattendeep": "^4.4.0", + "release-zalgo": "^1.0.0" + } + }, + "parse-json": { + "version": "4.0.0", + "bundled": true, + "dev": true, + "requires": { + "error-ex": "^1.3.1", + "json-parse-better-errors": "^1.0.1" + } + }, + "path-exists": { + "version": "3.0.0", + "bundled": true, + "dev": true + }, + "path-is-absolute": { + "version": "1.0.1", + "bundled": true, + "dev": true + }, + "path-key": { + "version": "2.0.1", + "bundled": true, + "dev": true + }, + "path-parse": { + "version": "1.0.6", + "bundled": true, + "dev": true + }, + "path-type": { + "version": "3.0.0", + "bundled": true, + "dev": true, + "requires": { + "pify": "^3.0.0" + } + }, + "pify": { + "version": "3.0.0", + "bundled": true, + "dev": true + }, + "pkg-dir": { + "version": "3.0.0", + "bundled": true, + "dev": true, + "requires": { + "find-up": "^3.0.0" + } + }, + "pseudomap": { + "version": "1.0.2", + "bundled": true, + "dev": true + }, + "pump": { + "version": "3.0.0", + "bundled": true, + "dev": true, + "requires": { + "end-of-stream": "^1.1.0", + "once": "^1.3.1" + } + }, + "read-pkg": { + "version": "3.0.0", + "bundled": true, + "dev": true, + "requires": { + "load-json-file": "^4.0.0", + "normalize-package-data": "^2.3.2", + "path-type": "^3.0.0" + } + }, + "read-pkg-up": { + "version": "4.0.0", + "bundled": true, + "dev": true, + "requires": { + "find-up": "^3.0.0", + "read-pkg": "^3.0.0" + } + }, + "release-zalgo": { + "version": "1.0.0", + "bundled": true, + "dev": true, + "requires": { + "es6-error": "^4.0.1" + } + }, + "require-directory": { + "version": "2.1.1", + "bundled": true, + "dev": true + }, + "require-main-filename": { + "version": "1.0.1", + "bundled": true, + "dev": true + }, + "resolve": { + "version": "1.10.0", + "bundled": true, + "dev": true, + "requires": { + "path-parse": "^1.0.6" + } + }, + "resolve-from": { + "version": "4.0.0", + "bundled": true, + "dev": true + }, + "rimraf": { + "version": "2.6.3", + "bundled": true, + "dev": true, + "requires": { + "glob": "^7.1.3" + } + }, + "safe-buffer": { + "version": "5.1.2", + "bundled": true, + "dev": true + }, + "semver": { + "version": "5.6.0", + "bundled": true, + "dev": true + }, + "set-blocking": { + "version": "2.0.0", + "bundled": true, + "dev": true + }, + "shebang-command": { + "version": "1.2.0", + "bundled": true, + "dev": true, + "requires": { + "shebang-regex": "^1.0.0" + } + }, + "shebang-regex": { + "version": "1.0.0", + "bundled": true, + "dev": true + }, + "signal-exit": { + "version": "3.0.2", + "bundled": true, + "dev": true + }, + "spawn-wrap": { + "version": "1.4.2", + "bundled": true, + "dev": true, + "requires": { + "foreground-child": "^1.5.6", + "mkdirp": "^0.5.0", + "os-homedir": "^1.0.1", + "rimraf": "^2.6.2", + "signal-exit": "^3.0.2", + "which": "^1.3.0" + } + }, + "spdx-correct": { + "version": "3.1.0", + "bundled": true, "dev": true, "requires": { - "ms": "2.0.0" + "spdx-expression-parse": "^3.0.0", + "spdx-license-ids": "^3.0.0" } }, - "ms": { + "spdx-exceptions": { + "version": "2.2.0", + "bundled": true, + "dev": true + }, + "spdx-expression-parse": { + "version": "3.0.0", + "bundled": true, + "dev": true, + "requires": { + "spdx-exceptions": "^2.1.0", + "spdx-license-ids": "^3.0.0" + } + }, + "spdx-license-ids": { + "version": "3.0.3", + "bundled": true, + "dev": true + }, + "string-width": { + "version": "2.1.1", + "bundled": true, + "dev": true, + "requires": { + "is-fullwidth-code-point": "^2.0.0", + "strip-ansi": "^4.0.0" + } + }, + "strip-ansi": { + "version": "4.0.0", + "bundled": true, + "dev": true, + "requires": { + "ansi-regex": "^3.0.0" + } + }, + "strip-bom": { + "version": "3.0.0", + "bundled": true, + "dev": true + }, + "strip-eof": { + "version": "1.0.0", + "bundled": true, + "dev": true + }, + "test-exclude": { + "version": "5.1.0", + "bundled": true, + "dev": true, + "requires": { + "arrify": "^1.0.1", + "minimatch": "^3.0.4", + "read-pkg-up": "^4.0.0", + "require-main-filename": "^1.0.1" + } + }, + "uglify-js": { + "version": "3.4.9", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "commander": "~2.17.1", + "source-map": "~0.6.1" + }, + "dependencies": { + "source-map": { + "version": "0.6.1", + "bundled": true, + "dev": true, + "optional": true + } + } + }, + "uuid": { + "version": "3.3.2", + "bundled": true, + "dev": true + }, + "validate-npm-package-license": { + "version": "3.0.4", + "bundled": true, + "dev": true, + "requires": { + "spdx-correct": "^3.0.0", + "spdx-expression-parse": "^3.0.0" + } + }, + "which": { + "version": "1.3.1", + "bundled": true, + "dev": true, + "requires": { + "isexe": "^2.0.0" + } + }, + "which-module": { "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", + "bundled": true, "dev": true + }, + "wordwrap": { + "version": "0.0.3", + "bundled": true, + "dev": true + }, + "wrap-ansi": { + "version": "2.1.0", + "bundled": true, + "dev": true, + "requires": { + "string-width": "^1.0.1", + "strip-ansi": "^3.0.1" + }, + "dependencies": { + "ansi-regex": { + "version": "2.1.1", + "bundled": true, + "dev": true + }, + "is-fullwidth-code-point": { + "version": "1.0.0", + "bundled": true, + "dev": true, + "requires": { + "number-is-nan": "^1.0.0" + } + }, + "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" + } + }, + "strip-ansi": { + "version": "3.0.1", + "bundled": true, + "dev": true, + "requires": { + "ansi-regex": "^2.0.0" + } + } + } + }, + "wrappy": { + "version": "1.0.2", + "bundled": true, + "dev": true + }, + "write-file-atomic": { + "version": "2.4.2", + "bundled": true, + "dev": true, + "requires": { + "graceful-fs": "^4.1.11", + "imurmurhash": "^0.1.4", + "signal-exit": "^3.0.2" + } + }, + "y18n": { + "version": "4.0.0", + "bundled": true, + "dev": true + }, + "yallist": { + "version": "2.1.2", + "bundled": true, + "dev": true + }, + "yargs": { + "version": "12.0.5", + "bundled": true, + "dev": true, + "requires": { + "cliui": "^4.0.0", + "decamelize": "^1.2.0", + "find-up": "^3.0.0", + "get-caller-file": "^1.0.1", + "os-locale": "^3.0.0", + "require-directory": "^2.1.1", + "require-main-filename": "^1.0.1", + "set-blocking": "^2.0.0", + "string-width": "^2.0.0", + "which-module": "^2.0.0", + "y18n": "^3.2.1 || ^4.0.0", + "yargs-parser": "^11.1.1" + } + }, + "yargs-parser": { + "version": "11.1.1", + "bundled": true, + "dev": true, + "requires": { + "camelcase": "^5.0.0", + "decamelize": "^1.2.0" + } } } }, - "moment": { - "version": "2.22.2", - "resolved": "https://registry.npmjs.org/moment/-/moment-2.22.2.tgz", - "integrity": "sha1-PCV/mDn8DpP/UxSWMiOeuQeD/2Y=" - }, - "ms": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.1.tgz", - "integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg==" - }, - "ms-rest": { - "version": "2.3.7", - "resolved": "https://registry.npmjs.org/ms-rest/-/ms-rest-2.3.7.tgz", - "integrity": "sha512-zZwuckC/Uv8F1Jr1bW+U1tsDTErWhtH6W4mpxvRrta4YrKwkFeLMt53RsaDOWTqMFsVpjNuCfznV1uxeGUF3/g==", - "requires": { - "duplexer": "^0.1.1", - "is-buffer": "^1.1.6", - "is-stream": "^1.1.0", - "moment": "^2.21.0", - "request": "^2.88.0", - "through": "^2.3.8", - "tunnel": "0.0.5", - "uuid": "^3.2.1" - }, - "dependencies": { - "is-buffer": { - "version": "1.1.6", - "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.6.tgz", - "integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==" - } - } - }, - "ms-rest-azure": { - "version": "2.5.9", - "resolved": "https://registry.npmjs.org/ms-rest-azure/-/ms-rest-azure-2.5.9.tgz", - "integrity": "sha512-qonobzWLS7Jl6qwgTuA/SfyCtnv7olvCRKrcF8nzXSj68ds4Oj3K64ntzgQajroKa0hKVMcPUFbTk1IYMGvu8w==", - "requires": { - "adal-node": "^0.1.28", - "async": "2.6.0", - "moment": "^2.22.2", - "ms-rest": "^2.3.2", - "request": "^2.88.0", - "uuid": "^3.2.1" - } - }, "oauth-sign": { "version": "0.9.0", "resolved": "https://registry.npmjs.org/oauth-sign/-/oauth-sign-0.9.0.tgz", "integrity": "sha512-fexhUFFPTGV8ybAtSIGbV6gOkSv8UtRbDBnAyLQw4QPKkgNlsH2ByPGtMUqdWkos6YCRmAqViwgZrJc/mRDzZQ==" }, + "object.omit": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/object.omit/-/object.omit-2.0.1.tgz", + "integrity": "sha1-Gpx0SCnznbuFjHbKNXmuKlTr0fo=", + "dev": true, + "requires": { + "for-own": "^0.1.4", + "is-extendable": "^0.1.1" + } + }, "once": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", @@ -1064,6 +2722,24 @@ "wrappy": "1" } }, + "parse-glob": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/parse-glob/-/parse-glob-3.0.4.tgz", + "integrity": "sha1-ssN2z7EfNVE7rdFz7wu246OIORw=", + "dev": true, + "requires": { + "glob-base": "^0.3.0", + "is-dotfile": "^1.0.0", + "is-extglob": "^1.0.0", + "is-glob": "^2.0.0" + } + }, + "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 + }, "path-browserify": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/path-browserify/-/path-browserify-1.0.0.tgz", @@ -1075,6 +2751,12 @@ "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=", "dev": true }, + "path-key": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-2.0.1.tgz", + "integrity": "sha1-QRyttXTFoUDTpLGRDUDYDMn0C0A=", + "dev": true + }, "path-parse": { "version": "1.0.6", "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.6.tgz", @@ -1092,6 +2774,12 @@ "resolved": "https://registry.npmjs.org/performance-now/-/performance-now-2.1.0.tgz", "integrity": "sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns=" }, + "preserve": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/preserve/-/preserve-0.2.0.tgz", + "integrity": "sha1-gV7R9uvGWSb4ZbMQwHE7yzMVzks=", + "dev": true + }, "process-nextick-args": { "version": "1.0.7", "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-1.0.7.tgz", @@ -1112,6 +2800,31 @@ "resolved": "https://registry.npmjs.org/qs/-/qs-6.5.2.tgz", "integrity": "sha512-N5ZAX4/LxJmF+7wN74pUD6qAh9/wnvdQcjq9TZjevvXzSUo7bfmw91saqMjzGS2xq91/odN2dW/WOl7qQHNDGA==" }, + "randomatic": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/randomatic/-/randomatic-3.1.1.tgz", + "integrity": "sha512-TuDE5KxZ0J461RVjrJZCJc+J+zCkTb1MbH9AQUq68sMhOMcy9jLcb3BrZKgp9q9Ncltdg4QVqWrH02W2EFFVYw==", + "dev": true, + "requires": { + "is-number": "^4.0.0", + "kind-of": "^6.0.0", + "math-random": "^1.0.1" + }, + "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 + }, + "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 + } + } + }, "readable-stream": { "version": "2.0.6", "resolved": "http://registry.npmjs.org/readable-stream/-/readable-stream-2.0.6.tgz", @@ -1125,6 +2838,33 @@ "util-deprecate": "~1.0.1" } }, + "regex-cache": { + "version": "0.4.4", + "resolved": "https://registry.npmjs.org/regex-cache/-/regex-cache-0.4.4.tgz", + "integrity": "sha512-nVIZwtCjkC9YgvWkpM55B5rBhBYRZhAaJbgcFYXXsHnbZ9UZI9nnVWYZpBlCqv9ho2eZryPnWrZGsOdPwVWXWQ==", + "dev": true, + "requires": { + "is-equal-shallow": "^0.1.3" + } + }, + "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", + "integrity": "sha512-ahGq0ZnV5m5XtZLMb+vP76kcAM5nkLqk0lpqAuojSKGgQtn4eRi4ZZGm2olo2zKFH+sMsWaqOCW1dqAnOru72g==", + "dev": true + }, + "repeat-string": { + "version": "1.6.1", + "resolved": "https://registry.npmjs.org/repeat-string/-/repeat-string-1.6.1.tgz", + "integrity": "sha1-jcrkcOHIirwtYA//Sndihtp15jc=", + "dev": true + }, "request": { "version": "2.88.0", "resolved": "https://registry.npmjs.org/request/-/request-2.88.0.tgz", @@ -1161,6 +2901,22 @@ "path-parse": "^1.0.5" } }, + "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-url": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/resolve-url/-/resolve-url-0.2.1.tgz", + "integrity": "sha1-LGN/53yJOv0qZj/iGqkIAGjiBSo=", + "dev": true + }, "rhea": { "version": "0.3.3", "resolved": "https://registry.npmjs.org/rhea/-/rhea-0.3.3.tgz", @@ -1187,6 +2943,108 @@ "glob": "^7.0.5" } }, + "rollup": { + "version": "0.66.6", + "resolved": "https://registry.npmjs.org/rollup/-/rollup-0.66.6.tgz", + "integrity": "sha512-J7/SWanrcb83vfIHqa8+aVVGzy457GcjA6GVZEnD0x2u4OnOd0Q1pCrEoNe8yLwM6z6LZP02zBT2uW0yh5TqOw==", + "dev": true, + "requires": { + "@types/estree": "0.0.39", + "@types/node": "*" + } + }, + "rollup-plugin-commonjs": { + "version": "9.2.0", + "resolved": "https://registry.npmjs.org/rollup-plugin-commonjs/-/rollup-plugin-commonjs-9.2.0.tgz", + "integrity": "sha512-0RM5U4Vd6iHjL6rLvr3lKBwnPsaVml+qxOGaaNUWN1lSq6S33KhITOfHmvxV3z2vy9Mk4t0g4rNlVaJJsNQPWA==", + "dev": true, + "requires": { + "estree-walker": "^0.5.2", + "magic-string": "^0.25.1", + "resolve": "^1.8.1", + "rollup-pluginutils": "^2.3.3" + } + }, + "rollup-plugin-json": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/rollup-plugin-json/-/rollup-plugin-json-3.1.0.tgz", + "integrity": "sha512-BlYk5VspvGpjz7lAwArVzBXR60JK+4EKtPkCHouAWg39obk9S61hZYJDBfMK+oitPdoe11i69TlxKlMQNFC/Uw==", + "dev": true, + "requires": { + "rollup-pluginutils": "^2.3.1" + } + }, + "rollup-plugin-multi-entry": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/rollup-plugin-multi-entry/-/rollup-plugin-multi-entry-2.1.0.tgz", + "integrity": "sha512-YVVsI15uvbxMKdeYS5NXQa5zbVr/DYdDBBwseC80+KAc7mqDUjM6Qe4wl+jFucVw1yvBDZFk0PPSBZqoLq8xUA==", + "dev": true, + "requires": { + "matched": "^1.0.2" + } + }, + "rollup-plugin-node-resolve": { + "version": "3.4.0", + "resolved": "https://registry.npmjs.org/rollup-plugin-node-resolve/-/rollup-plugin-node-resolve-3.4.0.tgz", + "integrity": "sha512-PJcd85dxfSBWih84ozRtBkB731OjXk0KnzN0oGp7WOWcarAFkVa71cV5hTJg2qpVsV2U8EUwrzHP3tvy9vS3qg==", + "dev": true, + "requires": { + "builtin-modules": "^2.0.0", + "is-module": "^1.0.0", + "resolve": "^1.1.6" + }, + "dependencies": { + "builtin-modules": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/builtin-modules/-/builtin-modules-2.0.0.tgz", + "integrity": "sha512-3U5kUA5VPsRUA3nofm/BXX7GVHKfxz0hOBAPxXrIvHzlDRkQVqEn6yi8QJegxl4LzOHLdvb7XF5dVawa/VVYBg==", + "dev": true + } + } + }, + "rollup-plugin-replace": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/rollup-plugin-replace/-/rollup-plugin-replace-2.1.0.tgz", + "integrity": "sha512-SxrAIgpH/B5/W4SeULgreOemxcpEgKs2gcD42zXw50bhqGWmcnlXneVInQpAqzA/cIly4bJrOpeelmB9p4YXSQ==", + "dev": true, + "requires": { + "magic-string": "^0.25.1", + "minimatch": "^3.0.2", + "rollup-pluginutils": "^2.0.1" + } + }, + "rollup-plugin-sourcemaps": { + "version": "0.4.2", + "resolved": "https://registry.npmjs.org/rollup-plugin-sourcemaps/-/rollup-plugin-sourcemaps-0.4.2.tgz", + "integrity": "sha1-YhJaqUCHqt97g+9N+vYptHMTXoc=", + "dev": true, + "requires": { + "rollup-pluginutils": "^2.0.1", + "source-map-resolve": "^0.5.0" + } + }, + "rollup-plugin-uglify": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/rollup-plugin-uglify/-/rollup-plugin-uglify-6.0.2.tgz", + "integrity": "sha512-qwz2Tryspn5QGtPUowq5oumKSxANKdrnfz7C0jm4lKxvRDsNe/hSGsB9FntUul7UeC4TsZEWKErVgE1qWSO0gw==", + "dev": true, + "requires": { + "@babel/code-frame": "^7.0.0", + "jest-worker": "^24.0.0", + "serialize-javascript": "^1.6.1", + "uglify-js": "^3.4.9" + } + }, + "rollup-pluginutils": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/rollup-pluginutils/-/rollup-pluginutils-2.3.3.tgz", + "integrity": "sha512-2XZwja7b6P5q4RZ5FhyX1+f46xi1Z3qBKigLRZ6VTZjwbN0K1IFGMlwm06Uu0Emcre2Z63l77nq/pzn+KxIEoA==", + "dev": true, + "requires": { + "estree-walker": "^0.5.2", + "micromatch": "^2.3.11" + } + }, "safe-buffer": { "version": "5.1.2", "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", @@ -1208,12 +3066,46 @@ "integrity": "sha512-PqpAxfrEhlSUWge8dwIp4tZnQ25DIOthpiaHNIthsjEFQD6EvqUKUDM7L8O2rShkFccYo1VjJR0coWfNkCubRw==", "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==", + "dev": true + }, + "shebang-command": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-1.2.0.tgz", + "integrity": "sha1-RKrGW2lbAzmJaMOfNj/uXer98eo=", + "dev": true, + "requires": { + "shebang-regex": "^1.0.0" + } + }, + "shebang-regex": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-1.0.0.tgz", + "integrity": "sha1-2kL0l0DAtC2yypcoVxyxkMmO/qM=", + "dev": true + }, "source-map": { "version": "0.6.1", "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", "dev": true }, + "source-map-resolve": { + "version": "0.5.2", + "resolved": "https://registry.npmjs.org/source-map-resolve/-/source-map-resolve-0.5.2.tgz", + "integrity": "sha512-MjqsvNwyz1s0k81Goz/9vRBe9SZdB09Bdw+/zYyO+3CuPk6fouTaxscHkgtE8jKvf01kVfl8riHzERQ/kefaSA==", + "dev": true, + "requires": { + "atob": "^2.1.1", + "decode-uri-component": "^0.2.0", + "resolve-url": "^0.2.1", + "source-map-url": "^0.4.0", + "urix": "^0.1.0" + } + }, "source-map-support": { "version": "0.5.9", "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.9.tgz", @@ -1224,6 +3116,18 @@ "source-map": "^0.6.0" } }, + "source-map-url": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/source-map-url/-/source-map-url-0.4.0.tgz", + "integrity": "sha1-PpNdfd1zYxuXZZlW1VEo6HtQhKM=", + "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 + }, "sprintf-js": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", @@ -1274,6 +3178,12 @@ "resolved": "http://registry.npmjs.org/through/-/through-2.3.8.tgz", "integrity": "sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU=" }, + "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 + }, "tough-cookie": { "version": "2.4.3", "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.4.3.tgz", @@ -1283,6 +3193,12 @@ "punycode": "^1.4.1" } }, + "trim-right": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/trim-right/-/trim-right-1.0.1.tgz", + "integrity": "sha1-yy4SAwZ+DI3h9hQJS5/kVwTqYAM=", + "dev": true + }, "ts-node": { "version": "7.0.1", "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-7.0.1.tgz", @@ -1367,11 +3283,29 @@ "dev": true }, "typescript": { - "version": "2.9.2", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-2.9.2.tgz", - "integrity": "sha512-Gr4p6nFNaoufRIY4NMdpQRNmgxVIGMs4Fcu/ujdYk3nAZqk7supzBE9idmvfZIlH/Cuj//dvi+019qEue9lV0w==", + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-3.3.1.tgz", + "integrity": "sha512-cTmIDFW7O0IHbn1DPYjkiebHxwtCMU+eTy30ZtJNBPF9j2O1ITu5XH2YnBeVRKWHqF+3JQwWJv0Q0aUgX8W7IA==", "dev": true }, + "uglify-js": { + "version": "3.4.9", + "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.4.9.tgz", + "integrity": "sha512-8CJsbKOtEbnJsTyv6LE6m6ZKniqMiFWmm9sRbopbkGs3gMPPfd3Fh8iIA4Ykv5MgaTbqHr4BaoGLJLZNhsrW1Q==", + "dev": true, + "requires": { + "commander": "~2.17.1", + "source-map": "~0.6.1" + }, + "dependencies": { + "commander": { + "version": "2.17.1", + "resolved": "https://registry.npmjs.org/commander/-/commander-2.17.1.tgz", + "integrity": "sha512-wPMUt6FnH2yzG95SA6mzjQOEKUU3aLaDEmzs1ti+1E9h+CsrZghRlqEM/EJ4KscsQVG8uNN4uVreUeT8+drlgg==", + "dev": true + } + } + }, "underscore": { "version": "1.9.1", "resolved": "https://registry.npmjs.org/underscore/-/underscore-1.9.1.tgz", @@ -1383,6 +3317,12 @@ "integrity": "sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==", "dev": true }, + "urix": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/urix/-/urix-0.1.0.tgz", + "integrity": "sha1-2pN/emLiH+wf0Y1Js1wpNQZ6bHI=", + "dev": true + }, "util-deprecate": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", @@ -1408,6 +3348,15 @@ "extsprintf": "^1.2.0" } }, + "which": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz", + "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==", + "dev": true, + "requires": { + "isexe": "^2.0.0" + } + }, "wrappy": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", diff --git a/processor/package.json b/processor/package.json index ee33cc75491c..b2d5db38e725 100644 --- a/processor/package.json +++ b/processor/package.json @@ -4,14 +4,22 @@ "description": "Azure Event Processor Host (Event Hubs) SDK for JS.", "author": "Microsoft Corporation", "license": "MIT", + "keywords": [ + "azure", + "cloud", + "event hubs", + "event processor", + "events" + ], "main": "./dist/lib/index.js", + "module": "dist-esm/lib/index.js", "types": "./typings/lib/index.d.ts", "dependencies": { "@azure/event-hubs": "^1.0.6", "azure-storage": "^2.10.1", "async-lock": "^1.1.3", "debug": "^3.1.0", - "ms-rest-azure": "^2.5.7", + "ms-rest-azure": "^2.5.9", "path-browserify": "^1.0.0", "tslib": "^1.9.3", "uuid": "^3.3.2" @@ -28,21 +36,46 @@ "@types/uuid": "^3.4.3", "chai": "^4.1.2", "chai-as-promised": "^7.1.1", + "cross-env": "^5.2.0", "dotenv": "^5.0.1", "mocha": "^5.2.0", + "nyc": "^13.3.0", "rimraf": "^2.6.2", - "ts-node": "^7.0.0", + "rollup": "^0.66.6", + "rollup-plugin-commonjs": "^9.2.0", + "rollup-plugin-json": "^3.1.0", + "rollup-plugin-multi-entry": "^2.0.2", + "rollup-plugin-node-resolve": "^3.4.0", + "rollup-plugin-replace": "^2.1.0", + "rollup-plugin-sourcemaps": "^0.4.2", + "rollup-plugin-uglify": "^6.0.0", + "ts-node": "^7.0.1", "tslint": "^5.11.0", - "typescript": "^2.9.2" + "typescript": "^3.2.1" }, + "files": [ + "LICENSE", + "changelog.md", + "overview.md", + "README.md", + "dist/", + "dist-esm/lib/", + "lib/", + "typings/" + ], "scripts": { - "tslint": "tslint -p . -c tslint.json --exclude examples/**/*.ts --exclude tests/**/*.ts", + "tslint": "tslint -p . -c tslint.json", "tsc": "tsc", - "prebuild": "rimraf dist && rimraf typings", - "build": "npm run tslint && npm run tsc", + "prebuild": "rimraf dist && rimraf dist-esm && rimraf test-dist && rimraf typings", + "build": "npm run tslint && tsc -p . && rollup -c", + "build-browser": "tsc -p . && cross-env ONLY_BROWSER=true rollup -c", + "build-node": "tsc -p . && cross-env ONLY_NODE=true rollup -c", + "build-test": "tsc -p . && cross-env ONLY_NODE=true rollup -c rollup.test.config.js", + "build-samples": "cd examples && tsc -p .", "test": "npm run build", - "unit": "mocha -r ts-node/register -t 50000 ./tests/**/*.spec.ts --exit", - "prepare": "npm run build", + "unit": "npm run build-test && mocha -t 75000 test-dist/index.js --exit", + "coverage": "npm run build-test && nyc --reporter=lcov mocha -t 85000 test-dist/index.js --exit", + "prepack": "npm i && npm run build", "extract-api": "tsc -p . && api-extractor run --local" }, "homepage": "https://github.com/Azure/azure-event-hubs-node/tree/master/processor", diff --git a/processor/rollup.base.config.js b/processor/rollup.base.config.js new file mode 100644 index 000000000000..90a52b8aefe0 --- /dev/null +++ b/processor/rollup.base.config.js @@ -0,0 +1,117 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +import nodeResolve from "rollup-plugin-node-resolve"; +import multiEntry from "rollup-plugin-multi-entry"; +import cjs from "rollup-plugin-commonjs"; +import json from "rollup-plugin-json"; +import replace from "rollup-plugin-replace"; +import { uglify } from "rollup-plugin-uglify"; +import sourcemaps from "rollup-plugin-sourcemaps"; + +import path from "path"; + +const pkg = require("./package.json"); +const depNames = Object.keys(pkg.dependencies); +const input = "dist-esm/lib/index.js"; +const production = process.env.NODE_ENV === "production"; + +export function nodeConfig(test = false) { + const externalNodeBuiltins = ["events", "util"]; + const baseConfig = { + input: input, + external: depNames.concat(externalNodeBuiltins), + output: { file: "dist/index.js", format: "cjs", sourcemap: true }, + plugins: [ + sourcemaps(), + replace({ + delimiters: ["", ""], + values: { + // replace dynamic checks with if (true) since this is for node only. + // Allows rollup's dead code elimination to be more aggressive. + "if (isNode)": "if (true)" + } + }), + nodeResolve({ preferBuiltins: true }), + cjs(), + json() + ] + }; + + baseConfig.external.push("crypto", "path"); + + if (test) { + // entry point is every test file + baseConfig.input = "dist-esm/tests/**/*.spec.js"; + baseConfig.plugins.unshift(multiEntry({ exports: false })); + + // different output file + baseConfig.output.file = "test-dist/index.js"; + + // mark assert as external + baseConfig.external.push("assert", "fs", "os", "tty", "child_process"); + + baseConfig.onwarn = (warning) => { + if ( + warning.code === "CIRCULAR_DEPENDENCY" && + warning.importer.indexOf(path.normalize("node_modules/chai/lib") === 0) + ) { + // Chai contains circular references, but they are not fatal and can be ignored. + return; + } + + console.error(`(!) ${warning.message}`); + }; + } else if (production) { + baseConfig.plugins.push(uglify()); + } + + return baseConfig; +} + +export function browserConfig(test = false) { + const baseConfig = { + input: input, + external: ["ms-rest-js"], + output: { + file: "browser/index.js", + format: "umd", + name: "ExampleClient", + sourcemap: true, + globals: { "ms-rest-js": "msRest" } + }, + plugins: [ + sourcemaps(), + replace( + // ms-rest-js is externalized so users must include it prior to using this bundle. + { + delimiters: ["", ""], + values: { + // replace dynamic checks with if (false) since this is for + // browser only. Rollup's dead code elimination will remove + // any code guarded by if (isNode) { ... } + "if (isNode)": "if (false)" + } + } + ), + nodeResolve({ + preferBuiltins: false, + browser: true + }), + cjs({ + namedExports: { events: ["EventEmitter"] } + }), + json() + ] + }; + + if (test) { + baseConfig.input = "dist-esm/tests/**/*.spec.js"; + baseConfig.plugins.unshift(multiEntry({ exports: false })); + baseConfig.output.file = "test-browser/index.js"; + } else if (production) { + baseConfig.plugins.push(uglify()); + } + + return baseConfig; +} diff --git a/processor/rollup.config.js b/processor/rollup.config.js new file mode 100644 index 000000000000..a62dabd573b4 --- /dev/null +++ b/processor/rollup.config.js @@ -0,0 +1,17 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +import * as base from "./rollup.base.config"; + +const inputs = []; + +if (!process.env.ONLY_BROWSER) { + inputs.push(base.nodeConfig()); +} + +// Disable this until we are ready to run rollup for the browser. +// if (!process.env.ONLY_NODE) { +// inputs.push(base.browserConfig()); +// } + +export default inputs; diff --git a/processor/rollup.test.config.js b/processor/rollup.test.config.js new file mode 100644 index 000000000000..fd819935cb22 --- /dev/null +++ b/processor/rollup.test.config.js @@ -0,0 +1,6 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +import * as base from "./rollup.base.config"; + +export default [base.nodeConfig(true) /*, base.browserConfig(true)*/]; diff --git a/processor/tests/eph.spec.ts b/processor/tests/eph.spec.ts index 442cc897a09c..7116f8116642 100644 --- a/processor/tests/eph.spec.ts +++ b/processor/tests/eph.spec.ts @@ -1,22 +1,20 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -import "mocha"; -import * as chai from "chai"; -import * as uuid from "uuid/v4"; -import * as chaiAsPromised from "chai-as-promised"; +import chai from "chai"; +import uuid from "uuid/v4"; +import chaiAsPromised from "chai-as-promised"; chai.use(chaiAsPromised); -import * as debugModule from "debug"; +import debugModule from "debug"; const should = chai.should(); const debug = debugModule("azure:eph:eph-spec"); import { EventHubClient, EventData, EventPosition, delay, Dictionary } from "@azure/event-hubs"; -import * as dotenv from "dotenv"; +import dotenv from "dotenv"; import { PartitionContext, OnReceivedMessage, EventProcessorHost, OnReceivedError } from "../lib"; dotenv.config(); -describe("EPH", function () { - this.timeout(1200000); - before("validate environment", function () { +describe("EPH", function (): void { + before("validate environment", function (): void { should.exist(process.env.STORAGE_CONNECTION_STRING, "define STORAGE_CONNECTION_STRING in your environment before running integration tests."); should.exist(process.env.EVENTHUB_CONNECTION_STRING, @@ -29,9 +27,9 @@ describe("EPH", function () { const hubName = process.env.EVENTHUB_NAME; let host: EventProcessorHost; - describe("user-agent", function () { + describe("user-agent", function (): void { - it("should be populated correctly as a part of the connection property", function (done) { + it("should be populated correctly as a part of the connection property", function (done: Mocha.Done): void { host = EventProcessorHost.createFromConnectionString( EventProcessorHost.createHostName(), storageConnString!, @@ -51,7 +49,7 @@ describe("EPH", function () { done(); }); - it("should support appending custom user-agent", function (done) { + it("should support appending custom user-agent", function (done: Mocha.Done): void { const customua = "my-custom-string"; host = EventProcessorHost.createFromConnectionString( EventProcessorHost.createHostName(), @@ -74,8 +72,8 @@ describe("EPH", function () { }); }); - describe("single", function () { - it("should checkpoint messages in order", function (done) { + describe("single", function (): void { + it("should checkpoint messages in order", function (done: Mocha.Done): void { const test = async () => { host = EventProcessorHost.createFromConnectionString( EventProcessorHost.createHostName(), @@ -88,9 +86,9 @@ describe("EPH", function () { } ); const messageCount = 100; - let datas: EventData[] = []; + const datas: EventData[] = []; for (let i = 0; i < messageCount; i++) { - let obj: EventData = { body: `Hello foo ${i}` }; + const obj: EventData = { body: `Hello foo ${i}` }; datas.push(obj); } const ehc = EventHubClient.createFromConnectionString(ehConnString!, hubName!); @@ -136,11 +134,11 @@ describe("EPH", function () { content.offset.should.equal(offset); content.sequenceNumber.should.equal(sequence); await host.stop(); - } + }; test().then(() => { done(); }).catch((err) => { done(err); }); }); - it("should checkpoint a single received event.", function (done) { + it("should checkpoint a single received event.", function (done: Mocha.Done): void { const msgId = uuid(); const ehc = EventHubClient.createFromConnectionString(ehConnString!, hubName!); ehc.getPartitionIds().then((ids) => { @@ -185,13 +183,15 @@ describe("EPH", function () { done(err); }; return host.start(onMessage, onError); + }).catch((err) => { + done(err); }); }).catch((err) => { done(err); }); }); - it("should be able to receive messages from the checkpointed offset.", function (done) { + it("should be able to receive messages from the checkpointed offset.", function (done: Mocha.Done): void { const test = async () => { const msgId = uuid(); const ehc = EventHubClient.createFromConnectionString(ehConnString!, hubName!); @@ -230,7 +230,7 @@ describe("EPH", function () { const firstSend = await sendAcrossAllPartitions(ehc, ids); let count = 0; const onMessage: OnReceivedMessage = async (context: PartitionContext, data: EventData) => { - const partitionId = context.partitionId + const partitionId = context.partitionId; debug(">>>>> Rx message from '%s': '%o'", partitionId, data); if (data.properties!.message_id === firstSend[partitionId].properties!.message_id) { debug(">>>> Checkpointing the received message..."); @@ -239,7 +239,7 @@ describe("EPH", function () { } else { const msg = `Sent message id '${data.properties!.message_id}' did not match the ` + `received message id '${firstSend[partitionId].properties!.message_id}' for ` + - `partitionId '${partitionId}'.` + `partitionId '${partitionId}'.`; throw new Error(msg); } }; @@ -261,7 +261,7 @@ describe("EPH", function () { const secondSend = await sendAcrossAllPartitions(ehc, ids); let count2 = 0; const onMessage2: OnReceivedMessage = async (context: PartitionContext, data: EventData) => { - const partitionId = context.partitionId + const partitionId = context.partitionId; debug(">>>>> Rx message from '%s': '%s'", partitionId, data); if (data.properties!.message_id === secondSend[partitionId].properties!.message_id) { debug(">>>> Checkpointing the received message..."); @@ -270,7 +270,7 @@ describe("EPH", function () { } else { const msg = `Sent message id '${data.properties!.message_id}' did not match the ` + `received message id '${secondSend[partitionId].properties!.message_id}' for ` + - `partitionId '${partitionId}'.` + `partitionId '${partitionId}'.`; throw new Error(msg); } }; @@ -296,8 +296,8 @@ describe("EPH", function () { }); }); - describe("multiple", function () { - it("should be able to run multiple eph successfully.", function (done) { + describe("multiple", function (): void { + it("should be able to run multiple eph successfully.", function (done: Mocha.Done): void { const test = async () => { const ehc = EventHubClient.createFromConnectionString(ehConnString!, hubName!); const containerName: string = `sharedhost-${uuid()}`; @@ -317,7 +317,7 @@ describe("EPH", function () { for (let i = 0; i < ids.length; i++) { const data: EventData = { body: `Hello World - ${ids[i]}!!` - } + }; sendDataByPartition[ids[i]] = data; await ehc.send(data, ids[i]); debug(">>> Sent data to partition: %s", ids[i]); @@ -346,13 +346,13 @@ describe("EPH", function () { debug(">>> [%s] Rx message from '%s': '%O'", hostName, context.partitionId, data); should.equal(sendDataByPartition[context.partitionId].body, data.body); }; - hostByName[hostName].start(onMessage, onError); + await hostByName[hostName].start(onMessage, onError); debug(">>> Sleeping for 8 seconds after starting %s.", hostName); await delay(8000); debug(">>> [%s] currently receiving messages from partitions : %o", hostName, hostByName[hostName].receivingFromPartitions); } - debug(">>> Sleeping for another 15 seconds.") + debug(">>> Sleeping for another 15 seconds."); await delay(15000); const hostToPartition = getReceivingFromPartitionsForAllEph(); for (const host in hostToPartition) { @@ -370,8 +370,8 @@ describe("EPH", function () { }); }); - describe("runtimeInfo", function () { - it("should get hub runtime info correctly", function (done) { + describe("runtimeInfo", function (): void { + it("should get hub runtime info correctly", function (done: Mocha.Done): void { const test = async () => { host = EventProcessorHost.createFromConnectionString( EventProcessorHost.createHostName(), @@ -391,7 +391,7 @@ describe("EPH", function () { test().then(() => { done(); }).catch((err) => { done(err); }); }); - it("should get partition runtime info correctly with partitionId as string", function (done) { + it("should get partition runtime info correctly with partitionId as string", function (done: Mocha.Done): void { const test = async () => { host = EventProcessorHost.createFromConnectionString( EventProcessorHost.createHostName(), @@ -416,7 +416,7 @@ describe("EPH", function () { test().then(() => { done(); }).catch((err) => { done(err); }); }); - it("should get partition runtime info correctly with partitionId as number", function (done) { + it("should get partition runtime info correctly with partitionId as number", function (done: Mocha.Done): void { const test = async () => { host = EventProcessorHost.createFromConnectionString( EventProcessorHost.createHostName(), @@ -440,7 +440,7 @@ describe("EPH", function () { test().then(() => { done(); }).catch((err) => { done(err); }); }); - it("should fail getting partition information when partitionId is not a string or number", function (done) { + it("should fail getting partition information when partitionId is not a string or number", function (done: Mocha.Done): void { const test = async () => { host = EventProcessorHost.createFromConnectionString( EventProcessorHost.createHostName(), @@ -461,7 +461,7 @@ describe("EPH", function () { test().then(() => { done(); }).catch((err) => { done(err); }); }); - it("should fail getting partition information when partitionId is empty string", function (done) { + it("should fail getting partition information when partitionId is empty string", function (done: Mocha.Done): void { const test = async () => { host = EventProcessorHost.createFromConnectionString( EventProcessorHost.createHostName(), @@ -482,7 +482,7 @@ describe("EPH", function () { test().then(() => { done(); }).catch((err) => { done(err); }); }); - it("should fail getting partition information when partitionId is a negative number", function (done) { + it("should fail getting partition information when partitionId is a negative number", function (done: Mocha.Done): void { const test = async () => { host = EventProcessorHost.createFromConnectionString( EventProcessorHost.createHostName(), @@ -504,10 +504,10 @@ describe("EPH", function () { }); }); - describe("options", function () { - it("should throw an error if the event hub name is neither provided in the connection string and nor in the options object", function (done) { + describe("options", function (): void { + it("should throw an error if the event hub name is neither provided in the connection string and nor in the options object", function (done: Mocha.Done): void { try { - const ehc = "Endpoint=sb://foo.bar.baz.net/;SharedAccessKeyName=somekey;SharedAccessKey=somesecret" + const ehc = "Endpoint=sb://foo.bar.baz.net/;SharedAccessKeyName=somekey;SharedAccessKey=somesecret"; EventProcessorHost.createFromConnectionString( EventProcessorHost.createHostName(), storageConnString!, @@ -524,7 +524,7 @@ describe("EPH", function () { } }); - it("should get hub runtime info correctly when eventhub name is present in connection string but not as an option in the options object.", function (done) { + it("should get hub runtime info correctly when eventhub name is present in connection string but not as an option in the options object.", function (done: Mocha.Done): void { const test = async () => { host = EventProcessorHost.createFromConnectionString( EventProcessorHost.createHostName(), @@ -544,7 +544,7 @@ describe("EPH", function () { test().then(() => { done(); }).catch((err) => { done(err); }); }); - it("when eventhub name is present in connection string and in the options object, the one in options object is selected.", function (done) { + it("when eventhub name is present in connection string and in the options object, the one in options object is selected.", function (done: Mocha.Done): void { const test = async () => { host = EventProcessorHost.createFromConnectionString( EventProcessorHost.createHostName(), @@ -565,4 +565,4 @@ describe("EPH", function () { test().then(() => { done(); }).catch((err) => { done(err); }); }); }); -}); \ No newline at end of file +}).timeout(1200000); diff --git a/processor/tests/iothub.spec.ts b/processor/tests/iothub.spec.ts index 9ac6416b5f68..6f488f32dd44 100644 --- a/processor/tests/iothub.spec.ts +++ b/processor/tests/iothub.spec.ts @@ -1,13 +1,12 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -import "mocha"; -import * as dotenv from "dotenv"; -import * as chai from "chai"; +import dotenv from "dotenv"; +import chai from "chai"; const should = chai.should(); -import * as chaiAsPromised from "chai-as-promised"; +import chaiAsPromised from "chai-as-promised"; chai.use(chaiAsPromised); -import * as debugModule from "debug"; +import debugModule from "debug"; const debug = debugModule("azure:eph:iothub-spec"); import { EventPosition, OnReceivedError, PartitionContext, EventData, OnReceivedMessage, EventProcessorHost @@ -15,18 +14,17 @@ import { import { delay } from "@azure/event-hubs"; dotenv.config(); -describe("EPH with iothub connection string", function () { - this.timeout(60000); +describe("EPH with iothub connection string", function (): void { const iothubConnString = process.env.IOTHUB_CONNECTION_STRING; const storageConnString = process.env.STORAGE_CONNECTION_STRING; const hostName = EventProcessorHost.createHostName(); let host: EventProcessorHost; - before("validate environment", async function () { + before("validate environment", async function (): Promise { should.exist(process.env.IOTHUB_CONNECTION_STRING, "define IOTHUB_CONNECTION_STRING in your environment before running integration tests."); }); - it("should be able to receive messages from the event hub associated with an iothub.", function (done) { + it("should be able to receive messages from the event hub associated with an iothub.", function (done: Mocha.Done): void { const test = async () => { try { host = await EventProcessorHost.createFromIotHubConnectionString( @@ -49,6 +47,7 @@ describe("EPH with iothub connection string", function () { }; const runtimeInfo = await host.getHubRuntimeInformation(); debug(">>>> runtimeInfo: %O", runtimeInfo); + // tslint:disable-next-line: no-unused-expression runtimeInfo.createdAt.should.exist; (typeof runtimeInfo.partitionCount).should.equal("number"); await host.start(onMessage, onError); @@ -57,7 +56,7 @@ describe("EPH with iothub connection string", function () { } catch (err) { throw err; } - } + }; test().then(() => { done(); }).catch((err) => { done(err); }); }); -}); \ No newline at end of file +}).timeout(60000); diff --git a/processor/tests/negative.spec.ts b/processor/tests/negative.spec.ts index 6f14eefa039a..38a87b560b46 100644 --- a/processor/tests/negative.spec.ts +++ b/processor/tests/negative.spec.ts @@ -1,21 +1,20 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -import "mocha"; -import * as chai from "chai"; -import * as chaiAsPromised from "chai-as-promised"; +import chai from "chai"; +import chaiAsPromised from "chai-as-promised"; chai.use(chaiAsPromised); -import * as debugModule from "debug"; +import debugModule from "debug"; const should = chai.should(); const debug = debugModule("azure:eph:negative-spec"); -import * as dotenv from "dotenv"; +import dotenv from "dotenv"; import { EventPosition, OnReceivedError, PartitionContext, EventData, OnReceivedMessage, EventProcessorHost } from "../lib"; dotenv.config(); -describe("negative", function () { - before("validate environment", function () { +describe("negative", function (): void { + before("validate environment", function (): void { should.exist(process.env.STORAGE_CONNECTION_STRING, "define STORAGE_CONNECTION_STRING in your environment before running integration tests."); should.exist(process.env.EVENTHUB_CONNECTION_STRING, @@ -28,7 +27,7 @@ describe("negative", function () { const hubName = process.env.EVENTHUB_NAME; const hostName = EventProcessorHost.createHostName(); let host: EventProcessorHost; - it("should fail when trying to start an EPH that is already started.", function (done) { + it("should fail when trying to start an EPH that is already started.", function (done: Mocha.Done): void { const test = async () => { host = EventProcessorHost.createFromConnectionString( hostName, @@ -62,7 +61,7 @@ describe("negative", function () { test().then(() => { done(); }).catch((err) => { done(err); }); }); - it("should fail when the eventhub name is incorrect.", function (done) { + it("should fail when the eventhub name is incorrect.", function (done: Mocha.Done): void { host = EventProcessorHost.createFromConnectionString( hostName, storageConnString!, @@ -89,7 +88,7 @@ describe("negative", function () { }); }); - it("should fail when the eventhub namesapce is incorrect.", function (done) { + it("should fail when the eventhub namesapce is incorrect.", function (done: Mocha.Done): void { host = EventProcessorHost.createFromConnectionString( hostName, storageConnString!, @@ -116,7 +115,7 @@ describe("negative", function () { }); }); - it("should fail when the storage connection string is incorrect.", function (done) { + it("should fail when the storage connection string is incorrect.", function (done: Mocha.Done): void { try { host = EventProcessorHost.createFromConnectionString( hostName, diff --git a/processor/tests/retry.spec.ts b/processor/tests/retry.spec.ts index c89d8d305e99..00763f50eb90 100644 --- a/processor/tests/retry.spec.ts +++ b/processor/tests/retry.spec.ts @@ -1,18 +1,17 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -import "mocha"; -import * as chai from "chai"; +import chai from "chai"; import { retry, RetryConfig } from "../lib/util/utils"; -import * as chaiAsPromised from "chai-as-promised"; +import chaiAsPromised from "chai-as-promised"; import { delay } from "@azure/event-hubs"; chai.use(chaiAsPromised); -import * as debugModule from "debug"; +import debugModule from "debug"; const should = chai.should(); const debug = debugModule("azure:eph:retry-spec"); -describe("retry function", function () { - it("should succeed if the operation succeeds.", function (done) { +describe("retry function", function (): void { + it("should succeed if the operation succeeds.", function (done: Mocha.Done): void { const test = async () => { let counter = 0; try { @@ -23,7 +22,7 @@ describe("retry function", function () { return { code: 200, description: "OK" - } + }; }, hostName: "eph-1", action: "Succeed", @@ -43,7 +42,7 @@ describe("retry function", function () { test().then(() => { done(); }).catch((err) => { done(err); }); }); - it("should succeed if the operation initially fails and then succeeds.", function (done) { + it("should succeed if the operation initially fails and then succeeds.", function (done: Mocha.Done): void { const test = async () => { let counter = 0; try { @@ -51,7 +50,7 @@ describe("retry function", function () { operation: async () => { await delay(200); debug("counter: %d", ++counter); - if (counter == 1) { + if (counter === 1) { throw new Error("The server is busy right now. Retry later."); } else { return ["0", "1"]; @@ -75,7 +74,7 @@ describe("retry function", function () { test().then(() => { done(); }).catch((err) => { done(err); }); }); - it("should succeed in the last attempt.", function (done) { + it("should succeed in the last attempt.", function (done: Mocha.Done): void { const test = async () => { let counter = 0; try { @@ -83,10 +82,10 @@ describe("retry function", function () { operation: async () => { await delay(200); debug("counter: %d", ++counter); - if (counter == 1) { + if (counter === 1) { const e = new Error("Error in attempt 1."); throw e; - } else if (counter == 2) { + } else if (counter === 2) { const e = new Error("Error in attempt 2."); throw e; } else { @@ -114,7 +113,7 @@ describe("retry function", function () { test().then(() => { done(); }).catch((err) => { done(err); }); }); - it("should fail if all attempts return an error", function (done) { + it("should fail if all attempts return an error", function (done: Mocha.Done): void { const test = async () => { let counter = 0; try { @@ -145,4 +144,4 @@ describe("retry function", function () { }; test().then(() => { done(); }).catch((err) => { done(err); }); }); -}); \ No newline at end of file +}); diff --git a/processor/tsconfig.json b/processor/tsconfig.json index e2d35469163b..d27a1f2e5b41 100644 --- a/processor/tsconfig.json +++ b/processor/tsconfig.json @@ -1,29 +1,45 @@ { "compilerOptions": { - "module": "commonjs", - "preserveConstEnums": true, - "sourceMap": true, - "newLine": "LF", - "target": "es2015", - "moduleResolution": "node", - "noImplicitReturns": true, - "importHelpers": true, - "outDir": "dist", - "allowJs": false, - "noUnusedLocals":true, - "strict": true, - "declaration": true, - "declarationDir": "./typings" + /* Basic Options */ + "target": "es6" /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017','ES2018' or 'ESNEXT'. */, + "module": "es6" /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', or 'ESNext'. */, + + "declaration": true /* Generates corresponding '.d.ts' file. */, + "declarationMap": true /* Generates a sourcemap for each corresponding '.d.ts' file. */, + "sourceMap": true /* Generates corresponding '.map' file. */, + + "outDir": "./dist-esm" /* Redirect output structure to the directory. */, + "declarationDir": "./typings", /* Output directory for generated declaration files.*/ + + "importHelpers": true /* Import emit helpers from 'tslib'. */, + + /* Strict Type-Checking Options */ + "strict": true /* Enable all strict type-checking options. */, + "noImplicitReturns": true, /* Report error when not all code paths in function return a value. */ + + /* Additional Checks */ + "noUnusedLocals": true, /* Report errors on unused locals. */ + + /* Module Resolution Options */ + "moduleResolution": "node" /* Specify module resolution strategy: 'node' (Node.js) or 'classic' (TypeScript pre-1.6). */, + "allowSyntheticDefaultImports": true /* Allow default imports from modules with no default export. This does not affect code emit, just typechecking. */, + "esModuleInterop": true /* Enables emit interoperability between CommonJS and ES Modules via creation of namespace objects for all imports. Implies 'allowSyntheticDefaultImports'. */, + + /* Experimental Options */ + "forceConsistentCasingInFileNames": true, + + /* Other options */ + "newLine": "LF", /* Use the specified end of line sequence to be used when emitting files: "crlf" (windows) or "lf" (unix).”*/ + "allowJs": false, /* Don't allow JavaScript files to be compiled.*/ }, "compileOnSave": true, "exclude": [ "node_modules", - "testhub", "typings/**", - "client" + "./examples/**/*.ts" ], "include": [ "./lib/**/*.ts", - "./examples/**/*.ts", + "./tests/**/*.ts" ] -} \ No newline at end of file +} diff --git a/processor/tslint.json b/processor/tslint.json index da9b957a286e..b4ee11d10879 100644 --- a/processor/tslint.json +++ b/processor/tslint.json @@ -36,36 +36,22 @@ "no-empty": true, "no-invalid-this": true, "no-null-keyword": true, - "no-string-literal": true, "no-switch-case-fall-through": true, "no-unsafe-finally": true, "no-unused-expression": true, - "no-unused-variable": false, "no-use-before-declare": true, "no-var-keyword": true, "no-floating-promises": true, - "triple-equals": [ - true, - "allow-null-check", - "allow-undefined-check" - ], + "no-return-await": true, + "triple-equals": [true, "allow-null-check", "allow-undefined-check"], "use-isnan": true, "eofline": true, - "indent": [ - true, - "spaces" - ], + "indent": [true, "spaces"], "no-trailing-whitespace": true, "arrow-parens": true, "class-name": true, - "comment-format": [ - true, - "check-space" - ], - "interface-name": [ - true, - "never-prefix" - ], + "comment-format": [true, "check-space"], + "interface-name": [true, "never-prefix"], "jsdoc-format": true, "new-parens": true, "one-line": [ @@ -75,18 +61,9 @@ "check-else", "check-open-brace" ], - "one-variable-per-declaration": [ - true, - "ignore-for-loop" - ], - "semicolon": [ - true, - "always" - ], - "curly": [ - true, - "ignore-same-line" - ], + "one-variable-per-declaration": [true, "ignore-for-loop"], + "semicolon": [true, "always"], + "curly": [true, "ignore-same-line"], "variable-name": [ true, "check-format", @@ -103,4 +80,4 @@ "check-type" ] } -} \ No newline at end of file +}