From 3190c805c727059f95305a435b40beea1ef15a18 Mon Sep 17 00:00:00 2001 From: Hector Hernandez <39923391+hectorhdzg@users.noreply.github.com> Date: Tue, 7 Dec 2021 09:30:34 -0800 Subject: [PATCH] JSON configuration support (#875) * Allow auto tracking for not default telemetry clients * Fixing tests * Update * Adding default config file * Removing auto tracking changes * Removing updates in readme, will update when release is ready * Typo --- .vscode/settings.json | 8 +- AutoCollection/HeartBeat.ts | 4 +- AutoCollection/NativePerformance.ts | 16 +- .../diagnostic-channel/initialization.ts | 4 +- Bootstrap/Default.ts | 2 +- .../Interfaces.ts | 113 +- Library/Config.ts | 236 +- Library/JsonConfig.ts | 206 +- Library/Util.ts | 2 +- README.md | 103 - Tests/AutoCollection/Heartbeat.tests.ts | 49 +- .../AutoCollection/NativePerformance.tests.ts | 8 +- Tests/Config/jsonConfig.tests.ts | 88 - Tests/EndToEnd.tests.ts | 16 +- Tests/Library/Config.tests.ts | 94 +- Tests/{Config => Library}/config.json | 24 +- Tests/Library/jsonConfig.tests.ts | 158 + ...gregatedMetricsTelemetryProcessor.tests.ts | 16 +- Tests/applicationInsights.tests.ts | 55 +- applicationinsights.json | 4 + applicationinsights.ts | 73 +- package-lock.json | 2693 +---------------- 22 files changed, 671 insertions(+), 3301 deletions(-) rename Library/IJsonConfig.ts => Declarations/Interfaces.ts (80%) delete mode 100644 Tests/Config/jsonConfig.tests.ts rename Tests/{Config => Library}/config.json (60%) create mode 100644 Tests/Library/jsonConfig.tests.ts create mode 100644 applicationinsights.json diff --git a/.vscode/settings.json b/.vscode/settings.json index 56a6e7b7..c16ab804 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -6,5 +6,11 @@ "**/*.d.ts": true, "out/": true }, - "typescript.tsdk": "./node_modules/typescript/lib" + "typescript.tsdk": "./node_modules/typescript/lib", + "markdownlint.config": { + "MD028": false, + "MD025": { + "front_matter_title": "" + } + } } \ No newline at end of file diff --git a/AutoCollection/HeartBeat.ts b/AutoCollection/HeartBeat.ts index 8cddd4ea..f02c17ec 100644 --- a/AutoCollection/HeartBeat.ts +++ b/AutoCollection/HeartBeat.ts @@ -24,7 +24,7 @@ class HeartBeat { this._client = client; } - public enable(isEnabled: boolean, config?: Config) { + public enable(isEnabled: boolean) { this._isEnabled = isEnabled; if (this._isEnabled && !this._isInitialized) { this._isInitialized = true; @@ -32,7 +32,7 @@ class HeartBeat { if (isEnabled) { if (!this._handle) { - this._handle = setInterval(() => this.trackHeartBeat(config, () => { }), this._collectionInterval); + this._handle = setInterval(() => this.trackHeartBeat(this._client.config, () => { }), this._collectionInterval); this._handle.unref(); // Allow the app to terminate even while this loop is going on } } else { diff --git a/AutoCollection/NativePerformance.ts b/AutoCollection/NativePerformance.ts index 4e7dfdb9..1e9bd4c1 100644 --- a/AutoCollection/NativePerformance.ts +++ b/AutoCollection/NativePerformance.ts @@ -1,9 +1,8 @@ -import TelemetryClient= require("../Library/TelemetryClient"); +import TelemetryClient = require("../Library/TelemetryClient"); import Constants = require("../Declarations/Constants"); -import Config = require("../Library/Config"); import Context = require("../Library/Context"); -import Logging= require("../Library/Logging"); -import { IJsonConfig } from "../Library/IJsonConfig"; +import Logging = require("../Library/Logging"); +import { IBaseConfig } from "../Declarations/Interfaces"; /** * Interface which defines which specific extended metrics should be disabled @@ -111,10 +110,11 @@ export class AutoCollectNativePerformance { * @private * @static * @param {(boolean | IDisabledExtendedMetrics)} collectExtendedMetrics + * @param {(IBaseConfig)} customConfig * @returns {(boolean | IDisabledExtendedMetrics)} * @memberof AutoCollectNativePerformance */ - public static parseEnabled(collectExtendedMetrics: boolean | IDisabledExtendedMetrics, customConfig: IJsonConfig ): { isEnabled: boolean, disabledMetrics: IDisabledExtendedMetrics } { + public static parseEnabled(collectExtendedMetrics: boolean | IDisabledExtendedMetrics, customConfig: IBaseConfig): { isEnabled: boolean, disabledMetrics: IDisabledExtendedMetrics } { const disableAll = customConfig.disableAllExtendedMetrics; const individualOptOuts = customConfig.extendedMetricDisablers; @@ -135,11 +135,11 @@ export class AutoCollectNativePerformance { // case 2a: collectExtendedMetrics is an object, overwrite existing ones if they exist if (typeof collectExtendedMetrics === "object") { - return {isEnabled: true, disabledMetrics: {...collectExtendedMetrics, ...disabledMetrics}}; + return { isEnabled: true, disabledMetrics: { ...collectExtendedMetrics, ...disabledMetrics } }; } // case 2b: collectExtendedMetrics is a boolean, set disabledMetrics as is - return {isEnabled: collectExtendedMetrics, disabledMetrics}; + return { isEnabled: collectExtendedMetrics, disabledMetrics }; } // case 4: no env vars set, input arg is a boolean, RETURN with isEnabled=collectExtendedMetrics, disabledMetrics={} @@ -147,7 +147,7 @@ export class AutoCollectNativePerformance { return { isEnabled: collectExtendedMetrics, disabledMetrics: {} }; } else { // use else so we don't need to force typing on collectExtendedMetrics // case 5: no env vars set, input arg is object, RETURN with isEnabled=true, disabledMetrics=collectExtendedMetrics - return { isEnabled: true, disabledMetrics: collectExtendedMetrics}; + return { isEnabled: true, disabledMetrics: collectExtendedMetrics }; } } diff --git a/AutoCollection/diagnostic-channel/initialization.ts b/AutoCollection/diagnostic-channel/initialization.ts index 39185431..79a3c4b2 100755 --- a/AutoCollection/diagnostic-channel/initialization.ts +++ b/AutoCollection/diagnostic-channel/initialization.ts @@ -9,12 +9,12 @@ import { AsyncScopeManager } from "../AsyncHooksScopeManager"; import Logging = require("../../Library/Logging"); import { JsonConfig } from "../../Library/JsonConfig"; -export const IsInitialized = !JsonConfig.getJsonConfig().noDiagnosticChannel; +export const IsInitialized = !JsonConfig.getInstance().noDiagnosticChannel; const TAG = "DiagnosticChannel"; if (IsInitialized) { const publishers: typeof DiagChannelPublishers = require("diagnostic-channel-publishers"); - const individualOptOuts: string = JsonConfig.getJsonConfig().noPatchModules; + const individualOptOuts: string = JsonConfig.getInstance().noPatchModules; const unpatchedModules = individualOptOuts.split(","); const modules: {[key: string] : any} = { bunyan: publishers.bunyan, diff --git a/Bootstrap/Default.ts b/Bootstrap/Default.ts index 21c38be3..8576c83b 100644 --- a/Bootstrap/Default.ts +++ b/Bootstrap/Default.ts @@ -14,7 +14,7 @@ let _logger: DiagnosticLogger = new DiagnosticLogger(console); let _statusLogger: StatusLogger = new StatusLogger(console); // Env var local constants -const _setupString = JsonConfig.getJsonConfig().connectionString || process.env.APPINSIGHTS_INSTRUMENTATIONKEY; +const _setupString = JsonConfig.getInstance().connectionString || process.env.APPINSIGHTS_INSTRUMENTATIONKEY; const forceStart = process.env.APPLICATIONINSIGHTS_FORCE_START === "true"; // Other local constants diff --git a/Library/IJsonConfig.ts b/Declarations/Interfaces.ts similarity index 80% rename from Library/IJsonConfig.ts rename to Declarations/Interfaces.ts index 286d2500..20fe809b 100644 --- a/Library/IJsonConfig.ts +++ b/Declarations/Interfaces.ts @@ -1,15 +1,13 @@ -/** - * Configuration settings - * @export - * @interface IJsonConfig - */ - -import { DistributedTracingModes } from "../applicationinsights"; -import { IDisabledExtendedMetrics } from "../AutoCollection/NativePerformance"; import http = require('http'); import https = require('https'); -export interface IJsonConfig { - connectionString?: string; +import azureCore = require("@azure/core-http"); +import { DistributedTracingModes } from "../applicationinsights"; +import { IDisabledExtendedMetrics } from "../AutoCollection/NativePerformance"; + + +export interface IBaseConfig { + /** Connection String used to send telemetry payloads to */ + connectionString: string; /** The ingestion endpoint to send telemetry payloads to */ endpointUrl: string; /** The maximum number of telemetry items to include in a payload to the ingestion endpoint (Default 250) */ @@ -28,12 +26,8 @@ export interface IJsonConfig { proxyHttpUrl: string; /** A proxy server for SDK HTTPS traffic (Optional, Default pulled from `https_proxy` environment variable) */ proxyHttpsUrl: string; - /** An http.Agent to use for SDK HTTP traffic (Optional, Default undefined) */ - httpAgent: http.Agent; - /** An https.Agent to use for SDK HTTPS traffic (Optional, Default undefined) */ - httpsAgent: https.Agent; /** Disable including legacy headers in outgoing requests, x-ms-request-id */ - ignoreLegacyHeaders?: boolean; + ignoreLegacyHeaders: boolean; /** * Sets the distributed tracing modes. If W3C mode is enabled, W3C trace context * headers (traceparent/tracestate) will be parsed in all incoming requests, and included in outgoing @@ -41,74 +35,62 @@ export interface IJsonConfig { * Enabling W3C mode will not break existing correlation with other Application Insights instrumented * services. Default=AI */ - distributedTracingMode?: DistributedTracingModes; - + distributedTracingMode: DistributedTracingModes; /** * Sets the state of console * if true logger activity will be sent to Application Insights */ - enableAutoCollectExternalLoggers?: boolean; - + enableAutoCollectExternalLoggers: boolean; /** * Sets the state of logger tracking (enabled by default for third-party loggers only) * if true, logger autocollection will include console.log calls (default false) */ - enableAutoCollectConsole?: boolean; - + enableAutoCollectConsole: boolean; /** * Sets the state of exception tracking (enabled by default) * if true uncaught exceptions will be sent to Application Insights */ - enableAutoCollectExceptions?: boolean; - + enableAutoCollectExceptions: boolean; /** * Sets the state of performance tracking (enabled by default) * if true performance counters will be collected every second and sent to Application Insights */ - enableAutoCollectPerformance?: boolean; - + enableAutoCollectPerformance: boolean; /** * Sets the state of performance tracking (enabled by default) * if true, extended metrics counters will be collected every minute and sent to Application Insights */ - enableAutoCollectExtendedMetrics?: boolean | IDisabledExtendedMetrics; - + enableAutoCollectExtendedMetrics: boolean | IDisabledExtendedMetrics; /** * Sets the state of pre aggregated metrics tracking (enabled by default) * if true pre aggregated metrics will be collected every minute and sent to Application Insights */ - enableAutoCollectPreAggregatedMetrics?: boolean; - + enableAutoCollectPreAggregatedMetrics: boolean; /** * Sets the state of request tracking (enabled by default) - * if true HeartBeat metric data will be collected every 15 mintues and sent to Application Insights + * if true HeartBeat metric data will be collected every 15 minutes and sent to Application Insights */ - enableAutoCollectHeartbeat?: boolean; - + enableAutoCollectHeartbeat: boolean; /** * Sets the state of request tracking (enabled by default) * if true requests will be sent to Application Insights */ - enableAutoCollectRequests?: boolean; - + enableAutoCollectRequests: boolean; /** * Sets the state of dependency tracking (enabled by default) * if true dependencies will be sent to Application Insights */ - enableAutoCollectDependencies?: boolean; - + enableAutoCollectDependencies: boolean; /** * Sets the state of automatic dependency correlation (enabled by default) * if true dependencies will be correlated with requests */ - enableAutoDependencyCorrelation?: boolean; - + enableAutoDependencyCorrelation: boolean; /** * Sets the state of automatic dependency correlation (enabled by default) * if true, forces use of experimental async_hooks module to provide correlation. If false, instead uses only patching-based techniques. If left blank, the best option is chosen for you based on your version of Node.js. */ - enableUseAsyncHooks?: boolean; - + enableUseAsyncHooks: boolean; /** * Enable or disable disk-backed retry caching to cache events when client is offline (enabled by default) * Note that this method only applies to the default client. Disk-backed retry caching is disabled by default for additional clients. @@ -118,43 +100,43 @@ export interface IJsonConfig { * enableResendInterval The wait interval for resending cached events. * enableMaxBytesOnDisk The maximum size (in bytes) that the created temporary directory for cache events can grow to, before caching is disabled. */ - enableUseDiskRetryCaching?: boolean; - enableResendInterval?: number; - enableMaxBytesOnDisk?: number; - + enableUseDiskRetryCaching: boolean; + enableResendInterval: number; + enableMaxBytesOnDisk: number; /** * Enables debug and warning logging for AppInsights itself. * if true, enables debug logging */ - enableInternalDebugLogging?: boolean; - + enableInternalDebugLogging: boolean; /** * Enables debug and warning logging for AppInsights itself. * if true, enables warning logging */ - enableInternalWarningLogging?: boolean; - + enableInternalWarningLogging: boolean; /** * Enables communication with Application Insights Live Metrics. * if true, enables communication with the live metrics service */ - enableSendLiveMetrics?: boolean; - + enableSendLiveMetrics: boolean; /** * Disable all environment variables set */ - disableAllExtendedMetrics?: boolean; - + disableAllExtendedMetrics: boolean; /** * Disable individual environment variables set. eg. "extendedMetricDisablers": "..." */ - extendedMetricDisablers?: string; - + extendedMetricDisablers: string; /** * Disable Statsbeat */ - disableStatsbeat?: boolean; + disableStatsbeat: boolean; + /** + * Live Metrics custom host + */ + quickPulseHost: string; +} +export interface IEnvironmentConfig { /** * In order to track context across asynchronous calls, * some changes are required in third party libraries such as mongodb and redis. @@ -162,18 +144,27 @@ export interface IJsonConfig { * This property is to disable the feature. * Note that by setting this flag, events may no longer be correctly associated with the right operation. */ - noDiagnosticChannel?: boolean; - + noDiagnosticChannel: boolean; /** * Disable individual monkey-patches. * Set `noPatchModules` to a comma separated list of packages to disable. * e.g. `"noPatchModules": "console,redis"` to avoid patching the console and redis packages. * The following modules are available: `azuresdk, bunyan, console, mongodb, mongodb-core, mysql, redis, winston, pg`, and `pg-pool`. */ - noPatchModules?: string; - + noPatchModules: string; /** * HTTPS without a passed in agent */ - noHttpAgentKeepAlive?: boolean; -} \ No newline at end of file + noHttpAgentKeepAlive: boolean; +} + +export interface IJsonConfig extends IBaseConfig, IEnvironmentConfig { }; + +export interface IConfig extends IBaseConfig { + /** An http.Agent to use for SDK HTTP traffic (Optional, Default undefined) */ + httpAgent: http.Agent; + /** An https.Agent to use for SDK HTTPS traffic (Optional, Default undefined) */ + httpsAgent: https.Agent; + /** AAD TokenCredential to use to authenticate the app */ + aadTokenCredential?: azureCore.TokenCredential; +} diff --git a/Library/Config.ts b/Library/Config.ts index 8b85dc6e..36cce2f4 100644 --- a/Library/Config.ts +++ b/Library/Config.ts @@ -8,78 +8,67 @@ import http = require('http'); import https = require('https'); import url = require('url'); import { JsonConfig } from "./JsonConfig"; -import { IJsonConfig } from "./IJsonConfig"; -import { DistributedTracingModes, setRetry, setLiveMetricsFlag } from "../applicationinsights"; -import { AutoCollectNativePerformance, IDisabledExtendedMetrics } from "../AutoCollection/NativePerformance"; +import { IConfig } from "../Declarations/Interfaces"; +import { DistributedTracingModes } from "../applicationinsights"; +import { IDisabledExtendedMetrics } from "../AutoCollection/NativePerformance"; -class Config { - // Azure adds this prefix to all environment variables - public static ENV_azurePrefix = "APPSETTING_"; +class Config implements IConfig { - // This key is provided in the readme - public static ENV_iKey = "APPINSIGHTS_INSTRUMENTATIONKEY"; + public static ENV_azurePrefix = "APPSETTING_"; // Azure adds this prefix to all environment variables + public static ENV_iKey = "APPINSIGHTS_INSTRUMENTATIONKEY"; // This key is provided in the readme public static legacy_ENV_iKey = "APPINSIGHTS_INSTRUMENTATION_KEY"; public static ENV_profileQueryEndpoint = "APPINSIGHTS_PROFILE_QUERY_ENDPOINT"; public static ENV_quickPulseHost = "APPINSIGHTS_QUICKPULSE_HOST"; - /** An identifier for your Application Insights resource */ - public instrumentationKey: string; - /** The id for cross-component correlation. READ ONLY. */ - public correlationId: string; - /** The ingestion endpoint to send telemetry payloads to */ + // IConfig properties + public connectionString: string; public endpointUrl: string; - /** The maximum number of telemetry items to include in a payload to the ingestion endpoint (Default 250) */ public maxBatchSize: number; - /** The maximum amount of time to wait for a payload to reach maxBatchSize (Default 15000) */ public maxBatchIntervalMs: number; - /** A flag indicating if telemetry transmission is disabled (Default false) */ public disableAppInsights: boolean; - /** The percentage of telemetry items tracked that should be transmitted (Default 100) */ public samplingPercentage: number; - /** The time to wait before retrying to retrieve the id for cross-component correlation (Default 30000) */ public correlationIdRetryIntervalMs: number; - /** A list of domains to exclude from cross-component header injection */ public correlationHeaderExcludedDomains: string[]; - /** A proxy server for SDK HTTP traffic (Optional, Default pulled from `http_proxy` environment variable) */ public proxyHttpUrl: string; - /** A proxy server for SDK HTTPS traffic (Optional, Default pulled from `https_proxy` environment variable) */ public proxyHttpsUrl: string; - /** An http.Agent to use for SDK HTTP traffic (Optional, Default undefined) */ public httpAgent: http.Agent; - /** An https.Agent to use for SDK HTTPS traffic (Optional, Default undefined) */ public httpsAgent: https.Agent; - /** Disable including legacy headers in outgoing requests, x-ms-request-id */ - public ignoreLegacyHeaders?: boolean; - /** AAD TokenCredential to use to authenticate the app */ + public ignoreLegacyHeaders: boolean; public aadTokenCredential?: azureCore.TokenCredential; - - private endpointBase: string = Constants.DEFAULT_BREEZE_ENDPOINT; - private setCorrelationId: (v: string) => void; - private _profileQueryEndpoint: string; - /** Host name for quickpulse service */ - private _quickPulseHost: string; - - /** private config object that is populated from config json file */ - private _jsonConfig: IJsonConfig = JsonConfig.getJsonConfig(); - - public enableAutoCollectConsole: boolean; // enable auto collect console + public enableAutoCollectConsole: boolean; public enableAutoCollectExceptions: boolean; public enableAutoCollectPerformance: boolean; - public enableNativePerformance: boolean; - public enableAutoCollectExternalLoggers: boolean; // enable auto collect bunyan & winston - public disabledExtendedMetrics: IDisabledExtendedMetrics; + public enableAutoCollectExternalLoggers: boolean; public enableAutoCollectPreAggregatedMetrics: boolean; public enableAutoCollectHeartbeat: boolean; public enableAutoCollectRequests: boolean; public enableAutoCollectDependencies: boolean; public enableAutoDependencyCorrelation: boolean; + public enableSendLiveMetrics: boolean; + public enableUseDiskRetryCaching: boolean; public enableUseAsyncHooks: boolean; + public distributedTracingMode: DistributedTracingModes; + public enableAutoCollectExtendedMetrics: boolean | IDisabledExtendedMetrics; + public enableResendInterval: number; + public enableMaxBytesOnDisk: number; + public enableInternalDebugLogging: boolean; + public enableInternalWarningLogging: boolean; + public disableAllExtendedMetrics: boolean; public disableStatsbeat: boolean; + public extendedMetricDisablers: string; + public quickPulseHost: string; + + public correlationId: string; // TODO: Should be private + private _endpointBase: string = Constants.DEFAULT_BREEZE_ENDPOINT; + private _setCorrelationId: (v: string) => void; + private _profileQueryEndpoint: string; + private _instrumentationKey: string; - constructor(setupString?: string) { - this._generateConfigurationObjectFromEnvVars(); - const connectionStringEnv: string | undefined = this._jsonConfig.connectionString; + constructor(setupString?: string) { + // Load config values from env variables and JSON if available + this._mergeConfig(); + const connectionStringEnv: string | undefined = this.connectionString; const csCode = ConnectionStringParser.parse(setupString); const csEnv = ConnectionStringParser.parse(connectionStringEnv); const iKeyCode = !csCode.instrumentationkey && Object.keys(csCode).length > 0 @@ -87,118 +76,91 @@ class Config { : setupString; // CS was invalid, so it must be an ikey this.instrumentationKey = csCode.instrumentationkey || iKeyCode /* === instrumentationKey */ || csEnv.instrumentationkey || Config._getInstrumentationKey(); - // validate ikey. If fails throw a warning - if (!Config._validateInstrumentationKey(this.instrumentationKey)) { - Logging.warn("An invalid instrumentation key was provided. There may be resulting telemetry loss", this.instrumentationKey); - } - - this.endpointUrl = `${this._jsonConfig.endpointUrl || csCode.ingestionendpoint || csEnv.ingestionendpoint || this.endpointBase}/v2.1/track`; - this.maxBatchSize = this._jsonConfig.maxBatchSize || 250; - this.maxBatchIntervalMs = this._jsonConfig.maxBatchIntervalMs || 15000; - this.disableAppInsights = this._jsonConfig.disableAppInsights || false; - this.samplingPercentage = this._jsonConfig.samplingPercentage || 100; - this.correlationIdRetryIntervalMs = this._jsonConfig.correlationIdRetryIntervalMs || 30 * 1000; + this.endpointUrl = `${this.endpointUrl || csCode.ingestionendpoint || csEnv.ingestionendpoint || this._endpointBase}/v2.1/track`; + this.maxBatchSize = this.maxBatchSize || 250; + this.maxBatchIntervalMs = this.maxBatchIntervalMs || 15000; + this.disableAppInsights = this.disableAppInsights || false; + this.samplingPercentage = this.samplingPercentage || 100; + this.correlationIdRetryIntervalMs = this.correlationIdRetryIntervalMs || 30 * 1000; this.correlationHeaderExcludedDomains = - this._jsonConfig.correlationHeaderExcludedDomains || - [ - "*.core.windows.net", - "*.core.chinacloudapi.cn", - "*.core.cloudapi.de", - "*.core.usgovcloudapi.net", - "*.core.microsoft.scloud", - "*.core.eaglex.ic.gov" - ]; - - this.setCorrelationId = (correlationId) => this.correlationId = correlationId; - - this.proxyHttpUrl = this._jsonConfig.proxyHttpUrl; - this.proxyHttpsUrl = this._jsonConfig.proxyHttpsUrl; - this.httpAgent = this._jsonConfig.httpAgent; - this.httpsAgent = this._jsonConfig.httpsAgent; - this.ignoreLegacyHeaders = this._jsonConfig.ignoreLegacyHeaders || false; - this.profileQueryEndpoint = csCode.ingestionendpoint || csEnv.ingestionendpoint || process.env[Config.ENV_profileQueryEndpoint] || this.endpointBase; - this._quickPulseHost = csCode.liveendpoint || csEnv.liveendpoint || process.env[Config.ENV_quickPulseHost] || Constants.DEFAULT_LIVEMETRICS_HOST; + this.correlationHeaderExcludedDomains || + [ + "*.core.windows.net", + "*.core.chinacloudapi.cn", + "*.core.cloudapi.de", + "*.core.usgovcloudapi.net", + "*.core.microsoft.scloud", + "*.core.eaglex.ic.gov" + ]; + + this._setCorrelationId = (correlationId) => this.correlationId = correlationId; + this.ignoreLegacyHeaders = this.ignoreLegacyHeaders || false; + this.profileQueryEndpoint = csCode.ingestionendpoint || csEnv.ingestionendpoint || process.env[Config.ENV_profileQueryEndpoint] || this._endpointBase; + this.quickPulseHost = this.quickPulseHost || csCode.liveendpoint || csEnv.liveendpoint || process.env[Config.ENV_quickPulseHost] || Constants.DEFAULT_LIVEMETRICS_HOST; // Parse quickPulseHost if it starts with http(s):// - if (this._quickPulseHost.match(/^https?:\/\//)) { - this._quickPulseHost = new url.URL(this._quickPulseHost).host; - } - } - - private _generateConfigurationObjectFromEnvVars() { - if (this._jsonConfig.distributedTracingMode !== undefined) { - CorrelationIdManager.w3cEnabled = this._jsonConfig.distributedTracingMode === DistributedTracingModes.AI_AND_W3C; - } - if (this._jsonConfig.enableAutoCollectConsole !== undefined) { - this.enableAutoCollectConsole = this._jsonConfig.enableAutoCollectConsole; - } - if (this._jsonConfig.enableAutoCollectExternalLoggers !== undefined) { - this.enableAutoCollectExternalLoggers = this._jsonConfig.enableAutoCollectExternalLoggers; - } - if (this._jsonConfig.enableAutoCollectExceptions !== undefined) { - this.enableAutoCollectExceptions = this._jsonConfig.enableAutoCollectExceptions; - } - if (this._jsonConfig.enableAutoCollectPerformance !== undefined) { - this.enableAutoCollectPerformance = this._jsonConfig.enableAutoCollectPerformance; - } - if (this._jsonConfig.enableAutoCollectExtendedMetrics !== undefined) { - const extendedMetricsConfig = AutoCollectNativePerformance.parseEnabled(this._jsonConfig.enableAutoCollectExtendedMetrics, this._jsonConfig); - this.enableNativePerformance = extendedMetricsConfig.isEnabled; - this.disabledExtendedMetrics = extendedMetricsConfig.disabledMetrics; - } - if (this._jsonConfig.enableAutoCollectPreAggregatedMetrics !== undefined) { - this.enableAutoCollectPreAggregatedMetrics = this._jsonConfig.enableAutoCollectPreAggregatedMetrics; - } - if (this._jsonConfig.enableAutoCollectHeartbeat !== undefined) { - this.enableAutoCollectHeartbeat = this._jsonConfig.enableAutoCollectHeartbeat; - } - if (this._jsonConfig.enableAutoCollectRequests !== undefined) { - this.enableAutoCollectRequests = this._jsonConfig.enableAutoCollectRequests; - } - if (this._jsonConfig.enableAutoCollectDependencies !== undefined) { - this.enableAutoCollectDependencies = this._jsonConfig.enableAutoCollectDependencies; - } - if (this._jsonConfig.enableAutoDependencyCorrelation !== undefined) { - this.enableAutoDependencyCorrelation = this._jsonConfig.enableAutoDependencyCorrelation; - } - if (this._jsonConfig.enableUseAsyncHooks !== undefined) { - this.enableUseAsyncHooks = this._jsonConfig.enableUseAsyncHooks; - } - if (this._jsonConfig.enableUseDiskRetryCaching !== undefined) { - setRetry(this._jsonConfig.enableUseDiskRetryCaching, this._jsonConfig.enableResendInterval, this._jsonConfig.enableMaxBytesOnDisk); - } - if (this._jsonConfig.enableInternalDebugLogging !== undefined) { - Logging.enableDebug = this._jsonConfig.enableInternalDebugLogging; - } - if (this._jsonConfig.enableInternalWarningLogging !== undefined) { - Logging.disableWarnings = !this._jsonConfig.enableInternalWarningLogging; - } - if (this._jsonConfig.enableSendLiveMetrics !== undefined) { - setLiveMetricsFlag(this._jsonConfig.enableSendLiveMetrics); - } - if (this._jsonConfig.disableStatsbeat !== undefined) { - this.disableStatsbeat = this._jsonConfig.disableStatsbeat; + if (this.quickPulseHost.match(/^https?:\/\//)) { + this.quickPulseHost = new url.URL(this.quickPulseHost).host; } } public set profileQueryEndpoint(endpoint: string) { - CorrelationIdManager.cancelCorrelationIdQuery(this, this.setCorrelationId); + CorrelationIdManager.cancelCorrelationIdQuery(this, this._setCorrelationId); this._profileQueryEndpoint = endpoint; this.correlationId = CorrelationIdManager.correlationIdPrefix; // Reset the correlationId while we wait for the new query - CorrelationIdManager.queryCorrelationId(this, this.setCorrelationId); + CorrelationIdManager.queryCorrelationId(this, this._setCorrelationId); } public get profileQueryEndpoint() { return this._profileQueryEndpoint; } - public set quickPulseHost(host: string) { - this._quickPulseHost = host; + public set instrumentationKey(iKey: string) { + if (!Config._validateInstrumentationKey(iKey)) { + Logging.warn("An invalid instrumentation key was provided. There may be resulting telemetry loss", this.instrumentationKey); + } + this._instrumentationKey = iKey; } - public get quickPulseHost(): string { - return this._quickPulseHost; + public get instrumentationKey(): string { + return this._instrumentationKey; } + private _mergeConfig() { + let jsonConfig = JsonConfig.getInstance(); + this.connectionString = jsonConfig.connectionString; + this.correlationHeaderExcludedDomains = jsonConfig.correlationHeaderExcludedDomains; + this.correlationIdRetryIntervalMs = jsonConfig.correlationIdRetryIntervalMs; + this.disableAllExtendedMetrics = jsonConfig.disableAllExtendedMetrics; + this.disableAppInsights = jsonConfig.disableAppInsights; + this.disableStatsbeat = jsonConfig.disableStatsbeat; + this.distributedTracingMode = jsonConfig.distributedTracingMode; + this.enableAutoCollectConsole = jsonConfig.enableAutoCollectConsole; + this.enableAutoCollectDependencies = jsonConfig.enableAutoCollectDependencies; + this.enableAutoCollectExceptions = jsonConfig.enableAutoCollectExceptions; + this.enableAutoCollectExtendedMetrics = jsonConfig.enableAutoCollectExtendedMetrics; + this.enableAutoCollectExternalLoggers = jsonConfig.enableAutoCollectExternalLoggers; + this.enableAutoCollectHeartbeat = jsonConfig.enableAutoCollectHeartbeat; + this.enableAutoCollectPerformance = jsonConfig.enableAutoCollectPerformance; + this.enableAutoCollectPreAggregatedMetrics = jsonConfig.enableAutoCollectPreAggregatedMetrics; + this.enableAutoCollectRequests = jsonConfig.enableAutoCollectRequests; + this.enableAutoDependencyCorrelation = jsonConfig.enableAutoDependencyCorrelation; + this.enableInternalDebugLogging = jsonConfig.enableInternalDebugLogging; + this.enableInternalWarningLogging = jsonConfig.enableInternalWarningLogging; + this.enableResendInterval = jsonConfig.enableResendInterval; + this.enableMaxBytesOnDisk = jsonConfig.enableMaxBytesOnDisk; + this.enableSendLiveMetrics = jsonConfig.enableSendLiveMetrics; + this.enableUseAsyncHooks = jsonConfig.enableUseAsyncHooks; + this.enableUseDiskRetryCaching = jsonConfig.enableUseDiskRetryCaching; + this.endpointUrl = jsonConfig.endpointUrl; + this.extendedMetricDisablers = jsonConfig.extendedMetricDisablers; + this.ignoreLegacyHeaders = jsonConfig.ignoreLegacyHeaders; + this.maxBatchIntervalMs = jsonConfig.maxBatchIntervalMs; + this.maxBatchSize = jsonConfig.maxBatchSize; + this.proxyHttpUrl = jsonConfig.proxyHttpUrl; + this.proxyHttpsUrl = jsonConfig.proxyHttpsUrl; + this.quickPulseHost = jsonConfig.quickPulseHost; + this.samplingPercentage = jsonConfig.samplingPercentage; + } private static _getInstrumentationKey(): string { // check for both the documented env variable and the azure-prefixed variable diff --git a/Library/JsonConfig.ts b/Library/JsonConfig.ts index 0d365142..587cfad1 100644 --- a/Library/JsonConfig.ts +++ b/Library/JsonConfig.ts @@ -1,10 +1,12 @@ -import { IJsonConfig } from "./IJsonConfig"; -import Logging = require('./Logging'); - import fs = require("fs"); +import path = require("path"); -const APPLICATION_INSIGHTS_CONFIG_PATH = "APPLICATION_INSIGHTS_CONFIG_PATH"; +import Logging = require('./Logging'); +import { IConfig, IJsonConfig } from "../Declarations/Interfaces"; +import { DistributedTracingModes } from "../applicationinsights"; +import { IDisabledExtendedMetrics } from "../AutoCollection/NativePerformance"; +const ENV_CONFIGURATION_FILE = "APPLICATIONINSIGHTS_CONFIGURATION_FILE"; // Azure Connection String const ENV_connectionString = "APPLICATIONINSIGHTS_CONNECTION_STRING"; // Native Metrics Opt Outs @@ -17,74 +19,146 @@ const ENV_noStatsbeat = "APPLICATION_INSIGHTS_NO_STATSBEAT"; const ENV_noHttpAgentKeepAlive = "APPLICATION_INSIGHTS_NO_HTTP_AGENT_KEEP_ALIVE"; const ENV_noPatchModules = "APPLICATION_INSIGHTS_NO_PATCH_MODULES"; -export class JsonConfig { - private static _jsonConfig: IJsonConfig; +export class JsonConfig implements IJsonConfig { + private static _instance: JsonConfig; + + public connectionString: string; + public endpointUrl: string; + public maxBatchSize: number; + public maxBatchIntervalMs: number; + public disableAppInsights: boolean; + public samplingPercentage: number; + public correlationIdRetryIntervalMs: number; + public correlationHeaderExcludedDomains: string[]; + public proxyHttpUrl: string; + public proxyHttpsUrl: string; + public ignoreLegacyHeaders: boolean; + public distributedTracingMode: DistributedTracingModes; + public enableAutoCollectExternalLoggers: boolean; + public enableAutoCollectConsole: boolean; + public enableAutoCollectExceptions: boolean; + public enableAutoCollectPerformance: boolean; + public enableAutoCollectExtendedMetrics: boolean | IDisabledExtendedMetrics; + public enableAutoCollectPreAggregatedMetrics: boolean; + public enableAutoCollectHeartbeat: boolean; + public enableAutoCollectRequests: boolean; + public enableAutoCollectDependencies: boolean; + public enableAutoDependencyCorrelation: boolean; + public enableUseAsyncHooks: boolean; + public enableUseDiskRetryCaching: boolean; + public enableResendInterval: number; + public enableMaxBytesOnDisk: number; + public enableInternalDebugLogging: boolean; + public enableInternalWarningLogging: boolean; + public enableSendLiveMetrics: boolean; + public disableAllExtendedMetrics: boolean; + public extendedMetricDisablers: string; + public disableStatsbeat: boolean; + public noDiagnosticChannel: boolean; + public noPatchModules: string; + public noHttpAgentKeepAlive: boolean; + public quickPulseHost: string; - static getJsonConfig() { - if (!JsonConfig._jsonConfig) { - JsonConfig._jsonConfig = this.generateConfigurationObject(); + + static getInstance() { + if (!JsonConfig._instance) { + JsonConfig._instance = new JsonConfig(); } - return JsonConfig._jsonConfig; + return JsonConfig._instance; + } + + constructor() { + // Load env variables first + this.connectionString = process.env[ENV_connectionString]; + this.disableAllExtendedMetrics = !!process.env[ENV_nativeMetricsDisableAll]; + this.extendedMetricDisablers = process.env[ENV_nativeMetricsDisablers]; + this.proxyHttpUrl = process.env[ENV_http_proxy]; + this.proxyHttpsUrl = process.env[ENV_https_proxy]; + this.noDiagnosticChannel = !!process.env[ENV_noDiagnosticChannel]; + this.disableStatsbeat = !!process.env[ENV_noStatsbeat]; + this.noHttpAgentKeepAlive = !!process.env[ENV_noHttpAgentKeepAlive]; + this.noPatchModules = process.env[ENV_noPatchModules] || ""; + this._loadJsonFile(); } - static generateConfigurationObject(): IJsonConfig { - if (this._jsonConfig) { - return this._jsonConfig; + private _loadJsonFile() { + let configFileName = "applicationinsights.json"; + let rootPath = path.join(__dirname, "../../"); // Root of applicationinsights folder (__dirname = ../out/Library) + let tempDir = path.join(rootPath, configFileName); // default + let configFile = process.env[ENV_CONFIGURATION_FILE]; + if (configFile) { + if (path.isAbsolute(configFile)) { + tempDir = configFile; + } + else { + tempDir = path.join(rootPath, configFile);// Relative path to applicationinsights folder + } } - this._jsonConfig = {} as IJsonConfig; - this._jsonConfig.connectionString = process.env[ENV_connectionString]; - this._jsonConfig.disableAllExtendedMetrics = !!process.env[ENV_nativeMetricsDisableAll]; - this._jsonConfig.extendedMetricDisablers = process.env[ENV_nativeMetricsDisablers]; - this._jsonConfig.proxyHttpUrl = process.env[ENV_http_proxy]; - this._jsonConfig.proxyHttpsUrl = process.env[ENV_https_proxy]; - this._jsonConfig.noDiagnosticChannel = !!process.env[ENV_noDiagnosticChannel]; - this._jsonConfig.disableStatsbeat = !!process.env[ENV_noStatsbeat]; - this._jsonConfig.noHttpAgentKeepAlive = !!process.env[ENV_noHttpAgentKeepAlive]; - this._jsonConfig.noPatchModules = process.env[ENV_noPatchModules] || ""; try { - const customConfigObj = JSON.parse(fs.readFileSync(process.env[APPLICATION_INSIGHTS_CONFIG_PATH] || "", "utf8")); - this._jsonConfig.endpointUrl = customConfigObj.endpointUrl; - this._jsonConfig.connectionString = customConfigObj.connectionString || this._jsonConfig.connectionString; - this._jsonConfig.maxBatchSize = customConfigObj.maxBatchSize; - this._jsonConfig.maxBatchIntervalMs = customConfigObj.maxBatchIntervalMs; - this._jsonConfig.disableAppInsights = customConfigObj.disableAppInsights; - this._jsonConfig.samplingPercentage = customConfigObj.samplingPercentage; - this._jsonConfig.correlationIdRetryIntervalMs = customConfigObj.correlationIdRetryIntervalMs; - this._jsonConfig.correlationHeaderExcludedDomains = customConfigObj.correlationHeaderExcludedDomains; - this._jsonConfig.proxyHttpUrl = customConfigObj.proxyHttpUrl || this._jsonConfig.proxyHttpUrl; - this._jsonConfig.proxyHttpsUrl = customConfigObj.proxyHttpsUrl || this._jsonConfig.proxyHttpsUrl; - this._jsonConfig.httpAgent = customConfigObj.httpAgent; - this._jsonConfig.httpsAgent = customConfigObj.httpsAgent; - this._jsonConfig.ignoreLegacyHeaders = customConfigObj.ignoreLegacyHeaders; - this._jsonConfig.disableAllExtendedMetrics = customConfigObj.disableAllExtendedMetrics != undefined ? customConfigObj.disableAllExtendedMetrics : this._jsonConfig.disableAllExtendedMetrics; - this._jsonConfig.extendedMetricDisablers = customConfigObj.extendedMetricDisablers || this._jsonConfig.extendedMetricDisablers; - this._jsonConfig.distributedTracingMode = customConfigObj.distributedTracingMode; - this._jsonConfig.enableAutoCollectExternalLoggers = customConfigObj.enableAutoCollectExternalLoggers; - this._jsonConfig.enableAutoCollectConsole = customConfigObj.enableAutoCollectConsole; - this._jsonConfig.enableAutoCollectExceptions = customConfigObj.enableAutoCollectExceptions; - this._jsonConfig.enableAutoCollectPerformance = customConfigObj.enableAutoCollectPerformance; - this._jsonConfig.enableAutoCollectExtendedMetrics = customConfigObj.enableAutoCollectExtendedMetrics; - this._jsonConfig.enableAutoCollectPreAggregatedMetrics = customConfigObj.enableAutoCollectPreAggregatedMetrics; - this._jsonConfig.enableAutoCollectHeartbeat = customConfigObj.enableAutoCollectHeartbeat; - this._jsonConfig.enableAutoCollectRequests = customConfigObj.enableAutoCollectRequests; - this._jsonConfig.enableAutoCollectDependencies = customConfigObj.enableAutoCollectDependencies; - this._jsonConfig.enableAutoDependencyCorrelation = customConfigObj.enableAutoDependencyCorrelation; - this._jsonConfig.enableUseAsyncHooks = customConfigObj.enableUseAsyncHooks; - this._jsonConfig.enableUseDiskRetryCaching = customConfigObj.enableUseDiskRetryCaching; - this._jsonConfig.enableResendInterval = customConfigObj.enableResendInterval; - this._jsonConfig.enableMaxBytesOnDisk = customConfigObj.enableMaxBytesOnDisk; - this._jsonConfig.enableInternalDebugLogging = customConfigObj.enableInternalDebugLogging; - this._jsonConfig.enableInternalWarningLogging = customConfigObj.enableInternalWarningLogging; - this._jsonConfig.enableSendLiveMetrics = customConfigObj.enableSendLiveMetrics; - this._jsonConfig.disableAllExtendedMetrics = customConfigObj.disableAllExtendedMetrics; - this._jsonConfig.extendedMetricDisablers = customConfigObj.extendedMetricDisablers; - this._jsonConfig.disableStatsbeat = customConfigObj.disableStatsbeat !== undefined ? customConfigObj.disableStatsbeat : this._jsonConfig.disableStatsbeat; - this._jsonConfig.noDiagnosticChannel = customConfigObj.noDiagnosticChannel != undefined ? customConfigObj.noDiagnosticChannel : this._jsonConfig.noDiagnosticChannel; - this._jsonConfig.noHttpAgentKeepAlive = customConfigObj.noHttpAgentKeepAlive != undefined ? customConfigObj.noHttpAgentKeepAlive : this._jsonConfig.noHttpAgentKeepAlive; - this._jsonConfig.noPatchModules = customConfigObj.noPatchModules != undefined ? customConfigObj.noPatchModules : this._jsonConfig.noPatchModules; - } catch (err) { - Logging.warn("Error parsing JSON string: ", err); + const jsonConfig: IJsonConfig = JSON.parse(fs.readFileSync(tempDir, "utf8")); + if (jsonConfig.disableStatsbeat != undefined) { + this.disableStatsbeat = jsonConfig.disableStatsbeat; + } + if (jsonConfig.disableAllExtendedMetrics != undefined) { + this.disableAllExtendedMetrics = jsonConfig.disableStatsbeat; + } + if (jsonConfig.noDiagnosticChannel != undefined) { + this.noDiagnosticChannel = jsonConfig.noDiagnosticChannel; + } + if (jsonConfig.noHttpAgentKeepAlive != undefined) { + this.noHttpAgentKeepAlive = jsonConfig.noHttpAgentKeepAlive; + } + if (jsonConfig.connectionString != undefined) { + this.connectionString = jsonConfig.connectionString; + } + if (jsonConfig.extendedMetricDisablers != undefined) { + this.extendedMetricDisablers = jsonConfig.extendedMetricDisablers; + } + if (jsonConfig.noDiagnosticChannel != undefined) { + this.noDiagnosticChannel = jsonConfig.noDiagnosticChannel; + } + if (jsonConfig.proxyHttpUrl != undefined) { + this.proxyHttpUrl = jsonConfig.proxyHttpUrl; + } + if (jsonConfig.proxyHttpsUrl != undefined) { + this.proxyHttpsUrl = jsonConfig.proxyHttpsUrl; + } + if (jsonConfig.proxyHttpsUrl != undefined) { + this.proxyHttpsUrl = jsonConfig.proxyHttpsUrl; + } + if (jsonConfig.noPatchModules != undefined) { + this.noPatchModules = jsonConfig.noPatchModules; + } + this.endpointUrl = jsonConfig.endpointUrl; + this.maxBatchSize = jsonConfig.maxBatchSize; + this.maxBatchIntervalMs = jsonConfig.maxBatchIntervalMs; + this.disableAppInsights = jsonConfig.disableAppInsights; + this.samplingPercentage = jsonConfig.samplingPercentage; + this.correlationIdRetryIntervalMs = jsonConfig.correlationIdRetryIntervalMs; + this.correlationHeaderExcludedDomains = jsonConfig.correlationHeaderExcludedDomains; + this.ignoreLegacyHeaders = jsonConfig.ignoreLegacyHeaders; + this.distributedTracingMode = jsonConfig.distributedTracingMode; + this.enableAutoCollectExternalLoggers = jsonConfig.enableAutoCollectExternalLoggers; + this.enableAutoCollectConsole = jsonConfig.enableAutoCollectConsole; + this.enableAutoCollectExceptions = jsonConfig.enableAutoCollectExceptions; + this.enableAutoCollectPerformance = jsonConfig.enableAutoCollectPerformance; + this.enableAutoCollectExtendedMetrics = jsonConfig.enableAutoCollectExtendedMetrics; + this.enableAutoCollectPreAggregatedMetrics = jsonConfig.enableAutoCollectPreAggregatedMetrics; + this.enableAutoCollectHeartbeat = jsonConfig.enableAutoCollectHeartbeat; + this.enableAutoCollectRequests = jsonConfig.enableAutoCollectRequests; + this.enableAutoCollectDependencies = jsonConfig.enableAutoCollectDependencies; + this.enableAutoDependencyCorrelation = jsonConfig.enableAutoDependencyCorrelation; + this.enableUseAsyncHooks = jsonConfig.enableUseAsyncHooks; + this.enableUseDiskRetryCaching = jsonConfig.enableUseDiskRetryCaching; + this.enableResendInterval = jsonConfig.enableResendInterval; + this.enableMaxBytesOnDisk = jsonConfig.enableMaxBytesOnDisk; + this.enableInternalDebugLogging = jsonConfig.enableInternalDebugLogging; + this.enableInternalWarningLogging = jsonConfig.enableInternalWarningLogging; + this.enableSendLiveMetrics = jsonConfig.enableSendLiveMetrics; + this.quickPulseHost = jsonConfig.quickPulseHost; + } + catch (err) { + Logging.info("Missing or invalid JSON config file: ", err); } - return this._jsonConfig; } } diff --git a/Library/Util.ts b/Library/Util.ts index abd41ce2..7fc99851 100644 --- a/Library/Util.ts +++ b/Library/Util.ts @@ -12,7 +12,7 @@ import { JsonConfig } from "./JsonConfig"; class Util { - private static _useKeepAlive = !JsonConfig.getJsonConfig().noHttpAgentKeepAlive; + private static _useKeepAlive = !JsonConfig.getInstance().noHttpAgentKeepAlive; private static _listenerAttached = false; public static MAX_PROPERTY_LENGTH = 8192; diff --git a/README.md b/README.md index 0b5858b0..bdce8106 100644 --- a/README.md +++ b/README.md @@ -294,109 +294,6 @@ appInsights .start() ``` -### Configure settings through json file -The appInsights object provides a way to make configurations through a configuration json file, by setting the config json file path through the environment variable `APPLICATION_INSIGHTS_CONFIG_PATH`. - ->***Note:*** configuration json file takes the highest priority over set APIs. - -**Scenario 1** : `enableAutoCollectExceptions` in config.json file overrides `setAutoCollectExceptions(true)`. -In `config.json` file: -```javacript -{ - "connectionString": "InstrumentationKey=1aa11111-bbbb-1ccc-8ddd-eeeeffff3333;IngestionEndpoint=https://centralus-0.in.applicationinsights.azure.com/", - "enableAutoCollectExceptions": false -} -``` -Where you start appInsights object: -```javascript -process.env["APPLICATION_INSIGHTS_CONFIG_PATH"] = "./config.json"; -let appInsights = require('applicationinsights'); -appInsights.setup() - .setAutoCollectExceptions(true) - .start(); -``` -Thus `autoCollectExceptions` is disabled. - -**Scenario 2** : You can modify `appInsights.defaultClient.config.enableAutoCollectExceptions` before appInsights calls start. -In `config.json` file: -```javacript -{ - "connectionString": "InstrumentationKey=1aa11111-bbbb-1ccc-8ddd-eeeeffff3333;IngestionEndpoint=https://centralus-0.in.applicationinsights.azure.com/", - "enableAutoCollectExceptions": false -} -``` -Where you start appInsights object: -```javascript -process.env["APPLICATION_INSIGHTS_CONFIG_PATH"] = "./config.json"; -let appInsights = require('applicationinsights'); -appInsights.setup() - .setAutoCollectExceptions(true); -appInsights.defaultClient.config.enableAutoCollectExceptions = true; -appInsights.start(); -``` -Thus `autoCollectExceptions` is enabled. - -***Configuration options:*** -| Property | Description | -| ------------------------------- |------------------------------------------------------------------------------------------------------------| -| connectionString | An identifier for your Application Insights resource | -| endpointUrl | The ingestion endpoint to send telemetry payloads to | -| proxyHttpUrl | A proxy server for SDK HTTP traffic (Optional, Default pulled from `http_proxy` environment variable) | -| proxyHttpsUrl | A proxy server for SDK HTTPS traffic (Optional, Default pulled from `https_proxy` environment variable) | -| httpAgent | An http.Agent to use for SDK HTTP traffic (Optional, Default undefined) | -| httpsAgent | An https.Agent to use for SDK HTTPS traffic (Optional, Default undefined) | -| maxBatchSize | The maximum number of telemetry items to include in a payload to the ingestion endpoint (Default `250`) | -| maxBatchIntervalMs | The maximum amount of time to wait to for a payload to reach maxBatchSize (Default `15000`) | -| disableAppInsights | A flag indicating if telemetry transmission is disabled (Default `false`) | -| samplingPercentage | The percentage of telemetry items tracked that should be transmitted (Default `100`) | -| correlationIdRetryIntervalMs | The time to wait before retrying to retrieve the id for cross-component correlation (Default `30000`) | -| correlationHeaderExcludedDomains| A list of domains to exclude from cross-component correlation header injection (Default See [Config.ts][]) | -| ignoreLegacyHeaders | Disable including legacy headers in outgoing requests, x-ms-request-id | -| distributedTracingMode | Sets the distributed tracing modes (Default=AI) | -| enableAutoCollectExternalLoggers| Sets the state of console. If true logger activity will be sent to Application Insights | -| enableAutoCollectConsole | Sets the state of logger tracking (enabled by default for third-party loggers only). If true, logger autocollection will include console.log calls (default false) | -| enableAutoCollectExceptions | Sets the state of exception tracking (enabled by default). If true uncaught exceptions will be sent to Application Insights | -| enableAutoCollectPerformance | Sets the state of performance tracking (enabled by default). If true performance counters will be collected every second and sent to Application Insights | -| enableAutoCollectExtendedMetrics| Sets the state of performance tracking (enabled by default). If true, extended metrics counters will be collected every minute and sent to Application Insights | -| enableAutoCollectPreAggregatedMetrics | Sets the state of pre aggregated metrics tracking (enabled by default). If true pre aggregated metrics will be collected every minute and sent to Application Insights | -| enableAutoCollectHeartbeat | Sets the state of request tracking (enabled by default). If true HeartBeat metric data will be collected every 15 mintues and sent to Application Insights | -| enableAutoCollectRequests | Sets the state of request tracking (enabled by default). If true requests will be sent to Application Insights | -| enableAutoCollectDependencies | Sets the state of dependency tracking (enabled by default). If true dependencies will be sent to Application Insights | -| enableAutoDependencyCorrelation| Sets the state of automatic dependency correlation (enabled by default). If true dependencies will be correlated with requests | -| enableUseAsyncHooks | Sets the state of automatic dependency correlation (enabled by default). If true, forces use of experimental async_hooks module to provide correlation. If false, instead uses only patching-based techniques. If left blank, the best option is chosen for you based on your version of Node.js. | -| enableUseDiskRetryCaching | If true events that occured while client is offline will be cached on disk | -| enableResendInterval | The wait interval for resending cached events. | -| enableMaxBytesOnDisk | The maximum size (in bytes) that the created temporary directory for cache events can grow to, before caching is disabled. | -| enableInternalDebugLogging | Enables debug and warning logging for AppInsights itself. If true, enables debug logging | -| enableInternalWarningLogging | Enables debug and warning logging for AppInsights itself. If true, enables warning logging | -| enableSendLiveMetrics | Enables communication with Application Insights Live Metrics. If true, enables communication with the live metrics service | -| disableAllExtendedMetrics | Disable all environment variables set | -| extendedMetricDisablers | Disable individual environment variables set. `"extendedMetricDisablers": "..."` | -| disableStatsbeat | Disable Statsbeat | -| noDiagnosticChannel | In order to track context across asynchronous calls, some changes are required in third party libraries such as mongodb and redis. By default ApplicationInsights will use diagnostic-channel-publishers to monkey-patch some of these libraries. This property is to disable the feature. Note that by setting this flag, events may no longer be correctly associated with the right operation. | -| noPatchModules | Disable individual monkey-patches. Set `noPatchModules` to a comma separated list of packages to disable. e.g. `"noPatchModules": "console,redis"` to avoid patching the console and redis packages. The following modules are available: `azuresdk, bunyan, console, mongodb, mongodb-core, mysql, redis, winston, pg`, and `pg-pool`. Visit the [diagnostic-channel-publishers' README](https://github.com/microsoft/node-diagnostic-channel/blob/master/src/diagnostic-channel-publishers/README.md) for information about exactly which versions of these packages are patched. | -| noHttpAgentKeepAlive | HTTPS without a passed in agent | - -An example of setting configuration path through environment variable: -Create a file named `config.json`: -```javascript -{ - "connectionString": "", - "enableAutoCollectExternalLoggers": true, - "enableAutoCollectExceptions": true, - "enableAutoCollectHeartbeat": true, - "disableStatsbeat": true, - ... -} - -``` -Then set the configuration file path in your environment variable before initialzing the appInsights object: -```javascript -process.env["APPLICATION_INSIGHTS_CONFIG_PATH"] = "./config.json"; -let appInsights = require('applicationinsights'); -appInsights.setup().start(); -``` - ## Track custom telemetry You can track any request, event, metric or exception using the Application diff --git a/Tests/AutoCollection/Heartbeat.tests.ts b/Tests/AutoCollection/Heartbeat.tests.ts index ae001b1d..007c0ed3 100644 --- a/Tests/AutoCollection/Heartbeat.tests.ts +++ b/Tests/AutoCollection/Heartbeat.tests.ts @@ -6,47 +6,56 @@ import AppInsights = require("../../applicationinsights"); import HeartBeat = require("../../AutoCollection/HeartBeat"); import TelemetryClient = require("../../Library/TelemetryClient"); import Context = require("../../Library/Context"); +import { JsonConfig } from "../../Library/JsonConfig"; describe("AutoCollection/HeartBeat", () => { + var sandbox: sinon.SinonSandbox; + let originalEnv: NodeJS.ProcessEnv; const client = new TelemetryClient("1aa11111-bbbb-1ccc-8ddd-eeeeffff3333"); client.config.correlationId = "testicd"; + beforeEach(() => { + originalEnv = process.env; + sandbox = sinon.sandbox.create(); + }); + afterEach(() => { + process.env = originalEnv; AppInsights.dispose(); + sandbox.restore(); }); describe("#init and #dispose()", () => { it("init should enable and dispose should stop autocollection interval", () => { - var setIntervalSpy = sinon.spy(global, "setInterval"); - var clearIntervalSpy = sinon.spy(global, "clearInterval"); + JsonConfig["_instance"] = undefined; + var env = <{ [id: string]: string }>{}; + env["APPLICATION_INSIGHTS_NO_STATSBEAT"] = "true"; + process.env = env; + var setIntervalSpy = sandbox.spy(global, "setInterval"); + var clearIntervalSpy = sandbox.spy(global, "clearInterval"); AppInsights.setup("1aa11111-bbbb-1ccc-8ddd-eeeeffff3333") .setAutoCollectPreAggregatedMetrics(false) .setAutoCollectPerformance(false, false) .setAutoCollectHeartbeat(true) .start(); - assert.equal(setIntervalSpy.callCount, 3, "setInteval should be called three times as part of heartbeat initialization, StatsBeat and Heartbeat"); + assert.equal(setIntervalSpy.callCount, 1, "setInterval should be called as part of heartbeat initialization"); AppInsights.dispose(); assert.equal(clearIntervalSpy.callCount, 1, "clearInterval should be called once as part of heartbeat shutdown"); - - setIntervalSpy.restore(); - clearIntervalSpy.restore(); }); }); describe("#trackHeartBeat()", () => { it("should read correct web app values from envrionment variable", (done) => { const heartbeat1: HeartBeat = new HeartBeat(client); - heartbeat1.enable(true, client.config); - HeartBeat.INSTANCE.enable(true, client.config); - const stub1 = sinon.stub(heartbeat1["_client"], "trackMetric"); + heartbeat1.enable(true); + HeartBeat.INSTANCE.enable(true); + const stub1 = sandbox.stub(heartbeat1["_client"], "trackMetric"); var env1 = <{ [id: string]: string }>{}; env1["WEBSITE_SITE_NAME"] = "site_name"; env1["WEBSITE_HOME_STAMPNAME"] = "stamp_name"; env1["WEBSITE_HOSTNAME"] = "host_name"; - - var originalEnv = process.env; process.env = env1; heartbeat1["trackHeartBeat"](client.config, () => { @@ -66,26 +75,18 @@ describe("AutoCollection/HeartBeat", () => { assert.equal(properties1["appSrv_SiteName"], "site_name", "appSrv_SiteName should be read from envrionment variable"); assert.equal(properties1["appSrv_wsStamp"], "stamp_name", "appSrv_wsStamp should be read from envrionment variable"); assert.equal(properties1["appSrv_wsHost"], "host_name", "appSrv_wsHost should be read from envrionment variable"); - - stub1.restore(); - heartbeat1.dispose(); - process.env = originalEnv; done(); }); }); it("should read correct function app values from envrionment variable", (done) => { const heartbeat2: HeartBeat = new HeartBeat(client); - heartbeat2.enable(true, client.config); - HeartBeat.INSTANCE.enable(true, client.config); - const stub2 = sinon.stub(heartbeat2["_client"], "trackMetric"); - + heartbeat2.enable(true); + HeartBeat.INSTANCE.enable(true); + const stub2 = sandbox.stub(heartbeat2["_client"], "trackMetric"); var env2 = <{ [id: string]: string }>{}; - env2["FUNCTIONS_WORKER_RUNTIME"] = "nodejs"; env2["WEBSITE_HOSTNAME"] = "host_name"; - - var originalEnv = process.env; process.env = env2; heartbeat2["trackHeartBeat"](client.config, () => { @@ -101,10 +102,6 @@ describe("AutoCollection/HeartBeat", () => { assert.equal(properties2["sdk"], Context.sdkVersion, "sdk version should be read from Context"); assert.equal(properties2["osType"], os.type(), "osType should be read from os library"); assert.equal(properties2["azfunction_appId"], "host_name", "azfunction_appId should be read from envrionment variable"); - - process.env = originalEnv; - stub2.restore(); - heartbeat2.dispose(); done(); }); }); diff --git a/Tests/AutoCollection/NativePerformance.tests.ts b/Tests/AutoCollection/NativePerformance.tests.ts index cf031e29..08f637b2 100644 --- a/Tests/AutoCollection/NativePerformance.tests.ts +++ b/Tests/AutoCollection/NativePerformance.tests.ts @@ -13,7 +13,7 @@ describe("AutoCollection/NativePerformance", () => { beforeEach(() => { sandbox = sinon.sandbox.create(); - JsonConfig["_jsonConfig"] = undefined; + JsonConfig["_instance"] = undefined; }); afterEach(() => { @@ -80,7 +80,7 @@ describe("AutoCollection/NativePerformance", () => { describe("#_parseEnabled", () => { it("should return equal input arg if no env vars are set", () => { - const _customConfig = JsonConfig.getJsonConfig(); + const _customConfig = JsonConfig.getInstance(); assert.deepEqual(AutoCollectNativePerformance.parseEnabled(true, _customConfig), { isEnabled: true, disabledMetrics: {} }); assert.deepEqual(AutoCollectNativePerformance.parseEnabled(false, _customConfig), { isEnabled: false, disabledMetrics: {} }); @@ -95,7 +95,7 @@ describe("AutoCollection/NativePerformance", () => { env[ENV_nativeMetricsDisableAll] = "set"; process.env = env; - const _customConfig = JsonConfig.getJsonConfig(); + const _customConfig = JsonConfig.getInstance(); assert.deepEqual(AutoCollectNativePerformance.parseEnabled(true, _customConfig), { isEnabled: false, disabledMetrics: {} }); assert.deepEqual(AutoCollectNativePerformance.parseEnabled({}, _customConfig), { isEnabled: false, disabledMetrics: {} }); @@ -112,7 +112,7 @@ describe("AutoCollection/NativePerformance", () => { env[ENV_nativeMetricsDisablers] = "gc,heap"; process.env = env; - const _customConfig = JsonConfig.getJsonConfig(); + const _customConfig = JsonConfig.getInstance(); let inConfig; diff --git a/Tests/Config/jsonConfig.tests.ts b/Tests/Config/jsonConfig.tests.ts deleted file mode 100644 index c421ca96..00000000 --- a/Tests/Config/jsonConfig.tests.ts +++ /dev/null @@ -1,88 +0,0 @@ -import assert = require("assert"); -import sinon = require("sinon"); -import path = require("path"); -import AppInsights = require("../../applicationinsights"); -import { JsonConfig } from "../../Library/JsonConfig"; -import Config = require("../../Library/Config"); - -const APPLICATION_INSIGHTS_CONFIG_PATH = "APPLICATION_INSIGHTS_CONFIG_PATH"; -const ENV_connectionString = "APPLICATIONINSIGHTS_CONNECTION_STRING"; -const ENV_http_proxy = "http_proxy"; -const ENV_https_proxy = "https_proxy"; -const ENV_noStatsbeat = "APPLICATION_INSIGHTS_NO_STATSBEAT"; - -describe("Custom Config", () => { - var sandbox: sinon.SinonSandbox; - - beforeEach(() => { - sandbox = sinon.sandbox.create(); - JsonConfig["_jsonConfig"] = undefined; - }); - - afterEach(() => { - AppInsights.dispose(); - sandbox.restore(); - }); - - describe("config path", () => { - it("Should take configurations from custom config file", () => { - const env = <{ [id: string]: string }>{}; - const originalEnv = process.env; - - const customConfigJSONPath = path.resolve(__dirname, "../../../Tests/Config", "./config.json"); - env[APPLICATION_INSIGHTS_CONFIG_PATH] = customConfigJSONPath; - process.env = env; - AppInsights.setup().start(); - - const config = new Config(); - assert.deepEqual(config.instrumentationKey, "1aa11111-bbbb-1ccc-8ddd-eeeeffff3333"); - assert.deepEqual(config.endpointUrl, "testEndpointUrl/v2.1/track"); - assert.deepEqual(config.maxBatchSize, 150); - assert.deepEqual(config.maxBatchIntervalMs, 12000); - assert.deepEqual(config.disableAppInsights, false); - assert.deepEqual(config.samplingPercentage, 30); - assert.deepEqual(config.correlationIdRetryIntervalMs, 15000); - assert.deepEqual(config.correlationHeaderExcludedDomains, ["domain1", "domain2"]); - assert.deepEqual(config.proxyHttpUrl, "testProxyHttpUrl"); - assert.deepEqual(config.proxyHttpsUrl, "testProxyHttpsUrl"); - assert.deepEqual(config.ignoreLegacyHeaders, true); - assert.deepEqual(config.enableAutoCollectExternalLoggers, false); - assert.deepEqual(config.enableAutoCollectConsole, false); - assert.deepEqual(config.enableAutoCollectExceptions, false); - assert.deepEqual(config.enableAutoCollectPerformance, false); - assert.deepEqual(config.enableAutoCollectPreAggregatedMetrics, false); - assert.deepEqual(config.enableAutoCollectHeartbeat, false); - assert.deepEqual(config.enableAutoCollectRequests, false); - assert.deepEqual(config.enableAutoCollectDependencies, false); - assert.deepEqual(config.enableAutoDependencyCorrelation, false); - assert.deepEqual(config.enableUseAsyncHooks, false); - assert.deepEqual(config.disableStatsbeat, false); - - process.env = originalEnv; - }); - - it("Should take configurations from custom config file over environment variable if both are configured", () => { - const env = <{ [id: string]: string }>{}; - const originalEnv = process.env; - - const customConfigJSONPath = path.resolve(__dirname, "../../../Tests/Config", "./config.json"); - env[APPLICATION_INSIGHTS_CONFIG_PATH] = customConfigJSONPath; - env[ENV_connectionString] = "InstrumentationKey=2bb22222-cccc-2ddd-9eee-ffffgggg4444;IngestionEndpoint=https://centralus-0.in.applicationinsights.azure.com/"; - env[ENV_http_proxy] = "testProxyHttpUrl2"; - env[ENV_https_proxy] = "testProxyHttpsUrl2"; - env[ENV_noStatsbeat] = "true"; - process.env = env; - - // sandbox.stub(AppInsights['defaultClient'].config, '_jsonConfig').returns(new JsonConfig()); - AppInsights.setup().start(); - - const config = new Config(); - assert.deepEqual(config.instrumentationKey, "1aa11111-bbbb-1ccc-8ddd-eeeeffff3333"); - assert.deepEqual(config.proxyHttpUrl, "testProxyHttpUrl"); - assert.deepEqual(config.proxyHttpsUrl, "testProxyHttpsUrl"); - assert.deepEqual(config.disableStatsbeat, false); - - process.env = originalEnv; - }); - }); -}); diff --git a/Tests/EndToEnd.tests.ts b/Tests/EndToEnd.tests.ts index 29f7ed50..0699c1a5 100644 --- a/Tests/EndToEnd.tests.ts +++ b/Tests/EndToEnd.tests.ts @@ -201,7 +201,7 @@ describe("EndToEnd", () => { }); beforeEach(() => { - JsonConfig["_jsonConfig"] = undefined; + JsonConfig["_instance"] = undefined; }); afterEach(() => { @@ -359,7 +359,7 @@ describe("EndToEnd", () => { }); beforeEach(() => { - JsonConfig["_jsonConfig"] = undefined; + JsonConfig["_instance"] = undefined; }); afterEach(() => { @@ -493,7 +493,7 @@ describe("EndToEnd", () => { if (child_process.spawnSync) { spawnSync = sandbox.stub(child_process, 'spawnSync').returns({ status: 0, stdout: 'stdoutmock' }); } - JsonConfig["_jsonConfig"] = undefined; + JsonConfig["_instance"] = undefined; }); afterEach(() => { @@ -891,7 +891,7 @@ describe("EndToEnd", () => { describe("Heartbeat metrics for VM", () => { beforeEach(() => { - JsonConfig["_jsonConfig"] = undefined; + JsonConfig["_instance"] = undefined; }); afterEach(() => { @@ -914,8 +914,8 @@ describe("EndToEnd", () => { // set up sdk const client = new TelemetryClient("key"); const heartbeat: HeartBeat = new HeartBeat(client); - heartbeat.enable(true, client.config); - HeartBeat.INSTANCE.enable(true, client.config); + heartbeat.enable(true); + HeartBeat.INSTANCE.enable(true); const trackMetricStub = sandbox.stub(heartbeat["_client"], "trackMetric"); heartbeat["trackHeartBeat"](client.config, () => { @@ -950,8 +950,8 @@ describe("EndToEnd", () => { // set up sdk const client = new TelemetryClient("key"); const heartbeat: HeartBeat = new HeartBeat(client); - heartbeat.enable(true, client.config); - HeartBeat.INSTANCE.enable(true, client.config); + heartbeat.enable(true); + HeartBeat.INSTANCE.enable(true); const trackMetricStub = sandbox.stub(heartbeat["_client"], "trackMetric"); heartbeat["trackHeartBeat"](client.config, () => { diff --git a/Tests/Library/Config.tests.ts b/Tests/Library/Config.tests.ts index e93f25cc..65f509b2 100644 --- a/Tests/Library/Config.tests.ts +++ b/Tests/Library/Config.tests.ts @@ -1,4 +1,5 @@ import assert = require("assert"); +import path = require("path"); import sinon = require("sinon"); var http = require("http"); var https = require("https"); @@ -12,58 +13,48 @@ const ENV_connectionString = "APPLICATIONINSIGHTS_CONNECTION_STRING"; describe("Library/Config", () => { var iKey = "1aa11111-bbbb-1ccc-8ddd-eeeeffff3333"; - var appVer = "appVer"; - + let originalEnv: NodeJS.ProcessEnv; var sandbox: sinon.SinonSandbox; - before(() => { - sandbox = sinon.sandbox.create(); - }); - beforeEach(() => { - JsonConfig["_jsonConfig"] = undefined; + originalEnv = process.env; + sandbox = sinon.sandbox.create(); }); afterEach(() => { + process.env = originalEnv; sandbox.restore(); + JsonConfig["_instance"] = undefined; }); describe("#constructor", () => { describe("connection string && API && environment variable prioritization", () => { - it ("connection string set via in code setup", () => { - var env = { [ENV_connectionString]: "InStruMenTatioNKey=cs.env", [Config.ENV_iKey]: "ikey.env"}; - var originalEnv = process.env; + it("connection string set via in code setup", () => { + var env = { [ENV_connectionString]: "InStruMenTatioNKey=cs.env", [Config.ENV_iKey]: "ikey.env" }; process.env = env; const config = new Config("InStruMenTatioNKey=cs.code"); assert.deepEqual(config.instrumentationKey, "cs.code"); - process.env = originalEnv; }); it("instrumentation key set via in code setup", () => { - var env = { [ENV_connectionString]: "InStruMenTatioNKey=CS.env", [Config.ENV_iKey]: "ikey.env"}; - var originalEnv = process.env; + var env = { [ENV_connectionString]: "InStruMenTatioNKey=CS.env", [Config.ENV_iKey]: "ikey.env" }; process.env = env; const config = new Config("ikey.code"); assert.deepEqual(config.instrumentationKey, "ikey.code"); - process.env = originalEnv; }); it("connection string set via environment variable", () => { - var env = { [ENV_connectionString]: "InStruMenTatioNKey=cs.env", [Config.ENV_iKey]: "ikey.env"}; - var originalEnv = process.env; + var env = { [ENV_connectionString]: "InStruMenTatioNKey=cs.env", [Config.ENV_iKey]: "ikey.env" }; process.env = env; const config = new Config(); assert.deepEqual(config.instrumentationKey, "cs.env"); - process.env = originalEnv; }); it("instrumentation key set via environment variable", () => { - var env = { [Config.ENV_iKey]: "ikey.env"}; - var originalEnv = process.env; + var env = { [Config.ENV_iKey]: "ikey.env" }; process.env = env; const config = new Config(); assert.deepEqual(config.instrumentationKey, "ikey.env"); - process.env = originalEnv; }); it("should parse the host of livemetrics host, if provided", () => { @@ -75,10 +66,53 @@ describe("Library/Config", () => { const config = new Config("InStruMenTatioNKey=ikey;Location=wus2;EndpointSuffix=example.com"); assert.deepEqual(config.quickPulseHost, "wus2.live.example.com"); }); + + it("merge JSON config", () => { + JsonConfig["_instance"] = undefined; + const env = <{ [id: string]: string }>{}; + const customConfigJSONPath = path.resolve(__dirname, "../../../Tests/Library/config.json"); + env["APPLICATIONINSIGHTS_CONFIGURATION_FILE"] = customConfigJSONPath; // Load JSON config + process.env = env; + const config = new Config(); + assert.equal(config.connectionString, "InstrumentationKey=1aa11111-bbbb-1ccc-8ddd-eeeeffff3333;IngestionEndpoint=https://centralus-0.in.applicationinsights.azure.com/"); + assert.equal(config.endpointUrl, "testEndpointUrl/v2.1/track"); + assert.equal(config.maxBatchSize, 150); + assert.equal(config.maxBatchIntervalMs, 12000); + assert.equal(config.disableAppInsights, false); + assert.equal(config.samplingPercentage, 30); + assert.equal(config.correlationIdRetryIntervalMs, 15000); + assert.equal(config.correlationHeaderExcludedDomains[0], "domain1"); + assert.equal(config.correlationHeaderExcludedDomains[1], "domain2"); + assert.equal(config.proxyHttpUrl, "testProxyHttpUrl"); + assert.equal(config.proxyHttpsUrl, "testProxyHttpsUrl"); + assert.equal(config.ignoreLegacyHeaders, false); + assert.equal(config.enableAutoCollectExternalLoggers, false); + assert.equal(config.enableAutoCollectConsole, false); + assert.equal(config.enableAutoCollectExceptions, false); + assert.equal(config.enableAutoCollectPerformance, false); + assert.equal(config.enableAutoCollectPreAggregatedMetrics, false); + assert.equal(config.enableAutoCollectHeartbeat, false); + assert.equal(config.enableAutoCollectRequests, false); + assert.equal(config.enableAutoCollectDependencies, false); + assert.equal(config.enableAutoDependencyCorrelation, false); + assert.equal(config.enableUseAsyncHooks, false); + assert.equal(config.disableStatsbeat, false); + assert.equal(config.enableAutoCollectExtendedMetrics, false); + assert.equal(config.distributedTracingMode, 0); + assert.equal(config.enableUseDiskRetryCaching, false); + assert.equal(config.enableResendInterval, 123); + assert.equal(config.enableMaxBytesOnDisk, 456); + assert.equal(config.enableInternalDebugLogging, false); + assert.equal(config.disableStatsbeat, false); + assert.equal(config.enableInternalWarningLogging, false); + assert.equal(config.enableSendLiveMetrics, false); + assert.equal(config.extendedMetricDisablers, "gc,heap"); + assert.equal(config.quickPulseHost, "testquickpulsehost.com"); + }); }); describe("constructor(ikey)", () => { - beforeEach(()=> { + beforeEach(() => { sinon.stub(http, 'request'); sinon.stub(https, 'request'); }); @@ -88,30 +122,24 @@ describe("Library/Config", () => { }); it("should throw if no iKey is available", () => { var env = {}; - var originalEnv = process.env; process.env = env; assert.throws(() => new Config()); - process.env = originalEnv; }); it("should read iKey from environment", () => { - var env = <{[id: string]: string}>{}; + var env = <{ [id: string]: string }>{}; env[Config.ENV_iKey] = iKey; - var originalEnv = process.env; process.env = env; var config = new Config(); assert.equal(config.instrumentationKey, iKey); - process.env = originalEnv; }); it("should read iKey from azure environment", () => { - var env = <{[id: string]: string}>{}; + var env = <{ [id: string]: string }>{}; env[Config.ENV_azurePrefix + Config.ENV_iKey] = iKey; - var originalEnv = process.env; process.env = env; var config = new Config(); assert.equal(config.instrumentationKey, iKey); - process.env = originalEnv; }); it("should initialize valid values", () => { @@ -143,7 +171,7 @@ describe("Library/Config", () => { it("should initialize values that we claim in README (2)", () => { process.env.http_proxy = "test"; process.env.https_proxy = "test2"; - JsonConfig["_jsonConfig"] = undefined; + JsonConfig["_instance"] = undefined; var config = new Config("1aa11111-bbbb-1ccc-8ddd-eeeeffff3333"); assert(config.proxyHttpUrl === "test"); assert(config.proxyHttpsUrl === "test2"); @@ -159,19 +187,19 @@ describe("Library/Config", () => { it("instrumentation key validation-valid key passed", () => { var warnStub = sandbox.stub(console, "warn"); var config = new Config("1aa11111-bbbb-1ccc-8ddd-eeeeffff3333"); - assert.ok(warnStub.calledOnce, "warning was not raised due to ikey checking, warning is called once since config json path is not configured"); + assert.ok(warnStub.notCalled, "warning was not raised"); }); it("instrumentation key validation-invalid key passed", () => { var warnStub = sandbox.stub(console, "warn"); var config = new Config("1aa11111bbbb1ccc8dddeeeeffff3333"); - assert.ok(warnStub.calledTwice, "warning was raised once due to ikey checking, the second call is caused by config json path is not configured"); + assert.ok(warnStub.calledOn, "warning was raised"); }); it("instrumentation key validation-invalid key passed", () => { var warnStub = sandbox.stub(console, "warn"); var config = new Config("abc"); - assert.ok(warnStub.calledTwice, "warning was raised due to ikey checking, the second call is caused by config json path is not configured"); + assert.ok(warnStub.calledOn, "warning was raised"); }); }); diff --git a/Tests/Config/config.json b/Tests/Library/config.json similarity index 60% rename from Tests/Config/config.json rename to Tests/Library/config.json index 416fd2fe..e935f855 100644 --- a/Tests/Config/config.json +++ b/Tests/Library/config.json @@ -7,14 +7,18 @@ "disableAppInsights": false, "samplingPercentage": 30, "correlationIdRetryIntervalMs": 15000, - "correlationHeaderExcludedDomains": ["domain1", "domain2"], + "correlationHeaderExcludedDomains": [ + "domain1", + "domain2" + ], "proxyHttpUrl": "testProxyHttpUrl", "proxyHttpsUrl": "testProxyHttpsUrl", - "ignoreLegacyHeaders": true, + "ignoreLegacyHeaders": false, "enableAutoCollectExternalLoggers": false, "enableAutoCollectConsole": false, "enableAutoCollectExceptions": false, "enableAutoCollectPerformance": false, + "enableAutoCollectExtendedMetrics": false, "enableAutoCollectPreAggregatedMetrics": false, "enableAutoCollectHeartbeat": false, "enableAutoCollectRequests": false, @@ -22,6 +26,16 @@ "enableAutoDependencyCorrelation": false, "enableUseAsyncHooks": false, "disableStatsbeat": false, - "noHttpAgentKeepAlive": true -} - \ No newline at end of file + "noHttpAgentKeepAlive": false, + "distributedTracingMode": 0, + "enableUseDiskRetryCaching": false, + "enableResendInterval": 123, + "enableMaxBytesOnDisk": 456, + "enableInternalDebugLogging": false, + "enableInternalWarningLogging": false, + "enableSendLiveMetrics": false, + "extendedMetricDisablers": "gc,heap", + "noDiagnosticChannel": false, + "noPatchModules": "console,redis", + "quickPulseHost": "testquickpulsehost.com" +} \ No newline at end of file diff --git a/Tests/Library/jsonConfig.tests.ts b/Tests/Library/jsonConfig.tests.ts new file mode 100644 index 00000000..3eee680b --- /dev/null +++ b/Tests/Library/jsonConfig.tests.ts @@ -0,0 +1,158 @@ +import assert = require("assert"); +import sinon = require("sinon"); +import fs = require("fs"); +import path = require("path"); +import AppInsights = require("../../applicationinsights"); +import Logging = require("../../Library/Logging"); +import { JsonConfig } from "../../Library/JsonConfig"; + + +describe("Json Config", () => { + var sandbox: sinon.SinonSandbox; + let originalEnv: NodeJS.ProcessEnv; + + beforeEach(() => { + originalEnv = process.env; + sandbox = sinon.sandbox.create(); + JsonConfig["_instance"] = undefined; + }); + + afterEach(() => { + process.env = originalEnv; + AppInsights.dispose(); + sandbox.restore(); + }); + + after(()=>{ + JsonConfig["_instance"] = undefined; + }); + + + describe("config path", () => { + it("Default file path", () => { + let fileSpy = sandbox.spy(fs, "readFileSync"); + let loggerSpy = sandbox.spy(Logging, "info"); + const config = JsonConfig.getInstance(); + assert.equal(loggerSpy.callCount, 0); + assert.equal(fileSpy.called, 1); + let defaultPath = path.resolve(process.cwd(), "applicationinsights.json"); + assert.equal(fileSpy.args[0][0], defaultPath); + assert.equal(config.proxyHttpUrl, undefined); + }); + + it("Absolute file path", () => { + const env = <{ [id: string]: string }>{}; + const customConfigJSONPath = path.resolve(__dirname, "../../../Tests/Library/config.json"); + env["APPLICATIONINSIGHTS_CONFIGURATION_FILE"] = customConfigJSONPath; + process.env = env; + const config = JsonConfig.getInstance(); + assert.equal(config.connectionString, "InstrumentationKey=1aa11111-bbbb-1ccc-8ddd-eeeeffff3333;IngestionEndpoint=https://centralus-0.in.applicationinsights.azure.com/"); + }); + + it("Relative file path", () => { + const env = <{ [id: string]: string }>{}; + const customConfigJSONPath = "./Tests/Library/config.json"; + env["APPLICATIONINSIGHTS_CONFIGURATION_FILE"] = customConfigJSONPath; + process.env = env; + const config = JsonConfig.getInstance(); + assert.equal(config.connectionString, "InstrumentationKey=1aa11111-bbbb-1ccc-8ddd-eeeeffff3333;IngestionEndpoint=https://centralus-0.in.applicationinsights.azure.com/"); + }); + }); + + describe("configuration values", () => { + it("Should take configurations from JSON config file", () => { + const env = <{ [id: string]: string }>{}; + const customConfigJSONPath = path.resolve(__dirname, "../../../Tests/Library/config.json"); + env["APPLICATIONINSIGHTS_CONFIGURATION_FILE"] = customConfigJSONPath; + process.env = env; + const config = JsonConfig.getInstance(); + assert.equal(config.connectionString, "InstrumentationKey=1aa11111-bbbb-1ccc-8ddd-eeeeffff3333;IngestionEndpoint=https://centralus-0.in.applicationinsights.azure.com/"); + assert.equal(config.endpointUrl, "testEndpointUrl"); + assert.equal(config.maxBatchSize, 150); + assert.equal(config.maxBatchIntervalMs, 12000); + assert.equal(config.disableAppInsights, false); + assert.equal(config.samplingPercentage, 30); + assert.equal(config.correlationIdRetryIntervalMs, 15000); + assert.equal(config.correlationHeaderExcludedDomains[0], "domain1"); + assert.equal(config.correlationHeaderExcludedDomains[1], "domain2"); + assert.equal(config.proxyHttpUrl, "testProxyHttpUrl"); + assert.equal(config.proxyHttpsUrl, "testProxyHttpsUrl"); + assert.equal(config.ignoreLegacyHeaders, false); + assert.equal(config.enableAutoCollectExternalLoggers, false); + assert.equal(config.enableAutoCollectConsole, false); + assert.equal(config.enableAutoCollectExceptions, false); + assert.equal(config.enableAutoCollectPerformance, false); + assert.equal(config.enableAutoCollectPreAggregatedMetrics, false); + assert.equal(config.enableAutoCollectHeartbeat, false); + assert.equal(config.enableAutoCollectRequests, false); + assert.equal(config.enableAutoCollectDependencies, false); + assert.equal(config.enableAutoDependencyCorrelation, false); + assert.equal(config.enableUseAsyncHooks, false); + assert.equal(config.disableStatsbeat, false); + assert.equal(config.enableAutoCollectExtendedMetrics, false); + assert.equal(config.noHttpAgentKeepAlive, false); + assert.equal(config.distributedTracingMode, 0); + assert.equal(config.enableUseDiskRetryCaching, false); + assert.equal(config.enableResendInterval, 123); + assert.equal(config.enableMaxBytesOnDisk, 456); + assert.equal(config.enableInternalDebugLogging, false); + assert.equal(config.disableStatsbeat, false); + assert.equal(config.enableInternalWarningLogging, false); + assert.equal(config.enableSendLiveMetrics, false); + assert.equal(config.extendedMetricDisablers, "gc,heap"); + assert.equal(config.noDiagnosticChannel, false); + assert.equal(config.noPatchModules, "console,redis"); + assert.equal(config.quickPulseHost, "testquickpulsehost.com"); + }); + + it("Should take configurations from environment variables", () => { + const env = <{ [id: string]: string }>{}; + env["APPLICATIONINSIGHTS_CONNECTION_STRING"] = "TestConnectionString"; + env["APPLICATION_INSIGHTS_DISABLE_EXTENDED_METRIC"] = "gc"; + env["APPLICATION_INSIGHTS_NO_PATCH_MODULES"] = "azuresdk"; + env["APPLICATION_INSIGHTS_DISABLE_ALL_EXTENDED_METRICS"] = "true"; + env["APPLICATION_INSIGHTS_NO_DIAGNOSTIC_CHANNEL"] = "true"; + env["APPLICATION_INSIGHTS_NO_STATSBEAT"] = "true"; + env["APPLICATION_INSIGHTS_NO_HTTP_AGENT_KEEP_ALIVE"] = "true"; + env["http_proxy"] = "testProxyHttpUrl2"; + env["https_proxy"] = "testProxyHttpsUrl2"; + process.env = env; + const config = JsonConfig.getInstance(); + assert.equal(config.connectionString, "TestConnectionString"); + assert.equal(config.proxyHttpUrl, "testProxyHttpUrl2"); + assert.equal(config.proxyHttpsUrl, "testProxyHttpsUrl2"); + assert.equal(config.extendedMetricDisablers, "gc"); + assert.equal(config.disableAllExtendedMetrics, true); + assert.equal(config.noDiagnosticChannel, true); + assert.equal(config.noHttpAgentKeepAlive, true); + assert.equal(config.noPatchModules, "azuresdk"); + assert.equal(config.disableStatsbeat, true); + }); + + it("Should take configurations from JSON config file over environment variables if both are configured", () => { + const env = <{ [id: string]: string }>{}; + const customConfigJSONPath = path.resolve(__dirname, "../../../Tests/Library/config.json"); + env["APPLICATIONINSIGHTS_CONFIGURATION_FILE"] = customConfigJSONPath; + env["APPLICATIONINSIGHTS_CONNECTION_STRING"] = "TestConnectionString"; + env["APPLICATION_INSIGHTS_DISABLE_EXTENDED_METRIC"] = "gc"; + env["APPLICATION_INSIGHTS_NO_PATCH_MODULES"] = "azuresdk"; + env["APPLICATION_INSIGHTS_DISABLE_ALL_EXTENDED_METRICS"] = "true"; + env["APPLICATION_INSIGHTS_NO_DIAGNOSTIC_CHANNEL"] = "true"; + env["APPLICATION_INSIGHTS_NO_STATSBEAT"] = "true"; + env["APPLICATION_INSIGHTS_NO_HTTP_AGENT_KEEP_ALIVE"] = "true"; + env["http_proxy"] = "testProxyHttpUrl2"; + env["https_proxy"] = "testProxyHttpsUrl2"; + process.env = env; + const config = JsonConfig.getInstance(); + assert.equal(config.connectionString, "InstrumentationKey=1aa11111-bbbb-1ccc-8ddd-eeeeffff3333;IngestionEndpoint=https://centralus-0.in.applicationinsights.azure.com/"); + assert.equal(config.proxyHttpUrl, "testProxyHttpUrl"); + assert.equal(config.proxyHttpsUrl, "testProxyHttpsUrl"); + assert.equal(config.extendedMetricDisablers, "gc,heap"); + assert.equal(config.disableAllExtendedMetrics, false); + assert.equal(config.noDiagnosticChannel, false); + assert.equal(config.noHttpAgentKeepAlive, false); + assert.equal(config.noPatchModules, "console,redis"); + assert.equal(config.disableStatsbeat, false); + }); + }); +}); diff --git a/Tests/TelemetryProcessors/PreAggregatedMetricsTelemetryProcessor.tests.ts b/Tests/TelemetryProcessors/PreAggregatedMetricsTelemetryProcessor.tests.ts index 2e039c0d..dc75159e 100644 --- a/Tests/TelemetryProcessors/PreAggregatedMetricsTelemetryProcessor.tests.ts +++ b/Tests/TelemetryProcessors/PreAggregatedMetricsTelemetryProcessor.tests.ts @@ -4,11 +4,14 @@ import Client = require("../../Library/TelemetryClient"); import TelemetryProcessor = require("../../TelemetryProcessors/PreAggregatedMetricsTelemetryProcessor"); import AutoCollecPreAggregatedMetrics = require("../../AutoCollection/PreAggregatedMetrics"); import { Contracts } from "../../applicationinsights"; -import { env } from "process"; describe("TelemetryProcessors/PreAggregatedMetricsTelemetryProcessor", () => { - describe("#preAggregatedMetricsTelemetryProcessor()", () => { - var envelope: Contracts.Envelope = { + + let envelope: Contracts.Envelope; + let client: Client; + before(() => { + var ikey = "1aa11111-bbbb-1ccc-8ddd-eeeeffff3333"; + envelope = { ver: 2, name: "name", data: { @@ -20,9 +23,12 @@ describe("TelemetryProcessors/PreAggregatedMetricsTelemetryProcessor", () => { time: "", tags: [] }; - var ikey = "1aa11111-bbbb-1ccc-8ddd-eeeeffff3333"; - var client = new Client(ikey); + client = new Client(ikey); + let preagg = new AutoCollecPreAggregatedMetrics(client); + preagg.enable(true); + }); + describe("#preAggregatedMetricsTelemetryProcessor()", () => { it("Exception telemetry", () => { var pgSpy = sinon.spy(AutoCollecPreAggregatedMetrics, "countException"); var exception = new Contracts.ExceptionData(); diff --git a/Tests/applicationInsights.tests.ts b/Tests/applicationInsights.tests.ts index fa336695..543ac391 100644 --- a/Tests/applicationInsights.tests.ts +++ b/Tests/applicationInsights.tests.ts @@ -4,6 +4,17 @@ import { DistributedTracingModes } from "../applicationinsights"; describe("ApplicationInsights", () => { + var sandbox: sinon.SinonSandbox; + + before(() => { + sandbox = sinon.sandbox.create(); + }); + + afterEach(() => { + sandbox.restore(); + }); + + describe("#setup()", () => { var AppInsights = require("../applicationinsights"); var Console = require("../AutoCollection/Console"); @@ -20,24 +31,22 @@ describe("ApplicationInsights", () => { }); it("should not warn if setup is called once", () => { - var warnStub = sinon.stub(console, "warn"); + var warnStub = sandbox.stub(console, "warn"); AppInsights.defaultClient = undefined; AppInsights.setup("1aa11111-bbbb-1ccc-8ddd-eeeeffff3333"); assert.ok(warnStub.notCalled, "warning was not raised"); - warnStub.restore(); }); it("should warn if setup is called twice", () => { - var warnStub = sinon.stub(console, "warn"); + var warnStub = sandbox.stub(console, "warn"); AppInsights.defaultClient = undefined; AppInsights.setup("1aa11111-bbbb-1ccc-8ddd-eeeeffff3333"); AppInsights.setup("1aa11111-bbbb-1ccc-8ddd-eeeeffff3333"); assert.ok(warnStub.calledOn, "warning was raised"); - warnStub.restore(); }); it("should not overwrite default client if called more than once", () => { - var warnStub = sinon.stub(console, "warn"); + var warnStub = sandbox.stub(console, "warn"); AppInsights.defaultClient = undefined; AppInsights.setup("1aa11111-bbbb-1ccc-8ddd-eeeeffff3333"); var client = AppInsights.defaultClient; @@ -45,7 +54,6 @@ describe("ApplicationInsights", () => { AppInsights.setup("1aa11111-bbbb-1ccc-8ddd-eeeeffff3333"); AppInsights.setup("1aa11111-bbbb-1ccc-8ddd-eeeeffff3333"); assert.ok(client === AppInsights.defaultClient, "client is not overwritten"); - warnStub.restore(); }); }); @@ -68,17 +76,15 @@ describe("ApplicationInsights", () => { afterEach(() => AppInsights.defaultClient = undefined); it("should warn if start is called before setup", () => { - var warnStub = sinon.stub(console, "warn"); + var warnStub = sandbox.stub(console, "warn"); AppInsights.start(); assert.ok(warnStub.calledOn, "warning was raised"); - warnStub.restore(); }); it("should not warn if start is called after setup", () => { - var warnStub = sinon.stub(console, "warn"); + var warnStub = sandbox.stub(console, "warn"); AppInsights.setup("1aa11111-bbbb-1ccc-8ddd-eeeeffff3333").start(); assert.ok(warnStub.notCalled, "warning was not raised"); - warnStub.restore(); }); it("should not start live metrics", () => { @@ -139,15 +145,12 @@ describe("ApplicationInsights", () => { it("auto-collection is initialized by default", () => { AppInsights.setup("1aa11111-bbbb-1ccc-8ddd-eeeeffff3333").start(); - //assert.ok(Console.INSTANCE.isInitialized()); - setTimeout(() => { - assert.ok(Exceptions.INSTANCE.isInitialized()); - assert.ok(Performance.INSTANCE.isInitialized()); - assert.ok(HttpRequests.INSTANCE.isInitialized()); - assert.ok(HttpRequests.INSTANCE.isAutoCorrelating()); - assert.ok(HttpDependencies.INSTANCE.isInitialized()); - }, 5000); + assert.ok(Exceptions.INSTANCE.isInitialized()); + assert.ok(Performance.INSTANCE.isInitialized()); + assert.ok(HttpRequests.INSTANCE.isInitialized()); + assert.ok(HttpRequests.INSTANCE.isAutoCorrelating()); + assert.ok(HttpDependencies.INSTANCE.isInitialized()); }); it("auto-collection is not initialized if disabled before 'start'", () => { @@ -198,16 +201,16 @@ describe("ApplicationInsights", () => { it("should provide a context if correlating", () => { AppInsights.setup("1aa11111-bbbb-1ccc-8ddd-eeeeffff3333") - .setAutoDependencyCorrelation(true) - .start(); + .setAutoDependencyCorrelation(true) + .start(); assert.equal(AppInsights.getCorrelationContext(), 'context'); }); it("should provide a cls-hooked context if force flag set to true", () => { if (CCM.canUseClsHooked()) { AppInsights.setup("1aa11111-bbbb-1ccc-8ddd-eeeeffff3333") - .setAutoDependencyCorrelation(true, true) - .start(); + .setAutoDependencyCorrelation(true, true) + .start(); assert.equal(AppInsights.getCorrelationContext(), 'context'); if (CCM.isNodeVersionCompatible()) { assert.equal(CCM.cls, require('cls-hooked')); @@ -217,8 +220,8 @@ describe("ApplicationInsights", () => { it("should provide a continuation-local-storage context if force flag set to false", () => { AppInsights.setup("1aa11111-bbbb-1ccc-8ddd-eeeeffff3333") - .setAutoDependencyCorrelation(true, false) - .start(); + .setAutoDependencyCorrelation(true, false) + .start(); assert.equal(AppInsights.getCorrelationContext(), 'context'); if (CCM.isNodeVersionCompatible()) { assert.equal(CCM.cls, require('continuation-local-storage')); @@ -227,8 +230,8 @@ describe("ApplicationInsights", () => { it("should not provide a context if not correlating", () => { AppInsights.setup("1aa11111-bbbb-1ccc-8ddd-eeeeffff3333") - .setAutoDependencyCorrelation(false) - .start(); + .setAutoDependencyCorrelation(false) + .start(); assert.equal(AppInsights.getCorrelationContext(), null); }); }); diff --git a/applicationinsights.json b/applicationinsights.json new file mode 100644 index 00000000..fae97503 --- /dev/null +++ b/applicationinsights.json @@ -0,0 +1,4 @@ +{ + +} + \ No newline at end of file diff --git a/applicationinsights.ts b/applicationinsights.ts index 5a933c80..43155d1e 100644 --- a/applicationinsights.ts +++ b/applicationinsights.ts @@ -11,7 +11,6 @@ import Logging = require("./Library/Logging"); import QuickPulseClient = require("./Library/QuickPulseStateManager"); import { IncomingMessage } from "http"; import { SpanContext } from "@opentelemetry/api"; - import { AutoCollectNativePerformance, IDisabledExtendedMetrics } from "./AutoCollection/NativePerformance"; // We export these imports so that SDK users may use these classes directly. @@ -19,7 +18,7 @@ import { AutoCollectNativePerformance, IDisabledExtendedMetrics } from "./AutoCo export import TelemetryClient = require("./Library/NodeClient"); export import Contracts = require("./Declarations/Contracts"); export import azureFunctionsTypes = require("./Library/Functions"); -import { JsonConfig } from "./Library/JsonConfig"; + export enum DistributedTracingModes { /** @@ -133,15 +132,12 @@ export function setup(setupString?: string) { */ export function start() { if (!!defaultClient) { - if (!_isStarted) { - _initializeConfig(); - } _isStarted = true; _console.enable(_isConsole, _isConsoleLog); _exceptions.enable(_isExceptions); _performance.enable(_isPerformance); _preAggregatedMetrics.enable(_isPreAggregatedMetrics); - _heartbeat.enable(_isHeartBeat, defaultClient.config); + _heartbeat.enable(_isHeartBeat); _nativePerformance.enable(_isNativePerformance, _disabledExtendedMetrics); _serverRequests.useAutoCorrelation(_isCorrelating, _forceClsHooked); _serverRequests.enable(_isRequests); @@ -167,37 +163,9 @@ function _initializeConfig() { _isDependencies = defaultClient.config.enableAutoDependencyCorrelation !== undefined ? defaultClient.config.enableAutoDependencyCorrelation : _isDependencies; _isCorrelating = defaultClient.config.enableAutoDependencyCorrelation !== undefined ? defaultClient.config.enableAutoDependencyCorrelation : _isCorrelating; _forceClsHooked = defaultClient.config.enableUseAsyncHooks !== undefined ? defaultClient.config.enableUseAsyncHooks : _forceClsHooked; - _isNativePerformance = defaultClient.config.enableNativePerformance !== undefined ? defaultClient.config.enableNativePerformance : _isNativePerformance; - _disabledExtendedMetrics = defaultClient.config.disabledExtendedMetrics !== undefined ? defaultClient.config.disabledExtendedMetrics : _disabledExtendedMetrics; -} - -export function setRetry(setUseDiskRetryCaching: boolean, setResendInterval: number, setMaxBytesOnDisk: number) { - _isDiskRetry = setUseDiskRetryCaching; - _diskRetryInterval = setResendInterval; - _diskRetryMaxBytes = setMaxBytesOnDisk; - if (defaultClient && defaultClient.channel) { - defaultClient.channel.setUseDiskRetryCaching(_isDiskRetry, _diskRetryInterval, _diskRetryMaxBytes); - } -} - -export function setLiveMetricsFlag(setSendLiveMetrics: boolean) { - if (!defaultClient) { - // Need a defaultClient so that we can add the QPS telemetry processor to it - Logging.warn("Live metrics client cannot be setup without the default client"); - return Configuration; - } - - if (!liveMetricsClient && setSendLiveMetrics) { - // No qps client exists. Create one and prepare it to be enabled at .start() - liveMetricsClient = new QuickPulseClient(defaultClient.config, defaultClient.context, defaultClient.getAuthorizationHandler); - _performanceLiveMetrics = new AutoCollectPerformance(liveMetricsClient as any, 1000, true); - liveMetricsClient.addCollector(_performanceLiveMetrics); - defaultClient.quickPulseClient = liveMetricsClient; // Need this so we can forward all manual tracks to live metrics via PerformanceMetricsTelemetryProcessor - } else if (liveMetricsClient) { - // qps client already exists; enable/disable it - liveMetricsClient.enable(setSendLiveMetrics); - } - _isSendingLiveMetrics = setSendLiveMetrics; + const extendedMetricsConfig = AutoCollectNativePerformance.parseEnabled(defaultClient.config.enableAutoCollectExtendedMetrics, defaultClient.config); + _isNativePerformance = extendedMetricsConfig.isEnabled; + _disabledExtendedMetrics = extendedMetricsConfig.disabledMetrics; } /** @@ -300,7 +268,7 @@ export class Configuration { */ public static setAutoCollectPerformance(value: boolean, collectExtendedMetrics: boolean | IDisabledExtendedMetrics = true) { _isPerformance = value; - const extendedMetricsConfig = AutoCollectNativePerformance.parseEnabled(collectExtendedMetrics, JsonConfig.getJsonConfig()); + const extendedMetricsConfig = AutoCollectNativePerformance.parseEnabled(collectExtendedMetrics, defaultClient.config); _isNativePerformance = extendedMetricsConfig.isEnabled; _disabledExtendedMetrics = extendedMetricsConfig.disabledMetrics; if (_isStarted) { @@ -333,7 +301,7 @@ export class Configuration { public static setAutoCollectHeartbeat(value: boolean) { _isHeartBeat = value; if (_isStarted) { - _heartbeat.enable(value, defaultClient.config); + _heartbeat.enable(value); } return Configuration; @@ -394,7 +362,12 @@ export class Configuration { * @returns {Configuration} this class */ public static setUseDiskRetryCaching(value: boolean, resendInterval?: number, maxBytesOnDisk?: number) { - setRetry(value, resendInterval, maxBytesOnDisk); + _isDiskRetry = value; + _diskRetryInterval = resendInterval; + _diskRetryMaxBytes = maxBytesOnDisk; + if (defaultClient && defaultClient.channel) { + defaultClient.channel.setUseDiskRetryCaching(_isDiskRetry, _diskRetryInterval, _diskRetryMaxBytes); + } return Configuration; } @@ -415,7 +388,23 @@ export class Configuration { * @param enable if true, enables communication with the live metrics service */ public static setSendLiveMetrics(enable = false) { - setLiveMetricsFlag(enable); + if (!defaultClient) { + // Need a defaultClient so that we can add the QPS telemetry processor to it + Logging.warn("Live metrics client cannot be setup without the default client"); + return Configuration; + } + + if (!liveMetricsClient && enable) { + // No qps client exists. Create one and prepare it to be enabled at .start() + liveMetricsClient = new QuickPulseClient(defaultClient.config, defaultClient.context, defaultClient.getAuthorizationHandler); + _performanceLiveMetrics = new AutoCollectPerformance(liveMetricsClient as any, 1000, true); + liveMetricsClient.addCollector(_performanceLiveMetrics); + defaultClient.quickPulseClient = liveMetricsClient; // Need this so we can forward all manual tracks to live metrics via PerformanceMetricsTelemetryProcessor + } else if (liveMetricsClient) { + // qps client already exists; enable/disable it + liveMetricsClient.enable(enable); + } + _isSendingLiveMetrics = enable; return Configuration; } } @@ -456,4 +445,4 @@ export function dispose() { _isSendingLiveMetrics = false; liveMetricsClient = undefined; } -} +} \ No newline at end of file diff --git a/package-lock.json b/package-lock.json index 5a6b5282..c7648538 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,2678 +1,8 @@ { "name": "applicationinsights", "version": "2.1.9", - "lockfileVersion": 2, + "lockfileVersion": 1, "requires": true, - "packages": { - "": { - "name": "applicationinsights", - "version": "2.1.9", - "license": "MIT", - "dependencies": { - "@azure/core-http": "^2.2.2", - "@azure/logger": "^1.0.1", - "@opentelemetry/api": "^1.0.3", - "@opentelemetry/core": "^0.23.0", - "@opentelemetry/semantic-conventions": "^0.24.0", - "@opentelemetry/tracing": "^0.23.0", - "cls-hooked": "^4.2.2", - "continuation-local-storage": "^3.2.1", - "diagnostic-channel": "1.0.0", - "diagnostic-channel-publishers": "1.0.3" - }, - "devDependencies": { - "@types/cls-hooked": "^4.3.3", - "@types/mocha": "^7.0.2", - "@types/node": "^8.0.0", - "@types/sinon": "2.1.2", - "applicationinsights-native-metrics": "0.0.6", - "mocha": "^7.1.1", - "nock": "^11.9.1", - "node-mocks-http": "1.2.3", - "sinon": "1.17.6", - "typescript": "4.1.2" - }, - "engines": { - "node": ">=8.0.0" - }, - "peerDependencies": { - "applicationinsights-native-metrics": "*" - }, - "peerDependenciesMeta": { - "applicationinsights-native-metrics": { - "optional": true - } - } - }, - "node_modules/@azure/abort-controller": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/@azure/abort-controller/-/abort-controller-1.0.4.tgz", - "integrity": "sha512-lNUmDRVGpanCsiUN3NWxFTdwmdFI53xwhkTFfHDGTYk46ca7Ind3nanJc+U6Zj9Tv+9nTCWRBscWEW1DyKOpTw==", - "dependencies": { - "tslib": "^2.0.0" - }, - "engines": { - "node": ">=8.0.0" - } - }, - "node_modules/@azure/core-asynciterator-polyfill": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/@azure/core-asynciterator-polyfill/-/core-asynciterator-polyfill-1.0.0.tgz", - "integrity": "sha512-kmv8CGrPfN9SwMwrkiBK9VTQYxdFQEGe0BmQk+M8io56P9KNzpAxcWE/1fxJj7uouwN4kXF0BHW8DNlgx+wtCg==" - }, - "node_modules/@azure/core-auth": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/@azure/core-auth/-/core-auth-1.3.2.tgz", - "integrity": "sha512-7CU6DmCHIZp5ZPiZ9r3J17lTKMmYsm/zGvNkjArQwPkrLlZ1TZ+EUYfGgh2X31OLMVAQCTJZW4cXHJi02EbJnA==", - "dependencies": { - "@azure/abort-controller": "^1.0.0", - "tslib": "^2.2.0" - }, - "engines": { - "node": ">=12.0.0" - } - }, - "node_modules/@azure/core-http": { - "version": "2.2.2", - "resolved": "https://registry.npmjs.org/@azure/core-http/-/core-http-2.2.2.tgz", - "integrity": "sha512-V1DdoO9V/sFimKpdWoNBgsE+QUjQgpXYnxrTdUp5RyhsTJjvEVn/HKmTQXIHuLUUo6IyIWj+B+Dg4VaXse9dIA==", - "dependencies": { - "@azure/abort-controller": "^1.0.0", - "@azure/core-asynciterator-polyfill": "^1.0.0", - "@azure/core-auth": "^1.3.0", - "@azure/core-tracing": "1.0.0-preview.13", - "@azure/logger": "^1.0.0", - "@types/node-fetch": "^2.5.0", - "@types/tunnel": "^0.0.3", - "form-data": "^4.0.0", - "node-fetch": "^2.6.0", - "process": "^0.11.10", - "tough-cookie": "^4.0.0", - "tslib": "^2.2.0", - "tunnel": "^0.0.6", - "uuid": "^8.3.0", - "xml2js": "^0.4.19" - }, - "engines": { - "node": ">=12.0.0" - } - }, - "node_modules/@azure/core-tracing": { - "version": "1.0.0-preview.13", - "resolved": "https://registry.npmjs.org/@azure/core-tracing/-/core-tracing-1.0.0-preview.13.tgz", - "integrity": "sha512-KxDlhXyMlh2Jhj2ykX6vNEU0Vou4nHr025KoSEiz7cS3BNiHNaZcdECk/DmLkEB0as5T7b/TpRcehJ5yV6NeXQ==", - "dependencies": { - "@opentelemetry/api": "^1.0.1", - "tslib": "^2.2.0" - }, - "engines": { - "node": ">=12.0.0" - } - }, - "node_modules/@azure/logger": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/@azure/logger/-/logger-1.0.3.tgz", - "integrity": "sha512-aK4s3Xxjrx3daZr3VylxejK3vG5ExXck5WOHDJ8in/k9AqlfIyFMMT1uG7u8mNjX+QRILTIn0/Xgschfh/dQ9g==", - "dependencies": { - "tslib": "^2.2.0" - }, - "engines": { - "node": ">=12.0.0" - } - }, - "node_modules/@mapbox/node-pre-gyp": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/@mapbox/node-pre-gyp/-/node-pre-gyp-1.0.7.tgz", - "integrity": "sha512-PplSvl4pJ5N3BkVjAdDzpPhVUPdC73JgttkR+LnBx2OORC1GCQsBjUeEuipf9uOaAM1SbxcdZFfR3KDTKm2S0A==", - "dev": true, - "dependencies": { - "detect-libc": "^1.0.3", - "https-proxy-agent": "^5.0.0", - "make-dir": "^3.1.0", - "node-fetch": "^2.6.5", - "nopt": "^5.0.0", - "npmlog": "^6.0.0", - "rimraf": "^3.0.2", - "semver": "^7.3.5", - "tar": "^6.1.11" - }, - "bin": { - "node-pre-gyp": "bin/node-pre-gyp" - } - }, - "node_modules/@opentelemetry/api": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/@opentelemetry/api/-/api-1.0.3.tgz", - "integrity": "sha512-puWxACExDe9nxbBB3lOymQFrLYml2dVOrd7USiVRnSbgXE+KwBu+HxFvxrzfqsiSda9IWsXJG1ef7C1O2/GmKQ==", - "engines": { - "node": ">=8.0.0" - } - }, - "node_modules/@opentelemetry/core": { - "version": "0.23.0", - "resolved": "https://registry.npmjs.org/@opentelemetry/core/-/core-0.23.0.tgz", - "integrity": "sha512-7COVsnGEW96ITjc0waWYo/R27sFqjPUg4SCoP8XL48zAGr9zjzeuJoQe/xVchs7op//qOeeEEeBxiBvXy2QS0Q==", - "dependencies": { - "@opentelemetry/semantic-conventions": "0.23.0", - "semver": "^7.1.3" - }, - "engines": { - "node": ">=8.5.0" - }, - "peerDependencies": { - "@opentelemetry/api": "^1.0.1" - } - }, - "node_modules/@opentelemetry/core/node_modules/@opentelemetry/semantic-conventions": { - "version": "0.23.0", - "resolved": "https://registry.npmjs.org/@opentelemetry/semantic-conventions/-/semantic-conventions-0.23.0.tgz", - "integrity": "sha512-Tzo+VGR1zlzLbjVI+7mlDJ2xuaUsue4scWvFlK+fzcUfn9siF4NWbxoC2X6Br2B/g4dsq1OAwAYsPVYIEoY2rQ==", - "engines": { - "node": ">=8.0.0" - } - }, - "node_modules/@opentelemetry/resources": { - "version": "0.23.0", - "resolved": "https://registry.npmjs.org/@opentelemetry/resources/-/resources-0.23.0.tgz", - "integrity": "sha512-sAiaoQ0pOwjaaKySuwCUlvej/W9M5d+SxpcuBFUBUojqRlEAYDbx1FHClPnKtOysIb9rXJDQvM3xlH++7NQQzg==", - "dependencies": { - "@opentelemetry/core": "0.23.0", - "@opentelemetry/semantic-conventions": "0.23.0" - }, - "engines": { - "node": ">=8.0.0" - }, - "peerDependencies": { - "@opentelemetry/api": "^1.0.1" - } - }, - "node_modules/@opentelemetry/resources/node_modules/@opentelemetry/semantic-conventions": { - "version": "0.23.0", - "resolved": "https://registry.npmjs.org/@opentelemetry/semantic-conventions/-/semantic-conventions-0.23.0.tgz", - "integrity": "sha512-Tzo+VGR1zlzLbjVI+7mlDJ2xuaUsue4scWvFlK+fzcUfn9siF4NWbxoC2X6Br2B/g4dsq1OAwAYsPVYIEoY2rQ==", - "engines": { - "node": ">=8.0.0" - } - }, - "node_modules/@opentelemetry/semantic-conventions": { - "version": "0.24.0", - "resolved": "https://registry.npmjs.org/@opentelemetry/semantic-conventions/-/semantic-conventions-0.24.0.tgz", - "integrity": "sha512-a/szuMQV0Quy0/M7kKdglcbRSoorleyyOwbTNNJ32O+RBN766wbQlMTvdimImTmwYWGr+NJOni1EcC242WlRcA==", - "engines": { - "node": ">=8.0.0" - } - }, - "node_modules/@opentelemetry/tracing": { - "version": "0.23.0", - "resolved": "https://registry.npmjs.org/@opentelemetry/tracing/-/tracing-0.23.0.tgz", - "integrity": "sha512-3vNLS55bE0CG1RBDz7+wAAKpLjbl8fhQKqM4MvTy/LYHSolgyM5BNutSb/TcA9LtWvkdI0djgFXxeRig1OFqoQ==", - "deprecated": "Package renamed to @opentelemetry/sdk-trace-base", - "dependencies": { - "@opentelemetry/core": "0.23.0", - "@opentelemetry/resources": "0.23.0", - "@opentelemetry/semantic-conventions": "0.23.0", - "lodash.merge": "^4.6.2" - }, - "engines": { - "node": ">=8.0.0" - }, - "peerDependencies": { - "@opentelemetry/api": "^1.0.1" - } - }, - "node_modules/@opentelemetry/tracing/node_modules/@opentelemetry/semantic-conventions": { - "version": "0.23.0", - "resolved": "https://registry.npmjs.org/@opentelemetry/semantic-conventions/-/semantic-conventions-0.23.0.tgz", - "integrity": "sha512-Tzo+VGR1zlzLbjVI+7mlDJ2xuaUsue4scWvFlK+fzcUfn9siF4NWbxoC2X6Br2B/g4dsq1OAwAYsPVYIEoY2rQ==", - "engines": { - "node": ">=8.0.0" - } - }, - "node_modules/@types/cls-hooked": { - "version": "4.3.3", - "resolved": "https://registry.npmjs.org/@types/cls-hooked/-/cls-hooked-4.3.3.tgz", - "integrity": "sha512-gNstDTb/ty5h6gJd6YpSPgsLX9LmRpaKJqGFp7MRlYxhwp4vXXKlJ9+bt1TZ9KbVNXE+Mbxy2AYXcpY21DDtJw==", - "dev": true, - "dependencies": { - "@types/node": "*" - } - }, - "node_modules/@types/mocha": { - "version": "7.0.2", - "resolved": "https://registry.npmjs.org/@types/mocha/-/mocha-7.0.2.tgz", - "integrity": "sha512-ZvO2tAcjmMi8V/5Z3JsyofMe3hasRcaw88cto5etSVMwVQfeivGAlEYmaQgceUSVYFofVjT+ioHsATjdWcFt1w==", - "dev": true - }, - "node_modules/@types/node": { - "version": "8.10.66", - "resolved": "https://registry.npmjs.org/@types/node/-/node-8.10.66.tgz", - "integrity": "sha512-tktOkFUA4kXx2hhhrB8bIFb5TbwzS4uOhKEmwiD+NoiL0qtP2OQ9mFldbgD4dV1djrlBYP6eBuQZiWjuHUpqFw==" - }, - "node_modules/@types/node-fetch": { - "version": "2.5.12", - "resolved": "https://registry.npmjs.org/@types/node-fetch/-/node-fetch-2.5.12.tgz", - "integrity": "sha512-MKgC4dlq4kKNa/mYrwpKfzQMB5X3ee5U6fSprkKpToBqBmX4nFZL9cW5jl6sWn+xpRJ7ypWh2yyqqr8UUCstSw==", - "dependencies": { - "@types/node": "*", - "form-data": "^3.0.0" - } - }, - "node_modules/@types/node-fetch/node_modules/form-data": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/form-data/-/form-data-3.0.1.tgz", - "integrity": "sha512-RHkBKtLWUVwd7SqRIvCZMEvAMoGUp0XU+seQiZejj0COz3RI3hWP4sCv3gZWWLjJTd7rGwcsF5eKZGii0r/hbg==", - "dependencies": { - "asynckit": "^0.4.0", - "combined-stream": "^1.0.8", - "mime-types": "^2.1.12" - }, - "engines": { - "node": ">= 6" - } - }, - "node_modules/@types/sinon": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/@types/sinon/-/sinon-2.1.2.tgz", - "integrity": "sha1-iNu9KZEMT9G1+9PHM6cj8nfqtYM=", - "dev": true - }, - "node_modules/@types/tunnel": { - "version": "0.0.3", - "resolved": "https://registry.npmjs.org/@types/tunnel/-/tunnel-0.0.3.tgz", - "integrity": "sha512-sOUTGn6h1SfQ+gbgqC364jLFBw2lnFqkgF3q0WovEHRLMrVD1sd5aufqi/aJObLekJO+Aq5z646U4Oxy6shXMA==", - "dependencies": { - "@types/node": "*" - } - }, - "node_modules/abbrev": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.1.1.tgz", - "integrity": "sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q==", - "dev": true - }, - "node_modules/agent-base": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-6.0.2.tgz", - "integrity": "sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ==", - "dev": true, - "dependencies": { - "debug": "4" - }, - "engines": { - "node": ">= 6.0.0" - } - }, - "node_modules/ansi-colors": { - "version": "3.2.3", - "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-3.2.3.tgz", - "integrity": "sha512-LEHHyuhlPY3TmuUYMh2oz89lTShfvgbmzaBcxve9t/9Wuy7Dwf4yoAKcND7KFT1HAQfqZ12qtc+DUrBMeKF9nw==", - "dev": true, - "engines": { - "node": ">=6" - } - }, - "node_modules/ansi-regex": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", - "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/ansi-styles": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", - "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", - "dev": true, - "dependencies": { - "color-convert": "^1.9.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/anymatch": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.2.tgz", - "integrity": "sha512-P43ePfOAIupkguHUycrc4qJ9kz8ZiuOUijaETwX7THt0Y/GNK7v0aa8rY816xWjZ7rJdA5XdMcpVFTKMq+RvWg==", - "dev": true, - "dependencies": { - "normalize-path": "^3.0.0", - "picomatch": "^2.0.4" - }, - "engines": { - "node": ">= 8" - } - }, - "node_modules/applicationinsights-native-metrics": { - "version": "0.0.6", - "resolved": "https://registry.npmjs.org/applicationinsights-native-metrics/-/applicationinsights-native-metrics-0.0.6.tgz", - "integrity": "sha512-5Z9l9PW9WTNkR9yLQt/sZT98XNN1DCAFSy3OKoXH4lXADcYTwh7YATM/VEnWzTE7tMyiyUsGFAXEl24AyFROww==", - "dev": true, - "hasInstallScript": true, - "dependencies": { - "@mapbox/node-pre-gyp": "^1.0.0", - "nan": "^2.14.0" - }, - "engines": { - "node": ">=6.0.0", - "npm": ">=3.8.6" - } - }, - "node_modules/aproba": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/aproba/-/aproba-2.0.0.tgz", - "integrity": "sha512-lYe4Gx7QT+MKGbDsA+Z+he/Wtef0BiwDOlK/XkBrdfsh9J/jPPXbX0tE9x9cl27Tmu5gg3QUbUrQYa/y+KOHPQ==", - "dev": true - }, - "node_modules/are-we-there-yet": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/are-we-there-yet/-/are-we-there-yet-2.0.0.tgz", - "integrity": "sha512-Ci/qENmwHnsYo9xKIcUJN5LeDKdJ6R1Z1j9V/J5wyq8nh/mYPEpIKJbBZXtZjG04HiK7zV/p6Vs9952MrMeUIw==", - "dev": true, - "dependencies": { - "delegates": "^1.0.0", - "readable-stream": "^3.6.0" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/argparse": { - "version": "1.0.10", - "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", - "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", - "dev": true, - "dependencies": { - "sprintf-js": "~1.0.2" - } - }, - "node_modules/async-hook-jl": { - "version": "1.7.6", - "resolved": "https://registry.npmjs.org/async-hook-jl/-/async-hook-jl-1.7.6.tgz", - "integrity": "sha512-gFaHkFfSxTjvoxDMYqDuGHlcRyUuamF8s+ZTtJdDzqjws4mCt7v0vuV79/E2Wr2/riMQgtG4/yUtXWs1gZ7JMg==", - "dependencies": { - "stack-chain": "^1.3.7" - }, - "engines": { - "node": "^4.7 || >=6.9 || >=7.3" - } - }, - "node_modules/async-listener": { - "version": "0.6.10", - "resolved": "https://registry.npmjs.org/async-listener/-/async-listener-0.6.10.tgz", - "integrity": "sha512-gpuo6xOyF4D5DE5WvyqZdPA3NGhiT6Qf07l7DCB0wwDEsLvDIbCr6j9S5aj5Ch96dLace5tXVzWBZkxU/c5ohw==", - "dependencies": { - "semver": "^5.3.0", - "shimmer": "^1.1.0" - }, - "engines": { - "node": "<=0.11.8 || >0.11.10" - } - }, - "node_modules/async-listener/node_modules/semver": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", - "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", - "bin": { - "semver": "bin/semver" - } - }, - "node_modules/asynckit": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", - "integrity": "sha1-x57Zf380y48robyXkLzDZkdLS3k=" - }, - "node_modules/available-typed-arrays": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/available-typed-arrays/-/available-typed-arrays-1.0.5.tgz", - "integrity": "sha512-DMD0KiN46eipeziST1LPP/STfDU0sufISXmjSgvVsoU2tqxctQeASejWcfNtxYKqETM1UxQ8sp2OrSBWpHY6sw==", - "dev": true, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/balanced-match": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", - "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", - "dev": true - }, - "node_modules/binary-extensions": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.2.0.tgz", - "integrity": "sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/brace-expansion": { - "version": "1.1.11", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", - "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", - "dev": true, - "dependencies": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" - } - }, - "node_modules/braces": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", - "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", - "dev": true, - "dependencies": { - "fill-range": "^7.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/browser-stdout": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/browser-stdout/-/browser-stdout-1.3.1.tgz", - "integrity": "sha512-qhAVI1+Av2X7qelOfAIYwXONood6XlZE/fXaBSmW/T5SzLAmCgzi+eiWE7fUvbHaeNBQH13UftjpXxsfLkMpgw==", - "dev": true - }, - "node_modules/call-bind": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.2.tgz", - "integrity": "sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA==", - "dev": true, - "dependencies": { - "function-bind": "^1.1.1", - "get-intrinsic": "^1.0.2" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/camelcase": { - "version": "5.3.1", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz", - "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==", - "dev": true, - "engines": { - "node": ">=6" - } - }, - "node_modules/chalk": { - "version": "2.4.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", - "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", - "dev": true, - "dependencies": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/chalk/node_modules/supports-color": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", - "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", - "dev": true, - "dependencies": { - "has-flag": "^3.0.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/chokidar": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.3.0.tgz", - "integrity": "sha512-dGmKLDdT3Gdl7fBUe8XK+gAtGmzy5Fn0XkkWQuYxGIgWVPPse2CxFA5mtrlD0TOHaHjEUqkWNyP1XdHoJES/4A==", - "dev": true, - "dependencies": { - "anymatch": "~3.1.1", - "braces": "~3.0.2", - "glob-parent": "~5.1.0", - "is-binary-path": "~2.1.0", - "is-glob": "~4.0.1", - "normalize-path": "~3.0.0", - "readdirp": "~3.2.0" - }, - "engines": { - "node": ">= 8.10.0" - }, - "optionalDependencies": { - "fsevents": "~2.1.1" - } - }, - "node_modules/chownr": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/chownr/-/chownr-2.0.0.tgz", - "integrity": "sha512-bIomtDF5KGpdogkLd9VspvFzk9KfpyyGlS8YFVZl7TGPBHL5snIOnxeshwVgPteQ9b4Eydl+pVbIyE1DcvCWgQ==", - "dev": true, - "engines": { - "node": ">=10" - } - }, - "node_modules/cliui": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/cliui/-/cliui-5.0.0.tgz", - "integrity": "sha512-PYeGSEmmHM6zvoef2w8TPzlrnNpXIjTipYK780YswmIP9vjxmd6Y2a3CB2Ks6/AU8NHjZugXvo8w3oWM2qnwXA==", - "dev": true, - "dependencies": { - "string-width": "^3.1.0", - "strip-ansi": "^5.2.0", - "wrap-ansi": "^5.1.0" - } - }, - "node_modules/cliui/node_modules/ansi-regex": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz", - "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==", - "dev": true, - "engines": { - "node": ">=6" - } - }, - "node_modules/cliui/node_modules/emoji-regex": { - "version": "7.0.3", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-7.0.3.tgz", - "integrity": "sha512-CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA==", - "dev": true - }, - "node_modules/cliui/node_modules/is-fullwidth-code-point": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", - "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=", - "dev": true, - "engines": { - "node": ">=4" - } - }, - "node_modules/cliui/node_modules/string-width": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz", - "integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==", - "dev": true, - "dependencies": { - "emoji-regex": "^7.0.1", - "is-fullwidth-code-point": "^2.0.0", - "strip-ansi": "^5.1.0" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/cliui/node_modules/strip-ansi": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", - "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", - "dev": true, - "dependencies": { - "ansi-regex": "^4.1.0" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/cls-hooked": { - "version": "4.2.2", - "resolved": "https://registry.npmjs.org/cls-hooked/-/cls-hooked-4.2.2.tgz", - "integrity": "sha512-J4Xj5f5wq/4jAvcdgoGsL3G103BtWpZrMo8NEinRltN+xpTZdI+M38pyQqhuFU/P792xkMFvnKSf+Lm81U1bxw==", - "dependencies": { - "async-hook-jl": "^1.7.6", - "emitter-listener": "^1.0.1", - "semver": "^5.4.1" - }, - "engines": { - "node": "^4.7 || >=6.9 || >=7.3 || >=8.2.1" - } - }, - "node_modules/cls-hooked/node_modules/semver": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", - "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", - "bin": { - "semver": "bin/semver" - } - }, - "node_modules/color-convert": { - "version": "1.9.3", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", - "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", - "dev": true, - "dependencies": { - "color-name": "1.1.3" - } - }, - "node_modules/color-name": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", - "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=", - "dev": true - }, - "node_modules/color-support": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/color-support/-/color-support-1.1.3.tgz", - "integrity": "sha512-qiBjkpbMLO/HL68y+lh4q0/O1MZFj2RX6X/KmMa3+gJD3z+WwI1ZzDHysvqHGS3mP6mznPckpXmw1nI9cJjyRg==", - "dev": true, - "bin": { - "color-support": "bin.js" - } - }, - "node_modules/combined-stream": { - "version": "1.0.8", - "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", - "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==", - "dependencies": { - "delayed-stream": "~1.0.0" - }, - "engines": { - "node": ">= 0.8" - } - }, - "node_modules/concat-map": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", - "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=", - "dev": true - }, - "node_modules/console-control-strings": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/console-control-strings/-/console-control-strings-1.1.0.tgz", - "integrity": "sha1-PXz0Rk22RG6mRL9LOVB/mFEAjo4=", - "dev": true - }, - "node_modules/continuation-local-storage": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/continuation-local-storage/-/continuation-local-storage-3.2.1.tgz", - "integrity": "sha512-jx44cconVqkCEEyLSKWwkvUXwO561jXMa3LPjTPsm5QR22PA0/mhe33FT4Xb5y74JDvt/Cq+5lm8S8rskLv9ZA==", - "dependencies": { - "async-listener": "^0.6.0", - "emitter-listener": "^1.1.1" - } - }, - "node_modules/debug": { - "version": "4.3.2", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.2.tgz", - "integrity": "sha512-mOp8wKcvj7XxC78zLgw/ZA+6TSgkoE2C/ienthhRD298T7UNwAg9diBpLRxC0mOezLl4B0xV7M0cCO6P/O0Xhw==", - "dev": true, - "dependencies": { - "ms": "2.1.2" - }, - "engines": { - "node": ">=6.0" - }, - "peerDependenciesMeta": { - "supports-color": { - "optional": true - } - } - }, - "node_modules/decamelize": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz", - "integrity": "sha1-9lNNFRSCabIDUue+4m9QH5oZEpA=", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/define-properties": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.1.3.tgz", - "integrity": "sha512-3MqfYKj2lLzdMSf8ZIZE/V+Zuy+BgD6f164e8K2w7dgnpKArBDerGYpM46IYYcjnkdPNMjPk9A6VFB8+3SKlXQ==", - "dev": true, - "dependencies": { - "object-keys": "^1.0.12" - }, - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/delayed-stream": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", - "integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk=", - "engines": { - "node": ">=0.4.0" - } - }, - "node_modules/delegates": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/delegates/-/delegates-1.0.0.tgz", - "integrity": "sha1-hMbhWbgZBP3KWaDvRM2HDTElD5o=", - "dev": true - }, - "node_modules/detect-libc": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-1.0.3.tgz", - "integrity": "sha1-+hN8S9aY7fVc1c0CrFWfkaTEups=", - "dev": true, - "bin": { - "detect-libc": "bin/detect-libc.js" - }, - "engines": { - "node": ">=0.10" - } - }, - "node_modules/diagnostic-channel": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/diagnostic-channel/-/diagnostic-channel-1.0.0.tgz", - "integrity": "sha512-v7Clmg5HG9XwIhqgbBRfwFzwZhxjvESZ33uu1cgcCLkdb9ZxgtY78eAgQMEQ39UecQ//4K5W75iq6LFBtAQD8w==", - "dependencies": { - "semver": "^5.3.0" - } - }, - "node_modules/diagnostic-channel-publishers": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/diagnostic-channel-publishers/-/diagnostic-channel-publishers-1.0.3.tgz", - "integrity": "sha512-RJJA1QYDHVJUpV3HYQx0TLFZLlqxRL1H5Z0Z8ywIiEHDunT9UMJKwcnWkKa/I0z3kwozg3PKfaNJP9OkIeqN2Q==", - "peerDependencies": { - "diagnostic-channel": "*" - } - }, - "node_modules/diagnostic-channel/node_modules/semver": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", - "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", - "bin": { - "semver": "bin/semver" - } - }, - "node_modules/diff": { - "version": "3.5.0", - "resolved": "https://registry.npmjs.org/diff/-/diff-3.5.0.tgz", - "integrity": "sha512-A46qtFgd+g7pDZinpnwiRJtxbC1hpgf0uzP3iG89scHk0AUC7A1TGxf5OiiOUv/JMZR8GOt8hL900hV0bOy5xA==", - "dev": true, - "engines": { - "node": ">=0.3.1" - } - }, - "node_modules/emitter-listener": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/emitter-listener/-/emitter-listener-1.1.2.tgz", - "integrity": "sha512-Bt1sBAGFHY9DKY+4/2cV6izcKJUf5T7/gkdmkxzX/qv9CcGH8xSwVRW5mtX03SWJtRTWSOpzCuWN9rBFYZepZQ==", - "dependencies": { - "shimmer": "^1.2.0" - } - }, - "node_modules/emoji-regex": { - "version": "8.0.0", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", - "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", - "dev": true - }, - "node_modules/es-abstract": { - "version": "1.19.1", - "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.19.1.tgz", - "integrity": "sha512-2vJ6tjA/UfqLm2MPs7jxVybLoB8i1t1Jd9R3kISld20sIxPcTbLuggQOUxeWeAvIUkduv/CfMjuh4WmiXr2v9w==", - "dev": true, - "dependencies": { - "call-bind": "^1.0.2", - "es-to-primitive": "^1.2.1", - "function-bind": "^1.1.1", - "get-intrinsic": "^1.1.1", - "get-symbol-description": "^1.0.0", - "has": "^1.0.3", - "has-symbols": "^1.0.2", - "internal-slot": "^1.0.3", - "is-callable": "^1.2.4", - "is-negative-zero": "^2.0.1", - "is-regex": "^1.1.4", - "is-shared-array-buffer": "^1.0.1", - "is-string": "^1.0.7", - "is-weakref": "^1.0.1", - "object-inspect": "^1.11.0", - "object-keys": "^1.1.1", - "object.assign": "^4.1.2", - "string.prototype.trimend": "^1.0.4", - "string.prototype.trimstart": "^1.0.4", - "unbox-primitive": "^1.0.1" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/es-abstract/node_modules/object.assign": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.2.tgz", - "integrity": "sha512-ixT2L5THXsApyiUPYKmW+2EHpXXe5Ii3M+f4e+aJFAHao5amFRW6J0OO6c/LU8Be47utCx2GL89hxGB6XSmKuQ==", - "dev": true, - "dependencies": { - "call-bind": "^1.0.0", - "define-properties": "^1.1.3", - "has-symbols": "^1.0.1", - "object-keys": "^1.1.1" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/es-to-primitive": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/es-to-primitive/-/es-to-primitive-1.2.1.tgz", - "integrity": "sha512-QCOllgZJtaUo9miYBcLChTUaHNjJF3PYs1VidD7AwiEj1kYxKeQTctLAezAOH5ZKRH0g2IgPn6KwB4IT8iRpvA==", - "dev": true, - "dependencies": { - "is-callable": "^1.1.4", - "is-date-object": "^1.0.1", - "is-symbol": "^1.0.2" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/escape-string-regexp": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", - "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=", - "dev": true, - "engines": { - "node": ">=0.8.0" - } - }, - "node_modules/esprima": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", - "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==", - "dev": true, - "bin": { - "esparse": "bin/esparse.js", - "esvalidate": "bin/esvalidate.js" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/fill-range": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", - "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", - "dev": true, - "dependencies": { - "to-regex-range": "^5.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/find-up": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-3.0.0.tgz", - "integrity": "sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg==", - "dev": true, - "dependencies": { - "locate-path": "^3.0.0" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/flat": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/flat/-/flat-4.1.1.tgz", - "integrity": "sha512-FmTtBsHskrU6FJ2VxCnsDb84wu9zhmO3cUX2kGFb5tuwhfXxGciiT0oRY+cck35QmG+NmGh5eLz6lLCpWTqwpA==", - "dev": true, - "dependencies": { - "is-buffer": "~2.0.3" - }, - "bin": { - "flat": "cli.js" - } - }, - "node_modules/foreach": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/foreach/-/foreach-2.0.5.tgz", - "integrity": "sha1-C+4AUBiusmDQo6865ljdATbsG5k=", - "dev": true - }, - "node_modules/form-data": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.0.tgz", - "integrity": "sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww==", - "dependencies": { - "asynckit": "^0.4.0", - "combined-stream": "^1.0.8", - "mime-types": "^2.1.12" - }, - "engines": { - "node": ">= 6" - } - }, - "node_modules/formatio": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/formatio/-/formatio-1.1.1.tgz", - "integrity": "sha1-XtPM1jZVEJc4NGXZlhmRAOhhYek=", - "deprecated": "This package is unmaintained. Use @sinonjs/formatio instead", - "dev": true, - "dependencies": { - "samsam": "~1.1" - } - }, - "node_modules/fs-minipass": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/fs-minipass/-/fs-minipass-2.1.0.tgz", - "integrity": "sha512-V/JgOLFCS+R6Vcq0slCuaeWEdNC3ouDlJMNIsacH2VtALiu9mV4LPrHc5cDl8k5aw6J8jwgWWpiTo5RYhmIzvg==", - "dev": true, - "dependencies": { - "minipass": "^3.0.0" - }, - "engines": { - "node": ">= 8" - } - }, - "node_modules/fs.realpath": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", - "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=", - "dev": true - }, - "node_modules/fsevents": { - "version": "2.1.3", - "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.1.3.tgz", - "integrity": "sha512-Auw9a4AxqWpa9GUfj370BMPzzyncfBABW8Mab7BGWBYDj4Isgq+cDKtx0i6u9jcX9pQDnswsaaOTgTmA5pEjuQ==", - "deprecated": "\"Please update to latest v2.3 or v2.2\"", - "dev": true, - "hasInstallScript": true, - "optional": true, - "os": [ - "darwin" - ], - "engines": { - "node": "^8.16.0 || ^10.6.0 || >=11.0.0" - } - }, - "node_modules/function-bind": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", - "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==", - "dev": true - }, - "node_modules/gauge": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/gauge/-/gauge-4.0.0.tgz", - "integrity": "sha512-F8sU45yQpjQjxKkm1UOAhf0U/O0aFt//Fl7hsrNVto+patMHjs7dPI9mFOGUKbhrgKm0S3EjW3scMFuQmWSROw==", - "dev": true, - "dependencies": { - "ansi-regex": "^5.0.1", - "aproba": "^1.0.3 || ^2.0.0", - "color-support": "^1.1.2", - "console-control-strings": "^1.0.0", - "has-unicode": "^2.0.1", - "signal-exit": "^3.0.0", - "string-width": "^4.2.3", - "strip-ansi": "^6.0.1", - "wide-align": "^1.1.2" - }, - "engines": { - "node": "^12.13.0 || ^14.15.0 || >=16" - } - }, - "node_modules/get-caller-file": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", - "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", - "dev": true, - "engines": { - "node": "6.* || 8.* || >= 10.*" - } - }, - "node_modules/get-intrinsic": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.1.1.tgz", - "integrity": "sha512-kWZrnVM42QCiEA2Ig1bG8zjoIMOgxWwYCEeNdwY6Tv/cOSeGpcoX4pXHfKUxNKVoArnrEr2e9srnAxxGIraS9Q==", - "dev": true, - "dependencies": { - "function-bind": "^1.1.1", - "has": "^1.0.3", - "has-symbols": "^1.0.1" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/get-symbol-description": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/get-symbol-description/-/get-symbol-description-1.0.0.tgz", - "integrity": "sha512-2EmdH1YvIQiZpltCNgkuiUnyukzxM/R6NDJX31Ke3BG1Nq5b0S2PhX59UKi9vZpPDQVdqn+1IcaAwnzTT5vCjw==", - "dev": true, - "dependencies": { - "call-bind": "^1.0.2", - "get-intrinsic": "^1.1.1" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/glob": { - "version": "7.1.3", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.3.tgz", - "integrity": "sha512-vcfuiIxogLV4DlGBHIUOwI0IbrJ8HWPc4MU7HzviGeNho/UJDfi6B5p3sHeWIQ0KGIU0Jpxi5ZHxemQfLkkAwQ==", - "dev": true, - "dependencies": { - "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" - }, - "engines": { - "node": "*" - } - }, - "node_modules/glob-parent": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", - "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", - "dev": true, - "dependencies": { - "is-glob": "^4.0.1" - }, - "engines": { - "node": ">= 6" - } - }, - "node_modules/growl": { - "version": "1.10.5", - "resolved": "https://registry.npmjs.org/growl/-/growl-1.10.5.tgz", - "integrity": "sha512-qBr4OuELkhPenW6goKVXiv47US3clb3/IbuWF9KNKEijAy9oeHxU9IgzjvJhHkUzhaj7rOUD7+YGWqUjLp5oSA==", - "dev": true, - "engines": { - "node": ">=4.x" - } - }, - "node_modules/has": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", - "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", - "dev": true, - "dependencies": { - "function-bind": "^1.1.1" - }, - "engines": { - "node": ">= 0.4.0" - } - }, - "node_modules/has-bigints": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/has-bigints/-/has-bigints-1.0.1.tgz", - "integrity": "sha512-LSBS2LjbNBTf6287JEbEzvJgftkF5qFkmCo9hDRpAzKhUOlJ+hx8dd4USs00SgsUNwc4617J9ki5YtEClM2ffA==", - "dev": true, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/has-flag": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", - "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", - "dev": true, - "engines": { - "node": ">=4" - } - }, - "node_modules/has-symbols": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.2.tgz", - "integrity": "sha512-chXa79rL/UC2KlX17jo3vRGz0azaWEx5tGqZg5pO3NUyEJVB17dMruQlzCCOfUvElghKcm5194+BCRvi2Rv/Gw==", - "dev": true, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/has-tostringtag": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/has-tostringtag/-/has-tostringtag-1.0.0.tgz", - "integrity": "sha512-kFjcSNhnlGV1kyoGk7OXKSawH5JOb/LzUc5w9B02hOTO0dfFRjbHQKvg1d6cf3HbeUmtU9VbbV3qzZ2Teh97WQ==", - "dev": true, - "dependencies": { - "has-symbols": "^1.0.2" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/has-unicode": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/has-unicode/-/has-unicode-2.0.1.tgz", - "integrity": "sha1-4Ob+aijPUROIVeCG0Wkedx3iqLk=", - "dev": true - }, - "node_modules/he": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/he/-/he-1.2.0.tgz", - "integrity": "sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw==", - "dev": true, - "bin": { - "he": "bin/he" - } - }, - "node_modules/https-proxy-agent": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-5.0.0.tgz", - "integrity": "sha512-EkYm5BcKUGiduxzSt3Eppko+PiNWNEpa4ySk9vTC6wDsQJW9rHSa+UhGNJoRYp7bz6Ht1eaRIa6QaJqO5rCFbA==", - "dev": true, - "dependencies": { - "agent-base": "6", - "debug": "4" - }, - "engines": { - "node": ">= 6" - } - }, - "node_modules/inflight": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", - "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", - "dev": true, - "dependencies": { - "once": "^1.3.0", - "wrappy": "1" - } - }, - "node_modules/inherits": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", - "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", - "dev": true - }, - "node_modules/internal-slot": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/internal-slot/-/internal-slot-1.0.3.tgz", - "integrity": "sha512-O0DB1JC/sPyZl7cIo78n5dR7eUSwwpYPiXRhTzNxZVAMUuB8vlnRFyLxdrVToks6XPLVnFfbzaVd5WLjhgg+vA==", - "dev": true, - "dependencies": { - "get-intrinsic": "^1.1.0", - "has": "^1.0.3", - "side-channel": "^1.0.4" - }, - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/is-arguments": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/is-arguments/-/is-arguments-1.1.1.tgz", - "integrity": "sha512-8Q7EARjzEnKpt/PCD7e1cgUS0a6X8u5tdSiMqXhojOdoV9TsMsiO+9VLC5vAmO8N7/GmXn7yjR8qnA6bVAEzfA==", - "dev": true, - "dependencies": { - "call-bind": "^1.0.2", - "has-tostringtag": "^1.0.0" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/is-bigint": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/is-bigint/-/is-bigint-1.0.4.tgz", - "integrity": "sha512-zB9CruMamjym81i2JZ3UMn54PKGsQzsJeo6xvN3HJJ4CAsQNB6iRutp2To77OfCNuoxspsIhzaPoO1zyCEhFOg==", - "dev": true, - "dependencies": { - "has-bigints": "^1.0.1" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/is-binary-path": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz", - "integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==", - "dev": true, - "dependencies": { - "binary-extensions": "^2.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/is-boolean-object": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/is-boolean-object/-/is-boolean-object-1.1.2.tgz", - "integrity": "sha512-gDYaKHJmnj4aWxyj6YHyXVpdQawtVLHU5cb+eztPGczf6cjuTdwve5ZIEfgXqH4e57An1D1AKf8CZ3kYrQRqYA==", - "dev": true, - "dependencies": { - "call-bind": "^1.0.2", - "has-tostringtag": "^1.0.0" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/is-buffer": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-2.0.5.tgz", - "integrity": "sha512-i2R6zNFDwgEHJyQUtJEk0XFi1i0dPFn/oqjK3/vPCcDeJvW5NQ83V8QbicfF1SupOaB0h8ntgBC2YiE7dfyctQ==", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ], - "engines": { - "node": ">=4" - } - }, - "node_modules/is-callable": { - "version": "1.2.4", - "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.2.4.tgz", - "integrity": "sha512-nsuwtxZfMX67Oryl9LCQ+upnC0Z0BgpwntpS89m1H/TLF0zNfzfLMV/9Wa/6MZsj0acpEjAO0KF1xT6ZdLl95w==", - "dev": true, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/is-date-object": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/is-date-object/-/is-date-object-1.0.5.tgz", - "integrity": "sha512-9YQaSxsAiSwcvS33MBk3wTCVnWK+HhF8VZR2jRxehM16QcVOdHqPn4VPHmRK4lSr38n9JriurInLcP90xsYNfQ==", - "dev": true, - "dependencies": { - "has-tostringtag": "^1.0.0" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/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, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/is-fullwidth-code-point": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", - "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/is-generator-function": { - "version": "1.0.10", - "resolved": "https://registry.npmjs.org/is-generator-function/-/is-generator-function-1.0.10.tgz", - "integrity": "sha512-jsEjy9l3yiXEQ+PsXdmBwEPcOxaXWLspKdplFUVI9vq1iZgIekeC0L167qeu86czQaxed3q/Uzuw0swL0irL8A==", - "dev": true, - "dependencies": { - "has-tostringtag": "^1.0.0" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/is-glob": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", - "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", - "dev": true, - "dependencies": { - "is-extglob": "^2.1.1" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/is-negative-zero": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/is-negative-zero/-/is-negative-zero-2.0.1.tgz", - "integrity": "sha512-2z6JzQvZRa9A2Y7xC6dQQm4FSTSTNWjKIYYTt4246eMTJmIo0Q+ZyOsU66X8lxK1AbB92dFeglPLrhwpeRKO6w==", - "dev": true, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/is-number": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", - "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", - "dev": true, - "engines": { - "node": ">=0.12.0" - } - }, - "node_modules/is-number-object": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/is-number-object/-/is-number-object-1.0.6.tgz", - "integrity": "sha512-bEVOqiRcvo3zO1+G2lVMy+gkkEm9Yh7cDMRusKKu5ZJKPUYSJwICTKZrNKHA2EbSP0Tu0+6B/emsYNHZyn6K8g==", - "dev": true, - "dependencies": { - "has-tostringtag": "^1.0.0" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/is-regex": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.1.4.tgz", - "integrity": "sha512-kvRdxDsxZjhzUX07ZnLydzS1TU/TJlTUHHY4YLL87e37oUA49DfkLqgy+VjFocowy29cKvcSiu+kIv728jTTVg==", - "dev": true, - "dependencies": { - "call-bind": "^1.0.2", - "has-tostringtag": "^1.0.0" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/is-shared-array-buffer": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/is-shared-array-buffer/-/is-shared-array-buffer-1.0.1.tgz", - "integrity": "sha512-IU0NmyknYZN0rChcKhRO1X8LYz5Isj/Fsqh8NJOSf+N/hCOTwy29F32Ik7a+QszE63IdvmwdTPDd6cZ5pg4cwA==", - "dev": true, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/is-string": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/is-string/-/is-string-1.0.7.tgz", - "integrity": "sha512-tE2UXzivje6ofPW7l23cjDOMa09gb7xlAqG6jG5ej6uPV32TlWP3NKPigtaGeHNu9fohccRYvIiZMfOOnOYUtg==", - "dev": true, - "dependencies": { - "has-tostringtag": "^1.0.0" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/is-symbol": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/is-symbol/-/is-symbol-1.0.4.tgz", - "integrity": "sha512-C/CPBqKWnvdcxqIARxyOh4v1UUEOCHpgDa0WYgpKDFMszcrPcffg5uhwSgPCLD2WWxmq6isisz87tzT01tuGhg==", - "dev": true, - "dependencies": { - "has-symbols": "^1.0.2" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/is-typed-array": { - "version": "1.1.8", - "resolved": "https://registry.npmjs.org/is-typed-array/-/is-typed-array-1.1.8.tgz", - "integrity": "sha512-HqH41TNZq2fgtGT8WHVFVJhBVGuY3AnP3Q36K8JKXUxSxRgk/d+7NjmwG2vo2mYmXK8UYZKu0qH8bVP5gEisjA==", - "dev": true, - "dependencies": { - "available-typed-arrays": "^1.0.5", - "call-bind": "^1.0.2", - "es-abstract": "^1.18.5", - "foreach": "^2.0.5", - "has-tostringtag": "^1.0.0" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/is-weakref": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/is-weakref/-/is-weakref-1.0.1.tgz", - "integrity": "sha512-b2jKc2pQZjaeFYWEf7ScFj+Be1I+PXmlu572Q8coTXZ+LD/QQZ7ShPMst8h16riVgyXTQwUsFEl74mDvc/3MHQ==", - "dev": true, - "dependencies": { - "call-bind": "^1.0.0" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/isexe": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", - "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=", - "dev": true - }, - "node_modules/js-yaml": { - "version": "3.13.1", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.13.1.tgz", - "integrity": "sha512-YfbcO7jXDdyj0DGxYVSlSeQNHbD7XPWvrVWeVUujrQEoZzWJIRrCPoyk6kL6IAjAG2IolMK4T0hNUe0HOUs5Jw==", - "dev": true, - "dependencies": { - "argparse": "^1.0.7", - "esprima": "^4.0.0" - }, - "bin": { - "js-yaml": "bin/js-yaml.js" - } - }, - "node_modules/json-stringify-safe": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz", - "integrity": "sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus=", - "dev": true - }, - "node_modules/locate-path": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-3.0.0.tgz", - "integrity": "sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A==", - "dev": true, - "dependencies": { - "p-locate": "^3.0.0", - "path-exists": "^3.0.0" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/lodash": { - "version": "4.17.21", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", - "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==", - "dev": true - }, - "node_modules/lodash.merge": { - "version": "4.6.2", - "resolved": "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.2.tgz", - "integrity": "sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==" - }, - "node_modules/log-symbols": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-3.0.0.tgz", - "integrity": "sha512-dSkNGuI7iG3mfvDzUuYZyvk5dD9ocYCYzNU6CYDE6+Xqd+gwme6Z00NS3dUh8mq/73HaEtT7m6W+yUPtU6BZnQ==", - "dev": true, - "dependencies": { - "chalk": "^2.4.2" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/lolex": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/lolex/-/lolex-1.3.2.tgz", - "integrity": "sha1-fD2mL/yzDw9agKJWbKJORdigHzE=", - "dev": true - }, - "node_modules/lru-cache": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", - "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", - "dependencies": { - "yallist": "^4.0.0" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/make-dir": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-3.1.0.tgz", - "integrity": "sha512-g3FeP20LNwhALb/6Cz6Dd4F2ngze0jz7tbzrD2wAV+o9FeNHe4rL+yK2md0J/fiSf1sa1ADhXqi5+oVwOM/eGw==", - "dev": true, - "dependencies": { - "semver": "^6.0.0" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/make-dir/node_modules/semver": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", - "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", - "dev": true, - "bin": { - "semver": "bin/semver.js" - } - }, - "node_modules/mime-db": { - "version": "1.51.0", - "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.51.0.tgz", - "integrity": "sha512-5y8A56jg7XVQx2mbv1lu49NR4dokRnhZYTtL+KGfaa27uq4pSTXkwQkFJl4pkRMyNFz/EtYDSkiiEHx3F7UN6g==", - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/mime-types": { - "version": "2.1.34", - "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.34.tgz", - "integrity": "sha512-6cP692WwGIs9XXdOO4++N+7qjqv0rqxxVvJ3VHPh/Sc9mVZcQP+ZGhkKiTvWMQRr2tbHkJP/Yn7Y0npb3ZBs4A==", - "dependencies": { - "mime-db": "1.51.0" - }, - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/minimatch": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", - "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", - "dev": true, - "dependencies": { - "brace-expansion": "^1.1.7" - }, - "engines": { - "node": "*" - } - }, - "node_modules/minimist": { - "version": "1.2.5", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz", - "integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==", - "dev": true - }, - "node_modules/minipass": { - "version": "3.1.5", - "resolved": "https://registry.npmjs.org/minipass/-/minipass-3.1.5.tgz", - "integrity": "sha512-+8NzxD82XQoNKNrl1d/FSi+X8wAEWR+sbYAfIvub4Nz0d22plFG72CEVVaufV8PNf4qSslFTD8VMOxNVhHCjTw==", - "dev": true, - "dependencies": { - "yallist": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/minizlib": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/minizlib/-/minizlib-2.1.2.tgz", - "integrity": "sha512-bAxsR8BVfj60DWXHE3u30oHzfl4G7khkSuPW+qvpd7jFRHm7dLxOjUk1EHACJ/hxLY8phGJ0YhYHZo7jil7Qdg==", - "dev": true, - "dependencies": { - "minipass": "^3.0.0", - "yallist": "^4.0.0" - }, - "engines": { - "node": ">= 8" - } - }, - "node_modules/mkdirp": { - "version": "0.5.5", - "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.5.tgz", - "integrity": "sha512-NKmAlESf6jMGym1++R0Ra7wvhV+wFW63FaSOFPwRahvea0gMUcGUhVeAg/0BC0wiv9ih5NYPB1Wn1UEI1/L+xQ==", - "dev": true, - "dependencies": { - "minimist": "^1.2.5" - }, - "bin": { - "mkdirp": "bin/cmd.js" - } - }, - "node_modules/mocha": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/mocha/-/mocha-7.2.0.tgz", - "integrity": "sha512-O9CIypScywTVpNaRrCAgoUnJgozpIofjKUYmJhiCIJMiuYnLI6otcb1/kpW9/n/tJODHGZ7i8aLQoDVsMtOKQQ==", - "dev": true, - "dependencies": { - "ansi-colors": "3.2.3", - "browser-stdout": "1.3.1", - "chokidar": "3.3.0", - "debug": "3.2.6", - "diff": "3.5.0", - "escape-string-regexp": "1.0.5", - "find-up": "3.0.0", - "glob": "7.1.3", - "growl": "1.10.5", - "he": "1.2.0", - "js-yaml": "3.13.1", - "log-symbols": "3.0.0", - "minimatch": "3.0.4", - "mkdirp": "0.5.5", - "ms": "2.1.1", - "node-environment-flags": "1.0.6", - "object.assign": "4.1.0", - "strip-json-comments": "2.0.1", - "supports-color": "6.0.0", - "which": "1.3.1", - "wide-align": "1.1.3", - "yargs": "13.3.2", - "yargs-parser": "13.1.2", - "yargs-unparser": "1.6.0" - }, - "bin": { - "_mocha": "bin/_mocha", - "mocha": "bin/mocha" - }, - "engines": { - "node": ">= 8.10.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/mochajs" - } - }, - "node_modules/mocha/node_modules/debug": { - "version": "3.2.6", - "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.6.tgz", - "integrity": "sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ==", - "deprecated": "Debug versions >=3.2.0 <3.2.7 || >=4 <4.3.1 have a low-severity ReDos regression when used in a Node.js environment. It is recommended you upgrade to 3.2.7 or 4.3.1. (https://github.com/visionmedia/debug/issues/797)", - "dev": true, - "dependencies": { - "ms": "^2.1.1" - } - }, - "node_modules/mocha/node_modules/ms": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.1.tgz", - "integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg==", - "dev": true - }, - "node_modules/ms": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", - "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", - "dev": true - }, - "node_modules/nan": { - "version": "2.15.0", - "resolved": "https://registry.npmjs.org/nan/-/nan-2.15.0.tgz", - "integrity": "sha512-8ZtvEnA2c5aYCZYd1cvgdnU6cqwixRoYg70xPLWUws5ORTa/lnw+u4amixRS/Ac5U5mQVgp9pnlSUnbNWFaWZQ==", - "dev": true - }, - "node_modules/nock": { - "version": "11.9.1", - "resolved": "https://registry.npmjs.org/nock/-/nock-11.9.1.tgz", - "integrity": "sha512-U5wPctaY4/ar2JJ5Jg4wJxlbBfayxgKbiAeGh+a1kk6Pwnc2ZEuKviLyDSG6t0uXl56q7AALIxoM6FJrBSsVXA==", - "dev": true, - "dependencies": { - "debug": "^4.1.0", - "json-stringify-safe": "^5.0.1", - "lodash": "^4.17.13", - "mkdirp": "^0.5.0", - "propagate": "^2.0.0" - }, - "engines": { - "node": ">= 8.0" - } - }, - "node_modules/node-environment-flags": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/node-environment-flags/-/node-environment-flags-1.0.6.tgz", - "integrity": "sha512-5Evy2epuL+6TM0lCQGpFIj6KwiEsGh1SrHUhTbNX+sLbBtjidPZFAnVK9y5yU1+h//RitLbRHTIMyxQPtxMdHw==", - "dev": true, - "dependencies": { - "object.getownpropertydescriptors": "^2.0.3", - "semver": "^5.7.0" - } - }, - "node_modules/node-environment-flags/node_modules/semver": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", - "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", - "dev": true, - "bin": { - "semver": "bin/semver" - } - }, - "node_modules/node-fetch": { - "version": "2.6.6", - "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.6.tgz", - "integrity": "sha512-Z8/6vRlTUChSdIgMa51jxQ4lrw/Jy5SOW10ObaA47/RElsAN2c5Pn8bTgFGWn/ibwzXTE8qwr1Yzx28vsecXEA==", - "dependencies": { - "whatwg-url": "^5.0.0" - }, - "engines": { - "node": "4.x || >=6.0.0" - } - }, - "node_modules/node-mocks-http": { - "version": "1.2.3", - "resolved": "https://registry.npmjs.org/node-mocks-http/-/node-mocks-http-1.2.3.tgz", - "integrity": "sha1-9PvqcFCnU183cD5tnMd+l9hAqgI=", - "dev": true, - "engines": { - "node": ">=0.6" - } - }, - "node_modules/nopt": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/nopt/-/nopt-5.0.0.tgz", - "integrity": "sha512-Tbj67rffqceeLpcRXrT7vKAN8CwfPeIBgM7E6iBkmKLV7bEMwpGgYLGv0jACUsECaa/vuxP0IjEont6umdMgtQ==", - "dev": true, - "dependencies": { - "abbrev": "1" - }, - "bin": { - "nopt": "bin/nopt.js" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/normalize-path": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", - "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/npmlog": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/npmlog/-/npmlog-6.0.0.tgz", - "integrity": "sha512-03ppFRGlsyUaQFbGC2C8QWJN/C/K7PsfyD9aQdhVKAQIH4sQBc8WASqFBP7O+Ut4d2oo5LoeoboB3cGdBZSp6Q==", - "dev": true, - "dependencies": { - "are-we-there-yet": "^2.0.0", - "console-control-strings": "^1.1.0", - "gauge": "^4.0.0", - "set-blocking": "^2.0.0" - }, - "engines": { - "node": "^12.13.0 || ^14.15.0 || >=16" - } - }, - "node_modules/object-inspect": { - "version": "1.11.0", - "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.11.0.tgz", - "integrity": "sha512-jp7ikS6Sd3GxQfZJPyH3cjcbJF6GZPClgdV+EFygjFLQ5FmW/dRUnTd9PQ9k0JhoNDabWFbpF1yCdSWCC6gexg==", - "dev": true, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/object-keys": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.1.1.tgz", - "integrity": "sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==", - "dev": true, - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/object.assign": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.0.tgz", - "integrity": "sha512-exHJeq6kBKj58mqGyTQ9DFvrZC/eR6OwxzoM9YRoGBqrXYonaFyGiFMuc9VZrXf7DarreEwMpurG3dd+CNyW5w==", - "dev": true, - "dependencies": { - "define-properties": "^1.1.2", - "function-bind": "^1.1.1", - "has-symbols": "^1.0.0", - "object-keys": "^1.0.11" - }, - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/object.getownpropertydescriptors": { - "version": "2.1.3", - "resolved": "https://registry.npmjs.org/object.getownpropertydescriptors/-/object.getownpropertydescriptors-2.1.3.tgz", - "integrity": "sha512-VdDoCwvJI4QdC6ndjpqFmoL3/+HxffFBbcJzKi5hwLLqqx3mdbedRpfZDdK0SrOSauj8X4GzBvnDZl4vTN7dOw==", - "dev": true, - "dependencies": { - "call-bind": "^1.0.2", - "define-properties": "^1.1.3", - "es-abstract": "^1.19.1" - }, - "engines": { - "node": ">= 0.8" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/once": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", - "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", - "dev": true, - "dependencies": { - "wrappy": "1" - } - }, - "node_modules/p-limit": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", - "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", - "dev": true, - "dependencies": { - "p-try": "^2.0.0" - }, - "engines": { - "node": ">=6" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/p-locate": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-3.0.0.tgz", - "integrity": "sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ==", - "dev": true, - "dependencies": { - "p-limit": "^2.0.0" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/p-try": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", - "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", - "dev": true, - "engines": { - "node": ">=6" - } - }, - "node_modules/path-exists": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz", - "integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=", - "dev": true, - "engines": { - "node": ">=4" - } - }, - "node_modules/path-is-absolute": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", - "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/picomatch": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.0.tgz", - "integrity": "sha512-lY1Q/PiJGC2zOv/z391WOTD+Z02bCgsFfvxoXXf6h7kv9o+WmsmzYqrAwY63sNgOxE4xEdq0WyUnXfKeBrSvYw==", - "dev": true, - "engines": { - "node": ">=8.6" - }, - "funding": { - "url": "https://github.com/sponsors/jonschlinkert" - } - }, - "node_modules/process": { - "version": "0.11.10", - "resolved": "https://registry.npmjs.org/process/-/process-0.11.10.tgz", - "integrity": "sha1-czIwDoQBYb2j5podHZGn1LwW8YI=", - "engines": { - "node": ">= 0.6.0" - } - }, - "node_modules/propagate": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/propagate/-/propagate-2.0.1.tgz", - "integrity": "sha512-vGrhOavPSTz4QVNuBNdcNXePNdNMaO1xj9yBeH1ScQPjk/rhg9sSlCXPhMkFuaNNW/syTvYqsnbIJxMBfRbbag==", - "dev": true, - "engines": { - "node": ">= 8" - } - }, - "node_modules/psl": { - "version": "1.8.0", - "resolved": "https://registry.npmjs.org/psl/-/psl-1.8.0.tgz", - "integrity": "sha512-RIdOzyoavK+hA18OGGWDqUTsCLhtA7IcZ/6NCs4fFJaHBDab+pDDmDIByWFRQJq2Cd7r1OoQxBGKOaztq+hjIQ==" - }, - "node_modules/punycode": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz", - "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==", - "engines": { - "node": ">=6" - } - }, - "node_modules/readable-stream": { - "version": "3.6.0", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz", - "integrity": "sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==", - "dev": true, - "dependencies": { - "inherits": "^2.0.3", - "string_decoder": "^1.1.1", - "util-deprecate": "^1.0.1" - }, - "engines": { - "node": ">= 6" - } - }, - "node_modules/readdirp": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.2.0.tgz", - "integrity": "sha512-crk4Qu3pmXwgxdSgGhgA/eXiJAPQiX4GMOZZMXnqKxHX7TaoL+3gQVo/WeuAiogr07DpnfjIMpXXa+PAIvwPGQ==", - "dev": true, - "dependencies": { - "picomatch": "^2.0.4" - }, - "engines": { - "node": ">= 8" - } - }, - "node_modules/require-directory": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", - "integrity": "sha1-jGStX9MNqxyXbiNE/+f3kqam30I=", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/require-main-filename": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-2.0.0.tgz", - "integrity": "sha512-NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg==", - "dev": true - }, - "node_modules/rimraf": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", - "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", - "dev": true, - "dependencies": { - "glob": "^7.1.3" - }, - "bin": { - "rimraf": "bin.js" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/safe-buffer": { - "version": "5.2.1", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", - "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ] - }, - "node_modules/samsam": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/samsam/-/samsam-1.1.2.tgz", - "integrity": "sha1-vsEf3IOp/aBjQBIQ5AF2wwJNFWc=", - "deprecated": "This package has been deprecated in favour of @sinonjs/samsam", - "dev": true - }, - "node_modules/sax": { - "version": "1.2.4", - "resolved": "https://registry.npmjs.org/sax/-/sax-1.2.4.tgz", - "integrity": "sha512-NqVDv9TpANUjFm0N8uM5GxL36UgKi9/atZw+x7YFnQ8ckwFGKrl4xX4yWtrey3UJm5nP1kUbnYgLopqWNSRhWw==" - }, - "node_modules/semver": { - "version": "7.3.5", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.5.tgz", - "integrity": "sha512-PoeGJYh8HK4BTO/a9Tf6ZG3veo/A7ZVsYrSA6J8ny9nb3B1VrpkuN+z9OE5wfE5p6H4LchYZsegiQgbJD94ZFQ==", - "dependencies": { - "lru-cache": "^6.0.0" - }, - "bin": { - "semver": "bin/semver.js" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/set-blocking": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz", - "integrity": "sha1-BF+XgtARrppoA93TgrJDkrPYkPc=", - "dev": true - }, - "node_modules/shimmer": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/shimmer/-/shimmer-1.2.1.tgz", - "integrity": "sha512-sQTKC1Re/rM6XyFM6fIAGHRPVGvyXfgzIDvzoq608vM+jeyVD0Tu1E6Np0Kc2zAIFWIj963V2800iF/9LPieQw==" - }, - "node_modules/side-channel": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.0.4.tgz", - "integrity": "sha512-q5XPytqFEIKHkGdiMIrY10mvLRvnQh42/+GoBlFW3b2LXLE2xxJpZFdm94we0BaoV3RwJyGqg5wS7epxTv0Zvw==", - "dev": true, - "dependencies": { - "call-bind": "^1.0.0", - "get-intrinsic": "^1.0.2", - "object-inspect": "^1.9.0" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/signal-exit": { - "version": "3.0.5", - "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.5.tgz", - "integrity": "sha512-KWcOiKeQj6ZyXx7zq4YxSMgHRlod4czeBQZrPb8OKcohcqAXShm7E20kEMle9WBt26hFcAf0qLOcp5zmY7kOqQ==", - "dev": true - }, - "node_modules/sinon": { - "version": "1.17.6", - "resolved": "https://registry.npmjs.org/sinon/-/sinon-1.17.6.tgz", - "integrity": "sha1-pDEW21lXfIKWNWr+4T+vwjMuWOE=", - "dev": true, - "dependencies": { - "formatio": "1.1.1", - "lolex": "1.3.2", - "samsam": "1.1.2", - "util": ">=0.10.3 <1" - }, - "engines": { - "node": ">=0.1.103" - } - }, - "node_modules/sprintf-js": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", - "integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=", - "dev": true - }, - "node_modules/stack-chain": { - "version": "1.3.7", - "resolved": "https://registry.npmjs.org/stack-chain/-/stack-chain-1.3.7.tgz", - "integrity": "sha1-0ZLJ/06moiyUxN1FkXHj8AzqEoU=" - }, - "node_modules/string_decoder": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz", - "integrity": "sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==", - "dev": true, - "dependencies": { - "safe-buffer": "~5.2.0" - } - }, - "node_modules/string-width": { - "version": "4.2.3", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", - "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", - "dev": true, - "dependencies": { - "emoji-regex": "^8.0.0", - "is-fullwidth-code-point": "^3.0.0", - "strip-ansi": "^6.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/string.prototype.trimend": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/string.prototype.trimend/-/string.prototype.trimend-1.0.4.tgz", - "integrity": "sha512-y9xCjw1P23Awk8EvTpcyL2NIr1j7wJ39f+k6lvRnSMz+mz9CGz9NYPelDk42kOz6+ql8xjfK8oYzy3jAP5QU5A==", - "dev": true, - "dependencies": { - "call-bind": "^1.0.2", - "define-properties": "^1.1.3" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/string.prototype.trimstart": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/string.prototype.trimstart/-/string.prototype.trimstart-1.0.4.tgz", - "integrity": "sha512-jh6e984OBfvxS50tdY2nRZnoC5/mLFKOREQfw8t5yytkoUsJRNxvI/E39qu1sD0OtWI3OC0XgKSmcWwziwYuZw==", - "dev": true, - "dependencies": { - "call-bind": "^1.0.2", - "define-properties": "^1.1.3" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/strip-ansi": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", - "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", - "dev": true, - "dependencies": { - "ansi-regex": "^5.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/strip-json-comments": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz", - "integrity": "sha1-PFMZQukIwml8DsNEhYwobHygpgo=", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/supports-color": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-6.0.0.tgz", - "integrity": "sha512-on9Kwidc1IUQo+bQdhi8+Tijpo0e1SS6RoGo2guUwn5vdaxw8RXOF9Vb2ws+ihWOmh4JnCJOvaziZWP1VABaLg==", - "dev": true, - "dependencies": { - "has-flag": "^3.0.0" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/tar": { - "version": "6.1.11", - "resolved": "https://registry.npmjs.org/tar/-/tar-6.1.11.tgz", - "integrity": "sha512-an/KZQzQUkZCkuoAA64hM92X0Urb6VpRhAFllDzz44U2mcD5scmT3zBc4VgVpkugF580+DQn8eAFSyoQt0tznA==", - "dev": true, - "dependencies": { - "chownr": "^2.0.0", - "fs-minipass": "^2.0.0", - "minipass": "^3.0.0", - "minizlib": "^2.1.1", - "mkdirp": "^1.0.3", - "yallist": "^4.0.0" - }, - "engines": { - "node": ">= 10" - } - }, - "node_modules/tar/node_modules/mkdirp": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-1.0.4.tgz", - "integrity": "sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==", - "dev": true, - "bin": { - "mkdirp": "bin/cmd.js" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/to-regex-range": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", - "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", - "dev": true, - "dependencies": { - "is-number": "^7.0.0" - }, - "engines": { - "node": ">=8.0" - } - }, - "node_modules/tough-cookie": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-4.0.0.tgz", - "integrity": "sha512-tHdtEpQCMrc1YLrMaqXXcj6AxhYi/xgit6mZu1+EDWUn+qhUf8wMQoFIy9NXuq23zAwtcB0t/MjACGR18pcRbg==", - "dependencies": { - "psl": "^1.1.33", - "punycode": "^2.1.1", - "universalify": "^0.1.2" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/tr46": { - "version": "0.0.3", - "resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz", - "integrity": "sha1-gYT9NH2snNwYWZLzpmIuFLnZq2o=" - }, - "node_modules/tslib": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.3.1.tgz", - "integrity": "sha512-77EbyPPpMz+FRFRuAFlWMtmgUWGe9UOG2Z25NqCwiIjRhOf5iKGuzSe5P2w1laq+FkRy4p+PCuVkJSGkzTEKVw==" - }, - "node_modules/tunnel": { - "version": "0.0.6", - "resolved": "https://registry.npmjs.org/tunnel/-/tunnel-0.0.6.tgz", - "integrity": "sha512-1h/Lnq9yajKY2PEbBadPXj3VxsDDu844OnaAo52UVmIzIvwwtBPIuNvkjuzBlTWpfJyUbG3ez0KSBibQkj4ojg==", - "engines": { - "node": ">=0.6.11 <=0.7.0 || >=0.7.3" - } - }, - "node_modules/typescript": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.1.2.tgz", - "integrity": "sha512-thGloWsGH3SOxv1SoY7QojKi0tc+8FnOmiarEGMbd/lar7QOEd3hvlx3Fp5y6FlDUGl9L+pd4n2e+oToGMmhRQ==", - "dev": true, - "bin": { - "tsc": "bin/tsc", - "tsserver": "bin/tsserver" - }, - "engines": { - "node": ">=4.2.0" - } - }, - "node_modules/unbox-primitive": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/unbox-primitive/-/unbox-primitive-1.0.1.tgz", - "integrity": "sha512-tZU/3NqK3dA5gpE1KtyiJUrEB0lxnGkMFHptJ7q6ewdZ8s12QrODwNbhIJStmJkd1QDXa1NRA8aF2A1zk/Ypyw==", - "dev": true, - "dependencies": { - "function-bind": "^1.1.1", - "has-bigints": "^1.0.1", - "has-symbols": "^1.0.2", - "which-boxed-primitive": "^1.0.2" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/universalify": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.1.2.tgz", - "integrity": "sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==", - "engines": { - "node": ">= 4.0.0" - } - }, - "node_modules/util": { - "version": "0.12.4", - "resolved": "https://registry.npmjs.org/util/-/util-0.12.4.tgz", - "integrity": "sha512-bxZ9qtSlGUWSOy9Qa9Xgk11kSslpuZwaxCg4sNIDj6FLucDab2JxnHwyNTCpHMtK1MjoQiWQ6DiUMZYbSrO+Sw==", - "dev": true, - "dependencies": { - "inherits": "^2.0.3", - "is-arguments": "^1.0.4", - "is-generator-function": "^1.0.7", - "is-typed-array": "^1.1.3", - "safe-buffer": "^5.1.2", - "which-typed-array": "^1.1.2" - } - }, - "node_modules/util-deprecate": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", - "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=", - "dev": true - }, - "node_modules/uuid": { - "version": "8.3.2", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz", - "integrity": "sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==", - "bin": { - "uuid": "dist/bin/uuid" - } - }, - "node_modules/webidl-conversions": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz", - "integrity": "sha1-JFNCdeKnvGvnvIZhHMFq4KVlSHE=" - }, - "node_modules/whatwg-url": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-5.0.0.tgz", - "integrity": "sha1-lmRU6HZUYuN2RNNib2dCzotwll0=", - "dependencies": { - "tr46": "~0.0.3", - "webidl-conversions": "^3.0.0" - } - }, - "node_modules/which": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz", - "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==", - "dev": true, - "dependencies": { - "isexe": "^2.0.0" - }, - "bin": { - "which": "bin/which" - } - }, - "node_modules/which-boxed-primitive": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/which-boxed-primitive/-/which-boxed-primitive-1.0.2.tgz", - "integrity": "sha512-bwZdv0AKLpplFY2KZRX6TvyuN7ojjr7lwkg6ml0roIy9YeuSr7JS372qlNW18UQYzgYK9ziGcerWqZOmEn9VNg==", - "dev": true, - "dependencies": { - "is-bigint": "^1.0.1", - "is-boolean-object": "^1.1.0", - "is-number-object": "^1.0.4", - "is-string": "^1.0.5", - "is-symbol": "^1.0.3" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/which-module": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/which-module/-/which-module-2.0.0.tgz", - "integrity": "sha1-2e8H3Od7mQK4o6j6SzHD4/fm6Ho=", - "dev": true - }, - "node_modules/which-typed-array": { - "version": "1.1.7", - "resolved": "https://registry.npmjs.org/which-typed-array/-/which-typed-array-1.1.7.tgz", - "integrity": "sha512-vjxaB4nfDqwKI0ws7wZpxIlde1XrLX5uB0ZjpfshgmapJMD7jJWhZI+yToJTqaFByF0eNBcYxbjmCzoRP7CfEw==", - "dev": true, - "dependencies": { - "available-typed-arrays": "^1.0.5", - "call-bind": "^1.0.2", - "es-abstract": "^1.18.5", - "foreach": "^2.0.5", - "has-tostringtag": "^1.0.0", - "is-typed-array": "^1.1.7" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/wide-align": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/wide-align/-/wide-align-1.1.3.tgz", - "integrity": "sha512-QGkOQc8XL6Bt5PwnsExKBPuMKBxnGxWWW3fU55Xt4feHozMUhdUMaBCk290qpm/wG5u/RSKzwdAC4i51YigihA==", - "dev": true, - "dependencies": { - "string-width": "^1.0.2 || 2" - } - }, - "node_modules/wide-align/node_modules/ansi-regex": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", - "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=", - "dev": true, - "engines": { - "node": ">=4" - } - }, - "node_modules/wide-align/node_modules/is-fullwidth-code-point": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", - "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=", - "dev": true, - "engines": { - "node": ">=4" - } - }, - "node_modules/wide-align/node_modules/string-width": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz", - "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==", - "dev": true, - "dependencies": { - "is-fullwidth-code-point": "^2.0.0", - "strip-ansi": "^4.0.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/wide-align/node_modules/strip-ansi": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", - "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", - "dev": true, - "dependencies": { - "ansi-regex": "^3.0.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/wrap-ansi": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-5.1.0.tgz", - "integrity": "sha512-QC1/iN/2/RPVJ5jYK8BGttj5z83LmSKmvbvrXPNCLZSEb32KKVDJDl/MOt2N01qU2H/FkzEa9PKto1BqDjtd7Q==", - "dev": true, - "dependencies": { - "ansi-styles": "^3.2.0", - "string-width": "^3.0.0", - "strip-ansi": "^5.0.0" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/wrap-ansi/node_modules/ansi-regex": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz", - "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==", - "dev": true, - "engines": { - "node": ">=6" - } - }, - "node_modules/wrap-ansi/node_modules/emoji-regex": { - "version": "7.0.3", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-7.0.3.tgz", - "integrity": "sha512-CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA==", - "dev": true - }, - "node_modules/wrap-ansi/node_modules/is-fullwidth-code-point": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", - "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=", - "dev": true, - "engines": { - "node": ">=4" - } - }, - "node_modules/wrap-ansi/node_modules/string-width": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz", - "integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==", - "dev": true, - "dependencies": { - "emoji-regex": "^7.0.1", - "is-fullwidth-code-point": "^2.0.0", - "strip-ansi": "^5.1.0" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/wrap-ansi/node_modules/strip-ansi": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", - "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", - "dev": true, - "dependencies": { - "ansi-regex": "^4.1.0" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/wrappy": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", - "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=", - "dev": true - }, - "node_modules/xml2js": { - "version": "0.4.23", - "resolved": "https://registry.npmjs.org/xml2js/-/xml2js-0.4.23.tgz", - "integrity": "sha512-ySPiMjM0+pLDftHgXY4By0uswI3SPKLDw/i3UXbnO8M/p28zqexCUoPmQFrYD+/1BzhGJSs2i1ERWKJAtiLrug==", - "dependencies": { - "sax": ">=0.6.0", - "xmlbuilder": "~11.0.0" - }, - "engines": { - "node": ">=4.0.0" - } - }, - "node_modules/xmlbuilder": { - "version": "11.0.1", - "resolved": "https://registry.npmjs.org/xmlbuilder/-/xmlbuilder-11.0.1.tgz", - "integrity": "sha512-fDlsI/kFEx7gLvbecc0/ohLG50fugQp8ryHzMTuW9vSa1GJ0XYWKnhsUx7oie3G98+r56aTQIUB4kht42R3JvA==", - "engines": { - "node": ">=4.0" - } - }, - "node_modules/y18n": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/y18n/-/y18n-4.0.3.tgz", - "integrity": "sha512-JKhqTOwSrqNA1NY5lSztJ1GrBiUodLMmIZuLiDaMRJ+itFd+ABVE8XBjOvIWL+rSqNDC74LCSFmlb/U4UZ4hJQ==", - "dev": true - }, - "node_modules/yallist": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", - "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==" - }, - "node_modules/yargs": { - "version": "13.3.2", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-13.3.2.tgz", - "integrity": "sha512-AX3Zw5iPruN5ie6xGRIDgqkT+ZhnRlZMLMHAs8tg7nRruy2Nb+i5o9bwghAogtM08q1dpr2LVoS8KSTMYpWXUw==", - "dev": true, - "dependencies": { - "cliui": "^5.0.0", - "find-up": "^3.0.0", - "get-caller-file": "^2.0.1", - "require-directory": "^2.1.1", - "require-main-filename": "^2.0.0", - "set-blocking": "^2.0.0", - "string-width": "^3.0.0", - "which-module": "^2.0.0", - "y18n": "^4.0.0", - "yargs-parser": "^13.1.2" - } - }, - "node_modules/yargs-parser": { - "version": "13.1.2", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-13.1.2.tgz", - "integrity": "sha512-3lbsNRf/j+A4QuSZfDRA7HRSfWrzO0YjqTJd5kjAq37Zep1CEgaYmrH9Q3GwPiB9cHyd1Y1UwggGhJGoxipbzg==", - "dev": true, - "dependencies": { - "camelcase": "^5.0.0", - "decamelize": "^1.2.0" - } - }, - "node_modules/yargs-unparser": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/yargs-unparser/-/yargs-unparser-1.6.0.tgz", - "integrity": "sha512-W9tKgmSn0DpSatfri0nx52Joq5hVXgeLiqR/5G0sZNDoLZFOr/xjBUDcShCOGNsBnEMNo1KAMBkTej1Hm62HTw==", - "dev": true, - "dependencies": { - "flat": "^4.1.0", - "lodash": "^4.17.15", - "yargs": "^13.3.0" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/yargs/node_modules/ansi-regex": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz", - "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==", - "dev": true, - "engines": { - "node": ">=6" - } - }, - "node_modules/yargs/node_modules/emoji-regex": { - "version": "7.0.3", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-7.0.3.tgz", - "integrity": "sha512-CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA==", - "dev": true - }, - "node_modules/yargs/node_modules/is-fullwidth-code-point": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", - "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=", - "dev": true, - "engines": { - "node": ">=4" - } - }, - "node_modules/yargs/node_modules/string-width": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz", - "integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==", - "dev": true, - "dependencies": { - "emoji-regex": "^7.0.1", - "is-fullwidth-code-point": "^2.0.0", - "strip-ansi": "^5.1.0" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/yargs/node_modules/strip-ansi": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", - "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", - "dev": true, - "dependencies": { - "ansi-regex": "^4.1.0" - }, - "engines": { - "node": ">=6" - } - } - }, "dependencies": { "@azure/abort-controller": { "version": "1.0.4", @@ -3257,8 +587,7 @@ "diagnostic-channel-publishers": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/diagnostic-channel-publishers/-/diagnostic-channel-publishers-1.0.3.tgz", - "integrity": "sha512-RJJA1QYDHVJUpV3HYQx0TLFZLlqxRL1H5Z0Z8ywIiEHDunT9UMJKwcnWkKa/I0z3kwozg3PKfaNJP9OkIeqN2Q==", - "requires": {} + "integrity": "sha512-RJJA1QYDHVJUpV3HYQx0TLFZLlqxRL1H5Z0Z8ywIiEHDunT9UMJKwcnWkKa/I0z3kwozg3PKfaNJP9OkIeqN2Q==" }, "diff": { "version": "3.5.0", @@ -4245,15 +1574,6 @@ "resolved": "https://registry.npmjs.org/stack-chain/-/stack-chain-1.3.7.tgz", "integrity": "sha1-0ZLJ/06moiyUxN1FkXHj8AzqEoU=" }, - "string_decoder": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz", - "integrity": "sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==", - "dev": true, - "requires": { - "safe-buffer": "~5.2.0" - } - }, "string-width": { "version": "4.2.3", "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", @@ -4285,6 +1605,15 @@ "define-properties": "^1.1.3" } }, + "string_decoder": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz", + "integrity": "sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==", + "dev": true, + "requires": { + "safe-buffer": "~5.2.0" + } + }, "strip-ansi": { "version": "6.0.1", "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz",