diff --git a/node_modules/.bin/handlebars b/node_modules/.bin/handlebars deleted file mode 120000 index fb7d090fc..000000000 --- a/node_modules/.bin/handlebars +++ /dev/null @@ -1 +0,0 @@ -../handlebars/bin/handlebars \ No newline at end of file diff --git a/node_modules/.bin/semver b/node_modules/.bin/semver index 5aaadf42c..317eb293d 120000 --- a/node_modules/.bin/semver +++ b/node_modules/.bin/semver @@ -1 +1 @@ -../semver/bin/semver.js \ No newline at end of file +../semver/bin/semver \ No newline at end of file diff --git a/node_modules/.bin/uglifyjs b/node_modules/.bin/uglifyjs deleted file mode 120000 index fef3468b6..000000000 --- a/node_modules/.bin/uglifyjs +++ /dev/null @@ -1 +0,0 @@ -../uglify-js/bin/uglifyjs \ No newline at end of file diff --git a/node_modules/@actions/core/LICENSE.md b/node_modules/@actions/core/LICENSE.md index e5a73f40e..dbae2edb2 100644 --- a/node_modules/@actions/core/LICENSE.md +++ b/node_modules/@actions/core/LICENSE.md @@ -1,3 +1,5 @@ +The MIT License (MIT) + Copyright 2019 GitHub Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: diff --git a/node_modules/@actions/core/README.md b/node_modules/@actions/core/README.md index 8d8c00f1d..95428cf33 100644 --- a/node_modules/@actions/core/README.md +++ b/node_modules/@actions/core/README.md @@ -4,48 +4,55 @@ ## Usage -#### Inputs/Outputs +### Import the package -You can use this library to get inputs or set outputs: +```js +// javascript +const core = require('@actions/core'); +// typescript +import * as core from '@actions/core'; ``` -const core = require('@actions/core'); -const myInput = core.getInput('inputName', { required: true }); +#### Inputs/Outputs -// Do stuff +Action inputs can be read with `getInput`. Outputs can be set with `setOutput` which makes them available to be mapped into inputs of other actions to ensure they are decoupled. + +```js +const myInput = core.getInput('inputName', { required: true }); core.setOutput('outputKey', 'outputVal'); ``` -#### Exporting variables/secrets +#### Exporting variables -You can also export variables and secrets for future steps. Variables get set in the environment automatically, while secrets must be scoped into the environment from a workflow using `{{ secret.FOO }}`. Secrets will also be masked from the logs: +Since each step runs in a separate process, you can use `exportVariable` to add it to this step and future steps environment blocks. +```js +core.exportVariable('envVar', 'Val'); ``` -const core = require('@actions/core'); -// Do stuff +#### Setting a secret -core.exportVariable('envVar', 'Val'); -core.exportSecret('secretVar', variableWithSecretValue); +Setting a secret registers the secret with the runner to ensure it is masked in logs. + +```js +core.setSecret('myPassword'); ``` #### PATH Manipulation -You can explicitly add items to the path for all remaining steps in a workflow: +To make a tool's path available in the path for the remainder of the job (without altering the machine or containers state), use `addPath`. The runner will prepend the path given to the jobs PATH. -``` -const core = require('@actions/core'); - -core.addPath('pathToTool'); +```js +core.addPath('/path/to/mytool'); ``` #### Exit codes -You should use this library to set the failing exit code for your action: +You should use this library to set the failing exit code for your action. If status is not set and the script runs to completion, that will lead to a success. -``` +```js const core = require('@actions/core'); try { @@ -56,13 +63,15 @@ catch (err) { core.setFailed(`Action failed with error ${err}`); } +Note that `setNeutral` is not yet implemented in actions V2 but equivalent functionality is being planned. + ``` #### Logging -Finally, this library provides some utilities for logging: +Finally, this library provides some utilities for logging. Note that debug logging is hidden from the logs by default. This behavior can be toggled by enabling the [Step Debug Logs](../../docs/action-debugging.md#step-debug-logs). -``` +```js const core = require('@actions/core'); const myInput = core.getInput('input'); @@ -70,12 +79,69 @@ try { core.debug('Inside try block'); if (!myInput) { - core.warning('myInput wasnt set'); + core.warning('myInput was not set'); } + if (core.isDebug()) { + // curl -v https://github.com + } else { + // curl https://github.com + } + // Do stuff + core.info('Output to the actions build log') } catch (err) { - core.error('Error ${err}, action may still succeed though'); + core.error(`Error ${err}, action may still succeed though`); } ``` + +This library can also wrap chunks of output in foldable groups. + +```js +const core = require('@actions/core') + +// Manually wrap output +core.startGroup('Do some function') +doSomeFunction() +core.endGroup() + +// Wrap an asynchronous function call +const result = await core.group('Do something async', async () => { + const response = await doSomeHTTPRequest() + return response +}) +``` + +#### Action state + +You can use this library to save state and get state for sharing information between a given wrapper action: + +**action.yml** +```yaml +name: 'Wrapper action sample' +inputs: + name: + default: 'GitHub' +runs: + using: 'node12' + main: 'main.js' + post: 'cleanup.js' +``` + +In action's `main.js`: + +```js +const core = require('@actions/core'); + +core.saveState("pidToKill", 12345); +``` + +In action's `cleanup.js`: +```js +const core = require('@actions/core'); + +var pid = core.getState("pidToKill"); + +process.kill(pid); +``` diff --git a/node_modules/@actions/core/lib/command.d.ts b/node_modules/@actions/core/lib/command.d.ts index 9ad864719..89eff6687 100644 --- a/node_modules/@actions/core/lib/command.d.ts +++ b/node_modules/@actions/core/lib/command.d.ts @@ -1,16 +1,16 @@ interface CommandProperties { - [key: string]: string; + [key: string]: any; } /** * Commands * * Command Format: - * ##[name key=value;key=value]message + * ::name key=value,key=value::message * * Examples: - * ##[warning]This is the user warning message - * ##[set-secret name=mypassword]definatelyNotAPassword! + * ::warning::This is the message + * ::set-env name=MY_VAR::some value */ -export declare function issueCommand(command: string, properties: CommandProperties, message: string): void; -export declare function issue(name: string, message: string): void; +export declare function issueCommand(command: string, properties: CommandProperties, message: any): void; +export declare function issue(name: string, message?: string): void; export {}; diff --git a/node_modules/@actions/core/lib/command.js b/node_modules/@actions/core/lib/command.js index 911698ed0..10bf3ebbb 100644 --- a/node_modules/@actions/core/lib/command.js +++ b/node_modules/@actions/core/lib/command.js @@ -1,26 +1,34 @@ "use strict"; +var __importStar = (this && this.__importStar) || function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k]; + result["default"] = mod; + return result; +}; Object.defineProperty(exports, "__esModule", { value: true }); -const os = require("os"); +const os = __importStar(require("os")); +const utils_1 = require("./utils"); /** * Commands * * Command Format: - * ##[name key=value;key=value]message + * ::name key=value,key=value::message * * Examples: - * ##[warning]This is the user warning message - * ##[set-secret name=mypassword]definatelyNotAPassword! + * ::warning::This is the message + * ::set-env name=MY_VAR::some value */ function issueCommand(command, properties, message) { const cmd = new Command(command, properties, message); process.stdout.write(cmd.toString() + os.EOL); } exports.issueCommand = issueCommand; -function issue(name, message) { +function issue(name, message = '') { issueCommand(name, {}, message); } exports.issue = issue; -const CMD_PREFIX = '##['; +const CMD_STRING = '::'; class Command { constructor(command, properties, message) { if (!command) { @@ -31,36 +39,41 @@ class Command { this.message = message; } toString() { - let cmdStr = CMD_PREFIX + this.command; + let cmdStr = CMD_STRING + this.command; if (this.properties && Object.keys(this.properties).length > 0) { cmdStr += ' '; + let first = true; for (const key in this.properties) { if (this.properties.hasOwnProperty(key)) { const val = this.properties[key]; if (val) { - // safely append the val - avoid blowing up when attempting to - // call .replace() if message is not a string for some reason - cmdStr += `${key}=${escape(`${val || ''}`)};`; + if (first) { + first = false; + } + else { + cmdStr += ','; + } + cmdStr += `${key}=${escapeProperty(val)}`; } } } } - cmdStr += ']'; - // safely append the message - avoid blowing up when attempting to - // call .replace() if message is not a string for some reason - const message = `${this.message || ''}`; - cmdStr += escapeData(message); + cmdStr += `${CMD_STRING}${escapeData(this.message)}`; return cmdStr; } } function escapeData(s) { - return s.replace(/\r/g, '%0D').replace(/\n/g, '%0A'); + return utils_1.toCommandValue(s) + .replace(/%/g, '%25') + .replace(/\r/g, '%0D') + .replace(/\n/g, '%0A'); } -function escape(s) { - return s +function escapeProperty(s) { + return utils_1.toCommandValue(s) + .replace(/%/g, '%25') .replace(/\r/g, '%0D') .replace(/\n/g, '%0A') - .replace(/]/g, '%5D') - .replace(/;/g, '%3B'); + .replace(/:/g, '%3A') + .replace(/,/g, '%2C'); } //# sourceMappingURL=command.js.map \ No newline at end of file diff --git a/node_modules/@actions/core/lib/command.js.map b/node_modules/@actions/core/lib/command.js.map index 28ea330bd..a95b303bd 100644 --- a/node_modules/@actions/core/lib/command.js.map +++ b/node_modules/@actions/core/lib/command.js.map @@ -1 +1 @@ -{"version":3,"file":"command.js","sourceRoot":"","sources":["../src/command.ts"],"names":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AAK,EAAE,KAAK,CAAC;SACrB,OAAO,CAAC,KAAK,EAAE,KAAK,CAAC,CAAA;AAC1B,CAAC;AAED,SAAS,cAAc,CAAC,CAAM;IAC5B,OAAO,sBAAc,CAAC,CAAC,CAAC;SACrB,OAAO,CAAC,IAAI,EAAE,KAAK,CAAC;SACpB,OAAO,CAAC,KAAK,EAAE,KAAK,CAAC;SACrB,OAAO,CAAC,KAAK,EAAE,KAAK,CAAC;SACrB,OAAO,CAAC,IAAI,EAAE,KAAK,CAAC;SACpB,OAAO,CAAC,IAAI,EAAE,KAAK,CAAC,CAAA;AACzB,CAAC"} \ No newline at end of file diff --git a/node_modules/@actions/core/lib/core.d.ts b/node_modules/@actions/core/lib/core.d.ts index f8afe996e..8bb5093c5 100644 --- a/node_modules/@actions/core/lib/core.d.ts +++ b/node_modules/@actions/core/lib/core.d.ts @@ -19,17 +19,16 @@ export declare enum ExitCode { Failure = 1 } /** - * sets env variable for this action and future actions in the job + * Sets env variable for this action and future actions in the job * @param name the name of the variable to set - * @param val the value of the variable + * @param val the value of the variable. Non-string values will be converted to a string via JSON.stringify */ -export declare function exportVariable(name: string, val: string): void; +export declare function exportVariable(name: string, val: any): void; /** - * exports the variable and registers a secret which will get masked from logs - * @param name the name of the variable to set - * @param val value of the secret + * Registers a secret which will get masked from logs + * @param secret value of the secret */ -export declare function exportSecret(name: string, val: string): void; +export declare function setSecret(secret: string): void; /** * Prepends inputPath to the PATH (for this action and future actions) * @param inputPath @@ -47,15 +46,25 @@ export declare function getInput(name: string, options?: InputOptions): string; * Sets the value of an output. * * @param name name of the output to set - * @param value value to store + * @param value value to store. Non-string values will be converted to a string via JSON.stringify + */ +export declare function setOutput(name: string, value: any): void; +/** + * Enables or disables the echoing of commands into stdout for the rest of the step. + * Echoing is disabled by default if ACTIONS_STEP_DEBUG is not set. + * */ -export declare function setOutput(name: string, value: string): void; +export declare function setCommandEcho(enabled: boolean): void; /** * Sets the action status to failed. * When the action exits it will be with an exit code of 1 * @param message add error issue message */ -export declare function setFailed(message: string): void; +export declare function setFailed(message: string | Error): void; +/** + * Gets whether Actions Step Debug is on or not + */ +export declare function isDebug(): boolean; /** * Writes debug message to user log * @param message debug message @@ -63,11 +72,51 @@ export declare function setFailed(message: string): void; export declare function debug(message: string): void; /** * Adds an error issue - * @param message error issue message + * @param message error issue message. Errors will be converted to string via toString() */ -export declare function error(message: string): void; +export declare function error(message: string | Error): void; /** * Adds an warning issue - * @param message warning issue message + * @param message warning issue message. Errors will be converted to string via toString() + */ +export declare function warning(message: string | Error): void; +/** + * Writes info to log with console.log. + * @param message info message + */ +export declare function info(message: string): void; +/** + * Begin an output group. + * + * Output until the next `groupEnd` will be foldable in this group + * + * @param name The name of the output group + */ +export declare function startGroup(name: string): void; +/** + * End an output group. + */ +export declare function endGroup(): void; +/** + * Wrap an asynchronous function call in a group. + * + * Returns the same type as the function itself. + * + * @param name The name of the group + * @param fn The function to wrap in the group + */ +export declare function group(name: string, fn: () => Promise): Promise; +/** + * Saves state for current action, the state can only be retrieved by this action's post job execution. + * + * @param name name of the state to store + * @param value value to store. Non-string values will be converted to a string via JSON.stringify + */ +export declare function saveState(name: string, value: any): void; +/** + * Gets the value of an state set by this action's main execution. + * + * @param name name of the state to get + * @returns string */ -export declare function warning(message: string): void; +export declare function getState(name: string): string; diff --git a/node_modules/@actions/core/lib/core.js b/node_modules/@actions/core/lib/core.js index c6397baae..8b3311081 100644 --- a/node_modules/@actions/core/lib/core.js +++ b/node_modules/@actions/core/lib/core.js @@ -1,7 +1,26 @@ "use strict"; +var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { + function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +}; +var __importStar = (this && this.__importStar) || function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k]; + result["default"] = mod; + return result; +}; Object.defineProperty(exports, "__esModule", { value: true }); const command_1 = require("./command"); -const path = require("path"); +const file_command_1 = require("./file-command"); +const utils_1 = require("./utils"); +const os = __importStar(require("os")); +const path = __importStar(require("path")); /** * The code to exit an action */ @@ -20,31 +39,45 @@ var ExitCode; // Variables //----------------------------------------------------------------------- /** - * sets env variable for this action and future actions in the job + * Sets env variable for this action and future actions in the job * @param name the name of the variable to set - * @param val the value of the variable + * @param val the value of the variable. Non-string values will be converted to a string via JSON.stringify */ +// eslint-disable-next-line @typescript-eslint/no-explicit-any function exportVariable(name, val) { - process.env[name] = val; - command_1.issueCommand('set-env', { name }, val); + const convertedVal = utils_1.toCommandValue(val); + process.env[name] = convertedVal; + const filePath = process.env['GITHUB_ENV'] || ''; + if (filePath) { + const delimiter = '_GitHubActionsFileCommandDelimeter_'; + const commandValue = `${name}<<${delimiter}${os.EOL}${convertedVal}${os.EOL}${delimiter}`; + file_command_1.issueCommand('ENV', commandValue); + } + else { + command_1.issueCommand('set-env', { name }, convertedVal); + } } exports.exportVariable = exportVariable; /** - * exports the variable and registers a secret which will get masked from logs - * @param name the name of the variable to set - * @param val value of the secret + * Registers a secret which will get masked from logs + * @param secret value of the secret */ -function exportSecret(name, val) { - exportVariable(name, val); - command_1.issueCommand('set-secret', {}, val); +function setSecret(secret) { + command_1.issueCommand('add-mask', {}, secret); } -exports.exportSecret = exportSecret; +exports.setSecret = setSecret; /** * Prepends inputPath to the PATH (for this action and future actions) * @param inputPath */ function addPath(inputPath) { - command_1.issueCommand('add-path', {}, inputPath); + const filePath = process.env['GITHUB_PATH'] || ''; + if (filePath) { + file_command_1.issueCommand('PATH', inputPath); + } + else { + command_1.issueCommand('add-path', {}, inputPath); + } process.env['PATH'] = `${inputPath}${path.delimiter}${process.env['PATH']}`; } exports.addPath = addPath; @@ -56,7 +89,7 @@ exports.addPath = addPath; * @returns string */ function getInput(name, options) { - const val = process.env[`INPUT_${name.replace(' ', '_').toUpperCase()}`] || ''; + const val = process.env[`INPUT_${name.replace(/ /g, '_').toUpperCase()}`] || ''; if (options && options.required && !val) { throw new Error(`Input required and not supplied: ${name}`); } @@ -67,12 +100,22 @@ exports.getInput = getInput; * Sets the value of an output. * * @param name name of the output to set - * @param value value to store + * @param value value to store. Non-string values will be converted to a string via JSON.stringify */ +// eslint-disable-next-line @typescript-eslint/no-explicit-any function setOutput(name, value) { command_1.issueCommand('set-output', { name }, value); } exports.setOutput = setOutput; +/** + * Enables or disables the echoing of commands into stdout for the rest of the step. + * Echoing is disabled by default if ACTIONS_STEP_DEBUG is not set. + * + */ +function setCommandEcho(enabled) { + command_1.issue('echo', enabled ? 'on' : 'off'); +} +exports.setCommandEcho = setCommandEcho; //----------------------------------------------------------------------- // Results //----------------------------------------------------------------------- @@ -89,6 +132,13 @@ exports.setFailed = setFailed; //----------------------------------------------------------------------- // Logging Commands //----------------------------------------------------------------------- +/** + * Gets whether Actions Step Debug is on or not + */ +function isDebug() { + return process.env['RUNNER_DEBUG'] === '1'; +} +exports.isDebug = isDebug; /** * Writes debug message to user log * @param message debug message @@ -99,18 +149,90 @@ function debug(message) { exports.debug = debug; /** * Adds an error issue - * @param message error issue message + * @param message error issue message. Errors will be converted to string via toString() */ function error(message) { - command_1.issue('error', message); + command_1.issue('error', message instanceof Error ? message.toString() : message); } exports.error = error; /** * Adds an warning issue - * @param message warning issue message + * @param message warning issue message. Errors will be converted to string via toString() */ function warning(message) { - command_1.issue('warning', message); + command_1.issue('warning', message instanceof Error ? message.toString() : message); } exports.warning = warning; +/** + * Writes info to log with console.log. + * @param message info message + */ +function info(message) { + process.stdout.write(message + os.EOL); +} +exports.info = info; +/** + * Begin an output group. + * + * Output until the next `groupEnd` will be foldable in this group + * + * @param name The name of the output group + */ +function startGroup(name) { + command_1.issue('group', name); +} +exports.startGroup = startGroup; +/** + * End an output group. + */ +function endGroup() { + command_1.issue('endgroup'); +} +exports.endGroup = endGroup; +/** + * Wrap an asynchronous function call in a group. + * + * Returns the same type as the function itself. + * + * @param name The name of the group + * @param fn The function to wrap in the group + */ +function group(name, fn) { + return __awaiter(this, void 0, void 0, function* () { + startGroup(name); + let result; + try { + result = yield fn(); + } + finally { + endGroup(); + } + return result; + }); +} +exports.group = group; +//----------------------------------------------------------------------- +// Wrapper action state +//----------------------------------------------------------------------- +/** + * Saves state for current action, the state can only be retrieved by this action's post job execution. + * + * @param name name of the state to store + * @param value value to store. Non-string values will be converted to a string via JSON.stringify + */ +// eslint-disable-next-line @typescript-eslint/no-explicit-any +function saveState(name, value) { + command_1.issueCommand('save-state', { name }, value); +} +exports.saveState = saveState; +/** + * Gets the value of an state set by this action's main execution. + * + * @param name name of the state to get + * @returns string + */ +function getState(name) { + return process.env[`STATE_${name}`] || ''; +} +exports.getState = getState; //# sourceMappingURL=core.js.map \ No newline at end of file diff --git a/node_modules/@actions/core/lib/core.js.map b/node_modules/@actions/core/lib/core.js.map index 7e3c84fa9..7e7cbcca2 100644 --- a/node_modules/@actions/core/lib/core.js.map +++ b/node_modules/@actions/core/lib/core.js.map @@ -1 +1 @@ -{"version":3,"file":"core.js","sourceRoot":"","sources":["../src/core.ts"],"names":[],"mappings":";;AAAA,uCAA6C;AAE7C,6BAA4B;AAU5B;;GAEG;AACH,IAAY,QAUX;AAVD,WAAY,QAAQ;IAClB;;OAEG;IACH,6CAAW,CAAA;IAEX;;OAEG;IACH,6CAAW,CAAA;AACb,CAAC,EAVW,QAAQ,GAAR,gBAAQ,KAAR,gBAAQ,QAUnB;AAED,yEAAyE;AACzE,YAAY;AACZ,yEAAyE;AAEzE;;;;GAIG;AACH,SAAgB,cAAc,CAAC,IAAY,EAAE,GAAW;IACtD,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,GAAG,GAAG,CAAA;IACvB,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,CAAC,OAAO,CAAC,CAAA;AAC3E,CAAC;AAFD,0BAEC;AAED;;;GAGG;AACH,SAAgB,IAAI,CAAC,OAAe;IAClC,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,OAAO,GAAG,EAAE,CAAC,GAAG,CAAC,CAAA;AACxC,CAAC;AAFD,oBAEC;AAED;;;;;;GAMG;AACH,SAAgB,UAAU,CAAC,IAAY;IACrC,eAAK,CAAC,OAAO,EAAE,IAAI,CAAC,CAAA;AACtB,CAAC;AAFD,gCAEC;AAED;;GAEG;AACH,SAAgB,QAAQ;IACtB,eAAK,CAAC,UAAU,CAAC,CAAA;AACnB,CAAC;AAFD,4BAEC;AAED;;;;;;;GAOG;AACH,SAAsB,KAAK,CAAI,IAAY,EAAE,EAAoB;;QAC/D,UAAU,CAAC,IAAI,CAAC,CAAA;QAEhB,IAAI,MAAS,CAAA;QAEb,IAAI;YACF,MAAM,GAAG,MAAM,EAAE,EAAE,CAAA;SACpB;gBAAS;YACR,QAAQ,EAAE,CAAA;SACX;QAED,OAAO,MAAM,CAAA;IACf,CAAC;CAAA;AAZD,sBAYC;AAED,yEAAyE;AACzE,uBAAuB;AACvB,yEAAyE;AAEzE;;;;;GAKG;AACH,8DAA8D;AAC9D,SAAgB,SAAS,CAAC,IAAY,EAAE,KAAU;IAChD,sBAAY,CAAC,YAAY,EAAE,EAAC,IAAI,EAAC,EAAE,KAAK,CAAC,CAAA;AAC3C,CAAC;AAFD,8BAEC;AAED;;;;;GAKG;AACH,SAAgB,QAAQ,CAAC,IAAY;IACnC,OAAO,OAAO,CAAC,GAAG,CAAC,SAAS,IAAI,EAAE,CAAC,IAAI,EAAE,CAAA;AAC3C,CAAC;AAFD,4BAEC"} \ No newline at end of file diff --git a/node_modules/@actions/core/package.json b/node_modules/@actions/core/package.json index 3131c8c96..68e8ec59a 100644 --- a/node_modules/@actions/core/package.json +++ b/node_modules/@actions/core/package.json @@ -1,36 +1,34 @@ { - "_args": [ - [ - "@actions/core@1.0.0", - "/Users/drew.heavner/Documents/Github/sign-android-release" - ] - ], - "_from": "@actions/core@1.0.0", - "_id": "@actions/core@1.0.0", + "_from": "@actions/core@1.2.6", + "_id": "@actions/core@1.2.6", "_inBundle": false, - "_integrity": "sha512-aMIlkx96XH4E/2YZtEOeyrYQfhlas9jIRkfGPqMwXD095Rdkzo4lB6ZmbxPQSzD+e1M+Xsm98ZhuSMYGv/AlqA==", + "_integrity": "sha512-ZQYitnqiyBc3D+k7LsgSBmMDVkOVidaagDG7j3fOym77jNunWRuYx7VSHa9GNfFZh+zh61xsCjRj4JxMZlDqTA==", "_location": "/@actions/core", "_phantomChildren": {}, "_requested": { "type": "version", "registry": true, - "raw": "@actions/core@1.0.0", + "raw": "@actions/core@1.2.6", "name": "@actions/core", "escapedName": "@actions%2fcore", "scope": "@actions", - "rawSpec": "1.0.0", + "rawSpec": "1.2.6", "saveSpec": null, - "fetchSpec": "1.0.0" + "fetchSpec": "1.2.6" }, "_requiredBy": [ + "#USER", "/" ], - "_resolved": "https://registry.npmjs.org/@actions/core/-/core-1.0.0.tgz", - "_spec": "1.0.0", + "_resolved": "https://registry.npmjs.org/@actions/core/-/core-1.2.6.tgz", + "_shasum": "a78d49f41a4def18e88ce47c2cac615d5694bf09", + "_spec": "@actions/core@1.2.6", "_where": "/Users/drew.heavner/Documents/Github/sign-android-release", "bugs": { "url": "https://github.com/actions/toolkit/issues" }, + "bundleDependencies": false, + "deprecated": false, "description": "Actions core lib", "devDependencies": { "@types/node": "^12.0.2" @@ -40,13 +38,14 @@ "test": "__tests__" }, "files": [ - "lib" + "lib", + "!.DS_Store" ], - "gitHead": "a40bce7c8d382aa3dbadaa327acbc696e9390e55", - "homepage": "https://github.com/actions/toolkit/tree/master/packages/core", + "homepage": "https://github.com/actions/toolkit/tree/main/packages/core", "keywords": [ - "core", - "actions" + "github", + "actions", + "core" ], "license": "MIT", "main": "lib/core.js", @@ -56,11 +55,14 @@ }, "repository": { "type": "git", - "url": "git+https://github.com/actions/toolkit.git" + "url": "git+https://github.com/actions/toolkit.git", + "directory": "packages/core" }, "scripts": { + "audit-moderate": "npm install && npm audit --json --audit-level=moderate > audit.json", "test": "echo \"Error: run tests from root\" && exit 1", "tsc": "tsc" }, - "version": "1.0.0" + "types": "lib/core.d.ts", + "version": "1.2.6" } diff --git a/node_modules/@actions/exec/LICENSE.md b/node_modules/@actions/exec/LICENSE.md deleted file mode 100644 index e5a73f40e..000000000 --- a/node_modules/@actions/exec/LICENSE.md +++ /dev/null @@ -1,7 +0,0 @@ -Copyright 2019 GitHub - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. \ No newline at end of file diff --git a/node_modules/@actions/exec/README.md b/node_modules/@actions/exec/README.md index e3eff742a..53a6bf524 100644 --- a/node_modules/@actions/exec/README.md +++ b/node_modules/@actions/exec/README.md @@ -4,7 +4,7 @@ #### Basic -You can use this package to execute your tools on the command line in a cross platform way: +You can use this package to execute tools in a cross platform way: ```js const exec = require('@actions/exec'); @@ -48,13 +48,10 @@ await exec.exec('node', ['index.js', 'foo=bar'], options); #### Exec tools not in the PATH -You can use it in conjunction with the `which` function from `@actions/io` to execute tools that are not in the PATH: +You can specify the full path for tools not in the PATH: ```js const exec = require('@actions/exec'); -const io = require('@actions/io'); -const pythonPath: string = await io.which('python', true) - -await exec.exec(`"${pythonPath}"`, ['main.py']); +await exec.exec('"/path/to/my-tool"', ['arg1']); ``` diff --git a/node_modules/@actions/exec/lib/exec.d.ts b/node_modules/@actions/exec/lib/exec.d.ts index 8c64aae3d..390f1c8ea 100644 --- a/node_modules/@actions/exec/lib/exec.d.ts +++ b/node_modules/@actions/exec/lib/exec.d.ts @@ -1,4 +1,5 @@ -import * as im from './interfaces'; +import { ExecOptions } from './interfaces'; +export { ExecOptions }; /** * Exec a command. * Output will be streamed to the live console. @@ -9,4 +10,4 @@ import * as im from './interfaces'; * @param options optional exec options. See ExecOptions * @returns Promise exit code */ -export declare function exec(commandLine: string, args?: string[], options?: im.ExecOptions): Promise; +export declare function exec(commandLine: string, args?: string[], options?: ExecOptions): Promise; diff --git a/node_modules/@actions/exec/lib/exec.js b/node_modules/@actions/exec/lib/exec.js index 2748debcc..ae05ccea1 100644 --- a/node_modules/@actions/exec/lib/exec.js +++ b/node_modules/@actions/exec/lib/exec.js @@ -8,8 +8,15 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge step((generator = generator.apply(thisArg, _arguments || [])).next()); }); }; +var __importStar = (this && this.__importStar) || function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k]; + result["default"] = mod; + return result; +}; Object.defineProperty(exports, "__esModule", { value: true }); -const tr = require("./toolrunner"); +const tr = __importStar(require("./toolrunner")); /** * Exec a command. * Output will be streamed to the live console. diff --git a/node_modules/@actions/exec/lib/exec.js.map b/node_modules/@actions/exec/lib/exec.js.map index 0789521c0..98901dd73 100644 --- a/node_modules/@actions/exec/lib/exec.js.map +++ b/node_modules/@actions/exec/lib/exec.js.map @@ -1 +1 @@ -{"version":3,"file":"exec.js","sourceRoot":"","sources":["../src/exec.ts"],"names":[],"mappings":";;;;;;;;;;;AACA,mCAAkC;AAElC;;;;;;;;;GASG;AACH,SAAsB,IAAI,CACxB,WAAmB,EACnB,IAAe,EACf,OAAwB;;QAExB,MAAM,WAAW,GAAG,EAAE,CAAC,gBAAgB,CAAC,WAAW,CAAC,CAAA;QACpD,IAAI,WAAW,CAAC,MAAM,KAAK,CAAC,EAAE;YAC5B,MAAM,IAAI,KAAK,CAAC,kDAAkD,CAAC,CAAA;SACpE;QACD,8CAA8C;QAC9C,MAAM,QAAQ,GAAG,WAAW,CAAC,CAAC,CAAC,CAAA;QAC/B,IAAI,GAAG,WAAW,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,IAAI,IAAI,EAAE,CAAC,CAAA;QAC9C,MAAM,MAAM,GAAkB,IAAI,EAAE,CAAC,UAAU,CAAC,QAAQ,EAAE,IAAI,EAAE,OAAO,CAAC,CAAA;QACxE,OAAO,MAAM,CAAC,IAAI,EAAE,CAAA;IACtB,CAAC;CAAA;AAdD,oBAcC"} \ No newline at end of file +{"version":3,"file":"exec.js","sourceRoot":"","sources":["../src/exec.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AACA,iDAAkC;AAIlC;;;;;;;;;GASG;AACH,SAAsB,IAAI,CACxB,WAAmB,EACnB,IAAe,EACf,OAAqB;;QAErB,MAAM,WAAW,GAAG,EAAE,CAAC,gBAAgB,CAAC,WAAW,CAAC,CAAA;QACpD,IAAI,WAAW,CAAC,MAAM,KAAK,CAAC,EAAE;YAC5B,MAAM,IAAI,KAAK,CAAC,kDAAkD,CAAC,CAAA;SACpE;QACD,8CAA8C;QAC9C,MAAM,QAAQ,GAAG,WAAW,CAAC,CAAC,CAAC,CAAA;QAC/B,IAAI,GAAG,WAAW,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,IAAI,IAAI,EAAE,CAAC,CAAA;QAC9C,MAAM,MAAM,GAAkB,IAAI,EAAE,CAAC,UAAU,CAAC,QAAQ,EAAE,IAAI,EAAE,OAAO,CAAC,CAAA;QACxE,OAAO,MAAM,CAAC,IAAI,EAAE,CAAA;IACtB,CAAC;CAAA;AAdD,oBAcC"} \ No newline at end of file diff --git a/node_modules/@actions/exec/lib/interfaces.d.ts b/node_modules/@actions/exec/lib/interfaces.d.ts index 186182372..4fef7c1f8 100644 --- a/node_modules/@actions/exec/lib/interfaces.d.ts +++ b/node_modules/@actions/exec/lib/interfaces.d.ts @@ -24,6 +24,8 @@ export interface ExecOptions { ignoreReturnCode?: boolean; /** optional. How long in ms to wait for STDIO streams to close after the exit event of the process before terminating. defaults to 10000 */ delay?: number; + /** optional. input to write to the process on STDIN. */ + input?: Buffer; /** optional. Listeners for output. Callback functions that will be called on these events */ listeners?: { stdout?: (data: Buffer) => void; diff --git a/node_modules/@actions/exec/lib/toolrunner.js b/node_modules/@actions/exec/lib/toolrunner.js index 17d78f31f..d08bb5914 100644 --- a/node_modules/@actions/exec/lib/toolrunner.js +++ b/node_modules/@actions/exec/lib/toolrunner.js @@ -8,10 +8,20 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge step((generator = generator.apply(thisArg, _arguments || [])).next()); }); }; +var __importStar = (this && this.__importStar) || function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k]; + result["default"] = mod; + return result; +}; Object.defineProperty(exports, "__esModule", { value: true }); -const os = require("os"); -const events = require("events"); -const child = require("child_process"); +const os = __importStar(require("os")); +const events = __importStar(require("events")); +const child = __importStar(require("child_process")); +const path = __importStar(require("path")); +const io = __importStar(require("@actions/io")); +const ioUtil = __importStar(require("@actions/io/lib/io-util")); /* eslint-disable @typescript-eslint/unbound-method */ const IS_WINDOWS = process.platform === 'win32'; /* @@ -357,6 +367,16 @@ class ToolRunner extends events.EventEmitter { */ exec() { return __awaiter(this, void 0, void 0, function* () { + // root the tool path if it is unrooted and contains relative pathing + if (!ioUtil.isRooted(this.toolPath) && + (this.toolPath.includes('/') || + (IS_WINDOWS && this.toolPath.includes('\\')))) { + // prefer options.cwd if it is specified, however options.cwd may also need to be rooted + this.toolPath = path.resolve(process.cwd(), this.options.cwd || process.cwd(), this.toolPath); + } + // if the tool is only a file name, then resolve it from the PATH + // otherwise verify it exists (add extension on Windows if necessary) + this.toolPath = yield io.which(this.toolPath, true); return new Promise((resolve, reject) => { this._debug(`exec tool: ${this.toolPath}`); this._debug('arguments:'); @@ -445,6 +465,12 @@ class ToolRunner extends events.EventEmitter { resolve(exitCode); } }); + if (this.options.input) { + if (!cp.stdin) { + throw new Error('child process missing stdin'); + } + cp.stdin.end(this.options.input); + } }); }); } diff --git a/node_modules/@actions/exec/lib/toolrunner.js.map b/node_modules/@actions/exec/lib/toolrunner.js.map index de911ccae..0a52eec2e 100644 --- a/node_modules/@actions/exec/lib/toolrunner.js.map +++ b/node_modules/@actions/exec/lib/toolrunner.js.map @@ -1 +1 @@ -{"version":3,"file":"toolrunner.js","sourceRoot":"","sources":["../src/toolrunner.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,yBAAwB;AACxB,iCAAgC;AAChC,uCAAsC;AAItC,sDAAsD;AAEtD,MAAM,UAAU,GAAG,OAAO,CAAC,QAAQ,KAAK,OAAO,CAAA;AAE/C;;GAEG;AACH,MAAa,UAAW,SAAQ,MAAM,CAAC,YAAY;IACjD,YAAY,QAAgB,EAAE,IAAe,EAAE,OAAwB;QACrE,KAAK,EAAE,CAAA;QAEP,IAAI,CAAC,QAAQ,EAAE;YACb,MAAM,IAAI,KAAK,CAAC,+CAA+C,CAAC,CAAA;SACjE;QAED,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAA;QACxB,IAAI,CAAC,IAAI,GAAG,IAAI,IAAI,EAAE,CAAA;QACtB,IAAI,CAAC,OAAO,GAAG,OAAO,IAAI,EAAE,CAAA;IAC9B,CAAC;IAMO,MAAM,CAAC,OAAe;QAC5B,IAAI,IAAI,CAA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AI,CAAC,QAAQ,sEAAsE,CACpG,CAAA;aACF;SACF;QAED,oBAAoB;QACpB,IAAI,IAAI,CAAC,OAAO,EAAE;YAChB,YAAY,CAAC,IAAI,CAAC,OAAO,CAAC,CAAA;YAC1B,IAAI,CAAC,OAAO,GAAG,IAAI,CAAA;SACpB;QAED,IAAI,CAAC,IAAI,GAAG,IAAI,CAAA;QAChB,IAAI,CAAC,IAAI,CAAC,MAAM,EAAE,KAAK,EAAE,IAAI,CAAC,eAAe,CAAC,CAAA;IAChD,CAAC;IAEO,MAAM,CAAC,aAAa,CAAC,KAAgB;QAC3C,IAAI,KAAK,CAAC,IAAI,EAAE;YACd,OAAM;SACP;QAED,IAAI,CAAC,KAAK,CAAC,aAAa,IAAI,KAAK,CAAC,aAAa,EAAE;YAC/C,MAAM,OAAO,GAAG,0CAA0C,KAAK,CAAC,KAAK;gBACnE,IAAI,4CACJ,KAAK,CAAC,QACR,0FAA0F,CAAA;YAC1F,KAAK,CAAC,MAAM,CAAC,OAAO,CAAC,CAAA;SACtB;QAED,KAAK,CAAC,UAAU,EAAE,CAAA;IACpB,CAAC;CACF"} \ No newline at end of file diff --git a/node_modules/@actions/exec/package.json b/node_modules/@actions/exec/package.json index 853ab9477..b984dd604 100644 --- a/node_modules/@actions/exec/package.json +++ b/node_modules/@actions/exec/package.json @@ -1,40 +1,38 @@ { - "_args": [ - [ - "@actions/exec@1.0.1", - "/Users/drew.heavner/Documents/Github/sign-android-release" - ] - ], - "_from": "@actions/exec@1.0.1", - "_id": "@actions/exec@1.0.1", + "_from": "@actions/exec@1.0.4", + "_id": "@actions/exec@1.0.4", "_inBundle": false, - "_integrity": "sha512-nvFkxwiicvpzNiCBF4wFBDfnBvi7xp/as7LE1hBxBxKG2L29+gkIPBiLKMVORL+Hg3JNf07AKRfl0V5djoypjQ==", + "_integrity": "sha512-4DPChWow9yc9W3WqEbUj8Nr86xkpyE29ZzWjXucHItclLbEW6jr80Zx4nqv18QL6KK65+cifiQZXvnqgTV6oHw==", "_location": "/@actions/exec", "_phantomChildren": {}, "_requested": { "type": "version", "registry": true, - "raw": "@actions/exec@1.0.1", + "raw": "@actions/exec@1.0.4", "name": "@actions/exec", "escapedName": "@actions%2fexec", "scope": "@actions", - "rawSpec": "1.0.1", + "rawSpec": "1.0.4", "saveSpec": null, - "fetchSpec": "1.0.1" + "fetchSpec": "1.0.4" }, "_requiredBy": [ + "#USER", "/" ], - "_resolved": "https://registry.npmjs.org/@actions/exec/-/exec-1.0.1.tgz", - "_spec": "1.0.1", + "_resolved": "https://registry.npmjs.org/@actions/exec/-/exec-1.0.4.tgz", + "_shasum": "99d75310e62e59fc37d2ee6dcff6d4bffadd3a5d", + "_spec": "@actions/exec@1.0.4", "_where": "/Users/drew.heavner/Documents/Github/sign-android-release", "bugs": { "url": "https://github.com/actions/toolkit/issues" }, - "description": "Actions exec lib", - "devDependencies": { + "bundleDependencies": false, + "dependencies": { "@actions/io": "^1.0.1" }, + "deprecated": false, + "description": "Actions exec lib", "directories": { "lib": "lib", "test": "__tests__" @@ -42,7 +40,6 @@ "files": [ "lib" ], - "gitHead": "a2ab4bcf78e4f7080f0d45856e6eeba16f0bbc52", "homepage": "https://github.com/actions/toolkit/tree/master/packages/exec", "keywords": [ "github", @@ -57,11 +54,14 @@ }, "repository": { "type": "git", - "url": "git+https://github.com/actions/toolkit.git" + "url": "git+https://github.com/actions/toolkit.git", + "directory": "packages/exec" }, "scripts": { + "audit-moderate": "npm install && npm audit --audit-level=moderate", "test": "echo \"Error: run tests from root\" && exit 1", "tsc": "tsc" }, - "version": "1.0.1" + "types": "lib/exec.d.ts", + "version": "1.0.4" } diff --git a/node_modules/@actions/io/LICENSE.md b/node_modules/@actions/io/LICENSE.md deleted file mode 100644 index e5a73f40e..000000000 --- a/node_modules/@actions/io/LICENSE.md +++ /dev/null @@ -1,7 +0,0 @@ -Copyright 2019 GitHub - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. \ No newline at end of file diff --git a/node_modules/@actions/io/package.json b/node_modules/@actions/io/package.json index f5d84277b..400c432d5 100644 --- a/node_modules/@actions/io/package.json +++ b/node_modules/@actions/io/package.json @@ -1,28 +1,29 @@ { - "_from": "@actions/io", - "_id": "@actions/io@1.0.1", + "_from": "@actions/io@1.0.2", + "_id": "@actions/io@1.0.2", "_inBundle": false, - "_integrity": "sha512-rhq+tfZukbtaus7xyUtwKfuiCRXd1hWSfmJNEpFgBQJ4woqPEpsBw04awicjwz9tyG2/MVhAEMfVn664Cri5zA==", + "_integrity": "sha512-J8KuFqVPr3p6U8W93DOXlXW6zFvrQAJANdS+vw0YhusLIq+bszW8zmK2Fh1C2kDPX8FMvwIl1OUcFgvJoXLbAg==", "_location": "/@actions/io", "_phantomChildren": {}, "_requested": { - "type": "tag", + "type": "version", "registry": true, - "raw": "@actions/io", + "raw": "@actions/io@1.0.2", "name": "@actions/io", "escapedName": "@actions%2fio", "scope": "@actions", - "rawSpec": "", + "rawSpec": "1.0.2", "saveSpec": null, - "fetchSpec": "latest" + "fetchSpec": "1.0.2" }, "_requiredBy": [ "#USER", - "/" + "/", + "/@actions/exec" ], - "_resolved": "https://registry.npmjs.org/@actions/io/-/io-1.0.1.tgz", - "_shasum": "81a9418fe2bbdef2d2717a8e9f85188b9c565aca", - "_spec": "@actions/io", + "_resolved": "https://registry.npmjs.org/@actions/io/-/io-1.0.2.tgz", + "_shasum": "2f614b6e69ce14d191180451eb38e6576a6e6b27", + "_spec": "@actions/io@1.0.2", "_where": "/Users/drew.heavner/Documents/Github/sign-android-release", "bugs": { "url": "https://github.com/actions/toolkit/issues" @@ -37,7 +38,6 @@ "files": [ "lib" ], - "gitHead": "a2ab4bcf78e4f7080f0d45856e6eeba16f0bbc52", "homepage": "https://github.com/actions/toolkit/tree/master/packages/io", "keywords": [ "github", @@ -52,11 +52,14 @@ }, "repository": { "type": "git", - "url": "git+https://github.com/actions/toolkit.git" + "url": "git+https://github.com/actions/toolkit.git", + "directory": "packages/io" }, "scripts": { + "audit-moderate": "npm install && npm audit --audit-level=moderate", "test": "echo \"Error: run tests from root\" && exit 1", "tsc": "tsc" }, - "version": "1.0.1" + "types": "lib/io.d.ts", + "version": "1.0.2" } diff --git a/node_modules/@babel/core/lib/config/caching.js b/node_modules/@babel/core/lib/config/caching.js index 35f127ad8..acd576b1c 100644 --- a/node_modules/@babel/core/lib/config/caching.js +++ b/node_modules/@babel/core/lib/config/caching.js @@ -3,74 +3,177 @@ Object.defineProperty(exports, "__esModule", { value: true }); -exports.makeStrongCache = makeStrongCache; exports.makeWeakCache = makeWeakCache; +exports.makeWeakCacheSync = makeWeakCacheSync; +exports.makeStrongCache = makeStrongCache; +exports.makeStrongCacheSync = makeStrongCacheSync; exports.assertSimpleType = assertSimpleType; -function makeStrongCache(handler) { - return makeCachedFunction(new Map(), handler); +function _gensync() { + const data = _interopRequireDefault(require("gensync")); + + _gensync = function () { + return data; + }; + + return data; +} + +var _async = require("../gensync-utils/async"); + +var _util = require("./util"); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +const synchronize = gen => { + return (0, _gensync().default)(gen).sync; +}; + +function* genTrue(data) { + return true; } function makeWeakCache(handler) { - return makeCachedFunction(new WeakMap(), handler); + return makeCachedFunction(WeakMap, handler); } -function makeCachedFunction(callCache, handler) { - return function cachedFunction(arg, data) { - let cachedValue = callCache.get(arg); +function makeWeakCacheSync(handler) { + return synchronize(makeWeakCache(handler)); +} - if (cachedValue) { - for (const _ref of cachedValue) { - const { - value, - valid - } = _ref; - if (valid(data)) return value; - } - } +function makeStrongCache(handler) { + return makeCachedFunction(Map, handler); +} - const cache = new CacheConfigurator(data); - const value = handler(arg, cache); - if (!cache.configured()) cache.forever(); - cache.deactivate(); +function makeStrongCacheSync(handler) { + return synchronize(makeStrongCache(handler)); +} - switch (cache.mode()) { - case "forever": - cachedValue = [{ - value, - valid: () => true - }]; - callCache.set(arg, cachedValue); - break; +function makeCachedFunction(CallCache, handler) { + const callCacheSync = new CallCache(); + const callCacheAsync = new CallCache(); + const futureCache = new CallCache(); + return function* cachedFunction(arg, data) { + const asyncContext = yield* (0, _async.isAsync)(); + const callCache = asyncContext ? callCacheAsync : callCacheSync; + const cached = yield* getCachedValueOrWait(asyncContext, callCache, futureCache, arg, data); + if (cached.valid) return cached.value; + const cache = new CacheConfigurator(data); + const handlerResult = handler(arg, cache); + let finishLock; + let value; + + if ((0, _util.isIterableIterator)(handlerResult)) { + const gen = handlerResult; + value = yield* (0, _async.onFirstPause)(gen, () => { + finishLock = setupAsyncLocks(cache, futureCache, arg); + }); + } else { + value = handlerResult; + } - case "invalidate": - cachedValue = [{ - value, - valid: cache.validator() - }]; - callCache.set(arg, cachedValue); - break; - - case "valid": - if (cachedValue) { - cachedValue.push({ - value, - valid: cache.validator() - }); - } else { - cachedValue = [{ - value, - valid: cache.validator() - }]; - callCache.set(arg, cachedValue); - } + updateFunctionCache(callCache, cache, arg, value); + if (finishLock) { + futureCache.delete(arg); + finishLock.release(value); } return value; }; } +function* getCachedValue(cache, arg, data) { + const cachedValue = cache.get(arg); + + if (cachedValue) { + for (const { + value, + valid + } of cachedValue) { + if (yield* valid(data)) return { + valid: true, + value + }; + } + } + + return { + valid: false, + value: null + }; +} + +function* getCachedValueOrWait(asyncContext, callCache, futureCache, arg, data) { + const cached = yield* getCachedValue(callCache, arg, data); + + if (cached.valid) { + return cached; + } + + if (asyncContext) { + const cached = yield* getCachedValue(futureCache, arg, data); + + if (cached.valid) { + const value = yield* (0, _async.waitFor)(cached.value.promise); + return { + valid: true, + value + }; + } + } + + return { + valid: false, + value: null + }; +} + +function setupAsyncLocks(config, futureCache, arg) { + const finishLock = new Lock(); + updateFunctionCache(futureCache, config, arg, finishLock); + return finishLock; +} + +function updateFunctionCache(cache, config, arg, value) { + if (!config.configured()) config.forever(); + let cachedValue = cache.get(arg); + config.deactivate(); + + switch (config.mode()) { + case "forever": + cachedValue = [{ + value, + valid: genTrue + }]; + cache.set(arg, cachedValue); + break; + + case "invalidate": + cachedValue = [{ + value, + valid: config.validator() + }]; + cache.set(arg, cachedValue); + break; + + case "valid": + if (cachedValue) { + cachedValue.push({ + value, + valid: config.validator() + }); + } else { + cachedValue = [{ + value, + valid: config.validator() + }]; + cache.set(arg, cachedValue); + } + + } +} + class CacheConfigurator { constructor(data) { this._active = true; @@ -79,6 +182,7 @@ class CacheConfigurator { this._invalidate = false; this._configured = false; this._pairs = []; + this._data = void 0; this._data = data; } @@ -130,33 +234,35 @@ class CacheConfigurator { this._configured = true; const key = handler(this._data); + const fn = (0, _async.maybeAsync)(handler, `You appear to be using an async cache handler, but Babel has been called synchronously`); + + if ((0, _async.isThenable)(key)) { + return key.then(key => { + this._pairs.push([key, fn]); + + return key; + }); + } - this._pairs.push([key, handler]); + this._pairs.push([key, fn]); return key; } invalidate(handler) { - if (!this._active) { - throw new Error("Cannot change caching after evaluation has completed."); - } - - if (this._never || this._forever) { - throw new Error("Caching has already been configured with .never or .forever()"); - } - this._invalidate = true; - this._configured = true; - const key = handler(this._data); - - this._pairs.push([key, handler]); - - return key; + return this.using(handler); } validator() { const pairs = this._pairs; - return data => pairs.every(([key, fn]) => key === fn(data)); + return function* (data) { + for (const [key, fn] of pairs) { + if (key !== (yield* fn(data))) return false; + } + + return true; + }; } deactivate() { @@ -191,9 +297,31 @@ function makeSimpleConfigurator(cache) { } function assertSimpleType(value) { + if ((0, _async.isThenable)(value)) { + throw new Error(`You appear to be using an async cache handler, ` + `which your current version of Babel does not support. ` + `We may add support for this in the future, ` + `but if you're on the most recent version of @babel/core and still ` + `seeing this error, then you'll need to synchronously handle your caching logic.`); + } + if (value != null && typeof value !== "string" && typeof value !== "boolean" && typeof value !== "number") { throw new Error("Cache keys must be either string, boolean, number, null, or undefined."); } return value; +} + +class Lock { + constructor() { + this.released = false; + this.promise = void 0; + this._resolve = void 0; + this.promise = new Promise(resolve => { + this._resolve = resolve; + }); + } + + release(value) { + this.released = true; + + this._resolve(value); + } + } \ No newline at end of file diff --git a/node_modules/@babel/core/lib/config/config-chain.js b/node_modules/@babel/core/lib/config/config-chain.js index 8531aae55..60116cb41 100644 --- a/node_modules/@babel/core/lib/config/config-chain.js +++ b/node_modules/@babel/core/lib/config/config-chain.js @@ -31,6 +31,8 @@ var _options = require("./validation/options"); var _patternToRegex = _interopRequireDefault(require("./pattern-to-regex")); +var _printer = require("./printer"); + var _files = require("./files"); var _caching = require("./caching"); @@ -41,41 +43,45 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de const debug = (0, _debug().default)("babel:config:config-chain"); -function buildPresetChain(arg, context) { - const chain = buildPresetChainWalker(arg, context); +function* buildPresetChain(arg, context) { + const chain = yield* buildPresetChainWalker(arg, context); if (!chain) return null; return { plugins: dedupDescriptors(chain.plugins), presets: dedupDescriptors(chain.presets), - options: chain.options.map(o => normalizeOptions(o)) + options: chain.options.map(o => normalizeOptions(o)), + files: new Set() }; } const buildPresetChainWalker = makeChainWalker({ - init: arg => arg, root: preset => loadPresetDescriptors(preset), env: (preset, envName) => loadPresetEnvDescriptors(preset)(envName), overrides: (preset, index) => loadPresetOverridesDescriptors(preset)(index), - overridesEnv: (preset, index, envName) => loadPresetOverridesEnvDescriptors(preset)(index)(envName) + overridesEnv: (preset, index, envName) => loadPresetOverridesEnvDescriptors(preset)(index)(envName), + createLogger: () => () => {} }); exports.buildPresetChainWalker = buildPresetChainWalker; -const loadPresetDescriptors = (0, _caching.makeWeakCache)(preset => buildRootDescriptors(preset, preset.alias, _configDescriptors.createUncachedDescriptors)); -const loadPresetEnvDescriptors = (0, _caching.makeWeakCache)(preset => (0, _caching.makeStrongCache)(envName => buildEnvDescriptors(preset, preset.alias, _configDescriptors.createUncachedDescriptors, envName))); -const loadPresetOverridesDescriptors = (0, _caching.makeWeakCache)(preset => (0, _caching.makeStrongCache)(index => buildOverrideDescriptors(preset, preset.alias, _configDescriptors.createUncachedDescriptors, index))); -const loadPresetOverridesEnvDescriptors = (0, _caching.makeWeakCache)(preset => (0, _caching.makeStrongCache)(index => (0, _caching.makeStrongCache)(envName => buildOverrideEnvDescriptors(preset, preset.alias, _configDescriptors.createUncachedDescriptors, index, envName)))); - -function buildRootChain(opts, context) { - const programmaticChain = loadProgrammaticChain({ +const loadPresetDescriptors = (0, _caching.makeWeakCacheSync)(preset => buildRootDescriptors(preset, preset.alias, _configDescriptors.createUncachedDescriptors)); +const loadPresetEnvDescriptors = (0, _caching.makeWeakCacheSync)(preset => (0, _caching.makeStrongCacheSync)(envName => buildEnvDescriptors(preset, preset.alias, _configDescriptors.createUncachedDescriptors, envName))); +const loadPresetOverridesDescriptors = (0, _caching.makeWeakCacheSync)(preset => (0, _caching.makeStrongCacheSync)(index => buildOverrideDescriptors(preset, preset.alias, _configDescriptors.createUncachedDescriptors, index))); +const loadPresetOverridesEnvDescriptors = (0, _caching.makeWeakCacheSync)(preset => (0, _caching.makeStrongCacheSync)(index => (0, _caching.makeStrongCacheSync)(envName => buildOverrideEnvDescriptors(preset, preset.alias, _configDescriptors.createUncachedDescriptors, index, envName)))); + +function* buildRootChain(opts, context) { + let configReport, babelRcReport; + const programmaticLogger = new _printer.ConfigPrinter(); + const programmaticChain = yield* loadProgrammaticChain({ options: opts, dirname: context.cwd - }, context); + }, context, undefined, programmaticLogger); if (!programmaticChain) return null; + const programmaticReport = programmaticLogger.output(); let configFile; if (typeof opts.configFile === "string") { - configFile = (0, _files.loadConfig)(opts.configFile, context.cwd, context.envName, context.caller); + configFile = yield* (0, _files.loadConfig)(opts.configFile, context.cwd, context.envName, context.caller); } else if (opts.configFile !== false) { - configFile = (0, _files.findRootConfig)(context.root, context.envName, context.caller); + configFile = yield* (0, _files.findRootConfig)(context.root, context.envName, context.caller); } let { @@ -84,11 +90,13 @@ function buildRootChain(opts, context) { } = opts; let babelrcRootsDirectory = context.cwd; const configFileChain = emptyChain(); + const configFileLogger = new _printer.ConfigPrinter(); if (configFile) { const validatedFile = validateConfigFile(configFile); - const result = loadFileChain(validatedFile, context); + const result = yield* loadFileChain(validatedFile, context, undefined, configFileLogger); if (!result) return null; + configReport = configFileLogger.output(); if (babelrc === undefined) { babelrc = validatedFile.options.babelrc; @@ -102,35 +110,58 @@ function buildRootChain(opts, context) { mergeChain(configFileChain, result); } - const pkgData = typeof context.filename === "string" ? (0, _files.findPackageData)(context.filename) : null; + const pkgData = typeof context.filename === "string" ? yield* (0, _files.findPackageData)(context.filename) : null; let ignoreFile, babelrcFile; + let isIgnored = false; const fileChain = emptyChain(); if ((babelrc === true || babelrc === undefined) && pkgData && babelrcLoadEnabled(context, pkgData, babelrcRoots, babelrcRootsDirectory)) { ({ ignore: ignoreFile, config: babelrcFile - } = (0, _files.findRelativeConfig)(pkgData, context.envName, context.caller)); + } = yield* (0, _files.findRelativeConfig)(pkgData, context.envName, context.caller)); + + if (ignoreFile) { + fileChain.files.add(ignoreFile.filepath); + } if (ignoreFile && shouldIgnore(context, ignoreFile.ignore, null, ignoreFile.dirname)) { - return null; + isIgnored = true; } - if (babelrcFile) { - const result = loadFileChain(validateBabelrcFile(babelrcFile), context); - if (!result) return null; - mergeChain(fileChain, result); + if (babelrcFile && !isIgnored) { + const validatedFile = validateBabelrcFile(babelrcFile); + const babelrcLogger = new _printer.ConfigPrinter(); + const result = yield* loadFileChain(validatedFile, context, undefined, babelrcLogger); + + if (!result) { + isIgnored = true; + } else { + babelRcReport = babelrcLogger.output(); + mergeChain(fileChain, result); + } } + + if (babelrcFile && isIgnored) { + fileChain.files.add(babelrcFile.filepath); + } + } + + if (context.showConfig) { + console.log(`Babel configs on "${context.filename}" (ascending priority):\n` + [configReport, babelRcReport, programmaticReport].filter(x => !!x).join("\n\n")); + return null; } const chain = mergeChain(mergeChain(mergeChain(emptyChain(), configFileChain), fileChain), programmaticChain); return { - plugins: dedupDescriptors(chain.plugins), - presets: dedupDescriptors(chain.presets), - options: chain.options.map(o => normalizeOptions(o)), + plugins: isIgnored ? [] : dedupDescriptors(chain.plugins), + presets: isIgnored ? [] : dedupDescriptors(chain.presets), + options: isIgnored ? [] : chain.options.map(o => normalizeOptions(o)), + fileHandling: isIgnored ? "ignored" : "transpile", ignore: ignoreFile || undefined, babelrc: babelrcFile || undefined, - config: configFile || undefined + config: configFile || undefined, + files: chain.files }; } @@ -163,17 +194,17 @@ function babelrcLoadEnabled(context, pkgData, babelrcRoots, babelrcRootsDirector }); } -const validateConfigFile = (0, _caching.makeWeakCache)(file => ({ +const validateConfigFile = (0, _caching.makeWeakCacheSync)(file => ({ filepath: file.filepath, dirname: file.dirname, options: (0, _options.validate)("configfile", file.options) })); -const validateBabelrcFile = (0, _caching.makeWeakCache)(file => ({ +const validateBabelrcFile = (0, _caching.makeWeakCacheSync)(file => ({ filepath: file.filepath, dirname: file.dirname, options: (0, _options.validate)("babelrcfile", file.options) })); -const validateExtendFile = (0, _caching.makeWeakCache)(file => ({ +const validateExtendFile = (0, _caching.makeWeakCacheSync)(file => ({ filepath: file.filepath, dirname: file.dirname, options: (0, _options.validate)("extendsfile", file.options) @@ -182,18 +213,41 @@ const loadProgrammaticChain = makeChainWalker({ root: input => buildRootDescriptors(input, "base", _configDescriptors.createCachedDescriptors), env: (input, envName) => buildEnvDescriptors(input, "base", _configDescriptors.createCachedDescriptors, envName), overrides: (input, index) => buildOverrideDescriptors(input, "base", _configDescriptors.createCachedDescriptors, index), - overridesEnv: (input, index, envName) => buildOverrideEnvDescriptors(input, "base", _configDescriptors.createCachedDescriptors, index, envName) + overridesEnv: (input, index, envName) => buildOverrideEnvDescriptors(input, "base", _configDescriptors.createCachedDescriptors, index, envName), + createLogger: (input, context, baseLogger) => buildProgrammaticLogger(input, context, baseLogger) }); -const loadFileChain = makeChainWalker({ +const loadFileChainWalker = makeChainWalker({ root: file => loadFileDescriptors(file), env: (file, envName) => loadFileEnvDescriptors(file)(envName), overrides: (file, index) => loadFileOverridesDescriptors(file)(index), - overridesEnv: (file, index, envName) => loadFileOverridesEnvDescriptors(file)(index)(envName) + overridesEnv: (file, index, envName) => loadFileOverridesEnvDescriptors(file)(index)(envName), + createLogger: (file, context, baseLogger) => buildFileLogger(file.filepath, context, baseLogger) }); -const loadFileDescriptors = (0, _caching.makeWeakCache)(file => buildRootDescriptors(file, file.filepath, _configDescriptors.createUncachedDescriptors)); -const loadFileEnvDescriptors = (0, _caching.makeWeakCache)(file => (0, _caching.makeStrongCache)(envName => buildEnvDescriptors(file, file.filepath, _configDescriptors.createUncachedDescriptors, envName))); -const loadFileOverridesDescriptors = (0, _caching.makeWeakCache)(file => (0, _caching.makeStrongCache)(index => buildOverrideDescriptors(file, file.filepath, _configDescriptors.createUncachedDescriptors, index))); -const loadFileOverridesEnvDescriptors = (0, _caching.makeWeakCache)(file => (0, _caching.makeStrongCache)(index => (0, _caching.makeStrongCache)(envName => buildOverrideEnvDescriptors(file, file.filepath, _configDescriptors.createUncachedDescriptors, index, envName)))); + +function* loadFileChain(input, context, files, baseLogger) { + const chain = yield* loadFileChainWalker(input, context, files, baseLogger); + + if (chain) { + chain.files.add(input.filepath); + } + + return chain; +} + +const loadFileDescriptors = (0, _caching.makeWeakCacheSync)(file => buildRootDescriptors(file, file.filepath, _configDescriptors.createUncachedDescriptors)); +const loadFileEnvDescriptors = (0, _caching.makeWeakCacheSync)(file => (0, _caching.makeStrongCacheSync)(envName => buildEnvDescriptors(file, file.filepath, _configDescriptors.createUncachedDescriptors, envName))); +const loadFileOverridesDescriptors = (0, _caching.makeWeakCacheSync)(file => (0, _caching.makeStrongCacheSync)(index => buildOverrideDescriptors(file, file.filepath, _configDescriptors.createUncachedDescriptors, index))); +const loadFileOverridesEnvDescriptors = (0, _caching.makeWeakCacheSync)(file => (0, _caching.makeStrongCacheSync)(index => (0, _caching.makeStrongCacheSync)(envName => buildOverrideEnvDescriptors(file, file.filepath, _configDescriptors.createUncachedDescriptors, index, envName)))); + +function buildFileLogger(filepath, context, baseLogger) { + if (!baseLogger) { + return () => {}; + } + + return baseLogger.configure(context.showConfig, _printer.ChainFormatter.Config, { + filepath + }); +} function buildRootDescriptors({ dirname, @@ -202,6 +256,18 @@ function buildRootDescriptors({ return descriptors(dirname, options, alias); } +function buildProgrammaticLogger(_, context, baseLogger) { + var _context$caller; + + if (!baseLogger) { + return () => {}; + } + + return baseLogger.configure(context.showConfig, _printer.ChainFormatter.Programmatic, { + callerName: (_context$caller = context.caller) == null ? void 0 : _context$caller.name + }); +} + function buildEnvDescriptors({ dirname, options @@ -233,9 +299,10 @@ function makeChainWalker({ root, env, overrides, - overridesEnv + overridesEnv, + createLogger }) { - return (input, context, files = new Set()) => { + return function* (input, context, files = new Set(), baseLogger) { const { dirname } = input; @@ -243,60 +310,84 @@ function makeChainWalker({ const rootOpts = root(input); if (configIsApplicable(rootOpts, dirname, context)) { - flattenedConfigs.push(rootOpts); + flattenedConfigs.push({ + config: rootOpts, + envName: undefined, + index: undefined + }); const envOpts = env(input, context.envName); if (envOpts && configIsApplicable(envOpts, dirname, context)) { - flattenedConfigs.push(envOpts); + flattenedConfigs.push({ + config: envOpts, + envName: context.envName, + index: undefined + }); } (rootOpts.options.overrides || []).forEach((_, index) => { const overrideOps = overrides(input, index); if (configIsApplicable(overrideOps, dirname, context)) { - flattenedConfigs.push(overrideOps); + flattenedConfigs.push({ + config: overrideOps, + index, + envName: undefined + }); const overrideEnvOpts = overridesEnv(input, index, context.envName); if (overrideEnvOpts && configIsApplicable(overrideEnvOpts, dirname, context)) { - flattenedConfigs.push(overrideEnvOpts); + flattenedConfigs.push({ + config: overrideEnvOpts, + index, + envName: context.envName + }); } } }); } if (flattenedConfigs.some(({ - options: { - ignore, - only + config: { + options: { + ignore, + only + } } }) => shouldIgnore(context, ignore, only, dirname))) { return null; } const chain = emptyChain(); - - for (const op of flattenedConfigs) { - if (!mergeExtendsChain(chain, op.options, dirname, context, files)) { + const logger = createLogger(input, context, baseLogger); + + for (const { + config, + index, + envName + } of flattenedConfigs) { + if (!(yield* mergeExtendsChain(chain, config.options, dirname, context, files, baseLogger))) { return null; } - mergeChainOpts(chain, op); + logger(config, index, envName); + mergeChainOpts(chain, config); } return chain; }; } -function mergeExtendsChain(chain, opts, dirname, context, files) { +function* mergeExtendsChain(chain, opts, dirname, context, files, baseLogger) { if (opts.extends === undefined) return true; - const file = (0, _files.loadConfig)(opts.extends, dirname, context.envName, context.caller); + const file = yield* (0, _files.loadConfig)(opts.extends, dirname, context.envName, context.caller); if (files.has(file)) { throw new Error(`Configuration cycle detected loading ${file.filepath}.\n` + `File already loaded following the config chain:\n` + Array.from(files, file => ` - ${file.filepath}`).join("\n")); } files.add(file); - const fileChain = loadFileChain(validateExtendFile(file), context, files); + const fileChain = yield* loadFileChain(validateExtendFile(file), context, files, baseLogger); files.delete(file); if (!fileChain) return false; mergeChain(chain, fileChain); @@ -307,6 +398,11 @@ function mergeChain(target, source) { target.options.push(...source.options); target.plugins.push(...source.plugins); target.presets.push(...source.presets); + + for (const file of source.files) { + target.files.add(file); + } + return target; } @@ -325,7 +421,8 @@ function emptyChain() { return { options: [], presets: [], - plugins: [] + plugins: [], + files: new Set() }; } @@ -343,7 +440,7 @@ function normalizeOptions(opts) { delete options.include; delete options.exclude; - if (options.hasOwnProperty("sourceMap")) { + if (Object.prototype.hasOwnProperty.call(options, "sourceMap")) { options.sourceMaps = options.sourceMap; delete options.sourceMap; } @@ -402,12 +499,28 @@ function configFieldIsApplicable(context, test, dirname) { function shouldIgnore(context, ignore, only, dirname) { if (ignore && matchesPatterns(context, ignore, dirname)) { - debug("Ignored %o because it matched one of %O from %o", context.filename, ignore, dirname); + var _context$filename; + + const message = `No config is applied to "${(_context$filename = context.filename) != null ? _context$filename : "(unknown)"}" because it matches one of \`ignore: ${JSON.stringify(ignore)}\` from "${dirname}"`; + debug(message); + + if (context.showConfig) { + console.log(message); + } + return true; } if (only && !matchesPatterns(context, only, dirname)) { - debug("Ignored %o because it failed to match one of %O from %o", context.filename, only, dirname); + var _context$filename2; + + const message = `No config is applied to "${(_context$filename2 = context.filename) != null ? _context$filename2 : "(unknown)"}" because it fails to match one of \`only: ${JSON.stringify(only)}\` from "${dirname}"`; + debug(message); + + if (context.showConfig) { + console.log(message); + } + return true; } diff --git a/node_modules/@babel/core/lib/config/config-descriptors.js b/node_modules/@babel/core/lib/config/config-descriptors.js index 49964742d..62efa7126 100644 --- a/node_modules/@babel/core/lib/config/config-descriptors.js +++ b/node_modules/@babel/core/lib/config/config-descriptors.js @@ -53,14 +53,14 @@ function createUncachedDescriptors(dirname, options, alias) { } const PRESET_DESCRIPTOR_CACHE = new WeakMap(); -const createCachedPresetDescriptors = (0, _caching.makeWeakCache)((items, cache) => { +const createCachedPresetDescriptors = (0, _caching.makeWeakCacheSync)((items, cache) => { const dirname = cache.using(dir => dir); - return (0, _caching.makeStrongCache)(alias => (0, _caching.makeStrongCache)(passPerPreset => createPresetDescriptors(items, dirname, alias, passPerPreset).map(desc => loadCachedDescriptor(PRESET_DESCRIPTOR_CACHE, desc)))); + return (0, _caching.makeStrongCacheSync)(alias => (0, _caching.makeStrongCacheSync)(passPerPreset => createPresetDescriptors(items, dirname, alias, passPerPreset).map(desc => loadCachedDescriptor(PRESET_DESCRIPTOR_CACHE, desc)))); }); const PLUGIN_DESCRIPTOR_CACHE = new WeakMap(); -const createCachedPluginDescriptors = (0, _caching.makeWeakCache)((items, cache) => { +const createCachedPluginDescriptors = (0, _caching.makeWeakCacheSync)((items, cache) => { const dirname = cache.using(dir => dir); - return (0, _caching.makeStrongCache)(alias => createPluginDescriptors(items, dirname, alias).map(desc => loadCachedDescriptor(PLUGIN_DESCRIPTOR_CACHE, desc))); + return (0, _caching.makeStrongCacheSync)(alias => createPluginDescriptors(items, dirname, alias).map(desc => loadCachedDescriptor(PLUGIN_DESCRIPTOR_CACHE, desc))); }); const DEFAULT_OPTIONS = {}; @@ -202,7 +202,8 @@ function assertNoDuplicates(items) { } if (nameMap.has(item.name)) { - throw new Error([`Duplicate plugin/preset detected.`, `If you'd like to use two separate instances of a plugin,`, `they need separate names, e.g.`, ``, ` plugins: [`, ` ['some-plugin', {}],`, ` ['some-plugin', {}, 'some unique name'],`, ` ]`].join("\n")); + const conflicts = items.filter(i => i.value === item.value); + throw new Error([`Duplicate plugin/preset detected.`, `If you'd like to use two separate instances of a plugin,`, `they need separate names, e.g.`, ``, ` plugins: [`, ` ['some-plugin', {}],`, ` ['some-plugin', {}, 'some unique name'],`, ` ]`, ``, `Duplicates detected are:`, `${JSON.stringify(conflicts, null, 2)}`].join("\n")); } nameMap.add(item.name); diff --git a/node_modules/@babel/core/lib/config/files/configuration.js b/node_modules/@babel/core/lib/config/files/configuration.js index 5436e3112..999c3269c 100644 --- a/node_modules/@babel/core/lib/config/files/configuration.js +++ b/node_modules/@babel/core/lib/config/files/configuration.js @@ -7,6 +7,8 @@ exports.findConfigUpwards = findConfigUpwards; exports.findRelativeConfig = findRelativeConfig; exports.findRootConfig = findRootConfig; exports.loadConfig = loadConfig; +exports.resolveShowConfigPath = resolveShowConfigPath; +exports.ROOT_CONFIG_FILENAMES = void 0; function _debug() { const data = _interopRequireDefault(require("debug")); @@ -28,16 +30,6 @@ function _path() { return data; } -function _fs() { - const data = _interopRequireDefault(require("fs")); - - _fs = function () { - return data; - }; - - return data; -} - function _json() { const data = _interopRequireDefault(require("json5")); @@ -48,10 +40,10 @@ function _json() { return data; } -function _resolve() { - const data = _interopRequireDefault(require("resolve")); +function _gensync() { + const data = _interopRequireDefault(require("gensync")); - _resolve = function () { + _gensync = function () { return data; }; @@ -64,22 +56,34 @@ var _configApi = _interopRequireDefault(require("../helpers/config-api")); var _utils = require("./utils"); +var _moduleTypes = _interopRequireDefault(require("./module-types")); + var _patternToRegex = _interopRequireDefault(require("../pattern-to-regex")); +var fs = _interopRequireWildcard(require("../../gensync-utils/fs")); + +var _resolve = _interopRequireDefault(require("../../gensync-utils/resolve")); + +function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function () { return cache; }; return cache; } + +function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; } + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } const debug = (0, _debug().default)("babel:config:loading:files:configuration"); -const BABEL_CONFIG_JS_FILENAME = "babel.config.js"; -const BABELRC_FILENAME = ".babelrc"; -const BABELRC_JS_FILENAME = ".babelrc.js"; +const ROOT_CONFIG_FILENAMES = ["babel.config.js", "babel.config.cjs", "babel.config.mjs", "babel.config.json"]; +exports.ROOT_CONFIG_FILENAMES = ROOT_CONFIG_FILENAMES; +const RELATIVE_CONFIG_FILENAMES = [".babelrc", ".babelrc.js", ".babelrc.cjs", ".babelrc.mjs", ".babelrc.json"]; const BABELIGNORE_FILENAME = ".babelignore"; -function findConfigUpwards(rootDir) { +function* findConfigUpwards(rootDir) { let dirname = rootDir; while (true) { - if (_fs().default.existsSync(_path().default.join(dirname, BABEL_CONFIG_JS_FILENAME))) { - return dirname; + for (const filename of ROOT_CONFIG_FILENAMES) { + if (yield* fs.exists(_path().default.join(dirname, filename))) { + return dirname; + } } const nextDir = _path().default.dirname(dirname); @@ -91,7 +95,7 @@ function findConfigUpwards(rootDir) { return null; } -function findRelativeConfig(packageData, envName, caller) { +function* findRelativeConfig(packageData, envName, caller) { let config = null; let ignore = null; @@ -99,36 +103,15 @@ function findRelativeConfig(packageData, envName, caller) { for (const loc of packageData.directories) { if (!config) { - config = [BABELRC_FILENAME, BABELRC_JS_FILENAME].reduce((previousConfig, name) => { - const filepath = _path().default.join(loc, name); - - const config = readConfig(filepath, envName, caller); - - if (config && previousConfig) { - throw new Error(`Multiple configuration files found. Please remove one:\n` + ` - ${_path().default.basename(previousConfig.filepath)}\n` + ` - ${name}\n` + `from ${loc}`); - } + var _packageData$pkg; - return config || previousConfig; - }, null); - const pkgConfig = packageData.pkg && packageData.pkg.dirname === loc ? packageToBabelConfig(packageData.pkg) : null; - - if (pkgConfig) { - if (config) { - throw new Error(`Multiple configuration files found. Please remove one:\n` + ` - ${_path().default.basename(pkgConfig.filepath)}#babel\n` + ` - ${_path().default.basename(config.filepath)}\n` + `from ${loc}`); - } - - config = pkgConfig; - } - - if (config) { - debug("Found configuration %o from %o.", config.filepath, dirname); - } + config = yield* loadOneConfig(RELATIVE_CONFIG_FILENAMES, loc, envName, caller, ((_packageData$pkg = packageData.pkg) == null ? void 0 : _packageData$pkg.dirname) === loc ? packageToBabelConfig(packageData.pkg) : null); } if (!ignore) { const ignoreLoc = _path().default.join(loc, BABELIGNORE_FILENAME); - ignore = readIgnoreConfig(ignoreLoc); + ignore = yield* readIgnoreConfig(ignoreLoc); if (ignore) { debug("Found ignore %o from %o.", ignore.filepath, dirname); @@ -143,23 +126,31 @@ function findRelativeConfig(packageData, envName, caller) { } function findRootConfig(dirname, envName, caller) { - const filepath = _path().default.resolve(dirname, BABEL_CONFIG_JS_FILENAME); + return loadOneConfig(ROOT_CONFIG_FILENAMES, dirname, envName, caller); +} + +function* loadOneConfig(names, dirname, envName, caller, previousConfig = null) { + const configs = yield* _gensync().default.all(names.map(filename => readConfig(_path().default.join(dirname, filename), envName, caller))); + const config = configs.reduce((previousConfig, config) => { + if (config && previousConfig) { + throw new Error(`Multiple configuration files found. Please remove one:\n` + ` - ${_path().default.basename(previousConfig.filepath)}\n` + ` - ${config.filepath}\n` + `from ${dirname}`); + } - const conf = readConfig(filepath, envName, caller); + return config || previousConfig; + }, previousConfig); - if (conf) { - debug("Found root config %o in %o.", BABEL_CONFIG_JS_FILENAME, dirname); + if (config) { + debug("Found configuration %o from %o.", config.filepath, dirname); } - return conf; + return config; } -function loadConfig(name, dirname, envName, caller) { - const filepath = _resolve().default.sync(name, { +function* loadConfig(name, dirname, envName, caller) { + const filepath = yield* (0, _resolve.default)(name, { basedir: dirname }); - - const conf = readConfig(filepath, envName, caller); + const conf = yield* readConfig(filepath, envName, caller); if (!conf) { throw new Error(`Config file ${filepath} contains no configuration data`); @@ -170,15 +161,17 @@ function loadConfig(name, dirname, envName, caller) { } function readConfig(filepath, envName, caller) { - return _path().default.extname(filepath) === ".js" ? readConfigJS(filepath, { + const ext = _path().default.extname(filepath); + + return ext === ".js" || ext === ".cjs" || ext === ".mjs" ? readConfigJS(filepath, { envName, caller }) : readConfigJSON5(filepath); } const LOADING_CONFIGS = new Set(); -const readConfigJS = (0, _caching.makeStrongCache)((filepath, cache) => { - if (!_fs().default.existsSync(filepath)) { +const readConfigJS = (0, _caching.makeStrongCache)(function* readConfigJS(filepath, cache) { + if (!fs.exists.sync(filepath)) { cache.forever(); return null; } @@ -197,10 +190,7 @@ const readConfigJS = (0, _caching.makeStrongCache)((filepath, cache) => { try { LOADING_CONFIGS.add(filepath); - - const configModule = require(filepath); - - options = configModule && configModule.__esModule ? configModule.default || undefined : configModule; + options = yield* (0, _moduleTypes.default)(filepath, "You appear to be using a native ECMAScript module configuration " + "file, which is only supported when running Babel asynchronously."); } catch (err) { err.message = `${filepath}: Error while loading config - ${err.message}`; throw err; @@ -208,9 +198,12 @@ const readConfigJS = (0, _caching.makeStrongCache)((filepath, cache) => { LOADING_CONFIGS.delete(filepath); } + let assertCache = false; + if (typeof options === "function") { + yield* []; options = options((0, _configApi.default)(cache)); - if (!cache.configured()) throwConfigError(); + assertCache = true; } if (!options || typeof options !== "object" || Array.isArray(options)) { @@ -221,13 +214,14 @@ const readConfigJS = (0, _caching.makeStrongCache)((filepath, cache) => { throw new Error(`You appear to be using an async configuration, ` + `which your current version of Babel does not support. ` + `We may add support for this in the future, ` + `but if you're on the most recent version of @babel/core and still ` + `seeing this error, then you'll need to synchronously return your config.`); } + if (assertCache && !cache.configured()) throwConfigError(); return { filepath, dirname: _path().default.dirname(filepath), options }; }); -const packageToBabelConfig = (0, _caching.makeWeakCache)(file => { +const packageToBabelConfig = (0, _caching.makeWeakCacheSync)(file => { const babel = file.options["babel"]; if (typeof babel === "undefined") return null; @@ -285,6 +279,24 @@ const readIgnoreConfig = (0, _utils.makeStaticFileCache)((filepath, content) => }; }); +function* resolveShowConfigPath(dirname) { + const targetPath = process.env.BABEL_SHOW_CONFIG_FOR; + + if (targetPath != null) { + const absolutePath = _path().default.resolve(dirname, targetPath); + + const stats = yield* fs.stat(absolutePath); + + if (!stats.isFile()) { + throw new Error(`${absolutePath}: BABEL_SHOW_CONFIG_FOR must refer to a regular file, directories are not supported.`); + } + + return absolutePath; + } + + return null; +} + function throwConfigError() { throw new Error(`\ Caching was left unconfigured. Babel's plugins, presets, and .babelrc.js files can be configured diff --git a/node_modules/@babel/core/lib/config/files/index-browser.js b/node_modules/@babel/core/lib/config/files/index-browser.js index b8e914178..abe5fbd1b 100644 --- a/node_modules/@babel/core/lib/config/files/index-browser.js +++ b/node_modules/@babel/core/lib/config/files/index-browser.js @@ -8,16 +8,18 @@ exports.findPackageData = findPackageData; exports.findRelativeConfig = findRelativeConfig; exports.findRootConfig = findRootConfig; exports.loadConfig = loadConfig; +exports.resolveShowConfigPath = resolveShowConfigPath; exports.resolvePlugin = resolvePlugin; exports.resolvePreset = resolvePreset; exports.loadPlugin = loadPlugin; exports.loadPreset = loadPreset; +exports.ROOT_CONFIG_FILENAMES = void 0; -function findConfigUpwards(rootDir) { +function* findConfigUpwards(rootDir) { return null; } -function findPackageData(filepath) { +function* findPackageData(filepath) { return { filepath, directories: [], @@ -26,7 +28,7 @@ function findPackageData(filepath) { }; } -function findRelativeConfig(pkgData, envName, caller) { +function* findRelativeConfig(pkgData, envName, caller) { return { pkg: null, config: null, @@ -34,14 +36,21 @@ function findRelativeConfig(pkgData, envName, caller) { }; } -function findRootConfig(dirname, envName, caller) { +function* findRootConfig(dirname, envName, caller) { return null; } -function loadConfig(name, dirname, envName, caller) { +function* loadConfig(name, dirname, envName, caller) { throw new Error(`Cannot load ${name} relative to ${dirname} in a browser`); } +function* resolveShowConfigPath(dirname) { + return null; +} + +const ROOT_CONFIG_FILENAMES = []; +exports.ROOT_CONFIG_FILENAMES = ROOT_CONFIG_FILENAMES; + function resolvePlugin(name, dirname) { return null; } diff --git a/node_modules/@babel/core/lib/config/files/index.js b/node_modules/@babel/core/lib/config/files/index.js index 3d5453b66..f75ace5ae 100644 --- a/node_modules/@babel/core/lib/config/files/index.js +++ b/node_modules/@babel/core/lib/config/files/index.js @@ -33,6 +33,18 @@ Object.defineProperty(exports, "loadConfig", { return _configuration.loadConfig; } }); +Object.defineProperty(exports, "resolveShowConfigPath", { + enumerable: true, + get: function () { + return _configuration.resolveShowConfigPath; + } +}); +Object.defineProperty(exports, "ROOT_CONFIG_FILENAMES", { + enumerable: true, + get: function () { + return _configuration.ROOT_CONFIG_FILENAMES; + } +}); Object.defineProperty(exports, "resolvePlugin", { enumerable: true, get: function () { diff --git a/node_modules/@babel/core/lib/config/files/package.js b/node_modules/@babel/core/lib/config/files/package.js index c0f8988bd..095bc0e4a 100644 --- a/node_modules/@babel/core/lib/config/files/package.js +++ b/node_modules/@babel/core/lib/config/files/package.js @@ -21,7 +21,7 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de const PACKAGE_FILENAME = "package.json"; -function findPackageData(filepath) { +function* findPackageData(filepath) { let pkg = null; const directories = []; let isPackage = true; @@ -30,7 +30,7 @@ function findPackageData(filepath) { while (!pkg && _path().default.basename(dirname) !== "node_modules") { directories.push(dirname); - pkg = readConfigPackage(_path().default.join(dirname, PACKAGE_FILENAME)); + pkg = yield* readConfigPackage(_path().default.join(dirname, PACKAGE_FILENAME)); const nextLoc = _path().default.dirname(dirname); @@ -60,6 +60,8 @@ const readConfigPackage = (0, _utils.makeStaticFileCache)((filepath, content) => throw err; } + if (!options) throw new Error(`${filepath}: No config detected`); + if (typeof options !== "object") { throw new Error(`${filepath}: Config returned typeof ${typeof options}`); } diff --git a/node_modules/@babel/core/lib/config/files/plugins.js b/node_modules/@babel/core/lib/config/files/plugins.js index 264682cac..6b9cb715c 100644 --- a/node_modules/@babel/core/lib/config/files/plugins.js +++ b/node_modules/@babel/core/lib/config/files/plugins.js @@ -113,7 +113,7 @@ function resolveStandardizedName(type, name, dirname = process.cwd()) { }); resolvedOriginal = true; - } catch (e2) {} + } catch (_unused) {} if (resolvedOriginal) { e.message += `\n- If you want to resolve "${name}", use "module:${name}"`; @@ -128,7 +128,7 @@ function resolveStandardizedName(type, name, dirname = process.cwd()) { }); resolvedBabel = true; - } catch (e2) {} + } catch (_unused2) {} if (resolvedBabel) { e.message += `\n- Did you mean "@babel/${name}"?`; @@ -143,7 +143,7 @@ function resolveStandardizedName(type, name, dirname = process.cwd()) { }); resolvedOppositeType = true; - } catch (e2) {} + } catch (_unused3) {} if (resolvedOppositeType) { e.message += `\n- Did you accidentally pass a ${oppositeType} as a ${type}?`; diff --git a/node_modules/@babel/core/lib/config/files/utils.js b/node_modules/@babel/core/lib/config/files/utils.js index 56749ef4e..0b0879814 100644 --- a/node_modules/@babel/core/lib/config/files/utils.js +++ b/node_modules/@babel/core/lib/config/files/utils.js @@ -5,34 +5,41 @@ Object.defineProperty(exports, "__esModule", { }); exports.makeStaticFileCache = makeStaticFileCache; -function _fs() { +var _caching = require("../caching"); + +var fs = _interopRequireWildcard(require("../../gensync-utils/fs")); + +function _fs2() { const data = _interopRequireDefault(require("fs")); - _fs = function () { + _fs2 = function () { return data; }; return data; } -var _caching = require("../caching"); - function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } +function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function () { return cache; }; return cache; } + +function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; } + function makeStaticFileCache(fn) { - return (0, _caching.makeStrongCache)((filepath, cache) => { - if (cache.invalidate(() => fileMtime(filepath)) === null) { - cache.forever(); + return (0, _caching.makeStrongCache)(function* (filepath, cache) { + const cached = cache.invalidate(() => fileMtime(filepath)); + + if (cached === null) { return null; } - return fn(filepath, _fs().default.readFileSync(filepath, "utf8")); + return fn(filepath, yield* fs.readFile(filepath, "utf8")); }); } function fileMtime(filepath) { try { - return +_fs().default.statSync(filepath).mtime; + return +_fs2().default.statSync(filepath).mtime; } catch (e) { if (e.code !== "ENOENT" && e.code !== "ENOTDIR") throw e; } diff --git a/node_modules/@babel/core/lib/config/full.js b/node_modules/@babel/core/lib/config/full.js index e453924a3..d817a1581 100644 --- a/node_modules/@babel/core/lib/config/full.js +++ b/node_modules/@babel/core/lib/config/full.js @@ -3,7 +3,19 @@ Object.defineProperty(exports, "__esModule", { value: true }); -exports.default = loadFullConfig; +exports.default = void 0; + +function _gensync() { + const data = _interopRequireDefault(require("gensync")); + + _gensync = function () { + return data; + }; + + return data; +} + +var _async = require("../gensync-utils/async"); var _util = require("./util"); @@ -35,12 +47,14 @@ var _configApi = _interopRequireDefault(require("./helpers/config-api")); var _partial = _interopRequireDefault(require("./partial")); -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } +function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function () { return cache; }; return cache; } + +function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; } -function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; if (desc.get || desc.set) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj.default = obj; return newObj; } } +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } -function loadFullConfig(inputOpts) { - const result = (0, _partial.default)(inputOpts); +var _default = (0, _gensync().default)(function* loadFullConfig(inputOpts) { + const result = yield* (0, _partial.default)(inputOpts); if (!result) { return null; @@ -48,95 +62,111 @@ function loadFullConfig(inputOpts) { const { options, - context + context, + fileHandling } = result; + + if (fileHandling === "ignored") { + return null; + } + const optionDefaults = {}; - const passes = [[]]; + const { + plugins, + presets + } = options; - try { - const { - plugins, - presets - } = options; + if (!plugins || !presets) { + throw new Error("Assertion failure - plugins and presets exist"); + } - if (!plugins || !presets) { - throw new Error("Assertion failure - plugins and presets exist"); - } + const toDescriptor = item => { + const desc = (0, _item.getItemDescriptor)(item); - const ignored = function recurseDescriptors(config, pass) { - const plugins = config.plugins.reduce((acc, descriptor) => { - if (descriptor.options !== false) { - acc.push(loadPluginDescriptor(descriptor, context)); - } + if (!desc) { + throw new Error("Assertion failure - must be config item"); + } - return acc; - }, []); - const presets = config.presets.reduce((acc, descriptor) => { - if (descriptor.options !== false) { - acc.push({ - preset: loadPresetDescriptor(descriptor, context), - pass: descriptor.ownPass ? [] : pass - }); - } + return desc; + }; - return acc; - }, []); - - if (presets.length > 0) { - passes.splice(1, 0, ...presets.map(o => o.pass).filter(p => p !== pass)); - - for (const _ref of presets) { - const { - preset, - pass - } = _ref; - if (!preset) return true; - const ignored = recurseDescriptors({ - plugins: preset.plugins, - presets: preset.presets - }, pass); - if (ignored) return true; - preset.options.forEach(opts => { - (0, _util.mergeOptions)(optionDefaults, opts); - }); + const presetsDescriptors = presets.map(toDescriptor); + const initialPluginsDescriptors = plugins.map(toDescriptor); + const pluginDescriptorsByPass = [[]]; + const passes = []; + const ignored = yield* enhanceError(context, function* recursePresetDescriptors(rawPresets, pluginDescriptorsPass) { + const presets = []; + + for (let i = 0; i < rawPresets.length; i++) { + const descriptor = rawPresets[i]; + + if (descriptor.options !== false) { + try { + if (descriptor.ownPass) { + presets.push({ + preset: yield* loadPresetDescriptor(descriptor, context), + pass: [] + }); + } else { + presets.unshift({ + preset: yield* loadPresetDescriptor(descriptor, context), + pass: pluginDescriptorsPass + }); + } + } catch (e) { + if (e.code === "BABEL_UNKNOWN_OPTION") { + (0, _options.checkNoUnwrappedItemOptionPairs)(rawPresets, i, "preset", e); + } + + throw e; } } + } - if (plugins.length > 0) { - pass.unshift(...plugins); + if (presets.length > 0) { + pluginDescriptorsByPass.splice(1, 0, ...presets.map(o => o.pass).filter(p => p !== pluginDescriptorsPass)); + + for (const { + preset, + pass + } of presets) { + if (!preset) return true; + pass.push(...preset.plugins); + const ignored = yield* recursePresetDescriptors(preset.presets, pass); + if (ignored) return true; + preset.options.forEach(opts => { + (0, _util.mergeOptions)(optionDefaults, opts); + }); } - }({ - plugins: plugins.map(item => { - const desc = (0, _item.getItemDescriptor)(item); + } + })(presetsDescriptors, pluginDescriptorsByPass[0]); + if (ignored) return null; + const opts = optionDefaults; + (0, _util.mergeOptions)(opts, options); + yield* enhanceError(context, function* loadPluginDescriptors() { + pluginDescriptorsByPass[0].unshift(...initialPluginsDescriptors); - if (!desc) { - throw new Error("Assertion failure - must be config item"); - } + for (const descs of pluginDescriptorsByPass) { + const pass = []; + passes.push(pass); - return desc; - }), - presets: presets.map(item => { - const desc = (0, _item.getItemDescriptor)(item); + for (let i = 0; i < descs.length; i++) { + const descriptor = descs[i]; - if (!desc) { - throw new Error("Assertion failure - must be config item"); + if (descriptor.options !== false) { + try { + pass.push(yield* loadPluginDescriptor(descriptor, context)); + } catch (e) { + if (e.code === "BABEL_UNKNOWN_PLUGIN_PROPERTY") { + (0, _options.checkNoUnwrappedItemOptionPairs)(descs, i, "plugin", e); + } + + throw e; + } } - - return desc; - }) - }, passes[0]); - - if (ignored) return null; - } catch (e) { - if (!/^\[BABEL\]/.test(e.message)) { - e.message = `[BABEL] ${context.filename || "unknown"}: ${e.message}`; + } } - - throw e; - } - - const opts = optionDefaults; - (0, _util.mergeOptions)(opts, options); + })(); opts.plugins = passes[0]; opts.presets = passes.slice(1).filter(plugins => plugins.length > 0).map(plugins => ({ plugins @@ -146,14 +176,30 @@ function loadFullConfig(inputOpts) { options: opts, passes: passes }; +}); + +exports.default = _default; + +function enhanceError(context, fn) { + return function* (arg1, arg2) { + try { + return yield* fn(arg1, arg2); + } catch (e) { + if (!/^\[BABEL\]/.test(e.message)) { + e.message = `[BABEL] ${context.filename || "unknown"}: ${e.message}`; + } + + throw e; + } + }; } -const loadDescriptor = (0, _caching.makeWeakCache)(({ +const loadDescriptor = (0, _caching.makeWeakCache)(function* ({ value, options, dirname, alias -}, cache) => { +}, cache) { if (options === false) throw new Error("Assertion failure"); options = options || {}; let item = value; @@ -177,6 +223,7 @@ const loadDescriptor = (0, _caching.makeWeakCache)(({ } if (typeof item.then === "function") { + yield* []; throw new Error(`You appear to be using an async plugin, ` + `which your current version of Babel does not support. ` + `If you're using a published plugin, ` + `you may need to upgrade your @babel/core version.`); } @@ -188,7 +235,7 @@ const loadDescriptor = (0, _caching.makeWeakCache)(({ }; }); -function loadPluginDescriptor(descriptor, context) { +function* loadPluginDescriptor(descriptor, context) { if (descriptor.value instanceof _plugin.default) { if (descriptor.options) { throw new Error("Passed options to an existing Plugin instance will not work."); @@ -197,15 +244,15 @@ function loadPluginDescriptor(descriptor, context) { return descriptor.value; } - return instantiatePlugin(loadDescriptor(descriptor, context), context); + return yield* instantiatePlugin(yield* loadDescriptor(descriptor, context), context); } -const instantiatePlugin = (0, _caching.makeWeakCache)(({ +const instantiatePlugin = (0, _caching.makeWeakCache)(function* ({ value, options, dirname, alias -}, cache) => { +}, cache) { const pluginObj = (0, _plugins.validatePluginObject)(value); const plugin = Object.assign({}, pluginObj); @@ -221,7 +268,9 @@ const instantiatePlugin = (0, _caching.makeWeakCache)(({ options, dirname }; - const inherits = cache.invalidate(data => loadPluginDescriptor(inheritsDescriptor, data)); + const inherits = yield* (0, _async.forwardAsync)(loadPluginDescriptor, run => { + return cache.invalidate(data => run(inheritsDescriptor, data)); + }); plugin.pre = chain(inherits.pre, plugin.pre); plugin.post = chain(inherits.post, plugin.post); plugin.manipulateOptions = chain(inherits.manipulateOptions, plugin.manipulateOptions); @@ -231,11 +280,33 @@ const instantiatePlugin = (0, _caching.makeWeakCache)(({ return new _plugin.default(plugin, options, alias); }); -const loadPresetDescriptor = (descriptor, context) => { - return (0, _configChain.buildPresetChain)(instantiatePreset(loadDescriptor(descriptor, context)), context); +const validateIfOptionNeedsFilename = (options, descriptor) => { + if (options.test || options.include || options.exclude) { + const formattedPresetName = descriptor.name ? `"${descriptor.name}"` : "/* your preset */"; + throw new Error([`Preset ${formattedPresetName} requires a filename to be set when babel is called directly,`, `\`\`\``, `babel.transform(code, { filename: 'file.ts', presets: [${formattedPresetName}] });`, `\`\`\``, `See https://babeljs.io/docs/en/options#filename for more information.`].join("\n")); + } +}; + +const validatePreset = (preset, context, descriptor) => { + if (!context.filename) { + const { + options + } = preset; + validateIfOptionNeedsFilename(options, descriptor); + + if (options.overrides) { + options.overrides.forEach(overrideOptions => validateIfOptionNeedsFilename(overrideOptions, descriptor)); + } + } }; -const instantiatePreset = (0, _caching.makeWeakCache)(({ +function* loadPresetDescriptor(descriptor, context) { + const preset = instantiatePreset(yield* loadDescriptor(descriptor, context)); + validatePreset(preset, context, descriptor); + return yield* (0, _configChain.buildPresetChain)(preset, context); +} + +const instantiatePreset = (0, _caching.makeWeakCacheSync)(({ value, dirname, alias diff --git a/node_modules/@babel/core/lib/config/helpers/config-api.js b/node_modules/@babel/core/lib/config/helpers/config-api.js index b988c0553..b94c05485 100644 --- a/node_modules/@babel/core/lib/config/helpers/config-api.js +++ b/node_modules/@babel/core/lib/config/helpers/config-api.js @@ -47,8 +47,7 @@ function makeAPI(cache) { env, async: () => false, caller, - assertVersion, - tokTypes: undefined + assertVersion }; } diff --git a/node_modules/@babel/core/lib/config/index.js b/node_modules/@babel/core/lib/config/index.js index 65127b2a0..9208224e0 100644 --- a/node_modules/@babel/core/lib/config/index.js +++ b/node_modules/@babel/core/lib/config/index.js @@ -3,19 +3,23 @@ Object.defineProperty(exports, "__esModule", { value: true }); -exports.loadOptions = loadOptions; Object.defineProperty(exports, "default", { enumerable: true, get: function () { return _full.default; } }); -Object.defineProperty(exports, "loadPartialConfig", { - enumerable: true, - get: function () { - return _partial.loadPartialConfig; - } -}); +exports.loadOptionsAsync = exports.loadOptionsSync = exports.loadOptions = exports.loadPartialConfigAsync = exports.loadPartialConfigSync = exports.loadPartialConfig = void 0; + +function _gensync() { + const data = _interopRequireDefault(require("gensync")); + + _gensync = function () { + return data; + }; + + return data; +} var _full = _interopRequireDefault(require("./full")); @@ -23,7 +27,31 @@ var _partial = require("./partial"); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } -function loadOptions(opts) { - const config = (0, _full.default)(opts); - return config ? config.options : null; -} \ No newline at end of file +const loadOptionsRunner = (0, _gensync().default)(function* (opts) { + var _config$options; + + const config = yield* (0, _full.default)(opts); + return (_config$options = config == null ? void 0 : config.options) != null ? _config$options : null; +}); + +const maybeErrback = runner => (opts, callback) => { + if (callback === undefined && typeof opts === "function") { + callback = opts; + opts = undefined; + } + + return callback ? runner.errback(opts, callback) : runner.sync(opts); +}; + +const loadPartialConfig = maybeErrback(_partial.loadPartialConfig); +exports.loadPartialConfig = loadPartialConfig; +const loadPartialConfigSync = _partial.loadPartialConfig.sync; +exports.loadPartialConfigSync = loadPartialConfigSync; +const loadPartialConfigAsync = _partial.loadPartialConfig.async; +exports.loadPartialConfigAsync = loadPartialConfigAsync; +const loadOptions = maybeErrback(loadOptionsRunner); +exports.loadOptions = loadOptions; +const loadOptionsSync = loadOptionsRunner.sync; +exports.loadOptionsSync = loadOptionsSync; +const loadOptionsAsync = loadOptionsRunner.async; +exports.loadOptionsAsync = loadOptionsAsync; \ No newline at end of file diff --git a/node_modules/@babel/core/lib/config/item.js b/node_modules/@babel/core/lib/config/item.js index 11f25ac1d..1eaf247b0 100644 --- a/node_modules/@babel/core/lib/config/item.js +++ b/node_modules/@babel/core/lib/config/item.js @@ -46,6 +46,12 @@ function getItemDescriptor(item) { class ConfigItem { constructor(descriptor) { + this._descriptor = void 0; + this.value = void 0; + this.options = void 0; + this.dirname = void 0; + this.name = void 0; + this.file = void 0; this._descriptor = descriptor; Object.defineProperty(this, "_descriptor", { enumerable: false diff --git a/node_modules/@babel/core/lib/config/partial.js b/node_modules/@babel/core/lib/config/partial.js index 050ad983a..229e06454 100644 --- a/node_modules/@babel/core/lib/config/partial.js +++ b/node_modules/@babel/core/lib/config/partial.js @@ -4,7 +4,7 @@ Object.defineProperty(exports, "__esModule", { value: true }); exports.default = loadPrivatePartialConfig; -exports.loadPartialConfig = loadPartialConfig; +exports.loadPartialConfig = void 0; function _path() { const data = _interopRequireDefault(require("path")); @@ -16,6 +16,16 @@ function _path() { return data; } +function _gensync() { + const data = _interopRequireDefault(require("gensync")); + + _gensync = function () { + return data; + }; + + return data; +} + var _plugin = _interopRequireDefault(require("./plugin")); var _util = require("./util"); @@ -32,33 +42,35 @@ var _files = require("./files"); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } -function resolveRootMode(rootDir, rootMode) { +function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; } + +function* resolveRootMode(rootDir, rootMode) { switch (rootMode) { case "root": return rootDir; case "upward-optional": { - const upwardRootDir = (0, _files.findConfigUpwards)(rootDir); + const upwardRootDir = yield* (0, _files.findConfigUpwards)(rootDir); return upwardRootDir === null ? rootDir : upwardRootDir; } case "upward": { - const upwardRootDir = (0, _files.findConfigUpwards)(rootDir); + const upwardRootDir = yield* (0, _files.findConfigUpwards)(rootDir); if (upwardRootDir !== null) return upwardRootDir; - throw Object.assign(new Error(`Babel was run with rootMode:"upward" but a root could not ` + `be found when searching upward from "${rootDir}"`), { + throw Object.assign(new Error(`Babel was run with rootMode:"upward" but a root could not ` + `be found when searching upward from "${rootDir}".\n` + `One of the following config files must be in the directory tree: ` + `"${_files.ROOT_CONFIG_FILENAMES.join(", ")}".`), { code: "BABEL_ROOT_NOT_FOUND", dirname: rootDir }); } default: - throw new Error(`Assertion failure - unknown rootMode value`); + throw new Error(`Assertion failure - unknown rootMode value.`); } } -function loadPrivatePartialConfig(inputOpts) { +function* loadPrivatePartialConfig(inputOpts) { if (inputOpts != null && (typeof inputOpts !== "object" || Array.isArray(inputOpts))) { throw new Error("Babel options must be an object, null, or undefined"); } @@ -69,25 +81,30 @@ function loadPrivatePartialConfig(inputOpts) { cwd = ".", root: rootDir = ".", rootMode = "root", - caller + caller, + cloneInputAst = true } = args; const absoluteCwd = _path().default.resolve(cwd); - const absoluteRootDir = resolveRootMode(_path().default.resolve(absoluteCwd, rootDir), rootMode); + const absoluteRootDir = yield* resolveRootMode(_path().default.resolve(absoluteCwd, rootDir), rootMode); + const filename = typeof args.filename === "string" ? _path().default.resolve(cwd, args.filename) : undefined; + const showConfigPath = yield* (0, _files.resolveShowConfigPath)(absoluteCwd); const context = { - filename: typeof args.filename === "string" ? _path().default.resolve(cwd, args.filename) : undefined, + filename, cwd: absoluteCwd, root: absoluteRootDir, envName, - caller + caller, + showConfig: showConfigPath === filename }; - const configChain = (0, _configChain.buildRootChain)(args, context); + const configChain = yield* (0, _configChain.buildRootChain)(args, context); if (!configChain) return null; const options = {}; configChain.options.forEach(opts => { (0, _util.mergeOptions)(options, opts); }); + options.cloneInputAst = cloneInputAst; options.babelrc = false; options.configFile = false; options.passPerPreset = false; @@ -100,35 +117,64 @@ function loadPrivatePartialConfig(inputOpts) { return { options, context, + fileHandling: configChain.fileHandling, ignore: configChain.ignore, babelrc: configChain.babelrc, - config: configChain.config + config: configChain.config, + files: configChain.files }; } -function loadPartialConfig(inputOpts) { - const result = loadPrivatePartialConfig(inputOpts); +const loadPartialConfig = (0, _gensync().default)(function* (opts) { + let showIgnoredFiles = false; + + if (typeof opts === "object" && opts !== null && !Array.isArray(opts)) { + var _opts = opts; + ({ + showIgnoredFiles + } = _opts); + opts = _objectWithoutPropertiesLoose(_opts, ["showIgnoredFiles"]); + _opts; + } + + const result = yield* loadPrivatePartialConfig(opts); if (!result) return null; const { options, babelrc, ignore, - config + config, + fileHandling, + files } = result; + + if (fileHandling === "ignored" && !showIgnoredFiles) { + return null; + } + (options.plugins || []).forEach(item => { if (item.value instanceof _plugin.default) { throw new Error("Passing cached plugin instances is not supported in " + "babel.loadPartialConfig()"); } }); - return new PartialConfig(options, babelrc ? babelrc.filepath : undefined, ignore ? ignore.filepath : undefined, config ? config.filepath : undefined); -} + return new PartialConfig(options, babelrc ? babelrc.filepath : undefined, ignore ? ignore.filepath : undefined, config ? config.filepath : undefined, fileHandling, files); +}); +exports.loadPartialConfig = loadPartialConfig; class PartialConfig { - constructor(options, babelrc, ignore, config) { + constructor(options, babelrc, ignore, config, fileHandling, files) { + this.options = void 0; + this.babelrc = void 0; + this.babelignore = void 0; + this.config = void 0; + this.fileHandling = void 0; + this.files = void 0; this.options = options; this.babelignore = ignore; this.babelrc = babelrc; this.config = config; + this.fileHandling = fileHandling; + this.files = files; Object.freeze(this); } diff --git a/node_modules/@babel/core/lib/config/plugin.js b/node_modules/@babel/core/lib/config/plugin.js index 3c780708d..9cb1656be 100644 --- a/node_modules/@babel/core/lib/config/plugin.js +++ b/node_modules/@babel/core/lib/config/plugin.js @@ -7,6 +7,14 @@ exports.default = void 0; class Plugin { constructor(plugin, options, key) { + this.key = void 0; + this.manipulateOptions = void 0; + this.post = void 0; + this.pre = void 0; + this.visitor = void 0; + this.parserOverride = void 0; + this.generatorOverride = void 0; + this.options = void 0; this.key = plugin.name || key; this.manipulateOptions = plugin.manipulateOptions; this.post = plugin.post; diff --git a/node_modules/@babel/core/lib/config/util.js b/node_modules/@babel/core/lib/config/util.js index 40e3b0b59..5608fb9d2 100644 --- a/node_modules/@babel/core/lib/config/util.js +++ b/node_modules/@babel/core/lib/config/util.js @@ -4,6 +4,7 @@ Object.defineProperty(exports, "__esModule", { value: true }); exports.mergeOptions = mergeOptions; +exports.isIterableIterator = isIterableIterator; function mergeOptions(target, source) { for (const k of Object.keys(source)) { @@ -27,4 +28,8 @@ function mergeDefaultFields(target, source) { const val = source[k]; if (val !== undefined) target[k] = val; } +} + +function isIterableIterator(value) { + return !!value && typeof value.next === "function" && typeof value[Symbol.iterator] === "function"; } \ No newline at end of file diff --git a/node_modules/@babel/core/lib/config/validation/options.js b/node_modules/@babel/core/lib/config/validation/options.js index 0c06acfa9..04fb8bf5b 100644 --- a/node_modules/@babel/core/lib/config/validation/options.js +++ b/node_modules/@babel/core/lib/config/validation/options.js @@ -4,6 +4,7 @@ Object.defineProperty(exports, "__esModule", { value: true }); exports.validate = validate; +exports.checkNoUnwrappedItemOptionPairs = checkNoUnwrappedItemOptionPairs; var _plugin = _interopRequireDefault(require("../plugin")); @@ -23,6 +24,7 @@ const ROOT_VALIDATORS = { filenameRelative: _optionAssertions.assertString, code: _optionAssertions.assertBoolean, ast: _optionAssertions.assertBoolean, + cloneInputAst: _optionAssertions.assertBoolean, envName: _optionAssertions.assertString }; const BABELRC_VALIDATORS = { @@ -117,10 +119,11 @@ function throwUnknownError(loc) { message, version = 5 } = _removed.default[key]; - throw new ReferenceError(`Using removed Babel ${version} option: ${(0, _optionAssertions.msg)(loc)} - ${message}`); + throw new Error(`Using removed Babel ${version} option: ${(0, _optionAssertions.msg)(loc)} - ${message}`); } else { - const unknownOptErr = `Unknown option: ${(0, _optionAssertions.msg)(loc)}. Check out https://babeljs.io/docs/en/babel-core/#options for more information about options.`; - throw new ReferenceError(unknownOptErr); + const unknownOptErr = new Error(`Unknown option: ${(0, _optionAssertions.msg)(loc)}. Check out https://babeljs.io/docs/en/babel-core/#options for more information about options.`); + unknownOptErr.code = "BABEL_UNKNOWN_OPTION"; + throw unknownOptErr; } } @@ -185,4 +188,14 @@ function assertOverridesList(loc, value) { } return arr; +} + +function checkNoUnwrappedItemOptionPairs(items, index, type, e) { + if (index === 0) return; + const lastItem = items[index - 1]; + const thisItem = items[index]; + + if (lastItem.file && lastItem.options === undefined && typeof thisItem.value === "object") { + e.message += `\n- Maybe you meant to use\n` + `"${type}": [\n ["${lastItem.file.request}", ${JSON.stringify(thisItem.value, undefined, 2)}]\n]\n` + `To be a valid ${type}, its name and options should be wrapped in a pair of brackets`; + } } \ No newline at end of file diff --git a/node_modules/@babel/core/lib/config/validation/plugins.js b/node_modules/@babel/core/lib/config/validation/plugins.js index 73b498cdb..a70cc676f 100644 --- a/node_modules/@babel/core/lib/config/validation/plugins.js +++ b/node_modules/@babel/core/lib/config/validation/plugins.js @@ -18,14 +18,14 @@ const VALIDATORS = { generatorOverride: _optionAssertions.assertFunction }; -function assertVisitorMap(key, value) { - const obj = (0, _optionAssertions.assertObject)(key, value); +function assertVisitorMap(loc, value) { + const obj = (0, _optionAssertions.assertObject)(loc, value); if (obj) { Object.keys(obj).forEach(prop => assertVisitorHandler(prop, obj[prop])); if (obj.enter || obj.exit) { - throw new Error(`.${key} cannot contain catch-all "enter" or "exit" handlers. Please target individual nodes.`); + throw new Error(`${(0, _optionAssertions.msg)(loc)} cannot contain catch-all "enter" or "exit" handlers. Please target individual nodes.`); } } @@ -47,9 +47,25 @@ function assertVisitorHandler(key, value) { } function validatePluginObject(obj) { + const rootPath = { + type: "root", + source: "plugin" + }; Object.keys(obj).forEach(key => { const validator = VALIDATORS[key]; - if (validator) validator(key, obj[key]);else throw new Error(`.${key} is not a valid Plugin property`); + + if (validator) { + const optLoc = { + type: "option", + name: key, + parent: rootPath + }; + validator(optLoc, obj[key]); + } else { + const invalidPluginPropertyError = new Error(`.${key} is not a valid Plugin property`); + invalidPluginPropertyError.code = "BABEL_UNKNOWN_PLUGIN_PROPERTY"; + throw invalidPluginPropertyError; + } }); return obj; } \ No newline at end of file diff --git a/node_modules/@babel/core/lib/index.js b/node_modules/@babel/core/lib/index.js index aa0b43e94..ecd444e06 100644 --- a/node_modules/@babel/core/lib/index.js +++ b/node_modules/@babel/core/lib/index.js @@ -70,12 +70,36 @@ Object.defineProperty(exports, "loadPartialConfig", { return _config.loadPartialConfig; } }); +Object.defineProperty(exports, "loadPartialConfigSync", { + enumerable: true, + get: function () { + return _config.loadPartialConfigSync; + } +}); +Object.defineProperty(exports, "loadPartialConfigAsync", { + enumerable: true, + get: function () { + return _config.loadPartialConfigAsync; + } +}); Object.defineProperty(exports, "loadOptions", { enumerable: true, get: function () { return _config.loadOptions; } }); +Object.defineProperty(exports, "loadOptionsSync", { + enumerable: true, + get: function () { + return _config.loadOptionsSync; + } +}); +Object.defineProperty(exports, "loadOptionsAsync", { + enumerable: true, + get: function () { + return _config.loadOptionsAsync; + } +}); Object.defineProperty(exports, "transform", { enumerable: true, get: function () { @@ -219,7 +243,9 @@ var _transformAst = require("./transform-ast"); var _parse = require("./parse"); -function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; if (desc.get || desc.set) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj.default = obj; return newObj; } } +function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function () { return cache; }; return cache; } + +function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; } function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } diff --git a/node_modules/@babel/core/lib/parse.js b/node_modules/@babel/core/lib/parse.js index 8f1bf2e28..e6c2d2662 100644 --- a/node_modules/@babel/core/lib/parse.js +++ b/node_modules/@babel/core/lib/parse.js @@ -3,63 +3,48 @@ Object.defineProperty(exports, "__esModule", { value: true }); -exports.parseSync = parseSync; -exports.parseAsync = parseAsync; -exports.parse = void 0; +exports.parseAsync = exports.parseSync = exports.parse = void 0; + +function _gensync() { + const data = _interopRequireDefault(require("gensync")); + + _gensync = function () { + return data; + }; + + return data; +} var _config = _interopRequireDefault(require("./config")); -var _normalizeFile = _interopRequireDefault(require("./transformation/normalize-file")); +var _parser = _interopRequireDefault(require("./parser")); var _normalizeOpts = _interopRequireDefault(require("./transformation/normalize-opts")); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } -const parse = function parse(code, opts, callback) { - if (typeof opts === "function") { - callback = opts; - opts = undefined; - } - - if (callback === undefined) return parseSync(code, opts); - const config = (0, _config.default)(opts); +const parseRunner = (0, _gensync().default)(function* parse(code, opts) { + const config = yield* (0, _config.default)(opts); if (config === null) { return null; } - const cb = callback; - process.nextTick(() => { - let ast = null; + return yield* (0, _parser.default)(config.passes, (0, _normalizeOpts.default)(config), code); +}); - try { - const cfg = (0, _config.default)(opts); - if (cfg === null) return cb(null, null); - ast = (0, _normalizeFile.default)(cfg.passes, (0, _normalizeOpts.default)(cfg), code).ast; - } catch (err) { - return cb(err); - } +const parse = function parse(code, opts, callback) { + if (typeof opts === "function") { + callback = opts; + opts = undefined; + } - cb(null, ast); - }); + if (callback === undefined) return parseRunner.sync(code, opts); + parseRunner.errback(code, opts, callback); }; exports.parse = parse; - -function parseSync(code, opts) { - const config = (0, _config.default)(opts); - - if (config === null) { - return null; - } - - return (0, _normalizeFile.default)(config.passes, (0, _normalizeOpts.default)(config), code).ast; -} - -function parseAsync(code, opts) { - return new Promise((res, rej) => { - parse(code, opts, (err, result) => { - if (err == null) res(result);else rej(err); - }); - }); -} \ No newline at end of file +const parseSync = parseRunner.sync; +exports.parseSync = parseSync; +const parseAsync = parseRunner.async; +exports.parseAsync = parseAsync; \ No newline at end of file diff --git a/node_modules/@babel/core/lib/tools/build-external-helpers.js b/node_modules/@babel/core/lib/tools/build-external-helpers.js index 5e06a3bf9..f30372eaf 100644 --- a/node_modules/@babel/core/lib/tools/build-external-helpers.js +++ b/node_modules/@babel/core/lib/tools/build-external-helpers.js @@ -45,11 +45,15 @@ function t() { return data; } +var _file = _interopRequireDefault(require("../transformation/file/file")); + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } -function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; if (desc.get || desc.set) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj.default = obj; return newObj; } } +function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function () { return cache; }; return cache; } + +function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; } -const buildUmdWrapper = replacements => _template().default` +const buildUmdWrapper = replacements => (0, _template().default)` (function (root, factory) { if (typeof define === "function" && define.amd) { define(AMD_ARGUMENTS, factory); @@ -63,30 +67,30 @@ const buildUmdWrapper = replacements => _template().default` }); `(replacements); -function buildGlobal(whitelist) { +function buildGlobal(allowlist) { const namespace = t().identifier("babelHelpers"); const body = []; const container = t().functionExpression(null, [t().identifier("global")], t().blockStatement(body)); const tree = t().program([t().expressionStatement(t().callExpression(container, [t().conditionalExpression(t().binaryExpression("===", t().unaryExpression("typeof", t().identifier("global")), t().stringLiteral("undefined")), t().identifier("self"), t().identifier("global"))]))]); body.push(t().variableDeclaration("var", [t().variableDeclarator(namespace, t().assignmentExpression("=", t().memberExpression(t().identifier("global"), namespace), t().objectExpression([])))])); - buildHelpers(body, namespace, whitelist); + buildHelpers(body, namespace, allowlist); return tree; } -function buildModule(whitelist) { +function buildModule(allowlist) { const body = []; - const refs = buildHelpers(body, null, whitelist); + const refs = buildHelpers(body, null, allowlist); body.unshift(t().exportNamedDeclaration(null, Object.keys(refs).map(name => { return t().exportSpecifier(t().cloneNode(refs[name]), t().identifier(name)); }))); return t().program(body, [], "module"); } -function buildUmd(whitelist) { +function buildUmd(allowlist) { const namespace = t().identifier("babelHelpers"); const body = []; body.push(t().variableDeclaration("var", [t().variableDeclarator(namespace, t().identifier("global"))])); - buildHelpers(body, namespace, whitelist); + buildHelpers(body, namespace, allowlist); return t().program([buildUmdWrapper({ FACTORY_PARAMETERS: t().identifier("global"), BROWSER_ARGUMENTS: t().assignmentExpression("=", t().memberExpression(t().identifier("root"), namespace), t().objectExpression([])), @@ -97,25 +101,26 @@ function buildUmd(whitelist) { })]); } -function buildVar(whitelist) { +function buildVar(allowlist) { const namespace = t().identifier("babelHelpers"); const body = []; body.push(t().variableDeclaration("var", [t().variableDeclarator(namespace, t().objectExpression([]))])); const tree = t().program(body); - buildHelpers(body, namespace, whitelist); + buildHelpers(body, namespace, allowlist); body.push(t().expressionStatement(namespace)); return tree; } -function buildHelpers(body, namespace, whitelist) { +function buildHelpers(body, namespace, allowlist) { const getHelperReference = name => { return namespace ? t().memberExpression(namespace, t().identifier(name)) : t().identifier(`_${name}`); }; const refs = {}; helpers().list.forEach(function (name) { - if (whitelist && whitelist.indexOf(name) < 0) return; + if (allowlist && allowlist.indexOf(name) < 0) return; const ref = refs[name] = getHelperReference(name); + helpers().ensure(name, _file.default); const { nodes } = helpers().get(name, getHelperReference, ref); @@ -124,7 +129,7 @@ function buildHelpers(body, namespace, whitelist) { return refs; } -function _default(whitelist, outputType = "global") { +function _default(allowlist, outputType = "global") { let tree; const build = { global: buildGlobal, @@ -134,7 +139,7 @@ function _default(whitelist, outputType = "global") { }[outputType]; if (build) { - tree = build(whitelist); + tree = build(allowlist); } else { throw new Error(`Unsupported output type ${outputType}`); } diff --git a/node_modules/@babel/core/lib/transform-ast.js b/node_modules/@babel/core/lib/transform-ast.js index 05161cf15..e43bf0278 100644 --- a/node_modules/@babel/core/lib/transform-ast.js +++ b/node_modules/@babel/core/lib/transform-ast.js @@ -3,9 +3,17 @@ Object.defineProperty(exports, "__esModule", { value: true }); -exports.transformFromAstSync = transformFromAstSync; -exports.transformFromAstAsync = transformFromAstAsync; -exports.transformFromAst = void 0; +exports.transformFromAstAsync = exports.transformFromAstSync = exports.transformFromAst = void 0; + +function _gensync() { + const data = _interopRequireDefault(require("gensync")); + + _gensync = function () { + return data; + }; + + return data; +} var _config = _interopRequireDefault(require("./config")); @@ -13,42 +21,28 @@ var _transformation = require("./transformation"); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } +const transformFromAstRunner = (0, _gensync().default)(function* (ast, code, opts) { + const config = yield* (0, _config.default)(opts); + if (config === null) return null; + if (!ast) throw new Error("No AST given"); + return yield* (0, _transformation.run)(config, code, ast); +}); + const transformFromAst = function transformFromAst(ast, code, opts, callback) { if (typeof opts === "function") { callback = opts; opts = undefined; } - if (callback === undefined) return transformFromAstSync(ast, code, opts); - const cb = callback; - process.nextTick(() => { - let cfg; - - try { - cfg = (0, _config.default)(opts); - if (cfg === null) return cb(null, null); - } catch (err) { - return cb(err); - } - - if (!ast) return cb(new Error("No AST given")); - (0, _transformation.runAsync)(cfg, code, ast, cb); - }); + if (callback === undefined) { + return transformFromAstRunner.sync(ast, code, opts); + } + + transformFromAstRunner.errback(ast, code, opts, callback); }; exports.transformFromAst = transformFromAst; - -function transformFromAstSync(ast, code, opts) { - const config = (0, _config.default)(opts); - if (config === null) return null; - if (!ast) throw new Error("No AST given"); - return (0, _transformation.runSync)(config, code, ast); -} - -function transformFromAstAsync(ast, code, opts) { - return new Promise((res, rej) => { - transformFromAst(ast, code, opts, (err, result) => { - if (err == null) res(result);else rej(err); - }); - }); -} \ No newline at end of file +const transformFromAstSync = transformFromAstRunner.sync; +exports.transformFromAstSync = transformFromAstSync; +const transformFromAstAsync = transformFromAstRunner.async; +exports.transformFromAstAsync = transformFromAstAsync; \ No newline at end of file diff --git a/node_modules/@babel/core/lib/transform-file.js b/node_modules/@babel/core/lib/transform-file.js index 74423aa7b..df376d78e 100644 --- a/node_modules/@babel/core/lib/transform-file.js +++ b/node_modules/@babel/core/lib/transform-file.js @@ -3,14 +3,12 @@ Object.defineProperty(exports, "__esModule", { value: true }); -exports.transformFileSync = transformFileSync; -exports.transformFileAsync = transformFileAsync; -exports.transformFile = void 0; +exports.transformFileAsync = exports.transformFileSync = exports.transformFile = void 0; -function _fs() { - const data = _interopRequireDefault(require("fs")); +function _gensync() { + const data = _interopRequireDefault(require("gensync")); - _fs = function () { + _gensync = function () { return data; }; @@ -21,71 +19,27 @@ var _config = _interopRequireDefault(require("./config")); var _transformation = require("./transformation"); -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -({}); - -const transformFile = function transformFile(filename, opts, callback) { - let options; +var fs = _interopRequireWildcard(require("./gensync-utils/fs")); - if (typeof opts === "function") { - callback = opts; - opts = undefined; - } +function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function () { return cache; }; return cache; } - if (opts == null) { - options = { - filename - }; - } else if (opts && typeof opts === "object") { - options = Object.assign({}, opts, { - filename - }); - } +function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; } - process.nextTick(() => { - let cfg; - - try { - cfg = (0, _config.default)(options); - if (cfg === null) return callback(null, null); - } catch (err) { - return callback(err); - } - - const config = cfg; +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - _fs().default.readFile(filename, "utf8", function (err, code) { - if (err) return callback(err, null); - (0, _transformation.runAsync)(config, code, null, callback); - }); +({}); +const transformFileRunner = (0, _gensync().default)(function* (filename, opts) { + const options = Object.assign({}, opts, { + filename }); -}; - -exports.transformFile = transformFile; - -function transformFileSync(filename, opts) { - let options; - - if (opts == null) { - options = { - filename - }; - } else if (opts && typeof opts === "object") { - options = Object.assign({}, opts, { - filename - }); - } - - const config = (0, _config.default)(options); + const config = yield* (0, _config.default)(options); if (config === null) return null; - return (0, _transformation.runSync)(config, _fs().default.readFileSync(filename, "utf8")); -} - -function transformFileAsync(filename, opts) { - return new Promise((res, rej) => { - transformFile(filename, opts, (err, result) => { - if (err == null) res(result);else rej(err); - }); - }); -} \ No newline at end of file + const code = yield* fs.readFile(filename, "utf8"); + return yield* (0, _transformation.run)(config, code); +}); +const transformFile = transformFileRunner.errback; +exports.transformFile = transformFile; +const transformFileSync = transformFileRunner.sync; +exports.transformFileSync = transformFileSync; +const transformFileAsync = transformFileRunner.async; +exports.transformFileAsync = transformFileAsync; \ No newline at end of file diff --git a/node_modules/@babel/core/lib/transform.js b/node_modules/@babel/core/lib/transform.js index 34332fcc1..32d4de783 100644 --- a/node_modules/@babel/core/lib/transform.js +++ b/node_modules/@babel/core/lib/transform.js @@ -3,9 +3,17 @@ Object.defineProperty(exports, "__esModule", { value: true }); -exports.transformSync = transformSync; -exports.transformAsync = transformAsync; -exports.transform = void 0; +exports.transformAsync = exports.transformSync = exports.transform = void 0; + +function _gensync() { + const data = _interopRequireDefault(require("gensync")); + + _gensync = function () { + return data; + }; + + return data; +} var _config = _interopRequireDefault(require("./config")); @@ -13,40 +21,24 @@ var _transformation = require("./transformation"); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } +const transformRunner = (0, _gensync().default)(function* transform(code, opts) { + const config = yield* (0, _config.default)(opts); + if (config === null) return null; + return yield* (0, _transformation.run)(config, code); +}); + const transform = function transform(code, opts, callback) { if (typeof opts === "function") { callback = opts; opts = undefined; } - if (callback === undefined) return transformSync(code, opts); - const cb = callback; - process.nextTick(() => { - let cfg; - - try { - cfg = (0, _config.default)(opts); - if (cfg === null) return cb(null, null); - } catch (err) { - return cb(err); - } - - (0, _transformation.runAsync)(cfg, code, null, cb); - }); + if (callback === undefined) return transformRunner.sync(code, opts); + transformRunner.errback(code, opts, callback); }; exports.transform = transform; - -function transformSync(code, opts) { - const config = (0, _config.default)(opts); - if (config === null) return null; - return (0, _transformation.runSync)(config, code); -} - -function transformAsync(code, opts) { - return new Promise((res, rej) => { - transform(code, opts, (err, result) => { - if (err == null) res(result);else rej(err); - }); - }); -} \ No newline at end of file +const transformSync = transformRunner.sync; +exports.transformSync = transformSync; +const transformAsync = transformRunner.async; +exports.transformAsync = transformAsync; \ No newline at end of file diff --git a/node_modules/@babel/core/lib/transformation/block-hoist-plugin.js b/node_modules/@babel/core/lib/transformation/block-hoist-plugin.js index 49273a2a4..55eb06dfe 100644 --- a/node_modules/@babel/core/lib/transformation/block-hoist-plugin.js +++ b/node_modules/@babel/core/lib/transformation/block-hoist-plugin.js @@ -23,11 +23,12 @@ let LOADED_PLUGIN; function loadBlockHoistPlugin() { if (!LOADED_PLUGIN) { - const config = (0, _config.default)({ + const config = _config.default.sync({ babelrc: false, configFile: false, plugins: [blockHoistPlugin] }); + LOADED_PLUGIN = config ? config.passes[0][0] : undefined; if (!LOADED_PLUGIN) throw new Error("Assertion failure"); } @@ -47,7 +48,7 @@ const blockHoistPlugin = { for (let i = 0; i < node.body.length; i++) { const bodyNode = node.body[i]; - if (bodyNode && bodyNode._blockHoist != null) { + if ((bodyNode == null ? void 0 : bodyNode._blockHoist) != null) { hasChange = true; break; } @@ -55,7 +56,7 @@ const blockHoistPlugin = { if (!hasChange) return; node.body = (0, _sortBy().default)(node.body, function (bodyNode) { - let priority = bodyNode && bodyNode._blockHoist; + let priority = bodyNode == null ? void 0 : bodyNode._blockHoist; if (priority == null) priority = 1; if (priority === true) priority = 2; return -1 * priority; diff --git a/node_modules/@babel/core/lib/transformation/file/file.js b/node_modules/@babel/core/lib/transformation/file/file.js index 6348561ce..83f636684 100644 --- a/node_modules/@babel/core/lib/transformation/file/file.js +++ b/node_modules/@babel/core/lib/transformation/file/file.js @@ -45,6 +45,16 @@ function t() { return data; } +function _helperModuleTransforms() { + const data = require("@babel/helper-module-transforms"); + + _helperModuleTransforms = function () { + return data; + }; + + return data; +} + function _semver() { const data = _interopRequireDefault(require("semver")); @@ -57,7 +67,9 @@ function _semver() { function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } -function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; if (desc.get || desc.set) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj.default = obj; return newObj; } } +function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function () { return cache; }; return cache; } + +function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; } const errorVisitor = { enter(path, state) { @@ -78,9 +90,11 @@ class File { inputMap }) { this._map = new Map(); + this.opts = void 0; this.declarations = {}; this.path = null; this.ast = {}; + this.scope = void 0; this.metadata = {}; this.code = ""; this.inputMap = null; @@ -137,36 +151,7 @@ class File { } getModuleName() { - const { - filename, - filenameRelative = filename, - moduleId, - moduleIds = !!moduleId, - getModuleId, - sourceRoot: sourceRootTmp, - moduleRoot = sourceRootTmp, - sourceRoot = moduleRoot - } = this.opts; - if (!moduleIds) return null; - - if (moduleId != null && !getModuleId) { - return moduleId; - } - - let moduleName = moduleRoot != null ? moduleRoot + "/" : ""; - - if (filenameRelative) { - const sourceRootReplacer = sourceRoot != null ? new RegExp("^" + sourceRoot + "/?") : ""; - moduleName += filenameRelative.replace(sourceRootReplacer, "").replace(/\.(\w*?)$/, ""); - } - - moduleName = moduleName.replace(/\\/g, "/"); - - if (getModuleId) { - return getModuleId(moduleName) || moduleName; - } else { - return moduleName; - } + return (0, _helperModuleTransforms().getModuleName)(this.opts, this.opts); } addImport() { @@ -198,7 +183,7 @@ class File { if (res) return res; } - helpers().ensure(name); + helpers().ensure(name, File); const uid = this.declarations[name] = this.scope.generateUidIdentifier(name); const dependencies = {}; @@ -232,7 +217,6 @@ class File { buildCodeFrameError(node, msg, Error = SyntaxError) { let loc = node && (node.loc || node._loc); - msg = `${this.opts.filename}: ${msg}`; if (!loc && node) { const state = { @@ -253,7 +237,11 @@ class File { start: { line: loc.start.line, column: loc.start.column + 1 - } + }, + end: loc.end && loc.start.line === loc.end.line ? { + line: loc.end.line, + column: loc.end.column + 1 + } : undefined }, { highlightCode }); diff --git a/node_modules/@babel/core/lib/transformation/file/generate.js b/node_modules/@babel/core/lib/transformation/file/generate.js index 6be495ce8..3301b56d2 100644 --- a/node_modules/@babel/core/lib/transformation/file/generate.js +++ b/node_modules/@babel/core/lib/transformation/file/generate.js @@ -59,7 +59,7 @@ function generateCode(pluginPasses, file) { result = results[0]; if (typeof result.then === "function") { - throw new Error(`You appear to be using an async parser plugin, ` + `which your current version of Babel does not support. ` + `If you're using a published plugin, ` + `you may need to upgrade your @babel/core version.`); + throw new Error(`You appear to be using an async codegen plugin, ` + `which your current version of Babel does not support. ` + `If you're using a published plugin, ` + `you may need to upgrade your @babel/core version.`); } } else { throw new Error("More than one plugin attempted to override codegen."); diff --git a/node_modules/@babel/core/lib/transformation/file/merge-map.js b/node_modules/@babel/core/lib/transformation/file/merge-map.js index a92b9ed0d..d49c994a2 100644 --- a/node_modules/@babel/core/lib/transformation/file/merge-map.js +++ b/node_modules/@babel/core/lib/transformation/file/merge-map.js @@ -22,11 +22,9 @@ function mergeSourceMap(inputMap, map) { const output = buildMappingData(map); const mergedGenerator = new (_sourceMap().default.SourceMapGenerator)(); - for (const _ref of input.sources) { - const { - source - } = _ref; - + for (const { + source + } of input.sources) { if (typeof source.content === "string") { mergedGenerator.setSourceContent(source.path, source.content); } @@ -95,11 +93,9 @@ function makeMappingKey(item) { function eachOverlappingGeneratedOutputRange(outputFile, inputGeneratedRange, callback) { const overlappingOriginal = filterApplicableOriginalRanges(outputFile, inputGeneratedRange); - for (const _ref2 of overlappingOriginal) { - const { - generated - } = _ref2; - + for (const { + generated + } of overlappingOriginal) { for (const item of generated) { callback(item); } @@ -125,18 +121,14 @@ function filterApplicableOriginalRanges({ } function eachInputGeneratedRange(map, callback) { - for (const _ref3 of map.sources) { - const { - source, - mappings - } = _ref3; - - for (const _ref4 of mappings) { - const { - original, - generated - } = _ref4; - + for (const { + source, + mappings + } of map.sources) { + for (const { + original, + generated + } of mappings) { for (const item of generated) { callback(item, original, source); } diff --git a/node_modules/@babel/core/lib/transformation/index.js b/node_modules/@babel/core/lib/transformation/index.js index b14697aa0..bb35bbe0f 100644 --- a/node_modules/@babel/core/lib/transformation/index.js +++ b/node_modules/@babel/core/lib/transformation/index.js @@ -3,8 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true }); -exports.runAsync = runAsync; -exports.runSync = runSync; +exports.run = run; function _traverse() { const data = _interopRequireDefault(require("@babel/traverse")); @@ -28,26 +27,45 @@ var _generate = _interopRequireDefault(require("./file/generate")); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } -function runAsync(config, code, ast, callback) { - let result; +function* run(config, code, ast) { + const file = yield* (0, _normalizeFile.default)(config.passes, (0, _normalizeOpts.default)(config), code, ast); + const opts = file.opts; try { - result = runSync(config, code, ast); - } catch (err) { - return callback(err); + yield* transformFile(file, config.passes); + } catch (e) { + var _opts$filename; + + e.message = `${(_opts$filename = opts.filename) != null ? _opts$filename : "unknown"}: ${e.message}`; + + if (!e.code) { + e.code = "BABEL_TRANSFORM_ERROR"; + } + + throw e; } - return callback(null, result); -} + let outputCode, outputMap; + + try { + if (opts.code !== false) { + ({ + outputCode, + outputMap + } = (0, _generate.default)(config.passes, file)); + } + } catch (e) { + var _opts$filename2; + + e.message = `${(_opts$filename2 = opts.filename) != null ? _opts$filename2 : "unknown"}: ${e.message}`; + + if (!e.code) { + e.code = "BABEL_GENERATE_ERROR"; + } + + throw e; + } -function runSync(config, code, ast) { - const file = (0, _normalizeFile.default)(config.passes, (0, _normalizeOpts.default)(config), code, ast); - transformFile(file, config.passes); - const opts = file.opts; - const { - outputCode, - outputMap - } = opts.code !== false ? (0, _generate.default)(config.passes, file) : {}; return { metadata: file.metadata, options: opts, @@ -58,7 +76,7 @@ function runSync(config, code, ast) { }; } -function transformFile(file, pluginPasses) { +function* transformFile(file, pluginPasses) { for (const pluginPairs of pluginPasses) { const passPairs = []; const passes = []; @@ -76,6 +94,7 @@ function transformFile(file, pluginPasses) { if (fn) { const result = fn.call(pass, file); + yield* []; if (isThenable(result)) { throw new Error(`You appear to be using an plugin with an async .pre, ` + `which your current version of Babel does not support. ` + `If you're using a published plugin, you may need to upgrade ` + `your @babel/core version.`); @@ -92,6 +111,7 @@ function transformFile(file, pluginPasses) { if (fn) { const result = fn.call(pass, file); + yield* []; if (isThenable(result)) { throw new Error(`You appear to be using an plugin with an async .post, ` + `which your current version of Babel does not support. ` + `If you're using a published plugin, you may need to upgrade ` + `your @babel/core version.`); diff --git a/node_modules/@babel/core/lib/transformation/normalize-file.js b/node_modules/@babel/core/lib/transformation/normalize-file.js index fbe3b5877..b6006bca7 100644 --- a/node_modules/@babel/core/lib/transformation/normalize-file.js +++ b/node_modules/@babel/core/lib/transformation/normalize-file.js @@ -5,6 +5,16 @@ Object.defineProperty(exports, "__esModule", { }); exports.default = normalizeFile; +function _fs() { + const data = _interopRequireDefault(require("fs")); + + _fs = function () { + return data; + }; + + return data; +} + function _path() { const data = _interopRequireDefault(require("path")); @@ -55,38 +65,40 @@ function _convertSourceMap() { return data; } -function _parser() { - const data = require("@babel/parser"); - - _parser = function () { - return data; - }; +var _file = _interopRequireDefault(require("./file/file")); - return data; -} +var _parser = _interopRequireDefault(require("../parser")); -function _codeFrame() { - const data = require("@babel/code-frame"); +function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function () { return cache; }; return cache; } - _codeFrame = function () { - return data; - }; +function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; } - return data; -} +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } -var _file = _interopRequireDefault(require("./file/file")); +const debug = (0, _debug().default)("babel:transform:file"); +const LARGE_INPUT_SOURCEMAP_THRESHOLD = 1000000; -var _missingPluginHelper = _interopRequireDefault(require("./util/missing-plugin-helper")); +function* normalizeFile(pluginPasses, options, code, ast) { + code = `${code || ""}`; -function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; if (desc.get || desc.set) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj.default = obj; return newObj; } } + if (ast) { + if (ast.type === "Program") { + ast = t().file(ast, [], []); + } else if (ast.type !== "File") { + throw new Error("AST root must be a Program or File node"); + } -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + const { + cloneInputAst + } = options; -const debug = (0, _debug().default)("babel:transform:file"); + if (cloneInputAst) { + ast = (0, _cloneDeep().default)(ast); + } + } else { + ast = yield* (0, _parser.default)(pluginPasses, options, code); + } -function normalizeFile(pluginPasses, options, code, ast) { - code = `${code || ""}`; let inputMap = null; if (options.inputSourceMap !== false) { @@ -95,49 +107,40 @@ function normalizeFile(pluginPasses, options, code, ast) { } if (!inputMap) { - try { - inputMap = _convertSourceMap().default.fromSource(code); + const lastComment = extractComments(INLINE_SOURCEMAP_REGEX, ast); - if (inputMap) { - code = _convertSourceMap().default.removeComments(code); + if (lastComment) { + try { + inputMap = _convertSourceMap().default.fromComment(lastComment); + } catch (err) { + debug("discarding unknown inline input sourcemap", err); } - } catch (err) { - debug("discarding unknown inline input sourcemap", err); - code = _convertSourceMap().default.removeComments(code); } } if (!inputMap) { - if (typeof options.filename === "string") { + const lastComment = extractComments(EXTERNAL_SOURCEMAP_REGEX, ast); + + if (typeof options.filename === "string" && lastComment) { try { - inputMap = _convertSourceMap().default.fromMapFileSource(code, _path().default.dirname(options.filename)); + const match = EXTERNAL_SOURCEMAP_REGEX.exec(lastComment); + + const inputMapContent = _fs().default.readFileSync(_path().default.resolve(_path().default.dirname(options.filename), match[1])); - if (inputMap) { - code = _convertSourceMap().default.removeMapFileComments(code); + if (inputMapContent.length > LARGE_INPUT_SOURCEMAP_THRESHOLD) { + debug("skip merging input map > 1 MB"); + } else { + inputMap = _convertSourceMap().default.fromJSON(inputMapContent); } } catch (err) { debug("discarding unknown file input sourcemap", err); - code = _convertSourceMap().default.removeMapFileComments(code); } - } else { + } else if (lastComment) { debug("discarding un-loadable file input sourcemap"); - code = _convertSourceMap().default.removeMapFileComments(code); } } } - if (ast) { - if (ast.type === "Program") { - ast = t().file(ast, [], []); - } else if (ast.type !== "File") { - throw new Error("AST root must be a Program or File node"); - } - - ast = (0, _cloneDeep().default)(ast); - } else { - ast = parser(pluginPasses, options, code); - } - return new _file.default(options, { code, ast, @@ -145,67 +148,32 @@ function normalizeFile(pluginPasses, options, code, ast) { }); } -function parser(pluginPasses, { - parserOpts, - highlightCode = true, - filename = "unknown" -}, code) { - try { - const results = []; - - for (const plugins of pluginPasses) { - for (const plugin of plugins) { - const { - parserOverride - } = plugin; - - if (parserOverride) { - const ast = parserOverride(code, parserOpts, _parser().parse); - if (ast !== undefined) results.push(ast); - } - } - } - - if (results.length === 0) { - return (0, _parser().parse)(code, parserOpts); - } else if (results.length === 1) { - if (typeof results[0].then === "function") { - throw new Error(`You appear to be using an async codegen plugin, ` + `which your current version of Babel does not support. ` + `If you're using a published plugin, you may need to upgrade ` + `your @babel/core version.`); +const INLINE_SOURCEMAP_REGEX = /^[@#]\s+sourceMappingURL=data:(?:application|text)\/json;(?:charset[:=]\S+?;)?base64,(?:.*)$/; +const EXTERNAL_SOURCEMAP_REGEX = /^[@#][ \t]+sourceMappingURL=([^\s'"`]+)[ \t]*$/; + +function extractCommentsFromList(regex, comments, lastComment) { + if (comments) { + comments = comments.filter(({ + value + }) => { + if (regex.test(value)) { + lastComment = value; + return false; } - return results[0]; - } - - throw new Error("More than one plugin attempted to override parsing."); - } catch (err) { - if (err.code === "BABEL_PARSER_SOURCETYPE_MODULE_REQUIRED") { - err.message += "\nConsider renaming the file to '.mjs', or setting sourceType:module " + "or sourceType:unambiguous in your Babel config for this file."; - } - - const { - loc, - missingPlugin - } = err; - - if (loc) { - const codeFrame = (0, _codeFrame().codeFrameColumns)(code, { - start: { - line: loc.line, - column: loc.column + 1 - } - }, { - highlightCode - }); - - if (missingPlugin) { - err.message = `${filename}: ` + (0, _missingPluginHelper.default)(missingPlugin[0], loc, codeFrame); - } else { - err.message = `${filename}: ${err.message}\n\n` + codeFrame; - } + return true; + }); + } - err.code = "BABEL_PARSE_ERROR"; - } + return [comments, lastComment]; +} - throw err; - } +function extractComments(regex, ast) { + let lastComment = null; + t().traverseFast(ast, node => { + [node.leadingComments, lastComment] = extractCommentsFromList(regex, node.leadingComments, lastComment); + [node.innerComments, lastComment] = extractCommentsFromList(regex, node.innerComments, lastComment); + [node.trailingComments, lastComment] = extractCommentsFromList(regex, node.trailingComments, lastComment); + }); + return lastComment; } \ No newline at end of file diff --git a/node_modules/@babel/core/lib/transformation/plugin-pass.js b/node_modules/@babel/core/lib/transformation/plugin-pass.js index 2c746d1d6..ea2efdfef 100644 --- a/node_modules/@babel/core/lib/transformation/plugin-pass.js +++ b/node_modules/@babel/core/lib/transformation/plugin-pass.js @@ -8,6 +8,11 @@ exports.default = void 0; class PluginPass { constructor(file, key, options) { this._map = new Map(); + this.key = void 0; + this.file = void 0; + this.opts = void 0; + this.cwd = void 0; + this.filename = void 0; this.key = key; this.file = file; this.opts = options || {}; diff --git a/node_modules/@babel/core/lib/transformation/util/missing-plugin-helper.js b/node_modules/@babel/core/lib/transformation/util/missing-plugin-helper.js deleted file mode 100644 index 93ebb8df1..000000000 --- a/node_modules/@babel/core/lib/transformation/util/missing-plugin-helper.js +++ /dev/null @@ -1,239 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = generateMissingPluginMessage; -const pluginNameMap = { - classProperties: { - syntax: { - name: "@babel/plugin-syntax-class-properties", - url: "https://git.io/vb4yQ" - }, - transform: { - name: "@babel/plugin-proposal-class-properties", - url: "https://git.io/vb4SL" - } - }, - decorators: { - syntax: { - name: "@babel/plugin-syntax-decorators", - url: "https://git.io/vb4y9" - }, - transform: { - name: "@babel/plugin-proposal-decorators", - url: "https://git.io/vb4ST" - } - }, - doExpressions: { - syntax: { - name: "@babel/plugin-syntax-do-expressions", - url: "https://git.io/vb4yh" - }, - transform: { - name: "@babel/plugin-proposal-do-expressions", - url: "https://git.io/vb4S3" - } - }, - dynamicImport: { - syntax: { - name: "@babel/plugin-syntax-dynamic-import", - url: "https://git.io/vb4Sv" - } - }, - exportDefaultFrom: { - syntax: { - name: "@babel/plugin-syntax-export-default-from", - url: "https://git.io/vb4SO" - }, - transform: { - name: "@babel/plugin-proposal-export-default-from", - url: "https://git.io/vb4yH" - } - }, - exportNamespaceFrom: { - syntax: { - name: "@babel/plugin-syntax-export-namespace-from", - url: "https://git.io/vb4Sf" - }, - transform: { - name: "@babel/plugin-proposal-export-namespace-from", - url: "https://git.io/vb4SG" - } - }, - flow: { - syntax: { - name: "@babel/plugin-syntax-flow", - url: "https://git.io/vb4yb" - }, - transform: { - name: "@babel/plugin-transform-flow-strip-types", - url: "https://git.io/vb49g" - } - }, - functionBind: { - syntax: { - name: "@babel/plugin-syntax-function-bind", - url: "https://git.io/vb4y7" - }, - transform: { - name: "@babel/plugin-proposal-function-bind", - url: "https://git.io/vb4St" - } - }, - functionSent: { - syntax: { - name: "@babel/plugin-syntax-function-sent", - url: "https://git.io/vb4yN" - }, - transform: { - name: "@babel/plugin-proposal-function-sent", - url: "https://git.io/vb4SZ" - } - }, - importMeta: { - syntax: { - name: "@babel/plugin-syntax-import-meta", - url: "https://git.io/vbKK6" - } - }, - jsx: { - syntax: { - name: "@babel/plugin-syntax-jsx", - url: "https://git.io/vb4yA" - }, - transform: { - name: "@babel/plugin-transform-react-jsx", - url: "https://git.io/vb4yd" - } - }, - logicalAssignment: { - syntax: { - name: "@babel/plugin-syntax-logical-assignment-operators", - url: "https://git.io/vAlBp" - }, - transform: { - name: "@babel/plugin-proposal-logical-assignment-operators", - url: "https://git.io/vAlRe" - } - }, - nullishCoalescingOperator: { - syntax: { - name: "@babel/plugin-syntax-nullish-coalescing-operator", - url: "https://git.io/vb4yx" - }, - transform: { - name: "@babel/plugin-proposal-nullish-coalescing-operator", - url: "https://git.io/vb4Se" - } - }, - numericSeparator: { - syntax: { - name: "@babel/plugin-syntax-numeric-separator", - url: "https://git.io/vb4Sq" - }, - transform: { - name: "@babel/plugin-proposal-numeric-separator", - url: "https://git.io/vb4yS" - } - }, - optionalChaining: { - syntax: { - name: "@babel/plugin-syntax-optional-chaining", - url: "https://git.io/vb4Sc" - }, - transform: { - name: "@babel/plugin-proposal-optional-chaining", - url: "https://git.io/vb4Sk" - } - }, - pipelineOperator: { - syntax: { - name: "@babel/plugin-syntax-pipeline-operator", - url: "https://git.io/vb4yj" - }, - transform: { - name: "@babel/plugin-proposal-pipeline-operator", - url: "https://git.io/vb4SU" - } - }, - throwExpressions: { - syntax: { - name: "@babel/plugin-syntax-throw-expressions", - url: "https://git.io/vb4SJ" - }, - transform: { - name: "@babel/plugin-proposal-throw-expressions", - url: "https://git.io/vb4yF" - } - }, - typescript: { - syntax: { - name: "@babel/plugin-syntax-typescript", - url: "https://git.io/vb4SC" - }, - transform: { - name: "@babel/plugin-transform-typescript", - url: "https://git.io/vb4Sm" - } - }, - asyncGenerators: { - syntax: { - name: "@babel/plugin-syntax-async-generators", - url: "https://git.io/vb4SY" - }, - transform: { - name: "@babel/plugin-proposal-async-generator-functions", - url: "https://git.io/vb4yp" - } - }, - objectRestSpread: { - syntax: { - name: "@babel/plugin-syntax-object-rest-spread", - url: "https://git.io/vb4y5" - }, - transform: { - name: "@babel/plugin-proposal-object-rest-spread", - url: "https://git.io/vb4Ss" - } - }, - optionalCatchBinding: { - syntax: { - name: "@babel/plugin-syntax-optional-catch-binding", - url: "https://git.io/vb4Sn" - }, - transform: { - name: "@babel/plugin-proposal-optional-catch-binding", - url: "https://git.io/vb4SI" - } - } -}; - -const getNameURLCombination = ({ - name, - url -}) => `${name} (${url})`; - -function generateMissingPluginMessage(missingPluginName, loc, codeFrame) { - let helpMessage = `Support for the experimental syntax '${missingPluginName}' isn't currently enabled ` + `(${loc.line}:${loc.column + 1}):\n\n` + codeFrame; - const pluginInfo = pluginNameMap[missingPluginName]; - - if (pluginInfo) { - const { - syntax: syntaxPlugin, - transform: transformPlugin - } = pluginInfo; - - if (syntaxPlugin) { - if (transformPlugin) { - const transformPluginInfo = getNameURLCombination(transformPlugin); - helpMessage += `\n\nAdd ${transformPluginInfo} to the 'plugins' section of your Babel config ` + `to enable transformation.`; - } else { - const syntaxPluginInfo = getNameURLCombination(syntaxPlugin); - helpMessage += `\n\nAdd ${syntaxPluginInfo} to the 'plugins' section of your Babel config ` + `to enable parsing.`; - } - } - } - - return helpMessage; -} \ No newline at end of file diff --git a/node_modules/@babel/core/node_modules/.bin/semver b/node_modules/@babel/core/node_modules/.bin/semver deleted file mode 120000 index 317eb293d..000000000 --- a/node_modules/@babel/core/node_modules/.bin/semver +++ /dev/null @@ -1 +0,0 @@ -../semver/bin/semver \ No newline at end of file diff --git a/node_modules/@babel/core/node_modules/debug/CHANGELOG.md b/node_modules/@babel/core/node_modules/debug/CHANGELOG.md deleted file mode 100644 index 820d21e33..000000000 --- a/node_modules/@babel/core/node_modules/debug/CHANGELOG.md +++ /dev/null @@ -1,395 +0,0 @@ - -3.1.0 / 2017-09-26 -================== - - * Add `DEBUG_HIDE_DATE` env var (#486) - * Remove ReDoS regexp in %o formatter (#504) - * Remove "component" from package.json - * Remove `component.json` - * Ignore package-lock.json - * Examples: fix colors printout - * Fix: browser detection - * Fix: spelling mistake (#496, @EdwardBetts) - -3.0.1 / 2017-08-24 -================== - - * Fix: Disable colors in Edge and Internet Explorer (#489) - -3.0.0 / 2017-08-08 -================== - - * Breaking: Remove DEBUG_FD (#406) - * Breaking: Use `Date#toISOString()` instead to `Date#toUTCString()` when output is not a TTY (#418) - * Breaking: Make millisecond timer namespace specific and allow 'always enabled' output (#408) - * Addition: document `enabled` flag (#465) - * Addition: add 256 colors mode (#481) - * Addition: `enabled()` updates existing debug instances, add `destroy()` function (#440) - * Update: component: update "ms" to v2.0.0 - * Update: separate the Node and Browser tests in Travis-CI - * Update: refactor Readme, fixed documentation, added "Namespace Colors" section, redid screenshots - * Update: separate Node.js and web browser examples for organization - * Update: update "browserify" to v14.4.0 - * Fix: fix Readme typo (#473) - -2.6.9 / 2017-09-22 -================== - - * remove ReDoS regexp in %o formatter (#504) - -2.6.8 / 2017-05-18 -================== - - * Fix: Check for undefined on browser globals (#462, @marbemac) - -2.6.7 / 2017-05-16 -================== - - * Fix: Update ms to 2.0.0 to fix regular expression denial of service vulnerability (#458, @hubdotcom) - * Fix: Inline extend function in node implementation (#452, @dougwilson) - * Docs: Fix typo (#455, @msasad) - -2.6.5 / 2017-04-27 -================== - - * Fix: null reference check on window.documentElement.style.WebkitAppearance (#447, @thebigredgeek) - * Misc: clean up browser reference checks (#447, @thebigredgeek) - * Misc: add npm-debug.log to .gitignore (@thebigredgeek) - - -2.6.4 / 2017-04-20 -================== - - * Fix: bug that would occur if process.env.DEBUG is a non-string value. (#444, @LucianBuzzo) - * Chore: ignore bower.json in npm installations. (#437, @joaovieira) - * Misc: update "ms" to v0.7.3 (@tootallnate) - -2.6.3 / 2017-03-13 -================== - - * Fix: Electron reference to `process.env.DEBUG` (#431, @paulcbetts) - * Docs: Changelog fix (@thebigredgeek) - -2.6.2 / 2017-03-10 -================== - - * Fix: DEBUG_MAX_ARRAY_LENGTH (#420, @slavaGanzin) - * Docs: Add backers and sponsors from Open Collective (#422, @piamancini) - * Docs: Add Slackin invite badge (@tootallnate) - -2.6.1 / 2017-02-10 -================== - - * Fix: Module's `export default` syntax fix for IE8 `Expected identifier` error - * Fix: Whitelist DEBUG_FD for values 1 and 2 only (#415, @pi0) - * Fix: IE8 "Expected identifier" error (#414, @vgoma) - * Fix: Namespaces would not disable once enabled (#409, @musikov) - -2.6.0 / 2016-12-28 -================== - - * Fix: added better null pointer checks for browser useColors (@thebigredgeek) - * Improvement: removed explicit `window.debug` export (#404, @tootallnate) - * Improvement: deprecated `DEBUG_FD` environment variable (#405, @tootallnate) - -2.5.2 / 2016-12-25 -================== - - * Fix: reference error on window within webworkers (#393, @KlausTrainer) - * Docs: fixed README typo (#391, @lurch) - * Docs: added notice about v3 api discussion (@thebigredgeek) - -2.5.1 / 2016-12-20 -================== - - * Fix: babel-core compatibility - -2.5.0 / 2016-12-20 -================== - - * Fix: wrong reference in bower file (@thebigredgeek) - * Fix: webworker compatibility (@thebigredgeek) - * Fix: output formatting issue (#388, @kribblo) - * Fix: babel-loader compatibility (#383, @escwald) - * Misc: removed built asset from repo and publications (@thebigredgeek) - * Misc: moved source files to /src (#378, @yamikuronue) - * Test: added karma integration and replaced babel with browserify for browser tests (#378, @yamikuronue) - * Test: coveralls integration (#378, @yamikuronue) - * Docs: simplified language in the opening paragraph (#373, @yamikuronue) - -2.4.5 / 2016-12-17 -================== - - * Fix: `navigator` undefined in Rhino (#376, @jochenberger) - * Fix: custom log function (#379, @hsiliev) - * Improvement: bit of cleanup + linting fixes (@thebigredgeek) - * Improvement: rm non-maintainted `dist/` dir (#375, @freewil) - * Docs: simplified language in the opening paragraph. (#373, @yamikuronue) - -2.4.4 / 2016-12-14 -================== - - * Fix: work around debug being loaded in preload scripts for electron (#368, @paulcbetts) - -2.4.3 / 2016-12-14 -================== - - * Fix: navigation.userAgent error for react native (#364, @escwald) - -2.4.2 / 2016-12-14 -================== - - * Fix: browser colors (#367, @tootallnate) - * Misc: travis ci integration (@thebigredgeek) - * Misc: added linting and testing boilerplate with sanity check (@thebigredgeek) - -2.4.1 / 2016-12-13 -================== - - * Fix: typo that broke the package (#356) - -2.4.0 / 2016-12-13 -================== - - * Fix: bower.json references unbuilt src entry point (#342, @justmatt) - * Fix: revert "handle regex special characters" (@tootallnate) - * Feature: configurable util.inspect()`options for NodeJS (#327, @tootallnate) - * Feature: %O`(big O) pretty-prints objects (#322, @tootallnate) - * Improvement: allow colors in workers (#335, @botverse) - * Improvement: use same color for same namespace. (#338, @lchenay) - -2.3.3 / 2016-11-09 -================== - - * Fix: Catch `JSON.stringify()` errors (#195, Jovan Alleyne) - * Fix: Returning `localStorage` saved values (#331, Levi Thomason) - * Improvement: Don't create an empty object when no `process` (Nathan Rajlich) - -2.3.2 / 2016-11-09 -================== - - * Fix: be super-safe in index.js as well (@TooTallNate) - * Fix: should check whether process exists (Tom Newby) - -2.3.1 / 2016-11-09 -================== - - * Fix: Added electron compatibility (#324, @paulcbetts) - * Improvement: Added performance optimizations (@tootallnate) - * Readme: Corrected PowerShell environment variable example (#252, @gimre) - * Misc: Removed yarn lock file from source control (#321, @fengmk2) - -2.3.0 / 2016-11-07 -================== - - * Fix: Consistent placement of ms diff at end of output (#215, @gorangajic) - * Fix: Escaping of regex special characters in namespace strings (#250, @zacronos) - * Fix: Fixed bug causing crash on react-native (#282, @vkarpov15) - * Feature: Enabled ES6+ compatible import via default export (#212 @bucaran) - * Feature: Added %O formatter to reflect Chrome's console.log capability (#279, @oncletom) - * Package: Update "ms" to 0.7.2 (#315, @DevSide) - * Package: removed superfluous version property from bower.json (#207 @kkirsche) - * Readme: fix USE_COLORS to DEBUG_COLORS - * Readme: Doc fixes for format string sugar (#269, @mlucool) - * Readme: Updated docs for DEBUG_FD and DEBUG_COLORS environment variables (#232, @mattlyons0) - * Readme: doc fixes for PowerShell (#271 #243, @exoticknight @unreadable) - * Readme: better docs for browser support (#224, @matthewmueller) - * Tooling: Added yarn integration for development (#317, @thebigredgeek) - * Misc: Renamed History.md to CHANGELOG.md (@thebigredgeek) - * Misc: Added license file (#226 #274, @CantemoInternal @sdaitzman) - * Misc: Updated contributors (@thebigredgeek) - -2.2.0 / 2015-05-09 -================== - - * package: update "ms" to v0.7.1 (#202, @dougwilson) - * README: add logging to file example (#193, @DanielOchoa) - * README: fixed a typo (#191, @amir-s) - * browser: expose `storage` (#190, @stephenmathieson) - * Makefile: add a `distclean` target (#189, @stephenmathieson) - -2.1.3 / 2015-03-13 -================== - - * Updated stdout/stderr example (#186) - * Updated example/stdout.js to match debug current behaviour - * Renamed example/stderr.js to stdout.js - * Update Readme.md (#184) - * replace high intensity foreground color for bold (#182, #183) - -2.1.2 / 2015-03-01 -================== - - * dist: recompile - * update "ms" to v0.7.0 - * package: update "browserify" to v9.0.3 - * component: fix "ms.js" repo location - * changed bower package name - * updated documentation about using debug in a browser - * fix: security error on safari (#167, #168, @yields) - -2.1.1 / 2014-12-29 -================== - - * browser: use `typeof` to check for `console` existence - * browser: check for `console.log` truthiness (fix IE 8/9) - * browser: add support for Chrome apps - * Readme: added Windows usage remarks - * Add `bower.json` to properly support bower install - -2.1.0 / 2014-10-15 -================== - - * node: implement `DEBUG_FD` env variable support - * package: update "browserify" to v6.1.0 - * package: add "license" field to package.json (#135, @panuhorsmalahti) - -2.0.0 / 2014-09-01 -================== - - * package: update "browserify" to v5.11.0 - * node: use stderr rather than stdout for logging (#29, @stephenmathieson) - -1.0.4 / 2014-07-15 -================== - - * dist: recompile - * example: remove `console.info()` log usage - * example: add "Content-Type" UTF-8 header to browser example - * browser: place %c marker after the space character - * browser: reset the "content" color via `color: inherit` - * browser: add colors support for Firefox >= v31 - * debug: prefer an instance `log()` function over the global one (#119) - * Readme: update documentation about styled console logs for FF v31 (#116, @wryk) - -1.0.3 / 2014-07-09 -================== - - * Add support for multiple wildcards in namespaces (#122, @seegno) - * browser: fix lint - -1.0.2 / 2014-06-10 -================== - - * browser: update color palette (#113, @gscottolson) - * common: make console logging function configurable (#108, @timoxley) - * node: fix %o colors on old node <= 0.8.x - * Makefile: find node path using shell/which (#109, @timoxley) - -1.0.1 / 2014-06-06 -================== - - * browser: use `removeItem()` to clear localStorage - * browser, node: don't set DEBUG if namespaces is undefined (#107, @leedm777) - * package: add "contributors" section - * node: fix comment typo - * README: list authors - -1.0.0 / 2014-06-04 -================== - - * make ms diff be global, not be scope - * debug: ignore empty strings in enable() - * node: make DEBUG_COLORS able to disable coloring - * *: export the `colors` array - * npmignore: don't publish the `dist` dir - * Makefile: refactor to use browserify - * package: add "browserify" as a dev dependency - * Readme: add Web Inspector Colors section - * node: reset terminal color for the debug content - * node: map "%o" to `util.inspect()` - * browser: map "%j" to `JSON.stringify()` - * debug: add custom "formatters" - * debug: use "ms" module for humanizing the diff - * Readme: add "bash" syntax highlighting - * browser: add Firebug color support - * browser: add colors for WebKit browsers - * node: apply log to `console` - * rewrite: abstract common logic for Node & browsers - * add .jshintrc file - -0.8.1 / 2014-04-14 -================== - - * package: re-add the "component" section - -0.8.0 / 2014-03-30 -================== - - * add `enable()` method for nodejs. Closes #27 - * change from stderr to stdout - * remove unnecessary index.js file - -0.7.4 / 2013-11-13 -================== - - * remove "browserify" key from package.json (fixes something in browserify) - -0.7.3 / 2013-10-30 -================== - - * fix: catch localStorage security error when cookies are blocked (Chrome) - * add debug(err) support. Closes #46 - * add .browser prop to package.json. Closes #42 - -0.7.2 / 2013-02-06 -================== - - * fix package.json - * fix: Mobile Safari (private mode) is broken with debug - * fix: Use unicode to send escape character to shell instead of octal to work with strict mode javascript - -0.7.1 / 2013-02-05 -================== - - * add repository URL to package.json - * add DEBUG_COLORED to force colored output - * add browserify support - * fix component. Closes #24 - -0.7.0 / 2012-05-04 -================== - - * Added .component to package.json - * Added debug.component.js build - -0.6.0 / 2012-03-16 -================== - - * Added support for "-" prefix in DEBUG [Vinay Pulim] - * Added `.enabled` flag to the node version [TooTallNate] - -0.5.0 / 2012-02-02 -================== - - * Added: humanize diffs. Closes #8 - * Added `debug.disable()` to the CS variant - * Removed padding. Closes #10 - * Fixed: persist client-side variant again. Closes #9 - -0.4.0 / 2012-02-01 -================== - - * Added browser variant support for older browsers [TooTallNate] - * Added `debug.enable('project:*')` to browser variant [TooTallNate] - * Added padding to diff (moved it to the right) - -0.3.0 / 2012-01-26 -================== - - * Added millisecond diff when isatty, otherwise UTC string - -0.2.0 / 2012-01-22 -================== - - * Added wildcard support - -0.1.0 / 2011-12-02 -================== - - * Added: remove colors unless stderr isatty [TooTallNate] - -0.0.1 / 2010-01-03 -================== - - * Initial release diff --git a/node_modules/@babel/core/node_modules/debug/dist/debug.js b/node_modules/@babel/core/node_modules/debug/dist/debug.js deleted file mode 100644 index 89ad0c217..000000000 --- a/node_modules/@babel/core/node_modules/debug/dist/debug.js +++ /dev/null @@ -1,912 +0,0 @@ -"use strict"; - -function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _nonIterableSpread(); } - -function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance"); } - -function _iterableToArray(iter) { if (Symbol.iterator in Object(iter) || Object.prototype.toString.call(iter) === "[object Arguments]") return Array.from(iter); } - -function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = new Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } } - -function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } - -(function (f) { - if ((typeof exports === "undefined" ? "undefined" : _typeof(exports)) === "object" && typeof module !== "undefined") { - module.exports = f(); - } else if (typeof define === "function" && define.amd) { - define([], f); - } else { - var g; - - if (typeof window !== "undefined") { - g = window; - } else if (typeof global !== "undefined") { - g = global; - } else if (typeof self !== "undefined") { - g = self; - } else { - g = this; - } - - g.debug = f(); - } -})(function () { - var define, module, exports; - return function () { - function r(e, n, t) { - function o(i, f) { - if (!n[i]) { - if (!e[i]) { - var c = "function" == typeof require && require; - if (!f && c) return c(i, !0); - if (u) return u(i, !0); - var a = new Error("Cannot find module '" + i + "'"); - throw a.code = "MODULE_NOT_FOUND", a; - } - - var p = n[i] = { - exports: {} - }; - e[i][0].call(p.exports, function (r) { - var n = e[i][1][r]; - return o(n || r); - }, p, p.exports, r, e, n, t); - } - - return n[i].exports; - } - - for (var u = "function" == typeof require && require, i = 0; i < t.length; i++) { - o(t[i]); - } - - return o; - } - - return r; - }()({ - 1: [function (require, module, exports) { - /** - * Helpers. - */ - var s = 1000; - var m = s * 60; - var h = m * 60; - var d = h * 24; - var w = d * 7; - var y = d * 365.25; - /** - * Parse or format the given `val`. - * - * Options: - * - * - `long` verbose formatting [false] - * - * @param {String|Number} val - * @param {Object} [options] - * @throws {Error} throw an error if val is not a non-empty string or a number - * @return {String|Number} - * @api public - */ - - module.exports = function (val, options) { - options = options || {}; - - var type = _typeof(val); - - if (type === 'string' && val.length > 0) { - return parse(val); - } else if (type === 'number' && isNaN(val) === false) { - return options.long ? fmtLong(val) : fmtShort(val); - } - - throw new Error('val is not a non-empty string or a valid number. val=' + JSON.stringify(val)); - }; - /** - * Parse the given `str` and return milliseconds. - * - * @param {String} str - * @return {Number} - * @api private - */ - - - function parse(str) { - str = String(str); - - if (str.length > 100) { - return; - } - - var match = /^((?:\d+)?\-?\d?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(str); - - if (!match) { - return; - } - - var n = parseFloat(match[1]); - var type = (match[2] || 'ms').toLowerCase(); - - switch (type) { - case 'years': - case 'year': - case 'yrs': - case 'yr': - case 'y': - return n * y; - - case 'weeks': - case 'week': - case 'w': - return n * w; - - case 'days': - case 'day': - case 'd': - return n * d; - - case 'hours': - case 'hour': - case 'hrs': - case 'hr': - case 'h': - return n * h; - - case 'minutes': - case 'minute': - case 'mins': - case 'min': - case 'm': - return n * m; - - case 'seconds': - case 'second': - case 'secs': - case 'sec': - case 's': - return n * s; - - case 'milliseconds': - case 'millisecond': - case 'msecs': - case 'msec': - case 'ms': - return n; - - default: - return undefined; - } - } - /** - * Short format for `ms`. - * - * @param {Number} ms - * @return {String} - * @api private - */ - - - function fmtShort(ms) { - var msAbs = Math.abs(ms); - - if (msAbs >= d) { - return Math.round(ms / d) + 'd'; - } - - if (msAbs >= h) { - return Math.round(ms / h) + 'h'; - } - - if (msAbs >= m) { - return Math.round(ms / m) + 'm'; - } - - if (msAbs >= s) { - return Math.round(ms / s) + 's'; - } - - return ms + 'ms'; - } - /** - * Long format for `ms`. - * - * @param {Number} ms - * @return {String} - * @api private - */ - - - function fmtLong(ms) { - var msAbs = Math.abs(ms); - - if (msAbs >= d) { - return plural(ms, msAbs, d, 'day'); - } - - if (msAbs >= h) { - return plural(ms, msAbs, h, 'hour'); - } - - if (msAbs >= m) { - return plural(ms, msAbs, m, 'minute'); - } - - if (msAbs >= s) { - return plural(ms, msAbs, s, 'second'); - } - - return ms + ' ms'; - } - /** - * Pluralization helper. - */ - - - function plural(ms, msAbs, n, name) { - var isPlural = msAbs >= n * 1.5; - return Math.round(ms / n) + ' ' + name + (isPlural ? 's' : ''); - } - }, {}], - 2: [function (require, module, exports) { - // shim for using process in browser - var process = module.exports = {}; // cached from whatever global is present so that test runners that stub it - // don't break things. But we need to wrap it in a try catch in case it is - // wrapped in strict mode code which doesn't define any globals. It's inside a - // function because try/catches deoptimize in certain engines. - - var cachedSetTimeout; - var cachedClearTimeout; - - function defaultSetTimout() { - throw new Error('setTimeout has not been defined'); - } - - function defaultClearTimeout() { - throw new Error('clearTimeout has not been defined'); - } - - (function () { - try { - if (typeof setTimeout === 'function') { - cachedSetTimeout = setTimeout; - } else { - cachedSetTimeout = defaultSetTimout; - } - } catch (e) { - cachedSetTimeout = defaultSetTimout; - } - - try { - if (typeof clearTimeout === 'function') { - cachedClearTimeout = clearTimeout; - } else { - cachedClearTimeout = defaultClearTimeout; - } - } catch (e) { - cachedClearTimeout = defaultClearTimeout; - } - })(); - - function runTimeout(fun) { - if (cachedSetTimeout === setTimeout) { - //normal enviroments in sane situations - return setTimeout(fun, 0); - } // if setTimeout wasn't available but was latter defined - - - if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) { - cachedSetTimeout = setTimeout; - return setTimeout(fun, 0); - } - - try { - // when when somebody has screwed with setTimeout but no I.E. maddness - return cachedSetTimeout(fun, 0); - } catch (e) { - try { - // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally - return cachedSetTimeout.call(null, fun, 0); - } catch (e) { - // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error - return cachedSetTimeout.call(this, fun, 0); - } - } - } - - function runClearTimeout(marker) { - if (cachedClearTimeout === clearTimeout) { - //normal enviroments in sane situations - return clearTimeout(marker); - } // if clearTimeout wasn't available but was latter defined - - - if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) { - cachedClearTimeout = clearTimeout; - return clearTimeout(marker); - } - - try { - // when when somebody has screwed with setTimeout but no I.E. maddness - return cachedClearTimeout(marker); - } catch (e) { - try { - // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally - return cachedClearTimeout.call(null, marker); - } catch (e) { - // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error. - // Some versions of I.E. have different rules for clearTimeout vs setTimeout - return cachedClearTimeout.call(this, marker); - } - } - } - - var queue = []; - var draining = false; - var currentQueue; - var queueIndex = -1; - - function cleanUpNextTick() { - if (!draining || !currentQueue) { - return; - } - - draining = false; - - if (currentQueue.length) { - queue = currentQueue.concat(queue); - } else { - queueIndex = -1; - } - - if (queue.length) { - drainQueue(); - } - } - - function drainQueue() { - if (draining) { - return; - } - - var timeout = runTimeout(cleanUpNextTick); - draining = true; - var len = queue.length; - - while (len) { - currentQueue = queue; - queue = []; - - while (++queueIndex < len) { - if (currentQueue) { - currentQueue[queueIndex].run(); - } - } - - queueIndex = -1; - len = queue.length; - } - - currentQueue = null; - draining = false; - runClearTimeout(timeout); - } - - process.nextTick = function (fun) { - var args = new Array(arguments.length - 1); - - if (arguments.length > 1) { - for (var i = 1; i < arguments.length; i++) { - args[i - 1] = arguments[i]; - } - } - - queue.push(new Item(fun, args)); - - if (queue.length === 1 && !draining) { - runTimeout(drainQueue); - } - }; // v8 likes predictible objects - - - function Item(fun, array) { - this.fun = fun; - this.array = array; - } - - Item.prototype.run = function () { - this.fun.apply(null, this.array); - }; - - process.title = 'browser'; - process.browser = true; - process.env = {}; - process.argv = []; - process.version = ''; // empty string to avoid regexp issues - - process.versions = {}; - - function noop() {} - - process.on = noop; - process.addListener = noop; - process.once = noop; - process.off = noop; - process.removeListener = noop; - process.removeAllListeners = noop; - process.emit = noop; - process.prependListener = noop; - process.prependOnceListener = noop; - - process.listeners = function (name) { - return []; - }; - - process.binding = function (name) { - throw new Error('process.binding is not supported'); - }; - - process.cwd = function () { - return '/'; - }; - - process.chdir = function (dir) { - throw new Error('process.chdir is not supported'); - }; - - process.umask = function () { - return 0; - }; - }, {}], - 3: [function (require, module, exports) { - /** - * This is the common logic for both the Node.js and web browser - * implementations of `debug()`. - */ - function setup(env) { - createDebug.debug = createDebug; - createDebug.default = createDebug; - createDebug.coerce = coerce; - createDebug.disable = disable; - createDebug.enable = enable; - createDebug.enabled = enabled; - createDebug.humanize = require('ms'); - Object.keys(env).forEach(function (key) { - createDebug[key] = env[key]; - }); - /** - * Active `debug` instances. - */ - - createDebug.instances = []; - /** - * The currently active debug mode names, and names to skip. - */ - - createDebug.names = []; - createDebug.skips = []; - /** - * Map of special "%n" handling functions, for the debug "format" argument. - * - * Valid key names are a single, lower or upper-case letter, i.e. "n" and "N". - */ - - createDebug.formatters = {}; - /** - * Selects a color for a debug namespace - * @param {String} namespace The namespace string for the for the debug instance to be colored - * @return {Number|String} An ANSI color code for the given namespace - * @api private - */ - - function selectColor(namespace) { - var hash = 0; - - for (var i = 0; i < namespace.length; i++) { - hash = (hash << 5) - hash + namespace.charCodeAt(i); - hash |= 0; // Convert to 32bit integer - } - - return createDebug.colors[Math.abs(hash) % createDebug.colors.length]; - } - - createDebug.selectColor = selectColor; - /** - * Create a debugger with the given `namespace`. - * - * @param {String} namespace - * @return {Function} - * @api public - */ - - function createDebug(namespace) { - var prevTime; - - function debug() { - for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) { - args[_key] = arguments[_key]; - } - - // Disabled? - if (!debug.enabled) { - return; - } - - var self = debug; // Set `diff` timestamp - - var curr = Number(new Date()); - var ms = curr - (prevTime || curr); - self.diff = ms; - self.prev = prevTime; - self.curr = curr; - prevTime = curr; - args[0] = createDebug.coerce(args[0]); - - if (typeof args[0] !== 'string') { - // Anything else let's inspect with %O - args.unshift('%O'); - } // Apply any `formatters` transformations - - - var index = 0; - args[0] = args[0].replace(/%([a-zA-Z%])/g, function (match, format) { - // If we encounter an escaped % then don't increase the array index - if (match === '%%') { - return match; - } - - index++; - var formatter = createDebug.formatters[format]; - - if (typeof formatter === 'function') { - var val = args[index]; - match = formatter.call(self, val); // Now we need to remove `args[index]` since it's inlined in the `format` - - args.splice(index, 1); - index--; - } - - return match; - }); // Apply env-specific formatting (colors, etc.) - - createDebug.formatArgs.call(self, args); - var logFn = self.log || createDebug.log; - logFn.apply(self, args); - } - - debug.namespace = namespace; - debug.enabled = createDebug.enabled(namespace); - debug.useColors = createDebug.useColors(); - debug.color = selectColor(namespace); - debug.destroy = destroy; - debug.extend = extend; // Debug.formatArgs = formatArgs; - // debug.rawLog = rawLog; - // env-specific initialization logic for debug instances - - if (typeof createDebug.init === 'function') { - createDebug.init(debug); - } - - createDebug.instances.push(debug); - return debug; - } - - function destroy() { - var index = createDebug.instances.indexOf(this); - - if (index !== -1) { - createDebug.instances.splice(index, 1); - return true; - } - - return false; - } - - function extend(namespace, delimiter) { - var newDebug = createDebug(this.namespace + (typeof delimiter === 'undefined' ? ':' : delimiter) + namespace); - newDebug.log = this.log; - return newDebug; - } - /** - * Enables a debug mode by namespaces. This can include modes - * separated by a colon and wildcards. - * - * @param {String} namespaces - * @api public - */ - - - function enable(namespaces) { - createDebug.save(namespaces); - createDebug.names = []; - createDebug.skips = []; - var i; - var split = (typeof namespaces === 'string' ? namespaces : '').split(/[\s,]+/); - var len = split.length; - - for (i = 0; i < len; i++) { - if (!split[i]) { - // ignore empty strings - continue; - } - - namespaces = split[i].replace(/\*/g, '.*?'); - - if (namespaces[0] === '-') { - createDebug.skips.push(new RegExp('^' + namespaces.substr(1) + '$')); - } else { - createDebug.names.push(new RegExp('^' + namespaces + '$')); - } - } - - for (i = 0; i < createDebug.instances.length; i++) { - var instance = createDebug.instances[i]; - instance.enabled = createDebug.enabled(instance.namespace); - } - } - /** - * Disable debug output. - * - * @return {String} namespaces - * @api public - */ - - - function disable() { - var namespaces = [].concat(_toConsumableArray(createDebug.names.map(toNamespace)), _toConsumableArray(createDebug.skips.map(toNamespace).map(function (namespace) { - return '-' + namespace; - }))).join(','); - createDebug.enable(''); - return namespaces; - } - /** - * Returns true if the given mode name is enabled, false otherwise. - * - * @param {String} name - * @return {Boolean} - * @api public - */ - - - function enabled(name) { - if (name[name.length - 1] === '*') { - return true; - } - - var i; - var len; - - for (i = 0, len = createDebug.skips.length; i < len; i++) { - if (createDebug.skips[i].test(name)) { - return false; - } - } - - for (i = 0, len = createDebug.names.length; i < len; i++) { - if (createDebug.names[i].test(name)) { - return true; - } - } - - return false; - } - /** - * Convert regexp to namespace - * - * @param {RegExp} regxep - * @return {String} namespace - * @api private - */ - - - function toNamespace(regexp) { - return regexp.toString().substring(2, regexp.toString().length - 2).replace(/\.\*\?$/, '*'); - } - /** - * Coerce `val`. - * - * @param {Mixed} val - * @return {Mixed} - * @api private - */ - - - function coerce(val) { - if (val instanceof Error) { - return val.stack || val.message; - } - - return val; - } - - createDebug.enable(createDebug.load()); - return createDebug; - } - - module.exports = setup; - }, { - "ms": 1 - }], - 4: [function (require, module, exports) { - (function (process) { - /* eslint-env browser */ - - /** - * This is the web browser implementation of `debug()`. - */ - exports.log = log; - exports.formatArgs = formatArgs; - exports.save = save; - exports.load = load; - exports.useColors = useColors; - exports.storage = localstorage(); - /** - * Colors. - */ - - exports.colors = ['#0000CC', '#0000FF', '#0033CC', '#0033FF', '#0066CC', '#0066FF', '#0099CC', '#0099FF', '#00CC00', '#00CC33', '#00CC66', '#00CC99', '#00CCCC', '#00CCFF', '#3300CC', '#3300FF', '#3333CC', '#3333FF', '#3366CC', '#3366FF', '#3399CC', '#3399FF', '#33CC00', '#33CC33', '#33CC66', '#33CC99', '#33CCCC', '#33CCFF', '#6600CC', '#6600FF', '#6633CC', '#6633FF', '#66CC00', '#66CC33', '#9900CC', '#9900FF', '#9933CC', '#9933FF', '#99CC00', '#99CC33', '#CC0000', '#CC0033', '#CC0066', '#CC0099', '#CC00CC', '#CC00FF', '#CC3300', '#CC3333', '#CC3366', '#CC3399', '#CC33CC', '#CC33FF', '#CC6600', '#CC6633', '#CC9900', '#CC9933', '#CCCC00', '#CCCC33', '#FF0000', '#FF0033', '#FF0066', '#FF0099', '#FF00CC', '#FF00FF', '#FF3300', '#FF3333', '#FF3366', '#FF3399', '#FF33CC', '#FF33FF', '#FF6600', '#FF6633', '#FF9900', '#FF9933', '#FFCC00', '#FFCC33']; - /** - * Currently only WebKit-based Web Inspectors, Firefox >= v31, - * and the Firebug extension (any Firefox version) are known - * to support "%c" CSS customizations. - * - * TODO: add a `localStorage` variable to explicitly enable/disable colors - */ - // eslint-disable-next-line complexity - - function useColors() { - // NB: In an Electron preload script, document will be defined but not fully - // initialized. Since we know we're in Chrome, we'll just detect this case - // explicitly - if (typeof window !== 'undefined' && window.process && (window.process.type === 'renderer' || window.process.__nwjs)) { - return true; - } // Internet Explorer and Edge do not support colors. - - - if (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/)) { - return false; - } // Is webkit? http://stackoverflow.com/a/16459606/376773 - // document is undefined in react-native: https://github.com/facebook/react-native/pull/1632 - - - return typeof document !== 'undefined' && document.documentElement && document.documentElement.style && document.documentElement.style.WebkitAppearance || // Is firebug? http://stackoverflow.com/a/398120/376773 - typeof window !== 'undefined' && window.console && (window.console.firebug || window.console.exception && window.console.table) || // Is firefox >= v31? - // https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages - typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/) && parseInt(RegExp.$1, 10) >= 31 || // Double check webkit in userAgent just in case we are in a worker - typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/); - } - /** - * Colorize log arguments if enabled. - * - * @api public - */ - - - function formatArgs(args) { - args[0] = (this.useColors ? '%c' : '') + this.namespace + (this.useColors ? ' %c' : ' ') + args[0] + (this.useColors ? '%c ' : ' ') + '+' + module.exports.humanize(this.diff); - - if (!this.useColors) { - return; - } - - var c = 'color: ' + this.color; - args.splice(1, 0, c, 'color: inherit'); // The final "%c" is somewhat tricky, because there could be other - // arguments passed either before or after the %c, so we need to - // figure out the correct index to insert the CSS into - - var index = 0; - var lastC = 0; - args[0].replace(/%[a-zA-Z%]/g, function (match) { - if (match === '%%') { - return; - } - - index++; - - if (match === '%c') { - // We only are interested in the *last* %c - // (the user may have provided their own) - lastC = index; - } - }); - args.splice(lastC, 0, c); - } - /** - * Invokes `console.log()` when available. - * No-op when `console.log` is not a "function". - * - * @api public - */ - - - function log() { - var _console; - - // This hackery is required for IE8/9, where - // the `console.log` function doesn't have 'apply' - return (typeof console === "undefined" ? "undefined" : _typeof(console)) === 'object' && console.log && (_console = console).log.apply(_console, arguments); - } - /** - * Save `namespaces`. - * - * @param {String} namespaces - * @api private - */ - - - function save(namespaces) { - try { - if (namespaces) { - exports.storage.setItem('debug', namespaces); - } else { - exports.storage.removeItem('debug'); - } - } catch (error) {// Swallow - // XXX (@Qix-) should we be logging these? - } - } - /** - * Load `namespaces`. - * - * @return {String} returns the previously persisted debug modes - * @api private - */ - - - function load() { - var r; - - try { - r = exports.storage.getItem('debug'); - } catch (error) {} // Swallow - // XXX (@Qix-) should we be logging these? - // If debug isn't set in LS, and we're in Electron, try to load $DEBUG - - - if (!r && typeof process !== 'undefined' && 'env' in process) { - r = process.env.DEBUG; - } - - return r; - } - /** - * Localstorage attempts to return the localstorage. - * - * This is necessary because safari throws - * when a user disables cookies/localstorage - * and you attempt to access it. - * - * @return {LocalStorage} - * @api private - */ - - - function localstorage() { - try { - // TVMLKit (Apple TV JS Runtime) does not have a window object, just localStorage in the global context - // The Browser also has localStorage in the global context. - return localStorage; - } catch (error) {// Swallow - // XXX (@Qix-) should we be logging these? - } - } - - module.exports = require('./common')(exports); - var formatters = module.exports.formatters; - /** - * Map %j to `JSON.stringify()`, since no Web Inspectors do that by default. - */ - - formatters.j = function (v) { - try { - return JSON.stringify(v); - } catch (error) { - return '[UnexpectedJSONParseError]: ' + error.message; - } - }; - }).call(this, require('_process')); - }, { - "./common": 3, - "_process": 2 - }] - }, {}, [4])(4); -}); diff --git a/node_modules/@babel/core/node_modules/debug/package.json b/node_modules/@babel/core/node_modules/debug/package.json index 3631ee0be..4a8d65164 100644 --- a/node_modules/@babel/core/node_modules/debug/package.json +++ b/node_modules/@babel/core/node_modules/debug/package.json @@ -1,33 +1,28 @@ { - "_args": [ - [ - "debug@4.1.1", - "/Users/drew.heavner/Documents/Github/sign-android-release" - ] - ], - "_development": true, - "_from": "debug@4.1.1", - "_id": "debug@4.1.1", + "_from": "debug@^4.1.0", + "_id": "debug@4.2.0", "_inBundle": false, - "_integrity": "sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==", + "_integrity": "sha512-IX2ncY78vDTjZMFUdmsvIRFY2Cf4FnD0wRs+nQwJU8Lu99/tPFdb0VybiiMTPe3I6rQmwsqQqRBvxU+bZ/I8sg==", "_location": "/@babel/core/debug", "_phantomChildren": {}, "_requested": { - "type": "version", + "type": "range", "registry": true, - "raw": "debug@4.1.1", + "raw": "debug@^4.1.0", "name": "debug", "escapedName": "debug", - "rawSpec": "4.1.1", + "rawSpec": "^4.1.0", "saveSpec": null, - "fetchSpec": "4.1.1" + "fetchSpec": "^4.1.0" }, "_requiredBy": [ - "/@babel/core" + "/@babel/core", + "/@babel/core/@babel/traverse" ], - "_resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz", - "_spec": "4.1.1", - "_where": "/Users/drew.heavner/Documents/Github/sign-android-release", + "_resolved": "https://registry.npmjs.org/debug/-/debug-4.2.0.tgz", + "_shasum": "7f150f93920e94c58f5574c2fd01a3110effe7f1", + "_spec": "debug@^4.1.0", + "_where": "/Users/drew.heavner/Documents/Github/sign-android-release/node_modules/@babel/core", "author": { "name": "TJ Holowaychuk", "email": "tj@vision-media.ca" @@ -36,6 +31,7 @@ "bugs": { "url": "https://github.com/visionmedia/debug/issues" }, + "bundleDependencies": false, "contributors": [ { "name": "Nathan Rajlich", @@ -45,33 +41,35 @@ { "name": "Andrew Rhyne", "email": "rhyneandrew@gmail.com" + }, + { + "name": "Josh Junon", + "email": "josh@junon.me" } ], "dependencies": { - "ms": "^2.1.1" + "ms": "2.1.2" }, + "deprecated": false, "description": "small debugging utility", "devDependencies": { - "@babel/cli": "^7.0.0", - "@babel/core": "^7.0.0", - "@babel/preset-env": "^7.0.0", - "browserify": "14.4.0", - "chai": "^3.5.0", - "concurrently": "^3.1.0", + "brfs": "^2.0.1", + "browserify": "^16.2.3", "coveralls": "^3.0.2", "istanbul": "^0.4.5", - "karma": "^3.0.0", - "karma-chai": "^0.1.0", + "karma": "^3.1.4", + "karma-browserify": "^6.0.0", + "karma-chrome-launcher": "^2.2.0", "karma-mocha": "^1.3.0", - "karma-phantomjs-launcher": "^1.0.2", "mocha": "^5.2.0", "mocha-lcov-reporter": "^1.2.0", - "rimraf": "^2.5.4", "xo": "^0.23.0" }, + "engines": { + "node": ">=6.0" + }, "files": [ "src", - "dist/debug.js", "LICENSE", "README.md" ], @@ -84,23 +82,21 @@ "license": "MIT", "main": "./src/index.js", "name": "debug", + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + }, "repository": { "type": "git", "url": "git://github.com/visionmedia/debug.git" }, "scripts": { - "build": "npm run build:debug && npm run build:test", - "build:debug": "babel -o dist/debug.js dist/debug.es6.js > dist/debug.js", - "build:test": "babel -d dist test.js", - "clean": "rimraf dist coverage", "lint": "xo", - "prebuild:debug": "mkdir -p dist && browserify --standalone debug -o dist/debug.es6.js .", - "pretest:browser": "npm run build", - "test": "npm run test:node && npm run test:browser", + "test": "npm run test:node && npm run test:browser && npm run lint", "test:browser": "karma start --single-run", "test:coverage": "cat ./coverage/lcov.info | coveralls", "test:node": "istanbul cover _mocha -- test.js" }, - "unpkg": "./dist/debug.js", - "version": "4.1.1" + "version": "4.2.0" } diff --git a/node_modules/@babel/core/node_modules/debug/src/browser.js b/node_modules/@babel/core/node_modules/debug/src/browser.js index 5f34c0d0a..ac3f7e133 100644 --- a/node_modules/@babel/core/node_modules/debug/src/browser.js +++ b/node_modules/@babel/core/node_modules/debug/src/browser.js @@ -4,7 +4,6 @@ * This is the web browser implementation of `debug()`. */ -exports.log = log; exports.formatArgs = formatArgs; exports.save = save; exports.load = load; @@ -170,18 +169,14 @@ function formatArgs(args) { } /** - * Invokes `console.log()` when available. - * No-op when `console.log` is not a "function". + * Invokes `console.debug()` when available. + * No-op when `console.debug` is not a "function". + * If `console.debug` is not available, falls back + * to `console.log`. * * @api public */ -function log(...args) { - // This hackery is required for IE8/9, where - // the `console.log` function doesn't have 'apply' - return typeof console === 'object' && - console.log && - console.log(...args); -} +exports.log = console.debug || console.log || (() => {}); /** * Save `namespaces`. diff --git a/node_modules/@babel/core/node_modules/debug/src/common.js b/node_modules/@babel/core/node_modules/debug/src/common.js index 2f82b8dc7..da7eada61 100644 --- a/node_modules/@babel/core/node_modules/debug/src/common.js +++ b/node_modules/@babel/core/node_modules/debug/src/common.js @@ -117,13 +117,11 @@ function setup(env) { debug.namespace = namespace; debug.enabled = createDebug.enabled(namespace); debug.useColors = createDebug.useColors(); - debug.color = selectColor(namespace); + debug.color = createDebug.selectColor(namespace); debug.destroy = destroy; debug.extend = extend; - // Debug.formatArgs = formatArgs; - // debug.rawLog = rawLog; - // env-specific initialization logic for debug instances + // Env-specific initialization logic for debug instances if (typeof createDebug.init === 'function') { createDebug.init(debug); } diff --git a/node_modules/@babel/core/node_modules/semver/CHANGELOG.md b/node_modules/@babel/core/node_modules/semver/CHANGELOG.md deleted file mode 100644 index 66304fdd2..000000000 --- a/node_modules/@babel/core/node_modules/semver/CHANGELOG.md +++ /dev/null @@ -1,39 +0,0 @@ -# changes log - -## 5.7 - -* Add `minVersion` method - -## 5.6 - -* Move boolean `loose` param to an options object, with - backwards-compatibility protection. -* Add ability to opt out of special prerelease version handling with - the `includePrerelease` option flag. - -## 5.5 - -* Add version coercion capabilities - -## 5.4 - -* Add intersection checking - -## 5.3 - -* Add `minSatisfying` method - -## 5.2 - -* Add `prerelease(v)` that returns prerelease components - -## 5.1 - -* Add Backus-Naur for ranges -* Remove excessively cute inspection methods - -## 5.0 - -* Remove AMD/Browserified build artifacts -* Fix ltr and gtr when using the `*` range -* Fix for range `*` with a prerelease identifier diff --git a/node_modules/@babel/core/node_modules/semver/LICENSE b/node_modules/@babel/core/node_modules/semver/LICENSE deleted file mode 100644 index 19129e315..000000000 --- a/node_modules/@babel/core/node_modules/semver/LICENSE +++ /dev/null @@ -1,15 +0,0 @@ -The ISC License - -Copyright (c) Isaac Z. Schlueter and Contributors - -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR -ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR -IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/node_modules/@babel/core/node_modules/semver/README.md b/node_modules/@babel/core/node_modules/semver/README.md deleted file mode 100644 index e5ccececf..000000000 --- a/node_modules/@babel/core/node_modules/semver/README.md +++ /dev/null @@ -1,411 +0,0 @@ -semver(1) -- The semantic versioner for npm -=========================================== - -## Install - -```bash -npm install --save semver -```` - -## Usage - -As a node module: - -```js -const semver = require('semver') - -semver.valid('1.2.3') // '1.2.3' -semver.valid('a.b.c') // null -semver.clean(' =v1.2.3 ') // '1.2.3' -semver.satisfies('1.2.3', '1.x || >=2.5.0 || 5.0.0 - 7.2.3') // true -semver.gt('1.2.3', '9.8.7') // false -semver.lt('1.2.3', '9.8.7') // true -semver.minVersion('>=1.0.0') // '1.0.0' -semver.valid(semver.coerce('v2')) // '2.0.0' -semver.valid(semver.coerce('42.6.7.9.3-alpha')) // '42.6.7' -``` - -As a command-line utility: - -``` -$ semver -h - -A JavaScript implementation of the https://semver.org/ specification -Copyright Isaac Z. Schlueter - -Usage: semver [options] [ [...]] -Prints valid versions sorted by SemVer precedence - -Options: --r --range - Print versions that match the specified range. - --i --increment [] - Increment a version by the specified level. Level can - be one of: major, minor, patch, premajor, preminor, - prepatch, or prerelease. Default level is 'patch'. - Only one version may be specified. - ---preid - Identifier to be used to prefix premajor, preminor, - prepatch or prerelease version increments. - --l --loose - Interpret versions and ranges loosely - --p --include-prerelease - Always include prerelease versions in range matching - --c --coerce - Coerce a string into SemVer if possible - (does not imply --loose) - -Program exits successfully if any valid version satisfies -all supplied ranges, and prints all satisfying versions. - -If no satisfying versions are found, then exits failure. - -Versions are printed in ascending order, so supplying -multiple versions to the utility will just sort them. -``` - -## Versions - -A "version" is described by the `v2.0.0` specification found at -. - -A leading `"="` or `"v"` character is stripped off and ignored. - -## Ranges - -A `version range` is a set of `comparators` which specify versions -that satisfy the range. - -A `comparator` is composed of an `operator` and a `version`. The set -of primitive `operators` is: - -* `<` Less than -* `<=` Less than or equal to -* `>` Greater than -* `>=` Greater than or equal to -* `=` Equal. If no operator is specified, then equality is assumed, - so this operator is optional, but MAY be included. - -For example, the comparator `>=1.2.7` would match the versions -`1.2.7`, `1.2.8`, `2.5.3`, and `1.3.9`, but not the versions `1.2.6` -or `1.1.0`. - -Comparators can be joined by whitespace to form a `comparator set`, -which is satisfied by the **intersection** of all of the comparators -it includes. - -A range is composed of one or more comparator sets, joined by `||`. A -version matches a range if and only if every comparator in at least -one of the `||`-separated comparator sets is satisfied by the version. - -For example, the range `>=1.2.7 <1.3.0` would match the versions -`1.2.7`, `1.2.8`, and `1.2.99`, but not the versions `1.2.6`, `1.3.0`, -or `1.1.0`. - -The range `1.2.7 || >=1.2.9 <2.0.0` would match the versions `1.2.7`, -`1.2.9`, and `1.4.6`, but not the versions `1.2.8` or `2.0.0`. - -### Prerelease Tags - -If a version has a prerelease tag (for example, `1.2.3-alpha.3`) then -it will only be allowed to satisfy comparator sets if at least one -comparator with the same `[major, minor, patch]` tuple also has a -prerelease tag. - -For example, the range `>1.2.3-alpha.3` would be allowed to match the -version `1.2.3-alpha.7`, but it would *not* be satisfied by -`3.4.5-alpha.9`, even though `3.4.5-alpha.9` is technically "greater -than" `1.2.3-alpha.3` according to the SemVer sort rules. The version -range only accepts prerelease tags on the `1.2.3` version. The -version `3.4.5` *would* satisfy the range, because it does not have a -prerelease flag, and `3.4.5` is greater than `1.2.3-alpha.7`. - -The purpose for this behavior is twofold. First, prerelease versions -frequently are updated very quickly, and contain many breaking changes -that are (by the author's design) not yet fit for public consumption. -Therefore, by default, they are excluded from range matching -semantics. - -Second, a user who has opted into using a prerelease version has -clearly indicated the intent to use *that specific* set of -alpha/beta/rc versions. By including a prerelease tag in the range, -the user is indicating that they are aware of the risk. However, it -is still not appropriate to assume that they have opted into taking a -similar risk on the *next* set of prerelease versions. - -Note that this behavior can be suppressed (treating all prerelease -versions as if they were normal versions, for the purpose of range -matching) by setting the `includePrerelease` flag on the options -object to any -[functions](https://github.com/npm/node-semver#functions) that do -range matching. - -#### Prerelease Identifiers - -The method `.inc` takes an additional `identifier` string argument that -will append the value of the string as a prerelease identifier: - -```javascript -semver.inc('1.2.3', 'prerelease', 'beta') -// '1.2.4-beta.0' -``` - -command-line example: - -```bash -$ semver 1.2.3 -i prerelease --preid beta -1.2.4-beta.0 -``` - -Which then can be used to increment further: - -```bash -$ semver 1.2.4-beta.0 -i prerelease -1.2.4-beta.1 -``` - -### Advanced Range Syntax - -Advanced range syntax desugars to primitive comparators in -deterministic ways. - -Advanced ranges may be combined in the same way as primitive -comparators using white space or `||`. - -#### Hyphen Ranges `X.Y.Z - A.B.C` - -Specifies an inclusive set. - -* `1.2.3 - 2.3.4` := `>=1.2.3 <=2.3.4` - -If a partial version is provided as the first version in the inclusive -range, then the missing pieces are replaced with zeroes. - -* `1.2 - 2.3.4` := `>=1.2.0 <=2.3.4` - -If a partial version is provided as the second version in the -inclusive range, then all versions that start with the supplied parts -of the tuple are accepted, but nothing that would be greater than the -provided tuple parts. - -* `1.2.3 - 2.3` := `>=1.2.3 <2.4.0` -* `1.2.3 - 2` := `>=1.2.3 <3.0.0` - -#### X-Ranges `1.2.x` `1.X` `1.2.*` `*` - -Any of `X`, `x`, or `*` may be used to "stand in" for one of the -numeric values in the `[major, minor, patch]` tuple. - -* `*` := `>=0.0.0` (Any version satisfies) -* `1.x` := `>=1.0.0 <2.0.0` (Matching major version) -* `1.2.x` := `>=1.2.0 <1.3.0` (Matching major and minor versions) - -A partial version range is treated as an X-Range, so the special -character is in fact optional. - -* `""` (empty string) := `*` := `>=0.0.0` -* `1` := `1.x.x` := `>=1.0.0 <2.0.0` -* `1.2` := `1.2.x` := `>=1.2.0 <1.3.0` - -#### Tilde Ranges `~1.2.3` `~1.2` `~1` - -Allows patch-level changes if a minor version is specified on the -comparator. Allows minor-level changes if not. - -* `~1.2.3` := `>=1.2.3 <1.(2+1).0` := `>=1.2.3 <1.3.0` -* `~1.2` := `>=1.2.0 <1.(2+1).0` := `>=1.2.0 <1.3.0` (Same as `1.2.x`) -* `~1` := `>=1.0.0 <(1+1).0.0` := `>=1.0.0 <2.0.0` (Same as `1.x`) -* `~0.2.3` := `>=0.2.3 <0.(2+1).0` := `>=0.2.3 <0.3.0` -* `~0.2` := `>=0.2.0 <0.(2+1).0` := `>=0.2.0 <0.3.0` (Same as `0.2.x`) -* `~0` := `>=0.0.0 <(0+1).0.0` := `>=0.0.0 <1.0.0` (Same as `0.x`) -* `~1.2.3-beta.2` := `>=1.2.3-beta.2 <1.3.0` Note that prereleases in - the `1.2.3` version will be allowed, if they are greater than or - equal to `beta.2`. So, `1.2.3-beta.4` would be allowed, but - `1.2.4-beta.2` would not, because it is a prerelease of a - different `[major, minor, patch]` tuple. - -#### Caret Ranges `^1.2.3` `^0.2.5` `^0.0.4` - -Allows changes that do not modify the left-most non-zero digit in the -`[major, minor, patch]` tuple. In other words, this allows patch and -minor updates for versions `1.0.0` and above, patch updates for -versions `0.X >=0.1.0`, and *no* updates for versions `0.0.X`. - -Many authors treat a `0.x` version as if the `x` were the major -"breaking-change" indicator. - -Caret ranges are ideal when an author may make breaking changes -between `0.2.4` and `0.3.0` releases, which is a common practice. -However, it presumes that there will *not* be breaking changes between -`0.2.4` and `0.2.5`. It allows for changes that are presumed to be -additive (but non-breaking), according to commonly observed practices. - -* `^1.2.3` := `>=1.2.3 <2.0.0` -* `^0.2.3` := `>=0.2.3 <0.3.0` -* `^0.0.3` := `>=0.0.3 <0.0.4` -* `^1.2.3-beta.2` := `>=1.2.3-beta.2 <2.0.0` Note that prereleases in - the `1.2.3` version will be allowed, if they are greater than or - equal to `beta.2`. So, `1.2.3-beta.4` would be allowed, but - `1.2.4-beta.2` would not, because it is a prerelease of a - different `[major, minor, patch]` tuple. -* `^0.0.3-beta` := `>=0.0.3-beta <0.0.4` Note that prereleases in the - `0.0.3` version *only* will be allowed, if they are greater than or - equal to `beta`. So, `0.0.3-pr.2` would be allowed. - -When parsing caret ranges, a missing `patch` value desugars to the -number `0`, but will allow flexibility within that value, even if the -major and minor versions are both `0`. - -* `^1.2.x` := `>=1.2.0 <2.0.0` -* `^0.0.x` := `>=0.0.0 <0.1.0` -* `^0.0` := `>=0.0.0 <0.1.0` - -A missing `minor` and `patch` values will desugar to zero, but also -allow flexibility within those values, even if the major version is -zero. - -* `^1.x` := `>=1.0.0 <2.0.0` -* `^0.x` := `>=0.0.0 <1.0.0` - -### Range Grammar - -Putting all this together, here is a Backus-Naur grammar for ranges, -for the benefit of parser authors: - -```bnf -range-set ::= range ( logical-or range ) * -logical-or ::= ( ' ' ) * '||' ( ' ' ) * -range ::= hyphen | simple ( ' ' simple ) * | '' -hyphen ::= partial ' - ' partial -simple ::= primitive | partial | tilde | caret -primitive ::= ( '<' | '>' | '>=' | '<=' | '=' ) partial -partial ::= xr ( '.' xr ( '.' xr qualifier ? )? )? -xr ::= 'x' | 'X' | '*' | nr -nr ::= '0' | ['1'-'9'] ( ['0'-'9'] ) * -tilde ::= '~' partial -caret ::= '^' partial -qualifier ::= ( '-' pre )? ( '+' build )? -pre ::= parts -build ::= parts -parts ::= part ( '.' part ) * -part ::= nr | [-0-9A-Za-z]+ -``` - -## Functions - -All methods and classes take a final `options` object argument. All -options in this object are `false` by default. The options supported -are: - -- `loose` Be more forgiving about not-quite-valid semver strings. - (Any resulting output will always be 100% strict compliant, of - course.) For backwards compatibility reasons, if the `options` - argument is a boolean value instead of an object, it is interpreted - to be the `loose` param. -- `includePrerelease` Set to suppress the [default - behavior](https://github.com/npm/node-semver#prerelease-tags) of - excluding prerelease tagged versions from ranges unless they are - explicitly opted into. - -Strict-mode Comparators and Ranges will be strict about the SemVer -strings that they parse. - -* `valid(v)`: Return the parsed version, or null if it's not valid. -* `inc(v, release)`: Return the version incremented by the release - type (`major`, `premajor`, `minor`, `preminor`, `patch`, - `prepatch`, or `prerelease`), or null if it's not valid - * `premajor` in one call will bump the version up to the next major - version and down to a prerelease of that major version. - `preminor`, and `prepatch` work the same way. - * If called from a non-prerelease version, the `prerelease` will work the - same as `prepatch`. It increments the patch version, then makes a - prerelease. If the input version is already a prerelease it simply - increments it. -* `prerelease(v)`: Returns an array of prerelease components, or null - if none exist. Example: `prerelease('1.2.3-alpha.1') -> ['alpha', 1]` -* `major(v)`: Return the major version number. -* `minor(v)`: Return the minor version number. -* `patch(v)`: Return the patch version number. -* `intersects(r1, r2, loose)`: Return true if the two supplied ranges - or comparators intersect. -* `parse(v)`: Attempt to parse a string as a semantic version, returning either - a `SemVer` object or `null`. - -### Comparison - -* `gt(v1, v2)`: `v1 > v2` -* `gte(v1, v2)`: `v1 >= v2` -* `lt(v1, v2)`: `v1 < v2` -* `lte(v1, v2)`: `v1 <= v2` -* `eq(v1, v2)`: `v1 == v2` This is true if they're logically equivalent, - even if they're not the exact same string. You already know how to - compare strings. -* `neq(v1, v2)`: `v1 != v2` The opposite of `eq`. -* `cmp(v1, comparator, v2)`: Pass in a comparison string, and it'll call - the corresponding function above. `"==="` and `"!=="` do simple - string comparison, but are included for completeness. Throws if an - invalid comparison string is provided. -* `compare(v1, v2)`: Return `0` if `v1 == v2`, or `1` if `v1` is greater, or `-1` if - `v2` is greater. Sorts in ascending order if passed to `Array.sort()`. -* `rcompare(v1, v2)`: The reverse of compare. Sorts an array of versions - in descending order when passed to `Array.sort()`. -* `diff(v1, v2)`: Returns difference between two versions by the release type - (`major`, `premajor`, `minor`, `preminor`, `patch`, `prepatch`, or `prerelease`), - or null if the versions are the same. - -### Comparators - -* `intersects(comparator)`: Return true if the comparators intersect - -### Ranges - -* `validRange(range)`: Return the valid range or null if it's not valid -* `satisfies(version, range)`: Return true if the version satisfies the - range. -* `maxSatisfying(versions, range)`: Return the highest version in the list - that satisfies the range, or `null` if none of them do. -* `minSatisfying(versions, range)`: Return the lowest version in the list - that satisfies the range, or `null` if none of them do. -* `minVersion(range)`: Return the lowest version that can possibly match - the given range. -* `gtr(version, range)`: Return `true` if version is greater than all the - versions possible in the range. -* `ltr(version, range)`: Return `true` if version is less than all the - versions possible in the range. -* `outside(version, range, hilo)`: Return true if the version is outside - the bounds of the range in either the high or low direction. The - `hilo` argument must be either the string `'>'` or `'<'`. (This is - the function called by `gtr` and `ltr`.) -* `intersects(range)`: Return true if any of the ranges comparators intersect - -Note that, since ranges may be non-contiguous, a version might not be -greater than a range, less than a range, *or* satisfy a range! For -example, the range `1.2 <1.2.9 || >2.0.0` would have a hole from `1.2.9` -until `2.0.0`, so the version `1.2.10` would not be greater than the -range (because `2.0.1` satisfies, which is higher), nor less than the -range (since `1.2.8` satisfies, which is lower), and it also does not -satisfy the range. - -If you want to know if a version satisfies or does not satisfy a -range, use the `satisfies(version, range)` function. - -### Coercion - -* `coerce(version)`: Coerces a string to semver if possible - -This aims to provide a very forgiving translation of a non-semver -string to semver. It looks for the first digit in a string, and -consumes all remaining characters which satisfy at least a partial semver -(e.g., `1`, `1.2`, `1.2.3`) up to the max permitted length (256 characters). -Longer versions are simply truncated (`4.6.3.9.2-alpha2` becomes `4.6.3`). -All surrounding text is simply ignored (`v3.4 replaces v3.3.1` becomes `3.4.0`). -Only text which lacks digits will fail coercion (`version one` is not valid). -The maximum length for any semver component considered for coercion is 16 characters; -longer components will be ignored (`10000000000000000.4.7.4` becomes `4.7.4`). -The maximum value for any semver component is `Integer.MAX_SAFE_INTEGER || (2**53 - 1)`; -higher value components are invalid (`9999999999999999.4.7.4` is likely invalid). diff --git a/node_modules/@babel/core/node_modules/semver/bin/semver b/node_modules/@babel/core/node_modules/semver/bin/semver deleted file mode 100755 index 801e77f13..000000000 --- a/node_modules/@babel/core/node_modules/semver/bin/semver +++ /dev/null @@ -1,160 +0,0 @@ -#!/usr/bin/env node -// Standalone semver comparison program. -// Exits successfully and prints matching version(s) if -// any supplied version is valid and passes all tests. - -var argv = process.argv.slice(2) - -var versions = [] - -var range = [] - -var inc = null - -var version = require('../package.json').version - -var loose = false - -var includePrerelease = false - -var coerce = false - -var identifier - -var semver = require('../semver') - -var reverse = false - -var options = {} - -main() - -function main () { - if (!argv.length) return help() - while (argv.length) { - var a = argv.shift() - var indexOfEqualSign = a.indexOf('=') - if (indexOfEqualSign !== -1) { - a = a.slice(0, indexOfEqualSign) - argv.unshift(a.slice(indexOfEqualSign + 1)) - } - switch (a) { - case '-rv': case '-rev': case '--rev': case '--reverse': - reverse = true - break - case '-l': case '--loose': - loose = true - break - case '-p': case '--include-prerelease': - includePrerelease = true - break - case '-v': case '--version': - versions.push(argv.shift()) - break - case '-i': case '--inc': case '--increment': - switch (argv[0]) { - case 'major': case 'minor': case 'patch': case 'prerelease': - case 'premajor': case 'preminor': case 'prepatch': - inc = argv.shift() - break - default: - inc = 'patch' - break - } - break - case '--preid': - identifier = argv.shift() - break - case '-r': case '--range': - range.push(argv.shift()) - break - case '-c': case '--coerce': - coerce = true - break - case '-h': case '--help': case '-?': - return help() - default: - versions.push(a) - break - } - } - - var options = { loose: loose, includePrerelease: includePrerelease } - - versions = versions.map(function (v) { - return coerce ? (semver.coerce(v) || { version: v }).version : v - }).filter(function (v) { - return semver.valid(v) - }) - if (!versions.length) return fail() - if (inc && (versions.length !== 1 || range.length)) { return failInc() } - - for (var i = 0, l = range.length; i < l; i++) { - versions = versions.filter(function (v) { - return semver.satisfies(v, range[i], options) - }) - if (!versions.length) return fail() - } - return success(versions) -} - -function failInc () { - console.error('--inc can only be used on a single version with no range') - fail() -} - -function fail () { process.exit(1) } - -function success () { - var compare = reverse ? 'rcompare' : 'compare' - versions.sort(function (a, b) { - return semver[compare](a, b, options) - }).map(function (v) { - return semver.clean(v, options) - }).map(function (v) { - return inc ? semver.inc(v, inc, options, identifier) : v - }).forEach(function (v, i, _) { console.log(v) }) -} - -function help () { - console.log(['SemVer ' + version, - '', - 'A JavaScript implementation of the https://semver.org/ specification', - 'Copyright Isaac Z. Schlueter', - '', - 'Usage: semver [options] [ [...]]', - 'Prints valid versions sorted by SemVer precedence', - '', - 'Options:', - '-r --range ', - ' Print versions that match the specified range.', - '', - '-i --increment []', - ' Increment a version by the specified level. Level can', - ' be one of: major, minor, patch, premajor, preminor,', - " prepatch, or prerelease. Default level is 'patch'.", - ' Only one version may be specified.', - '', - '--preid ', - ' Identifier to be used to prefix premajor, preminor,', - ' prepatch or prerelease version increments.', - '', - '-l --loose', - ' Interpret versions and ranges loosely', - '', - '-p --include-prerelease', - ' Always include prerelease versions in range matching', - '', - '-c --coerce', - ' Coerce a string into SemVer if possible', - ' (does not imply --loose)', - '', - 'Program exits successfully if any valid version satisfies', - 'all supplied ranges, and prints all satisfying versions.', - '', - 'If no satisfying versions are found, then exits failure.', - '', - 'Versions are printed in ascending order, so supplying', - 'multiple versions to the utility will just sort them.' - ].join('\n')) -} diff --git a/node_modules/@babel/core/node_modules/semver/package.json b/node_modules/@babel/core/node_modules/semver/package.json deleted file mode 100644 index e464cce3a..000000000 --- a/node_modules/@babel/core/node_modules/semver/package.json +++ /dev/null @@ -1,64 +0,0 @@ -{ - "_args": [ - [ - "semver@5.7.0", - "/Users/drew.heavner/Documents/Github/sign-android-release" - ] - ], - "_development": true, - "_from": "semver@5.7.0", - "_id": "semver@5.7.0", - "_inBundle": false, - "_integrity": "sha512-Ya52jSX2u7QKghxeoFGpLwCtGlt7j0oY9DYb5apt9nPlJ42ID+ulTXESnt/qAQcoSERyZ5sl3LDIOw0nAn/5DA==", - "_location": "/@babel/core/semver", - "_phantomChildren": {}, - "_requested": { - "type": "version", - "registry": true, - "raw": "semver@5.7.0", - "name": "semver", - "escapedName": "semver", - "rawSpec": "5.7.0", - "saveSpec": null, - "fetchSpec": "5.7.0" - }, - "_requiredBy": [ - "/@babel/core" - ], - "_resolved": "https://registry.npmjs.org/semver/-/semver-5.7.0.tgz", - "_spec": "5.7.0", - "_where": "/Users/drew.heavner/Documents/Github/sign-android-release", - "bin": { - "semver": "./bin/semver" - }, - "bugs": { - "url": "https://github.com/npm/node-semver/issues" - }, - "description": "The semantic version parser used by npm.", - "devDependencies": { - "tap": "^13.0.0-rc.18" - }, - "files": [ - "bin", - "range.bnf", - "semver.js" - ], - "homepage": "https://github.com/npm/node-semver#readme", - "license": "ISC", - "main": "semver.js", - "name": "semver", - "repository": { - "type": "git", - "url": "git+https://github.com/npm/node-semver.git" - }, - "scripts": { - "postpublish": "git push origin --all; git push origin --tags", - "postversion": "npm publish", - "preversion": "npm test", - "test": "tap" - }, - "tap": { - "check-coverage": true - }, - "version": "5.7.0" -} diff --git a/node_modules/@babel/core/node_modules/semver/range.bnf b/node_modules/@babel/core/node_modules/semver/range.bnf deleted file mode 100644 index d4c6ae0d7..000000000 --- a/node_modules/@babel/core/node_modules/semver/range.bnf +++ /dev/null @@ -1,16 +0,0 @@ -range-set ::= range ( logical-or range ) * -logical-or ::= ( ' ' ) * '||' ( ' ' ) * -range ::= hyphen | simple ( ' ' simple ) * | '' -hyphen ::= partial ' - ' partial -simple ::= primitive | partial | tilde | caret -primitive ::= ( '<' | '>' | '>=' | '<=' | '=' ) partial -partial ::= xr ( '.' xr ( '.' xr qualifier ? )? )? -xr ::= 'x' | 'X' | '*' | nr -nr ::= '0' | [1-9] ( [0-9] ) * -tilde ::= '~' partial -caret ::= '^' partial -qualifier ::= ( '-' pre )? ( '+' build )? -pre ::= parts -build ::= parts -parts ::= part ( '.' part ) * -part ::= nr | [-0-9A-Za-z]+ diff --git a/node_modules/@babel/core/node_modules/semver/semver.js b/node_modules/@babel/core/node_modules/semver/semver.js deleted file mode 100644 index d315d5d68..000000000 --- a/node_modules/@babel/core/node_modules/semver/semver.js +++ /dev/null @@ -1,1483 +0,0 @@ -exports = module.exports = SemVer - -var debug -/* istanbul ignore next */ -if (typeof process === 'object' && - process.env && - process.env.NODE_DEBUG && - /\bsemver\b/i.test(process.env.NODE_DEBUG)) { - debug = function () { - var args = Array.prototype.slice.call(arguments, 0) - args.unshift('SEMVER') - console.log.apply(console, args) - } -} else { - debug = function () {} -} - -// Note: this is the semver.org version of the spec that it implements -// Not necessarily the package version of this code. -exports.SEMVER_SPEC_VERSION = '2.0.0' - -var MAX_LENGTH = 256 -var MAX_SAFE_INTEGER = Number.MAX_SAFE_INTEGER || - /* istanbul ignore next */ 9007199254740991 - -// Max safe segment length for coercion. -var MAX_SAFE_COMPONENT_LENGTH = 16 - -// The actual regexps go on exports.re -var re = exports.re = [] -var src = exports.src = [] -var R = 0 - -// The following Regular Expressions can be used for tokenizing, -// validating, and parsing SemVer version strings. - -// ## Numeric Identifier -// A single `0`, or a non-zero digit followed by zero or more digits. - -var NUMERICIDENTIFIER = R++ -src[NUMERICIDENTIFIER] = '0|[1-9]\\d*' -var NUMERICIDENTIFIERLOOSE = R++ -src[NUMERICIDENTIFIERLOOSE] = '[0-9]+' - -// ## Non-numeric Identifier -// Zero or more digits, followed by a letter or hyphen, and then zero or -// more letters, digits, or hyphens. - -var NONNUMERICIDENTIFIER = R++ -src[NONNUMERICIDENTIFIER] = '\\d*[a-zA-Z-][a-zA-Z0-9-]*' - -// ## Main Version -// Three dot-separated numeric identifiers. - -var MAINVERSION = R++ -src[MAINVERSION] = '(' + src[NUMERICIDENTIFIER] + ')\\.' + - '(' + src[NUMERICIDENTIFIER] + ')\\.' + - '(' + src[NUMERICIDENTIFIER] + ')' - -var MAINVERSIONLOOSE = R++ -src[MAINVERSIONLOOSE] = '(' + src[NUMERICIDENTIFIERLOOSE] + ')\\.' + - '(' + src[NUMERICIDENTIFIERLOOSE] + ')\\.' + - '(' + src[NUMERICIDENTIFIERLOOSE] + ')' - -// ## Pre-release Version Identifier -// A numeric identifier, or a non-numeric identifier. - -var PRERELEASEIDENTIFIER = R++ -src[PRERELEASEIDENTIFIER] = '(?:' + src[NUMERICIDENTIFIER] + - '|' + src[NONNUMERICIDENTIFIER] + ')' - -var PRERELEASEIDENTIFIERLOOSE = R++ -src[PRERELEASEIDENTIFIERLOOSE] = '(?:' + src[NUMERICIDENTIFIERLOOSE] + - '|' + src[NONNUMERICIDENTIFIER] + ')' - -// ## Pre-release Version -// Hyphen, followed by one or more dot-separated pre-release version -// identifiers. - -var PRERELEASE = R++ -src[PRERELEASE] = '(?:-(' + src[PRERELEASEIDENTIFIER] + - '(?:\\.' + src[PRERELEASEIDENTIFIER] + ')*))' - -var PRERELEASELOOSE = R++ -src[PRERELEASELOOSE] = '(?:-?(' + src[PRERELEASEIDENTIFIERLOOSE] + - '(?:\\.' + src[PRERELEASEIDENTIFIERLOOSE] + ')*))' - -// ## Build Metadata Identifier -// Any combination of digits, letters, or hyphens. - -var BUILDIDENTIFIER = R++ -src[BUILDIDENTIFIER] = '[0-9A-Za-z-]+' - -// ## Build Metadata -// Plus sign, followed by one or more period-separated build metadata -// identifiers. - -var BUILD = R++ -src[BUILD] = '(?:\\+(' + src[BUILDIDENTIFIER] + - '(?:\\.' + src[BUILDIDENTIFIER] + ')*))' - -// ## Full Version String -// A main version, followed optionally by a pre-release version and -// build metadata. - -// Note that the only major, minor, patch, and pre-release sections of -// the version string are capturing groups. The build metadata is not a -// capturing group, because it should not ever be used in version -// comparison. - -var FULL = R++ -var FULLPLAIN = 'v?' + src[MAINVERSION] + - src[PRERELEASE] + '?' + - src[BUILD] + '?' - -src[FULL] = '^' + FULLPLAIN + '$' - -// like full, but allows v1.2.3 and =1.2.3, which people do sometimes. -// also, 1.0.0alpha1 (prerelease without the hyphen) which is pretty -// common in the npm registry. -var LOOSEPLAIN = '[v=\\s]*' + src[MAINVERSIONLOOSE] + - src[PRERELEASELOOSE] + '?' + - src[BUILD] + '?' - -var LOOSE = R++ -src[LOOSE] = '^' + LOOSEPLAIN + '$' - -var GTLT = R++ -src[GTLT] = '((?:<|>)?=?)' - -// Something like "2.*" or "1.2.x". -// Note that "x.x" is a valid xRange identifer, meaning "any version" -// Only the first item is strictly required. -var XRANGEIDENTIFIERLOOSE = R++ -src[XRANGEIDENTIFIERLOOSE] = src[NUMERICIDENTIFIERLOOSE] + '|x|X|\\*' -var XRANGEIDENTIFIER = R++ -src[XRANGEIDENTIFIER] = src[NUMERICIDENTIFIER] + '|x|X|\\*' - -var XRANGEPLAIN = R++ -src[XRANGEPLAIN] = '[v=\\s]*(' + src[XRANGEIDENTIFIER] + ')' + - '(?:\\.(' + src[XRANGEIDENTIFIER] + ')' + - '(?:\\.(' + src[XRANGEIDENTIFIER] + ')' + - '(?:' + src[PRERELEASE] + ')?' + - src[BUILD] + '?' + - ')?)?' - -var XRANGEPLAINLOOSE = R++ -src[XRANGEPLAINLOOSE] = '[v=\\s]*(' + src[XRANGEIDENTIFIERLOOSE] + ')' + - '(?:\\.(' + src[XRANGEIDENTIFIERLOOSE] + ')' + - '(?:\\.(' + src[XRANGEIDENTIFIERLOOSE] + ')' + - '(?:' + src[PRERELEASELOOSE] + ')?' + - src[BUILD] + '?' + - ')?)?' - -var XRANGE = R++ -src[XRANGE] = '^' + src[GTLT] + '\\s*' + src[XRANGEPLAIN] + '$' -var XRANGELOOSE = R++ -src[XRANGELOOSE] = '^' + src[GTLT] + '\\s*' + src[XRANGEPLAINLOOSE] + '$' - -// Coercion. -// Extract anything that could conceivably be a part of a valid semver -var COERCE = R++ -src[COERCE] = '(?:^|[^\\d])' + - '(\\d{1,' + MAX_SAFE_COMPONENT_LENGTH + '})' + - '(?:\\.(\\d{1,' + MAX_SAFE_COMPONENT_LENGTH + '}))?' + - '(?:\\.(\\d{1,' + MAX_SAFE_COMPONENT_LENGTH + '}))?' + - '(?:$|[^\\d])' - -// Tilde ranges. -// Meaning is "reasonably at or greater than" -var LONETILDE = R++ -src[LONETILDE] = '(?:~>?)' - -var TILDETRIM = R++ -src[TILDETRIM] = '(\\s*)' + src[LONETILDE] + '\\s+' -re[TILDETRIM] = new RegExp(src[TILDETRIM], 'g') -var tildeTrimReplace = '$1~' - -var TILDE = R++ -src[TILDE] = '^' + src[LONETILDE] + src[XRANGEPLAIN] + '$' -var TILDELOOSE = R++ -src[TILDELOOSE] = '^' + src[LONETILDE] + src[XRANGEPLAINLOOSE] + '$' - -// Caret ranges. -// Meaning is "at least and backwards compatible with" -var LONECARET = R++ -src[LONECARET] = '(?:\\^)' - -var CARETTRIM = R++ -src[CARETTRIM] = '(\\s*)' + src[LONECARET] + '\\s+' -re[CARETTRIM] = new RegExp(src[CARETTRIM], 'g') -var caretTrimReplace = '$1^' - -var CARET = R++ -src[CARET] = '^' + src[LONECARET] + src[XRANGEPLAIN] + '$' -var CARETLOOSE = R++ -src[CARETLOOSE] = '^' + src[LONECARET] + src[XRANGEPLAINLOOSE] + '$' - -// A simple gt/lt/eq thing, or just "" to indicate "any version" -var COMPARATORLOOSE = R++ -src[COMPARATORLOOSE] = '^' + src[GTLT] + '\\s*(' + LOOSEPLAIN + ')$|^$' -var COMPARATOR = R++ -src[COMPARATOR] = '^' + src[GTLT] + '\\s*(' + FULLPLAIN + ')$|^$' - -// An expression to strip any whitespace between the gtlt and the thing -// it modifies, so that `> 1.2.3` ==> `>1.2.3` -var COMPARATORTRIM = R++ -src[COMPARATORTRIM] = '(\\s*)' + src[GTLT] + - '\\s*(' + LOOSEPLAIN + '|' + src[XRANGEPLAIN] + ')' - -// this one has to use the /g flag -re[COMPARATORTRIM] = new RegExp(src[COMPARATORTRIM], 'g') -var comparatorTrimReplace = '$1$2$3' - -// Something like `1.2.3 - 1.2.4` -// Note that these all use the loose form, because they'll be -// checked against either the strict or loose comparator form -// later. -var HYPHENRANGE = R++ -src[HYPHENRANGE] = '^\\s*(' + src[XRANGEPLAIN] + ')' + - '\\s+-\\s+' + - '(' + src[XRANGEPLAIN] + ')' + - '\\s*$' - -var HYPHENRANGELOOSE = R++ -src[HYPHENRANGELOOSE] = '^\\s*(' + src[XRANGEPLAINLOOSE] + ')' + - '\\s+-\\s+' + - '(' + src[XRANGEPLAINLOOSE] + ')' + - '\\s*$' - -// Star ranges basically just allow anything at all. -var STAR = R++ -src[STAR] = '(<|>)?=?\\s*\\*' - -// Compile to actual regexp objects. -// All are flag-free, unless they were created above with a flag. -for (var i = 0; i < R; i++) { - debug(i, src[i]) - if (!re[i]) { - re[i] = new RegExp(src[i]) - } -} - -exports.parse = parse -function parse (version, options) { - if (!options || typeof options !== 'object') { - options = { - loose: !!options, - includePrerelease: false - } - } - - if (version instanceof SemVer) { - return version - } - - if (typeof version !== 'string') { - return null - } - - if (version.length > MAX_LENGTH) { - return null - } - - var r = options.loose ? re[LOOSE] : re[FULL] - if (!r.test(version)) { - return null - } - - try { - return new SemVer(version, options) - } catch (er) { - return null - } -} - -exports.valid = valid -function valid (version, options) { - var v = parse(version, options) - return v ? v.version : null -} - -exports.clean = clean -function clean (version, options) { - var s = parse(version.trim().replace(/^[=v]+/, ''), options) - return s ? s.version : null -} - -exports.SemVer = SemVer - -function SemVer (version, options) { - if (!options || typeof options !== 'object') { - options = { - loose: !!options, - includePrerelease: false - } - } - if (version instanceof SemVer) { - if (version.loose === options.loose) { - return version - } else { - version = version.version - } - } else if (typeof version !== 'string') { - throw new TypeError('Invalid Version: ' + version) - } - - if (version.length > MAX_LENGTH) { - throw new TypeError('version is longer than ' + MAX_LENGTH + ' characters') - } - - if (!(this instanceof SemVer)) { - return new SemVer(version, options) - } - - debug('SemVer', version, options) - this.options = options - this.loose = !!options.loose - - var m = version.trim().match(options.loose ? re[LOOSE] : re[FULL]) - - if (!m) { - throw new TypeError('Invalid Version: ' + version) - } - - this.raw = version - - // these are actually numbers - this.major = +m[1] - this.minor = +m[2] - this.patch = +m[3] - - if (this.major > MAX_SAFE_INTEGER || this.major < 0) { - throw new TypeError('Invalid major version') - } - - if (this.minor > MAX_SAFE_INTEGER || this.minor < 0) { - throw new TypeError('Invalid minor version') - } - - if (this.patch > MAX_SAFE_INTEGER || this.patch < 0) { - throw new TypeError('Invalid patch version') - } - - // numberify any prerelease numeric ids - if (!m[4]) { - this.prerelease = [] - } else { - this.prerelease = m[4].split('.').map(function (id) { - if (/^[0-9]+$/.test(id)) { - var num = +id - if (num >= 0 && num < MAX_SAFE_INTEGER) { - return num - } - } - return id - }) - } - - this.build = m[5] ? m[5].split('.') : [] - this.format() -} - -SemVer.prototype.format = function () { - this.version = this.major + '.' + this.minor + '.' + this.patch - if (this.prerelease.length) { - this.version += '-' + this.prerelease.join('.') - } - return this.version -} - -SemVer.prototype.toString = function () { - return this.version -} - -SemVer.prototype.compare = function (other) { - debug('SemVer.compare', this.version, this.options, other) - if (!(other instanceof SemVer)) { - other = new SemVer(other, this.options) - } - - return this.compareMain(other) || this.comparePre(other) -} - -SemVer.prototype.compareMain = function (other) { - if (!(other instanceof SemVer)) { - other = new SemVer(other, this.options) - } - - return compareIdentifiers(this.major, other.major) || - compareIdentifiers(this.minor, other.minor) || - compareIdentifiers(this.patch, other.patch) -} - -SemVer.prototype.comparePre = function (other) { - if (!(other instanceof SemVer)) { - other = new SemVer(other, this.options) - } - - // NOT having a prerelease is > having one - if (this.prerelease.length && !other.prerelease.length) { - return -1 - } else if (!this.prerelease.length && other.prerelease.length) { - return 1 - } else if (!this.prerelease.length && !other.prerelease.length) { - return 0 - } - - var i = 0 - do { - var a = this.prerelease[i] - var b = other.prerelease[i] - debug('prerelease compare', i, a, b) - if (a === undefined && b === undefined) { - return 0 - } else if (b === undefined) { - return 1 - } else if (a === undefined) { - return -1 - } else if (a === b) { - continue - } else { - return compareIdentifiers(a, b) - } - } while (++i) -} - -// preminor will bump the version up to the next minor release, and immediately -// down to pre-release. premajor and prepatch work the same way. -SemVer.prototype.inc = function (release, identifier) { - switch (release) { - case 'premajor': - this.prerelease.length = 0 - this.patch = 0 - this.minor = 0 - this.major++ - this.inc('pre', identifier) - break - case 'preminor': - this.prerelease.length = 0 - this.patch = 0 - this.minor++ - this.inc('pre', identifier) - break - case 'prepatch': - // If this is already a prerelease, it will bump to the next version - // drop any prereleases that might already exist, since they are not - // relevant at this point. - this.prerelease.length = 0 - this.inc('patch', identifier) - this.inc('pre', identifier) - break - // If the input is a non-prerelease version, this acts the same as - // prepatch. - case 'prerelease': - if (this.prerelease.length === 0) { - this.inc('patch', identifier) - } - this.inc('pre', identifier) - break - - case 'major': - // If this is a pre-major version, bump up to the same major version. - // Otherwise increment major. - // 1.0.0-5 bumps to 1.0.0 - // 1.1.0 bumps to 2.0.0 - if (this.minor !== 0 || - this.patch !== 0 || - this.prerelease.length === 0) { - this.major++ - } - this.minor = 0 - this.patch = 0 - this.prerelease = [] - break - case 'minor': - // If this is a pre-minor version, bump up to the same minor version. - // Otherwise increment minor. - // 1.2.0-5 bumps to 1.2.0 - // 1.2.1 bumps to 1.3.0 - if (this.patch !== 0 || this.prerelease.length === 0) { - this.minor++ - } - this.patch = 0 - this.prerelease = [] - break - case 'patch': - // If this is not a pre-release version, it will increment the patch. - // If it is a pre-release it will bump up to the same patch version. - // 1.2.0-5 patches to 1.2.0 - // 1.2.0 patches to 1.2.1 - if (this.prerelease.length === 0) { - this.patch++ - } - this.prerelease = [] - break - // This probably shouldn't be used publicly. - // 1.0.0 "pre" would become 1.0.0-0 which is the wrong direction. - case 'pre': - if (this.prerelease.length === 0) { - this.prerelease = [0] - } else { - var i = this.prerelease.length - while (--i >= 0) { - if (typeof this.prerelease[i] === 'number') { - this.prerelease[i]++ - i = -2 - } - } - if (i === -1) { - // didn't increment anything - this.prerelease.push(0) - } - } - if (identifier) { - // 1.2.0-beta.1 bumps to 1.2.0-beta.2, - // 1.2.0-beta.fooblz or 1.2.0-beta bumps to 1.2.0-beta.0 - if (this.prerelease[0] === identifier) { - if (isNaN(this.prerelease[1])) { - this.prerelease = [identifier, 0] - } - } else { - this.prerelease = [identifier, 0] - } - } - break - - default: - throw new Error('invalid increment argument: ' + release) - } - this.format() - this.raw = this.version - return this -} - -exports.inc = inc -function inc (version, release, loose, identifier) { - if (typeof (loose) === 'string') { - identifier = loose - loose = undefined - } - - try { - return new SemVer(version, loose).inc(release, identifier).version - } catch (er) { - return null - } -} - -exports.diff = diff -function diff (version1, version2) { - if (eq(version1, version2)) { - return null - } else { - var v1 = parse(version1) - var v2 = parse(version2) - var prefix = '' - if (v1.prerelease.length || v2.prerelease.length) { - prefix = 'pre' - var defaultResult = 'prerelease' - } - for (var key in v1) { - if (key === 'major' || key === 'minor' || key === 'patch') { - if (v1[key] !== v2[key]) { - return prefix + key - } - } - } - return defaultResult // may be undefined - } -} - -exports.compareIdentifiers = compareIdentifiers - -var numeric = /^[0-9]+$/ -function compareIdentifiers (a, b) { - var anum = numeric.test(a) - var bnum = numeric.test(b) - - if (anum && bnum) { - a = +a - b = +b - } - - return a === b ? 0 - : (anum && !bnum) ? -1 - : (bnum && !anum) ? 1 - : a < b ? -1 - : 1 -} - -exports.rcompareIdentifiers = rcompareIdentifiers -function rcompareIdentifiers (a, b) { - return compareIdentifiers(b, a) -} - -exports.major = major -function major (a, loose) { - return new SemVer(a, loose).major -} - -exports.minor = minor -function minor (a, loose) { - return new SemVer(a, loose).minor -} - -exports.patch = patch -function patch (a, loose) { - return new SemVer(a, loose).patch -} - -exports.compare = compare -function compare (a, b, loose) { - return new SemVer(a, loose).compare(new SemVer(b, loose)) -} - -exports.compareLoose = compareLoose -function compareLoose (a, b) { - return compare(a, b, true) -} - -exports.rcompare = rcompare -function rcompare (a, b, loose) { - return compare(b, a, loose) -} - -exports.sort = sort -function sort (list, loose) { - return list.sort(function (a, b) { - return exports.compare(a, b, loose) - }) -} - -exports.rsort = rsort -function rsort (list, loose) { - return list.sort(function (a, b) { - return exports.rcompare(a, b, loose) - }) -} - -exports.gt = gt -function gt (a, b, loose) { - return compare(a, b, loose) > 0 -} - -exports.lt = lt -function lt (a, b, loose) { - return compare(a, b, loose) < 0 -} - -exports.eq = eq -function eq (a, b, loose) { - return compare(a, b, loose) === 0 -} - -exports.neq = neq -function neq (a, b, loose) { - return compare(a, b, loose) !== 0 -} - -exports.gte = gte -function gte (a, b, loose) { - return compare(a, b, loose) >= 0 -} - -exports.lte = lte -function lte (a, b, loose) { - return compare(a, b, loose) <= 0 -} - -exports.cmp = cmp -function cmp (a, op, b, loose) { - switch (op) { - case '===': - if (typeof a === 'object') - a = a.version - if (typeof b === 'object') - b = b.version - return a === b - - case '!==': - if (typeof a === 'object') - a = a.version - if (typeof b === 'object') - b = b.version - return a !== b - - case '': - case '=': - case '==': - return eq(a, b, loose) - - case '!=': - return neq(a, b, loose) - - case '>': - return gt(a, b, loose) - - case '>=': - return gte(a, b, loose) - - case '<': - return lt(a, b, loose) - - case '<=': - return lte(a, b, loose) - - default: - throw new TypeError('Invalid operator: ' + op) - } -} - -exports.Comparator = Comparator -function Comparator (comp, options) { - if (!options || typeof options !== 'object') { - options = { - loose: !!options, - includePrerelease: false - } - } - - if (comp instanceof Comparator) { - if (comp.loose === !!options.loose) { - return comp - } else { - comp = comp.value - } - } - - if (!(this instanceof Comparator)) { - return new Comparator(comp, options) - } - - debug('comparator', comp, options) - this.options = options - this.loose = !!options.loose - this.parse(comp) - - if (this.semver === ANY) { - this.value = '' - } else { - this.value = this.operator + this.semver.version - } - - debug('comp', this) -} - -var ANY = {} -Comparator.prototype.parse = function (comp) { - var r = this.options.loose ? re[COMPARATORLOOSE] : re[COMPARATOR] - var m = comp.match(r) - - if (!m) { - throw new TypeError('Invalid comparator: ' + comp) - } - - this.operator = m[1] - if (this.operator === '=') { - this.operator = '' - } - - // if it literally is just '>' or '' then allow anything. - if (!m[2]) { - this.semver = ANY - } else { - this.semver = new SemVer(m[2], this.options.loose) - } -} - -Comparator.prototype.toString = function () { - return this.value -} - -Comparator.prototype.test = function (version) { - debug('Comparator.test', version, this.options.loose) - - if (this.semver === ANY) { - return true - } - - if (typeof version === 'string') { - version = new SemVer(version, this.options) - } - - return cmp(version, this.operator, this.semver, this.options) -} - -Comparator.prototype.intersects = function (comp, options) { - if (!(comp instanceof Comparator)) { - throw new TypeError('a Comparator is required') - } - - if (!options || typeof options !== 'object') { - options = { - loose: !!options, - includePrerelease: false - } - } - - var rangeTmp - - if (this.operator === '') { - rangeTmp = new Range(comp.value, options) - return satisfies(this.value, rangeTmp, options) - } else if (comp.operator === '') { - rangeTmp = new Range(this.value, options) - return satisfies(comp.semver, rangeTmp, options) - } - - var sameDirectionIncreasing = - (this.operator === '>=' || this.operator === '>') && - (comp.operator === '>=' || comp.operator === '>') - var sameDirectionDecreasing = - (this.operator === '<=' || this.operator === '<') && - (comp.operator === '<=' || comp.operator === '<') - var sameSemVer = this.semver.version === comp.semver.version - var differentDirectionsInclusive = - (this.operator === '>=' || this.operator === '<=') && - (comp.operator === '>=' || comp.operator === '<=') - var oppositeDirectionsLessThan = - cmp(this.semver, '<', comp.semver, options) && - ((this.operator === '>=' || this.operator === '>') && - (comp.operator === '<=' || comp.operator === '<')) - var oppositeDirectionsGreaterThan = - cmp(this.semver, '>', comp.semver, options) && - ((this.operator === '<=' || this.operator === '<') && - (comp.operator === '>=' || comp.operator === '>')) - - return sameDirectionIncreasing || sameDirectionDecreasing || - (sameSemVer && differentDirectionsInclusive) || - oppositeDirectionsLessThan || oppositeDirectionsGreaterThan -} - -exports.Range = Range -function Range (range, options) { - if (!options || typeof options !== 'object') { - options = { - loose: !!options, - includePrerelease: false - } - } - - if (range instanceof Range) { - if (range.loose === !!options.loose && - range.includePrerelease === !!options.includePrerelease) { - return range - } else { - return new Range(range.raw, options) - } - } - - if (range instanceof Comparator) { - return new Range(range.value, options) - } - - if (!(this instanceof Range)) { - return new Range(range, options) - } - - this.options = options - this.loose = !!options.loose - this.includePrerelease = !!options.includePrerelease - - // First, split based on boolean or || - this.raw = range - this.set = range.split(/\s*\|\|\s*/).map(function (range) { - return this.parseRange(range.trim()) - }, this).filter(function (c) { - // throw out any that are not relevant for whatever reason - return c.length - }) - - if (!this.set.length) { - throw new TypeError('Invalid SemVer Range: ' + range) - } - - this.format() -} - -Range.prototype.format = function () { - this.range = this.set.map(function (comps) { - return comps.join(' ').trim() - }).join('||').trim() - return this.range -} - -Range.prototype.toString = function () { - return this.range -} - -Range.prototype.parseRange = function (range) { - var loose = this.options.loose - range = range.trim() - // `1.2.3 - 1.2.4` => `>=1.2.3 <=1.2.4` - var hr = loose ? re[HYPHENRANGELOOSE] : re[HYPHENRANGE] - range = range.replace(hr, hyphenReplace) - debug('hyphen replace', range) - // `> 1.2.3 < 1.2.5` => `>1.2.3 <1.2.5` - range = range.replace(re[COMPARATORTRIM], comparatorTrimReplace) - debug('comparator trim', range, re[COMPARATORTRIM]) - - // `~ 1.2.3` => `~1.2.3` - range = range.replace(re[TILDETRIM], tildeTrimReplace) - - // `^ 1.2.3` => `^1.2.3` - range = range.replace(re[CARETTRIM], caretTrimReplace) - - // normalize spaces - range = range.split(/\s+/).join(' ') - - // At this point, the range is completely trimmed and - // ready to be split into comparators. - - var compRe = loose ? re[COMPARATORLOOSE] : re[COMPARATOR] - var set = range.split(' ').map(function (comp) { - return parseComparator(comp, this.options) - }, this).join(' ').split(/\s+/) - if (this.options.loose) { - // in loose mode, throw out any that are not valid comparators - set = set.filter(function (comp) { - return !!comp.match(compRe) - }) - } - set = set.map(function (comp) { - return new Comparator(comp, this.options) - }, this) - - return set -} - -Range.prototype.intersects = function (range, options) { - if (!(range instanceof Range)) { - throw new TypeError('a Range is required') - } - - return this.set.some(function (thisComparators) { - return thisComparators.every(function (thisComparator) { - return range.set.some(function (rangeComparators) { - return rangeComparators.every(function (rangeComparator) { - return thisComparator.intersects(rangeComparator, options) - }) - }) - }) - }) -} - -// Mostly just for testing and legacy API reasons -exports.toComparators = toComparators -function toComparators (range, options) { - return new Range(range, options).set.map(function (comp) { - return comp.map(function (c) { - return c.value - }).join(' ').trim().split(' ') - }) -} - -// comprised of xranges, tildes, stars, and gtlt's at this point. -// already replaced the hyphen ranges -// turn into a set of JUST comparators. -function parseComparator (comp, options) { - debug('comp', comp, options) - comp = replaceCarets(comp, options) - debug('caret', comp) - comp = replaceTildes(comp, options) - debug('tildes', comp) - comp = replaceXRanges(comp, options) - debug('xrange', comp) - comp = replaceStars(comp, options) - debug('stars', comp) - return comp -} - -function isX (id) { - return !id || id.toLowerCase() === 'x' || id === '*' -} - -// ~, ~> --> * (any, kinda silly) -// ~2, ~2.x, ~2.x.x, ~>2, ~>2.x ~>2.x.x --> >=2.0.0 <3.0.0 -// ~2.0, ~2.0.x, ~>2.0, ~>2.0.x --> >=2.0.0 <2.1.0 -// ~1.2, ~1.2.x, ~>1.2, ~>1.2.x --> >=1.2.0 <1.3.0 -// ~1.2.3, ~>1.2.3 --> >=1.2.3 <1.3.0 -// ~1.2.0, ~>1.2.0 --> >=1.2.0 <1.3.0 -function replaceTildes (comp, options) { - return comp.trim().split(/\s+/).map(function (comp) { - return replaceTilde(comp, options) - }).join(' ') -} - -function replaceTilde (comp, options) { - var r = options.loose ? re[TILDELOOSE] : re[TILDE] - return comp.replace(r, function (_, M, m, p, pr) { - debug('tilde', comp, _, M, m, p, pr) - var ret - - if (isX(M)) { - ret = '' - } else if (isX(m)) { - ret = '>=' + M + '.0.0 <' + (+M + 1) + '.0.0' - } else if (isX(p)) { - // ~1.2 == >=1.2.0 <1.3.0 - ret = '>=' + M + '.' + m + '.0 <' + M + '.' + (+m + 1) + '.0' - } else if (pr) { - debug('replaceTilde pr', pr) - ret = '>=' + M + '.' + m + '.' + p + '-' + pr + - ' <' + M + '.' + (+m + 1) + '.0' - } else { - // ~1.2.3 == >=1.2.3 <1.3.0 - ret = '>=' + M + '.' + m + '.' + p + - ' <' + M + '.' + (+m + 1) + '.0' - } - - debug('tilde return', ret) - return ret - }) -} - -// ^ --> * (any, kinda silly) -// ^2, ^2.x, ^2.x.x --> >=2.0.0 <3.0.0 -// ^2.0, ^2.0.x --> >=2.0.0 <3.0.0 -// ^1.2, ^1.2.x --> >=1.2.0 <2.0.0 -// ^1.2.3 --> >=1.2.3 <2.0.0 -// ^1.2.0 --> >=1.2.0 <2.0.0 -function replaceCarets (comp, options) { - return comp.trim().split(/\s+/).map(function (comp) { - return replaceCaret(comp, options) - }).join(' ') -} - -function replaceCaret (comp, options) { - debug('caret', comp, options) - var r = options.loose ? re[CARETLOOSE] : re[CARET] - return comp.replace(r, function (_, M, m, p, pr) { - debug('caret', comp, _, M, m, p, pr) - var ret - - if (isX(M)) { - ret = '' - } else if (isX(m)) { - ret = '>=' + M + '.0.0 <' + (+M + 1) + '.0.0' - } else if (isX(p)) { - if (M === '0') { - ret = '>=' + M + '.' + m + '.0 <' + M + '.' + (+m + 1) + '.0' - } else { - ret = '>=' + M + '.' + m + '.0 <' + (+M + 1) + '.0.0' - } - } else if (pr) { - debug('replaceCaret pr', pr) - if (M === '0') { - if (m === '0') { - ret = '>=' + M + '.' + m + '.' + p + '-' + pr + - ' <' + M + '.' + m + '.' + (+p + 1) - } else { - ret = '>=' + M + '.' + m + '.' + p + '-' + pr + - ' <' + M + '.' + (+m + 1) + '.0' - } - } else { - ret = '>=' + M + '.' + m + '.' + p + '-' + pr + - ' <' + (+M + 1) + '.0.0' - } - } else { - debug('no pr') - if (M === '0') { - if (m === '0') { - ret = '>=' + M + '.' + m + '.' + p + - ' <' + M + '.' + m + '.' + (+p + 1) - } else { - ret = '>=' + M + '.' + m + '.' + p + - ' <' + M + '.' + (+m + 1) + '.0' - } - } else { - ret = '>=' + M + '.' + m + '.' + p + - ' <' + (+M + 1) + '.0.0' - } - } - - debug('caret return', ret) - return ret - }) -} - -function replaceXRanges (comp, options) { - debug('replaceXRanges', comp, options) - return comp.split(/\s+/).map(function (comp) { - return replaceXRange(comp, options) - }).join(' ') -} - -function replaceXRange (comp, options) { - comp = comp.trim() - var r = options.loose ? re[XRANGELOOSE] : re[XRANGE] - return comp.replace(r, function (ret, gtlt, M, m, p, pr) { - debug('xRange', comp, ret, gtlt, M, m, p, pr) - var xM = isX(M) - var xm = xM || isX(m) - var xp = xm || isX(p) - var anyX = xp - - if (gtlt === '=' && anyX) { - gtlt = '' - } - - if (xM) { - if (gtlt === '>' || gtlt === '<') { - // nothing is allowed - ret = '<0.0.0' - } else { - // nothing is forbidden - ret = '*' - } - } else if (gtlt && anyX) { - // we know patch is an x, because we have any x at all. - // replace X with 0 - if (xm) { - m = 0 - } - p = 0 - - if (gtlt === '>') { - // >1 => >=2.0.0 - // >1.2 => >=1.3.0 - // >1.2.3 => >= 1.2.4 - gtlt = '>=' - if (xm) { - M = +M + 1 - m = 0 - p = 0 - } else { - m = +m + 1 - p = 0 - } - } else if (gtlt === '<=') { - // <=0.7.x is actually <0.8.0, since any 0.7.x should - // pass. Similarly, <=7.x is actually <8.0.0, etc. - gtlt = '<' - if (xm) { - M = +M + 1 - } else { - m = +m + 1 - } - } - - ret = gtlt + M + '.' + m + '.' + p - } else if (xm) { - ret = '>=' + M + '.0.0 <' + (+M + 1) + '.0.0' - } else if (xp) { - ret = '>=' + M + '.' + m + '.0 <' + M + '.' + (+m + 1) + '.0' - } - - debug('xRange return', ret) - - return ret - }) -} - -// Because * is AND-ed with everything else in the comparator, -// and '' means "any version", just remove the *s entirely. -function replaceStars (comp, options) { - debug('replaceStars', comp, options) - // Looseness is ignored here. star is always as loose as it gets! - return comp.trim().replace(re[STAR], '') -} - -// This function is passed to string.replace(re[HYPHENRANGE]) -// M, m, patch, prerelease, build -// 1.2 - 3.4.5 => >=1.2.0 <=3.4.5 -// 1.2.3 - 3.4 => >=1.2.0 <3.5.0 Any 3.4.x will do -// 1.2 - 3.4 => >=1.2.0 <3.5.0 -function hyphenReplace ($0, - from, fM, fm, fp, fpr, fb, - to, tM, tm, tp, tpr, tb) { - if (isX(fM)) { - from = '' - } else if (isX(fm)) { - from = '>=' + fM + '.0.0' - } else if (isX(fp)) { - from = '>=' + fM + '.' + fm + '.0' - } else { - from = '>=' + from - } - - if (isX(tM)) { - to = '' - } else if (isX(tm)) { - to = '<' + (+tM + 1) + '.0.0' - } else if (isX(tp)) { - to = '<' + tM + '.' + (+tm + 1) + '.0' - } else if (tpr) { - to = '<=' + tM + '.' + tm + '.' + tp + '-' + tpr - } else { - to = '<=' + to - } - - return (from + ' ' + to).trim() -} - -// if ANY of the sets match ALL of its comparators, then pass -Range.prototype.test = function (version) { - if (!version) { - return false - } - - if (typeof version === 'string') { - version = new SemVer(version, this.options) - } - - for (var i = 0; i < this.set.length; i++) { - if (testSet(this.set[i], version, this.options)) { - return true - } - } - return false -} - -function testSet (set, version, options) { - for (var i = 0; i < set.length; i++) { - if (!set[i].test(version)) { - return false - } - } - - if (version.prerelease.length && !options.includePrerelease) { - // Find the set of versions that are allowed to have prereleases - // For example, ^1.2.3-pr.1 desugars to >=1.2.3-pr.1 <2.0.0 - // That should allow `1.2.3-pr.2` to pass. - // However, `1.2.4-alpha.notready` should NOT be allowed, - // even though it's within the range set by the comparators. - for (i = 0; i < set.length; i++) { - debug(set[i].semver) - if (set[i].semver === ANY) { - continue - } - - if (set[i].semver.prerelease.length > 0) { - var allowed = set[i].semver - if (allowed.major === version.major && - allowed.minor === version.minor && - allowed.patch === version.patch) { - return true - } - } - } - - // Version has a -pre, but it's not one of the ones we like. - return false - } - - return true -} - -exports.satisfies = satisfies -function satisfies (version, range, options) { - try { - range = new Range(range, options) - } catch (er) { - return false - } - return range.test(version) -} - -exports.maxSatisfying = maxSatisfying -function maxSatisfying (versions, range, options) { - var max = null - var maxSV = null - try { - var rangeObj = new Range(range, options) - } catch (er) { - return null - } - versions.forEach(function (v) { - if (rangeObj.test(v)) { - // satisfies(v, range, options) - if (!max || maxSV.compare(v) === -1) { - // compare(max, v, true) - max = v - maxSV = new SemVer(max, options) - } - } - }) - return max -} - -exports.minSatisfying = minSatisfying -function minSatisfying (versions, range, options) { - var min = null - var minSV = null - try { - var rangeObj = new Range(range, options) - } catch (er) { - return null - } - versions.forEach(function (v) { - if (rangeObj.test(v)) { - // satisfies(v, range, options) - if (!min || minSV.compare(v) === 1) { - // compare(min, v, true) - min = v - minSV = new SemVer(min, options) - } - } - }) - return min -} - -exports.minVersion = minVersion -function minVersion (range, loose) { - range = new Range(range, loose) - - var minver = new SemVer('0.0.0') - if (range.test(minver)) { - return minver - } - - minver = new SemVer('0.0.0-0') - if (range.test(minver)) { - return minver - } - - minver = null - for (var i = 0; i < range.set.length; ++i) { - var comparators = range.set[i] - - comparators.forEach(function (comparator) { - // Clone to avoid manipulating the comparator's semver object. - var compver = new SemVer(comparator.semver.version) - switch (comparator.operator) { - case '>': - if (compver.prerelease.length === 0) { - compver.patch++ - } else { - compver.prerelease.push(0) - } - compver.raw = compver.format() - /* fallthrough */ - case '': - case '>=': - if (!minver || gt(minver, compver)) { - minver = compver - } - break - case '<': - case '<=': - /* Ignore maximum versions */ - break - /* istanbul ignore next */ - default: - throw new Error('Unexpected operation: ' + comparator.operator) - } - }) - } - - if (minver && range.test(minver)) { - return minver - } - - return null -} - -exports.validRange = validRange -function validRange (range, options) { - try { - // Return '*' instead of '' so that truthiness works. - // This will throw if it's invalid anyway - return new Range(range, options).range || '*' - } catch (er) { - return null - } -} - -// Determine if version is less than all the versions possible in the range -exports.ltr = ltr -function ltr (version, range, options) { - return outside(version, range, '<', options) -} - -// Determine if version is greater than all the versions possible in the range. -exports.gtr = gtr -function gtr (version, range, options) { - return outside(version, range, '>', options) -} - -exports.outside = outside -function outside (version, range, hilo, options) { - version = new SemVer(version, options) - range = new Range(range, options) - - var gtfn, ltefn, ltfn, comp, ecomp - switch (hilo) { - case '>': - gtfn = gt - ltefn = lte - ltfn = lt - comp = '>' - ecomp = '>=' - break - case '<': - gtfn = lt - ltefn = gte - ltfn = gt - comp = '<' - ecomp = '<=' - break - default: - throw new TypeError('Must provide a hilo val of "<" or ">"') - } - - // If it satisifes the range it is not outside - if (satisfies(version, range, options)) { - return false - } - - // From now on, variable terms are as if we're in "gtr" mode. - // but note that everything is flipped for the "ltr" function. - - for (var i = 0; i < range.set.length; ++i) { - var comparators = range.set[i] - - var high = null - var low = null - - comparators.forEach(function (comparator) { - if (comparator.semver === ANY) { - comparator = new Comparator('>=0.0.0') - } - high = high || comparator - low = low || comparator - if (gtfn(comparator.semver, high.semver, options)) { - high = comparator - } else if (ltfn(comparator.semver, low.semver, options)) { - low = comparator - } - }) - - // If the edge version comparator has a operator then our version - // isn't outside it - if (high.operator === comp || high.operator === ecomp) { - return false - } - - // If the lowest version comparator has an operator and our version - // is less than it then it isn't higher than the range - if ((!low.operator || low.operator === comp) && - ltefn(version, low.semver)) { - return false - } else if (low.operator === ecomp && ltfn(version, low.semver)) { - return false - } - } - return true -} - -exports.prerelease = prerelease -function prerelease (version, options) { - var parsed = parse(version, options) - return (parsed && parsed.prerelease.length) ? parsed.prerelease : null -} - -exports.intersects = intersects -function intersects (r1, r2, options) { - r1 = new Range(r1, options) - r2 = new Range(r2, options) - return r1.intersects(r2) -} - -exports.coerce = coerce -function coerce (version) { - if (version instanceof SemVer) { - return version - } - - if (typeof version !== 'string') { - return null - } - - var match = version.match(re[COERCE]) - - if (match == null) { - return null - } - - return parse(match[1] + - '.' + (match[2] || '0') + - '.' + (match[3] || '0')) -} diff --git a/node_modules/@babel/core/package.json b/node_modules/@babel/core/package.json index da9593417..b2b85a82e 100644 --- a/node_modules/@babel/core/package.json +++ b/node_modules/@babel/core/package.json @@ -1,68 +1,84 @@ { - "_args": [ - [ - "@babel/core@7.5.5", - "/Users/drew.heavner/Documents/Github/sign-android-release" - ] - ], - "_development": true, - "_from": "@babel/core@7.5.5", - "_id": "@babel/core@7.5.5", + "_from": "@babel/core@^7.1.0", + "_id": "@babel/core@7.12.3", "_inBundle": false, - "_integrity": "sha512-i4qoSr2KTtce0DmkuuQBV4AuQgGPUcPXMr9L5MyYAtk06z068lQ10a4O009fe5OB/DfNV+h+qqT7ddNV8UnRjg==", + "_integrity": "sha512-0qXcZYKZp3/6N2jKYVxZv0aNCsxTSVCiK72DTiTYZAu7sjg73W0/aynWjMbiGd87EQL4WyA8reiJVh92AVla9g==", "_location": "/@babel/core", - "_phantomChildren": {}, + "_phantomChildren": { + "@babel/helper-validator-identifier": "7.10.4", + "chalk": "2.4.2", + "globals": "11.12.0", + "js-tokens": "4.0.0", + "jsesc": "2.5.2", + "lodash": "4.17.19", + "minimist": "1.2.5", + "to-fast-properties": "2.0.0" + }, "_requested": { - "type": "version", + "type": "range", "registry": true, - "raw": "@babel/core@7.5.5", + "raw": "@babel/core@^7.1.0", "name": "@babel/core", "escapedName": "@babel%2fcore", "scope": "@babel", - "rawSpec": "7.5.5", + "rawSpec": "^7.1.0", "saveSpec": null, - "fetchSpec": "7.5.5" + "fetchSpec": "^7.1.0" }, "_requiredBy": [ "/@jest/transform", - "/jest-config" + "/jest-config", + "/jest/@jest/transform", + "/jest/jest-cli/jest-config" ], - "_resolved": "https://registry.npmjs.org/@babel/core/-/core-7.5.5.tgz", - "_spec": "7.5.5", - "_where": "/Users/drew.heavner/Documents/Github/sign-android-release", + "_resolved": "https://registry.npmjs.org/@babel/core/-/core-7.12.3.tgz", + "_shasum": "1b436884e1e3bff6fb1328dc02b208759de92ad8", + "_spec": "@babel/core@^7.1.0", + "_where": "/Users/drew.heavner/Documents/Github/sign-android-release/node_modules/@jest/transform", "author": { "name": "Sebastian McKenzie", "email": "sebmck@gmail.com" }, "browser": { "./lib/config/files/index.js": "./lib/config/files/index-browser.js", - "./lib/transform-file.js": "./lib/transform-file-browser.js" + "./lib/transform-file.js": "./lib/transform-file-browser.js", + "./src/config/files/index.js": "./src/config/files/index-browser.js", + "./src/transform-file.js": "./src/transform-file-browser.js" }, + "bugs": { + "url": "https://github.com/babel/babel/issues" + }, + "bundleDependencies": false, "dependencies": { - "@babel/code-frame": "^7.5.5", - "@babel/generator": "^7.5.5", - "@babel/helpers": "^7.5.5", - "@babel/parser": "^7.5.5", - "@babel/template": "^7.4.4", - "@babel/traverse": "^7.5.5", - "@babel/types": "^7.5.5", - "convert-source-map": "^1.1.0", + "@babel/code-frame": "^7.10.4", + "@babel/generator": "^7.12.1", + "@babel/helper-module-transforms": "^7.12.1", + "@babel/helpers": "^7.12.1", + "@babel/parser": "^7.12.3", + "@babel/template": "^7.10.4", + "@babel/traverse": "^7.12.1", + "@babel/types": "^7.12.1", + "convert-source-map": "^1.7.0", "debug": "^4.1.0", - "json5": "^2.1.0", - "lodash": "^4.17.13", + "gensync": "^1.0.0-beta.1", + "json5": "^2.1.2", + "lodash": "^4.17.19", "resolve": "^1.3.2", "semver": "^5.4.1", "source-map": "^0.5.0" }, + "deprecated": false, "description": "Babel compiler core.", "devDependencies": { - "@babel/helper-transform-fixture-test-runner": "^7.5.5", - "@babel/register": "^7.5.5" + "@babel/helper-transform-fixture-test-runner": "^7.12.1" }, "engines": { "node": ">=6.9.0" }, - "gitHead": "0407f034f09381b95e9cabefbf6b176c76485a43", + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/babel" + }, "homepage": "https://babeljs.io/", "keywords": [ "6to5", @@ -87,7 +103,8 @@ }, "repository": { "type": "git", - "url": "https://github.com/babel/babel/tree/master/packages/babel-core" + "url": "git+https://github.com/babel/babel.git", + "directory": "packages/babel-core" }, - "version": "7.5.5" + "version": "7.12.3" } diff --git a/node_modules/@babel/helper-plugin-utils/LICENSE b/node_modules/@babel/helper-plugin-utils/LICENSE index 620366eb9..f31575ec7 100644 --- a/node_modules/@babel/helper-plugin-utils/LICENSE +++ b/node_modules/@babel/helper-plugin-utils/LICENSE @@ -1,6 +1,6 @@ MIT License -Copyright (c) 2014-2018 Sebastian McKenzie +Copyright (c) 2014-present Sebastian McKenzie and other contributors Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the diff --git a/node_modules/@babel/helper-plugin-utils/package.json b/node_modules/@babel/helper-plugin-utils/package.json index 1c958f295..17467e776 100644 --- a/node_modules/@babel/helper-plugin-utils/package.json +++ b/node_modules/@babel/helper-plugin-utils/package.json @@ -1,47 +1,51 @@ { - "_args": [ - [ - "@babel/helper-plugin-utils@7.0.0", - "/Users/drew.heavner/Documents/Github/sign-android-release" - ] - ], - "_development": true, - "_from": "@babel/helper-plugin-utils@7.0.0", - "_id": "@babel/helper-plugin-utils@7.0.0", + "_from": "@babel/helper-plugin-utils@^7.0.0", + "_id": "@babel/helper-plugin-utils@7.10.4", "_inBundle": false, - "_integrity": "sha512-CYAOUCARwExnEixLdB6sDm2dIJ/YgEAKDM1MOeMeZu9Ld/bDgVo8aiWrXwcY7OBh+1Ea2uUcVRcxKk0GJvW7QA==", + "_integrity": "sha512-O4KCvQA6lLiMU9l2eawBPMf1xPP8xPfB3iEQw150hOVTqj/rfXz0ThTb4HEzqQfs2Bmo5Ay8BzxfzVtBrr9dVg==", "_location": "/@babel/helper-plugin-utils", "_phantomChildren": {}, "_requested": { - "type": "version", + "type": "range", "registry": true, - "raw": "@babel/helper-plugin-utils@7.0.0", + "raw": "@babel/helper-plugin-utils@^7.0.0", "name": "@babel/helper-plugin-utils", "escapedName": "@babel%2fhelper-plugin-utils", "scope": "@babel", - "rawSpec": "7.0.0", + "rawSpec": "^7.0.0", "saveSpec": null, - "fetchSpec": "7.0.0" + "fetchSpec": "^7.0.0" }, "_requiredBy": [ "/@babel/plugin-syntax-object-rest-spread", "/babel-plugin-istanbul" ], - "_resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.0.0.tgz", - "_spec": "7.0.0", - "_where": "/Users/drew.heavner/Documents/Github/sign-android-release", + "_resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.10.4.tgz", + "_shasum": "2f75a831269d4f677de49986dff59927533cf375", + "_spec": "@babel/helper-plugin-utils@^7.0.0", + "_where": "/Users/drew.heavner/Documents/Github/sign-android-release/node_modules/babel-plugin-istanbul", "author": { "name": "Logan Smyth", "email": "loganfsmyth@gmail.com" }, + "bugs": { + "url": "https://github.com/babel/babel/issues" + }, + "bundleDependencies": false, + "deprecated": false, "description": "General utilities for plugins to use", + "gitHead": "7fd40d86a0d03ff0e9c3ea16b29689945433d4df", "homepage": "https://babeljs.io/", "license": "MIT", "main": "lib/index.js", "name": "@babel/helper-plugin-utils", + "publishConfig": { + "access": "public" + }, "repository": { "type": "git", - "url": "https://github.com/babel/babel/tree/master/packages/babel-helper-plugin-utils" + "url": "git+https://github.com/babel/babel.git", + "directory": "packages/babel-helper-plugin-utils" }, - "version": "7.0.0" + "version": "7.10.4" } diff --git a/node_modules/@babel/helper-plugin-utils/src/index.js b/node_modules/@babel/helper-plugin-utils/src/index.js deleted file mode 100644 index f0ecb83a2..000000000 --- a/node_modules/@babel/helper-plugin-utils/src/index.js +++ /dev/null @@ -1,95 +0,0 @@ -export function declare(builder) { - return (api, options, dirname) => { - if (!api.assertVersion) { - // Inject a custom version of 'assertVersion' for Babel 6 and early - // versions of Babel 7's beta that didn't have it. - api = Object.assign(copyApiObject(api), { - assertVersion(range) { - throwVersionError(range, api.version); - }, - }); - } - - return builder(api, options || {}, dirname); - }; -} - -function copyApiObject(api) { - // Babel >= 7 <= beta.41 passed the API as a new object that had - // babel/core as the prototype. While slightly faster, it also - // means that the Object.assign copy below fails. Rather than - // keep complexity, the Babel 6 behavior has been reverted and this - // normalizes all that for Babel 7. - let proto = null; - if (typeof api.version === "string" && /^7\./.test(api.version)) { - proto = Object.getPrototypeOf(api); - if ( - proto && - (!has(proto, "version") || - !has(proto, "transform") || - !has(proto, "template") || - !has(proto, "types")) - ) { - proto = null; - } - } - - return { - ...proto, - ...api, - }; -} - -function has(obj, key) { - return Object.prototype.hasOwnProperty.call(obj, key); -} - -function throwVersionError(range, version) { - if (typeof range === "number") { - if (!Number.isInteger(range)) { - throw new Error("Expected string or integer value."); - } - range = `^${range}.0.0-0`; - } - if (typeof range !== "string") { - throw new Error("Expected string or integer value."); - } - - const limit = Error.stackTraceLimit; - - if (typeof limit === "number" && limit < 25) { - // Bump up the limit if needed so that users are more likely - // to be able to see what is calling Babel. - Error.stackTraceLimit = 25; - } - - let err; - if (version.slice(0, 2) === "7.") { - err = new Error( - `Requires Babel "^7.0.0-beta.41", but was loaded with "${version}". ` + - `You'll need to update your @babel/core version.`, - ); - } else { - err = new Error( - `Requires Babel "${range}", but was loaded with "${version}". ` + - `If you are sure you have a compatible version of @babel/core, ` + - `it is likely that something in your build process is loading the ` + - `wrong version. Inspect the stack trace of this error to look for ` + - `the first entry that doesn't mention "@babel/core" or "babel-core" ` + - `to see what is calling Babel.`, - ); - } - - if (typeof limit === "number") { - Error.stackTraceLimit = limit; - } - - throw Object.assign( - err, - ({ - code: "BABEL_VERSION_UNSUPPORTED", - version, - range, - }: any), - ); -} diff --git a/node_modules/@babel/helpers/README.md b/node_modules/@babel/helpers/README.md index 537d8e471..3b79dbf55 100644 --- a/node_modules/@babel/helpers/README.md +++ b/node_modules/@babel/helpers/README.md @@ -2,7 +2,7 @@ > Collection of helper functions used by Babel transforms. -See our website [@babel/helpers](https://babeljs.io/docs/en/next/babel-helpers.html) for more information. +See our website [@babel/helpers](https://babeljs.io/docs/en/babel-helpers) for more information. ## Install diff --git a/node_modules/@babel/helpers/lib/helpers.js b/node_modules/@babel/helpers/lib/helpers.js index d087158a1..feb2e016a 100644 --- a/node_modules/@babel/helpers/lib/helpers.js +++ b/node_modules/@babel/helpers/lib/helpers.js @@ -5,15 +5,7 @@ Object.defineProperty(exports, "__esModule", { }); exports.default = void 0; -function _template() { - const data = _interopRequireDefault(require("@babel/template")); - - _template = function () { - return data; - }; - - return data; -} +var _template = _interopRequireDefault(require("@babel/template")); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } @@ -23,11 +15,13 @@ exports.default = _default; const helper = minVersion => tpl => ({ minVersion, - ast: () => _template().default.program.ast(tpl) + ast: () => _template.default.program.ast(tpl) }); helpers.typeof = helper("7.0.0-beta.0")` export default function _typeof(obj) { + "@babel/helpers - typeof"; + if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function (obj) { return typeof obj; }; } else { @@ -61,15 +55,6 @@ helpers.jsx = helper("7.0.0-beta.0")` children: void 0, }; } - if (props && defaultProps) { - for (var propName in defaultProps) { - if (props[propName] === void 0) { - props[propName] = defaultProps[propName]; - } - } - } else if (!props) { - props = defaultProps || {}; - } if (childrenLength === 1) { props.children = children; @@ -81,6 +66,16 @@ helpers.jsx = helper("7.0.0-beta.0")` props.children = childArray; } + if (props && defaultProps) { + for (var propName in defaultProps) { + if (props[propName] === void 0) { + props[propName] = defaultProps[propName]; + } + } + } else if (!props) { + props = defaultProps || {}; + } + return { $$typeof: REACT_ELEMENT_TYPE, type: type, @@ -146,7 +141,7 @@ helpers.AsyncGenerator = helper("7.0.0-beta.0")` Promise.resolve(wrappedAwait ? value.wrapped : value).then( function (arg) { if (wrappedAwait) { - resume("next", arg); + resume(key === "return" ? "return" : "next", arg); return } @@ -245,6 +240,10 @@ helpers.asyncGeneratorDelegate = helper("7.0.0-beta.0")` if (typeof inner.return === "function") { iter.return = function (value) { + if (waiting) { + waiting = false; + return value; + } return pump("return", value); }; } @@ -390,7 +389,7 @@ helpers.objectSpread = helper("7.0.0-beta.0")` export default function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { - var source = (arguments[i] != null) ? arguments[i] : {}; + var source = (arguments[i] != null) ? Object(arguments[i]) : {}; var ownKeys = Object.keys(source); if (typeof Object.getOwnPropertySymbols === 'function') { ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function(sym) { @@ -408,7 +407,7 @@ helpers.objectSpread2 = helper("7.5.0")` import defineProperty from "defineProperty"; // This function is different to "Reflect.ownKeys". The enumerableOnly - // filters on symbol properties only. Returned string properties are always + // filters on symbol properties only. Returned string properties are always // enumerable. It is good to use in objectSpread. function ownKeys(object, enumerableOnly) { @@ -427,13 +426,13 @@ helpers.objectSpread2 = helper("7.5.0")` for (var i = 1; i < arguments.length; i++) { var source = (arguments[i] != null) ? arguments[i] : {}; if (i % 2) { - ownKeys(source, true).forEach(function (key) { + ownKeys(Object(source), true).forEach(function (key) { defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { - ownKeys(source).forEach(function (key) { + ownKeys(Object(source)).forEach(function (key) { Object.defineProperty( target, key, @@ -488,10 +487,8 @@ helpers.setPrototypeOf = helper("7.0.0-beta.0")` return _setPrototypeOf(o, p); } `; -helpers.construct = helper("7.0.0-beta.0")` - import setPrototypeOf from "setPrototypeOf"; - - function isNativeReflectConstruct() { +helpers.isNativeReflectConstruct = helper("7.9.0")` + export default function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; // core-js@3 @@ -515,6 +512,10 @@ helpers.construct = helper("7.0.0-beta.0")` return false; } } +`; +helpers.construct = helper("7.0.0-beta.0")` + import setPrototypeOf from "setPrototypeOf"; + import isNativeReflectConstruct from "isNativeReflectConstruct"; export default function _construct(Parent, args, Class) { if (isNativeReflectConstruct()) { @@ -593,28 +594,47 @@ helpers.interopRequireDefault = helper("7.0.0-beta.0")` } `; helpers.interopRequireWildcard = helper("7.0.0-beta.0")` + function _getRequireWildcardCache() { + if (typeof WeakMap !== "function") return null; + + var cache = new WeakMap(); + _getRequireWildcardCache = function () { return cache; }; + return cache; + } + export default function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; - } else { - var newObj = {}; - if (obj != null) { - for (var key in obj) { - if (Object.prototype.hasOwnProperty.call(obj, key)) { - var desc = Object.defineProperty && Object.getOwnPropertyDescriptor - ? Object.getOwnPropertyDescriptor(obj, key) - : {}; - if (desc.get || desc.set) { - Object.defineProperty(newObj, key, desc); - } else { - newObj[key] = obj[key]; - } - } + } + + if (obj === null || (typeof obj !== "object" && typeof obj !== "function")) { + return { default: obj } + } + + var cache = _getRequireWildcardCache(); + if (cache && cache.has(obj)) { + return cache.get(obj); + } + + var newObj = {}; + var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; + for (var key in obj) { + if (Object.prototype.hasOwnProperty.call(obj, key)) { + var desc = hasPropertyDescriptor + ? Object.getOwnPropertyDescriptor(obj, key) + : null; + if (desc && (desc.get || desc.set)) { + Object.defineProperty(newObj, key, desc); + } else { + newObj[key] = obj[key]; } } - newObj.default = obj; - return newObj; } + newObj.default = obj; + if (cache) { + cache.set(obj, newObj); + } + return newObj; } `; helpers.newArrowCheck = helper("7.0.0-beta.0")` @@ -686,6 +706,27 @@ helpers.possibleConstructorReturn = helper("7.0.0-beta.0")` return assertThisInitialized(self); } `; +helpers.createSuper = helper("7.9.0")` + import getPrototypeOf from "getPrototypeOf"; + import isNativeReflectConstruct from "isNativeReflectConstruct"; + import possibleConstructorReturn from "possibleConstructorReturn"; + + export default function _createSuper(Derived) { + var hasNativeReflectConstruct = isNativeReflectConstruct(); + + return function _createSuperInternal() { + var Super = getPrototypeOf(Derived), result; + if (hasNativeReflectConstruct) { + // NOTE: This doesn't work if this.__proto__.constructor has been modified. + var NewTarget = getPrototypeOf(this).constructor; + result = Reflect.construct(Super, arguments, NewTarget); + } else { + result = Super.apply(this, arguments); + } + return possibleConstructorReturn(this, result); + } + } + `; helpers.superPropBase = helper("7.0.0-beta.0")` import getPrototypeOf from "getPrototypeOf"; @@ -792,20 +833,9 @@ helpers.taggedTemplateLiteralLoose = helper("7.0.0-beta.0")` return strings; } `; -helpers.temporalRef = helper("7.0.0-beta.0")` - import undef from "temporalUndefined"; - - export default function _temporalRef(val, name) { - if (val === undef) { - throw new ReferenceError(name + " is not defined - temporal dead zone"); - } else { - return val; - } - } -`; helpers.readOnlyError = helper("7.0.0-beta.0")` export default function _readOnlyError(name) { - throw new Error("\\"" + name + "\\" is read-only"); + throw new TypeError("\\"" + name + "\\" is read-only"); } `; helpers.classNameTDZError = helper("7.0.0-beta.0")` @@ -814,50 +844,88 @@ helpers.classNameTDZError = helper("7.0.0-beta.0")` } `; helpers.temporalUndefined = helper("7.0.0-beta.0")` - export default {}; + // This function isn't mean to be called, but to be used as a reference. + // We can't use a normal object because it isn't hoisted. + export default function _temporalUndefined() {} +`; +helpers.tdz = helper("7.5.5")` + export default function _tdzError(name) { + throw new ReferenceError(name + " is not defined - temporal dead zone"); + } +`; +helpers.temporalRef = helper("7.0.0-beta.0")` + import undef from "temporalUndefined"; + import err from "tdz"; + + export default function _temporalRef(val, name) { + return val === undef ? err(name) : val; + } `; helpers.slicedToArray = helper("7.0.0-beta.0")` import arrayWithHoles from "arrayWithHoles"; import iterableToArrayLimit from "iterableToArrayLimit"; + import unsupportedIterableToArray from "unsupportedIterableToArray"; import nonIterableRest from "nonIterableRest"; export default function _slicedToArray(arr, i) { - return arrayWithHoles(arr) || iterableToArrayLimit(arr, i) || nonIterableRest(); + return ( + arrayWithHoles(arr) || + iterableToArrayLimit(arr, i) || + unsupportedIterableToArray(arr, i) || + nonIterableRest() + ); } `; helpers.slicedToArrayLoose = helper("7.0.0-beta.0")` import arrayWithHoles from "arrayWithHoles"; import iterableToArrayLimitLoose from "iterableToArrayLimitLoose"; + import unsupportedIterableToArray from "unsupportedIterableToArray"; import nonIterableRest from "nonIterableRest"; export default function _slicedToArrayLoose(arr, i) { - return arrayWithHoles(arr) || iterableToArrayLimitLoose(arr, i) || nonIterableRest(); + return ( + arrayWithHoles(arr) || + iterableToArrayLimitLoose(arr, i) || + unsupportedIterableToArray(arr, i) || + nonIterableRest() + ); } `; helpers.toArray = helper("7.0.0-beta.0")` import arrayWithHoles from "arrayWithHoles"; import iterableToArray from "iterableToArray"; + import unsupportedIterableToArray from "unsupportedIterableToArray"; import nonIterableRest from "nonIterableRest"; export default function _toArray(arr) { - return arrayWithHoles(arr) || iterableToArray(arr) || nonIterableRest(); + return ( + arrayWithHoles(arr) || + iterableToArray(arr) || + unsupportedIterableToArray(arr) || + nonIterableRest() + ); } `; helpers.toConsumableArray = helper("7.0.0-beta.0")` import arrayWithoutHoles from "arrayWithoutHoles"; import iterableToArray from "iterableToArray"; + import unsupportedIterableToArray from "unsupportedIterableToArray"; import nonIterableSpread from "nonIterableSpread"; export default function _toConsumableArray(arr) { - return arrayWithoutHoles(arr) || iterableToArray(arr) || nonIterableSpread(); + return ( + arrayWithoutHoles(arr) || + iterableToArray(arr) || + unsupportedIterableToArray(arr) || + nonIterableSpread() + ); } `; helpers.arrayWithoutHoles = helper("7.0.0-beta.0")` + import arrayLikeToArray from "arrayLikeToArray"; + export default function _arrayWithoutHoles(arr) { - if (Array.isArray(arr)) { - for (var i = 0, arr2 = new Array(arr.length); i < arr.length; i++) arr2[i] = arr[i]; - return arr2; - } + if (Array.isArray(arr)) return arrayLikeToArray(arr); } `; helpers.arrayWithHoles = helper("7.0.0-beta.0")` @@ -865,19 +933,27 @@ helpers.arrayWithHoles = helper("7.0.0-beta.0")` if (Array.isArray(arr)) return arr; } `; +helpers.maybeArrayLike = helper("7.9.0")` + import arrayLikeToArray from "arrayLikeToArray"; + + export default function _maybeArrayLike(next, arr, i) { + if (arr && !Array.isArray(arr) && typeof arr.length === "number") { + var len = arr.length; + return arrayLikeToArray(arr, i !== void 0 && i < len ? i : len); + } + return next(arr, i); + } +`; helpers.iterableToArray = helper("7.0.0-beta.0")` export default function _iterableToArray(iter) { - if ( - Symbol.iterator in Object(iter) || - Object.prototype.toString.call(iter) === "[object Arguments]" - ) return Array.from(iter); + if (typeof Symbol !== "undefined" && Symbol.iterator in Object(iter)) return Array.from(iter); } `; helpers.iterableToArrayLimit = helper("7.0.0-beta.0")` export default function _iterableToArrayLimit(arr, i) { // this is an expanded form of \`for...of\` that properly supports abrupt completions of // iterators etc. variable names have been minimised to reduce the size of this massive - // helper. sometimes spec compliancy is annoying :( + // helper. sometimes spec compliance is annoying :( // // _n = _iteratorNormalCompletion // _d = _didIteratorError @@ -885,6 +961,8 @@ helpers.iterableToArrayLimit = helper("7.0.0-beta.0")` // _i = _iterator // _s = _step + if (typeof Symbol === "undefined" || !(Symbol.iterator in Object(arr))) return; + var _arr = []; var _n = true; var _d = false; @@ -909,6 +987,8 @@ helpers.iterableToArrayLimit = helper("7.0.0-beta.0")` `; helpers.iterableToArrayLimitLoose = helper("7.0.0-beta.0")` export default function _iterableToArrayLimitLoose(arr, i) { + if (typeof Symbol === "undefined" || !(Symbol.iterator in Object(arr))) return; + var _arr = []; for (var _iterator = arr[Symbol.iterator](), _step; !(_step = _iterator.next()).done;) { _arr.push(_step.value); @@ -917,14 +997,125 @@ helpers.iterableToArrayLimitLoose = helper("7.0.0-beta.0")` return _arr; } `; +helpers.unsupportedIterableToArray = helper("7.9.0")` + import arrayLikeToArray from "arrayLikeToArray"; + + export default function _unsupportedIterableToArray(o, minLen) { + if (!o) return; + if (typeof o === "string") return arrayLikeToArray(o, minLen); + var n = Object.prototype.toString.call(o).slice(8, -1); + if (n === "Object" && o.constructor) n = o.constructor.name; + if (n === "Map" || n === "Set") return Array.from(o); + if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) + return arrayLikeToArray(o, minLen); + } +`; +helpers.arrayLikeToArray = helper("7.9.0")` + export default function _arrayLikeToArray(arr, len) { + if (len == null || len > arr.length) len = arr.length; + for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; + return arr2; + } +`; helpers.nonIterableSpread = helper("7.0.0-beta.0")` export default function _nonIterableSpread() { - throw new TypeError("Invalid attempt to spread non-iterable instance"); + throw new TypeError( + "Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method." + ); } `; helpers.nonIterableRest = helper("7.0.0-beta.0")` export default function _nonIterableRest() { - throw new TypeError("Invalid attempt to destructure non-iterable instance"); + throw new TypeError( + "Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method." + ); + } +`; +helpers.createForOfIteratorHelper = helper("7.9.0")` + import unsupportedIterableToArray from "unsupportedIterableToArray"; + + // s: start (create the iterator) + // n: next + // e: error (called whenever something throws) + // f: finish (always called at the end) + + export default function _createForOfIteratorHelper(o, allowArrayLike) { + var it; + if (typeof Symbol === "undefined" || o[Symbol.iterator] == null) { + // Fallback for engines without symbol support + if ( + Array.isArray(o) || + (it = unsupportedIterableToArray(o)) || + (allowArrayLike && o && typeof o.length === "number") + ) { + if (it) o = it; + var i = 0; + var F = function(){}; + return { + s: F, + n: function() { + if (i >= o.length) return { done: true }; + return { done: false, value: o[i++] }; + }, + e: function(e) { throw e; }, + f: F, + }; + } + + throw new TypeError("Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); + } + + var normalCompletion = true, didErr = false, err; + + return { + s: function() { + it = o[Symbol.iterator](); + }, + n: function() { + var step = it.next(); + normalCompletion = step.done; + return step; + }, + e: function(e) { + didErr = true; + err = e; + }, + f: function() { + try { + if (!normalCompletion && it.return != null) it.return(); + } finally { + if (didErr) throw err; + } + } + }; + } +`; +helpers.createForOfIteratorHelperLoose = helper("7.9.0")` + import unsupportedIterableToArray from "unsupportedIterableToArray"; + + export default function _createForOfIteratorHelperLoose(o, allowArrayLike) { + var it; + + if (typeof Symbol === "undefined" || o[Symbol.iterator] == null) { + // Fallback for engines without symbol support + if ( + Array.isArray(o) || + (it = unsupportedIterableToArray(o)) || + (allowArrayLike && o && typeof o.length === "number") + ) { + if (it) o = it; + var i = 0; + return function() { + if (i >= o.length) return { done: true }; + return { done: false, value: o[i++] }; + } + } + + throw new TypeError("Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); + } + + it = o[Symbol.iterator](); + return it.next.bind(it); } `; helpers.skipFirstGeneratorNext = helper("7.0.0-beta.0")` @@ -963,9 +1154,7 @@ helpers.initializerWarningHelper = helper("7.0.0-beta.0")` export default function _initializerWarningHelper(descriptor, context){ throw new Error( 'Decorating class property failed. Please ensure that ' + - 'proposal-class-properties is enabled and set to use loose mode. ' + - 'To use proposal-class-properties in spec mode with decorators, wait for ' + - 'the next major version of decorators in stage 2.' + 'proposal-class-properties is enabled and runs after the decorators transform.' ); } `; @@ -1003,8 +1192,6 @@ helpers.applyDecoratedDescriptor = helper("7.0.0-beta.0")` } if (desc.initializer === void 0){ - // This is a hack to avoid this being processed by 'transform-runtime'. - // See issue #9. Object.defineProperty(target, property, desc); desc = null; } @@ -1092,6 +1279,9 @@ helpers.classStaticPrivateFieldSpecGet = helper("7.0.2")` if (receiver !== classConstructor) { throw new TypeError("Private static access of wrong provenance"); } + if (descriptor.get) { + return descriptor.get.call(receiver); + } return descriptor.value; } `; @@ -1100,13 +1290,18 @@ helpers.classStaticPrivateFieldSpecSet = helper("7.0.2")` if (receiver !== classConstructor) { throw new TypeError("Private static access of wrong provenance"); } - if (!descriptor.writable) { - // This should only throw in strict mode, but class bodies are - // always strict and private fields can only be used inside - // class bodies. - throw new TypeError("attempted to set read only private field"); + if (descriptor.set) { + descriptor.set.call(receiver, value); + } else { + if (!descriptor.writable) { + // This should only throw in strict mode, but class bodies are + // always strict and private fields can only be used inside + // class bodies. + throw new TypeError("attempted to set read only private field"); + } + descriptor.value = value; } - descriptor.value = value; + return value; } `; @@ -1817,16 +2012,17 @@ helpers.wrapRegExp = helper("7.2.6")` export default function _wrapRegExp(re, groups) { _wrapRegExp = function(re, groups) { - return new BabelRegExp(re, groups); + return new BabelRegExp(re, undefined, groups); }; var _RegExp = wrapNativeSuper(RegExp); var _super = RegExp.prototype; var _groups = new WeakMap(); - function BabelRegExp(re, groups) { - var _this = _RegExp.call(this, re); - _groups.set(_this, groups); + function BabelRegExp(re, flags, groups) { + var _this = _RegExp.call(this, re, flags); + // if the regex is recreated with 'g' flag + _groups.set(_this, groups || _groups.get(re)); return _this; } inherits(BabelRegExp, _RegExp); diff --git a/node_modules/@babel/helpers/lib/index.js b/node_modules/@babel/helpers/lib/index.js index 94db512a0..f122ac096 100644 --- a/node_modules/@babel/helpers/lib/index.js +++ b/node_modules/@babel/helpers/lib/index.js @@ -9,29 +9,15 @@ exports.getDependencies = getDependencies; exports.ensure = ensure; exports.default = exports.list = void 0; -function _traverse() { - const data = _interopRequireDefault(require("@babel/traverse")); +var _traverse = _interopRequireDefault(require("@babel/traverse")); - _traverse = function () { - return data; - }; - - return data; -} - -function t() { - const data = _interopRequireWildcard(require("@babel/types")); - - t = function () { - return data; - }; - - return data; -} +var t = _interopRequireWildcard(require("@babel/types")); var _helpers = _interopRequireDefault(require("./helpers")); -function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; if (desc.get || desc.set) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj.default = obj; return newObj; } } +function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function () { return cache; }; return cache; } + +function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; } function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } @@ -46,6 +32,8 @@ function makePath(path) { return parts.reverse().join("."); } +let fileClass = undefined; + function getHelperMetadata(file) { const globals = new Set(); const localBindingNames = new Set(); @@ -55,7 +43,7 @@ function getHelperMetadata(file) { const exportBindingAssignments = []; const importPaths = []; const importBindingsReferences = []; - (0, _traverse().default)(file, { + const dependencyVisitor = { ImportDeclaration(child) { const name = child.node.source.value; @@ -99,8 +87,8 @@ function getHelperMetadata(file) { child.skip(); } - }); - (0, _traverse().default)(file, { + }; + const referenceVisitor = { Program(path) { const bindings = path.scope.getAllBindings(); Object.keys(bindings).forEach(name => { @@ -131,12 +119,14 @@ function getHelperMetadata(file) { const binding = child.scope.getBinding(exportName); - if (binding && binding.scope.path.isProgram()) { + if (binding == null ? void 0 : binding.scope.path.isProgram()) { exportBindingAssignments.push(makePath(child)); } } - }); + }; + (0, _traverse.default)(file.ast, dependencyVisitor, file.scope); + (0, _traverse.default)(file.ast, referenceVisitor, file.scope); if (!exportPath) throw new Error("Helpers must default-export something."); exportBindingAssignments.reverse(); return { @@ -184,7 +174,7 @@ function permuteHelperAST(file, metadata, id, localBindings, getDependency) { toRename[exportName] = id.name; } - (0, _traverse().default)(file, { + const visitor = { Program(path) { const exp = path.get(exportPath); const imps = importPaths.map(p => path.get(p)); @@ -195,18 +185,18 @@ function permuteHelperAST(file, metadata, id, localBindings, getDependency) { if (decl.isFunctionDeclaration()) { exp.replaceWith(decl); } else { - exp.replaceWith(t().variableDeclaration("var", [t().variableDeclarator(id, decl.node)])); + exp.replaceWith(t.variableDeclaration("var", [t.variableDeclarator(id, decl.node)])); } } else if (id.type === "MemberExpression") { if (decl.isFunctionDeclaration()) { exportBindingAssignments.forEach(assignPath => { const assign = path.get(assignPath); - assign.replaceWith(t().assignmentExpression("=", id, assign.node)); + assign.replaceWith(t.assignmentExpression("=", id, assign.node)); }); exp.replaceWith(decl); - path.pushContainer("body", t().expressionStatement(t().assignmentExpression("=", id, t().identifier(exportName)))); + path.pushContainer("body", t.expressionStatement(t.assignmentExpression("=", id, t.identifier(exportName)))); } else { - exp.replaceWith(t().expressionStatement(t().assignmentExpression("=", id, decl.node))); + exp.replaceWith(t.expressionStatement(t.assignmentExpression("=", id, decl.node))); } } else { throw new Error("Unexpected helper format."); @@ -219,14 +209,15 @@ function permuteHelperAST(file, metadata, id, localBindings, getDependency) { for (const path of imps) path.remove(); for (const path of impsBindingRefs) { - const node = t().cloneNode(dependenciesRefs[path.node.name]); + const node = t.cloneNode(dependenciesRefs[path.node.name]); path.replaceWith(node); } path.stop(); } - }); + }; + (0, _traverse.default)(file.ast, visitor, file.scope); } const helperData = Object.create(null); @@ -243,7 +234,17 @@ function loadHelper(name) { } const fn = () => { - return t().file(helper.ast()); + const file = { + ast: t.file(helper.ast()) + }; + + if (fileClass) { + return new fileClass({ + filename: `babel-helper://${name}` + }, file); + } + + return file; }; const metadata = getHelperMetadata(fn()); @@ -252,7 +253,7 @@ function loadHelper(name) { const file = fn(); permuteHelperAST(file, metadata, id, localBindings, getDependency); return { - nodes: file.program.body, + nodes: file.ast.program.body, globals: metadata.globals }; }, @@ -280,7 +281,11 @@ function getDependencies(name) { return Array.from(loadHelper(name).dependencies.values()); } -function ensure(name) { +function ensure(name, newFileClass) { + if (!fileClass) { + fileClass = newFileClass; + } + loadHelper(name); } diff --git a/node_modules/@babel/helpers/package.json b/node_modules/@babel/helpers/package.json index aa890fad7..0e5ab2a31 100644 --- a/node_modules/@babel/helpers/package.json +++ b/node_modules/@babel/helpers/package.json @@ -1,48 +1,54 @@ { - "_args": [ - [ - "@babel/helpers@7.5.5", - "/Users/drew.heavner/Documents/Github/sign-android-release" - ] - ], - "_development": true, - "_from": "@babel/helpers@7.5.5", - "_id": "@babel/helpers@7.5.5", + "_from": "@babel/helpers@^7.12.1", + "_id": "@babel/helpers@7.12.5", "_inBundle": false, - "_integrity": "sha512-nRq2BUhxZFnfEn/ciJuhklHvFOqjJUD5wpx+1bxUF2axL9C+v4DE/dmp5sT2dKnpOs4orZWzpAZqlCy8QqE/7g==", + "_integrity": "sha512-lgKGMQlKqA8meJqKsW6rUnc4MdUk35Ln0ATDqdM1a/UpARODdI4j5Y5lVfUScnSNkJcdCRAaWkspykNoFg9sJA==", "_location": "/@babel/helpers", - "_phantomChildren": {}, + "_phantomChildren": { + "@babel/helper-validator-identifier": "7.10.4", + "chalk": "2.4.2", + "globals": "11.12.0", + "js-tokens": "4.0.0", + "jsesc": "2.5.2", + "lodash": "4.17.19", + "to-fast-properties": "2.0.0" + }, "_requested": { - "type": "version", + "type": "range", "registry": true, - "raw": "@babel/helpers@7.5.5", + "raw": "@babel/helpers@^7.12.1", "name": "@babel/helpers", "escapedName": "@babel%2fhelpers", "scope": "@babel", - "rawSpec": "7.5.5", + "rawSpec": "^7.12.1", "saveSpec": null, - "fetchSpec": "7.5.5" + "fetchSpec": "^7.12.1" }, "_requiredBy": [ "/@babel/core" ], - "_resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.5.5.tgz", - "_spec": "7.5.5", - "_where": "/Users/drew.heavner/Documents/Github/sign-android-release", + "_resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.12.5.tgz", + "_shasum": "1a1ba4a768d9b58310eda516c449913fe647116e", + "_spec": "@babel/helpers@^7.12.1", + "_where": "/Users/drew.heavner/Documents/Github/sign-android-release/node_modules/@babel/core", "author": { "name": "Sebastian McKenzie", "email": "sebmck@gmail.com" }, + "bugs": { + "url": "https://github.com/babel/babel/issues" + }, + "bundleDependencies": false, "dependencies": { - "@babel/template": "^7.4.4", - "@babel/traverse": "^7.5.5", - "@babel/types": "^7.5.5" + "@babel/template": "^7.10.4", + "@babel/traverse": "^7.12.5", + "@babel/types": "^7.12.5" }, + "deprecated": false, "description": "Collection of helper functions used by Babel transforms.", "devDependencies": { - "@babel/helper-plugin-test-runner": "^7.0.0" + "@babel/helper-plugin-test-runner": "7.10.4" }, - "gitHead": "0407f034f09381b95e9cabefbf6b176c76485a43", "homepage": "https://babeljs.io/", "license": "MIT", "main": "lib/index.js", @@ -52,7 +58,8 @@ }, "repository": { "type": "git", - "url": "https://github.com/babel/babel/tree/master/packages/babel-helpers" + "url": "git+https://github.com/babel/babel.git", + "directory": "packages/babel-helpers" }, - "version": "7.5.5" + "version": "7.12.5" } diff --git a/node_modules/@babel/plugin-syntax-object-rest-spread/LICENSE b/node_modules/@babel/plugin-syntax-object-rest-spread/LICENSE index a06ec0e70..f31575ec7 100644 --- a/node_modules/@babel/plugin-syntax-object-rest-spread/LICENSE +++ b/node_modules/@babel/plugin-syntax-object-rest-spread/LICENSE @@ -1,6 +1,6 @@ MIT License -Copyright (c) 2014-2018 Sebastian McKenzie and other contributors +Copyright (c) 2014-present Sebastian McKenzie and other contributors Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the diff --git a/node_modules/@babel/plugin-syntax-object-rest-spread/lib/index.js b/node_modules/@babel/plugin-syntax-object-rest-spread/lib/index.js index a7f33bdd3..225538850 100644 --- a/node_modules/@babel/plugin-syntax-object-rest-spread/lib/index.js +++ b/node_modules/@babel/plugin-syntax-object-rest-spread/lib/index.js @@ -5,17 +5,9 @@ Object.defineProperty(exports, "__esModule", { }); exports.default = void 0; -function _helperPluginUtils() { - const data = require("@babel/helper-plugin-utils"); +var _helperPluginUtils = require("@babel/helper-plugin-utils"); - _helperPluginUtils = function () { - return data; - }; - - return data; -} - -var _default = (0, _helperPluginUtils().declare)(api => { +var _default = (0, _helperPluginUtils.declare)(api => { api.assertVersion(7); return { name: "syntax-object-rest-spread", diff --git a/node_modules/@babel/plugin-syntax-object-rest-spread/package.json b/node_modules/@babel/plugin-syntax-object-rest-spread/package.json index b9fb0af50..fc655c605 100644 --- a/node_modules/@babel/plugin-syntax-object-rest-spread/package.json +++ b/node_modules/@babel/plugin-syntax-object-rest-spread/package.json @@ -1,40 +1,36 @@ { - "_args": [ - [ - "@babel/plugin-syntax-object-rest-spread@7.2.0", - "/Users/drew.heavner/Documents/Github/sign-android-release" - ] - ], - "_development": true, - "_from": "@babel/plugin-syntax-object-rest-spread@7.2.0", - "_id": "@babel/plugin-syntax-object-rest-spread@7.2.0", + "_from": "@babel/plugin-syntax-object-rest-spread@^7.0.0", + "_id": "@babel/plugin-syntax-object-rest-spread@7.8.3", "_inBundle": false, - "_integrity": "sha512-t0JKGgqk2We+9may3t0xDdmneaXmyxq0xieYcKHxIsrJO64n1OiMWNUtc5gQK1PA0NpdCRrtZp4z+IUaKugrSA==", + "_integrity": "sha512-XoqMijGZb9y3y2XskN+P1wUGiVwWZ5JmoDRwx5+3GmEplNyVM2s2Dg8ILFQm8rWM48orGy5YpI5Bl8U1y7ydlA==", "_location": "/@babel/plugin-syntax-object-rest-spread", "_phantomChildren": {}, "_requested": { - "type": "version", + "type": "range", "registry": true, - "raw": "@babel/plugin-syntax-object-rest-spread@7.2.0", + "raw": "@babel/plugin-syntax-object-rest-spread@^7.0.0", "name": "@babel/plugin-syntax-object-rest-spread", "escapedName": "@babel%2fplugin-syntax-object-rest-spread", "scope": "@babel", - "rawSpec": "7.2.0", + "rawSpec": "^7.0.0", "saveSpec": null, - "fetchSpec": "7.2.0" + "fetchSpec": "^7.0.0" }, "_requiredBy": [ "/babel-preset-jest" ], - "_resolved": "https://registry.npmjs.org/@babel/plugin-syntax-object-rest-spread/-/plugin-syntax-object-rest-spread-7.2.0.tgz", - "_spec": "7.2.0", - "_where": "/Users/drew.heavner/Documents/Github/sign-android-release", + "_resolved": "https://registry.npmjs.org/@babel/plugin-syntax-object-rest-spread/-/plugin-syntax-object-rest-spread-7.8.3.tgz", + "_shasum": "60e225edcbd98a640332a2e72dd3e66f1af55871", + "_spec": "@babel/plugin-syntax-object-rest-spread@^7.0.0", + "_where": "/Users/drew.heavner/Documents/Github/sign-android-release/node_modules/babel-preset-jest", + "bundleDependencies": false, "dependencies": { - "@babel/helper-plugin-utils": "^7.0.0" + "@babel/helper-plugin-utils": "^7.8.0" }, + "deprecated": false, "description": "Allow parsing of object rest/spread", "devDependencies": { - "@babel/core": "^7.2.0" + "@babel/core": "^7.8.0" }, "keywords": [ "babel-plugin" @@ -52,5 +48,5 @@ "type": "git", "url": "https://github.com/babel/babel/tree/master/packages/babel-plugin-syntax-object-rest-spread" }, - "version": "7.2.0" + "version": "7.8.3" } diff --git a/node_modules/@cnakazawa/watch/package.json b/node_modules/@cnakazawa/watch/package.json index 173b3a862..c62991d43 100644 --- a/node_modules/@cnakazawa/watch/package.json +++ b/node_modules/@cnakazawa/watch/package.json @@ -1,48 +1,44 @@ { - "_args": [ - [ - "@cnakazawa/watch@1.0.3", - "/Users/drew.heavner/Documents/Github/sign-android-release" - ] - ], - "_development": true, - "_from": "@cnakazawa/watch@1.0.3", - "_id": "@cnakazawa/watch@1.0.3", + "_from": "@cnakazawa/watch@^1.0.3", + "_id": "@cnakazawa/watch@1.0.4", "_inBundle": false, - "_integrity": "sha512-r5160ogAvGyHsal38Kux7YYtodEKOj89RGb28ht1jh3SJb08VwRwAKKJL0bGb04Zd/3r9FL3BFIc3bBidYffCA==", + "_integrity": "sha512-v9kIhKwjeZThiWrLmj0y17CWoyddASLj9O2yvbZkbvw/N3rWOYy9zkV66ursAoVr0mV15bL8g0c4QZUE6cdDoQ==", "_location": "/@cnakazawa/watch", "_phantomChildren": {}, "_requested": { - "type": "version", + "type": "range", "registry": true, - "raw": "@cnakazawa/watch@1.0.3", + "raw": "@cnakazawa/watch@^1.0.3", "name": "@cnakazawa/watch", "escapedName": "@cnakazawa%2fwatch", "scope": "@cnakazawa", - "rawSpec": "1.0.3", + "rawSpec": "^1.0.3", "saveSpec": null, - "fetchSpec": "1.0.3" + "fetchSpec": "^1.0.3" }, "_requiredBy": [ "/sane" ], - "_resolved": "https://registry.npmjs.org/@cnakazawa/watch/-/watch-1.0.3.tgz", - "_spec": "1.0.3", - "_where": "/Users/drew.heavner/Documents/Github/sign-android-release", + "_resolved": "https://registry.npmjs.org/@cnakazawa/watch/-/watch-1.0.4.tgz", + "_shasum": "f864ae85004d0fcab6f50be9141c4da368d1656a", + "_spec": "@cnakazawa/watch@^1.0.3", + "_where": "/Users/drew.heavner/Documents/Github/sign-android-release/node_modules/sane", "author": { "name": "Mikeal Rogers", "email": "mikeal.rogers@gmail.com" }, "bin": { - "watch": "./cli.js" + "watch": "cli.js" }, "bugs": { "url": "https://github.com/mikeal/watch/issues" }, + "bundleDependencies": false, "dependencies": { "exec-sh": "^0.3.2", "minimist": "^1.2.0" }, + "deprecated": false, "description": "Utilities for watching file trees.", "directories": { "lib": "lib" @@ -69,5 +65,5 @@ "release:minor": "bash scripts/release.sh minor", "release:patch": "bash scripts/release.sh patch" }, - "version": "1.0.3" + "version": "1.0.4" } diff --git a/node_modules/@cnakazawa/watch/test/d/d/t b/node_modules/@cnakazawa/watch/test/d/d/t deleted file mode 100644 index e69de29bb..000000000 diff --git a/node_modules/@cnakazawa/watch/test/d/t b/node_modules/@cnakazawa/watch/test/d/t deleted file mode 100644 index e69de29bb..000000000 diff --git a/node_modules/@cnakazawa/watch/test/test_monitor.js b/node_modules/@cnakazawa/watch/test/test_monitor.js deleted file mode 100644 index 59e776da2..000000000 --- a/node_modules/@cnakazawa/watch/test/test_monitor.js +++ /dev/null @@ -1,31 +0,0 @@ -var watch = require('../main') - , assert = require('assert') - , path = require('path') - , fs = require('fs') - , target = path.join(__dirname, "d/t") - ; - -function clearFile() { - fs.writeFileSync(target, '') -} - -clearFile() - -// test if changed event is fired correctly -watch.createMonitor(__dirname, { interval: 150 }, - function (monitor) { - monitor.once('changed', function (f) { - assert.equal(f, target); - clearFile(); - process.exit(0) - }) - - fs.writeFile(target, 'Test Write\n', function (err) { - if (err) throw err; - - setTimeout(function () { - // should have got the other assert done by now - assert.ok(false); - }, 300); - }) -}); diff --git a/node_modules/@cnakazawa/watch/test/test_monitorRootDirectory.js b/node_modules/@cnakazawa/watch/test/test_monitorRootDirectory.js deleted file mode 100644 index e3df59516..000000000 --- a/node_modules/@cnakazawa/watch/test/test_monitorRootDirectory.js +++ /dev/null @@ -1,28 +0,0 @@ -var fs, watch, watch_original; -watch = require('../main'); -watch_original = require('watch'); -fs = require('fs'); - -watch.createMonitor(__dirname, function (monitor) { - monitor.on("created", function (f, stat) { - console.log(f + " created"); - }); - monitor.on("changed", function (f, curr, prev) { - console.log(f + " changed"); - }); - monitor.on("removed", function (f, stat) { - console.log(f + " removed"); - }); -}); - -watch_original.createMonitor(__dirname, function (monitor) { - monitor.on("created", function (f, stat) { - console.log("ORIGINAL: " + f + " created"); - }); - monitor.on("changed", function (f, curr, prev) { - console.log("ORIGINAL: " + f + " changed"); - }); - monitor.on("removed", function (f, stat) { - console.log("ORIGINAL: " + f + " removed"); - }); -}); \ No newline at end of file diff --git a/node_modules/@cnakazawa/watch/test/test_watchTree.js b/node_modules/@cnakazawa/watch/test/test_watchTree.js deleted file mode 100644 index 727b22d3b..000000000 --- a/node_modules/@cnakazawa/watch/test/test_watchTree.js +++ /dev/null @@ -1,23 +0,0 @@ -var fs = require('fs') - , watch = require('../main') - , assert = require('assert') - ; - -// -// Demonstrate that the function of 'filter' is semantically inconsistent with -// usual convention, that returning true means 'keep this'. -// -function isDirOrQ(f, stat) { return stat.isDirectory() || f === 'Q'; } - -watch.watchTree(__dirname, { filter: isDirOrQ }, function (f, curr, prev) { - if (typeof f == 'object' && prev === null && curr === null) { - Object.keys(f).forEach(function(name) { - var stat = f[name]; - assert(isDirOrQ(name, stat)); - }); - - // If the process never exits then `unwatchTree` failed to unwatch all - // the files. - watch.unwatchTree(__dirname); - } -}); diff --git a/node_modules/@jest/core/LICENSE b/node_modules/@jest/core/LICENSE deleted file mode 100644 index 10e779c44..000000000 --- a/node_modules/@jest/core/LICENSE +++ /dev/null @@ -1,23 +0,0 @@ -MIT License - -For Jest software - -Copyright (c) 2014-present, Facebook, Inc. - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/node_modules/@jest/core/README.md b/node_modules/@jest/core/README.md deleted file mode 100644 index 29dd758bb..000000000 --- a/node_modules/@jest/core/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# @jest/core - -Jest is currently working on providing a programmatic API. This is under developemnt, and usage of this package directly is currently not supported. diff --git a/node_modules/@jest/core/build/FailedTestsCache.d.ts b/node_modules/@jest/core/build/FailedTestsCache.d.ts deleted file mode 100644 index d69cc59a6..000000000 --- a/node_modules/@jest/core/build/FailedTestsCache.d.ts +++ /dev/null @@ -1,16 +0,0 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -import { Test } from 'jest-runner'; -import { Config } from '@jest/types'; -import { TestResult } from '@jest/test-result'; -export default class FailedTestsCache { - private _enabledTestsMap?; - filterTests(tests: Array): Array; - setTestResults(testResults: Array): void; - updateConfig(globalConfig: Config.GlobalConfig): Config.GlobalConfig; -} -//# sourceMappingURL=FailedTestsCache.d.ts.map \ No newline at end of file diff --git a/node_modules/@jest/core/build/FailedTestsCache.d.ts.map b/node_modules/@jest/core/build/FailedTestsCache.d.ts.map deleted file mode 100644 index a7733b17c..000000000 --- a/node_modules/@jest/core/build/FailedTestsCache.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"FailedTestsCache.d.ts","sourceRoot":"","sources":["../src/FailedTestsCache.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAC,IAAI,EAAC,MAAM,aAAa,CAAC;AACjC,OAAO,EAAC,MAAM,EAAC,MAAM,aAAa,CAAC;AACnC,OAAO,EAAC,UAAU,EAAC,MAAM,mBAAmB,CAAC;AAI7C,MAAM,CAAC,OAAO,OAAO,gBAAgB;IACnC,OAAO,CAAC,gBAAgB,CAAC,CAAU;IAEnC,WAAW,CAAC,KAAK,EAAE,KAAK,CAAC,IAAI,CAAC,GAAG,KAAK,CAAC,IAAI,CAAC;IAS5C,cAAc,CAAC,WAAW,EAAE,KAAK,CAAC,UAAU,CAAC;IAmB7C,YAAY,CAAC,YAAY,EAAE,MAAM,CAAC,YAAY,GAAG,MAAM,CAAC,YAAY;CAQrE"} \ No newline at end of file diff --git a/node_modules/@jest/core/build/FailedTestsCache.js b/node_modules/@jest/core/build/FailedTestsCache.js deleted file mode 100644 index a062afc4a..000000000 --- a/node_modules/@jest/core/build/FailedTestsCache.js +++ /dev/null @@ -1,88 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, '__esModule', { - value: true -}); -exports.default = void 0; - -function _objectSpread(target) { - for (var i = 1; i < arguments.length; i++) { - var source = arguments[i] != null ? arguments[i] : {}; - var ownKeys = Object.keys(source); - if (typeof Object.getOwnPropertySymbols === 'function') { - ownKeys = ownKeys.concat( - Object.getOwnPropertySymbols(source).filter(function(sym) { - return Object.getOwnPropertyDescriptor(source, sym).enumerable; - }) - ); - } - ownKeys.forEach(function(key) { - _defineProperty(target, key, source[key]); - }); - } - return target; -} - -function _defineProperty(obj, key, value) { - if (key in obj) { - Object.defineProperty(obj, key, { - value: value, - enumerable: true, - configurable: true, - writable: true - }); - } else { - obj[key] = value; - } - return obj; -} - -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -class FailedTestsCache { - constructor() { - _defineProperty(this, '_enabledTestsMap', void 0); - } - - filterTests(tests) { - const enabledTestsMap = this._enabledTestsMap; - - if (!enabledTestsMap) { - return tests; - } - - return tests.filter(testResult => enabledTestsMap[testResult.path]); - } - - setTestResults(testResults) { - this._enabledTestsMap = (testResults || []) - .filter(testResult => testResult.numFailingTests) - .reduce((suiteMap, testResult) => { - suiteMap[testResult.testFilePath] = testResult.testResults - .filter(test => test.status === 'failed') - .reduce((testMap, test) => { - testMap[test.fullName] = true; - return testMap; - }, {}); - return suiteMap; - }, {}); - this._enabledTestsMap = Object.freeze(this._enabledTestsMap); - } - - updateConfig(globalConfig) { - if (!this._enabledTestsMap) { - return globalConfig; - } - - const newConfig = _objectSpread({}, globalConfig); - - newConfig.enabledTestsMap = this._enabledTestsMap; - return Object.freeze(newConfig); - } -} - -exports.default = FailedTestsCache; diff --git a/node_modules/@jest/core/build/ReporterDispatcher.d.ts b/node_modules/@jest/core/build/ReporterDispatcher.d.ts deleted file mode 100644 index b96046ba7..000000000 --- a/node_modules/@jest/core/build/ReporterDispatcher.d.ts +++ /dev/null @@ -1,23 +0,0 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -import { AggregatedResult, TestResult } from '@jest/test-result'; -import { Test } from 'jest-runner'; -import { Context } from 'jest-runtime'; -import { Reporter, ReporterOnStartOptions } from '@jest/reporters'; -export default class ReporterDispatcher { - private _reporters; - constructor(); - register(reporter: Reporter): void; - unregister(ReporterClass: Function): void; - onTestResult(test: Test, testResult: TestResult, results: AggregatedResult): Promise; - onTestStart(test: Test): Promise; - onRunStart(results: AggregatedResult, options: ReporterOnStartOptions): Promise; - onRunComplete(contexts: Set, results: AggregatedResult): Promise; - getErrors(): Array; - hasErrors(): boolean; -} -//# sourceMappingURL=ReporterDispatcher.d.ts.map \ No newline at end of file diff --git a/node_modules/@jest/core/build/ReporterDispatcher.d.ts.map b/node_modules/@jest/core/build/ReporterDispatcher.d.ts.map deleted file mode 100644 index 2f696215d..000000000 --- a/node_modules/@jest/core/build/ReporterDispatcher.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"ReporterDispatcher.d.ts","sourceRoot":"","sources":["../src/ReporterDispatcher.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAC,gBAAgB,EAAE,UAAU,EAAC,MAAM,mBAAmB,CAAC;AAC/D,OAAO,EAAC,IAAI,EAAC,MAAM,aAAa,CAAC;AACjC,OAAO,EAAC,OAAO,EAAC,MAAM,cAAc,CAAC;AACrC,OAAO,EAAC,QAAQ,EAAE,sBAAsB,EAAC,MAAM,iBAAiB,CAAC;AAEjE,MAAM,CAAC,OAAO,OAAO,kBAAkB;IACrC,OAAO,CAAC,UAAU,CAAkB;;IAMpC,QAAQ,CAAC,QAAQ,EAAE,QAAQ,GAAG,IAAI;IAIlC,UAAU,CAAC,aAAa,EAAE,QAAQ;IAM5B,YAAY,CAChB,IAAI,EAAE,IAAI,EACV,UAAU,EAAE,UAAU,EACtB,OAAO,EAAE,gBAAgB;IAarB,WAAW,CAAC,IAAI,EAAE,IAAI;IAMtB,UAAU,CAAC,OAAO,EAAE,gBAAgB,EAAE,OAAO,EAAE,sBAAsB;IAMrE,aAAa,CAAC,QAAQ,EAAE,GAAG,CAAC,OAAO,CAAC,EAAE,OAAO,EAAE,gBAAgB;IAQrE,SAAS,IAAI,KAAK,CAAC,KAAK,CAAC;IAOzB,SAAS,IAAI,OAAO;CAGrB"} \ No newline at end of file diff --git a/node_modules/@jest/core/build/ReporterDispatcher.js b/node_modules/@jest/core/build/ReporterDispatcher.js deleted file mode 100644 index c385b6fd7..000000000 --- a/node_modules/@jest/core/build/ReporterDispatcher.js +++ /dev/null @@ -1,231 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, '__esModule', { - value: true -}); -exports.default = void 0; - -function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { - try { - var info = gen[key](arg); - var value = info.value; - } catch (error) { - reject(error); - return; - } - if (info.done) { - resolve(value); - } else { - Promise.resolve(value).then(_next, _throw); - } -} - -function _asyncToGenerator(fn) { - return function() { - var self = this, - args = arguments; - return new Promise(function(resolve, reject) { - var gen = fn.apply(self, args); - function _next(value) { - asyncGeneratorStep(gen, resolve, reject, _next, _throw, 'next', value); - } - function _throw(err) { - asyncGeneratorStep(gen, resolve, reject, _next, _throw, 'throw', err); - } - _next(undefined); - }); - }; -} - -function _defineProperty(obj, key, value) { - if (key in obj) { - Object.defineProperty(obj, key, { - value: value, - enumerable: true, - configurable: true, - writable: true - }); - } else { - obj[key] = value; - } - return obj; -} - -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -class ReporterDispatcher { - constructor() { - _defineProperty(this, '_reporters', void 0); - - this._reporters = []; - } - - register(reporter) { - this._reporters.push(reporter); - } - - unregister(ReporterClass) { - this._reporters = this._reporters.filter( - reporter => !(reporter instanceof ReporterClass) - ); - } - - onTestResult(test, testResult, results) { - var _this = this; - - return _asyncToGenerator(function*() { - var _iteratorNormalCompletion = true; - var _didIteratorError = false; - var _iteratorError = undefined; - - try { - for ( - var _iterator = _this._reporters[Symbol.iterator](), _step; - !(_iteratorNormalCompletion = (_step = _iterator.next()).done); - _iteratorNormalCompletion = true - ) { - const reporter = _step.value; - reporter.onTestResult && - (yield reporter.onTestResult(test, testResult, results)); - } // Release memory if unused later. - } catch (err) { - _didIteratorError = true; - _iteratorError = err; - } finally { - try { - if (!_iteratorNormalCompletion && _iterator.return != null) { - _iterator.return(); - } - } finally { - if (_didIteratorError) { - throw _iteratorError; - } - } - } - - testResult.sourceMaps = undefined; - testResult.coverage = undefined; - testResult.console = undefined; - })(); - } - - onTestStart(test) { - var _this2 = this; - - return _asyncToGenerator(function*() { - var _iteratorNormalCompletion2 = true; - var _didIteratorError2 = false; - var _iteratorError2 = undefined; - - try { - for ( - var _iterator2 = _this2._reporters[Symbol.iterator](), _step2; - !(_iteratorNormalCompletion2 = (_step2 = _iterator2.next()).done); - _iteratorNormalCompletion2 = true - ) { - const reporter = _step2.value; - reporter.onTestStart && (yield reporter.onTestStart(test)); - } - } catch (err) { - _didIteratorError2 = true; - _iteratorError2 = err; - } finally { - try { - if (!_iteratorNormalCompletion2 && _iterator2.return != null) { - _iterator2.return(); - } - } finally { - if (_didIteratorError2) { - throw _iteratorError2; - } - } - } - })(); - } - - onRunStart(results, options) { - var _this3 = this; - - return _asyncToGenerator(function*() { - var _iteratorNormalCompletion3 = true; - var _didIteratorError3 = false; - var _iteratorError3 = undefined; - - try { - for ( - var _iterator3 = _this3._reporters[Symbol.iterator](), _step3; - !(_iteratorNormalCompletion3 = (_step3 = _iterator3.next()).done); - _iteratorNormalCompletion3 = true - ) { - const reporter = _step3.value; - reporter.onRunStart && (yield reporter.onRunStart(results, options)); - } - } catch (err) { - _didIteratorError3 = true; - _iteratorError3 = err; - } finally { - try { - if (!_iteratorNormalCompletion3 && _iterator3.return != null) { - _iterator3.return(); - } - } finally { - if (_didIteratorError3) { - throw _iteratorError3; - } - } - } - })(); - } - - onRunComplete(contexts, results) { - var _this4 = this; - - return _asyncToGenerator(function*() { - var _iteratorNormalCompletion4 = true; - var _didIteratorError4 = false; - var _iteratorError4 = undefined; - - try { - for ( - var _iterator4 = _this4._reporters[Symbol.iterator](), _step4; - !(_iteratorNormalCompletion4 = (_step4 = _iterator4.next()).done); - _iteratorNormalCompletion4 = true - ) { - const reporter = _step4.value; - reporter.onRunComplete && - (yield reporter.onRunComplete(contexts, results)); - } - } catch (err) { - _didIteratorError4 = true; - _iteratorError4 = err; - } finally { - try { - if (!_iteratorNormalCompletion4 && _iterator4.return != null) { - _iterator4.return(); - } - } finally { - if (_didIteratorError4) { - throw _iteratorError4; - } - } - } - })(); - } // Return a list of last errors for every reporter - - getErrors() { - return this._reporters.reduce((list, reporter) => { - const error = reporter.getLastError && reporter.getLastError(); - return error ? list.concat(error) : list; - }, []); - } - - hasErrors() { - return this.getErrors().length !== 0; - } -} - -exports.default = ReporterDispatcher; diff --git a/node_modules/@jest/core/build/SearchSource.d.ts b/node_modules/@jest/core/build/SearchSource.d.ts deleted file mode 100644 index 75fe40547..000000000 --- a/node_modules/@jest/core/build/SearchSource.d.ts +++ /dev/null @@ -1,43 +0,0 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -import { Context } from 'jest-runtime'; -import { Config } from '@jest/types'; -import { Test } from 'jest-runner'; -import { ChangedFiles } from 'jest-changed-files'; -import { Filter, Stats } from './types'; -export declare type SearchResult = { - noSCM?: boolean; - stats?: Stats; - collectCoverageFrom?: Set; - tests: Array; - total?: number; -}; -export declare type TestSelectionConfig = { - input?: string; - findRelatedTests?: boolean; - onlyChanged?: boolean; - paths?: Array; - shouldTreatInputAsPattern?: boolean; - testPathPattern?: string; - watch?: boolean; -}; -export default class SearchSource { - private _context; - private _testPathCases; - constructor(context: Context); - private _filterTestPathsWithStats; - private _getAllTestPaths; - isTestFilePath(path: Config.Path): boolean; - findMatchingTests(testPathPattern?: string): SearchResult; - findRelatedTests(allPaths: Set, collectCoverage: boolean): SearchResult; - findTestsByPaths(paths: Array): SearchResult; - findRelatedTestsFromPattern(paths: Array, collectCoverage: boolean): SearchResult; - findTestRelatedToChangedFiles(changedFilesInfo: ChangedFiles, collectCoverage: boolean): SearchResult; - private _getTestPaths; - getTestPaths(globalConfig: Config.GlobalConfig, changedFiles: ChangedFiles | undefined, filter?: Filter): Promise; -} -//# sourceMappingURL=SearchSource.d.ts.map \ No newline at end of file diff --git a/node_modules/@jest/core/build/SearchSource.d.ts.map b/node_modules/@jest/core/build/SearchSource.d.ts.map deleted file mode 100644 index a1c4c30ba..000000000 --- a/node_modules/@jest/core/build/SearchSource.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"SearchSource.d.ts","sourceRoot":"","sources":["../src/SearchSource.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAIH,OAAO,EAAC,OAAO,EAAC,MAAM,cAAc,CAAC;AACrC,OAAO,EAAC,MAAM,EAAC,MAAM,aAAa,CAAC;AACnC,OAAO,EAAC,IAAI,EAAC,MAAM,aAAa,CAAC;AACjC,OAAO,EAAC,Y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C,EACzB,eAAe,EAAE,OAAO,GACvB,YAAY;IAUf,6BAA6B,CAC3B,gBAAgB,EAAE,YAAY,EAC9B,eAAe,EAAE,OAAO;IAY1B,OAAO,CAAC,aAAa;IA6Bf,YAAY,CAChB,YAAY,EAAE,MAAM,CAAC,YAAY,EACjC,YAAY,EAAE,YAAY,GAAG,SAAS,EACtC,MAAM,CAAC,EAAE,MAAM,GACd,OAAO,CAAC,YAAY,CAAC;CA4BzB"} \ No newline at end of file diff --git a/node_modules/@jest/core/build/SearchSource.js b/node_modules/@jest/core/build/SearchSource.js deleted file mode 100644 index 624b16a90..000000000 --- a/node_modules/@jest/core/build/SearchSource.js +++ /dev/null @@ -1,425 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, '__esModule', { - value: true -}); -exports.default = void 0; - -function _path() { - const data = _interopRequireDefault(require('path')); - - _path = function _path() { - return data; - }; - - return data; -} - -function _micromatch() { - const data = _interopRequireDefault(require('micromatch')); - - _micromatch = function _micromatch() { - return data; - }; - - return data; -} - -function _jestResolveDependencies() { - const data = _interopRequireDefault(require('jest-resolve-dependencies')); - - _jestResolveDependencies = function _jestResolveDependencies() { - return data; - }; - - return data; -} - -function _jestRegexUtil() { - const data = require('jest-regex-util'); - - _jestRegexUtil = function _jestRegexUtil() { - return data; - }; - - return data; -} - -function _jestConfig() { - const data = require('jest-config'); - - _jestConfig = function _jestConfig() { - return data; - }; - - return data; -} - -function _jestSnapshot() { - const data = require('jest-snapshot'); - - _jestSnapshot = function _jestSnapshot() { - return data; - }; - - return data; -} - -function _jestUtil() { - const data = require('jest-util'); - - _jestUtil = function _jestUtil() { - return data; - }; - - return data; -} - -function _interopRequireDefault(obj) { - return obj && obj.__esModule ? obj : {default: obj}; -} - -function _objectSpread(target) { - for (var i = 1; i < arguments.length; i++) { - var source = arguments[i] != null ? arguments[i] : {}; - var ownKeys = Object.keys(source); - if (typeof Object.getOwnPropertySymbols === 'function') { - ownKeys = ownKeys.concat( - Object.getOwnPropertySymbols(source).filter(function(sym) { - return Object.getOwnPropertyDescriptor(source, sym).enumerable; - }) - ); - } - ownKeys.forEach(function(key) { - _defineProperty(target, key, source[key]); - }); - } - return target; -} - -function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { - try { - var info = gen[key](arg); - var value = info.value; - } catch (error) { - reject(error); - return; - } - if (info.done) { - resolve(value); - } else { - Promise.resolve(value).then(_next, _throw); - } -} - -function _asyncToGenerator(fn) { - return function() { - var self = this, - args = arguments; - return new Promise(function(resolve, reject) { - var gen = fn.apply(self, args); - function _next(value) { - asyncGeneratorStep(gen, resolve, reject, _next, _throw, 'next', value); - } - function _throw(err) { - asyncGeneratorStep(gen, resolve, reject, _next, _throw, 'throw', err); - } - _next(undefined); - }); - }; -} - -function _defineProperty(obj, key, value) { - if (key in obj) { - Object.defineProperty(obj, key, { - value: value, - enumerable: true, - configurable: true, - writable: true - }); - } else { - obj[key] = value; - } - return obj; -} - -const globsToMatcher = globs => path => - _micromatch().default.some( - (0, _jestUtil().replacePathSepForGlob)(path), - globs, - { - dot: true - } - ); - -const regexToMatcher = testRegex => path => - testRegex.some(testRegex => new RegExp(testRegex).test(path)); - -const toTests = (context, tests) => - tests.map(path => ({ - context, - duration: undefined, - path - })); - -class SearchSource { - constructor(context) { - _defineProperty(this, '_context', void 0); - - _defineProperty(this, '_testPathCases', []); - - const config = context.config; - this._context = context; - const rootPattern = new RegExp( - config.roots - .map(dir => - (0, _jestRegexUtil().escapePathForRegex)(dir + _path().default.sep) - ) - .join('|') - ); - - this._testPathCases.push({ - isMatch: path => rootPattern.test(path), - stat: 'roots' - }); - - if (config.testMatch.length) { - this._testPathCases.push({ - isMatch: globsToMatcher(config.testMatch), - stat: 'testMatch' - }); - } - - if (config.testPathIgnorePatterns.length) { - const testIgnorePatternsRegex = new RegExp( - config.testPathIgnorePatterns.join('|') - ); - - this._testPathCases.push({ - isMatch: path => !testIgnorePatternsRegex.test(path), - stat: 'testPathIgnorePatterns' - }); - } - - if (config.testRegex.length) { - this._testPathCases.push({ - isMatch: regexToMatcher(config.testRegex), - stat: 'testRegex' - }); - } - } - - _filterTestPathsWithStats(allPaths, testPathPattern) { - const data = { - stats: { - roots: 0, - testMatch: 0, - testPathIgnorePatterns: 0, - testRegex: 0 - }, - tests: [], - total: allPaths.length - }; - const testCases = Array.from(this._testPathCases); // clone - - if (testPathPattern) { - const regex = (0, _jestUtil().testPathPatternToRegExp)(testPathPattern); - testCases.push({ - isMatch: path => regex.test(path), - stat: 'testPathPattern' - }); - data.stats.testPathPattern = 0; - } - - data.tests = allPaths.filter(test => { - let filterResult = true; - - for (var _i = 0; _i < testCases.length; _i++) { - const _testCases$_i = testCases[_i], - isMatch = _testCases$_i.isMatch, - stat = _testCases$_i.stat; - - if (isMatch(test.path)) { - data.stats[stat]++; - } else { - filterResult = false; - } - } - - return filterResult; - }); - return data; - } - - _getAllTestPaths(testPathPattern) { - return this._filterTestPathsWithStats( - toTests(this._context, this._context.hasteFS.getAllFiles()), - testPathPattern - ); - } - - isTestFilePath(path) { - return this._testPathCases.every(testCase => testCase.isMatch(path)); - } - - findMatchingTests(testPathPattern) { - return this._getAllTestPaths(testPathPattern); - } - - findRelatedTests(allPaths, collectCoverage) { - const dependencyResolver = new (_jestResolveDependencies()).default( - this._context.resolver, - this._context.hasteFS, - (0, _jestSnapshot().buildSnapshotResolver)(this._context.config) - ); - - if (!collectCoverage) { - return { - tests: toTests( - this._context, - dependencyResolver.resolveInverse( - allPaths, - this.isTestFilePath.bind(this), - { - skipNodeResolution: this._context.config.skipNodeResolution - } - ) - ) - }; - } - - const testModulesMap = dependencyResolver.resolveInverseModuleMap( - allPaths, - this.isTestFilePath.bind(this), - { - skipNodeResolution: this._context.config.skipNodeResolution - } - ); - const allPathsAbsolute = Array.from(allPaths).map(p => - _path().default.resolve(p) - ); - const collectCoverageFrom = new Set(); - testModulesMap.forEach(testModule => { - if (!testModule.dependencies) { - return; - } - - testModule.dependencies - .filter(p => allPathsAbsolute.includes(p)) - .map(filename => { - filename = (0, _jestConfig().replaceRootDirInPath)( - this._context.config.rootDir, - filename - ); - return _path().default.isAbsolute(filename) - ? _path().default.relative(this._context.config.rootDir, filename) - : filename; - }) - .forEach(filename => collectCoverageFrom.add(filename)); - }); - return { - collectCoverageFrom, - tests: toTests( - this._context, - testModulesMap.map(testModule => testModule.file) - ) - }; - } - - findTestsByPaths(paths) { - return { - tests: toTests( - this._context, - paths - .map(p => _path().default.resolve(this._context.config.cwd, p)) - .filter(this.isTestFilePath.bind(this)) - ) - }; - } - - findRelatedTestsFromPattern(paths, collectCoverage) { - if (Array.isArray(paths) && paths.length) { - const resolvedPaths = paths.map(p => - _path().default.resolve(this._context.config.cwd, p) - ); - return this.findRelatedTests(new Set(resolvedPaths), collectCoverage); - } - - return { - tests: [] - }; - } - - findTestRelatedToChangedFiles(changedFilesInfo, collectCoverage) { - const repos = changedFilesInfo.repos, - changedFiles = changedFilesInfo.changedFiles; // no SCM (git/hg/...) is found in any of the roots. - - const noSCM = Object.keys(repos).every(scm => repos[scm].size === 0); - return noSCM - ? { - noSCM: true, - tests: [] - } - : this.findRelatedTests(changedFiles, collectCoverage); - } - - _getTestPaths(globalConfig, changedFiles) { - const paths = globalConfig.nonFlagArgs; - - if (globalConfig.onlyChanged) { - if (!changedFiles) { - throw new Error('Changed files must be set when running with -o.'); - } - - return this.findTestRelatedToChangedFiles( - changedFiles, - globalConfig.collectCoverage - ); - } else if (globalConfig.runTestsByPath && paths && paths.length) { - return this.findTestsByPaths(paths); - } else if (globalConfig.findRelatedTests && paths && paths.length) { - return this.findRelatedTestsFromPattern( - paths, - globalConfig.collectCoverage - ); - } else if (globalConfig.testPathPattern != null) { - return this.findMatchingTests(globalConfig.testPathPattern); - } else { - return { - tests: [] - }; - } - } - - getTestPaths(globalConfig, changedFiles, filter) { - var _this = this; - - return _asyncToGenerator(function*() { - const searchResult = _this._getTestPaths(globalConfig, changedFiles); - - const filterPath = globalConfig.filter; - - if (filter) { - const tests = searchResult.tests; - const filterResult = yield filter(tests.map(test => test.path)); - - if (!Array.isArray(filterResult.filtered)) { - throw new Error( - `Filter ${filterPath} did not return a valid test list` - ); - } - - const filteredSet = new Set( - filterResult.filtered.map(result => result.test) - ); - return _objectSpread({}, searchResult, { - tests: tests.filter(test => filteredSet.has(test.path)) - }); - } - - return searchResult; - })(); - } -} - -exports.default = SearchSource; diff --git a/node_modules/@jest/core/build/SnapshotInteractiveMode.d.ts b/node_modules/@jest/core/build/SnapshotInteractiveMode.d.ts deleted file mode 100644 index eb8ed0704..000000000 --- a/node_modules/@jest/core/build/SnapshotInteractiveMode.d.ts +++ /dev/null @@ -1,32 +0,0 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. An additional grant - * of patent rights can be found in the PATENTS file in the same directory. - */ -/// -import { AggregatedResult, AssertionLocation } from '@jest/test-result'; -export default class SnapshotInteractiveMode { - private _pipe; - private _isActive; - private _updateTestRunnerConfig; - private _testAssertions; - private _countPaths; - private _skippedNum; - constructor(pipe: NodeJS.WritableStream); - isActive(): boolean; - getSkippedNum(): number; - private _clearTestSummary; - private _drawUIProgress; - private _drawUIDoneWithSkipped; - private _drawUIDone; - private _drawUIOverlay; - put(key: string): void; - abort(): void; - restart(): void; - updateWithResults(results: AggregatedResult): void; - private _run; - run(failedSnapshotTestAssertions: Array, onConfigChange: (assertion: AssertionLocation | null, shouldUpdateSnapshot: boolean) => unknown): void; -} -//# sourceMappingURL=SnapshotInteractiveMode.d.ts.map \ No newline at end of file diff --git a/node_modules/@jest/core/build/SnapshotInteractiveMode.d.ts.map b/node_modules/@jest/core/build/SnapshotInteractiveMode.d.ts.map deleted file mode 100644 index 91365e352..000000000 --- a/node_modules/@jest/core/build/SnapshotInteractiveMode.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"SnapshotInteractiveMode.d.ts","sourceRoot":"","sources":["../src/SnapshotInteractiveMode.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;;AAIH,OAAO,EAAC,gBAAgB,EAAE,iBAAiB,EAAC,MAAM,mBAAmB,CAAC;AAMtE,MAAM,CAAC,OAAO,OAAO,uBAAuB;IAC1C,OAAO,CAAC,KAAK,CAAwB;IACrC,OAAO,CAAC,SAAS,CAAU;IAC3B,OAAO,CAAC,uBAAuB,CAGlB;IACb,OAAO,CAAC,eAAe,CAA4B;IACnD,OAAO,CAAC,WAAW,CAAU;IAC7B,OAAO,CAAC,WAAW,CAAS;gBAEhB,IAAI,EAAE,MAAM,CAAC,cAAc;IAMvC,QAAQ;IAIR,aAAa;IAIb,OAAO,CAAC,iBAAiB;IAKzB,OAAO,CAAC,eAAe;IA0CvB,OAAO,CAAC,sBAAsB;IAiC9B,OAAO,CAAC,WAAW;IAwBnB,OAAO,CAAC,cAAc;IAYtB,GAAG,CAAC,GAAG,EAAE,MAAM;IAqCf,KAAK;IAML,OAAO;IAMP,iBAAiB,CAAC,OAAO,EAAE,gBAAgB;IAiB3C,OAAO,CAAC,IAAI;IAKZ,GAAG,CACD,4BAA4B,EAAE,KAAK,CAAC,iBAAiB,CAAC,EACtD,cAAc,EAAE,CACd,SAAS,EAAE,iBAAiB,GAAG,IAAI,EACnC,oBAAoB,EAAE,OAAO,KAC1B,OAAO;CAYf"} \ No newline at end of file diff --git a/node_modules/@jest/core/build/SnapshotInteractiveMode.js b/node_modules/@jest/core/build/SnapshotInteractiveMode.js deleted file mode 100644 index a83386e76..000000000 --- a/node_modules/@jest/core/build/SnapshotInteractiveMode.js +++ /dev/null @@ -1,328 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, '__esModule', { - value: true -}); -exports.default = void 0; - -function _chalk() { - const data = _interopRequireDefault(require('chalk')); - - _chalk = function _chalk() { - return data; - }; - - return data; -} - -function _ansiEscapes() { - const data = _interopRequireDefault(require('ansi-escapes')); - - _ansiEscapes = function _ansiEscapes() { - return data; - }; - - return data; -} - -function _jestWatcher() { - const data = require('jest-watcher'); - - _jestWatcher = function _jestWatcher() { - return data; - }; - - return data; -} - -function _jestUtil() { - const data = require('jest-util'); - - _jestUtil = function _jestUtil() { - return data; - }; - - return data; -} - -function _interopRequireDefault(obj) { - return obj && obj.__esModule ? obj : {default: obj}; -} - -function _defineProperty(obj, key, value) { - if (key in obj) { - Object.defineProperty(obj, key, { - value: value, - enumerable: true, - configurable: true, - writable: true - }); - } else { - obj[key] = value; - } - return obj; -} - -const ARROW = _jestUtil().specialChars.ARROW, - CLEAR = _jestUtil().specialChars.CLEAR; - -class SnapshotInteractiveMode { - constructor(pipe) { - _defineProperty(this, '_pipe', void 0); - - _defineProperty(this, '_isActive', void 0); - - _defineProperty(this, '_updateTestRunnerConfig', void 0); - - _defineProperty(this, '_testAssertions', void 0); - - _defineProperty(this, '_countPaths', void 0); - - _defineProperty(this, '_skippedNum', void 0); - - this._pipe = pipe; - this._isActive = false; - this._skippedNum = 0; - } - - isActive() { - return this._isActive; - } - - getSkippedNum() { - return this._skippedNum; - } - - _clearTestSummary() { - this._pipe.write(_ansiEscapes().default.cursorUp(6)); - - this._pipe.write(_ansiEscapes().default.eraseDown); - } - - _drawUIProgress() { - this._clearTestSummary(); - - const numPass = this._countPaths - this._testAssertions.length; - const numRemaining = this._countPaths - numPass - this._skippedNum; - - let stats = _chalk().default.bold.dim( - (0, _jestUtil().pluralize)('snapshot', numRemaining) + ' remaining' - ); - - if (numPass) { - stats += - ', ' + - _chalk().default.bold.green( - (0, _jestUtil().pluralize)('snapshot', numPass) + ' updated' - ); - } - - if (this._skippedNum) { - stats += - ', ' + - _chalk().default.bold.yellow( - (0, _jestUtil().pluralize)('snapshot', this._skippedNum) + ' skipped' - ); - } - - const messages = [ - '\n' + _chalk().default.bold('Interactive Snapshot Progress'), - ARROW + stats, - '\n' + _chalk().default.bold('Watch Usage'), - _chalk().default.dim(ARROW + 'Press ') + - 'u' + - _chalk().default.dim(' to update failing snapshots for this test.'), - _chalk().default.dim(ARROW + 'Press ') + - 's' + - _chalk().default.dim(' to skip the current test.'), - _chalk().default.dim(ARROW + 'Press ') + - 'q' + - _chalk().default.dim(' to quit Interactive Snapshot Mode.'), - _chalk().default.dim(ARROW + 'Press ') + - 'Enter' + - _chalk().default.dim(' to trigger a test run.') - ]; - - this._pipe.write(messages.filter(Boolean).join('\n') + '\n'); - } - - _drawUIDoneWithSkipped() { - this._pipe.write(CLEAR); - - const numPass = this._countPaths - this._testAssertions.length; - - let stats = _chalk().default.bold.dim( - (0, _jestUtil().pluralize)('snapshot', this._countPaths) + ' reviewed' - ); - - if (numPass) { - stats += - ', ' + - _chalk().default.bold.green( - (0, _jestUtil().pluralize)('snapshot', numPass) + ' updated' - ); - } - - if (this._skippedNum) { - stats += - ', ' + - _chalk().default.bold.yellow( - (0, _jestUtil().pluralize)('snapshot', this._skippedNum) + ' skipped' - ); - } - - const messages = [ - '\n' + _chalk().default.bold('Interactive Snapshot Result'), - ARROW + stats, - '\n' + _chalk().default.bold('Watch Usage'), - _chalk().default.dim(ARROW + 'Press ') + - 'r' + - _chalk().default.dim(' to restart Interactive Snapshot Mode.'), - _chalk().default.dim(ARROW + 'Press ') + - 'q' + - _chalk().default.dim(' to quit Interactive Snapshot Mode.') - ]; - - this._pipe.write(messages.filter(Boolean).join('\n') + '\n'); - } - - _drawUIDone() { - this._pipe.write(CLEAR); - - const numPass = this._countPaths - this._testAssertions.length; - - let stats = _chalk().default.bold.dim( - (0, _jestUtil().pluralize)('snapshot', this._countPaths) + ' reviewed' - ); - - if (numPass) { - stats += - ', ' + - _chalk().default.bold.green( - (0, _jestUtil().pluralize)('snapshot', numPass) + ' updated' - ); - } - - const messages = [ - '\n' + _chalk().default.bold('Interactive Snapshot Result'), - ARROW + stats, - '\n' + _chalk().default.bold('Watch Usage'), - _chalk().default.dim(ARROW + 'Press ') + - 'Enter' + - _chalk().default.dim(' to return to watch mode.') - ]; - - this._pipe.write(messages.filter(Boolean).join('\n') + '\n'); - } - - _drawUIOverlay() { - if (this._testAssertions.length === 0) { - return this._drawUIDone(); - } - - if (this._testAssertions.length - this._skippedNum === 0) { - return this._drawUIDoneWithSkipped(); - } - - return this._drawUIProgress(); - } - - put(key) { - switch (key) { - case 's': - if (this._skippedNum === this._testAssertions.length) break; - this._skippedNum += 1; // move skipped test to the end - - this._testAssertions.push(this._testAssertions.shift()); - - if (this._testAssertions.length - this._skippedNum > 0) { - this._run(false); - } else { - this._drawUIDoneWithSkipped(); - } - - break; - - case 'u': - this._run(true); - - break; - - case 'q': - case _jestWatcher().KEYS.ESCAPE: - this.abort(); - break; - - case 'r': - this.restart(); - break; - - case _jestWatcher().KEYS.ENTER: - if (this._testAssertions.length === 0) { - this.abort(); - } else { - this._run(false); - } - - break; - - default: - break; - } - } - - abort() { - this._isActive = false; - this._skippedNum = 0; - - this._updateTestRunnerConfig(null, false); - } - - restart() { - this._skippedNum = 0; - this._countPaths = this._testAssertions.length; - - this._run(false); - } - - updateWithResults(results) { - const hasSnapshotFailure = !!results.snapshot.failure; - - if (hasSnapshotFailure) { - this._drawUIOverlay(); - - return; - } - - this._testAssertions.shift(); - - if (this._testAssertions.length - this._skippedNum === 0) { - this._drawUIOverlay(); - - return; - } // Go to the next test - - this._run(false); - } - - _run(shouldUpdateSnapshot) { - const testAssertion = this._testAssertions[0]; - - this._updateTestRunnerConfig(testAssertion, shouldUpdateSnapshot); - } - - run(failedSnapshotTestAssertions, onConfigChange) { - if (!failedSnapshotTestAssertions.length) { - return; - } - - this._testAssertions = [...failedSnapshotTestAssertions]; - this._countPaths = this._testAssertions.length; - this._updateTestRunnerConfig = onConfigChange; - this._isActive = true; - - this._run(false); - } -} - -exports.default = SnapshotInteractiveMode; diff --git a/node_modules/@jest/core/build/TestNamePatternPrompt.d.ts b/node_modules/@jest/core/build/TestNamePatternPrompt.d.ts deleted file mode 100644 index 357d363d8..000000000 --- a/node_modules/@jest/core/build/TestNamePatternPrompt.d.ts +++ /dev/null @@ -1,18 +0,0 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -/// -import { PatternPrompt, Prompt, ScrollOptions } from 'jest-watcher'; -import { TestResult } from '@jest/test-result'; -export default class TestNamePatternPrompt extends PatternPrompt { - _cachedTestResults: Array; - constructor(pipe: NodeJS.WritableStream, prompt: Prompt); - _onChange(pattern: string, options: ScrollOptions): void; - _printPrompt(pattern: string): void; - _getMatchedTests(pattern: string): string[]; - updateCachedTestResults(testResults?: Array): void; -} -//# sourceMappingURL=TestNamePatternPrompt.d.ts.map \ No newline at end of file diff --git a/node_modules/@jest/core/build/TestNamePatternPrompt.d.ts.map b/node_modules/@jest/core/build/TestNamePatternPrompt.d.ts.map deleted file mode 100644 index 41e3ebf20..000000000 --- a/node_modules/@jest/core/build/TestNamePatternPrompt.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"TestNamePatternPrompt.d.ts","sourceRoot":"","sources":["../src/TestNamePatternPrompt.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;;AAEH,OAAO,EACL,aAAa,EACb,MAAM,EACN,aAAa,EAGd,MAAM,cAAc,CAAC;AACtB,OAAO,EAAC,UAAU,EAAC,MAAM,mBAAmB,CAAC;AAG7C,MAAM,CAAC,OAAO,OAAO,qBAAsB,SAAQ,aAAa;IAC9D,kBAAkB,EAAE,KAAK,CAAC,UAAU,CAAC,CAAC;gBAE1B,IAAI,EAAE,MAAM,CAAC,cAAc,EAAE,MAAM,EAAE,MAAM;IAMvD,SAAS,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,aAAa;IAKjD,YAAY,CAAC,OAAO,EAAE,MAAM;IAM5B,gBAAgB,CAAC,OAAO,EAAE,MAAM;IAsBhC,uBAAuB,CAAC,WAAW,GAAE,KAAK,CAAC,UAAU,CAAM;CAG5D"} \ No newline at end of file diff --git a/node_modules/@jest/core/build/TestNamePatternPrompt.js b/node_modules/@jest/core/build/TestNamePatternPrompt.js deleted file mode 100644 index 292f7cc6d..000000000 --- a/node_modules/@jest/core/build/TestNamePatternPrompt.js +++ /dev/null @@ -1,86 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, '__esModule', { - value: true -}); -exports.default = void 0; - -function _jestWatcher() { - const data = require('jest-watcher'); - - _jestWatcher = function _jestWatcher() { - return data; - }; - - return data; -} - -function _defineProperty(obj, key, value) { - if (key in obj) { - Object.defineProperty(obj, key, { - value: value, - enumerable: true, - configurable: true, - writable: true - }); - } else { - obj[key] = value; - } - return obj; -} - -// TODO: Make underscored props `private` -class TestNamePatternPrompt extends _jestWatcher().PatternPrompt { - constructor(pipe, prompt) { - super(pipe, prompt); - - _defineProperty(this, '_cachedTestResults', void 0); - - this._entityName = 'tests'; - this._cachedTestResults = []; - } - - _onChange(pattern, options) { - super._onChange(pattern, options); - - this._printPrompt(pattern); - } - - _printPrompt(pattern) { - const pipe = this._pipe; - (0, _jestWatcher().printPatternCaret)(pattern, pipe); - (0, _jestWatcher().printRestoredPatternCaret)( - pattern, - this._currentUsageRows, - pipe - ); - } - - _getMatchedTests(pattern) { - let regex; - - try { - regex = new RegExp(pattern, 'i'); - } catch (e) { - return []; - } - - const matchedTests = []; - - this._cachedTestResults.forEach(({testResults}) => - testResults.forEach(({title}) => { - if (regex.test(title)) { - matchedTests.push(title); - } - }) - ); - - return matchedTests; - } - - updateCachedTestResults(testResults = []) { - this._cachedTestResults = testResults; - } -} - -exports.default = TestNamePatternPrompt; diff --git a/node_modules/@jest/core/build/TestPathPatternPrompt.d.ts b/node_modules/@jest/core/build/TestPathPatternPrompt.d.ts deleted file mode 100644 index 847c560bc..000000000 --- a/node_modules/@jest/core/build/TestPathPatternPrompt.d.ts +++ /dev/null @@ -1,25 +0,0 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -/// -import { Context } from 'jest-runtime'; -import { Test } from 'jest-runner'; -import { PatternPrompt, Prompt, ScrollOptions } from 'jest-watcher'; -import SearchSource from './SearchSource'; -declare type SearchSources = Array<{ - context: Context; - searchSource: SearchSource; -}>; -export default class TestPathPatternPrompt extends PatternPrompt { - _searchSources?: SearchSources; - constructor(pipe: NodeJS.WritableStream, prompt: Prompt); - _onChange(pattern: string, options: ScrollOptions): void; - _printPrompt(pattern: string): void; - _getMatchedTests(pattern: string): Array; - updateSearchSources(searchSources: SearchSources): void; -} -export {}; -//# sourceMappingURL=TestPathPatternPrompt.d.ts.map \ No newline at end of file diff --git a/node_modules/@jest/core/build/TestPathPatternPrompt.d.ts.map b/node_modules/@jest/core/build/TestPathPatternPrompt.d.ts.map deleted file mode 100644 index 2df9bdb26..000000000 --- a/node_modules/@jest/core/build/TestPathPatternPrompt.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"TestPathPatternPrompt.d.ts","sourceRoot":"","sources":["../src/TestPathPatternPrompt.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;;AAEH,OAAO,EAAC,OAAO,EAAC,MAAM,cAAc,CAAC;AACrC,OAAO,EAAC,IAAI,EAAC,MAAM,aAAa,CAAC;AAEjC,OAAO,EACL,aAAa,EACb,MAAM,EACN,aAAa,EAGd,MAAM,cAAc,CAAC;AACtB,OAAO,YAAY,MAAM,gBAAgB,CAAC;AAE1C,aAAK,aAAa,GAAG,KAAK,CAAC;IACzB,OAAO,EAAE,OAAO,CAAC;IACjB,YAAY,EAAE,YAAY,CAAC;CAC5B,CAAC,CAAC;AAGH,MAAM,CAAC,OAAO,OAAO,qBAAsB,SAAQ,aAAa;IAC9D,cAAc,CAAC,EAAE,aAAa,CAAC;gBAEnB,IAAI,EAAE,MAAM,CAAC,cAAc,EAAE,MAAM,EAAE,MAAM;IAKvD,SAAS,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,aAAa;IAKjD,YAAY,CAAC,OAAO,EAAE,MAAM;IAM5B,gBAAgB,CAAC,OAAO,EAAE,MAAM,GAAG,KAAK,CAAC,IAAI,CAAC;IAiB9C,mBAAmB,CAAC,aAAa,EAAE,aAAa;CAGjD"} \ No newline at end of file diff --git a/node_modules/@jest/core/build/TestPathPatternPrompt.js b/node_modules/@jest/core/build/TestPathPatternPrompt.js deleted file mode 100644 index 0e54eecbf..000000000 --- a/node_modules/@jest/core/build/TestPathPatternPrompt.js +++ /dev/null @@ -1,81 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, '__esModule', { - value: true -}); -exports.default = void 0; - -function _jestWatcher() { - const data = require('jest-watcher'); - - _jestWatcher = function _jestWatcher() { - return data; - }; - - return data; -} - -function _defineProperty(obj, key, value) { - if (key in obj) { - Object.defineProperty(obj, key, { - value: value, - enumerable: true, - configurable: true, - writable: true - }); - } else { - obj[key] = value; - } - return obj; -} - -// TODO: Make underscored props `private` -class TestPathPatternPrompt extends _jestWatcher().PatternPrompt { - constructor(pipe, prompt) { - super(pipe, prompt); - - _defineProperty(this, '_searchSources', void 0); - - this._entityName = 'filenames'; - } - - _onChange(pattern, options) { - super._onChange(pattern, options); - - this._printPrompt(pattern); - } - - _printPrompt(pattern) { - const pipe = this._pipe; - (0, _jestWatcher().printPatternCaret)(pattern, pipe); - (0, _jestWatcher().printRestoredPatternCaret)( - pattern, - this._currentUsageRows, - pipe - ); - } - - _getMatchedTests(pattern) { - let regex; - - try { - regex = new RegExp(pattern, 'i'); - } catch (e) {} - - let tests = []; - - if (regex && this._searchSources) { - this._searchSources.forEach(({searchSource}) => { - tests = tests.concat(searchSource.findMatchingTests(pattern).tests); - }); - } - - return tests; - } - - updateSearchSources(searchSources) { - this._searchSources = searchSources; - } -} - -exports.default = TestPathPatternPrompt; diff --git a/node_modules/@jest/core/build/TestScheduler.d.ts b/node_modules/@jest/core/build/TestScheduler.d.ts deleted file mode 100644 index e341a1927..000000000 --- a/node_modules/@jest/core/build/TestScheduler.d.ts +++ /dev/null @@ -1,41 +0,0 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -import { Config } from '@jest/types'; -import { Test } from 'jest-runner'; -import { Reporter } from '@jest/reporters'; -import { AggregatedResult } from '@jest/test-result'; -import TestWatcher from './TestWatcher'; -export declare type TestSchedulerOptions = { - startRun: (globalConfig: Config.GlobalConfig) => void; -}; -export declare type TestSchedulerContext = { - firstRun: boolean; - previousSuccess: boolean; - changedFiles?: Set; -}; -export default class TestScheduler { - private _dispatcher; - private _globalConfig; - private _options; - private _context; - constructor(globalConfig: Config.GlobalConfig, options: TestSchedulerOptions, context: TestSchedulerContext); - addReporter(reporter: Reporter): void; - removeReporter(ReporterClass: Function): void; - scheduleTests(tests: Array, watcher: TestWatcher): Promise; - private _partitionTests; - private _shouldAddDefaultReporters; - private _setupReporters; - private _setupDefaultReporters; - private _addCustomReporters; - /** - * Get properties of a reporter in an object - * to make dealing with them less painful. - */ - private _getReporterProps; - private _bailIfNeeded; -} -//# sourceMappingURL=TestScheduler.d.ts.map \ No newline at end of file diff --git a/node_modules/@jest/core/build/TestScheduler.d.ts.map b/node_modules/@jest/core/build/TestScheduler.d.ts.map deleted file mode 100644 index 5246565b9..000000000 --- a/node_modules/@jest/core/build/TestScheduler.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"TestScheduler.d.ts","sourceRoot":"","sources":["../src/TestScheduler.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAIH,OAAO,EAAC,MAAM,EAAC,MAAM,aAAa,CAAC;AAEnC,OAAmB,EAAC,IAAI,EAAC,MAAM,aAAa,CAAC;AAE7C,OAAO,EAML,QAAQ,EACT,MAAM,iBAAiB,CAAC;AAEzB,OAAO,EAEL,gBAAgB,EAKjB,MAAM,mBAAmB,CAAC;AAE3B,OAAO,WAAW,MAAM,eAAe,CAAC;AAOxC,oBAAY,oBAAoB,GAAG;IACjC,QAAQ,EAAE,CAAC,YAAY,EAAE,MAAM,CAAC,YAAY,KAAK,IAAI,CAAC;CACvD,CAAC;AACF,oBAAY,oBAAoB,GAAG;IACjC,QAAQ,EAAE,OAAO,CAAC;IAClB,eAAe,EAAE,OAAO,CAAC;IACzB,YAAY,CAAC,EAAE,GAAG,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;CACjC,CAAC;AACF,MAAM,CAAC,OAAO,OAAO,aAAa;IAChC,OAAO,CAAC,WAAW,CAAqB;IACxC,OAAO,CAAC,aAAa,CAAsB;IAC3C,OAAO,CAAC,QAAQ,CAAuB;IACvC,OAAO,CAAC,QAAQ,CAAuB;gBAGrC,YAAY,EAAE,MAAM,CAAC,YAAY,EACjC,OAAO,EAAE,oBAAoB,EAC7B,OAAO,EAAE,oBAAoB;IAS/B,WAAW,CAAC,QAAQ,EAAE,QAAQ;IAI9B,cAAc,CAAC,aAAa,EAAE,QAAQ;IAIhC,aAAa,CAAC,KAAK,EAAE,KAAK,CAAC,IAAI,CAAC,EAAE,OAAO,EAAE,WAAW;IAkJ5D,OAAO,CAAC,eAAe;IAuBvB,OAAO,CAAC,0BAA0B;IAWlC,OAAO,CAAC,eAAe;IA+BvB,OAAO,CAAC,sBAAsB;IAkB9B,OAAO,CAAC,mBAAmB;IAsB3B;;;OAGG;IACH,OAAO,CAAC,iBAAiB;IAazB,OAAO,CAAC,aAAa;CAsBtB"} \ No newline at end of file diff --git a/node_modules/@jest/core/build/TestScheduler.js b/node_modules/@jest/core/build/TestScheduler.js deleted file mode 100644 index f390f2198..000000000 --- a/node_modules/@jest/core/build/TestScheduler.js +++ /dev/null @@ -1,559 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, '__esModule', { - value: true -}); -exports.default = void 0; - -function _chalk() { - const data = _interopRequireDefault(require('chalk')); - - _chalk = function _chalk() { - return data; - }; - - return data; -} - -function _jestMessageUtil() { - const data = require('jest-message-util'); - - _jestMessageUtil = function _jestMessageUtil() { - return data; - }; - - return data; -} - -function _jestSnapshot() { - const data = _interopRequireDefault(require('jest-snapshot')); - - _jestSnapshot = function _jestSnapshot() { - return data; - }; - - return data; -} - -function _jestRunner() { - const data = _interopRequireDefault(require('jest-runner')); - - _jestRunner = function _jestRunner() { - return data; - }; - - return data; -} - -function _reporters() { - const data = require('@jest/reporters'); - - _reporters = function _reporters() { - return data; - }; - - return data; -} - -function _exit() { - const data = _interopRequireDefault(require('exit')); - - _exit = function _exit() { - return data; - }; - - return data; -} - -function _testResult() { - const data = require('@jest/test-result'); - - _testResult = function _testResult() { - return data; - }; - - return data; -} - -var _ReporterDispatcher = _interopRequireDefault( - require('./ReporterDispatcher') -); - -var _testSchedulerHelper = require('./testSchedulerHelper'); - -function _interopRequireDefault(obj) { - return obj && obj.__esModule ? obj : {default: obj}; -} - -function _slicedToArray(arr, i) { - return ( - _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _nonIterableRest() - ); -} - -function _nonIterableRest() { - throw new TypeError('Invalid attempt to destructure non-iterable instance'); -} - -function _iterableToArrayLimit(arr, i) { - var _arr = []; - var _n = true; - var _d = false; - var _e = undefined; - try { - for ( - var _i = arr[Symbol.iterator](), _s; - !(_n = (_s = _i.next()).done); - _n = true - ) { - _arr.push(_s.value); - if (i && _arr.length === i) break; - } - } catch (err) { - _d = true; - _e = err; - } finally { - try { - if (!_n && _i['return'] != null) _i['return'](); - } finally { - if (_d) throw _e; - } - } - return _arr; -} - -function _arrayWithHoles(arr) { - if (Array.isArray(arr)) return arr; -} - -function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { - try { - var info = gen[key](arg); - var value = info.value; - } catch (error) { - reject(error); - return; - } - if (info.done) { - resolve(value); - } else { - Promise.resolve(value).then(_next, _throw); - } -} - -function _asyncToGenerator(fn) { - return function() { - var self = this, - args = arguments; - return new Promise(function(resolve, reject) { - var gen = fn.apply(self, args); - function _next(value) { - asyncGeneratorStep(gen, resolve, reject, _next, _throw, 'next', value); - } - function _throw(err) { - asyncGeneratorStep(gen, resolve, reject, _next, _throw, 'throw', err); - } - _next(undefined); - }); - }; -} - -function _defineProperty(obj, key, value) { - if (key in obj) { - Object.defineProperty(obj, key, { - value: value, - enumerable: true, - configurable: true, - writable: true - }); - } else { - obj[key] = value; - } - return obj; -} - -// The default jest-runner is required because it is the default test runner -// and required implicitly through the `runner` ProjectConfig option. -_jestRunner().default; - -class TestScheduler { - constructor(globalConfig, options, context) { - _defineProperty(this, '_dispatcher', void 0); - - _defineProperty(this, '_globalConfig', void 0); - - _defineProperty(this, '_options', void 0); - - _defineProperty(this, '_context', void 0); - - this._dispatcher = new _ReporterDispatcher.default(); - this._globalConfig = globalConfig; - this._options = options; - this._context = context; - - this._setupReporters(); - } - - addReporter(reporter) { - this._dispatcher.register(reporter); - } - - removeReporter(ReporterClass) { - this._dispatcher.unregister(ReporterClass); - } - - scheduleTests(tests, watcher) { - var _this = this; - - return _asyncToGenerator(function*() { - const onStart = _this._dispatcher.onTestStart.bind(_this._dispatcher); - - const timings = []; - const contexts = new Set(); - tests.forEach(test => { - contexts.add(test.context); - - if (test.duration) { - timings.push(test.duration); - } - }); - const aggregatedResults = createAggregatedResults(tests.length); - const estimatedTime = Math.ceil( - getEstimatedTime(timings, _this._globalConfig.maxWorkers) / 1000 - ); - const runInBand = (0, _testSchedulerHelper.shouldRunInBand)( - tests, - timings, - _this._globalConfig - ); - - const onResult = - /*#__PURE__*/ - (function() { - var _ref = _asyncToGenerator(function*(test, testResult) { - if (watcher.isInterrupted()) { - return Promise.resolve(); - } - - if (testResult.testResults.length === 0) { - const message = 'Your test suite must contain at least one test.'; - return onFailure(test, { - message, - stack: new Error(message).stack - }); - } // Throws when the context is leaked after executing a test. - - if (testResult.leaks) { - const message = - _chalk().default.red.bold('EXPERIMENTAL FEATURE!\n') + - 'Your test suite is leaking memory. Please ensure all references are cleaned.\n' + - '\n' + - 'There is a number of things that can leak memory:\n' + - ' - Async operations that have not finished (e.g. fs.readFile).\n' + - ' - Timers not properly mocked (e.g. setInterval, setTimeout).\n' + - ' - Keeping references to the global scope.'; - return onFailure(test, { - message, - stack: new Error(message).stack - }); - } - - (0, _testResult().addResult)(aggregatedResults, testResult); - yield _this._dispatcher.onTestResult( - test, - testResult, - aggregatedResults - ); - return _this._bailIfNeeded(contexts, aggregatedResults, watcher); - }); - - return function onResult(_x, _x2) { - return _ref.apply(this, arguments); - }; - })(); - - const onFailure = - /*#__PURE__*/ - (function() { - var _ref2 = _asyncToGenerator(function*(test, error) { - if (watcher.isInterrupted()) { - return; - } - - const testResult = (0, _testResult().buildFailureTestResult)( - test.path, - error - ); - testResult.failureMessage = (0, _jestMessageUtil().formatExecError)( - testResult.testExecError, - test.context.config, - _this._globalConfig, - test.path - ); - (0, _testResult().addResult)(aggregatedResults, testResult); - yield _this._dispatcher.onTestResult( - test, - testResult, - aggregatedResults - ); - }); - - return function onFailure(_x3, _x4) { - return _ref2.apply(this, arguments); - }; - })(); - - const updateSnapshotState = () => { - contexts.forEach(context => { - const status = _jestSnapshot().default.cleanup( - context.hasteFS, - _this._globalConfig.updateSnapshot, - _jestSnapshot().default.buildSnapshotResolver(context.config) - ); - - aggregatedResults.snapshot.filesRemoved += status.filesRemoved; - }); - const updateAll = _this._globalConfig.updateSnapshot === 'all'; - aggregatedResults.snapshot.didUpdate = updateAll; - aggregatedResults.snapshot.failure = !!( - !updateAll && - (aggregatedResults.snapshot.unchecked || - aggregatedResults.snapshot.unmatched || - aggregatedResults.snapshot.filesRemoved) - ); - }; - - yield _this._dispatcher.onRunStart(aggregatedResults, { - estimatedTime, - showStatus: !runInBand - }); - const testRunners = Object.create(null); - contexts.forEach(({config}) => { - if (!testRunners[config.runner]) { - const Runner = require(config.runner); - - testRunners[config.runner] = new Runner(_this._globalConfig, { - changedFiles: _this._context && _this._context.changedFiles - }); - } - }); - - const testsByRunner = _this._partitionTests(testRunners, tests); - - if (testsByRunner) { - try { - var _arr = Object.keys(testRunners); - - for (var _i = 0; _i < _arr.length; _i++) { - const runner = _arr[_i]; - yield testRunners[runner].runTests( - testsByRunner[runner], - watcher, - onStart, - onResult, - onFailure, - { - serial: runInBand || Boolean(testRunners[runner].isSerial) - } - ); - } - } catch (error) { - if (!watcher.isInterrupted()) { - throw error; - } - } - } - - updateSnapshotState(); - aggregatedResults.wasInterrupted = watcher.isInterrupted(); - yield _this._dispatcher.onRunComplete(contexts, aggregatedResults); - const anyTestFailures = !( - aggregatedResults.numFailedTests === 0 && - aggregatedResults.numRuntimeErrorTestSuites === 0 - ); - - const anyReporterErrors = _this._dispatcher.hasErrors(); - - aggregatedResults.success = !( - anyTestFailures || - aggregatedResults.snapshot.failure || - anyReporterErrors - ); - return aggregatedResults; - })(); - } - - _partitionTests(testRunners, tests) { - if (Object.keys(testRunners).length > 1) { - return tests.reduce((testRuns, test) => { - const runner = test.context.config.runner; - - if (!testRuns[runner]) { - testRuns[runner] = []; - } - - testRuns[runner].push(test); - return testRuns; - }, Object.create(null)); - } else if (tests.length > 0 && tests[0] != null) { - // If there is only one runner, don't partition the tests. - return Object.assign(Object.create(null), { - [tests[0].context.config.runner]: tests - }); - } else { - return null; - } - } - - _shouldAddDefaultReporters(reporters) { - return ( - !reporters || - !!reporters.find( - reporter => this._getReporterProps(reporter).path === 'default' - ) - ); - } - - _setupReporters() { - const _this$_globalConfig = this._globalConfig, - collectCoverage = _this$_globalConfig.collectCoverage, - notify = _this$_globalConfig.notify, - reporters = _this$_globalConfig.reporters; - - const isDefault = this._shouldAddDefaultReporters(reporters); - - if (isDefault) { - this._setupDefaultReporters(collectCoverage); - } - - if (!isDefault && collectCoverage) { - this.addReporter( - new (_reporters()).CoverageReporter(this._globalConfig, { - changedFiles: this._context && this._context.changedFiles - }) - ); - } - - if (notify) { - this.addReporter( - new (_reporters()).NotifyReporter( - this._globalConfig, - this._options.startRun, - this._context - ) - ); - } - - if (reporters && Array.isArray(reporters)) { - this._addCustomReporters(reporters); - } - } - - _setupDefaultReporters(collectCoverage) { - this.addReporter( - this._globalConfig.verbose - ? new (_reporters()).VerboseReporter(this._globalConfig) - : new (_reporters()).DefaultReporter(this._globalConfig) - ); - - if (collectCoverage) { - this.addReporter( - new (_reporters()).CoverageReporter(this._globalConfig, { - changedFiles: this._context && this._context.changedFiles - }) - ); - } - - this.addReporter(new (_reporters()).SummaryReporter(this._globalConfig)); - } - - _addCustomReporters(reporters) { - reporters.forEach(reporter => { - const _this$_getReporterPro = this._getReporterProps(reporter), - options = _this$_getReporterPro.options, - path = _this$_getReporterPro.path; - - if (path === 'default') return; - - try { - const Reporter = require(path); - - this.addReporter(new Reporter(this._globalConfig, options)); - } catch (error) { - throw new Error( - 'An error occurred while adding the reporter at path "' + - path + - '".' + - error.message - ); - } - }); - } - /** - * Get properties of a reporter in an object - * to make dealing with them less painful. - */ - - _getReporterProps(reporter) { - if (typeof reporter === 'string') { - return { - options: this._options, - path: reporter - }; - } else if (Array.isArray(reporter)) { - const _reporter = _slicedToArray(reporter, 2), - path = _reporter[0], - options = _reporter[1]; - - return { - options, - path - }; - } - - throw new Error('Reporter should be either a string or an array'); - } - - _bailIfNeeded(contexts, aggregatedResults, watcher) { - if ( - this._globalConfig.bail !== 0 && - aggregatedResults.numFailedTests >= this._globalConfig.bail - ) { - if (watcher.isWatchMode()) { - watcher.setState({ - interrupted: true - }); - } else { - const failureExit = () => (0, _exit().default)(1); - - return this._dispatcher - .onRunComplete(contexts, aggregatedResults) - .then(failureExit) - .catch(failureExit); - } - } - - return Promise.resolve(); - } -} - -exports.default = TestScheduler; - -const createAggregatedResults = numTotalTestSuites => { - const result = (0, _testResult().makeEmptyAggregatedTestResult)(); - result.numTotalTestSuites = numTotalTestSuites; - result.startTime = Date.now(); - result.success = false; - return result; -}; - -const getEstimatedTime = (timings, workers) => { - if (!timings.length) { - return 0; - } - - const max = Math.max.apply(null, timings); - return timings.length <= workers - ? max - : Math.max(timings.reduce((sum, time) => sum + time) / workers, max); -}; diff --git a/node_modules/@jest/core/build/TestWatcher.d.ts b/node_modules/@jest/core/build/TestWatcher.d.ts deleted file mode 100644 index 1855935ff..000000000 --- a/node_modules/@jest/core/build/TestWatcher.d.ts +++ /dev/null @@ -1,23 +0,0 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -/// -import { EventEmitter } from 'events'; -declare type State = { - interrupted: boolean; -}; -export default class TestWatcher extends EventEmitter { - state: State; - private _isWatchMode; - constructor({ isWatchMode }: { - isWatchMode: boolean; - }); - setState(state: State): void; - isInterrupted(): boolean; - isWatchMode(): boolean; -} -export {}; -//# sourceMappingURL=TestWatcher.d.ts.map \ No newline at end of file diff --git a/node_modules/@jest/core/build/TestWatcher.d.ts.map b/node_modules/@jest/core/build/TestWatcher.d.ts.map deleted file mode 100644 index 0714f3847..000000000 --- a/node_modules/@jest/core/build/TestWatcher.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"TestWatcher.d.ts","sourceRoot":"","sources":["../src/TestWatcher.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;;AAEH,OAAO,EAAC,YAAY,EAAC,MAAM,QAAQ,CAAC;AAEpC,aAAK,KAAK,GAAG;IACX,WAAW,EAAE,OAAO,CAAC;CACtB,CAAC;AAEF,MAAM,CAAC,OAAO,OAAO,WAAY,SAAQ,YAAY;IACnD,KAAK,EAAE,KAAK,CAAC;IACb,OAAO,CAAC,YAAY,CAAU;gBAElB,EAAC,WAAW,EAAC,EAAE;QAAC,WAAW,EAAE,OAAO,CAAA;KAAC;IAMjD,QAAQ,CAAC,KAAK,EAAE,KAAK;IAKrB,aAAa;IAIb,WAAW;CAGZ"} \ No newline at end of file diff --git a/node_modules/@jest/core/build/TestWatcher.js b/node_modules/@jest/core/build/TestWatcher.js deleted file mode 100644 index a82c4dc00..000000000 --- a/node_modules/@jest/core/build/TestWatcher.js +++ /dev/null @@ -1,60 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, '__esModule', { - value: true -}); -exports.default = void 0; - -function _events() { - const data = require('events'); - - _events = function _events() { - return data; - }; - - return data; -} - -function _defineProperty(obj, key, value) { - if (key in obj) { - Object.defineProperty(obj, key, { - value: value, - enumerable: true, - configurable: true, - writable: true - }); - } else { - obj[key] = value; - } - return obj; -} - -class TestWatcher extends _events().EventEmitter { - constructor({isWatchMode}) { - super(); - - _defineProperty(this, 'state', void 0); - - _defineProperty(this, '_isWatchMode', void 0); - - this.state = { - interrupted: false - }; - this._isWatchMode = isWatchMode; - } - - setState(state) { - Object.assign(this.state, state); - this.emit('change', this.state); - } - - isInterrupted() { - return this.state.interrupted; - } - - isWatchMode() { - return this._isWatchMode; - } -} - -exports.default = TestWatcher; diff --git a/node_modules/@jest/core/build/assets/jest_logo.png b/node_modules/@jest/core/build/assets/jest_logo.png deleted file mode 100644 index 079356bc1..000000000 Binary files a/node_modules/@jest/core/build/assets/jest_logo.png and /dev/null differ diff --git a/node_modules/@jest/core/build/cli/index.d.ts b/node_modules/@jest/core/build/cli/index.d.ts deleted file mode 100644 index d02922d72..000000000 --- a/node_modules/@jest/core/build/cli/index.d.ts +++ /dev/null @@ -1,99 +0,0 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -/// -import { Config } from '@jest/types'; -import { AggregatedResult } from '@jest/test-result'; -export declare const runCLI: (argv: import("yargs").Arguments>, projects: string[]) => Promise<{ - results: AggregatedResult; - globalConfig: Config.GlobalConfig; -}>; -//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/node_modules/@jest/core/build/cli/index.d.ts.map b/node_modules/@jest/core/build/cli/index.d.ts.map deleted file mode 100644 index cfd2600b0..000000000 --- a/node_modules/@jest/core/build/cli/index.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/cli/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;;AAEH,OAAO,EAAC,MAAM,EAAC,MAAM,aAAa,CAAC;AACnC,OAAO,EAAC,gBAAgB,EAAC,MAAM,mBAAmB,CAAC;AAyBnD,eAAO,MAAM,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA8ElB,CAAC"} \ No newline at end of file diff --git a/node_modules/@jest/core/build/cli/index.js b/node_modules/@jest/core/build/cli/index.js deleted file mode 100644 index 3520f7311..000000000 --- a/node_modules/@jest/core/build/cli/index.js +++ /dev/null @@ -1,471 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, '__esModule', { - value: true -}); -exports.runCLI = void 0; - -function _console() { - const data = require('@jest/console'); - - _console = function _console() { - return data; - }; - - return data; -} - -function _jestUtil() { - const data = require('jest-util'); - - _jestUtil = function _jestUtil() { - return data; - }; - - return data; -} - -function _jestConfig() { - const data = require('jest-config'); - - _jestConfig = function _jestConfig() { - return data; - }; - - return data; -} - -function _jestRuntime() { - const data = _interopRequireDefault(require('jest-runtime')); - - _jestRuntime = function _jestRuntime() { - return data; - }; - - return data; -} - -function _chalk() { - const data = _interopRequireDefault(require('chalk')); - - _chalk = function _chalk() { - return data; - }; - - return data; -} - -function _rimraf() { - const data = _interopRequireDefault(require('rimraf')); - - _rimraf = function _rimraf() { - return data; - }; - - return data; -} - -function _exit() { - const data = _interopRequireDefault(require('exit')); - - _exit = function _exit() { - return data; - }; - - return data; -} - -var _create_context = _interopRequireDefault(require('../lib/create_context')); - -var _getChangedFilesPromise = _interopRequireDefault( - require('../getChangedFilesPromise') -); - -var _collectHandles = require('../collectHandles'); - -var _handle_deprecation_warnings = _interopRequireDefault( - require('../lib/handle_deprecation_warnings') -); - -var _runJest = _interopRequireDefault(require('../runJest')); - -var _TestWatcher = _interopRequireDefault(require('../TestWatcher')); - -var _watch = _interopRequireDefault(require('../watch')); - -var _pluralize = _interopRequireDefault(require('../pluralize')); - -var _log_debug_messages = _interopRequireDefault( - require('../lib/log_debug_messages') -); - -function _interopRequireDefault(obj) { - return obj && obj.__esModule ? obj : {default: obj}; -} - -function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { - try { - var info = gen[key](arg); - var value = info.value; - } catch (error) { - reject(error); - return; - } - if (info.done) { - resolve(value); - } else { - Promise.resolve(value).then(_next, _throw); - } -} - -function _asyncToGenerator(fn) { - return function() { - var self = this, - args = arguments; - return new Promise(function(resolve, reject) { - var gen = fn.apply(self, args); - function _next(value) { - asyncGeneratorStep(gen, resolve, reject, _next, _throw, 'next', value); - } - function _throw(err) { - asyncGeneratorStep(gen, resolve, reject, _next, _throw, 'throw', err); - } - _next(undefined); - }); - }; -} - -const preRunMessagePrint = _jestUtil().preRunMessage.print; - -const runCLI = - /*#__PURE__*/ - (function() { - var _ref = _asyncToGenerator(function*(argv, projects) { - const realFs = require('fs'); - - const fs = require('graceful-fs'); - - fs.gracefulify(realFs); - let results; // If we output a JSON object, we can't write anything to stdout, since - // it'll break the JSON structure and it won't be valid. - - const outputStream = - argv.json || argv.useStderr ? process.stderr : process.stdout; - - const _readConfigs = (0, _jestConfig().readConfigs)(argv, projects), - globalConfig = _readConfigs.globalConfig, - configs = _readConfigs.configs, - hasDeprecationWarnings = _readConfigs.hasDeprecationWarnings; - - if (argv.debug) { - (0, _log_debug_messages.default)(globalConfig, configs, outputStream); - } - - if (argv.showConfig) { - (0, _log_debug_messages.default)(globalConfig, configs, process.stdout); - (0, _exit().default)(0); - } - - if (argv.clearCache) { - configs.forEach(config => { - _rimraf().default.sync(config.cacheDirectory); - - process.stdout.write(`Cleared ${config.cacheDirectory}\n`); - }); - (0, _exit().default)(0); - } - - yield _run( - globalConfig, - configs, - hasDeprecationWarnings, - outputStream, - r => (results = r) - ); - - if (argv.watch || argv.watchAll) { - // If in watch mode, return the promise that will never resolve. - // If the watch mode is interrupted, watch should handle the process - // shutdown. - return new Promise(() => {}); - } - - if (!results) { - throw new Error( - 'AggregatedResult must be present after test run is complete' - ); - } - - const _results = results, - openHandles = _results.openHandles; - - if (openHandles && openHandles.length) { - const formatted = (0, _collectHandles.formatHandleErrors)( - openHandles, - configs[0] - ); - const openHandlesString = (0, _pluralize.default)( - 'open handle', - formatted.length, - 's' - ); - const message = - _chalk().default.red( - `\nJest has detected the following ${openHandlesString} potentially keeping Jest from exiting:\n\n` - ) + formatted.join('\n\n'); - console.error(message); - } - - return { - globalConfig, - results - }; - }); - - return function runCLI(_x, _x2) { - return _ref.apply(this, arguments); - }; - })(); - -exports.runCLI = runCLI; - -const buildContextsAndHasteMaps = - /*#__PURE__*/ - (function() { - var _ref2 = _asyncToGenerator(function*( - configs, - globalConfig, - outputStream - ) { - const hasteMapInstances = Array(configs.length); - const contexts = yield Promise.all( - configs.map( - /*#__PURE__*/ - (function() { - var _ref3 = _asyncToGenerator(function*(config, index) { - (0, _jestUtil().createDirectory)(config.cacheDirectory); - - const hasteMapInstance = _jestRuntime().default.createHasteMap( - config, - { - console: new (_console()).CustomConsole( - outputStream, - outputStream - ), - maxWorkers: globalConfig.maxWorkers, - resetCache: !config.cache, - watch: globalConfig.watch || globalConfig.watchAll, - watchman: globalConfig.watchman - } - ); - - hasteMapInstances[index] = hasteMapInstance; - return (0, - _create_context.default)(config, yield hasteMapInstance.build()); - }); - - return function(_x6, _x7) { - return _ref3.apply(this, arguments); - }; - })() - ) - ); - return { - contexts, - hasteMapInstances - }; - }); - - return function buildContextsAndHasteMaps(_x3, _x4, _x5) { - return _ref2.apply(this, arguments); - }; - })(); - -const _run = - /*#__PURE__*/ - (function() { - var _ref4 = _asyncToGenerator(function*( - globalConfig, - configs, - hasDeprecationWarnings, - outputStream, - onComplete - ) { - // Queries to hg/git can take a while, so we need to start the process - // as soon as possible, so by the time we need the result it's already there. - const changedFilesPromise = (0, _getChangedFilesPromise.default)( - globalConfig, - configs - ); // Filter may need to do an HTTP call or something similar to setup. - // We will wait on an async response from this before using the filter. - - let filter; - - if (globalConfig.filter && !globalConfig.skipFilter) { - const rawFilter = require(globalConfig.filter); - - let filterSetupPromise; - - if (rawFilter.setup) { - // Wrap filter setup Promise to avoid "uncaught Promise" error. - // If an error is returned, we surface it in the return value. - filterSetupPromise = _asyncToGenerator(function*() { - try { - yield rawFilter.setup(); - } catch (err) { - return err; - } - - return undefined; - })(); - } - - filter = - /*#__PURE__*/ - (function() { - var _ref6 = _asyncToGenerator(function*(testPaths) { - if (filterSetupPromise) { - // Expect an undefined return value unless there was an error. - const err = yield filterSetupPromise; - - if (err) { - throw err; - } - } - - return rawFilter(testPaths); - }); - - return function filter(_x13) { - return _ref6.apply(this, arguments); - }; - })(); - } - - const _ref7 = yield buildContextsAndHasteMaps( - configs, - globalConfig, - outputStream - ), - contexts = _ref7.contexts, - hasteMapInstances = _ref7.hasteMapInstances; - - globalConfig.watch || globalConfig.watchAll - ? yield runWatch( - contexts, - configs, - hasDeprecationWarnings, - globalConfig, - outputStream, - hasteMapInstances, - filter - ) - : yield runWithoutWatch( - globalConfig, - contexts, - outputStream, - onComplete, - changedFilesPromise, - filter - ); - }); - - return function _run(_x8, _x9, _x10, _x11, _x12) { - return _ref4.apply(this, arguments); - }; - })(); - -const runWatch = - /*#__PURE__*/ - (function() { - var _ref8 = _asyncToGenerator(function*( - contexts, - _configs, - hasDeprecationWarnings, - globalConfig, - outputStream, - hasteMapInstances, - filter - ) { - if (hasDeprecationWarnings) { - try { - yield (0, _handle_deprecation_warnings.default)( - outputStream, - process.stdin - ); - return (0, _watch.default)( - globalConfig, - contexts, - outputStream, - hasteMapInstances, - undefined, - undefined, - filter - ); - } catch (e) { - (0, _exit().default)(0); - } - } - - return (0, _watch.default)( - globalConfig, - contexts, - outputStream, - hasteMapInstances, - undefined, - undefined, - filter - ); - }); - - return function runWatch(_x14, _x15, _x16, _x17, _x18, _x19, _x20) { - return _ref8.apply(this, arguments); - }; - })(); - -const runWithoutWatch = - /*#__PURE__*/ - (function() { - var _ref9 = _asyncToGenerator(function*( - globalConfig, - contexts, - outputStream, - onComplete, - changedFilesPromise, - filter - ) { - const startRun = - /*#__PURE__*/ - (function() { - var _ref10 = _asyncToGenerator(function*() { - if (!globalConfig.listTests) { - preRunMessagePrint(outputStream); - } - - return (0, _runJest.default)({ - changedFilesPromise, - contexts, - failedTestsCache: undefined, - filter, - globalConfig, - onComplete, - outputStream, - startRun, - testWatcher: new _TestWatcher.default({ - isWatchMode: false - }) - }); - }); - - return function startRun() { - return _ref10.apply(this, arguments); - }; - })(); - - return startRun(); - }); - - return function runWithoutWatch(_x21, _x22, _x23, _x24, _x25, _x26) { - return _ref9.apply(this, arguments); - }; - })(); diff --git a/node_modules/@jest/core/build/collectHandles.d.ts b/node_modules/@jest/core/build/collectHandles.d.ts deleted file mode 100644 index 6005498d7..000000000 --- a/node_modules/@jest/core/build/collectHandles.d.ts +++ /dev/null @@ -1,10 +0,0 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -import { Config } from '@jest/types'; -export default function collectHandles(): () => Array; -export declare function formatHandleErrors(errors: Array, config: Config.ProjectConfig): Array; -//# sourceMappingURL=collectHandles.d.ts.map \ No newline at end of file diff --git a/node_modules/@jest/core/build/collectHandles.d.ts.map b/node_modules/@jest/core/build/collectHandles.d.ts.map deleted file mode 100644 index fc73af85f..000000000 --- a/node_modules/@jest/core/build/collectHandles.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"collectHandles.d.ts","sourceRoot":"","sources":["../src/collectHandles.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAC,MAAM,EAAC,MAAM,aAAa,CAAC;AA+BnC,MAAM,CAAC,OAAO,UAAU,cAAc,IAAI,MAAM,KAAK,CAAC,KAAK,CAAC,CA0C3D;AAED,wBAAgB,kBAAkB,CAChC,MAAM,EAAE,KAAK,CAAC,KAAK,CAAC,EACpB,MAAM,EAAE,MAAM,CAAC,aAAa,GAC3B,KAAK,CAAC,MAAM,CAAC,CA8Bf"} \ No newline at end of file diff --git a/node_modules/@jest/core/build/collectHandles.js b/node_modules/@jest/core/build/collectHandles.js deleted file mode 100644 index 4dc0d2abd..000000000 --- a/node_modules/@jest/core/build/collectHandles.js +++ /dev/null @@ -1,149 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, '__esModule', { - value: true -}); -exports.default = collectHandles; -exports.formatHandleErrors = formatHandleErrors; - -function _jestMessageUtil() { - const data = require('jest-message-util'); - - _jestMessageUtil = function _jestMessageUtil() { - return data; - }; - - return data; -} - -function _jestUtil() { - const data = require('jest-util'); - - _jestUtil = function _jestUtil() { - return data; - }; - - return data; -} - -function _stripAnsi() { - const data = _interopRequireDefault(require('strip-ansi')); - - _stripAnsi = function _stripAnsi() { - return data; - }; - - return data; -} - -function _interopRequireDefault(obj) { - return obj && obj.__esModule ? obj : {default: obj}; -} - -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -function stackIsFromUser(stack) { - // Either the test file, or something required by it - if (stack.includes('Runtime.requireModule')) { - return true; - } // jest-jasmine it or describe call - - if (stack.includes('asyncJestTest') || stack.includes('asyncJestLifecycle')) { - return true; - } // An async function call from within circus - - if (stack.includes('callAsyncCircusFn')) { - // jest-circus it or describe call - return ( - stack.includes('_callCircusTest') || stack.includes('_callCircusHook') - ); - } - - return false; -} // Inspired by https://github.com/mafintosh/why-is-node-running/blob/master/index.js -// Extracted as we want to format the result ourselves - -function collectHandles() { - const activeHandles = new Map(); - let hook; - - try { - const asyncHooks = require('async_hooks'); - - hook = asyncHooks.createHook({ - destroy(asyncId) { - activeHandles.delete(asyncId); - }, - - init: function initHook(asyncId, type) { - if (type === 'PROMISE' || type === 'TIMERWRAP') { - return; - } - - const error = new (_jestUtil()).ErrorWithStack(type, initHook); - - if (stackIsFromUser(error.stack || '')) { - activeHandles.set(asyncId, error); - } - } - }); - hook.enable(); - } catch (e) { - const nodeMajor = Number(process.versions.node.split('.')[0]); - - if (e.code === 'MODULE_NOT_FOUND' && nodeMajor < 8) { - throw new Error( - 'You can only use --detectOpenHandles on Node 8 and newer.' - ); - } else { - throw e; - } - } - - return () => { - hook.disable(); - const result = Array.from(activeHandles.values()); - activeHandles.clear(); - return result; - }; -} - -function formatHandleErrors(errors, config) { - const stacks = new Set(); - return ( - errors - .map(err => - (0, _jestMessageUtil().formatExecError)( - err, - config, - { - noStackTrace: false - }, - undefined, - true - ) - ) // E.g. timeouts might give multiple traces to the same line of code - // This hairy filtering tries to remove entries with duplicate stack traces - .filter(handle => { - const ansiFree = (0, _stripAnsi().default)(handle); - const match = ansiFree.match(/\s+at(.*)/); - - if (!match || match.length < 2) { - return true; - } - - const stack = ansiFree.substr(ansiFree.indexOf(match[1])).trim(); - - if (stacks.has(stack)) { - return false; - } - - stacks.add(stack); - return true; - }) - ); -} diff --git a/node_modules/@jest/core/build/getChangedFilesPromise.d.ts b/node_modules/@jest/core/build/getChangedFilesPromise.d.ts deleted file mode 100644 index 71b7da172..000000000 --- a/node_modules/@jest/core/build/getChangedFilesPromise.d.ts +++ /dev/null @@ -1,10 +0,0 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -import { Config } from '@jest/types'; -declare const _default: (globalConfig: Config.GlobalConfig, configs: Config.ProjectConfig[]) => Promise | undefined; -export default _default; -//# sourceMappingURL=getChangedFilesPromise.d.ts.map \ No newline at end of file diff --git a/node_modules/@jest/core/build/getChangedFilesPromise.d.ts.map b/node_modules/@jest/core/build/getChangedFilesPromise.d.ts.map deleted file mode 100644 index 40b60985f..000000000 --- a/node_modules/@jest/core/build/getChangedFilesPromise.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"getChangedFilesPromise.d.ts","sourceRoot":"","sources":["../src/getChangedFilesPromise.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAC,MAAM,EAAC,MAAM,aAAa,CAAC;;AAKnC,wBA6BE"} \ No newline at end of file diff --git a/node_modules/@jest/core/build/getChangedFilesPromise.js b/node_modules/@jest/core/build/getChangedFilesPromise.js deleted file mode 100644 index f960718b0..000000000 --- a/node_modules/@jest/core/build/getChangedFilesPromise.js +++ /dev/null @@ -1,78 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, '__esModule', { - value: true -}); -exports.default = void 0; - -function _jestChangedFiles() { - const data = require('jest-changed-files'); - - _jestChangedFiles = function _jestChangedFiles() { - return data; - }; - - return data; -} - -function _jestMessageUtil() { - const data = require('jest-message-util'); - - _jestMessageUtil = function _jestMessageUtil() { - return data; - }; - - return data; -} - -function _chalk() { - const data = _interopRequireDefault(require('chalk')); - - _chalk = function _chalk() { - return data; - }; - - return data; -} - -function _interopRequireDefault(obj) { - return obj && obj.__esModule ? obj : {default: obj}; -} - -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -var _default = (globalConfig, configs) => { - if (globalConfig.onlyChanged) { - const allRootsForAllProjects = configs.reduce( - (roots, config) => [...roots, ...(config.roots || [])], - [] - ); - return (0, _jestChangedFiles().getChangedFilesForRoots)( - allRootsForAllProjects, - { - changedSince: globalConfig.changedSince, - lastCommit: globalConfig.lastCommit, - withAncestor: globalConfig.changedFilesWithAncestor - } - ).catch(e => { - const message = (0, _jestMessageUtil().formatExecError)(e, configs[0], { - noStackTrace: true - }) - .split('\n') - .filter(line => !line.includes('Command failed:')) - .join('\n'); - console.error(_chalk().default.red(`\n\n${message}`)); - process.exit(1); // We do process.exit, so this is dead code - - return Promise.reject(e); - }); - } - - return undefined; -}; - -exports.default = _default; diff --git a/node_modules/@jest/core/build/getNoTestFound.d.ts b/node_modules/@jest/core/build/getNoTestFound.d.ts deleted file mode 100644 index adca936cb..000000000 --- a/node_modules/@jest/core/build/getNoTestFound.d.ts +++ /dev/null @@ -1,10 +0,0 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -import { Config } from '@jest/types'; -import { TestRunData } from './types'; -export default function getNoTestFound(testRunData: TestRunData, globalConfig: Config.GlobalConfig): string; -//# sourceMappingURL=getNoTestFound.d.ts.map \ No newline at end of file diff --git a/node_modules/@jest/core/build/getNoTestFound.d.ts.map b/node_modules/@jest/core/build/getNoTestFound.d.ts.map deleted file mode 100644 index b6ff07786..000000000 --- a/node_modules/@jest/core/build/getNoTestFound.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"getNoTestFound.d.ts","sourceRoot":"","sources":["../src/getNoTestFound.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,OAAO,EAAC,MAAM,EAAC,MAAM,aAAa,CAAC;AACnC,OAAO,EAAC,WAAW,EAAC,MAAM,SAAS,CAAC;AAGpC,MAAM,CAAC,OAAO,UAAU,cAAc,CACpC,WAAW,EAAE,WAAW,EACxB,YAAY,EAAE,MAAM,CAAC,YAAY,GAChC,MAAM,CAgCR"} \ No newline at end of file diff --git a/node_modules/@jest/core/build/getNoTestFound.js b/node_modules/@jest/core/build/getNoTestFound.js deleted file mode 100644 index 4e61afecf..000000000 --- a/node_modules/@jest/core/build/getNoTestFound.js +++ /dev/null @@ -1,63 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, '__esModule', { - value: true -}); -exports.default = getNoTestFound; - -function _chalk() { - const data = _interopRequireDefault(require('chalk')); - - _chalk = function _chalk() { - return data; - }; - - return data; -} - -var _pluralize = _interopRequireDefault(require('./pluralize')); - -function _interopRequireDefault(obj) { - return obj && obj.__esModule ? obj : {default: obj}; -} - -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -function getNoTestFound(testRunData, globalConfig) { - const testFiles = testRunData.reduce( - (current, testRun) => current + (testRun.matches.total || 0), - 0 - ); - let dataMessage; - - if (globalConfig.runTestsByPath) { - dataMessage = `Files: ${globalConfig.nonFlagArgs - .map(p => `"${p}"`) - .join(', ')}`; - } else { - dataMessage = `Pattern: ${_chalk().default.yellow( - globalConfig.testPathPattern - )} - 0 matches`; - } - - return ( - _chalk().default.bold('No tests found, exiting with code 1') + - '\n' + - 'Run with `--passWithNoTests` to exit with code 0' + - '\n' + - `In ${_chalk().default.bold(globalConfig.rootDir)}` + - '\n' + - ` ${(0, _pluralize.default)('file', testFiles, 's')} checked across ${(0, - _pluralize.default)( - 'project', - testRunData.length, - 's' - )}. Run with \`--verbose\` for more details.` + - '\n' + - dataMessage - ); -} diff --git a/node_modules/@jest/core/build/getNoTestFoundFailed.d.ts b/node_modules/@jest/core/build/getNoTestFoundFailed.d.ts deleted file mode 100644 index 7f30f51c6..000000000 --- a/node_modules/@jest/core/build/getNoTestFoundFailed.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -export default function getNoTestFoundFailed(): string; -//# sourceMappingURL=getNoTestFoundFailed.d.ts.map \ No newline at end of file diff --git a/node_modules/@jest/core/build/getNoTestFoundFailed.d.ts.map b/node_modules/@jest/core/build/getNoTestFoundFailed.d.ts.map deleted file mode 100644 index 1f76df66e..000000000 --- a/node_modules/@jest/core/build/getNoTestFoundFailed.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"getNoTestFoundFailed.d.ts","sourceRoot":"","sources":["../src/getNoTestFoundFailed.ts"],"names":[],"mappings":"AAIA,MAAM,CAAC,OAAO,UAAU,oBAAoB,WAK3C"} \ No newline at end of file diff --git a/node_modules/@jest/core/build/getNoTestFoundFailed.js b/node_modules/@jest/core/build/getNoTestFoundFailed.js deleted file mode 100644 index 2132b6b43..000000000 --- a/node_modules/@jest/core/build/getNoTestFoundFailed.js +++ /dev/null @@ -1,28 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, '__esModule', { - value: true -}); -exports.default = getNoTestFoundFailed; - -function _chalk() { - const data = _interopRequireDefault(require('chalk')); - - _chalk = function _chalk() { - return data; - }; - - return data; -} - -function _interopRequireDefault(obj) { - return obj && obj.__esModule ? obj : {default: obj}; -} - -// Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. -function getNoTestFoundFailed() { - return ( - _chalk().default.bold('No failed test found.\n') + - _chalk().default.dim('Press `f` to quit "only failed tests" mode.') - ); -} diff --git a/node_modules/@jest/core/build/getNoTestFoundRelatedToChangedFiles.d.ts b/node_modules/@jest/core/build/getNoTestFoundRelatedToChangedFiles.d.ts deleted file mode 100644 index d04e0a788..000000000 --- a/node_modules/@jest/core/build/getNoTestFoundRelatedToChangedFiles.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -import { Config } from '@jest/types'; -export default function getNoTestFoundRelatedToChangedFiles(globalConfig: Config.GlobalConfig): string; -//# sourceMappingURL=getNoTestFoundRelatedToChangedFiles.d.ts.map \ No newline at end of file diff --git a/node_modules/@jest/core/build/getNoTestFoundRelatedToChangedFiles.d.ts.map b/node_modules/@jest/core/build/getNoTestFoundRelatedToChangedFiles.d.ts.map deleted file mode 100644 index 73ccc80c6..000000000 --- a/node_modules/@jest/core/build/getNoTestFoundRelatedToChangedFiles.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"getNoTestFoundRelatedToChangedFiles.d.ts","sourceRoot":"","sources":["../src/getNoTestFoundRelatedToChangedFiles.ts"],"names":[],"mappings":"AAGA,OAAO,EAAC,MAAM,EAAC,MAAM,aAAa,CAAC;AAGnC,MAAM,CAAC,OAAO,UAAU,mCAAmC,CACzD,YAAY,EAAE,MAAM,CAAC,YAAY,UAiBlC"} \ No newline at end of file diff --git a/node_modules/@jest/core/build/getNoTestFoundRelatedToChangedFiles.js b/node_modules/@jest/core/build/getNoTestFoundRelatedToChangedFiles.js deleted file mode 100644 index 8028f8baa..000000000 --- a/node_modules/@jest/core/build/getNoTestFoundRelatedToChangedFiles.js +++ /dev/null @@ -1,52 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, '__esModule', { - value: true -}); -exports.default = getNoTestFoundRelatedToChangedFiles; - -function _chalk() { - const data = _interopRequireDefault(require('chalk')); - - _chalk = function _chalk() { - return data; - }; - - return data; -} - -function _jestUtil() { - const data = require('jest-util'); - - _jestUtil = function _jestUtil() { - return data; - }; - - return data; -} - -function _interopRequireDefault(obj) { - return obj && obj.__esModule ? obj : {default: obj}; -} - -// Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. -function getNoTestFoundRelatedToChangedFiles(globalConfig) { - const ref = globalConfig.changedSince - ? `"${globalConfig.changedSince}"` - : 'last commit'; - - let msg = _chalk().default.bold( - `No tests found related to files changed since ${ref}.` - ); - - if (_jestUtil().isInteractive) { - msg += _chalk().default.dim( - '\n' + - (globalConfig.watch - ? 'Press `a` to run all tests, or run Jest with `--watchAll`.' - : 'Run Jest without `-o` or with `--all` to run all tests.') - ); - } - - return msg; -} diff --git a/node_modules/@jest/core/build/getNoTestFoundVerbose.d.ts b/node_modules/@jest/core/build/getNoTestFoundVerbose.d.ts deleted file mode 100644 index 5655709cb..000000000 --- a/node_modules/@jest/core/build/getNoTestFoundVerbose.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -import { Config } from '@jest/types'; -import { TestRunData } from './types'; -export default function getNoTestFoundVerbose(testRunData: TestRunData, globalConfig: Config.GlobalConfig): string; -//# sourceMappingURL=getNoTestFoundVerbose.d.ts.map \ No newline at end of file diff --git a/node_modules/@jest/core/build/getNoTestFoundVerbose.d.ts.map b/node_modules/@jest/core/build/getNoTestFoundVerbose.d.ts.map deleted file mode 100644 index e2306769c..000000000 --- a/node_modules/@jest/core/build/getNoTestFoundVerbose.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"getNoTestFoundVerbose.d.ts","sourceRoot":"","sources":["../src/getNoTestFoundVerbose.ts"],"names":[],"mappings":"AAGA,OAAO,EAAC,MAAM,EAAC,MAAM,aAAa,CAAC;AAEnC,OAAO,EAAQ,WAAW,EAAC,MAAM,SAAS,CAAC;AAE3C,MAAM,CAAC,OAAO,UAAU,qBAAqB,CAC3C,WAAW,EAAE,WAAW,EACxB,YAAY,EAAE,MAAM,CAAC,YAAY,GAChC,MAAM,CAqDR"} \ No newline at end of file diff --git a/node_modules/@jest/core/build/getNoTestFoundVerbose.js b/node_modules/@jest/core/build/getNoTestFoundVerbose.js deleted file mode 100644 index f54643c02..000000000 --- a/node_modules/@jest/core/build/getNoTestFoundVerbose.js +++ /dev/null @@ -1,90 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, '__esModule', { - value: true -}); -exports.default = getNoTestFoundVerbose; - -function _chalk() { - const data = _interopRequireDefault(require('chalk')); - - _chalk = function _chalk() { - return data; - }; - - return data; -} - -var _pluralize = _interopRequireDefault(require('./pluralize')); - -function _interopRequireDefault(obj) { - return obj && obj.__esModule ? obj : {default: obj}; -} - -// Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. -function getNoTestFoundVerbose(testRunData, globalConfig) { - const individualResults = testRunData.map(testRun => { - const stats = testRun.matches.stats || {}; - const config = testRun.context.config; - const statsMessage = Object.keys(stats) - .map(key => { - if (key === 'roots' && config.roots.length === 1) { - return null; - } - - const value = config[key]; - - if (value) { - const valueAsString = Array.isArray(value) - ? value.join(', ') - : String(value); - const matches = (0, _pluralize.default)( - 'match', - stats[key] || 0, - 'es' - ); - return ` ${key}: ${_chalk().default.yellow( - valueAsString - )} - ${matches}`; - } - - return null; - }) - .filter(line => line) - .join('\n'); - return testRun.matches.total - ? `In ${_chalk().default.bold(config.rootDir)}\n` + - ` ${(0, _pluralize.default)( - 'file', - testRun.matches.total || 0, - 's' - )} checked.\n` + - statsMessage - : `No files found in ${config.rootDir}.\n` + - `Make sure Jest's configuration does not exclude this directory.` + - `\nTo set up Jest, make sure a package.json file exists.\n` + - `Jest Documentation: ` + - `facebook.github.io/jest/docs/configuration.html`; - }); - let dataMessage; - - if (globalConfig.runTestsByPath) { - dataMessage = `Files: ${globalConfig.nonFlagArgs - .map(p => `"${p}"`) - .join(', ')}`; - } else { - dataMessage = `Pattern: ${_chalk().default.yellow( - globalConfig.testPathPattern - )} - 0 matches`; - } - - return ( - _chalk().default.bold('No tests found, exiting with code 1') + - '\n' + - 'Run with `--passWithNoTests` to exit with code 0' + - '\n' + - individualResults.join('\n') + - '\n' + - dataMessage - ); -} diff --git a/node_modules/@jest/core/build/getNoTestsFoundMessage.d.ts b/node_modules/@jest/core/build/getNoTestsFoundMessage.d.ts deleted file mode 100644 index 86b3124c8..000000000 --- a/node_modules/@jest/core/build/getNoTestsFoundMessage.d.ts +++ /dev/null @@ -1,10 +0,0 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -import { Config } from '@jest/types'; -import { TestRunData } from './types'; -export default function getNoTestsFoundMessage(testRunData: TestRunData, globalConfig: Config.GlobalConfig): string; -//# sourceMappingURL=getNoTestsFoundMessage.d.ts.map \ No newline at end of file diff --git a/node_modules/@jest/core/build/getNoTestsFoundMessage.d.ts.map b/node_modules/@jest/core/build/getNoTestsFoundMessage.d.ts.map deleted file mode 100644 index 2974d6acc..000000000 --- a/node_modules/@jest/core/build/getNoTestsFoundMessage.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"getNoTestsFoundMessage.d.ts","sourceRoot":"","sources":["../src/getNoTestsFoundMessage.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAC,MAAM,EAAC,MAAM,aAAa,CAAC;AACnC,OAAO,EAAC,WAAW,EAAC,MAAM,SAAS,CAAC;AAMpC,MAAM,CAAC,OAAO,UAAU,sBAAsB,CAC5C,WAAW,EAAE,WAAW,EACxB,YAAY,EAAE,MAAM,CAAC,YAAY,GAChC,MAAM,CAUR"} \ No newline at end of file diff --git a/node_modules/@jest/core/build/getNoTestsFoundMessage.js b/node_modules/@jest/core/build/getNoTestsFoundMessage.js deleted file mode 100644 index 055fb8495..000000000 --- a/node_modules/@jest/core/build/getNoTestsFoundMessage.js +++ /dev/null @@ -1,44 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, '__esModule', { - value: true -}); -exports.default = getNoTestsFoundMessage; - -var _getNoTestFound = _interopRequireDefault(require('./getNoTestFound')); - -var _getNoTestFoundRelatedToChangedFiles = _interopRequireDefault( - require('./getNoTestFoundRelatedToChangedFiles') -); - -var _getNoTestFoundVerbose = _interopRequireDefault( - require('./getNoTestFoundVerbose') -); - -var _getNoTestFoundFailed = _interopRequireDefault( - require('./getNoTestFoundFailed') -); - -function _interopRequireDefault(obj) { - return obj && obj.__esModule ? obj : {default: obj}; -} - -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -function getNoTestsFoundMessage(testRunData, globalConfig) { - if (globalConfig.onlyFailures) { - return (0, _getNoTestFoundFailed.default)(); - } - - if (globalConfig.onlyChanged) { - return (0, _getNoTestFoundRelatedToChangedFiles.default)(globalConfig); - } - - return testRunData.length === 1 || globalConfig.verbose - ? (0, _getNoTestFoundVerbose.default)(testRunData, globalConfig) - : (0, _getNoTestFound.default)(testRunData, globalConfig); -} diff --git a/node_modules/@jest/core/build/jest.d.ts b/node_modules/@jest/core/build/jest.d.ts deleted file mode 100644 index 3c9e0ef0b..000000000 --- a/node_modules/@jest/core/build/jest.d.ts +++ /dev/null @@ -1,11 +0,0 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -export { default as SearchSource } from './SearchSource'; -export { default as TestScheduler } from './TestScheduler'; -export { default as TestWatcher } from './TestWatcher'; -export { runCLI } from './cli'; -//# sourceMappingURL=jest.d.ts.map \ No newline at end of file diff --git a/node_modules/@jest/core/build/jest.d.ts.map b/node_modules/@jest/core/build/jest.d.ts.map deleted file mode 100644 index ab6b4386b..000000000 --- a/node_modules/@jest/core/build/jest.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"jest.d.ts","sourceRoot":"","sources":["../src/jest.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAC,OAAO,IAAI,YAAY,EAAC,MAAM,gBAAgB,CAAC;AACvD,OAAO,EAAC,OAAO,IAAI,aAAa,EAAC,MAAM,iBAAiB,CAAC;AACzD,OAAO,EAAC,OAAO,IAAI,WAAW,EAAC,MAAM,eAAe,CAAC;AACrD,OAAO,EAAC,MAAM,EAAC,MAAM,OAAO,CAAC"} \ No newline at end of file diff --git a/node_modules/@jest/core/build/jest.js b/node_modules/@jest/core/build/jest.js deleted file mode 100644 index 4f8598f6e..000000000 --- a/node_modules/@jest/core/build/jest.js +++ /dev/null @@ -1,41 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, '__esModule', { - value: true -}); -Object.defineProperty(exports, 'SearchSource', { - enumerable: true, - get: function get() { - return _SearchSource.default; - } -}); -Object.defineProperty(exports, 'TestScheduler', { - enumerable: true, - get: function get() { - return _TestScheduler.default; - } -}); -Object.defineProperty(exports, 'TestWatcher', { - enumerable: true, - get: function get() { - return _TestWatcher.default; - } -}); -Object.defineProperty(exports, 'runCLI', { - enumerable: true, - get: function get() { - return _cli.runCLI; - } -}); - -var _SearchSource = _interopRequireDefault(require('./SearchSource')); - -var _TestScheduler = _interopRequireDefault(require('./TestScheduler')); - -var _TestWatcher = _interopRequireDefault(require('./TestWatcher')); - -var _cli = require('./cli'); - -function _interopRequireDefault(obj) { - return obj && obj.__esModule ? obj : {default: obj}; -} diff --git a/node_modules/@jest/core/build/lib/active_filters_message.d.ts b/node_modules/@jest/core/build/lib/active_filters_message.d.ts deleted file mode 100644 index 5cc5ea553..000000000 --- a/node_modules/@jest/core/build/lib/active_filters_message.d.ts +++ /dev/null @@ -1,10 +0,0 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -import { Config } from '@jest/types'; -declare const activeFilters: (globalConfig: Config.GlobalConfig, delimiter?: string) => string; -export default activeFilters; -//# sourceMappingURL=active_filters_message.d.ts.map \ No newline at end of file diff --git a/node_modules/@jest/core/build/lib/active_filters_message.d.ts.map b/node_modules/@jest/core/build/lib/active_filters_message.d.ts.map deleted file mode 100644 index aa32bab7d..000000000 --- a/node_modules/@jest/core/build/lib/active_filters_message.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"active_filters_message.d.ts","sourceRoot":"","sources":["../../src/lib/active_filters_message.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,OAAO,EAAC,MAAM,EAAC,MAAM,aAAa,CAAC;AAEnC,QAAA,MAAM,aAAa,mEAuBlB,CAAC;AAEF,eAAe,aAAa,CAAC"} \ No newline at end of file diff --git a/node_modules/@jest/core/build/lib/active_filters_message.js b/node_modules/@jest/core/build/lib/active_filters_message.js deleted file mode 100644 index ae3bafa3d..000000000 --- a/node_modules/@jest/core/build/lib/active_filters_message.js +++ /dev/null @@ -1,55 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, '__esModule', { - value: true -}); -exports.default = void 0; - -function _chalk() { - const data = _interopRequireDefault(require('chalk')); - - _chalk = function _chalk() { - return data; - }; - - return data; -} - -function _interopRequireDefault(obj) { - return obj && obj.__esModule ? obj : {default: obj}; -} - -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -const activeFilters = (globalConfig, delimiter = '\n') => { - const testNamePattern = globalConfig.testNamePattern, - testPathPattern = globalConfig.testPathPattern; - - if (testNamePattern || testPathPattern) { - const filters = [ - testPathPattern - ? _chalk().default.dim('filename ') + - _chalk().default.yellow('/' + testPathPattern + '/') - : null, - testNamePattern - ? _chalk().default.dim('test name ') + - _chalk().default.yellow('/' + testNamePattern + '/') - : null - ] - .filter(f => f) - .join(', '); - const messages = [ - '\n' + _chalk().default.bold('Active Filters: ') + filters - ]; - return messages.filter(message => !!message).join(delimiter); - } - - return ''; -}; - -var _default = activeFilters; -exports.default = _default; diff --git a/node_modules/@jest/core/build/lib/create_context.d.ts b/node_modules/@jest/core/build/lib/create_context.d.ts deleted file mode 100644 index 53a6ee6fc..000000000 --- a/node_modules/@jest/core/build/lib/create_context.d.ts +++ /dev/null @@ -1,10 +0,0 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -import { Config } from '@jest/types'; -declare const _default: (config: Config.ProjectConfig, { hasteFS, moduleMap }: import("jest-haste-map/build/types").HasteMap) => import("jest-runtime/build/types").Context; -export default _default; -//# sourceMappingURL=create_context.d.ts.map \ No newline at end of file diff --git a/node_modules/@jest/core/build/lib/create_context.d.ts.map b/node_modules/@jest/core/build/lib/create_context.d.ts.map deleted file mode 100644 index 80b282215..000000000 --- a/node_modules/@jest/core/build/lib/create_context.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"create_context.d.ts","sourceRoot":"","sources":["../../src/lib/create_context.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAC,MAAM,EAAC,MAAM,aAAa,CAAC;;AAInC,wBAQG"} \ No newline at end of file diff --git a/node_modules/@jest/core/build/lib/create_context.js b/node_modules/@jest/core/build/lib/create_context.js deleted file mode 100644 index dd974afaa..000000000 --- a/node_modules/@jest/core/build/lib/create_context.js +++ /dev/null @@ -1,35 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, '__esModule', { - value: true -}); -exports.default = void 0; - -function _jestRuntime() { - const data = _interopRequireDefault(require('jest-runtime')); - - _jestRuntime = function _jestRuntime() { - return data; - }; - - return data; -} - -function _interopRequireDefault(obj) { - return obj && obj.__esModule ? obj : {default: obj}; -} - -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -var _default = (config, {hasteFS, moduleMap}) => ({ - config, - hasteFS, - moduleMap, - resolver: _jestRuntime().default.createResolver(config, moduleMap) -}); - -exports.default = _default; diff --git a/node_modules/@jest/core/build/lib/handle_deprecation_warnings.d.ts b/node_modules/@jest/core/build/lib/handle_deprecation_warnings.d.ts deleted file mode 100644 index 4f79b44af..000000000 --- a/node_modules/@jest/core/build/lib/handle_deprecation_warnings.d.ts +++ /dev/null @@ -1,10 +0,0 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -/// -declare const _default: (pipe: NodeJS.WriteStream, stdin?: NodeJS.ReadStream) => Promise; -export default _default; -//# sourceMappingURL=handle_deprecation_warnings.d.ts.map \ No newline at end of file diff --git a/node_modules/@jest/core/build/lib/handle_deprecation_warnings.d.ts.map b/node_modules/@jest/core/build/lib/handle_deprecation_warnings.d.ts.map deleted file mode 100644 index 822aa5044..000000000 --- a/node_modules/@jest/core/build/lib/handle_deprecation_warnings.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"handle_deprecation_warnings.d.ts","sourceRoot":"","sources":["../../src/lib/handle_deprecation_warnings.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;;;AAKH,wBA6BK"} \ No newline at end of file diff --git a/node_modules/@jest/core/build/lib/handle_deprecation_warnings.js b/node_modules/@jest/core/build/lib/handle_deprecation_warnings.js deleted file mode 100644 index 615eeeb98..000000000 --- a/node_modules/@jest/core/build/lib/handle_deprecation_warnings.js +++ /dev/null @@ -1,72 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, '__esModule', { - value: true -}); -exports.default = void 0; - -function _chalk() { - const data = _interopRequireDefault(require('chalk')); - - _chalk = function _chalk() { - return data; - }; - - return data; -} - -function _jestWatcher() { - const data = require('jest-watcher'); - - _jestWatcher = function _jestWatcher() { - return data; - }; - - return data; -} - -function _interopRequireDefault(obj) { - return obj && obj.__esModule ? obj : {default: obj}; -} - -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -var _default = (pipe, stdin = process.stdin) => - new Promise((resolve, reject) => { - if (typeof stdin.setRawMode === 'function') { - const messages = [ - _chalk().default.red('There are deprecation warnings.\n'), - _chalk().default.dim(' \u203A Press ') + - 'Enter' + - _chalk().default.dim(' to continue.'), - _chalk().default.dim(' \u203A Press ') + - 'Esc' + - _chalk().default.dim(' to exit.') - ]; - pipe.write(messages.join('\n')); - stdin.setRawMode(true); - stdin.resume(); - stdin.setEncoding('utf8'); - stdin.on('data', key => { - if (key === _jestWatcher().KEYS.ENTER) { - resolve(); - } else if ( - [ - _jestWatcher().KEYS.ESCAPE, - _jestWatcher().KEYS.CONTROL_C, - _jestWatcher().KEYS.CONTROL_D - ].indexOf(key) !== -1 - ) { - reject(); - } - }); - } else { - resolve(); - } - }); - -exports.default = _default; diff --git a/node_modules/@jest/core/build/lib/is_valid_path.d.ts b/node_modules/@jest/core/build/lib/is_valid_path.d.ts deleted file mode 100644 index d0261e1ea..000000000 --- a/node_modules/@jest/core/build/lib/is_valid_path.d.ts +++ /dev/null @@ -1,9 +0,0 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -import { Config } from '@jest/types'; -export default function isValidPath(globalConfig: Config.GlobalConfig, filePath: Config.Path): boolean; -//# sourceMappingURL=is_valid_path.d.ts.map \ No newline at end of file diff --git a/node_modules/@jest/core/build/lib/is_valid_path.d.ts.map b/node_modules/@jest/core/build/lib/is_valid_path.d.ts.map deleted file mode 100644 index 9d057a5ce..000000000 --- a/node_modules/@jest/core/build/lib/is_valid_path.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"is_valid_path.d.ts","sourceRoot":"","sources":["../../src/lib/is_valid_path.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAC,MAAM,EAAC,MAAM,aAAa,CAAC;AAGnC,MAAM,CAAC,OAAO,UAAU,WAAW,CACjC,YAAY,EAAE,MAAM,CAAC,YAAY,EACjC,QAAQ,EAAE,MAAM,CAAC,IAAI,WAMtB"} \ No newline at end of file diff --git a/node_modules/@jest/core/build/lib/is_valid_path.js b/node_modules/@jest/core/build/lib/is_valid_path.js deleted file mode 100644 index 7e7c50d40..000000000 --- a/node_modules/@jest/core/build/lib/is_valid_path.js +++ /dev/null @@ -1,29 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, '__esModule', { - value: true -}); -exports.default = isValidPath; - -function _jestSnapshot() { - const data = require('jest-snapshot'); - - _jestSnapshot = function _jestSnapshot() { - return data; - }; - - return data; -} - -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -function isValidPath(globalConfig, filePath) { - return ( - !filePath.includes(globalConfig.coverageDirectory) && - !(0, _jestSnapshot().isSnapshotPath)(filePath) - ); -} diff --git a/node_modules/@jest/core/build/lib/log_debug_messages.d.ts b/node_modules/@jest/core/build/lib/log_debug_messages.d.ts deleted file mode 100644 index 81d9937fb..000000000 --- a/node_modules/@jest/core/build/lib/log_debug_messages.d.ts +++ /dev/null @@ -1,10 +0,0 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -/// -import { Config } from '@jest/types'; -export default function logDebugMessages(globalConfig: Config.GlobalConfig, configs: Array | Config.ProjectConfig, outputStream: NodeJS.WriteStream): void; -//# sourceMappingURL=log_debug_messages.d.ts.map \ No newline at end of file diff --git a/node_modules/@jest/core/build/lib/log_debug_messages.d.ts.map b/node_modules/@jest/core/build/lib/log_debug_messages.d.ts.map deleted file mode 100644 index 7a2dec008..000000000 --- a/node_modules/@jest/core/build/lib/log_debug_messages.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"log_debug_messages.d.ts","sourceRoot":"","sources":["../../src/lib/log_debug_messages.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;;AAEH,OAAO,EAAC,MAAM,EAAC,MAAM,aAAa,CAAC;AAInC,MAAM,CAAC,OAAO,UAAU,gBAAgB,CACtC,YAAY,EAAE,MAAM,CAAC,YAAY,EACjC,OAAO,EAAE,KAAK,CAAC,MAAM,CAAC,aAAa,CAAC,GAAG,MAAM,CAAC,aAAa,EAC3D,YAAY,EAAE,MAAM,CAAC,WAAW,GAC/B,IAAI,CAON"} \ No newline at end of file diff --git a/node_modules/@jest/core/build/lib/log_debug_messages.js b/node_modules/@jest/core/build/lib/log_debug_messages.js deleted file mode 100644 index d465e51b3..000000000 --- a/node_modules/@jest/core/build/lib/log_debug_messages.js +++ /dev/null @@ -1,23 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, '__esModule', { - value: true -}); -exports.default = logDebugMessages; - -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -const VERSION = require('../../package.json').version; - -function logDebugMessages(globalConfig, configs, outputStream) { - const output = { - configs, - globalConfig, - version: VERSION - }; - outputStream.write(JSON.stringify(output, null, ' ') + '\n'); -} diff --git a/node_modules/@jest/core/build/lib/update_global_config.d.ts b/node_modules/@jest/core/build/lib/update_global_config.d.ts deleted file mode 100644 index 5127c2af0..000000000 --- a/node_modules/@jest/core/build/lib/update_global_config.d.ts +++ /dev/null @@ -1,12 +0,0 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -import { Config } from '@jest/types'; -declare const _default: (globalConfig: Config.GlobalConfig, options?: Partial & { - mode: "watch" | "watchAll"; -}> & Partial>) => Config.GlobalConfig; -export default _default; -//# sourceMappingURL=update_global_config.d.ts.map \ No newline at end of file diff --git a/node_modules/@jest/core/build/lib/update_global_config.d.ts.map b/node_modules/@jest/core/build/lib/update_global_config.d.ts.map deleted file mode 100644 index f26aa2497..000000000 --- a/node_modules/@jest/core/build/lib/update_global_config.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"update_global_config.d.ts","sourceRoot":"","sources":["../../src/lib/update_global_config.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,OAAO,EAAC,MAAM,EAAC,MAAM,aAAa,CAAC;;;;AAOnC,wBA4FE"} \ No newline at end of file diff --git a/node_modules/@jest/core/build/lib/update_global_config.js b/node_modules/@jest/core/build/lib/update_global_config.js deleted file mode 100644 index 7f7953cf9..000000000 --- a/node_modules/@jest/core/build/lib/update_global_config.js +++ /dev/null @@ -1,142 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, '__esModule', { - value: true -}); -exports.default = void 0; - -function _jestRegexUtil() { - const data = require('jest-regex-util'); - - _jestRegexUtil = function _jestRegexUtil() { - return data; - }; - - return data; -} - -function _objectSpread(target) { - for (var i = 1; i < arguments.length; i++) { - var source = arguments[i] != null ? arguments[i] : {}; - var ownKeys = Object.keys(source); - if (typeof Object.getOwnPropertySymbols === 'function') { - ownKeys = ownKeys.concat( - Object.getOwnPropertySymbols(source).filter(function(sym) { - return Object.getOwnPropertyDescriptor(source, sym).enumerable; - }) - ); - } - ownKeys.forEach(function(key) { - _defineProperty(target, key, source[key]); - }); - } - return target; -} - -function _defineProperty(obj, key, value) { - if (key in obj) { - Object.defineProperty(obj, key, { - value: value, - enumerable: true, - configurable: true, - writable: true - }); - } else { - obj[key] = value; - } - return obj; -} - -var _default = (globalConfig, options = {}) => { - const newConfig = _objectSpread({}, globalConfig); - - if (options.mode === 'watch') { - newConfig.watch = true; - newConfig.watchAll = false; - } else if (options.mode === 'watchAll') { - newConfig.watch = false; - newConfig.watchAll = true; - } - - if (options.testNamePattern !== undefined) { - newConfig.testNamePattern = options.testNamePattern || ''; - } - - if (options.testPathPattern !== undefined) { - newConfig.testPathPattern = - (0, _jestRegexUtil().replacePathSepForRegex)(options.testPathPattern) || - ''; - } - - newConfig.onlyChanged = false; - newConfig.onlyChanged = - !newConfig.watchAll && - !newConfig.testNamePattern && - !newConfig.testPathPattern; - - if (typeof options.bail === 'boolean') { - newConfig.bail = options.bail ? 1 : 0; - } else if (options.bail !== undefined) { - newConfig.bail = options.bail; - } - - if (options.changedSince !== undefined) { - newConfig.changedSince = options.changedSince; - } - - if (options.collectCoverage !== undefined) { - newConfig.collectCoverage = options.collectCoverage || false; - } - - if (options.collectCoverageFrom !== undefined) { - newConfig.collectCoverageFrom = options.collectCoverageFrom; - } - - if (options.collectCoverageOnlyFrom !== undefined) { - newConfig.collectCoverageOnlyFrom = options.collectCoverageOnlyFrom; - } - - if (options.coverageDirectory !== undefined) { - newConfig.coverageDirectory = options.coverageDirectory; - } - - if (options.coverageReporters !== undefined) { - newConfig.coverageReporters = options.coverageReporters; - } - - if (options.noSCM) { - newConfig.noSCM = true; - } - - if (options.notify !== undefined) { - newConfig.notify = options.notify || false; - } - - if (options.notifyMode !== undefined) { - newConfig.notifyMode = options.notifyMode; - } - - if (options.onlyFailures !== undefined) { - newConfig.onlyFailures = options.onlyFailures || false; - } - - if (options.passWithNoTests !== undefined) { - newConfig.passWithNoTests = true; - } - - if (options.reporters !== undefined) { - newConfig.reporters = options.reporters; - } - - if (options.updateSnapshot !== undefined) { - newConfig.updateSnapshot = options.updateSnapshot; - } - - if (options.verbose !== undefined) { - newConfig.verbose = options.verbose || false; - } - - return Object.freeze(newConfig); -}; - -exports.default = _default; diff --git a/node_modules/@jest/core/build/lib/watch_plugins_helpers.d.ts b/node_modules/@jest/core/build/lib/watch_plugins_helpers.d.ts deleted file mode 100644 index cd71550c5..000000000 --- a/node_modules/@jest/core/build/lib/watch_plugins_helpers.d.ts +++ /dev/null @@ -1,11 +0,0 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -import { Config } from '@jest/types'; -import { WatchPlugin, UsageData } from 'jest-watcher'; -export declare const filterInteractivePlugins: (watchPlugins: WatchPlugin[], globalConfig: Config.GlobalConfig) => WatchPlugin[]; -export declare const getSortedUsageRows: (watchPlugins: WatchPlugin[], globalConfig: Config.GlobalConfig) => UsageData[]; -//# sourceMappingURL=watch_plugins_helpers.d.ts.map \ No newline at end of file diff --git a/node_modules/@jest/core/build/lib/watch_plugins_helpers.d.ts.map b/node_modules/@jest/core/build/lib/watch_plugins_helpers.d.ts.map deleted file mode 100644 index c9d393895..000000000 --- a/node_modules/@jest/core/build/lib/watch_plugins_helpers.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"watch_plugins_helpers.d.ts","sourceRoot":"","sources":["../../src/lib/watch_plugins_helpers.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAC,MAAM,EAAC,MAAM,aAAa,CAAC;AACnC,OAAO,EAAC,WAAW,EAAE,SAAS,EAAC,MAAM,cAAc,CAAC;AAEpD,eAAO,MAAM,wBAAwB,mFAiBpC,CAAC;AAMF,eAAO,MAAM,kBAAkB,iFAyBV,CAAC"} \ No newline at end of file diff --git a/node_modules/@jest/core/build/lib/watch_plugins_helpers.js b/node_modules/@jest/core/build/lib/watch_plugins_helpers.js deleted file mode 100644 index e1933a1d2..000000000 --- a/node_modules/@jest/core/build/lib/watch_plugins_helpers.js +++ /dev/null @@ -1,62 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, '__esModule', { - value: true -}); -exports.getSortedUsageRows = exports.filterInteractivePlugins = void 0; - -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -const filterInteractivePlugins = (watchPlugins, globalConfig) => { - const usageInfos = watchPlugins.map( - p => p.getUsageInfo && p.getUsageInfo(globalConfig) - ); - return watchPlugins.filter((_plugin, i) => { - const usageInfo = usageInfos[i]; - - if (usageInfo) { - const key = usageInfo.key; - return !usageInfos.slice(i + 1).some(u => !!u && key === u.key); - } - - return false; - }); -}; - -exports.filterInteractivePlugins = filterInteractivePlugins; - -function notEmpty(value) { - return value != null; -} - -const getSortedUsageRows = (watchPlugins, globalConfig) => - filterInteractivePlugins(watchPlugins, globalConfig) - .sort((a, b) => { - if (a.isInternal && b.isInternal) { - // internal plugins in the order we specify them - return 0; - } - - if (a.isInternal !== b.isInternal) { - // external plugins afterwards - return a.isInternal ? -1 : 1; - } - - const usageInfoA = a.getUsageInfo && a.getUsageInfo(globalConfig); - const usageInfoB = b.getUsageInfo && b.getUsageInfo(globalConfig); - - if (usageInfoA && usageInfoB) { - // external plugins in alphabetical order - return usageInfoA.key.localeCompare(usageInfoB.key); - } - - return 0; - }) - .map(p => p.getUsageInfo && p.getUsageInfo(globalConfig)) - .filter(notEmpty); - -exports.getSortedUsageRows = getSortedUsageRows; diff --git a/node_modules/@jest/core/build/plugins/quit.d.ts b/node_modules/@jest/core/build/plugins/quit.d.ts deleted file mode 100644 index 43deb8762..000000000 --- a/node_modules/@jest/core/build/plugins/quit.d.ts +++ /dev/null @@ -1,22 +0,0 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -/// -import { BaseWatchPlugin } from 'jest-watcher'; -declare class QuitPlugin extends BaseWatchPlugin { - isInternal: true; - constructor(options: { - stdin: NodeJS.ReadStream; - stdout: NodeJS.WriteStream; - }); - run(): Promise; - getUsageInfo(): { - key: string; - prompt: string; - }; -} -export default QuitPlugin; -//# sourceMappingURL=quit.d.ts.map \ No newline at end of file diff --git a/node_modules/@jest/core/build/plugins/quit.d.ts.map b/node_modules/@jest/core/build/plugins/quit.d.ts.map deleted file mode 100644 index da0cbef3d..000000000 --- a/node_modules/@jest/core/build/plugins/quit.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"quit.d.ts","sourceRoot":"","sources":["../../src/plugins/quit.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;;AAEH,OAAO,EAAC,eAAe,EAAC,MAAM,cAAc,CAAC;AAE7C,cAAM,UAAW,SAAQ,eAAe;IACtC,UAAU,EAAE,IAAI,CAAC;gBAEL,OAAO,EAAE;QAAC,KAAK,EAAE,MAAM,CAAC,UAAU,CAAC;QAAC,MAAM,EAAE,MAAM,CAAC,WAAW,CAAA;KAAC;IAKrE,GAAG;IAQT,YAAY;;;;CAMb;AAED,eAAe,UAAU,CAAC"} \ No newline at end of file diff --git a/node_modules/@jest/core/build/plugins/quit.js b/node_modules/@jest/core/build/plugins/quit.js deleted file mode 100644 index 133dff2fb..000000000 --- a/node_modules/@jest/core/build/plugins/quit.js +++ /dev/null @@ -1,96 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, '__esModule', { - value: true -}); -exports.default = void 0; - -function _jestWatcher() { - const data = require('jest-watcher'); - - _jestWatcher = function _jestWatcher() { - return data; - }; - - return data; -} - -function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { - try { - var info = gen[key](arg); - var value = info.value; - } catch (error) { - reject(error); - return; - } - if (info.done) { - resolve(value); - } else { - Promise.resolve(value).then(_next, _throw); - } -} - -function _asyncToGenerator(fn) { - return function() { - var self = this, - args = arguments; - return new Promise(function(resolve, reject) { - var gen = fn.apply(self, args); - function _next(value) { - asyncGeneratorStep(gen, resolve, reject, _next, _throw, 'next', value); - } - function _throw(err) { - asyncGeneratorStep(gen, resolve, reject, _next, _throw, 'throw', err); - } - _next(undefined); - }); - }; -} - -function _defineProperty(obj, key, value) { - if (key in obj) { - Object.defineProperty(obj, key, { - value: value, - enumerable: true, - configurable: true, - writable: true - }); - } else { - obj[key] = value; - } - return obj; -} - -class QuitPlugin extends _jestWatcher().BaseWatchPlugin { - constructor(options) { - super(options); - - _defineProperty(this, 'isInternal', void 0); - - this.isInternal = true; - } - - run() { - var _this = this; - - return _asyncToGenerator(function*() { - if (typeof _this._stdin.setRawMode === 'function') { - _this._stdin.setRawMode(false); - } - - _this._stdout.write('\n'); - - process.exit(0); - })(); - } - - getUsageInfo() { - return { - key: 'q', - prompt: 'quit watch mode' - }; - } -} - -var _default = QuitPlugin; -exports.default = _default; diff --git a/node_modules/@jest/core/build/plugins/test_name_pattern.d.ts b/node_modules/@jest/core/build/plugins/test_name_pattern.d.ts deleted file mode 100644 index 7ad78348d..000000000 --- a/node_modules/@jest/core/build/plugins/test_name_pattern.d.ts +++ /dev/null @@ -1,25 +0,0 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -/// -import { Config } from '@jest/types'; -import { BaseWatchPlugin, Prompt, UpdateConfigCallback } from 'jest-watcher'; -declare class TestNamePatternPlugin extends BaseWatchPlugin { - _prompt: Prompt; - isInternal: true; - constructor(options: { - stdin: NodeJS.ReadStream; - stdout: NodeJS.WriteStream; - }); - getUsageInfo(): { - key: string; - prompt: string; - }; - onKey(key: string): void; - run(globalConfig: Config.GlobalConfig, updateConfigAndRun: UpdateConfigCallback): Promise; -} -export default TestNamePatternPlugin; -//# sourceMappingURL=test_name_pattern.d.ts.map \ No newline at end of file diff --git a/node_modules/@jest/core/build/plugins/test_name_pattern.d.ts.map b/node_modules/@jest/core/build/plugins/test_name_pattern.d.ts.map deleted file mode 100644 index a5445dacd..000000000 --- a/node_modules/@jest/core/build/plugins/test_name_pattern.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"test_name_pattern.d.ts","sourceRoot":"","sources":["../../src/plugins/test_name_pattern.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;;AAEH,OAAO,EAAC,MAAM,EAAC,MAAM,aAAa,CAAC;AACnC,OAAO,EAAC,eAAe,EAAE,MAAM,EAAE,oBAAoB,EAAC,MAAM,cAAc,CAAC;AAI3E,cAAM,qBAAsB,SAAQ,eAAe;IACjD,OAAO,EAAE,MAAM,CAAC;IAChB,UAAU,EAAE,IAAI,CAAC;gBAEL,OAAO,EAAE;QAAC,KAAK,EAAE,MAAM,CAAC,UAAU,CAAC;QAAC,MAAM,EAAE,MAAM,CAAC,WAAW,CAAA;KAAC;IAM3E,YAAY;;;;IAOZ,KAAK,CAAC,GAAG,EAAE,MAAM;IAIjB,GAAG,CACD,YAAY,EAAE,MAAM,CAAC,YAAY,EACjC,kBAAkB,EAAE,oBAAoB,GACvC,OAAO,CAAC,IAAI,CAAC;CAmBjB;AAED,eAAe,qBAAqB,CAAC"} \ No newline at end of file diff --git a/node_modules/@jest/core/build/plugins/test_name_pattern.js b/node_modules/@jest/core/build/plugins/test_name_pattern.js deleted file mode 100644 index 7f5c55eac..000000000 --- a/node_modules/@jest/core/build/plugins/test_name_pattern.js +++ /dev/null @@ -1,91 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, '__esModule', { - value: true -}); -exports.default = void 0; - -function _jestWatcher() { - const data = require('jest-watcher'); - - _jestWatcher = function _jestWatcher() { - return data; - }; - - return data; -} - -var _TestNamePatternPrompt = _interopRequireDefault( - require('../TestNamePatternPrompt') -); - -var _active_filters_message = _interopRequireDefault( - require('../lib/active_filters_message') -); - -function _interopRequireDefault(obj) { - return obj && obj.__esModule ? obj : {default: obj}; -} - -function _defineProperty(obj, key, value) { - if (key in obj) { - Object.defineProperty(obj, key, { - value: value, - enumerable: true, - configurable: true, - writable: true - }); - } else { - obj[key] = value; - } - return obj; -} - -class TestNamePatternPlugin extends _jestWatcher().BaseWatchPlugin { - constructor(options) { - super(options); - - _defineProperty(this, '_prompt', void 0); - - _defineProperty(this, 'isInternal', void 0); - - this._prompt = new (_jestWatcher()).Prompt(); - this.isInternal = true; - } - - getUsageInfo() { - return { - key: 't', - prompt: 'filter by a test name regex pattern' - }; - } - - onKey(key) { - this._prompt.put(key); - } - - run(globalConfig, updateConfigAndRun) { - return new Promise((res, rej) => { - const testNamePatternPrompt = new _TestNamePatternPrompt.default( - this._stdout, - this._prompt - ); - testNamePatternPrompt.run( - value => { - updateConfigAndRun({ - mode: 'watch', - testNamePattern: value - }); - res(); - }, - rej, - { - header: (0, _active_filters_message.default)(globalConfig) - } - ); - }); - } -} - -var _default = TestNamePatternPlugin; -exports.default = _default; diff --git a/node_modules/@jest/core/build/plugins/test_path_pattern.d.ts b/node_modules/@jest/core/build/plugins/test_path_pattern.d.ts deleted file mode 100644 index 86b72096d..000000000 --- a/node_modules/@jest/core/build/plugins/test_path_pattern.d.ts +++ /dev/null @@ -1,25 +0,0 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -/// -import { Config } from '@jest/types'; -import { BaseWatchPlugin, UpdateConfigCallback } from 'jest-watcher'; -declare class TestPathPatternPlugin extends BaseWatchPlugin { - private _prompt; - isInternal: true; - constructor(options: { - stdin: NodeJS.ReadStream; - stdout: NodeJS.WriteStream; - }); - getUsageInfo(): { - key: string; - prompt: string; - }; - onKey(key: string): void; - run(globalConfig: Config.GlobalConfig, updateConfigAndRun: UpdateConfigCallback): Promise; -} -export default TestPathPatternPlugin; -//# sourceMappingURL=test_path_pattern.d.ts.map \ No newline at end of file diff --git a/node_modules/@jest/core/build/plugins/test_path_pattern.d.ts.map b/node_modules/@jest/core/build/plugins/test_path_pattern.d.ts.map deleted file mode 100644 index fb6b26183..000000000 --- a/node_modules/@jest/core/build/plugins/test_path_pattern.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"test_path_pattern.d.ts","sourceRoot":"","sources":["../../src/plugins/test_path_pattern.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;;AAEH,OAAO,EAAC,MAAM,EAAC,MAAM,aAAa,CAAC;AACnC,OAAO,EAAC,eAAe,EAAU,oBAAoB,EAAC,MAAM,cAAc,CAAC;AAI3E,cAAM,qBAAsB,SAAQ,eAAe;IACjD,OAAO,CAAC,OAAO,CAAS;IACxB,UAAU,EAAE,IAAI,CAAC;gBAEL,OAAO,EAAE;QAAC,KAAK,EAAE,MAAM,CAAC,UAAU,CAAC;QAAC,MAAM,EAAE,MAAM,CAAC,WAAW,CAAA;KAAC;IAM3E,YAAY;;;;IAOZ,KAAK,CAAC,GAAG,EAAE,MAAM;IAIjB,GAAG,CACD,YAAY,EAAE,MAAM,CAAC,YAAY,EACjC,kBAAkB,EAAE,oBAAoB,GACvC,OAAO,CAAC,IAAI,CAAC;CAmBjB;AAED,eAAe,qBAAqB,CAAC"} \ No newline at end of file diff --git a/node_modules/@jest/core/build/plugins/test_path_pattern.js b/node_modules/@jest/core/build/plugins/test_path_pattern.js deleted file mode 100644 index bef960a3b..000000000 --- a/node_modules/@jest/core/build/plugins/test_path_pattern.js +++ /dev/null @@ -1,91 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, '__esModule', { - value: true -}); -exports.default = void 0; - -function _jestWatcher() { - const data = require('jest-watcher'); - - _jestWatcher = function _jestWatcher() { - return data; - }; - - return data; -} - -var _TestPathPatternPrompt = _interopRequireDefault( - require('../TestPathPatternPrompt') -); - -var _active_filters_message = _interopRequireDefault( - require('../lib/active_filters_message') -); - -function _interopRequireDefault(obj) { - return obj && obj.__esModule ? obj : {default: obj}; -} - -function _defineProperty(obj, key, value) { - if (key in obj) { - Object.defineProperty(obj, key, { - value: value, - enumerable: true, - configurable: true, - writable: true - }); - } else { - obj[key] = value; - } - return obj; -} - -class TestPathPatternPlugin extends _jestWatcher().BaseWatchPlugin { - constructor(options) { - super(options); - - _defineProperty(this, '_prompt', void 0); - - _defineProperty(this, 'isInternal', void 0); - - this._prompt = new (_jestWatcher()).Prompt(); - this.isInternal = true; - } - - getUsageInfo() { - return { - key: 'p', - prompt: 'filter by a filename regex pattern' - }; - } - - onKey(key) { - this._prompt.put(key); - } - - run(globalConfig, updateConfigAndRun) { - return new Promise((res, rej) => { - const testPathPatternPrompt = new _TestPathPatternPrompt.default( - this._stdout, - this._prompt - ); - testPathPatternPrompt.run( - value => { - updateConfigAndRun({ - mode: 'watch', - testPathPattern: value - }); - res(); - }, - rej, - { - header: (0, _active_filters_message.default)(globalConfig) - } - ); - }); - } -} - -var _default = TestPathPatternPlugin; -exports.default = _default; diff --git a/node_modules/@jest/core/build/plugins/update_snapshots.d.ts b/node_modules/@jest/core/build/plugins/update_snapshots.d.ts deleted file mode 100644 index 1baa1f156..000000000 --- a/node_modules/@jest/core/build/plugins/update_snapshots.d.ts +++ /dev/null @@ -1,25 +0,0 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -/// -import { Config } from '@jest/types'; -import { BaseWatchPlugin, JestHookSubscriber, UpdateConfigCallback } from 'jest-watcher'; -declare class UpdateSnapshotsPlugin extends BaseWatchPlugin { - private _hasSnapshotFailure; - isInternal: true; - constructor(options: { - stdin: NodeJS.ReadStream; - stdout: NodeJS.WriteStream; - }); - run(_globalConfig: Config.GlobalConfig, updateConfigAndRun: UpdateConfigCallback): Promise; - apply(hooks: JestHookSubscriber): void; - getUsageInfo(): { - key: string; - prompt: string; - } | null; -} -export default UpdateSnapshotsPlugin; -//# sourceMappingURL=update_snapshots.d.ts.map \ No newline at end of file diff --git a/node_modules/@jest/core/build/plugins/update_snapshots.d.ts.map b/node_modules/@jest/core/build/plugins/update_snapshots.d.ts.map deleted file mode 100644 index 895b4519b..000000000 --- a/node_modules/@jest/core/build/plugins/update_snapshots.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"update_snapshots.d.ts","sourceRoot":"","sources":["../../src/plugins/update_snapshots.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;;AAEH,OAAO,EAAC,MAAM,EAAC,MAAM,aAAa,CAAC;AACnC,OAAO,EACL,eAAe,EACf,kBAAkB,EAClB,oBAAoB,EACrB,MAAM,cAAc,CAAC;AAEtB,cAAM,qBAAsB,SAAQ,eAAe;IACjD,OAAO,CAAC,mBAAmB,CAAU;IACrC,UAAU,EAAE,IAAI,CAAC;gBAEL,OAAO,EAAE;QAAC,KAAK,EAAE,MAAM,CAAC,UAAU,CAAC;QAAC,MAAM,EAAE,MAAM,CAAC,WAAW,CAAA;KAAC;IAM3E,GAAG,CACD,aAAa,EAAE,MAAM,CAAC,YAAY,EAClC,kBAAkB,EAAE,oBAAoB,GACvC,OAAO,CAAC,OAAO,CAAC;IAKnB,KAAK,CAAC,KAAK,EAAE,kBAAkB;IAM/B,YAAY;;;;CAUb;AAED,eAAe,qBAAqB,CAAC"} \ No newline at end of file diff --git a/node_modules/@jest/core/build/plugins/update_snapshots.js b/node_modules/@jest/core/build/plugins/update_snapshots.js deleted file mode 100644 index e257d0440..000000000 --- a/node_modules/@jest/core/build/plugins/update_snapshots.js +++ /dev/null @@ -1,70 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, '__esModule', { - value: true -}); -exports.default = void 0; - -function _jestWatcher() { - const data = require('jest-watcher'); - - _jestWatcher = function _jestWatcher() { - return data; - }; - - return data; -} - -function _defineProperty(obj, key, value) { - if (key in obj) { - Object.defineProperty(obj, key, { - value: value, - enumerable: true, - configurable: true, - writable: true - }); - } else { - obj[key] = value; - } - return obj; -} - -class UpdateSnapshotsPlugin extends _jestWatcher().BaseWatchPlugin { - constructor(options) { - super(options); - - _defineProperty(this, '_hasSnapshotFailure', void 0); - - _defineProperty(this, 'isInternal', void 0); - - this.isInternal = true; - this._hasSnapshotFailure = false; - } - - run(_globalConfig, updateConfigAndRun) { - updateConfigAndRun({ - updateSnapshot: 'all' - }); - return Promise.resolve(false); - } - - apply(hooks) { - hooks.onTestRunComplete(results => { - this._hasSnapshotFailure = results.snapshot.failure; - }); - } - - getUsageInfo() { - if (this._hasSnapshotFailure) { - return { - key: 'u', - prompt: 'update failing snapshots' - }; - } - - return null; - } -} - -var _default = UpdateSnapshotsPlugin; -exports.default = _default; diff --git a/node_modules/@jest/core/build/plugins/update_snapshots_interactive.d.ts b/node_modules/@jest/core/build/plugins/update_snapshots_interactive.d.ts deleted file mode 100644 index 50969aab2..000000000 --- a/node_modules/@jest/core/build/plugins/update_snapshots_interactive.d.ts +++ /dev/null @@ -1,24 +0,0 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -import { Config } from '@jest/types'; -import { AggregatedResult, AssertionLocation } from '@jest/test-result'; -import { BaseWatchPlugin, JestHookSubscriber } from 'jest-watcher'; -declare class UpdateSnapshotInteractivePlugin extends BaseWatchPlugin { - private _snapshotInteractiveMode; - private _failedSnapshotTestAssertions; - isInternal: true; - getFailedSnapshotTestAssertions(testResults: AggregatedResult): Array; - apply(hooks: JestHookSubscriber): void; - onKey(key: string): void; - run(_globalConfig: Config.GlobalConfig, updateConfigAndRun: Function): Promise; - getUsageInfo(): { - key: string; - prompt: string; - } | null; -} -export default UpdateSnapshotInteractivePlugin; -//# sourceMappingURL=update_snapshots_interactive.d.ts.map \ No newline at end of file diff --git a/node_modules/@jest/core/build/plugins/update_snapshots_interactive.d.ts.map b/node_modules/@jest/core/build/plugins/update_snapshots_interactive.d.ts.map deleted file mode 100644 index e8a903952..000000000 --- a/node_modules/@jest/core/build/plugins/update_snapshots_interactive.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"update_snapshots_interactive.d.ts","sourceRoot":"","sources":["../../src/plugins/update_snapshots_interactive.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAC,MAAM,EAAC,MAAM,aAAa,CAAC;AACnC,OAAO,EAAC,gBAAgB,EAAE,iBAAiB,EAAC,MAAM,mBAAmB,CAAC;AACtE,OAAO,EAAC,eAAe,EAAE,kBAAkB,EAAC,MAAM,cAAc,CAAC;AAGjE,cAAM,+BAAgC,SAAQ,eAAe;IAC3D,OAAO,CAAC,wBAAwB,CAE9B;IACF,OAAO,CAAC,6BAA6B,CAAgC;IACrE,UAAU,EAAE,IAAI,CAAQ;IAExB,+BAA+B,CAC7B,WAAW,EAAE,gBAAgB,GAC5B,KAAK,CAAC,iBAAiB,CAAC;IAsB3B,KAAK,CAAC,KAAK,EAAE,kBAAkB;IAW/B,KAAK,CAAC,GAAG,EAAE,MAAM;IAMjB,GAAG,CACD,aAAa,EAAE,MAAM,CAAC,YAAY,EAClC,kBAAkB,EAAE,QAAQ,GAC3B,OAAO,CAAC,IAAI,CAAC;IAwBhB,YAAY;;;;CAab;AAED,eAAe,+BAA+B,CAAC"} \ No newline at end of file diff --git a/node_modules/@jest/core/build/plugins/update_snapshots_interactive.js b/node_modules/@jest/core/build/plugins/update_snapshots_interactive.js deleted file mode 100644 index f274150cb..000000000 --- a/node_modules/@jest/core/build/plugins/update_snapshots_interactive.js +++ /dev/null @@ -1,135 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, '__esModule', { - value: true -}); -exports.default = void 0; - -function _jestWatcher() { - const data = require('jest-watcher'); - - _jestWatcher = function _jestWatcher() { - return data; - }; - - return data; -} - -var _SnapshotInteractiveMode = _interopRequireDefault( - require('../SnapshotInteractiveMode') -); - -function _interopRequireDefault(obj) { - return obj && obj.__esModule ? obj : {default: obj}; -} - -function _defineProperty(obj, key, value) { - if (key in obj) { - Object.defineProperty(obj, key, { - value: value, - enumerable: true, - configurable: true, - writable: true - }); - } else { - obj[key] = value; - } - return obj; -} - -class UpdateSnapshotInteractivePlugin extends _jestWatcher().BaseWatchPlugin { - constructor(...args) { - super(...args); - - _defineProperty( - this, - '_snapshotInteractiveMode', - new _SnapshotInteractiveMode.default(this._stdout) - ); - - _defineProperty(this, '_failedSnapshotTestAssertions', []); - - _defineProperty(this, 'isInternal', true); - } - - getFailedSnapshotTestAssertions(testResults) { - const failedTestPaths = []; - - if (testResults.numFailedTests === 0 || !testResults.testResults) { - return failedTestPaths; - } - - testResults.testResults.forEach(testResult => { - if (testResult.snapshot && testResult.snapshot.unmatched) { - testResult.testResults.forEach(result => { - if (result.status === 'failed') { - failedTestPaths.push({ - fullName: result.fullName, - path: testResult.testFilePath - }); - } - }); - } - }); - return failedTestPaths; - } - - apply(hooks) { - hooks.onTestRunComplete(results => { - this._failedSnapshotTestAssertions = this.getFailedSnapshotTestAssertions( - results - ); - - if (this._snapshotInteractiveMode.isActive()) { - this._snapshotInteractiveMode.updateWithResults(results); - } - }); - } - - onKey(key) { - if (this._snapshotInteractiveMode.isActive()) { - this._snapshotInteractiveMode.put(key); - } - } - - run(_globalConfig, updateConfigAndRun) { - if (this._failedSnapshotTestAssertions.length) { - return new Promise(res => { - this._snapshotInteractiveMode.run( - this._failedSnapshotTestAssertions, - (assertion, shouldUpdateSnapshot) => { - updateConfigAndRun({ - mode: 'watch', - testNamePattern: assertion ? `^${assertion.fullName}$` : '', - testPathPattern: assertion ? assertion.path : '', - updateSnapshot: shouldUpdateSnapshot ? 'all' : 'none' - }); - - if (!this._snapshotInteractiveMode.isActive()) { - res(); - } - } - ); - }); - } else { - return Promise.resolve(); - } - } - - getUsageInfo() { - if ( - this._failedSnapshotTestAssertions && - this._failedSnapshotTestAssertions.length > 0 - ) { - return { - key: 'i', - prompt: 'update failing snapshots interactively' - }; - } - - return null; - } -} - -var _default = UpdateSnapshotInteractivePlugin; -exports.default = _default; diff --git a/node_modules/@jest/core/build/pluralize.d.ts b/node_modules/@jest/core/build/pluralize.d.ts deleted file mode 100644 index 86426e8ed..000000000 --- a/node_modules/@jest/core/build/pluralize.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -export default function pluralize(word: string, count: number, ending: string): string; -//# sourceMappingURL=pluralize.d.ts.map \ No newline at end of file diff --git a/node_modules/@jest/core/build/pluralize.d.ts.map b/node_modules/@jest/core/build/pluralize.d.ts.map deleted file mode 100644 index 3075ccb7c..000000000 --- a/node_modules/@jest/core/build/pluralize.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"pluralize.d.ts","sourceRoot":"","sources":["../src/pluralize.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,OAAO,UAAU,SAAS,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,UAE5E"} \ No newline at end of file diff --git a/node_modules/@jest/core/build/pluralize.js b/node_modules/@jest/core/build/pluralize.js deleted file mode 100644 index 17bbac415..000000000 --- a/node_modules/@jest/core/build/pluralize.js +++ /dev/null @@ -1,11 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, '__esModule', { - value: true -}); -exports.default = pluralize; - -// Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. -function pluralize(word, count, ending) { - return `${count} ${word}${count === 1 ? '' : ending}`; -} diff --git a/node_modules/@jest/core/build/runGlobalHook.d.ts b/node_modules/@jest/core/build/runGlobalHook.d.ts deleted file mode 100644 index d13c154f9..000000000 --- a/node_modules/@jest/core/build/runGlobalHook.d.ts +++ /dev/null @@ -1,14 +0,0 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -import { Config } from '@jest/types'; -declare const _default: ({ allTests, globalConfig, moduleName, }: { - allTests: import("jest-runner/build/types").Test[]; - globalConfig: Config.GlobalConfig; - moduleName: "globalSetup" | "globalTeardown"; -}) => Promise; -export default _default; -//# sourceMappingURL=runGlobalHook.d.ts.map \ No newline at end of file diff --git a/node_modules/@jest/core/build/runGlobalHook.d.ts.map b/node_modules/@jest/core/build/runGlobalHook.d.ts.map deleted file mode 100644 index 9e105f26e..000000000 --- a/node_modules/@jest/core/build/runGlobalHook.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"runGlobalHook.d.ts","sourceRoot":"","sources":["../src/runGlobalHook.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAKH,OAAO,EAAC,MAAM,EAAC,MAAM,aAAa,CAAC;;;;;;AAKnC,wBA8EE"} \ No newline at end of file diff --git a/node_modules/@jest/core/build/runGlobalHook.js b/node_modules/@jest/core/build/runGlobalHook.js deleted file mode 100644 index ffd528ad1..000000000 --- a/node_modules/@jest/core/build/runGlobalHook.js +++ /dev/null @@ -1,187 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, '__esModule', { - value: true -}); -exports.default = void 0; - -function _path() { - const data = require('path'); - - _path = function _path() { - return data; - }; - - return data; -} - -function _pEachSeries() { - const data = _interopRequireDefault(require('p-each-series')); - - _pEachSeries = function _pEachSeries() { - return data; - }; - - return data; -} - -function _pirates() { - const data = require('pirates'); - - _pirates = function _pirates() { - return data; - }; - - return data; -} - -function _transform() { - const data = require('@jest/transform'); - - _transform = function _transform() { - return data; - }; - - return data; -} - -function _jestUtil() { - const data = require('jest-util'); - - _jestUtil = function _jestUtil() { - return data; - }; - - return data; -} - -function _interopRequireDefault(obj) { - return obj && obj.__esModule ? obj : {default: obj}; -} - -function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { - try { - var info = gen[key](arg); - var value = info.value; - } catch (error) { - reject(error); - return; - } - if (info.done) { - resolve(value); - } else { - Promise.resolve(value).then(_next, _throw); - } -} - -function _asyncToGenerator(fn) { - return function() { - var self = this, - args = arguments; - return new Promise(function(resolve, reject) { - var gen = fn.apply(self, args); - function _next(value) { - asyncGeneratorStep(gen, resolve, reject, _next, _throw, 'next', value); - } - function _throw(err) { - asyncGeneratorStep(gen, resolve, reject, _next, _throw, 'throw', err); - } - _next(undefined); - }); - }; -} - -var _default = - /*#__PURE__*/ - (function() { - var _ref = _asyncToGenerator(function*({ - allTests, - globalConfig, - moduleName - }) { - const globalModulePaths = new Set( - allTests.map(test => test.context.config[moduleName]) - ); - - if (globalConfig[moduleName]) { - globalModulePaths.add(globalConfig[moduleName]); - } - - if (globalModulePaths.size > 0) { - yield (0, _pEachSeries().default)( - Array.from(globalModulePaths), - /*#__PURE__*/ - (function() { - var _ref2 = _asyncToGenerator(function*(modulePath) { - if (!modulePath) { - return; - } - - const correctConfig = allTests.find( - t => t.context.config[moduleName] === modulePath - ); - const projectConfig = correctConfig - ? correctConfig.context.config // Fallback to first config - : allTests[0].context.config; - const transformer = new (_transform()).ScriptTransformer( - projectConfig - ); // Load the transformer to avoid a cycle where we need to load a - // transformer in order to transform it in the require hooks - - transformer.preloadTransformer(modulePath); - let transforming = false; - const revertHook = (0, _pirates().addHook)( - (code, filename) => { - try { - transforming = true; - return ( - transformer.transformSource(filename, code, false).code || - code - ); - } finally { - transforming = false; - } - }, - { - exts: [(0, _path().extname)(modulePath)], - ignoreNodeModules: false, - matcher: (...args) => { - if (transforming) { - // Don't transform any dependency required by the transformer itself - return false; - } - - return transformer.shouldTransform(...args); - } - } - ); - const globalModule = (0, _jestUtil().interopRequireDefault)( - require(modulePath) - ).default; - - if (typeof globalModule !== 'function') { - throw new TypeError( - `${moduleName} file must export a function at ${modulePath}` - ); - } - - yield globalModule(globalConfig); - revertHook(); - }); - - return function(_x2) { - return _ref2.apply(this, arguments); - }; - })() - ); - } - - return Promise.resolve(); - }); - - return function(_x) { - return _ref.apply(this, arguments); - }; - })(); - -exports.default = _default; diff --git a/node_modules/@jest/core/build/runJest.d.ts b/node_modules/@jest/core/build/runJest.d.ts deleted file mode 100644 index c234b55bf..000000000 --- a/node_modules/@jest/core/build/runJest.d.ts +++ /dev/null @@ -1,28 +0,0 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -/// -import { JestHookEmitter } from 'jest-watcher'; -import { Config } from '@jest/types'; -import { AggregatedResult } from '@jest/test-result'; -import { ChangedFiles } from 'jest-changed-files'; -import FailedTestsCache from './FailedTestsCache'; -import TestWatcher from './TestWatcher'; -import { Filter } from './types'; -declare const _default: ({ contexts, globalConfig, outputStream, testWatcher, jestHooks, startRun, changedFilesPromise, onComplete, failedTestsCache, filter, }: { - globalConfig: Config.GlobalConfig; - contexts: import("jest-runtime/build/types").Context[]; - outputStream: NodeJS.WritableStream; - testWatcher: TestWatcher; - jestHooks?: JestHookEmitter | undefined; - startRun: (globalConfig: Config.GlobalConfig) => void; - changedFilesPromise?: Promise | undefined; - onComplete: (testResults: AggregatedResult) => void; - failedTestsCache?: FailedTestsCache | undefined; - filter?: Filter | undefined; -}) => Promise; -export default _default; -//# sourceMappingURL=runJest.d.ts.map \ No newline at end of file diff --git a/node_modules/@jest/core/build/runJest.d.ts.map b/node_modules/@jest/core/build/runJest.d.ts.map deleted file mode 100644 index d1dd2b5af..000000000 --- a/node_modules/@jest/core/build/runJest.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"runJest.d.ts","sourceRoot":"","sources":["../src/runJest.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;;AASH,OAAO,EAAW,eAAe,EAAC,MAAM,cAAc,CAAC;AAGvD,OAAO,EAAC,MAAM,EAAC,MAAM,aAAa,CAAC;AACnC,OAAO,EACL,gBAAgB,EAEjB,MAAM,mBAAmB,CAAC;AAG3B,OAAO,EAAC,YAAY,EAAsB,MAAM,oBAAoB,CAAC;AAKrE,OAAO,gBAAgB,MAAM,oBAAoB,CAAC;AAElD,OAAO,WAAW,MAAM,eAAe,CAAC;AACxC,OAAO,EAAc,MAAM,EAAC,MAAM,SAAS,CAAC;;;;;;;;;;;;;AA2F5C,wBAgJG"} \ No newline at end of file diff --git a/node_modules/@jest/core/build/runJest.js b/node_modules/@jest/core/build/runJest.js deleted file mode 100644 index 5afb90a21..000000000 --- a/node_modules/@jest/core/build/runJest.js +++ /dev/null @@ -1,446 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, '__esModule', { - value: true -}); -exports.default = void 0; - -function _path() { - const data = _interopRequireDefault(require('path')); - - _path = function _path() { - return data; - }; - - return data; -} - -function _chalk() { - const data = _interopRequireDefault(require('chalk')); - - _chalk = function _chalk() { - return data; - }; - - return data; -} - -function _realpathNative() { - const data = require('realpath-native'); - - _realpathNative = function _realpathNative() { - return data; - }; - - return data; -} - -function _console() { - const data = require('@jest/console'); - - _console = function _console() { - return data; - }; - - return data; -} - -function _jestUtil() { - const data = require('jest-util'); - - _jestUtil = function _jestUtil() { - return data; - }; - - return data; -} - -function _exit() { - const data = _interopRequireDefault(require('exit')); - - _exit = function _exit() { - return data; - }; - - return data; -} - -function _gracefulFs() { - const data = _interopRequireDefault(require('graceful-fs')); - - _gracefulFs = function _gracefulFs() { - return data; - }; - - return data; -} - -function _jestWatcher() { - const data = require('jest-watcher'); - - _jestWatcher = function _jestWatcher() { - return data; - }; - - return data; -} - -function _testResult() { - const data = require('@jest/test-result'); - - _testResult = function _testResult() { - return data; - }; - - return data; -} - -var _getNoTestsFoundMessage = _interopRequireDefault( - require('./getNoTestsFoundMessage') -); - -var _runGlobalHook = _interopRequireDefault(require('./runGlobalHook')); - -var _SearchSource = _interopRequireDefault(require('./SearchSource')); - -var _TestScheduler = _interopRequireDefault(require('./TestScheduler')); - -var _collectHandles = _interopRequireDefault(require('./collectHandles')); - -function _interopRequireDefault(obj) { - return obj && obj.__esModule ? obj : {default: obj}; -} - -function _objectSpread(target) { - for (var i = 1; i < arguments.length; i++) { - var source = arguments[i] != null ? arguments[i] : {}; - var ownKeys = Object.keys(source); - if (typeof Object.getOwnPropertySymbols === 'function') { - ownKeys = ownKeys.concat( - Object.getOwnPropertySymbols(source).filter(function(sym) { - return Object.getOwnPropertyDescriptor(source, sym).enumerable; - }) - ); - } - ownKeys.forEach(function(key) { - _defineProperty(target, key, source[key]); - }); - } - return target; -} - -function _defineProperty(obj, key, value) { - if (key in obj) { - Object.defineProperty(obj, key, { - value: value, - enumerable: true, - configurable: true, - writable: true - }); - } else { - obj[key] = value; - } - return obj; -} - -function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { - try { - var info = gen[key](arg); - var value = info.value; - } catch (error) { - reject(error); - return; - } - if (info.done) { - resolve(value); - } else { - Promise.resolve(value).then(_next, _throw); - } -} - -function _asyncToGenerator(fn) { - return function() { - var self = this, - args = arguments; - return new Promise(function(resolve, reject) { - var gen = fn.apply(self, args); - function _next(value) { - asyncGeneratorStep(gen, resolve, reject, _next, _throw, 'next', value); - } - function _throw(err) { - asyncGeneratorStep(gen, resolve, reject, _next, _throw, 'throw', err); - } - _next(undefined); - }); - }; -} - -const getTestPaths = - /*#__PURE__*/ - (function() { - var _ref = _asyncToGenerator(function*( - globalConfig, - context, - outputStream, - changedFiles, - jestHooks, - filter - ) { - const source = new _SearchSource.default(context); - const data = yield source.getTestPaths( - globalConfig, - changedFiles, - filter - ); - - if (!data.tests.length && globalConfig.onlyChanged && data.noSCM) { - new (_console()).CustomConsole(outputStream, outputStream).log( - 'Jest can only find uncommitted changed files in a git or hg ' + - 'repository. If you make your project a git or hg ' + - 'repository (`git init` or `hg init`), Jest will be able ' + - 'to only run tests related to files changed since the last ' + - 'commit.' - ); - } - - const shouldTestArray = yield Promise.all( - data.tests.map(test => - jestHooks.shouldRunTestSuite({ - config: test.context.config, - duration: test.duration, - testPath: test.path - }) - ) - ); - const filteredTests = data.tests.filter((_test, i) => shouldTestArray[i]); - return _objectSpread({}, data, { - allTests: filteredTests.length, - tests: filteredTests - }); - }); - - return function getTestPaths(_x, _x2, _x3, _x4, _x5, _x6) { - return _ref.apply(this, arguments); - }; - })(); - -const processResults = (runResults, options) => { - const outputFile = options.outputFile, - isJSON = options.json, - onComplete = options.onComplete, - outputStream = options.outputStream, - testResultsProcessor = options.testResultsProcessor, - collectHandles = options.collectHandles; - - if (collectHandles) { - runResults.openHandles = collectHandles(); - } else { - runResults.openHandles = []; - } - - if (testResultsProcessor) { - runResults = require(testResultsProcessor)(runResults); - } - - if (isJSON) { - if (outputFile) { - const cwd = (0, _realpathNative().sync)(process.cwd()); - - const filePath = _path().default.resolve(cwd, outputFile); - - _gracefulFs().default.writeFileSync( - filePath, - JSON.stringify((0, _jestUtil().formatTestResults)(runResults)) - ); - - outputStream.write( - `Test results written to: ${_path().default.relative(cwd, filePath)}\n` - ); - } else { - process.stdout.write( - JSON.stringify((0, _jestUtil().formatTestResults)(runResults)) - ); - } - } - - return onComplete && onComplete(runResults); -}; - -const testSchedulerContext = { - firstRun: true, - previousSuccess: true -}; - -var _default = - /*#__PURE__*/ - (function() { - var _runJest = _asyncToGenerator(function*({ - contexts, - globalConfig, - outputStream, - testWatcher, - jestHooks = new (_jestWatcher()).JestHook().getEmitter(), - startRun, - changedFilesPromise, - onComplete, - failedTestsCache, - filter - }) { - const Sequencer = (0, _jestUtil().interopRequireDefault)( - require(globalConfig.testSequencer) - ).default; - const sequencer = new Sequencer(); - let allTests = []; - - if (changedFilesPromise && globalConfig.watch) { - const _ref2 = yield changedFilesPromise, - repos = _ref2.repos; - - const noSCM = Object.keys(repos).every(scm => repos[scm].size === 0); - - if (noSCM) { - process.stderr.write( - '\n' + - _chalk().default.bold('--watch') + - ' is not supported without git/hg, please use --watchAll ' + - '\n' - ); - (0, _exit().default)(1); - } - } - - const testRunData = yield Promise.all( - contexts.map( - /*#__PURE__*/ - (function() { - var _ref3 = _asyncToGenerator(function*(context) { - const matches = yield getTestPaths( - globalConfig, - context, - outputStream, - changedFilesPromise && (yield changedFilesPromise), - jestHooks, - filter - ); - allTests = allTests.concat(matches.tests); - return { - context, - matches - }; - }); - - return function(_x8) { - return _ref3.apply(this, arguments); - }; - })() - ) - ); - allTests = sequencer.sort(allTests); - - if (globalConfig.listTests) { - const testsPaths = Array.from(new Set(allTests.map(test => test.path))); - - if (globalConfig.json) { - console.log(JSON.stringify(testsPaths)); - } else { - console.log(testsPaths.join('\n')); - } - - onComplete && - onComplete((0, _testResult().makeEmptyAggregatedTestResult)()); - return null; - } - - if (globalConfig.onlyFailures && failedTestsCache) { - allTests = failedTestsCache.filterTests(allTests); - globalConfig = failedTestsCache.updateConfig(globalConfig); - } - - const hasTests = allTests.length > 0; - - if (!hasTests) { - const noTestsFoundMessage = (0, _getNoTestsFoundMessage.default)( - testRunData, - globalConfig - ); - - if ( - globalConfig.passWithNoTests || - globalConfig.findRelatedTests || - globalConfig.lastCommit || - globalConfig.onlyChanged - ) { - new (_console()).CustomConsole(outputStream, outputStream).log( - noTestsFoundMessage - ); - } else { - new (_console()).CustomConsole(outputStream, outputStream).error( - noTestsFoundMessage - ); - (0, _exit().default)(1); - } - } else if ( - allTests.length === 1 && - globalConfig.silent !== true && - globalConfig.verbose !== false - ) { - const newConfig = _objectSpread({}, globalConfig, { - verbose: true - }); - - globalConfig = Object.freeze(newConfig); - } - - let collectHandles; - - if (globalConfig.detectOpenHandles) { - collectHandles = (0, _collectHandles.default)(); - } - - if (hasTests) { - yield (0, _runGlobalHook.default)({ - allTests, - globalConfig, - moduleName: 'globalSetup' - }); - } - - if (changedFilesPromise) { - testSchedulerContext.changedFiles = (yield changedFilesPromise).changedFiles; - } - - const results = yield new _TestScheduler.default( - globalConfig, - { - startRun - }, - testSchedulerContext - ).scheduleTests(allTests, testWatcher); - sequencer.cacheResults(allTests, results); - - if (hasTests) { - yield (0, _runGlobalHook.default)({ - allTests, - globalConfig, - moduleName: 'globalTeardown' - }); - } - - return processResults(results, { - collectHandles, - json: globalConfig.json, - onComplete, - outputFile: globalConfig.outputFile, - outputStream, - testResultsProcessor: globalConfig.testResultsProcessor - }); - }); - - function runJest(_x7) { - return _runJest.apply(this, arguments); - } - - return runJest; - })(); - -exports.default = _default; diff --git a/node_modules/@jest/core/build/testSchedulerHelper.d.ts b/node_modules/@jest/core/build/testSchedulerHelper.d.ts deleted file mode 100644 index 9dfc5b77e..000000000 --- a/node_modules/@jest/core/build/testSchedulerHelper.d.ts +++ /dev/null @@ -1,10 +0,0 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -import { Config } from '@jest/types'; -import { Test } from 'jest-runner'; -export declare function shouldRunInBand(tests: Array, timings: Array, { detectOpenHandles, maxWorkers, watch, watchAll }: Config.GlobalConfig): boolean; -//# sourceMappingURL=testSchedulerHelper.d.ts.map \ No newline at end of file diff --git a/node_modules/@jest/core/build/testSchedulerHelper.d.ts.map b/node_modules/@jest/core/build/testSchedulerHelper.d.ts.map deleted file mode 100644 index 01c791127..000000000 --- a/node_modules/@jest/core/build/testSchedulerHelper.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"testSchedulerHelper.d.ts","sourceRoot":"","sources":["../src/testSchedulerHelper.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAC,MAAM,EAAC,MAAM,aAAa,CAAC;AACnC,OAAO,EAAC,IAAI,EAAC,MAAM,aAAa,CAAC;AAIjC,wBAAgB,eAAe,CAC7B,KAAK,EAAE,KAAK,CAAC,IAAI,CAAC,EAClB,OAAO,EAAE,KAAK,CAAC,MAAM,CAAC,EACtB,EAAC,iBAAiB,EAAE,UAAU,EAAE,KAAK,EAAE,QAAQ,EAAC,EAAE,MAAM,CAAC,YAAY,WAgCtE"} \ No newline at end of file diff --git a/node_modules/@jest/core/build/testSchedulerHelper.js b/node_modules/@jest/core/build/testSchedulerHelper.js deleted file mode 100644 index 78cf48c23..000000000 --- a/node_modules/@jest/core/build/testSchedulerHelper.js +++ /dev/null @@ -1,51 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, '__esModule', { - value: true -}); -exports.shouldRunInBand = shouldRunInBand; - -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -const SLOW_TEST_TIME = 1000; - -function shouldRunInBand( - tests, - timings, - {detectOpenHandles, maxWorkers, watch, watchAll} -) { - // detectOpenHandles makes no sense without runInBand, because it cannot detect leaks in workers - if (detectOpenHandles) { - return true; - } - /* - * Run in band if we only have one test or one worker available, unless we - * are using the watch mode, in which case the TTY has to be responsive and - * we cannot schedule anything in the main thread. Same logic applies to - * watchAll. - * Also, if we are confident from previous runs that the tests will finish - * quickly we also run in band to reduce the overhead of spawning workers. - * Finally, the user can provide the runInBand argument in the CLI to - * force running in band. - * https://github.com/facebook/jest/blob/700e0dadb85f5dc8ff5dac6c7e98956690049734/packages/jest-config/src/getMaxWorkers.js#L14-L17 - */ - - const isWatchMode = watch || watchAll; - const areFastTests = timings.every(timing => timing < SLOW_TEST_TIME); - const oneWorkerOrLess = maxWorkers <= 1; - const oneTestOrLess = tests.length <= 1; - - if (isWatchMode) { - return oneWorkerOrLess || (oneTestOrLess && areFastTests); - } - - return ( - oneWorkerOrLess || - oneTestOrLess || - (tests.length <= 20 && timings.length > 0 && areFastTests) - ); -} diff --git a/node_modules/@jest/core/build/types.d.ts b/node_modules/@jest/core/build/types.d.ts deleted file mode 100644 index 62f922651..000000000 --- a/node_modules/@jest/core/build/types.d.ts +++ /dev/null @@ -1,40 +0,0 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -import { Context } from 'jest-runtime'; -import { Test } from 'jest-runner'; -import { Config } from '@jest/types'; -export declare type Stats = { - roots: number; - testMatch: number; - testPathIgnorePatterns: number; - testRegex: number; - testPathPattern?: number; -}; -export declare type TestRunData = Array<{ - context: Context; - matches: { - allTests: number; - tests: Array; - total?: number; - stats?: Stats; - }; -}>; -export declare type TestPathCases = Array<{ - stat: keyof Stats; - isMatch: (path: Config.Path) => boolean; -}>; -export declare type TestPathCasesWithPathPattern = TestPathCases & { - testPathPattern: (path: Config.Path) => boolean; -}; -export declare type FilterResult = { - test: string; - message: string; -}; -export declare type Filter = (testPaths: Array) => Promise<{ - filtered: Array; -}>; -//# sourceMappingURL=types.d.ts.map \ No newline at end of file diff --git a/node_modules/@jest/core/build/types.d.ts.map b/node_modules/@jest/core/build/types.d.ts.map deleted file mode 100644 index 90d0d94fd..000000000 --- a/node_modules/@jest/core/build/types.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAC,OAAO,EAAC,MAAM,cAAc,CAAC;AACrC,OAAO,EAAC,IAAI,EAAC,MAAM,aAAa,CAAC;AACjC,OAAO,EAAC,MAAM,EAAC,MAAM,aAAa,CAAC;AAEnC,oBAAY,KAAK,GAAG;IAClB,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,EAAE,MAAM,CAAC;IAClB,sBAAsB,EAAE,MAAM,CAAC;IAC/B,SAAS,EAAE,MAAM,CAAC;IAClB,eAAe,CAAC,EAAE,MAAM,CAAC;CAC1B,CAAC;AAEF,oBAAY,WAAW,GAAG,KAAK,CAAC;IAC9B,OAAO,EAAE,OAAO,CAAC;IACjB,OAAO,EAAE;QACP,QAAQ,EAAE,MAAM,CAAC;QACjB,KAAK,EAAE,KAAK,CAAC,IAAI,CAAC,CAAC;QACnB,KAAK,CAAC,EAAE,MAAM,CAAC;QACf,KAAK,CAAC,EAAE,KAAK,CAAC;KACf,CAAC;CACH,CAAC,CAAC;AAEH,oBAAY,aAAa,GAAG,KAAK,CAAC;IAChC,IAAI,EAAE,MAAM,KAAK,CAAC;IAClB,OAAO,EAAE,CAAC,IAAI,EAAE,MAAM,CAAC,IAAI,KAAK,OAAO,CAAC;CACzC,CAAC,CAAC;AAEH,oBAAY,4BAA4B,GAAG,aAAa,GAAG;IACzD,eAAe,EAAE,CAAC,IAAI,EAAE,MAAM,CAAC,IAAI,KAAK,OAAO,CAAC;CACjD,CAAC;AAEF,oBAAY,YAAY,GAAG;IACzB,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;CACjB,CAAC;AAEF,oBAAY,MAAM,GAAG,CACnB,SAAS,EAAE,KAAK,CAAC,MAAM,CAAC,KACrB,OAAO,CAAC;IACX,QAAQ,EAAE,KAAK,CAAC,YAAY,CAAC,CAAC;CAC/B,CAAC,CAAC"} \ No newline at end of file diff --git a/node_modules/@jest/core/build/types.js b/node_modules/@jest/core/build/types.js deleted file mode 100644 index ad9a93a7c..000000000 --- a/node_modules/@jest/core/build/types.js +++ /dev/null @@ -1 +0,0 @@ -'use strict'; diff --git a/node_modules/@jest/core/build/watch.d.ts b/node_modules/@jest/core/build/watch.d.ts deleted file mode 100644 index 2e5a27237..000000000 --- a/node_modules/@jest/core/build/watch.d.ts +++ /dev/null @@ -1,14 +0,0 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -/// -import HasteMap from 'jest-haste-map'; -import { Context } from 'jest-runtime'; -import { Config } from '@jest/types'; -import { JestHook } from 'jest-watcher'; -import { Filter } from './types'; -export default function watch(initialGlobalConfig: Config.GlobalConfig, contexts: Array, outputStream: NodeJS.WriteStream, hasteMapInstances: Array, stdin?: NodeJS.ReadStream, hooks?: JestHook, filter?: Filter): Promise; -//# sourceMappingURL=watch.d.ts.map \ No newline at end of file diff --git a/node_modules/@jest/core/build/watch.d.ts.map b/node_modules/@jest/core/build/watch.d.ts.map deleted file mode 100644 index 3d8f91a1f..000000000 --- a/node_modules/@jest/core/build/watch.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"watch.d.ts","sourceRoot":"","sources":["../src/watch.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;;AAKH,OAAO,QAA4B,MAAM,gBAAgB,CAAC;AAI1D,OAAO,EAAC,OAAO,EAAC,MAAM,cAAc,CAAC;AACrC,OAAO,EAAC,MAAM,EAAC,MAAM,aAAa,CAAC;AACnC,OAAO,EAGL,QAAQ,EAGT,MAAM,cAAc,CAAC;AAmBtB,OAAO,EAAC,MAAM,EAAC,MAAM,SAAS,CAAC;AAsC/B,MAAM,CAAC,OAAO,UAAU,KAAK,CAC3B,mBAAmB,EAAE,MAAM,CAAC,YAAY,EACxC,QAAQ,EAAE,KAAK,CAAC,OAAO,CAAC,EACxB,YAAY,EAAE,MAAM,CAAC,WAAW,EAChC,iBAAiB,EAAE,KAAK,CAAC,QAAQ,CAAC,EAClC,KAAK,GAAE,MAAM,CAAC,UAA0B,EACxC,KAAK,GAAE,QAAyB,EAChC,MAAM,CAAC,EAAE,MAAM,GACd,OAAO,CAAC,IAAI,CAAC,CA2Vf"} \ No newline at end of file diff --git a/node_modules/@jest/core/build/watch.js b/node_modules/@jest/core/build/watch.js deleted file mode 100644 index 14dd87364..000000000 --- a/node_modules/@jest/core/build/watch.js +++ /dev/null @@ -1,723 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, '__esModule', { - value: true -}); -exports.default = watch; - -function _ansiEscapes() { - const data = _interopRequireDefault(require('ansi-escapes')); - - _ansiEscapes = function _ansiEscapes() { - return data; - }; - - return data; -} - -function _chalk() { - const data = _interopRequireDefault(require('chalk')); - - _chalk = function _chalk() { - return data; - }; - - return data; -} - -function _exit() { - const data = _interopRequireDefault(require('exit')); - - _exit = function _exit() { - return data; - }; - - return data; -} - -function _jestMessageUtil() { - const data = require('jest-message-util'); - - _jestMessageUtil = function _jestMessageUtil() { - return data; - }; - - return data; -} - -function _jestUtil() { - const data = require('jest-util'); - - _jestUtil = function _jestUtil() { - return data; - }; - - return data; -} - -function _jestValidate() { - const data = require('jest-validate'); - - _jestValidate = function _jestValidate() { - return data; - }; - - return data; -} - -function _jestWatcher() { - const data = require('jest-watcher'); - - _jestWatcher = function _jestWatcher() { - return data; - }; - - return data; -} - -var _getChangedFilesPromise = _interopRequireDefault( - require('./getChangedFilesPromise') -); - -var _is_valid_path = _interopRequireDefault(require('./lib/is_valid_path')); - -var _create_context = _interopRequireDefault(require('./lib/create_context')); - -var _runJest = _interopRequireDefault(require('./runJest')); - -var _update_global_config = _interopRequireDefault( - require('./lib/update_global_config') -); - -var _SearchSource = _interopRequireDefault(require('./SearchSource')); - -var _TestWatcher = _interopRequireDefault(require('./TestWatcher')); - -var _FailedTestsCache = _interopRequireDefault(require('./FailedTestsCache')); - -var _test_path_pattern = _interopRequireDefault( - require('./plugins/test_path_pattern') -); - -var _test_name_pattern = _interopRequireDefault( - require('./plugins/test_name_pattern') -); - -var _update_snapshots = _interopRequireDefault( - require('./plugins/update_snapshots') -); - -var _update_snapshots_interactive = _interopRequireDefault( - require('./plugins/update_snapshots_interactive') -); - -var _quit = _interopRequireDefault(require('./plugins/quit')); - -var _watch_plugins_helpers = require('./lib/watch_plugins_helpers'); - -var _active_filters_message = _interopRequireDefault( - require('./lib/active_filters_message') -); - -function _interopRequireDefault(obj) { - return obj && obj.__esModule ? obj : {default: obj}; -} - -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -const preRunMessagePrint = _jestUtil().preRunMessage.print; - -let hasExitListener = false; -const INTERNAL_PLUGINS = [ - _test_path_pattern.default, - _test_name_pattern.default, - _update_snapshots.default, - _update_snapshots_interactive.default, - _quit.default -]; -const RESERVED_KEY_PLUGINS = new Map([ - [ - _update_snapshots.default, - { - forbiddenOverwriteMessage: 'updating snapshots', - key: 'u' - } - ], - [ - _update_snapshots_interactive.default, - { - forbiddenOverwriteMessage: 'updating snapshots interactively', - key: 'i' - } - ], - [ - _quit.default, - { - forbiddenOverwriteMessage: 'quitting watch mode' - } - ] -]); - -function watch( - initialGlobalConfig, - contexts, - outputStream, - hasteMapInstances, - stdin = process.stdin, - hooks = new (_jestWatcher()).JestHook(), - filter -) { - // `globalConfig` will be constantly updated and reassigned as a result of - // watch mode interactions. - let globalConfig = initialGlobalConfig; - let activePlugin; - globalConfig = (0, _update_global_config.default)(globalConfig, { - mode: globalConfig.watch ? 'watch' : 'watchAll', - passWithNoTests: true - }); - - const updateConfigAndRun = ({ - bail, - changedSince, - collectCoverage, - collectCoverageFrom, - collectCoverageOnlyFrom, - coverageDirectory, - coverageReporters, - mode, - notify, - notifyMode, - onlyFailures, - reporters, - testNamePattern, - testPathPattern, - updateSnapshot, - verbose - } = {}) => { - const previousUpdateSnapshot = globalConfig.updateSnapshot; - globalConfig = (0, _update_global_config.default)(globalConfig, { - bail, - changedSince, - collectCoverage, - collectCoverageFrom, - collectCoverageOnlyFrom, - coverageDirectory, - coverageReporters, - mode, - notify, - notifyMode, - onlyFailures, - reporters, - testNamePattern, - testPathPattern, - updateSnapshot, - verbose - }); - startRun(globalConfig); - globalConfig = (0, _update_global_config.default)(globalConfig, { - // updateSnapshot is not sticky after a run. - updateSnapshot: - previousUpdateSnapshot === 'all' ? 'none' : previousUpdateSnapshot - }); - }; - - const watchPlugins = INTERNAL_PLUGINS.map( - InternalPlugin => - new InternalPlugin({ - stdin, - stdout: outputStream - }) - ); - watchPlugins.forEach(plugin => { - const hookSubscriber = hooks.getSubscriber(); - - if (plugin.apply) { - plugin.apply(hookSubscriber); - } - }); - - if (globalConfig.watchPlugins != null) { - const watchPluginKeys = new Map(); - var _iteratorNormalCompletion = true; - var _didIteratorError = false; - var _iteratorError = undefined; - - try { - for ( - var _iterator = watchPlugins[Symbol.iterator](), _step; - !(_iteratorNormalCompletion = (_step = _iterator.next()).done); - _iteratorNormalCompletion = true - ) { - const plugin = _step.value; - const reservedInfo = RESERVED_KEY_PLUGINS.get(plugin.constructor) || {}; - const key = reservedInfo.key || getPluginKey(plugin, globalConfig); - - if (!key) { - continue; - } - - const forbiddenOverwriteMessage = - reservedInfo.forbiddenOverwriteMessage; - watchPluginKeys.set(key, { - forbiddenOverwriteMessage, - overwritable: forbiddenOverwriteMessage == null, - plugin - }); - } - } catch (err) { - _didIteratorError = true; - _iteratorError = err; - } finally { - try { - if (!_iteratorNormalCompletion && _iterator.return != null) { - _iterator.return(); - } - } finally { - if (_didIteratorError) { - throw _iteratorError; - } - } - } - - var _iteratorNormalCompletion2 = true; - var _didIteratorError2 = false; - var _iteratorError2 = undefined; - - try { - for ( - var _iterator2 = globalConfig.watchPlugins[Symbol.iterator](), _step2; - !(_iteratorNormalCompletion2 = (_step2 = _iterator2.next()).done); - _iteratorNormalCompletion2 = true - ) { - const pluginWithConfig = _step2.value; - - const ThirdPartyPlugin = require(pluginWithConfig.path); - - const plugin = new ThirdPartyPlugin({ - config: pluginWithConfig.config, - stdin, - stdout: outputStream - }); - checkForConflicts(watchPluginKeys, plugin, globalConfig); - const hookSubscriber = hooks.getSubscriber(); - - if (plugin.apply) { - plugin.apply(hookSubscriber); - } - - watchPlugins.push(plugin); - } - } catch (err) { - _didIteratorError2 = true; - _iteratorError2 = err; - } finally { - try { - if (!_iteratorNormalCompletion2 && _iterator2.return != null) { - _iterator2.return(); - } - } finally { - if (_didIteratorError2) { - throw _iteratorError2; - } - } - } - } - - const failedTestsCache = new _FailedTestsCache.default(); - let searchSources = contexts.map(context => ({ - context, - searchSource: new _SearchSource.default(context) - })); - let isRunning = false; - let testWatcher; - let shouldDisplayWatchUsage = true; - let isWatchUsageDisplayed = false; - - const emitFileChange = () => { - if (hooks.isUsed('onFileChange')) { - const projects = searchSources.map(({context, searchSource}) => ({ - config: context.config, - testPaths: searchSource.findMatchingTests('').tests.map(t => t.path) - })); - hooks.getEmitter().onFileChange({ - projects - }); - } - }; - - emitFileChange(); - hasteMapInstances.forEach((hasteMapInstance, index) => { - hasteMapInstance.on('change', ({eventsQueue, hasteFS, moduleMap}) => { - const validPaths = eventsQueue.filter(({filePath}) => - (0, _is_valid_path.default)(globalConfig, filePath) - ); - - if (validPaths.length) { - const context = (contexts[index] = (0, _create_context.default)( - contexts[index].config, - { - hasteFS, - moduleMap - } - )); - activePlugin = null; - searchSources = searchSources.slice(); - searchSources[index] = { - context, - searchSource: new _SearchSource.default(context) - }; - emitFileChange(); - startRun(globalConfig); - } - }); - }); - - if (!hasExitListener) { - hasExitListener = true; - process.on('exit', () => { - if (activePlugin) { - outputStream.write(_ansiEscapes().default.cursorDown()); - outputStream.write(_ansiEscapes().default.eraseDown); - } - }); - } - - const startRun = globalConfig => { - if (isRunning) { - return Promise.resolve(null); - } - - testWatcher = new _TestWatcher.default({ - isWatchMode: true - }); - _jestUtil().isInteractive && - outputStream.write(_jestUtil().specialChars.CLEAR); - preRunMessagePrint(outputStream); - isRunning = true; - const configs = contexts.map(context => context.config); - const changedFilesPromise = (0, _getChangedFilesPromise.default)( - globalConfig, - configs - ); - return (0, _runJest.default)({ - changedFilesPromise, - contexts, - failedTestsCache, - filter, - globalConfig, - jestHooks: hooks.getEmitter(), - onComplete: results => { - isRunning = false; - hooks.getEmitter().onTestRunComplete(results); // Create a new testWatcher instance so that re-runs won't be blocked. - // The old instance that was passed to Jest will still be interrupted - // and prevent test runs from the previous run. - - testWatcher = new _TestWatcher.default({ - isWatchMode: true - }); // Do not show any Watch Usage related stuff when running in a - // non-interactive environment - - if (_jestUtil().isInteractive) { - if (shouldDisplayWatchUsage) { - outputStream.write(usage(globalConfig, watchPlugins)); - shouldDisplayWatchUsage = false; // hide Watch Usage after first run - - isWatchUsageDisplayed = true; - } else { - outputStream.write(showToggleUsagePrompt()); - shouldDisplayWatchUsage = false; - isWatchUsageDisplayed = false; - } - } else { - outputStream.write('\n'); - } - - failedTestsCache.setTestResults(results.testResults); - }, - outputStream, - startRun, - testWatcher - }).catch(( - error // Errors thrown inside `runJest`, e.g. by resolvers, are caught here for - ) => - // continuous watch mode execution. We need to reprint them to the - // terminal and give just a little bit of extra space so they fit below - // `preRunMessagePrint` message nicely. - console.error( - '\n\n' + - (0, _jestMessageUtil().formatExecError)(error, contexts[0].config, { - noStackTrace: false - }) - ) - ); - }; - - const onKeypress = key => { - if ( - key === _jestWatcher().KEYS.CONTROL_C || - key === _jestWatcher().KEYS.CONTROL_D - ) { - if (typeof stdin.setRawMode === 'function') { - stdin.setRawMode(false); - } - - outputStream.write('\n'); - (0, _exit().default)(0); - return; - } - - if (activePlugin != null && activePlugin.onKey) { - // if a plugin is activate, Jest should let it handle keystrokes, so ignore - // them here - activePlugin.onKey(key); - return; - } // Abort test run - - const pluginKeys = (0, _watch_plugins_helpers.getSortedUsageRows)( - watchPlugins, - globalConfig - ).map(usage => Number(usage.key).toString(16)); - - if ( - isRunning && - testWatcher && - ['q', _jestWatcher().KEYS.ENTER, 'a', 'o', 'f'] - .concat(pluginKeys) - .includes(key) - ) { - testWatcher.setState({ - interrupted: true - }); - return; - } - - const matchingWatchPlugin = (0, - _watch_plugins_helpers.filterInteractivePlugins)( - watchPlugins, - globalConfig - ).find(plugin => getPluginKey(plugin, globalConfig) === key); - - if (matchingWatchPlugin != null) { - if (isRunning) { - testWatcher.setState({ - interrupted: true - }); - return; - } // "activate" the plugin, which has jest ignore keystrokes so the plugin - // can handle them - - activePlugin = matchingWatchPlugin; - - if (activePlugin.run) { - activePlugin.run(globalConfig, updateConfigAndRun).then( - shouldRerun => { - activePlugin = null; - - if (shouldRerun) { - updateConfigAndRun(); - } - }, - () => { - activePlugin = null; - onCancelPatternPrompt(); - } - ); - } else { - activePlugin = null; - } - } - - switch (key) { - case _jestWatcher().KEYS.ENTER: - startRun(globalConfig); - break; - - case 'a': - globalConfig = (0, _update_global_config.default)(globalConfig, { - mode: 'watchAll', - testNamePattern: '', - testPathPattern: '' - }); - startRun(globalConfig); - break; - - case 'c': - updateConfigAndRun({ - mode: 'watch', - testNamePattern: '', - testPathPattern: '' - }); - break; - - case 'f': - globalConfig = (0, _update_global_config.default)(globalConfig, { - onlyFailures: !globalConfig.onlyFailures - }); - startRun(globalConfig); - break; - - case 'o': - globalConfig = (0, _update_global_config.default)(globalConfig, { - mode: 'watch', - testNamePattern: '', - testPathPattern: '' - }); - startRun(globalConfig); - break; - - case '?': - break; - - case 'w': - if (!shouldDisplayWatchUsage && !isWatchUsageDisplayed) { - outputStream.write(_ansiEscapes().default.cursorUp()); - outputStream.write(_ansiEscapes().default.eraseDown); - outputStream.write(usage(globalConfig, watchPlugins)); - isWatchUsageDisplayed = true; - shouldDisplayWatchUsage = false; - } - - break; - } - }; - - const onCancelPatternPrompt = () => { - outputStream.write(_ansiEscapes().default.cursorHide); - outputStream.write(_jestUtil().specialChars.CLEAR); - outputStream.write(usage(globalConfig, watchPlugins)); - outputStream.write(_ansiEscapes().default.cursorShow); - }; - - if (typeof stdin.setRawMode === 'function') { - stdin.setRawMode(true); - stdin.resume(); - stdin.setEncoding('utf8'); - stdin.on('data', onKeypress); - } - - startRun(globalConfig); - return Promise.resolve(); -} - -const checkForConflicts = (watchPluginKeys, plugin, globalConfig) => { - const key = getPluginKey(plugin, globalConfig); - - if (!key) { - return; - } - - const conflictor = watchPluginKeys.get(key); - - if (!conflictor || conflictor.overwritable) { - watchPluginKeys.set(key, { - overwritable: false, - plugin - }); - return; - } - - let error; - - if (conflictor.forbiddenOverwriteMessage) { - error = ` - Watch plugin ${_chalk().default.bold.red( - getPluginIdentifier(plugin) - )} attempted to register key ${_chalk().default.bold.red(`<${key}>`)}, - that is reserved internally for ${_chalk().default.bold.red( - conflictor.forbiddenOverwriteMessage - )}. - Please change the configuration key for this plugin.`.trim(); - } else { - const plugins = [conflictor.plugin, plugin] - .map(p => _chalk().default.bold.red(getPluginIdentifier(p))) - .join(' and '); - error = ` - Watch plugins ${plugins} both attempted to register key ${_chalk().default.bold.red( - `<${key}>` - )}. - Please change the key configuration for one of the conflicting plugins to avoid overlap.`.trim(); - } - - throw new (_jestValidate()).ValidationError( - 'Watch plugin configuration error', - error - ); -}; - -const getPluginIdentifier = ( - plugin // This breaks as `displayName` is not defined as a static, but since - // WatchPlugin is an interface, and it is my understanding interface - // static fields are not definable anymore, no idea how to circumvent - // this :-( - // @ts-ignore: leave `displayName` be. -) => plugin.constructor.displayName || plugin.constructor.name; - -const getPluginKey = (plugin, globalConfig) => { - if (typeof plugin.getUsageInfo === 'function') { - return ( - plugin.getUsageInfo(globalConfig) || { - key: null - } - ).key; - } - - return null; -}; - -const usage = (globalConfig, watchPlugins, delimiter = '\n') => { - const messages = [ - (0, _active_filters_message.default)(globalConfig), - globalConfig.testPathPattern || globalConfig.testNamePattern - ? _chalk().default.dim(' \u203A Press ') + - 'c' + - _chalk().default.dim(' to clear filters.') - : null, - '\n' + _chalk().default.bold('Watch Usage'), - globalConfig.watch - ? _chalk().default.dim(' \u203A Press ') + - 'a' + - _chalk().default.dim(' to run all tests.') - : null, - globalConfig.onlyFailures - ? _chalk().default.dim(' \u203A Press ') + - 'f' + - _chalk().default.dim(' to quit "only failed tests" mode.') - : _chalk().default.dim(' \u203A Press ') + - 'f' + - _chalk().default.dim(' to run only failed tests.'), - (globalConfig.watchAll || - globalConfig.testPathPattern || - globalConfig.testNamePattern) && - !globalConfig.noSCM - ? _chalk().default.dim(' \u203A Press ') + - 'o' + - _chalk().default.dim(' to only run tests related to changed files.') - : null, - ...(0, _watch_plugins_helpers.getSortedUsageRows)( - watchPlugins, - globalConfig - ).map( - plugin => - _chalk().default.dim(' \u203A Press') + - ' ' + - plugin.key + - ' ' + - _chalk().default.dim(`to ${plugin.prompt}.`) - ), - _chalk().default.dim(' \u203A Press ') + - 'Enter' + - _chalk().default.dim(' to trigger a test run.') - ]; - return messages.filter(message => !!message).join(delimiter) + '\n'; -}; - -const showToggleUsagePrompt = () => - '\n' + - _chalk().default.bold('Watch Usage: ') + - _chalk().default.dim('Press ') + - 'w' + - _chalk().default.dim(' to show more.'); diff --git a/node_modules/@jest/core/package.json b/node_modules/@jest/core/package.json deleted file mode 100644 index 7d0968f63..000000000 --- a/node_modules/@jest/core/package.json +++ /dev/null @@ -1,119 +0,0 @@ -{ - "_args": [ - [ - "@jest/core@24.8.0", - "/Users/drew.heavner/Documents/Github/sign-android-release" - ] - ], - "_development": true, - "_from": "@jest/core@24.8.0", - "_id": "@jest/core@24.8.0", - "_inBundle": false, - "_integrity": "sha512-R9rhAJwCBQzaRnrRgAdVfnglUuATXdwTRsYqs6NMdVcAl5euG8LtWDe+fVkN27YfKVBW61IojVsXKaOmSnqd/A==", - "_location": "/@jest/core", - "_phantomChildren": {}, - "_requested": { - "type": "version", - "registry": true, - "raw": "@jest/core@24.8.0", - "name": "@jest/core", - "escapedName": "@jest%2fcore", - "scope": "@jest", - "rawSpec": "24.8.0", - "saveSpec": null, - "fetchSpec": "24.8.0" - }, - "_requiredBy": [ - "/jest/jest-cli" - ], - "_resolved": "https://registry.npmjs.org/@jest/core/-/core-24.8.0.tgz", - "_spec": "24.8.0", - "_where": "/Users/drew.heavner/Documents/Github/sign-android-release", - "bugs": { - "url": "https://github.com/facebook/jest/issues" - }, - "dependencies": { - "@jest/console": "^24.7.1", - "@jest/reporters": "^24.8.0", - "@jest/test-result": "^24.8.0", - "@jest/transform": "^24.8.0", - "@jest/types": "^24.8.0", - "ansi-escapes": "^3.0.0", - "chalk": "^2.0.1", - "exit": "^0.1.2", - "graceful-fs": "^4.1.15", - "jest-changed-files": "^24.8.0", - "jest-config": "^24.8.0", - "jest-haste-map": "^24.8.0", - "jest-message-util": "^24.8.0", - "jest-regex-util": "^24.3.0", - "jest-resolve-dependencies": "^24.8.0", - "jest-runner": "^24.8.0", - "jest-runtime": "^24.8.0", - "jest-snapshot": "^24.8.0", - "jest-util": "^24.8.0", - "jest-validate": "^24.8.0", - "jest-watcher": "^24.8.0", - "micromatch": "^3.1.10", - "p-each-series": "^1.0.0", - "pirates": "^4.0.1", - "realpath-native": "^1.1.0", - "rimraf": "^2.5.4", - "strip-ansi": "^5.0.0" - }, - "description": "Delightful JavaScript Testing.", - "devDependencies": { - "@jest/test-sequencer": "^24.8.0", - "@types/ansi-escapes": "^3.0.1", - "@types/exit": "^0.1.30", - "@types/graceful-fs": "^4.1.2", - "@types/micromatch": "^3.1.0", - "@types/p-each-series": "^1.0.0", - "@types/rimraf": "^2.0.2", - "@types/strip-ansi": "^3.0.0" - }, - "engines": { - "node": ">= 6" - }, - "gitHead": "845728f24b3ef41e450595c384e9b5c9fdf248a4", - "homepage": "https://jestjs.io/", - "keywords": [ - "ava", - "babel", - "coverage", - "easy", - "expect", - "facebook", - "immersive", - "instant", - "jasmine", - "jest", - "jsdom", - "mocha", - "mocking", - "painless", - "qunit", - "runner", - "sandboxed", - "snapshot", - "tap", - "tape", - "test", - "testing", - "typescript", - "watch" - ], - "license": "MIT", - "main": "build/jest.js", - "name": "@jest/core", - "publishConfig": { - "access": "public" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/facebook/jest.git", - "directory": "packages/jest-core" - }, - "types": "build/jest.d.ts", - "version": "24.8.0" -} diff --git a/node_modules/@jest/core/tsconfig.json b/node_modules/@jest/core/tsconfig.json deleted file mode 100644 index f943dccf3..000000000 --- a/node_modules/@jest/core/tsconfig.json +++ /dev/null @@ -1,27 +0,0 @@ -{ - "extends": "../../tsconfig.json", - "compilerOptions": { - "rootDir": "src", - "outDir": "build" - }, - "references": [ - {"path": "../jest-changed-files"}, - {"path": "../jest-config"}, - {"path": "../jest-console"}, - {"path": "../jest-haste-map"}, - {"path": "../jest-message-util"}, - {"path": "../jest-regex-util"}, - {"path": "../jest-reporters"}, - {"path": "../jest-resolve-dependencies"}, - {"path": "../jest-runner"}, - {"path": "../jest-runtime"}, - {"path": "../jest-snapshot"}, - {"path": "../jest-test-result"}, - {"path": "../jest-test-sequencer"}, - {"path": "../jest-types"}, - {"path": "../jest-transform"}, - {"path": "../jest-util"}, - {"path": "../jest-validate"}, - {"path": "../jest-watcher"} - ] -} diff --git a/node_modules/@jest/environment/LICENSE b/node_modules/@jest/environment/LICENSE deleted file mode 100644 index 10e779c44..000000000 --- a/node_modules/@jest/environment/LICENSE +++ /dev/null @@ -1,23 +0,0 @@ -MIT License - -For Jest software - -Copyright (c) 2014-present, Facebook, Inc. - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/node_modules/@jest/environment/build/index.d.ts b/node_modules/@jest/environment/build/index.d.ts index 90dbc0e0d..5e55181f6 100644 --- a/node_modules/@jest/environment/build/index.d.ts +++ b/node_modules/@jest/environment/build/index.d.ts @@ -15,12 +15,10 @@ declare type JestMockFn = typeof jestMock.fn; declare type JestMockSpyOn = typeof jestMock.spyOn; export declare type EnvironmentContext = Partial<{ console: Console; - docblockPragmas: { - [key: string]: string | Array; - }; + docblockPragmas: Record>; testPath: Config.Path; }>; -declare type ModuleWrapper = (...args: Array) => unknown; +export declare type ModuleWrapper = (module: Module, exports: Module['exports'], require: Module['require'], __dirname: string, __filename: Module['filename'], global: Global.Global, jest: Jest, ...extraGlobals: Array) => unknown; export declare class JestEnvironment { constructor(config: Config.ProjectConfig, context?: EnvironmentContext); global: Global.Global; @@ -33,7 +31,7 @@ export declare class JestEnvironment { teardown(): Promise; handleTestEvent?(event: Circus.Event, state: Circus.State): void; } -export declare type Module = typeof module; +export declare type Module = NodeModule; export interface LocalModuleRequire extends NodeRequire { requireActual(moduleName: string): unknown; requireMock(moduleName: string): unknown; @@ -45,6 +43,11 @@ export interface Jest { * @deprecated Use `expect.extend` instead */ addMatchers(matchers: Record): void; + /** + * Advances all timers by the needed milliseconds so that only the next timeouts/intervals will run. + * Optionally, you can provide steps, so it will run steps amount of next timeouts/intervals. + */ + advanceTimersToNextTimer(steps?: number): void; /** * Disables automatic mocking in the module loader. */ @@ -118,6 +121,23 @@ export interface Jest { /** * Returns the actual module instead of a mock, bypassing all checks on * whether the module should receive a mock implementation or not. + * + * @example + ``` + jest.mock('../myModule', () => { + // Require the original module to not be mocked... + const originalModule = jest.requireActual(moduleName); + return { + __esModule: true, // Use it when dealing with esModules + ...originalModule, + getRandom: jest.fn().mockReturnValue(10), + }; + }); + + const getRandom = require('../myModule').getRandom; + + getRandom(); // Always returns 10 + ``` */ requireActual: (moduleName: string) => unknown; /** diff --git a/node_modules/@jest/environment/build/index.d.ts.map b/node_modules/@jest/environment/build/index.d.ts.map index 3b31af00c..e564980d7 100644 --- a/node_modules/@jest/environment/build/index.d.ts.map +++ b/node_modules/@jest/environment/build/index.d.ts.map @@ -1 +1 @@ -{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;;;AAEH,OAAO,EAAC,MAAM,EAAC,MAAM,IAAI,CAAC;AAC1B,OAAO,EAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAC,MAAM,aAAa,CAAC;AACnD,OAAO,QAAQ,EAAE,EAAC,YAAY,EAAC,MAAM,WAAW,CAAC;AACjD,OAAO,EAAC,iBAAiB,EAAC,MAAM,iBAAiB,CAAC;AAClD,OAAO,EAAC,cAAc,IAAI,UAAU,EAAC,MAAM,mBAAmB,CAAC;AAE/D,aAAK,UAAU,GAAG,OAAO,QAAQ,CAAC,EAAE,CAAC;AACrC,aAAK,aAAa,GAAG,OAAO,QAAQ,CAAC,KAAK,CAAC;AAI3C,oBAAY,kBAAkB,GAAG,OAAO,CAAC;IACvC,OAAO,EAAE,OAAO,CAAC;IACjB,eAAe,EAAE;QAAC,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,GAAG,KAAK,CAAC,MAAM,CAAC,CAAA;KAAC,CAAC;IACzD,QAAQ,EAAE,MAAM,CAAC,IAAI,CAAC;CACvB,CAAC,CAAC;AAGH,aAAK,aAAa,GAAG,CAAC,GAAG,IAAI,EAAE,KAAK,CAAC,OAAO,CAAC,KAAK,OAAO,CAAC;AAE1D,MAAM,CAAC,OAAO,OAAO,eAAe;gBACtB,MAAM,EAAE,MAAM,CAAC,aAAa,EAAE,OAAO,CAAC,EAAE,kBAAkB;IACtE,MAAM,EAAE,MAAM,CAAC,MAAM,CAAC;IACtB,UAAU,EAAE,UAAU,CAAC,OAAO,CAAC,GAAG,IAAI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IACH,gBAAgB,IAAI,IAAI,CAAC;IACzB;;;OAGG;IACH,WAAW,IAAI,IAAI,CAAC;IACpB;;;OAGG;IACH,YAAY,IAAI,IAAI,CAAC;IACrB;;;;;OAKG;IACH,oBAAoB,IAAI,IAAI,CAAC;IAC7B;;;;OAIG;IACH,mBAAmB,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3C;;;;;OAKG;IACH,eAAe,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;IACvC;;OAEG;IACH,aAAa,IAAI,MAAM,CAAC;IACxB;;;;;;;OAOG;IACH,OAAO,CAAC,UAAU,EAAE,MAAM,EAAE,aAAa,EAAE,OAAO,GAAG,IAAI,CAAC;IAC1D;;;;;;OAMG;IACH,UAAU,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;IAClC;;;;;;OAMG;IACH,KAAK,EAAE,aAAa,CAAC;IACrB;;;;OAIG;IACH,MAAM,CAAC,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;IACjC;;OAEG;IACH,aAAa,IAAI,IAAI,CAAC;IACtB;;OAEG;IACH,aAAa,IAAI,IAAI,CAAC;IACtB;;;;;OAKG;IACH,cAAc,CAAC,EAAE,EAAE,MAAM,IAAI,GAAG,IAAI,CAAC;CACtC"} \ No newline at end of file diff --git a/node_modules/@jest/environment/package.json b/node_modules/@jest/environment/package.json index d300b772e..f5b80b01e 100644 --- a/node_modules/@jest/environment/package.json +++ b/node_modules/@jest/environment/package.json @@ -1,27 +1,24 @@ { - "_args": [ - [ - "@jest/environment@24.8.0", - "/Users/drew.heavner/Documents/Github/sign-android-release" - ] - ], - "_development": true, - "_from": "@jest/environment@24.8.0", - "_id": "@jest/environment@24.8.0", + "_from": "@jest/environment@24.9.0", + "_id": "@jest/environment@24.9.0", "_inBundle": false, - "_integrity": "sha512-vlGt2HLg7qM+vtBrSkjDxk9K0YtRBi7HfRFaDxoRtyi+DyVChzhF20duvpdAnKVBV6W5tym8jm0U9EfXbDk1tw==", + "_integrity": "sha512-5A1QluTPhvdIPFYnO3sZC3smkNeXPVELz7ikPbhUj0bQjB07EoE9qtLrem14ZUYWdVayYbsjVwIiL4WBIMV4aQ==", "_location": "/@jest/environment", - "_phantomChildren": {}, + "_phantomChildren": { + "@types/istanbul-lib-coverage": "2.0.1", + "@types/istanbul-reports": "1.1.1", + "@types/yargs-parser": "15.0.0" + }, "_requested": { "type": "version", "registry": true, - "raw": "@jest/environment@24.8.0", + "raw": "@jest/environment@24.9.0", "name": "@jest/environment", "escapedName": "@jest%2fenvironment", "scope": "@jest", - "rawSpec": "24.8.0", + "rawSpec": "24.9.0", "saveSpec": null, - "fetchSpec": "24.8.0" + "fetchSpec": "24.9.0" }, "_requiredBy": [ "/@jest/reporters", @@ -32,22 +29,25 @@ "/jest-runner", "/jest-runtime" ], - "_resolved": "https://registry.npmjs.org/@jest/environment/-/environment-24.8.0.tgz", - "_spec": "24.8.0", - "_where": "/Users/drew.heavner/Documents/Github/sign-android-release", + "_resolved": "https://registry.npmjs.org/@jest/environment/-/environment-24.9.0.tgz", + "_shasum": "21e3afa2d65c0586cbd6cbefe208bafade44ab18", + "_spec": "@jest/environment@24.9.0", + "_where": "/Users/drew.heavner/Documents/Github/sign-android-release/node_modules/@jest/reporters", "bugs": { "url": "https://github.com/facebook/jest/issues" }, + "bundleDependencies": false, "dependencies": { - "@jest/fake-timers": "^24.8.0", - "@jest/transform": "^24.8.0", - "@jest/types": "^24.8.0", - "jest-mock": "^24.8.0" + "@jest/fake-timers": "^24.9.0", + "@jest/transform": "^24.9.0", + "@jest/types": "^24.9.0", + "jest-mock": "^24.9.0" }, + "deprecated": false, "engines": { "node": ">= 6" }, - "gitHead": "845728f24b3ef41e450595c384e9b5c9fdf248a4", + "gitHead": "9ad0f4bc6b8bdd94989804226c28c9960d9da7d1", "homepage": "https://github.com/facebook/jest#readme", "license": "MIT", "main": "build/index.js", @@ -61,5 +61,5 @@ "directory": "packages/jest-environment" }, "types": "build/index.d.ts", - "version": "24.8.0" + "version": "24.9.0" } diff --git a/node_modules/@jest/environment/tsconfig.json b/node_modules/@jest/environment/tsconfig.json deleted file mode 100644 index cfce4b394..000000000 --- a/node_modules/@jest/environment/tsconfig.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "extends": "../../tsconfig.json", - "compilerOptions": { - "rootDir": "src", - "outDir": "build" - }, - "references": [ - {"path": "../jest-fake-timers"}, - {"path": "../jest-transform"}, - {"path": "../jest-types"}, - {"path": "../jest-util"} - ] -} diff --git a/node_modules/@jest/fake-timers/LICENSE b/node_modules/@jest/fake-timers/LICENSE index 10e779c44..b96dcb048 100644 --- a/node_modules/@jest/fake-timers/LICENSE +++ b/node_modules/@jest/fake-timers/LICENSE @@ -1,8 +1,6 @@ MIT License -For Jest software - -Copyright (c) 2014-present, Facebook, Inc. +Copyright (c) Facebook, Inc. and its affiliates. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/node_modules/@jest/fake-timers/build/jestFakeTimers.d.ts b/node_modules/@jest/fake-timers/build/jestFakeTimers.d.ts index f93a22116..93f8752a9 100644 --- a/node_modules/@jest/fake-timers/build/jestFakeTimers.d.ts +++ b/node_modules/@jest/fake-timers/build/jestFakeTimers.d.ts @@ -4,6 +4,7 @@ * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ +/// import { ModuleMocker } from 'jest-mock'; import { StackTraceConfig } from 'jest-message-util'; declare type Callback = (...args: Array) => void; @@ -42,6 +43,7 @@ export default class FakeTimers { private _runImmediate; runAllTimers(): void; runOnlyPendingTimers(): void; + advanceTimersToNextTimer(steps?: number): void; advanceTimersByTime(msToRun: number): void; runWithRealTimers(cb: Callback): void; useRealTimers(): void; diff --git a/node_modules/@jest/fake-timers/build/jestFakeTimers.d.ts.map b/node_modules/@jest/fake-timers/build/jestFakeTimers.d.ts.map index aa474fc7a..e841e491c 100644 --- a/node_modules/@jest/fake-timers/build/jestFakeTimers.d.ts.map +++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a/node_modules/@jest/fake-timers/build/jestFakeTimers.js b/node_modules/@jest/fake-timers/build/jestFakeTimers.js index 3012430b6..f7db2541d 100644 --- a/node_modules/@jest/fake-timers/build/jestFakeTimers.js +++ b/node_modules/@jest/fake-timers/build/jestFakeTimers.js @@ -228,6 +228,25 @@ class FakeTimers { .forEach(([timerHandle]) => this._runTimerHandle(timerHandle)); } + advanceTimersToNextTimer(steps = 1) { + if (steps < 1) { + return; + } + + const nextExpiry = Array.from(this._timers.values()).reduce( + (minExpiry, timer) => { + if (minExpiry === null || timer.expiry < minExpiry) return timer.expiry; + return minExpiry; + }, + null + ); + + if (nextExpiry !== null) { + this.advanceTimersByTime(nextExpiry - this._now); + this.advanceTimersToNextTimer(steps - 1); + } + } + advanceTimersByTime(msToRun) { this._checkFakeTimers(); // Only run a generous number of timers and then bail. // This is just to help avoid recursive loops diff --git a/node_modules/@jest/fake-timers/package.json b/node_modules/@jest/fake-timers/package.json index 514d16581..7a87b6087 100644 --- a/node_modules/@jest/fake-timers/package.json +++ b/node_modules/@jest/fake-timers/package.json @@ -1,49 +1,59 @@ { - "_args": [ - [ - "@jest/fake-timers@24.8.0", - "/Users/drew.heavner/Documents/Github/sign-android-release" - ] - ], - "_development": true, - "_from": "@jest/fake-timers@24.8.0", - "_id": "@jest/fake-timers@24.8.0", + "_from": "@jest/fake-timers@^24.9.0", + "_id": "@jest/fake-timers@24.9.0", "_inBundle": false, - "_integrity": "sha512-2M4d5MufVXwi6VzZhJ9f5S/wU4ud2ck0kxPof1Iz3zWx6Y+V2eJrES9jEktB6O3o/oEyk+il/uNu9PvASjWXQw==", + "_integrity": "sha512-eWQcNa2YSwzXWIMC5KufBh3oWRIijrQFROsIqt6v/NS9Io/gknw1jsAC9c+ih/RQX4A3O7SeWAhQeN0goKhT9A==", "_location": "/@jest/fake-timers", - "_phantomChildren": {}, + "_phantomChildren": { + "@babel/code-frame": "7.5.5", + "@types/istanbul-lib-coverage": "2.0.1", + "@types/istanbul-reports": "1.1.1", + "@types/stack-utils": "1.0.1", + "@types/yargs-parser": "15.0.0", + "callsites": "3.1.0", + "chalk": "2.4.2", + "graceful-fs": "4.2.0", + "micromatch": "3.1.10", + "slash": "2.0.0", + "source-map": "0.6.1", + "stack-utils": "1.0.2" + }, "_requested": { - "type": "version", + "type": "range", "registry": true, - "raw": "@jest/fake-timers@24.8.0", + "raw": "@jest/fake-timers@^24.9.0", "name": "@jest/fake-timers", "escapedName": "@jest%2ffake-timers", "scope": "@jest", - "rawSpec": "24.8.0", + "rawSpec": "^24.9.0", "saveSpec": null, - "fetchSpec": "24.8.0" + "fetchSpec": "^24.9.0" }, "_requiredBy": [ "/@jest/environment", "/jest-environment-jsdom", "/jest-environment-node", - "/jest-util" + "/jest-util", + "/jest/jest-cli/jest-util" ], - "_resolved": "https://registry.npmjs.org/@jest/fake-timers/-/fake-timers-24.8.0.tgz", - "_spec": "24.8.0", - "_where": "/Users/drew.heavner/Documents/Github/sign-android-release", + "_resolved": "https://registry.npmjs.org/@jest/fake-timers/-/fake-timers-24.9.0.tgz", + "_shasum": "ba3e6bf0eecd09a636049896434d306636540c93", + "_spec": "@jest/fake-timers@^24.9.0", + "_where": "/Users/drew.heavner/Documents/Github/sign-android-release/node_modules/@jest/environment", "bugs": { "url": "https://github.com/facebook/jest/issues" }, + "bundleDependencies": false, "dependencies": { - "@jest/types": "^24.8.0", - "jest-message-util": "^24.8.0", - "jest-mock": "^24.8.0" + "@jest/types": "^24.9.0", + "jest-message-util": "^24.9.0", + "jest-mock": "^24.9.0" }, + "deprecated": false, "engines": { "node": ">= 6" }, - "gitHead": "845728f24b3ef41e450595c384e9b5c9fdf248a4", + "gitHead": "9ad0f4bc6b8bdd94989804226c28c9960d9da7d1", "homepage": "https://github.com/facebook/jest#readme", "license": "MIT", "main": "build/index.js", @@ -57,5 +67,5 @@ "directory": "packages/jest-fake-timers" }, "types": "build/index.d.ts", - "version": "24.8.0" + "version": "24.9.0" } diff --git a/node_modules/@jest/fake-timers/tsconfig.json b/node_modules/@jest/fake-timers/tsconfig.json deleted file mode 100644 index 335b1e9c3..000000000 --- a/node_modules/@jest/fake-timers/tsconfig.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "extends": "../../tsconfig.json", - "compilerOptions": { - "rootDir": "src", - "outDir": "build" - }, - "references": [ - {"path": "../jest-message-util"}, - {"path": "../jest-mock"} - ] -} diff --git a/node_modules/@jest/reporters/LICENSE b/node_modules/@jest/reporters/LICENSE deleted file mode 100644 index 10e779c44..000000000 --- a/node_modules/@jest/reporters/LICENSE +++ /dev/null @@ -1,23 +0,0 @@ -MIT License - -For Jest software - -Copyright (c) 2014-present, Facebook, Inc. - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/node_modules/@jest/reporters/build/get_snapshot_summary.d.ts.map b/node_modules/@jest/reporters/build/get_snapshot_summary.d.ts.map index 1690a4e8b..4464e83b2 100644 --- a/node_modules/@jest/reporters/build/get_snapshot_summary.d.ts.map +++ b/node_modules/@jest/reporters/build/get_snapshot_summary.d.ts.map @@ -1 +1 @@ -{"version":3,"file":"get_snapshot_summary.d.ts","sourceRoot":"","sources":["../src/get_snapshot_summary.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAC,MAAM,EAAC,MAAM,aAAa,CAAC;AACnC,OAAO,EAAC,eAAe,EAAC,MAAM,mBAAmB,CAAC;;AAgBlD,wBA0GE"} \ No newline at end of file +{"version":3,"file":"get_snapshot_summary.d.ts","sourceRoot":"","sources":["../src/get_snapshot_summary.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAC,MAAM,EAAC,MAAM,aAAa,CAAC;AACnC,OAAO,EAAC,eAAe,EAAC,MAAM,mBAAmB,CAAC;;AAgBlD,wBAkHE"} \ No newline at end of file diff --git a/node_modules/@jest/reporters/build/get_snapshot_summary.js b/node_modules/@jest/reporters/build/get_snapshot_summary.js index 5c8ddbac3..99596f458 100644 --- a/node_modules/@jest/reporters/build/get_snapshot_summary.js +++ b/node_modules/@jest/reporters/build/get_snapshot_summary.js @@ -31,12 +31,26 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : {default: obj}; } -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ +function _toArray(arr) { + return _arrayWithHoles(arr) || _iterableToArray(arr) || _nonIterableRest(); +} + +function _nonIterableRest() { + throw new TypeError('Invalid attempt to destructure non-iterable instance'); +} + +function _iterableToArray(iter) { + if ( + Symbol.iterator in Object(iter) || + Object.prototype.toString.call(iter) === '[object Arguments]' + ) + return Array.from(iter); +} + +function _arrayWithHoles(arr) { + if (Array.isArray(arr)) return arr; +} + const ARROW = ' \u203A '; const DOWN_ARROW = ' \u21B3 '; const DOT = ' \u2022 '; @@ -140,6 +154,21 @@ var _default = (snapshots, globalConfig, updateCommand) => { } } + if (snapshots.filesRemovedList && snapshots.filesRemovedList.length) { + const _snapshots$filesRemov = _toArray(snapshots.filesRemovedList), + head = _snapshots$filesRemov[0], + tail = _snapshots$filesRemov.slice(1); + + summary.push( + ` ${DOWN_ARROW} ${DOT}${(0, _utils.formatTestPath)(globalConfig, head)}` + ); + tail.forEach(key => { + summary.push( + ` ${DOT}${(0, _utils.formatTestPath)(globalConfig, key)}` + ); + }); + } + if (snapshots.unchecked) { if (snapshots.didUpdate) { summary.push( diff --git a/node_modules/@jest/reporters/build/notify_reporter.d.ts.map b/node_modules/@jest/reporters/build/notify_reporter.d.ts.map index 28fdf2136..e9220d762 100644 --- a/node_modules/@jest/reporters/build/notify_reporter.d.ts.map +++ b/node_modules/@jest/reporters/build/notify_reporter.d.ts.map @@ -1 +1 @@ -{"version":3,"file":"notify_reporter.d.ts","sourceRoot":"","sources":["../src/notify_reporter.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAKH,OAAO,EAAC,MAAM,EAAC,MAAM,aAAa,CAAC;AACnC,OAAO,EAAC,gBAAgB,EAAC,MAAM,mBAAmB,CAAC;AAEnD,OAAO,EAAC,oBAAoB,EAAE,OAAO,EAAC,MAAM,SAAS,CAAC;AACtD,OAAO,YAAY,MAAM,iBAAiB,CAAC;AAM3C,MAAM,CAAC,OAAO,OAAO,cAAe,SAAQ,YAAY;IACtD,OAAO,CAAC,SAAS,CAA6C;IAC9D,OAAO,CAAC,aAAa,CAAsB;IAC3C,OAAO,CAAC,QAAQ,CAAuB;gBAGrC,YAAY,EAAE,MAAM,CAAC,YAAY,EACjC,QAAQ,EAAE,CAAC,YAAY,EAAE,MAAM,CAAC,YAAY,KAAK,GAAG,EACpD,OAAO,EAAE,oBAAoB;IAQ/B,aAAa,CAAC,QAAQ,EAAE,GAAG,CAAC,OAAO,CAAC,EAAE,MAAM,EAAE,gBAAgB,GAAG,IAAI;CAyGtE"} \ No newline at end of file +{"version":3,"file":"notify_reporter.d.ts","sourceRoot":"","sources":["../src/notify_reporter.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAKH,OAAO,EAAC,MAAM,EAAC,MAAM,aAAa,CAAC;AACnC,OAAO,EAAC,gBAAgB,EAAC,MAAM,mBAAmB,CAAC;AAEnD,OAAO,EAAC,oBAAoB,EAAE,OAAO,EAAC,MAAM,SAAS,CAAC;AACtD,OAAO,YAAY,MAAM,iBAAiB,CAAC;AAM3C,MAAM,CAAC,OAAO,OAAO,cAAe,SAAQ,YAAY;IACtD,OAAO,CAAC,SAAS,CAA6C;IAC9D,OAAO,CAAC,aAAa,CAAsB;IAC3C,OAAO,CAAC,QAAQ,CAAuB;gBAGrC,YAAY,EAAE,MAAM,CAAC,YAAY,EACjC,QAAQ,EAAE,CAAC,YAAY,EAAE,MAAM,CAAC,YAAY,KAAK,GAAG,EACpD,OAAO,EAAE,oBAAoB;IAQ/B,aAAa,CAAC,QAAQ,EAAE,GAAG,CAAC,OAAO,CAAC,EAAE,MAAM,EAAE,gBAAgB,GAAG,IAAI;CA0GtE"} \ No newline at end of file diff --git a/node_modules/@jest/reporters/build/notify_reporter.js b/node_modules/@jest/reporters/build/notify_reporter.js index 1c85e3955..d50d05a2a 100644 --- a/node_modules/@jest/reporters/build/notify_reporter.js +++ b/node_modules/@jest/reporters/build/notify_reporter.js @@ -214,6 +214,7 @@ class NotifyReporter extends _base_reporter.default { closeLabel: 'Close', icon, message, + timeout: 10, title }, (err, _, metadata) => { diff --git a/node_modules/@jest/reporters/node_modules/slash/index.js b/node_modules/@jest/reporters/node_modules/slash/index.js deleted file mode 100644 index 75d72501a..000000000 --- a/node_modules/@jest/reporters/node_modules/slash/index.js +++ /dev/null @@ -1,11 +0,0 @@ -'use strict'; -module.exports = input => { - const isExtendedLengthPath = /^\\\\\?\\/.test(input); - const hasNonAscii = /[^\u0000-\u0080]+/.test(input); // eslint-disable-line no-control-regex - - if (isExtendedLengthPath || hasNonAscii) { - return input; - } - - return input.replace(/\\/g, '/'); -}; diff --git a/node_modules/@jest/reporters/node_modules/slash/license b/node_modules/@jest/reporters/node_modules/slash/license deleted file mode 100644 index e7af2f771..000000000 --- a/node_modules/@jest/reporters/node_modules/slash/license +++ /dev/null @@ -1,9 +0,0 @@ -MIT License - -Copyright (c) Sindre Sorhus (sindresorhus.com) - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/@jest/reporters/node_modules/slash/package.json b/node_modules/@jest/reporters/node_modules/slash/package.json deleted file mode 100644 index ddcc10120..000000000 --- a/node_modules/@jest/reporters/node_modules/slash/package.json +++ /dev/null @@ -1,70 +0,0 @@ -{ - "_args": [ - [ - "slash@2.0.0", - "/Users/drew.heavner/Documents/Github/sign-android-release" - ] - ], - "_development": true, - "_from": "slash@2.0.0", - "_id": "slash@2.0.0", - "_inBundle": false, - "_integrity": "sha512-ZYKh3Wh2z1PpEXWr0MpSBZ0V6mZHAQfYevttO11c51CaWjGTaadiKZ+wVt1PbMlDV5qhMFslpZCemhwOK7C89A==", - "_location": "/@jest/reporters/slash", - "_phantomChildren": {}, - "_requested": { - "type": "version", - "registry": true, - "raw": "slash@2.0.0", - "name": "slash", - "escapedName": "slash", - "rawSpec": "2.0.0", - "saveSpec": null, - "fetchSpec": "2.0.0" - }, - "_requiredBy": [ - "/@jest/reporters" - ], - "_resolved": "https://registry.npmjs.org/slash/-/slash-2.0.0.tgz", - "_spec": "2.0.0", - "_where": "/Users/drew.heavner/Documents/Github/sign-android-release", - "author": { - "name": "Sindre Sorhus", - "email": "sindresorhus@gmail.com", - "url": "sindresorhus.com" - }, - "bugs": { - "url": "https://github.com/sindresorhus/slash/issues" - }, - "description": "Convert Windows backslash paths to slash paths", - "devDependencies": { - "ava": "*", - "xo": "*" - }, - "engines": { - "node": ">=6" - }, - "files": [ - "index.js" - ], - "homepage": "https://github.com/sindresorhus/slash#readme", - "keywords": [ - "path", - "seperator", - "sep", - "slash", - "backslash", - "windows", - "win" - ], - "license": "MIT", - "name": "slash", - "repository": { - "type": "git", - "url": "git+https://github.com/sindresorhus/slash.git" - }, - "scripts": { - "test": "xo && ava" - }, - "version": "2.0.0" -} diff --git a/node_modules/@jest/reporters/node_modules/slash/readme.md b/node_modules/@jest/reporters/node_modules/slash/readme.md deleted file mode 100644 index 5e2fedbc9..000000000 --- a/node_modules/@jest/reporters/node_modules/slash/readme.md +++ /dev/null @@ -1,44 +0,0 @@ -# slash [![Build Status](https://travis-ci.org/sindresorhus/slash.svg?branch=master)](https://travis-ci.org/sindresorhus/slash) - -> Convert Windows backslash paths to slash paths: `foo\\bar` ➔ `foo/bar` - -[Forward-slash paths can be used in Windows](http://superuser.com/a/176395/6877) as long as they're not extended-length paths and don't contain any non-ascii characters. - -This was created since the `path` methods in Node outputs `\\` paths on Windows. - - -## Install - -``` -$ npm install slash -``` - - -## Usage - -```js -const path = require('path'); -const slash = require('slash'); - -const str = path.join('foo', 'bar'); -// Unix => foo/bar -// Windows => foo\\bar - -slash(str); -// Unix => foo/bar -// Windows => foo/bar -``` - - -## API - -### slash(path) - -Type: `string` - -Accepts a Windows backslash path and returns a slash path. - - -## License - -MIT © [Sindre Sorhus](https://sindresorhus.com) diff --git a/node_modules/@jest/reporters/package.json b/node_modules/@jest/reporters/package.json index 6cd556796..68f2d2655 100644 --- a/node_modules/@jest/reporters/package.json +++ b/node_modules/@jest/reporters/package.json @@ -1,42 +1,46 @@ { - "_args": [ - [ - "@jest/reporters@24.8.0", - "/Users/drew.heavner/Documents/Github/sign-android-release" - ] - ], - "_development": true, - "_from": "@jest/reporters@24.8.0", - "_id": "@jest/reporters@24.8.0", + "_from": "@jest/reporters@^24.9.0", + "_id": "@jest/reporters@24.9.0", "_inBundle": false, - "_integrity": "sha512-eZ9TyUYpyIIXfYCrw0UHUWUvE35vx5I92HGMgS93Pv7du+GHIzl+/vh8Qj9MCWFK/4TqyttVBPakWMOfZRIfxw==", + "_integrity": "sha512-mu4X0yjaHrffOsWmVLzitKmmmWSQ3GGuefgNscUSWNiUNcEOSEQk9k3pERKEQVBb0Cnn88+UESIsZEMH3o88Gw==", "_location": "/@jest/reporters", - "_phantomChildren": {}, + "_phantomChildren": { + "@types/istanbul-lib-coverage": "2.0.1", + "@types/istanbul-reports": "1.1.1", + "@types/yargs-parser": "15.0.0", + "callsites": "3.1.0", + "chalk": "2.4.2", + "graceful-fs": "4.2.0", + "slash": "2.0.0", + "source-map": "0.6.1" + }, "_requested": { - "type": "version", + "type": "range", "registry": true, - "raw": "@jest/reporters@24.8.0", + "raw": "@jest/reporters@^24.9.0", "name": "@jest/reporters", "escapedName": "@jest%2freporters", "scope": "@jest", - "rawSpec": "24.8.0", + "rawSpec": "^24.9.0", "saveSpec": null, - "fetchSpec": "24.8.0" + "fetchSpec": "^24.9.0" }, "_requiredBy": [ - "/@jest/core" + "/jest/jest-cli/@jest/core" ], - "_resolved": "https://registry.npmjs.org/@jest/reporters/-/reporters-24.8.0.tgz", - "_spec": "24.8.0", - "_where": "/Users/drew.heavner/Documents/Github/sign-android-release", + "_resolved": "https://registry.npmjs.org/@jest/reporters/-/reporters-24.9.0.tgz", + "_shasum": "86660eff8e2b9661d042a8e98a028b8d631a5b43", + "_spec": "@jest/reporters@^24.9.0", + "_where": "/Users/drew.heavner/Documents/Github/sign-android-release/node_modules/jest/node_modules/jest-cli/node_modules/@jest/core", "bugs": { "url": "https://github.com/facebook/jest/issues" }, + "bundleDependencies": false, "dependencies": { - "@jest/environment": "^24.8.0", - "@jest/test-result": "^24.8.0", - "@jest/transform": "^24.8.0", - "@jest/types": "^24.8.0", + "@jest/environment": "^24.9.0", + "@jest/test-result": "^24.9.0", + "@jest/transform": "^24.9.0", + "@jest/types": "^24.9.0", "chalk": "^2.0.1", "exit": "^0.1.2", "glob": "^7.1.2", @@ -44,17 +48,18 @@ "istanbul-lib-instrument": "^3.0.1", "istanbul-lib-report": "^2.0.4", "istanbul-lib-source-maps": "^3.0.1", - "istanbul-reports": "^2.1.1", - "jest-haste-map": "^24.8.0", - "jest-resolve": "^24.8.0", - "jest-runtime": "^24.8.0", - "jest-util": "^24.8.0", + "istanbul-reports": "^2.2.6", + "jest-haste-map": "^24.9.0", + "jest-resolve": "^24.9.0", + "jest-runtime": "^24.9.0", + "jest-util": "^24.9.0", "jest-worker": "^24.6.0", - "node-notifier": "^5.2.1", + "node-notifier": "^5.4.2", "slash": "^2.0.0", "source-map": "^0.6.0", "string-length": "^2.0.0" }, + "deprecated": false, "description": "Jest's reporters", "devDependencies": { "@types/exit": "^0.1.30", @@ -72,7 +77,7 @@ "engines": { "node": ">= 6" }, - "gitHead": "845728f24b3ef41e450595c384e9b5c9fdf248a4", + "gitHead": "9ad0f4bc6b8bdd94989804226c28c9960d9da7d1", "homepage": "https://jestjs.io/", "license": "MIT", "main": "build/index.js", @@ -86,5 +91,5 @@ "directory": "packages/jest-reporters" }, "types": "build/index.d.ts", - "version": "24.8.0" + "version": "24.9.0" } diff --git a/node_modules/@jest/reporters/tsconfig.json b/node_modules/@jest/reporters/tsconfig.json deleted file mode 100644 index 00dffcebc..000000000 --- a/node_modules/@jest/reporters/tsconfig.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "extends": "../../tsconfig.json", - "compilerOptions": { - "rootDir": "src", - "outDir": "build" - }, - "references": [ - {"path": "../jest-environment"}, - {"path": "../jest-haste-map"}, - {"path": "../jest-resolve"}, - {"path": "../jest-runtime"}, - {"path": "../jest-test-result"}, - {"path": "../jest-types"}, - {"path": "../jest-util"}, - {"path": "../jest-worker"} - ] -} diff --git a/node_modules/@jest/test-sequencer/LICENSE b/node_modules/@jest/test-sequencer/LICENSE deleted file mode 100644 index 10e779c44..000000000 --- a/node_modules/@jest/test-sequencer/LICENSE +++ /dev/null @@ -1,23 +0,0 @@ -MIT License - -For Jest software - -Copyright (c) 2014-present, Facebook, Inc. - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/node_modules/@jest/test-sequencer/package.json b/node_modules/@jest/test-sequencer/package.json index 70d858125..50cac6f5a 100644 --- a/node_modules/@jest/test-sequencer/package.json +++ b/node_modules/@jest/test-sequencer/package.json @@ -1,47 +1,53 @@ { - "_args": [ - [ - "@jest/test-sequencer@24.8.0", - "/Users/drew.heavner/Documents/Github/sign-android-release" - ] - ], - "_development": true, - "_from": "@jest/test-sequencer@24.8.0", - "_id": "@jest/test-sequencer@24.8.0", + "_from": "@jest/test-sequencer@^24.9.0", + "_id": "@jest/test-sequencer@24.9.0", "_inBundle": false, - "_integrity": "sha512-OzL/2yHyPdCHXEzhoBuq37CE99nkme15eHkAzXRVqthreWZamEMA0WoetwstsQBCXABhczpK03JNbc4L01vvLg==", + "_integrity": "sha512-6qqsU4o0kW1dvA95qfNog8v8gkRN9ph6Lz7r96IvZpHdNipP2cBcb07J1Z45mz/VIS01OHJ3pY8T5fUY38tg4A==", "_location": "/@jest/test-sequencer", - "_phantomChildren": {}, + "_phantomChildren": { + "@types/istanbul-lib-coverage": "2.0.1", + "@types/istanbul-reports": "1.1.1", + "@types/yargs-parser": "15.0.0", + "callsites": "3.1.0", + "chalk": "2.4.2", + "graceful-fs": "4.2.0", + "slash": "2.0.0", + "source-map": "0.6.1" + }, "_requested": { - "type": "version", + "type": "range", "registry": true, - "raw": "@jest/test-sequencer@24.8.0", + "raw": "@jest/test-sequencer@^24.9.0", "name": "@jest/test-sequencer", "escapedName": "@jest%2ftest-sequencer", "scope": "@jest", - "rawSpec": "24.8.0", + "rawSpec": "^24.9.0", "saveSpec": null, - "fetchSpec": "24.8.0" + "fetchSpec": "^24.9.0" }, "_requiredBy": [ - "/jest-config" + "/jest-config", + "/jest/jest-cli/jest-config" ], - "_resolved": "https://registry.npmjs.org/@jest/test-sequencer/-/test-sequencer-24.8.0.tgz", - "_spec": "24.8.0", - "_where": "/Users/drew.heavner/Documents/Github/sign-android-release", + "_resolved": "https://registry.npmjs.org/@jest/test-sequencer/-/test-sequencer-24.9.0.tgz", + "_shasum": "f8f334f35b625a4f2f355f2fe7e6036dad2e6b31", + "_spec": "@jest/test-sequencer@^24.9.0", + "_where": "/Users/drew.heavner/Documents/Github/sign-android-release/node_modules/jest-config", "bugs": { "url": "https://github.com/facebook/jest/issues" }, + "bundleDependencies": false, "dependencies": { - "@jest/test-result": "^24.8.0", - "jest-haste-map": "^24.8.0", - "jest-runner": "^24.8.0", - "jest-runtime": "^24.8.0" + "@jest/test-result": "^24.9.0", + "jest-haste-map": "^24.9.0", + "jest-runner": "^24.9.0", + "jest-runtime": "^24.9.0" }, + "deprecated": false, "engines": { "node": ">= 6" }, - "gitHead": "845728f24b3ef41e450595c384e9b5c9fdf248a4", + "gitHead": "9ad0f4bc6b8bdd94989804226c28c9960d9da7d1", "homepage": "https://github.com/facebook/jest#readme", "license": "MIT", "main": "build/index.js", @@ -55,5 +61,5 @@ "directory": "packages/jest-test-sequencer" }, "types": "build/index.d.ts", - "version": "24.8.0" + "version": "24.9.0" } diff --git a/node_modules/@jest/test-sequencer/tsconfig.json b/node_modules/@jest/test-sequencer/tsconfig.json deleted file mode 100644 index 78fc3a6be..000000000 --- a/node_modules/@jest/test-sequencer/tsconfig.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "extends": "../../tsconfig.json", - "compilerOptions": { - "rootDir": "src", - "outDir": "build" - }, - "references": [ - {"path": "../jest-haste-map"}, - {"path": "../jest-runner"}, - {"path": "../jest-test-result"}, - {"path": "../jest-types"} - ] -} diff --git a/node_modules/@jest/transform/LICENSE b/node_modules/@jest/transform/LICENSE deleted file mode 100644 index 10e779c44..000000000 --- a/node_modules/@jest/transform/LICENSE +++ /dev/null @@ -1,23 +0,0 @@ -MIT License - -For Jest software - -Copyright (c) 2014-present, Facebook, Inc. - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/node_modules/@jest/transform/build/ScriptTransformer.d.ts b/node_modules/@jest/transform/build/ScriptTransformer.d.ts index e50dc856b..220183481 100644 --- a/node_modules/@jest/transform/build/ScriptTransformer.d.ts +++ b/node_modules/@jest/transform/build/ScriptTransformer.d.ts @@ -11,6 +11,7 @@ export default class ScriptTransformer { private _cache; private _config; private _transformCache; + private _transformConfigCache; constructor(config: Config.ProjectConfig); private _getCacheKey; private _getFileCachePath; @@ -27,6 +28,8 @@ export default class ScriptTransformer { private _transformAndBuildScript; transform(filename: Config.Path, options: Options, fileSource?: string): TransformResult; transformJson(filename: Config.Path, options: Options, fileSource: string): string; + requireAndTranspileModule(moduleName: string, callback?: (module: ModuleType) => void): ModuleType; + requireAndTranspileModule(moduleName: string, callback?: (module: ModuleType) => Promise): Promise; /** * @deprecated use `this.shouldTransform` instead */ diff --git a/node_modules/@jest/transform/build/ScriptTransformer.d.ts.map b/node_modules/@jest/transform/build/ScriptTransformer.d.ts.map index 4c084998c..d74a82fe3 100644 --- a/node_modules/@jest/transform/build/ScriptTransformer.d.ts.map +++ b/node_modules/@jest/transform/build/ScriptTransformer.d.ts.map @@ -1 +1 @@ -{"version":3,"file":"ScriptTransformer.d.ts","sourceRoot":"","sources":["../src/ScriptTransformer.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAKH,OAAO,EAAC,MAAM,EAAC,MAAM,aAAa,CAAC;AAYnC,OAAO,EACL,OAAO,EAGP,eAAe,EAChB,MAAM,SAAS,CAAC;AAyBjB,MAAM,CAAC,OAAO,OAAO,iBAAiB;IACpC,MAAM,CAAC,oBAAoB,EAAE,oBAAoB,CAAC;IAClD,OAAO,CAAC,MAAM,CAAe;IAC7B,OAAO,CAAC,OAAO,CAAuB;IACtC,OAAO,CAAC,eAAe,CAAgC;gBAE3C,MAAM,EAAE,MAAM,CAAC,aAAa;IAoBxC,OAAO,CA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IAkBzB,OAAO,CAAC,eAAe;IA4BvB,OAAO,CAAC,eAAe;IAmCvB,OAAO,CAAC,YAAY;IAUpB,kBAAkB,CAAC,QAAQ,EAAE,MAAM,CAAC,IAAI,GAAG,IAAI;IAI/C,eAAe,CAAC,QAAQ,EAAE,MAAM,CAAC,IAAI,EAAE,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,OAAO;;;;;IAwF3E,OAAO,CAAC,wBAAwB;IA+DhC,SAAS,CACP,QAAQ,EAAE,MAAM,CAAC,IAAI,EACrB,OAAO,EAAE,OAAO,EAChB,UAAU,CAAC,EAAE,MAAM,GAClB,eAAe;IA2BlB,aAAa,CACX,QAAQ,EAAE,MAAM,CAAC,IAAI,EACrB,OAAO,EAAE,OAAO,EAChB,UAAU,EAAE,MAAM,GACjB,MAAM;IAkBT,yBAAyB,CAAC,UAAU,GAAG,OAAO,EAC5C,UAAU,EAAE,MAAM,EAClB,QAAQ,CAAC,EAAE,CAAC,MAAM,EAAE,UAAU,KAAK,IAAI,GACtC,UAAU;IACb,yBAAyB,CAAC,UAAU,GAAG,OAAO,EAC5C,UAAU,EAAE,MAAM,EAClB,QAAQ,CAAC,EAAE,CAAC,MAAM,EAAE,UAAU,KAAK,OAAO,CAAC,IAAI,CAAC,GAC/C,OAAO,CAAC,UAAU,CAAC;IAsDtB;;OAEG;IAEH,OAAO,CAAC,gBAAgB;IAIxB,eAAe,CAAC,QAAQ,EAAE,MAAM,CAAC,IAAI,GAAG,OAAO;CAQhD"} \ No newline at end of file diff --git a/node_modules/@jest/transform/build/ScriptTransformer.js b/node_modules/@jest/transform/build/ScriptTransformer.js index f30fe2f5b..0dbc1d7b6 100644 --- a/node_modules/@jest/transform/build/ScriptTransformer.js +++ b/node_modules/@jest/transform/build/ScriptTransformer.js @@ -135,6 +135,16 @@ function _realpathNative() { return data; } +function _pirates() { + const data = require('pirates'); + + _pirates = function _pirates() { + return data; + }; + + return data; +} + var _shouldInstrument = _interopRequireDefault(require('./shouldInstrument')); var _enhanceUnexpectedTokenMessage = _interopRequireDefault( @@ -159,6 +169,38 @@ function _defineProperty(obj, key, value) { return obj; } +function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { + try { + var info = gen[key](arg); + var value = info.value; + } catch (error) { + reject(error); + return; + } + if (info.done) { + resolve(value); + } else { + Promise.resolve(value).then(_next, _throw); + } +} + +function _asyncToGenerator(fn) { + return function() { + var self = this, + args = arguments; + return new Promise(function(resolve, reject) { + var gen = fn.apply(self, args); + function _next(value) { + asyncGeneratorStep(gen, resolve, reject, _next, _throw, 'next', value); + } + function _throw(err) { + asyncGeneratorStep(gen, resolve, reject, _next, _throw, 'throw', err); + } + _next(undefined); + }); + }; +} + // Use `require` to avoid TS rootDir const _require = require('../package.json'), VERSION = _require.version; // This data structure is used to avoid recalculating some data every time that @@ -169,6 +211,21 @@ const projectCaches = new WeakMap(); // To reset the cache for specific changese const CACHE_VERSION = '1'; +function waitForPromiseWithCleanup(_x, _x2) { + return _waitForPromiseWithCleanup.apply(this, arguments); +} + +function _waitForPromiseWithCleanup() { + _waitForPromiseWithCleanup = _asyncToGenerator(function*(promise, cleanup) { + try { + yield promise; + } finally { + cleanup(); + } + }); + return _waitForPromiseWithCleanup.apply(this, arguments); +} + class ScriptTransformer { constructor(config) { _defineProperty(this, '_cache', void 0); @@ -177,8 +234,11 @@ class ScriptTransformer { _defineProperty(this, '_transformCache', void 0); + _defineProperty(this, '_transformConfigCache', void 0); + this._config = config; this._transformCache = new Map(); + this._transformConfigCache = new Map(); let projectCache = projectCaches.get(config); if (!projectCache) { @@ -258,7 +318,11 @@ class ScriptTransformer { for (let i = 0; i < transformRegExp.length; i++) { if (transformRegExp[i][0].test(filename)) { - return transformRegExp[i][1]; + const transformPath = transformRegExp[i][1]; + + this._transformConfigCache.set(transformPath, transformRegExp[i][2]); + + return transformPath; } } @@ -283,8 +347,10 @@ class ScriptTransformer { transform = require(transformPath); + const transformerConfig = this._transformConfigCache.get(transformPath); + if (typeof transform.createTransformer === 'function') { - transform = transform.createTransformer(); + transform = transform.createTransformer(transformerConfig); } if (typeof transform.process !== 'function') { @@ -543,6 +609,56 @@ class ScriptTransformer { return fileSource; } + + requireAndTranspileModule(moduleName, callback) { + // Load the transformer to avoid a cycle where we need to load a + // transformer in order to transform it in the require hooks + this.preloadTransformer(moduleName); + let transforming = false; + const revertHook = (0, _pirates().addHook)( + (code, filename) => { + try { + transforming = true; + return this.transformSource(filename, code, false).code || code; + } finally { + transforming = false; + } + }, + { + exts: [_path().default.extname(moduleName)], + ignoreNodeModules: false, + matcher: filename => { + if (transforming) { + // Don't transform any dependency required by the transformer itself + return false; + } + + return this.shouldTransform(filename); + } + } + ); + + const module = require(moduleName); + + if (!callback) { + revertHook(); + return module; + } + + try { + const cbResult = callback(module); + + if ((0, _jestUtil().isPromise)(cbResult)) { + return waitForPromiseWithCleanup(cbResult, revertHook).then( + () => module + ); + } + } finally { + revertHook(); + } + + return module; + } /** * @deprecated use `this.shouldTransform` instead */ @@ -700,7 +816,7 @@ const calcIgnorePatternRegExp = config => { !config.transformIgnorePatterns || config.transformIgnorePatterns.length === 0 ) { - return; + return undefined; } return new RegExp(config.transformIgnorePatterns.join('|')); @@ -708,7 +824,7 @@ const calcIgnorePatternRegExp = config => { const calcTransformRegExp = config => { if (!config.transform.length) { - return; + return undefined; } const transformRegexp = []; @@ -716,7 +832,8 @@ const calcTransformRegExp = config => { for (let i = 0; i < config.transform.length; i++) { transformRegexp.push([ new RegExp(config.transform[i][0]), - config.transform[i][1] + config.transform[i][1], + config.transform[i][2] ]); } diff --git a/node_modules/@jest/transform/build/enhanceUnexpectedTokenMessage.d.ts b/node_modules/@jest/transform/build/enhanceUnexpectedTokenMessage.d.ts index c2b30a3e9..0a5157cab 100644 --- a/node_modules/@jest/transform/build/enhanceUnexpectedTokenMessage.d.ts +++ b/node_modules/@jest/transform/build/enhanceUnexpectedTokenMessage.d.ts @@ -1,2 +1,8 @@ +/** + * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ export default function enhanceUnexpectedTokenMessage(e: Error): Error; //# sourceMappingURL=enhanceUnexpectedTokenMessage.d.ts.map \ No newline at end of file diff --git a/node_modules/@jest/transform/build/enhanceUnexpectedTokenMessage.d.ts.map b/node_modules/@jest/transform/build/enhanceUnexpectedTokenMessage.d.ts.map index da500b0b5..28bd6de16 100644 --- a/node_modules/@jest/transform/build/enhanceUnexpectedTokenMessage.d.ts.map +++ b/node_modules/@jest/transform/build/enhanceUnexpectedTokenMessage.d.ts.map @@ -1 +1 @@ -{"version":3,"file":"enhanceUnexpectedTokenMessage.d.ts","sourceRoot":"","sources":["../src/enhanceUnexpectedTokenMessage.ts"],"names":[],"mappings":"AAMA,MAAM,CAAC,OAAO,UAAU,6BAA6B,CAAC,CAAC,EAAE,KAAK,SA2B7D"} \ No newline at end of file +{"version":3,"file":"enhanceUnexpectedTokenMessage.d.ts","sourceRoot":"","sources":["../src/enhanceUnexpectedTokenMessage.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAMH,MAAM,CAAC,OAAO,UAAU,6BAA6B,CAAC,CAAC,EAAE,KAAK,SA2B7D"} \ No newline at end of file diff --git a/node_modules/@jest/transform/build/enhanceUnexpectedTokenMessage.js b/node_modules/@jest/transform/build/enhanceUnexpectedTokenMessage.js index df93f7bc2..a05b93a1f 100644 --- a/node_modules/@jest/transform/build/enhanceUnexpectedTokenMessage.js +++ b/node_modules/@jest/transform/build/enhanceUnexpectedTokenMessage.js @@ -19,7 +19,12 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : {default: obj}; } -// Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. +/** + * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ const DOT = ' \u2022 '; function enhanceUnexpectedTokenMessage(e) { diff --git a/node_modules/@jest/transform/node_modules/slash/index.js b/node_modules/@jest/transform/node_modules/slash/index.js deleted file mode 100644 index 75d72501a..000000000 --- a/node_modules/@jest/transform/node_modules/slash/index.js +++ /dev/null @@ -1,11 +0,0 @@ -'use strict'; -module.exports = input => { - const isExtendedLengthPath = /^\\\\\?\\/.test(input); - const hasNonAscii = /[^\u0000-\u0080]+/.test(input); // eslint-disable-line no-control-regex - - if (isExtendedLengthPath || hasNonAscii) { - return input; - } - - return input.replace(/\\/g, '/'); -}; diff --git a/node_modules/@jest/transform/node_modules/slash/license b/node_modules/@jest/transform/node_modules/slash/license deleted file mode 100644 index e7af2f771..000000000 --- a/node_modules/@jest/transform/node_modules/slash/license +++ /dev/null @@ -1,9 +0,0 @@ -MIT License - -Copyright (c) Sindre Sorhus (sindresorhus.com) - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/@jest/transform/node_modules/slash/package.json b/node_modules/@jest/transform/node_modules/slash/package.json deleted file mode 100644 index 993338cdb..000000000 --- a/node_modules/@jest/transform/node_modules/slash/package.json +++ /dev/null @@ -1,70 +0,0 @@ -{ - "_args": [ - [ - "slash@2.0.0", - "/Users/drew.heavner/Documents/Github/sign-android-release" - ] - ], - "_development": true, - "_from": "slash@2.0.0", - "_id": "slash@2.0.0", - "_inBundle": false, - "_integrity": "sha512-ZYKh3Wh2z1PpEXWr0MpSBZ0V6mZHAQfYevttO11c51CaWjGTaadiKZ+wVt1PbMlDV5qhMFslpZCemhwOK7C89A==", - "_location": "/@jest/transform/slash", - "_phantomChildren": {}, - "_requested": { - "type": "version", - "registry": true, - "raw": "slash@2.0.0", - "name": "slash", - "escapedName": "slash", - "rawSpec": "2.0.0", - "saveSpec": null, - "fetchSpec": "2.0.0" - }, - "_requiredBy": [ - "/@jest/transform" - ], - "_resolved": "https://registry.npmjs.org/slash/-/slash-2.0.0.tgz", - "_spec": "2.0.0", - "_where": "/Users/drew.heavner/Documents/Github/sign-android-release", - "author": { - "name": "Sindre Sorhus", - "email": "sindresorhus@gmail.com", - "url": "sindresorhus.com" - }, - "bugs": { - "url": "https://github.com/sindresorhus/slash/issues" - }, - "description": "Convert Windows backslash paths to slash paths", - "devDependencies": { - "ava": "*", - "xo": "*" - }, - "engines": { - "node": ">=6" - }, - "files": [ - "index.js" - ], - "homepage": "https://github.com/sindresorhus/slash#readme", - "keywords": [ - "path", - "seperator", - "sep", - "slash", - "backslash", - "windows", - "win" - ], - "license": "MIT", - "name": "slash", - "repository": { - "type": "git", - "url": "git+https://github.com/sindresorhus/slash.git" - }, - "scripts": { - "test": "xo && ava" - }, - "version": "2.0.0" -} diff --git a/node_modules/@jest/transform/node_modules/slash/readme.md b/node_modules/@jest/transform/node_modules/slash/readme.md deleted file mode 100644 index 5e2fedbc9..000000000 --- a/node_modules/@jest/transform/node_modules/slash/readme.md +++ /dev/null @@ -1,44 +0,0 @@ -# slash [![Build Status](https://travis-ci.org/sindresorhus/slash.svg?branch=master)](https://travis-ci.org/sindresorhus/slash) - -> Convert Windows backslash paths to slash paths: `foo\\bar` ➔ `foo/bar` - -[Forward-slash paths can be used in Windows](http://superuser.com/a/176395/6877) as long as they're not extended-length paths and don't contain any non-ascii characters. - -This was created since the `path` methods in Node outputs `\\` paths on Windows. - - -## Install - -``` -$ npm install slash -``` - - -## Usage - -```js -const path = require('path'); -const slash = require('slash'); - -const str = path.join('foo', 'bar'); -// Unix => foo/bar -// Windows => foo\\bar - -slash(str); -// Unix => foo/bar -// Windows => foo/bar -``` - - -## API - -### slash(path) - -Type: `string` - -Accepts a Windows backslash path and returns a slash path. - - -## License - -MIT © [Sindre Sorhus](https://sindresorhus.com) diff --git a/node_modules/@jest/transform/package.json b/node_modules/@jest/transform/package.json index 845941628..1d21a279b 100644 --- a/node_modules/@jest/transform/package.json +++ b/node_modules/@jest/transform/package.json @@ -1,58 +1,58 @@ { - "_args": [ - [ - "@jest/transform@24.8.0", - "/Users/drew.heavner/Documents/Github/sign-android-release" - ] - ], - "_development": true, - "_from": "@jest/transform@24.8.0", - "_id": "@jest/transform@24.8.0", + "_from": "@jest/transform@^24.9.0", + "_id": "@jest/transform@24.9.0", "_inBundle": false, - "_integrity": "sha512-xBMfFUP7TortCs0O+Xtez2W7Zu1PLH9bvJgtraN1CDST6LBM/eTOZ9SfwS/lvV8yOfcDpFmwf9bq5cYbXvqsvA==", + "_integrity": "sha512-TcQUmyNRxV94S0QpMOnZl0++6RMiqpbH/ZMccFB/amku6Uwvyb1cjYX7xkp5nGNkbX4QPH/FcB6q1HBTHynLmQ==", "_location": "/@jest/transform", - "_phantomChildren": {}, + "_phantomChildren": { + "@types/istanbul-lib-coverage": "2.0.1", + "@types/istanbul-reports": "1.1.1", + "@types/yargs-parser": "15.0.0" + }, "_requested": { - "type": "version", + "type": "range", "registry": true, - "raw": "@jest/transform@24.8.0", + "raw": "@jest/transform@^24.9.0", "name": "@jest/transform", "escapedName": "@jest%2ftransform", "scope": "@jest", - "rawSpec": "24.8.0", + "rawSpec": "^24.9.0", "saveSpec": null, - "fetchSpec": "24.8.0" + "fetchSpec": "^24.9.0" }, "_requiredBy": [ - "/@jest/core", "/@jest/environment", "/@jest/reporters", "/babel-jest", "/jest-runtime" ], - "_resolved": "https://registry.npmjs.org/@jest/transform/-/transform-24.8.0.tgz", - "_spec": "24.8.0", - "_where": "/Users/drew.heavner/Documents/Github/sign-android-release", + "_resolved": "https://registry.npmjs.org/@jest/transform/-/transform-24.9.0.tgz", + "_shasum": "4ae2768b296553fadab09e9ec119543c90b16c56", + "_spec": "@jest/transform@^24.9.0", + "_where": "/Users/drew.heavner/Documents/Github/sign-android-release/node_modules/@jest/reporters", "bugs": { "url": "https://github.com/facebook/jest/issues" }, + "bundleDependencies": false, "dependencies": { "@babel/core": "^7.1.0", - "@jest/types": "^24.8.0", + "@jest/types": "^24.9.0", "babel-plugin-istanbul": "^5.1.0", "chalk": "^2.0.1", "convert-source-map": "^1.4.0", "fast-json-stable-stringify": "^2.0.0", "graceful-fs": "^4.1.15", - "jest-haste-map": "^24.8.0", - "jest-regex-util": "^24.3.0", - "jest-util": "^24.8.0", + "jest-haste-map": "^24.9.0", + "jest-regex-util": "^24.9.0", + "jest-util": "^24.9.0", "micromatch": "^3.1.10", + "pirates": "^4.0.1", "realpath-native": "^1.1.0", "slash": "^2.0.0", "source-map": "^0.6.1", "write-file-atomic": "2.4.1" }, + "deprecated": false, "devDependencies": { "@types/babel__core": "^7.1.0", "@types/convert-source-map": "^1.5.1", @@ -64,7 +64,7 @@ "engines": { "node": ">= 6" }, - "gitHead": "845728f24b3ef41e450595c384e9b5c9fdf248a4", + "gitHead": "9ad0f4bc6b8bdd94989804226c28c9960d9da7d1", "homepage": "https://github.com/facebook/jest#readme", "license": "MIT", "main": "build/index.js", @@ -77,5 +77,5 @@ "url": "git+https://github.com/facebook/jest.git", "directory": "packages/jest-transform" }, - "version": "24.8.0" + "version": "24.9.0" } diff --git a/node_modules/@jest/transform/tsconfig.json b/node_modules/@jest/transform/tsconfig.json deleted file mode 100644 index 73d865a32..000000000 --- a/node_modules/@jest/transform/tsconfig.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "extends": "../../tsconfig.json", - "compilerOptions": { - "rootDir": "src", - "outDir": "build" - }, - "references": [ - {"path": "../jest-haste-map"}, - {"path": "../jest-regex-util"}, - {"path": "../jest-types"}, - {"path": "../jest-util"} - ] -} diff --git a/node_modules/@types/babel__core/LICENSE b/node_modules/@types/babel__core/LICENSE index 21071075c..9e841e7a2 100644 --- a/node_modules/@types/babel__core/LICENSE +++ b/node_modules/@types/babel__core/LICENSE @@ -1,6 +1,6 @@ MIT License - Copyright (c) Microsoft Corporation. All rights reserved. + Copyright (c) Microsoft Corporation. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/node_modules/@types/babel__core/README.md b/node_modules/@types/babel__core/README.md index 57dffcd09..e11bf30f9 100644 --- a/node_modules/@types/babel__core/README.md +++ b/node_modules/@types/babel__core/README.md @@ -2,15 +2,15 @@ > `npm install --save @types/babel__core` # Summary -This package contains type definitions for @babel/core ( https://github.com/babel/babel/tree/master/packages/babel-core ). +This package contains type definitions for @babel/core (https://github.com/babel/babel/tree/master/packages/babel-core). # Details -Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/babel__core +Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/babel__core. -Additional Details - * Last updated: Wed, 15 May 2019 16:25:45 GMT - * Dependencies: @types/babel__generator, @types/babel__traverse, @types/babel__template, @types/babel__types, @types/babel__parser - * Global values: babel +### Additional Details + * Last updated: Tue, 03 Nov 2020 00:06:01 GMT + * Dependencies: [@types/babel__generator](https://npmjs.com/package/@types/babel__generator), [@types/babel__traverse](https://npmjs.com/package/@types/babel__traverse), [@types/babel__template](https://npmjs.com/package/@types/babel__template), [@types/babel__types](https://npmjs.com/package/@types/babel__types), [@types/babel__parser](https://npmjs.com/package/@types/babel__parser) + * Global values: `babel` # Credits -These definitions were written by Troy Gerwien , Marvin Hagemeister , Melvin Groenhoff , Jessica Franco . +These definitions were written by [Troy Gerwien](https://github.com/yortus), [Marvin Hagemeister](https://github.com/marvinhagemeister), [Melvin Groenhoff](https://github.com/mgroenhoff), [Jessica Franco](https://github.com/Jessidhia), and [Ifiok Jr.](https://github.com/ifiokjr). diff --git a/node_modules/@types/babel__core/index.d.ts b/node_modules/@types/babel__core/index.d.ts index cabba4397..4b50b4a9f 100644 --- a/node_modules/@types/babel__core/index.d.ts +++ b/node_modules/@types/babel__core/index.d.ts @@ -4,24 +4,17 @@ // Marvin Hagemeister // Melvin Groenhoff // Jessica Franco +// Ifiok Jr. // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.9 - -import { GeneratorOptions } from "@babel/generator"; -import traverse, { Visitor, NodePath } from "@babel/traverse"; -import template from "@babel/template"; -import * as t from "@babel/types"; -import { ParserOptions } from "@babel/parser"; - -export { - ParserOptions, - GeneratorOptions, - t as types, - template, - traverse, - NodePath, - Visitor -}; +// Minimum TypeScript Version: 3.4 + +import { GeneratorOptions } from '@babel/generator'; +import traverse, { Visitor, NodePath, Hub, Scope } from '@babel/traverse'; +import template from '@babel/template'; +import * as t from '@babel/types'; +import { ParserOptions } from '@babel/parser'; + +export { ParserOptions, GeneratorOptions, t as types, template, traverse, NodePath, Visitor }; export type Node = t.Node; export type ParseResult = t.File | t.Program; @@ -71,7 +64,7 @@ export interface TransformOptions { * * Default: `undefined` */ - configFile?: string | false | null; + configFile?: string | boolean | null; /** * Specify whether or not to use .babelrc and @@ -87,7 +80,7 @@ export interface TransformOptions { * * Default: `(root)` */ - babelrcRoots?: true | string | string[] | null; + babelrcRoots?: boolean | MatchPattern | MatchPattern[] | null; /** * Defaults to environment variable `BABEL_ENV` if set, or else `NODE_ENV` if set, or else it defaults to `"development"` @@ -96,6 +89,11 @@ export interface TransformOptions { */ envName?: string; + /** + * If any of patterns match, the current configuration object is considered inactive and is ignored during config processing. + */ + exclude?: MatchPattern | MatchPattern[]; + /** * Enable code generation * @@ -115,7 +113,7 @@ export interface TransformOptions { * * Default: `"auto"` */ - compact?: boolean | "auto" | null; + compact?: boolean | 'auto' | null; /** * The working directory that Babel's programmatic options are loaded relative to. @@ -138,7 +136,7 @@ export interface TransformOptions { * * Default: `{}` */ - env?: { [index: string]: TransformOptions | null | undefined; } | null; + env?: { [index: string]: TransformOptions | null | undefined } | null; /** * A path to a `.babelrc` file to extend @@ -187,7 +185,12 @@ export interface TransformOptions { * * Default: `null` */ - ignore?: string[] | null; + ignore?: MatchPattern[] | null; + + /** + * This option is a synonym for "test" + */ + include?: MatchPattern | MatchPattern[]; /** * A source map object that the output source map will be based on @@ -230,7 +233,13 @@ export interface TransformOptions { * * Default: `null` */ - only?: string | RegExp | Array | null; + only?: MatchPattern[] | null; + + /** + * Allows users to provide an array of options that will be merged into the current configuration one at a time. + * This feature is best used alongside the "test"/"include"/"exclude" options to provide conditions for which an override should apply + */ + overrides?: TransformOptions[]; /** * An object containing the options to be passed down to the babel parser, @babel/parser @@ -280,7 +289,7 @@ export interface TransformOptions { * * Default: `false` */ - sourceMaps?: boolean | "inline" | "both" | null; + sourceMaps?: boolean | 'inline' | 'both' | null; /** * The root from which all sources are relative @@ -295,13 +304,24 @@ export interface TransformOptions { * * Default: `("module")` */ - sourceType?: "script" | "module" | "unambiguous" | null; + sourceType?: 'script' | 'module' | 'unambiguous' | null; + + /** + * If all patterns fail to match, the current configuration object is considered inactive and is ignored during config processing. + */ + test?: MatchPattern | MatchPattern[]; /** * An optional callback that can be used to wrap visitor methods. **NOTE**: This is useful for things like introspection, and not really needed for implementing anything. Called as * `wrapPluginVisitorMethod(pluginAlias, visitorType, callback)`. */ - wrapPluginVisitorMethod?: ((pluginAlias: string, visitorType: "enter" | "exit", callback: (path: NodePath, state: any) => void) => (path: NodePath, state: any) => void) | null; + wrapPluginVisitorMethod?: + | (( + pluginAlias: string, + visitorType: 'enter' | 'exit', + callback: (path: NodePath, state: any) => void, + ) => (path: NodePath, state: any) => void) + | null; } export interface TransformCaller { @@ -309,11 +329,21 @@ export interface TransformCaller { name: string; // e.g. set to true by `babel-loader` and false by `babel-jest` supportsStaticESM?: boolean; + supportsDynamicImport?: boolean; + supportsExportNamespaceFrom?: boolean; + supportsTopLevelAwait?: boolean; // augment this with a "declare module '@babel/core' { ... }" if you need more keys } export type FileResultCallback = (err: Error | null, result: BabelFileResult | null) => any; +export interface MatchPatternContext { + envName: string; + dirname: string; + caller: TransformCaller | undefined; +} +export type MatchPattern = string | RegExp | ((filename: string | undefined, context: MatchPatternContext) => boolean); + /** * Transforms the passed in code. Calling a callback with an object with the generated code, source map, and AST. */ @@ -367,7 +397,12 @@ export function transformFromAst(ast: Node, code: string | undefined, callback: /** * Given an AST, transform it. */ -export function transformFromAst(ast: Node, code: string | undefined, opts: TransformOptions | undefined, callback: FileResultCallback): void; +export function transformFromAst( + ast: Node, + code: string | undefined, + opts: TransformOptions | undefined, + callback: FileResultCallback, +): void; /** * Here for backward-compatibility. Ideally use ".transformSync" if you want a synchronous API. @@ -377,21 +412,45 @@ export function transformFromAstSync(ast: Node, code?: string, opts?: TransformO /** * Given an AST, transform it. */ -export function transformFromAstAsync(ast: Node, code?: string, opts?: TransformOptions): Promise; +export function transformFromAstAsync( + ast: Node, + code?: string, + opts?: TransformOptions, +): Promise; // A babel plugin is a simple function which must return an object matching // the following interface. Babel will throw if it finds unknown properties. // The list of allowed plugin keys is here: // https://github.com/babel/babel/blob/4e50b2d9d9c376cee7a2cbf56553fe5b982ea53c/packages/babel-core/src/config/option-manager.js#L71 -export interface PluginObj { +export interface PluginObj { name?: string; manipulateOptions?(opts: any, parserOpts: any): void; - pre?(this: S, state: any): void; + pre?(this: S, file: BabelFile): void; visitor: Visitor; - post?(this: S, state: any): void; + post?(this: S, file: BabelFile): void; inherits?: any; } +export interface BabelFile { + ast: t.File; + opts: TransformOptions; + hub: Hub; + metadata: object; + path: NodePath; + scope: Scope; + inputMap: object | null; + code: string; +} + +export interface PluginPass { + file: BabelFile; + key: string; + opts: PluginOptions; + cwd: string; + filename: string; + [key: string]: unknown; +} + export interface BabelFileResult { ast?: t.File | null; code?: string | null; @@ -498,6 +557,7 @@ export interface PartialConfig { babelrc?: string; babelignore?: string; config?: string; + hasFilesystemConfig: () => boolean; } export interface ConfigItem { @@ -542,11 +602,19 @@ export type PluginOptions = object | undefined | false; export type PluginTarget = string | object | ((...args: any[]) => any); -export type PluginItem = ConfigItem | PluginObj | PluginTarget | [PluginTarget, PluginOptions] | [PluginTarget, PluginOptions, string | undefined]; +export type PluginItem = + | ConfigItem + | PluginObj + | PluginTarget + | [PluginTarget, PluginOptions] + | [PluginTarget, PluginOptions, string | undefined]; + +export function resolvePlugin(name: string, dirname: string): string | null; +export function resolvePreset(name: string, dirname: string): string | null; export interface CreateConfigItemOptions { dirname?: string; - type?: "preset" | "plugin"; + type?: 'preset' | 'plugin'; } /** @@ -554,7 +622,10 @@ export interface CreateConfigItemOptions { * given plugin, Babel will call the plugin's function itself multiple times. If you have a clear set of expected * plugins and presets to inject, pre-constructing the config items would be recommended. */ -export function createConfigItem(value: PluginTarget | [PluginTarget, PluginOptions] | [PluginTarget, PluginOptions, string | undefined], options?: CreateConfigItemOptions): ConfigItem; +export function createConfigItem( + value: PluginTarget | [PluginTarget, PluginOptions] | [PluginTarget, PluginOptions, string | undefined], + options?: CreateConfigItemOptions, +): ConfigItem; // NOTE: the documentation says the ConfigAPI also exposes @babel/core's exports, but it actually doesn't /** diff --git a/node_modules/@types/babel__core/package.json b/node_modules/@types/babel__core/package.json index 81d2d80f4..d1937df10 100644 --- a/node_modules/@types/babel__core/package.json +++ b/node_modules/@types/babel__core/package.json @@ -1,37 +1,32 @@ { - "_args": [ - [ - "@types/babel__core@7.1.2", - "/Users/drew.heavner/Documents/Github/sign-android-release" - ] - ], - "_development": true, - "_from": "@types/babel__core@7.1.2", - "_id": "@types/babel__core@7.1.2", + "_from": "@types/babel__core@^7.1.0", + "_id": "@types/babel__core@7.1.12", "_inBundle": false, - "_integrity": "sha512-cfCCrFmiGY/yq0NuKNxIQvZFy9kY/1immpSpTngOnyIbD4+eJOG5mxphhHDv3CHL9GltO4GcKr54kGBg3RNdbg==", + "_integrity": "sha512-wMTHiiTiBAAPebqaPiPDLFA4LYPKr6Ph0Xq/6rq1Ur3v66HXyG+clfR9CNETkD7MQS8ZHvpQOtA53DLws5WAEQ==", "_location": "/@types/babel__core", "_phantomChildren": {}, "_requested": { - "type": "version", + "type": "range", "registry": true, - "raw": "@types/babel__core@7.1.2", + "raw": "@types/babel__core@^7.1.0", "name": "@types/babel__core", "escapedName": "@types%2fbabel__core", "scope": "@types", - "rawSpec": "7.1.2", + "rawSpec": "^7.1.0", "saveSpec": null, - "fetchSpec": "7.1.2" + "fetchSpec": "^7.1.0" }, "_requiredBy": [ "/babel-jest" ], - "_resolved": "https://registry.npmjs.org/@types/babel__core/-/babel__core-7.1.2.tgz", - "_spec": "7.1.2", - "_where": "/Users/drew.heavner/Documents/Github/sign-android-release", + "_resolved": "https://registry.npmjs.org/@types/babel__core/-/babel__core-7.1.12.tgz", + "_shasum": "4d8e9e51eb265552a7e4f1ff2219ab6133bdfb2d", + "_spec": "@types/babel__core@^7.1.0", + "_where": "/Users/drew.heavner/Documents/Github/sign-android-release/node_modules/babel-jest", "bugs": { "url": "https://github.com/DefinitelyTyped/DefinitelyTyped/issues" }, + "bundleDependencies": false, "contributors": [ { "name": "Troy Gerwien", @@ -48,6 +43,10 @@ { "name": "Jessica Franco", "url": "https://github.com/Jessidhia" + }, + { + "name": "Ifiok Jr.", + "url": "https://github.com/ifiokjr" } ], "dependencies": { @@ -57,6 +56,7 @@ "@types/babel__template": "*", "@types/babel__traverse": "*" }, + "deprecated": false, "description": "TypeScript definitions for @babel/core", "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped#readme", "license": "MIT", @@ -68,8 +68,8 @@ "directory": "types/babel__core" }, "scripts": {}, - "typeScriptVersion": "2.9", - "types": "index", - "typesPublisherContentHash": "8ddbc9ecfefbb1a61ece46d6e48876a63d101c6c5291bb173a929cead248d6a2", - "version": "7.1.2" + "typeScriptVersion": "3.4", + "types": "index.d.ts", + "typesPublisherContentHash": "8ec535b0786ce52da85cea1c495d52fc61648456b3c62b2b996580033cb0f196", + "version": "7.1.12" } diff --git a/node_modules/@types/babel__generator/LICENSE b/node_modules/@types/babel__generator/LICENSE index 21071075c..9e841e7a2 100644 --- a/node_modules/@types/babel__generator/LICENSE +++ b/node_modules/@types/babel__generator/LICENSE @@ -1,6 +1,6 @@ MIT License - Copyright (c) Microsoft Corporation. All rights reserved. + Copyright (c) Microsoft Corporation. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/node_modules/@types/babel__generator/README.md b/node_modules/@types/babel__generator/README.md index 607aeb658..afc8829e8 100644 --- a/node_modules/@types/babel__generator/README.md +++ b/node_modules/@types/babel__generator/README.md @@ -2,15 +2,15 @@ > `npm install --save @types/babel__generator` # Summary -This package contains type definitions for @babel/generator ( https://github.com/babel/babel/tree/master/packages/babel-generator ). +This package contains type definitions for @babel/generator (https://github.com/babel/babel/tree/master/packages/babel-generator). # Details -Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/babel__generator +Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/babel__generator. -Additional Details - * Last updated: Wed, 13 Feb 2019 21:04:23 GMT - * Dependencies: @types/babel__types +### Additional Details + * Last updated: Fri, 25 Sep 2020 23:55:29 GMT + * Dependencies: [@types/babel__types](https://npmjs.com/package/@types/babel__types) * Global values: none # Credits -These definitions were written by Troy Gerwien , Johnny Estilles , Melvin Groenhoff . +These definitions were written by [Troy Gerwien](https://github.com/yortus), [Johnny Estilles](https://github.com/johnnyestilles), [Melvin Groenhoff](https://github.com/mgroenhoff), [Cameron Yan](https://github.com/khell), and [Lyanbin](https://github.com/Lyanbin). diff --git a/node_modules/@types/babel__generator/index.d.ts b/node_modules/@types/babel__generator/index.d.ts index d229c9855..d9b178a92 100644 --- a/node_modules/@types/babel__generator/index.d.ts +++ b/node_modules/@types/babel__generator/index.d.ts @@ -1,12 +1,14 @@ -// Type definitions for @babel/generator 7.0 +// Type definitions for @babel/generator 7.6 // Project: https://github.com/babel/babel/tree/master/packages/babel-generator, https://babeljs.io // Definitions by: Troy Gerwien // Johnny Estilles // Melvin Groenhoff +// Cameron Yan +// Lyanbin // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.9 -import * as t from "@babel/types"; +import * as t from '@babel/types'; export interface GeneratorOptions { /** @@ -32,6 +34,12 @@ export interface GeneratorOptions { */ retainLines?: boolean; + /** + * Retain parens around function expressions (could be used to change engine parsing behavior) + * Defaults to `false`. + */ + retainFunctionParens?: boolean; + /** * Should comments be included in output? Defaults to `true`. */ @@ -40,7 +48,7 @@ export interface GeneratorOptions { /** * Set to true to avoid adding whitespace for formatting. Defaults to the value of `opts.minified`. */ - compact?: boolean | "auto"; + compact?: boolean | 'auto'; /** * Should the output be minified. Defaults to `false`. @@ -52,11 +60,6 @@ export interface GeneratorOptions { */ concise?: boolean; - /** - * The type of quote to use in the output. If omitted, autodetects based on `ast.tokens`. - */ - quotes?: "single" | "double"; - /** * Used in warning messages */ @@ -67,11 +70,6 @@ export interface GeneratorOptions { */ sourceMaps?: boolean; - /** - * The filename of the generated code that the source map will be associated with. - */ - sourceMapTarget?: string; - /** * A root for all relative URLs in the source map. */ @@ -87,6 +85,99 @@ export interface GeneratorOptions { * Set to true to run jsesc with "json": true to print "\u00A9" vs. "©"; */ jsonCompatibleStrings?: boolean; + + /** + * Set to true to enable support for experimental decorators syntax before module exports. + * Defaults to `false`. + */ + decoratorsBeforeExport?: boolean; + + /** + * Options for outputting jsesc representation. + */ + jsescOption?: { + /** + * The default value for the quotes option is 'single'. This means that any occurrences of ' in the input + * string are escaped as \', so that the output can be used in a string literal wrapped in single quotes. + */ + quotes?: 'single' | 'double' | 'backtick'; + + /** + * The default value for the numbers option is 'decimal'. This means that any numeric values are represented + * using decimal integer literals. Other valid options are binary, octal, and hexadecimal, which result in + * binary integer literals, octal integer literals, and hexadecimal integer literals, respectively. + */ + numbers?: 'binary' | 'octal' | 'decimal' | 'hexadecimal'; + + /** + * The wrap option takes a boolean value (true or false), and defaults to false (disabled). When enabled, the + * output is a valid JavaScript string literal wrapped in quotes. The type of quotes can be specified through + * the quotes setting. + */ + wrap?: boolean; + + /** + * The es6 option takes a boolean value (true or false), and defaults to false (disabled). When enabled, any + * astral Unicode symbols in the input are escaped using ECMAScript 6 Unicode code point escape sequences + * instead of using separate escape sequences for each surrogate half. If backwards compatibility with ES5 + * environments is a concern, don’t enable this setting. If the json setting is enabled, the value for the es6 + * setting is ignored (as if it was false). + */ + es6?: boolean; + + /** + * The escapeEverything option takes a boolean value (true or false), and defaults to false (disabled). When + * enabled, all the symbols in the output are escaped — even printable ASCII symbols. + */ + escapeEverything?: boolean; + + /** + * The minimal option takes a boolean value (true or false), and defaults to false (disabled). When enabled, + * only a limited set of symbols in the output are escaped: \0, \b, \t, \n, \f, \r, \\, \u2028, \u2029. + */ + minimal?: boolean; + + /** + * The isScriptContext option takes a boolean value (true or false), and defaults to false (disabled). When + * enabled, occurrences of or + + `; +} + +function headerTemplate(details) { + function metricsTemplate({ pct, covered, total }, kind) { + return ` +
+ ${pct}% + ${kind} + ${covered}/${total} +
+ `; + } + + function skipTemplate(metrics) { + const statements = metrics.statements.skipped; + const branches = metrics.branches.skipped; + const functions = metrics.functions.skipped; + + const countLabel = (c, label, plural) => + c === 0 ? [] : `${c} ${label}${c === 1 ? '' : plural}`; + const skips = [].concat( + countLabel(statements, 'statement', 's'), + countLabel(functions, 'function', 's'), + countLabel(branches, 'branch', 'es') + ); + + if (skips.length === 0) { + return ''; + } + + return ` +
+ ${skips.join(', ')} + Ignored      +
+ `; + } + + return ` + + +${htmlHead(details)} + +
+
+

${details.pathHtml}

+
+ ${metricsTemplate(details.metrics.statements, 'Statements')} + ${metricsTemplate(details.metrics.branches, 'Branches')} + ${metricsTemplate(details.metrics.functions, 'Functions')} + ${metricsTemplate(details.metrics.lines, 'Lines')} + ${skipTemplate(details.metrics)} +
+

+ Press n or j to go to the next uncovered block, b, p or k for the previous block. +

+
+
+ `; +} + +function footerTemplate(details) { + return ` +
+
+ + + + + + + + + `; +} + +function detailTemplate(data) { + const lineNumbers = new Array(data.maxLines).fill().map((_, i) => i + 1); + const lineLink = num => + `${num}`; + const lineCount = line => + `${line.hits}`; + + /* This is rendered in a `
`, need control of all whitespace. */
+    return [
         '',
-        '{{#show_lines}}{{maxLines}}{{/show_lines}}',
-        '{{#show_line_execution_counts lineCoverage}}{{maxLines}}{{/show_line_execution_counts}}',
-        '
{{#show_code annotatedCode}}{{/show_code}}
', - '\n' - ].join('') -); + `${lineNumbers + .map(lineLink) + .join('\n')}`, + `${data.lineCoverage + .map(lineCount) + .join('\n')}`, + `
${data.annotatedCode.join(
+            '\n'
+        )}
`, + '' + ].join(''); +} const summaryTableHeader = [ '
', '', @@ -45,22 +147,60 @@ const summaryTableHeader = [ '', '' ].join('\n'); -const summaryLineTemplate = handlebars.compile( - [ - '', - '', - '', - '', - '', - '', - '', - '', - '', - '', - '', - '\n' - ].join('\n\t') -); + +function summaryLineTemplate(details) { + const { reportClasses, metrics, file, output } = details; + const percentGraph = pct => { + if (!isFinite(pct)) { + return ''; + } + + const cls = ['cover-fill']; + if (pct === 100) { + cls.push('cover-full'); + } + + pct = Math.floor(pct); + return [ + `
`, + `
` + ].join(''); + }; + const summaryType = (type, showGraph = false) => { + const info = metrics[type]; + const reportClass = reportClasses[type]; + const result = [ + ``, + `` + ]; + if (showGraph) { + result.unshift( + `` + ); + } + + return result; + }; + + return [] + .concat( + '', + ``, + summaryType('statements', true), + summaryType('branches'), + summaryType('functions'), + summaryType('lines'), + '\n' + ) + .join('\n\t'); +} + const summaryTableFooter = ['', '
{{file}}
{{#show_picture}}{{metrics.statements.pct}}{{/show_picture}}
{{metrics.statements.pct}}%{{metrics.statements.covered}}/{{metrics.statements.total}}{{metrics.branches.pct}}%{{metrics.branches.covered}}/{{metrics.branches.total}}{{metrics.functions.pct}}%{{metrics.functions.covered}}/{{metrics.functions.total}}{{metrics.lines.pct}}%{{metrics.lines.covered}}/{{metrics.lines.total}}
${info.pct}%${info.covered}/${info.total}`, + `
${percentGraph(info.pct)}
`, + `
${html.escape(file)}
', '
'].join('\n'); const emptyClasses = { statements: 'empty', @@ -69,8 +209,6 @@ const emptyClasses = { branches: 'empty' }; -helpers.registerHelpers(handlebars); - const standardLinkMapper = { getPath(node) { if (typeof node === 'string') { @@ -260,11 +398,7 @@ class HtmlReport { const cw = this.getWriter(context).writeFile(linkMapper.getPath(node)); cw.write(headerTemplate(templateData)); cw.write('
\n');
-        cw.write(
-            detailTemplate(
-                annotator.annotateSourceCode(node.getFileCoverage(), context)
-            )
-        );
+        cw.write(detailTemplate(annotator(node.getFileCoverage(), context)));
         cw.write('
\n'); cw.write(footerTemplate(templateData)); cw.close(); diff --git a/node_modules/istanbul-reports/lib/html/templates/foot.txt b/node_modules/istanbul-reports/lib/html/templates/foot.txt deleted file mode 100644 index f4195e13b..000000000 --- a/node_modules/istanbul-reports/lib/html/templates/foot.txt +++ /dev/null @@ -1,21 +0,0 @@ -
- - - -{{#if prettify}} - - -{{/if}} - - - - diff --git a/node_modules/istanbul-reports/lib/html/templates/head.txt b/node_modules/istanbul-reports/lib/html/templates/head.txt deleted file mode 100644 index 164e44200..000000000 --- a/node_modules/istanbul-reports/lib/html/templates/head.txt +++ /dev/null @@ -1,63 +0,0 @@ - - - - Code coverage report for {{entity}} - -{{#if prettify}} - -{{/if}} - - - - - -
-
-

- {{{pathHtml}}} -

-
- {{#with metrics.statements}} -
- {{pct}}% - Statements - {{covered}}/{{total}} -
- {{/with}} - {{#with metrics.branches}} -
- {{pct}}% - Branches - {{covered}}/{{total}} -
- {{/with}} - {{#with metrics.functions}} -
- {{pct}}% - Functions - {{covered}}/{{total}} -
- {{/with}} - {{#with metrics.lines}} -
- {{pct}}% - Lines - {{covered}}/{{total}} -
- {{/with}} - {{#if_has_ignores metrics}} -
- {{#show_ignores metrics}}{{/show_ignores}} - Ignored      -
- {{/if_has_ignores}} -
-

- Press n or j to go to the next uncovered block, b, p or k for the previous block. -

-
-
diff --git a/node_modules/istanbul-reports/package.json b/node_modules/istanbul-reports/package.json index 0f890648d..d1e2b45a7 100644 --- a/node_modules/istanbul-reports/package.json +++ b/node_modules/istanbul-reports/package.json @@ -1,33 +1,27 @@ { - "_args": [ - [ - "istanbul-reports@2.2.6", - "/Users/drew.heavner/Documents/Github/sign-android-release" - ] - ], - "_development": true, - "_from": "istanbul-reports@2.2.6", - "_id": "istanbul-reports@2.2.6", + "_from": "istanbul-reports@^2.2.6", + "_id": "istanbul-reports@2.2.7", "_inBundle": false, - "_integrity": "sha512-SKi4rnMyLBKe0Jy2uUdx28h8oG7ph2PPuQPvIAh31d+Ci+lSiEu4C+h3oBPuJ9+mPKhOyW0M8gY4U5NM1WLeXA==", + "_integrity": "sha512-uu1F/L1o5Y6LzPVSVZXNOoD/KXpJue9aeLRd0sM9uMXfZvzomB0WxVamWb5ue8kA2vVWEmW7EG+A5n3f1kqHKg==", "_location": "/istanbul-reports", "_phantomChildren": {}, "_requested": { - "type": "version", + "type": "range", "registry": true, - "raw": "istanbul-reports@2.2.6", + "raw": "istanbul-reports@^2.2.6", "name": "istanbul-reports", "escapedName": "istanbul-reports", - "rawSpec": "2.2.6", + "rawSpec": "^2.2.6", "saveSpec": null, - "fetchSpec": "2.2.6" + "fetchSpec": "^2.2.6" }, "_requiredBy": [ "/@jest/reporters" ], - "_resolved": "https://registry.npmjs.org/istanbul-reports/-/istanbul-reports-2.2.6.tgz", - "_spec": "2.2.6", - "_where": "/Users/drew.heavner/Documents/Github/sign-android-release", + "_resolved": "https://registry.npmjs.org/istanbul-reports/-/istanbul-reports-2.2.7.tgz", + "_shasum": "5d939f6237d7b48393cc0959eab40cd4fd056931", + "_spec": "istanbul-reports@^2.2.6", + "_where": "/Users/drew.heavner/Documents/Github/sign-android-release/node_modules/@jest/reporters", "author": { "name": "Krishnan Anantheswaran", "email": "kananthmail-github@yahoo.com" @@ -35,9 +29,11 @@ "bugs": { "url": "https://github.com/istanbuljs/istanbuljs/issues" }, + "bundleDependencies": false, "dependencies": { - "handlebars": "^4.1.2" + "html-escaper": "^2.0.0" }, + "deprecated": false, "description": "istanbul reports", "devDependencies": { "istanbul-lib-coverage": "^2.0.5", @@ -50,7 +46,6 @@ "index.js", "lib" ], - "gitHead": "90e60cc47833bb780680f916488ca24f0be36ca2", "homepage": "https://istanbul.js.org/", "keywords": [ "istanbul", @@ -66,5 +61,5 @@ "scripts": { "test": "mocha --recursive" }, - "version": "2.2.6" + "version": "2.2.7" } diff --git a/node_modules/jest-changed-files/LICENSE b/node_modules/jest-changed-files/LICENSE index 10e779c44..b96dcb048 100644 --- a/node_modules/jest-changed-files/LICENSE +++ b/node_modules/jest-changed-files/LICENSE @@ -1,8 +1,6 @@ MIT License -For Jest software - -Copyright (c) 2014-present, Facebook, Inc. +Copyright (c) Facebook, Inc. and its affiliates. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/node_modules/jest-changed-files/package.json b/node_modules/jest-changed-files/package.json index 0f5a23910..5eee325d5 100644 --- a/node_modules/jest-changed-files/package.json +++ b/node_modules/jest-changed-files/package.json @@ -1,41 +1,41 @@ { - "_args": [ - [ - "jest-changed-files@24.8.0", - "/Users/drew.heavner/Documents/Github/sign-android-release" - ] - ], - "_development": true, - "_from": "jest-changed-files@24.8.0", - "_id": "jest-changed-files@24.8.0", + "_from": "jest-changed-files@^24.9.0", + "_id": "jest-changed-files@24.9.0", "_inBundle": false, - "_integrity": "sha512-qgANC1Yrivsq+UrLXsvJefBKVoCsKB0Hv+mBb6NMjjZ90wwxCDmU3hsCXBya30cH+LnPYjwgcU65i6yJ5Nfuug==", + "_integrity": "sha512-6aTWpe2mHF0DhL28WjdkO8LyGjs3zItPET4bMSeXU6T3ub4FPMw+mcOcbdGXQOAfmLcxofD23/5Bl9Z4AkFwqg==", "_location": "/jest-changed-files", - "_phantomChildren": {}, + "_phantomChildren": { + "@types/istanbul-lib-coverage": "2.0.1", + "@types/istanbul-reports": "1.1.1", + "@types/yargs-parser": "15.0.0" + }, "_requested": { - "type": "version", + "type": "range", "registry": true, - "raw": "jest-changed-files@24.8.0", + "raw": "jest-changed-files@^24.9.0", "name": "jest-changed-files", "escapedName": "jest-changed-files", - "rawSpec": "24.8.0", + "rawSpec": "^24.9.0", "saveSpec": null, - "fetchSpec": "24.8.0" + "fetchSpec": "^24.9.0" }, "_requiredBy": [ - "/@jest/core" + "/jest/jest-cli/@jest/core" ], - "_resolved": "https://registry.npmjs.org/jest-changed-files/-/jest-changed-files-24.8.0.tgz", - "_spec": "24.8.0", - "_where": "/Users/drew.heavner/Documents/Github/sign-android-release", + "_resolved": "https://registry.npmjs.org/jest-changed-files/-/jest-changed-files-24.9.0.tgz", + "_shasum": "08d8c15eb79a7fa3fc98269bc14b451ee82f8039", + "_spec": "jest-changed-files@^24.9.0", + "_where": "/Users/drew.heavner/Documents/Github/sign-android-release/node_modules/jest/node_modules/jest-cli/node_modules/@jest/core", "bugs": { "url": "https://github.com/facebook/jest/issues" }, + "bundleDependencies": false, "dependencies": { - "@jest/types": "^24.8.0", + "@jest/types": "^24.9.0", "execa": "^1.0.0", "throat": "^4.0.0" }, + "deprecated": false, "description": "A module used internally by Jest to check which files have changed since you last committed in git or hg.", "devDependencies": { "@types/execa": "^0.9.0" @@ -43,7 +43,7 @@ "engines": { "node": ">= 6" }, - "gitHead": "845728f24b3ef41e450595c384e9b5c9fdf248a4", + "gitHead": "9ad0f4bc6b8bdd94989804226c28c9960d9da7d1", "homepage": "https://github.com/facebook/jest#readme", "license": "MIT", "main": "build/index.js", @@ -57,5 +57,5 @@ "directory": "packages/jest-changed-files" }, "types": "build/index.d.ts", - "version": "24.8.0" + "version": "24.9.0" } diff --git a/node_modules/jest-changed-files/tsconfig.json b/node_modules/jest-changed-files/tsconfig.json deleted file mode 100644 index 25e34a0f4..000000000 --- a/node_modules/jest-changed-files/tsconfig.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "extends": "../../tsconfig.json", - "compilerOptions": { - "rootDir": "src", - "outDir": "build" - }, - "references": [ - {"path": "../jest-types"} - ] -} diff --git a/node_modules/jest-config/LICENSE b/node_modules/jest-config/LICENSE deleted file mode 100644 index 10e779c44..000000000 --- a/node_modules/jest-config/LICENSE +++ /dev/null @@ -1,23 +0,0 @@ -MIT License - -For Jest software - -Copyright (c) 2014-present, Facebook, Inc. - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/node_modules/jest-config/build/Defaults.d.ts.map b/node_modules/jest-config/build/Defaults.d.ts.map index dbfae9239..824b25092 100644 --- a/node_modules/jest-config/build/Defaults.d.ts.map +++ b/node_modules/jest-config/build/Defaults.d.ts.map @@ -1 +1 @@ -{"version":3,"file":"Defaults.d.ts","sourceRoot":"","sources":["../src/Defaults.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAC,MAAM,EAAC,MAAM,aAAa,CAAC;AAOnC,QAAA,MAAM,cAAc,EAAE,MAAM,CAAC,cAqE5B,CAAC;AAEF,eAAe,cAAc,CAAC"} \ No newline at end of file +{"version":3,"file":"Defaults.d.ts","sourceRoot":"","sources":["../src/Defaults.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAC,MAAM,EAAC,MAAM,aAAa,CAAC;AAOnC,QAAA,MAAM,cAAc,EAAE,MAAM,CAAC,cAsE5B,CAAC;AAEF,eAAe,cAAc,CAAC"} \ No newline at end of file diff --git a/node_modules/jest-config/build/Defaults.js b/node_modules/jest-config/build/Defaults.js index 440826b76..46e5f766a 100644 --- a/node_modules/jest-config/build/Defaults.js +++ b/node_modules/jest-config/build/Defaults.js @@ -60,6 +60,7 @@ const defaultOptions = { throwOnModuleCollision: false }, maxConcurrency: 5, + maxWorkers: '50%', moduleDirectories: ['node_modules'], moduleFileExtensions: ['js', 'json', 'jsx', 'ts', 'tsx', 'node'], moduleNameMapper: {}, diff --git a/node_modules/jest-config/build/Descriptions.d.ts.map b/node_modules/jest-config/build/Descriptions.d.ts.map index 1ff4932b6..959825fab 100644 --- a/node_modules/jest-config/build/Descriptions.d.ts.map +++ b/node_modules/jest-config/build/Descriptions.d.ts.map @@ -1 +1 @@ -{"version":3,"file":"Descriptions.d.ts","sourceRoot":"","sources":["../src/Descriptions.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAC,MAAM,EAAC,MAAM,aAAa,CAAC;AAEnC,QAAA,MAAM,YAAY,EAAE;KAAE,GAAG,IAAI,MAAM,MAAM,CAAC,cAAc,GAAG,MAAM;CAoFhE,CAAC;AAEF,eAAe,YAAY,CAAC"} \ No newline at end of file +{"version":3,"file":"Descriptions.d.ts","sourceRoot":"","sources":["../src/Descriptions.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAC,MAAM,EAAC,MAAM,aAAa,CAAC;AAEnC,QAAA,MAAM,YAAY,EAAE;KAAE,GAAG,IAAI,MAAM,MAAM,CAAC,cAAc,GAAG,MAAM;CAsFhE,CAAC;AAEF,eAAe,YAAY,CAAC"} \ No newline at end of file diff --git a/node_modules/jest-config/build/Descriptions.js b/node_modules/jest-config/build/Descriptions.js index 7861bbd14..b24cfe8a1 100644 --- a/node_modules/jest-config/build/Descriptions.js +++ b/node_modules/jest-config/build/Descriptions.js @@ -41,6 +41,8 @@ const descriptions = { 'A path to a module which exports an async function that is triggered once after all test suites', globals: 'A set of global variables that need to be available in all test environments', + maxWorkers: + 'The maximum amount of workers used to run your tests. Can be specified as % or a number. E.g. maxWorkers: 10% will use 10% of your CPU amount + 1 as the maximum worker number. maxWorkers: 2 will use a maximum of 2 workers.', moduleDirectories: "An array of directory names to be searched recursively up from the requiring module's location", moduleFileExtensions: 'An array of file extensions your modules use', diff --git a/node_modules/jest-config/build/ReporterValidationErrors.d.ts b/node_modules/jest-config/build/ReporterValidationErrors.d.ts index 802b5a040..943473e62 100644 --- a/node_modules/jest-config/build/ReporterValidationErrors.d.ts +++ b/node_modules/jest-config/build/ReporterValidationErrors.d.ts @@ -13,7 +13,7 @@ import { Config } from '@jest/types'; * merged with jest-validate. Till then, we can make use of it. It works * and that's what counts most at this time. */ -export declare function createReporterError(reporterIndex: number, reporterValue: Array | string): import("../../jest-validate/build/utils").ValidationError; -export declare function createArrayReporterError(arrayReporter: Config.ReporterConfig, reporterIndex: number, valueIndex: number, value: string | Record, expectedType: string, valueName: string): import("../../jest-validate/build/utils").ValidationError; +export declare function createReporterError(reporterIndex: number, reporterValue: Array | string): import("jest-validate/build/utils").ValidationError; +export declare function createArrayReporterError(arrayReporter: Config.ReporterConfig, reporterIndex: number, valueIndex: number, value: string | Record, expectedType: string, valueName: string): import("jest-validate/build/utils").ValidationError; export declare function validateReporters(reporterConfig: Array): boolean; //# sourceMappingURL=ReporterValidationErrors.d.ts.map \ No newline at end of file diff --git a/node_modules/jest-config/build/ReporterValidationErrors.d.ts.map b/node_modules/jest-config/build/ReporterValidationErrors.d.ts.map index 1880bf349..1b74e9828 100644 --- a/node_modules/jest-config/build/ReporterValidationErrors.d.ts.map +++ b/node_modules/jest-config/build/ReporterValidationErrors.d.ts.map @@ -1 +1 @@ -{"version":3,"file":"ReporterValidationErrors.d.ts","sourceRoot":"","sources":["../src/ReporterValidationErrors.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAC,MAAM,EAAC,MAAM,aAAa,CAAC;AASnC;;;;;;;GAOG;AACH,wBAAgB,mBAAmB,CACjC,aAAa,EAAE,MAAM,EACrB,aAAa,EAAE,KAAK,CAAC,MAAM,CAAC,cAAc,CAAC,GAAG,MAAM,6DASrD;AAED,wBAAgB,wBAAwB,CACtC,aAAa,EAAE,MAAM,CAAC,cAAc,EACpC,aAAa,EAAE,MAAM,EACrB,UAAU,EAAE,MAAM,EAClB,KAAK,EAAE,MAAM,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EACnC,YAAY,EAAE,MAAM,EACpB,SAAS,EAAE,MAAM,6DAiBlB;AAED,wBAAgB,iBAAiB,CAC/B,cAAc,EAAE,KAAK,CAAC,MAAM,CAAC,cAAc,GAAG,MAAM,CAAC,GACpD,OAAO,CAUT"} \ No newline at end of file +{"version":3,"file":"ReporterValidationErrors.d.ts","sourceRoot":"","sources":["../src/ReporterValidationErrors.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAC,MAAM,EAAC,MAAM,aAAa,CAAC;AASnC;;;;;;;GAOG;AACH,wBAAgB,mBAAmB,CACjC,aAAa,EAAE,MAAM,EACrB,aAAa,EAAE,KAAK,CAAC,MAAM,CAAC,cAAc,CAAC,GAAG,MAAM,uDASrD;AAED,wBAAgB,wBAAwB,CACtC,aAAa,EAAE,MAAM,CAAC,cAAc,EACpC,aAAa,EAAE,MAAM,EACrB,UAAU,EAAE,MAAM,EAClB,KAAK,EAAE,MAAM,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EACnC,YAAY,EAAE,MAAM,EACpB,SAAS,EAAE,MAAM,uDAiBlB;AAED,wBAAgB,iBAAiB,CAC/B,cAAc,EAAE,KAAK,CAAC,MAAM,CAAC,cAAc,GAAG,MAAM,CAAC,GACpD,OAAO,CAUT"} \ No newline at end of file diff --git a/node_modules/jest-config/build/ValidConfig.js b/node_modules/jest-config/build/ValidConfig.js index da318185c..c9d83051a 100644 --- a/node_modules/jest-config/build/ValidConfig.js +++ b/node_modules/jest-config/build/ValidConfig.js @@ -38,7 +38,6 @@ const NODE_MODULES_REGEXP = (0, _jestRegexUtil().replacePathSepForRegex)( ); const initialOptions = { automock: false, - // @ts-ignore TODO: type this properly bail: (0, _jestValidate().multipleValidOptions)(false, 0), browser: false, cache: true, @@ -63,7 +62,6 @@ const initialOptions = { } }, dependencyExtractor: '/dependencyExtractor.js', - // @ts-ignore TODO: type this properly displayName: (0, _jestValidate().multipleValidOptions)('test-config', { color: 'blue', name: 'test-config' @@ -91,6 +89,7 @@ const initialOptions = { lastCommit: false, logHeapUsage: true, maxConcurrency: 5, + maxWorkers: '50%', moduleDirectories: ['node_modules'], moduleFileExtensions: ['js', 'json', 'jsx', 'ts', 'tsx', 'node'], moduleLoader: '', @@ -148,6 +147,7 @@ const initialOptions = { testResultsProcessor: 'processor-node-module', testRunner: 'jasmine2', testSequencer: '@jest/test-sequencer', + testTimeout: 5000, testURL: 'http://localhost', timers: 'real', transform: { diff --git a/node_modules/jest-config/build/getMaxWorkers.d.ts b/node_modules/jest-config/build/getMaxWorkers.d.ts index c38ccedb3..f176876d0 100644 --- a/node_modules/jest-config/build/getMaxWorkers.d.ts +++ b/node_modules/jest-config/build/getMaxWorkers.d.ts @@ -5,5 +5,5 @@ * LICENSE file in the root directory of this source tree. */ import { Config } from '@jest/types'; -export default function getMaxWorkers(argv: Partial>): number; +export default function getMaxWorkers(argv: Partial>, defaultOptions?: Partial>): number; //# sourceMappingURL=getMaxWorkers.d.ts.map \ No newline at end of file diff --git a/node_modules/jest-config/build/getMaxWorkers.d.ts.map b/node_modules/jest-config/build/getMaxWorkers.d.ts.map index 38a997563..af1a7bf7a 100644 --- a/node_modules/jest-config/build/getMaxWorkers.d.ts.map +++ b/node_modules/jest-config/build/getMaxWorkers.d.ts.map @@ -1 +1 @@ -{"version":3,"file":"getMaxWorkers.d.ts","sourceRoot":"","sources":["../src/getMaxWorkers.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,OAAO,EAAC,MAAM,EAAC,MAAM,aAAa,CAAC;AAEnC,MAAM,CAAC,OAAO,UAAU,aAAa,CACnC,IAAI,EAAE,OAAO,CAAC,IAAI,CAAC,MAAM,CAAC,IAAI,EAAE,YAAY,GAAG,WAAW,GAAG,OAAO,CAAC,CAAC,GACrE,MAAM,CAyBR"} \ No newline at end of file +{"version":3,"file":"getMaxWorkers.d.ts","sourceRoot":"","sources":["../src/getMaxWorkers.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,OAAO,EAAC,MAAM,EAAC,MAAM,aAAa,CAAC;AAEnC,MAAM,CAAC,OAAO,UAAU,aAAa,CACnC,IAAI,EAAE,OAAO,CAAC,IAAI,CAAC,MAAM,CAAC,IAAI,EAAE,YAAY,GAAG,WAAW,GAAG,OAAO,CAAC,CAAC,EACtE,cAAc,CAAC,EAAE,OAAO,CAAC,IAAI,CAAC,MAAM,CAAC,IAAI,EAAE,YAAY,CAAC,CAAC,GACxD,MAAM,CAYR"} \ No newline at end of file diff --git a/node_modules/jest-config/build/getMaxWorkers.js b/node_modules/jest-config/build/getMaxWorkers.js index 648337eb1..aeb1dbcd1 100644 --- a/node_modules/jest-config/build/getMaxWorkers.js +++ b/node_modules/jest-config/build/getMaxWorkers.js @@ -25,30 +25,34 @@ function _interopRequireDefault(obj) { * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ -function getMaxWorkers(argv) { +function getMaxWorkers(argv, defaultOptions) { if (argv.runInBand) { return 1; } else if (argv.maxWorkers) { - // TODO: How to type this properly? Should probably use `coerce` from `yargs` - const maxWorkers = argv.maxWorkers; - const parsed = parseInt(maxWorkers, 10); - - if ( - typeof maxWorkers === 'string' && - maxWorkers.trim().endsWith('%') && - parsed > 0 && - parsed <= 100 - ) { - const cpus = _os().default.cpus().length; - - const workers = Math.floor((parsed / 100) * cpus); - return workers >= 1 ? workers : 1; - } - - return parsed > 0 ? parsed : 1; + return parseWorkers(argv.maxWorkers); + } else if (defaultOptions && defaultOptions.maxWorkers) { + return parseWorkers(defaultOptions.maxWorkers); } else { // In watch mode, Jest should be unobtrusive and not use all available CPUs. const cpus = _os().default.cpus() ? _os().default.cpus().length : 1; return Math.max(argv.watch ? Math.floor(cpus / 2) : cpus - 1, 1); } } + +const parseWorkers = maxWorkers => { + const parsed = parseInt(maxWorkers.toString(), 10); + + if ( + typeof maxWorkers === 'string' && + maxWorkers.trim().endsWith('%') && + parsed > 0 && + parsed <= 100 + ) { + const cpus = _os().default.cpus().length; + + const workers = Math.floor((parsed / 100) * cpus); + return workers >= 1 ? workers : 1; + } + + return parsed > 0 ? parsed : 1; +}; diff --git a/node_modules/jest-config/build/index.d.ts.map b/node_modules/jest-config/build/index.d.ts.map index 88ae4a173..31768077a 100644 --- a/node_modules/jest-config/build/index.d.ts.map +++ b/node_modules/jest-config/build/index.d.ts.map @@ -1 +1 @@ -{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAIH,OAAO,EAAC,MAAM,EAAC,MAAM,aAAa,CAAC;AAMnC,OAAO,EAAC,kBAAkB,EAAE,YAAY,EAAC,MAAM,SAAS,CAAC;AACzD,OAAO,EAAC,OAAO,IAAI,SAAS,EAAC,MAAM,aAAa,CAAC;AACjD,OAAO,EAAC,OAAO,IAAI,kBAAkB,EAAC,MAAM,cAAc,CAAC;AAC3D,OAAO,EAAC,oBAAoB,EAAC,MAAM,SAAS,CAAC;AAC7C,OAAO,EAAC,OAAO,IAAI,QAAQ,EAAC,MAAM,YAAY,CAAC;AAC/C,OAAO,EAAC,OAAO,IAAI,YAAY,EAAC,MAAM,gBAAgB,CAA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AM,gBAAgB,CAAC;AAEvD,aAAK,UAAU,GAAG;IAChB,UAAU,EAAE,MAAM,CAAC,IAAI,GAAG,IAAI,GAAG,SAAS,CAAC;IAC3C,YAAY,EAAE,MAAM,CAAC,YAAY,CAAC;IAClC,sBAAsB,EAAE,OAAO,CAAC;IAChC,aAAa,EAAE,MAAM,CAAC,aAAa,CAAC;CACrC,CAAC;AAEF,wBAAgB,UAAU,CACxB,IAAI,EAAE,MAAM,CAAC,IAAI,EACjB,mBAAmB,EAAE,MAAM,CAAC,IAAI,GAAG,MAAM,CAAC,cAAc,EAKxD,oBAAoB,CAAC,EAAE,OAAO,EAC9B,gBAAgB,CAAC,EAAE,MAAM,CAAC,IAAI,GAAG,IAAI,EACrC,YAAY,GAAE,MAAiB,GAC9B,UAAU,CAwDZ;AAuKD,wBAAgB,WAAW,CACzB,IAAI,EAAE,MAAM,CAAC,IAAI,EACjB,YAAY,EAAE,KAAK,CAAC,MAAM,CAAC,IAAI,CAAC,GAC/B;IACD,YAAY,EAAE,MAAM,CAAC,YAAY,CAAC;IAClC,OAAO,EAAE,KAAK,CAAC,MAAM,CAAC,aAAa,CAAC,CAAC;IACrC,sBAAsB,EAAE,OAAO,CAAC;CACjC,CAwEA"} \ No newline at end of file diff --git a/node_modules/jest-config/build/index.js b/node_modules/jest-config/build/index.js index ece7f5382..e0b6c59c3 100644 --- a/node_modules/jest-config/build/index.js +++ b/node_modules/jest-config/build/index.js @@ -230,6 +230,7 @@ const groupOptions = options => ({ testPathPattern: options.testPathPattern, testResultsProcessor: options.testResultsProcessor, testSequencer: options.testSequencer, + testTimeout: options.testTimeout, updateSnapshot: options.updateSnapshot, useStderr: options.useStderr, verbose: options.verbose, diff --git a/node_modules/jest-config/build/normalize.d.ts.map b/node_modules/jest-config/build/normalize.d.ts.map index 8527a5a31..d12e71303 100644 --- a/node_modules/jest-config/build/normalize.d.ts.map +++ b/node_modules/jest-config/build/normalize.d.ts.map @@ -1 +1 @@ -{"version":3,"file":"normalize.d.ts","sourceRoot":"","sources":["../src/normalize.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAKH,OAAO,EAAC,MAAM,EAAC,MAAM,aAAa,CAAC;AAiCnC,aAAK,UAAU,GAAG,MAAM,CAAC,aAAa,GAAG,MAAM,CAAC,YAAY,CAAC;AAwW7D,MAAM,CAAC,OAAO,UAAU,SAAS,CAC/B,OAAO,EAAE,MAAM,CAAC,cAAc,EAC9B,IAAI,EAAE,MAAM,CAAC,IAAI,EACjB,UAAU,CAAC,EAAE,MAAM,CAAC,IAAI,GAAG,IAAI,EAC/B,YAAY,GAAE,MAAiB,GAC9B;IACD,sBAAsB,EAAE,OAAO,CAAC;IAChC,OAAO,EAAE,UAAU,CAAC;CACrB,CAkjBA"} \ No newline at end of file +{"version":3,"file":"normalize.d.ts","sourceRoot":"","sources":["../src/normalize.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAKH,OAAO,EAAC,MAAM,EAAC,MAAM,aAAa,CAAC;AAiCnC,aAAK,UAAU,GAAG,MAAM,CAAC,aAAa,GAAG,MAAM,CAAC,YAAY,CAAC;AAiX7D,MAAM,CAAC,OAAO,UAAU,SAAS,CAC/B,OAAO,EAAE,MAAM,CAAC,cAAc,EAC9B,IAAI,EAAE,MAAM,CAAC,IAAI,EACjB,UAAU,CAAC,EAAE,MAAM,CAAC,IAAI,GAAG,IAAI,EAC/B,YAAY,GAAE,MAAiB,GAC9B;IACD,sBAAsB,EAAE,OAAO,CAAC;IAChC,OAAO,EAAE,UAAU,CAAC;CACrB,CAukBA"} \ No newline at end of file diff --git a/node_modules/jest-config/build/normalize.js b/node_modules/jest-config/build/normalize.js index ce37c38a2..a3ed49057 100644 --- a/node_modules/jest-config/build/normalize.js +++ b/node_modules/jest-config/build/normalize.js @@ -178,15 +178,26 @@ const createConfigError = message => ERROR, message, _utils.DOCUMENTATION_NOTE - ); + ); // TS 3.5 forces us to split these into 2 -const mergeOptionWithPreset = (options, preset, optionName) => { - if (options[optionName] && preset[optionName]) { - options[optionName] = _objectSpread( +const mergeModuleNameMapperWithPreset = (options, preset) => { + if (options['moduleNameMapper'] && preset['moduleNameMapper']) { + options['moduleNameMapper'] = _objectSpread( {}, - options[optionName], - preset[optionName], - options[optionName] + options['moduleNameMapper'], + preset['moduleNameMapper'], + options['moduleNameMapper'] + ); + } +}; + +const mergeTransformWithPreset = (options, preset) => { + if (options['transform'] && preset['transform']) { + options['transform'] = _objectSpread( + {}, + options['transform'], + preset['transform'], + options['transform'] ); } }; @@ -253,8 +264,8 @@ const setupPreset = (options, optionsPreset) => { ); } - mergeOptionWithPreset(options, preset, 'moduleNameMapper'); - mergeOptionWithPreset(options, preset, 'transform'); + mergeModuleNameMapperWithPreset(options, preset); + mergeTransformWithPreset(options, preset); return _objectSpread({}, preset, options); }; @@ -271,28 +282,27 @@ const setupBabelJest = options => { const regex = new RegExp(pattern); return regex.test('a.ts') || regex.test('a.tsx'); }); - - if (customJSPattern) { - const customJSTransformer = transform[customJSPattern]; - - if (customJSTransformer === 'babel-jest') { - babelJest = require.resolve('babel-jest'); - transform[customJSPattern] = babelJest; - } else if (customJSTransformer.includes('babel-jest')) { - babelJest = customJSTransformer; - } - } - - if (customTSPattern) { - const customTSTransformer = transform[customTSPattern]; - - if (customTSTransformer === 'babel-jest') { - babelJest = require.resolve('babel-jest'); - transform[customTSPattern] = babelJest; - } else if (customTSTransformer.includes('babel-jest')) { - babelJest = customTSTransformer; + [customJSPattern, customTSPattern].forEach(pattern => { + if (pattern) { + const customTransformer = transform[pattern]; + + if (Array.isArray(customTransformer)) { + if (customTransformer[0] === 'babel-jest') { + babelJest = require.resolve('babel-jest'); + customTransformer[0] = babelJest; + } else if (customTransformer[0].includes('babel-jest')) { + babelJest = customTransformer[0]; + } + } else { + if (customTransformer === 'babel-jest') { + babelJest = require.resolve('babel-jest'); + transform[pattern] = babelJest; + } else if (customTransformer.includes('babel-jest')) { + babelJest = customTransformer; + } + } } - } + }); } else { babelJest = require.resolve('babel-jest'); options.transform = { @@ -738,14 +748,20 @@ function normalize(options, argv, configPath, projectIndex = Infinity) { const transform = oldOptions[key]; value = transform && - Object.keys(transform).map(regex => [ - regex, - (0, _utils.resolve)(newOptions.resolver, { - filePath: transform[regex], - key, - rootDir: options.rootDir - }) - ]); + Object.keys(transform).map(regex => { + const transformElement = transform[regex]; + return [ + regex, + (0, _utils.resolve)(newOptions.resolver, { + filePath: Array.isArray(transformElement) + ? transformElement[0] + : transformElement, + key, + rootDir: options.rootDir + }), + ...(Array.isArray(transformElement) ? [transformElement[1]] : []) + ]; + }); break; case 'coveragePathIgnorePatterns': @@ -920,6 +936,19 @@ function normalize(options, argv, configPath, projectIndex = Infinity) { break; } + case 'testTimeout': { + if (oldOptions[key] < 0) { + throw createConfigError( + ` Option "${_chalk().default.bold( + 'testTimeout' + )}" must be a natural number.` + ); + } + + value = oldOptions[key]; + break; + } + case 'automock': case 'browser': case 'cache': @@ -1041,7 +1070,7 @@ function normalize(options, argv, configPath, projectIndex = Infinity) { ? 'all' : 'new'; newOptions.maxConcurrency = parseInt(newOptions.maxConcurrency, 10); - newOptions.maxWorkers = (0, _getMaxWorkers.default)(argv); + newOptions.maxWorkers = (0, _getMaxWorkers.default)(argv, options); if (newOptions.testRegex.length && options.testMatch) { throw createConfigError( diff --git a/node_modules/jest-config/build/resolveConfigPath.js b/node_modules/jest-config/build/resolveConfigPath.js index 8081ae880..d6d412215 100644 --- a/node_modules/jest-config/build/resolveConfigPath.js +++ b/node_modules/jest-config/build/resolveConfigPath.js @@ -115,7 +115,5 @@ const makeResolutionErrorMessage = (initialPath, cwd) => `cwd: "${cwd}"\n` + 'Config paths must be specified by either a direct path to a config\n' + 'file, or a path to a directory. If directory is given, Jest will try to\n' + - `traverse directory tree up, until it finds either "${ - _constants.JEST_CONFIG - }" or\n` + + `traverse directory tree up, until it finds either "${_constants.JEST_CONFIG}" or\n` + `"${_constants.PACKAGE_JSON}".`; diff --git a/node_modules/jest-config/build/utils.d.ts b/node_modules/jest-config/build/utils.d.ts index 7cc6548dd..1eb48019b 100644 --- a/node_modules/jest-config/build/utils.d.ts +++ b/node_modules/jest-config/build/utils.d.ts @@ -13,10 +13,13 @@ declare type ResolveOptions = { }; export declare const BULLET: string; export declare const DOCUMENTATION_NOTE: string; -export declare const resolve: (resolver: string | null | undefined, { key, filePath, rootDir, optional }: ResolveOptions) => string | null; +export declare const resolve: (resolver: string | null | undefined, { key, filePath, rootDir, optional }: ResolveOptions) => string; export declare const escapeGlobCharacters: (path: string) => string; export declare const replaceRootDirInPath: (rootDir: string, filePath: string) => string; -export declare const _replaceRootDirTags: (rootDir: string, config: any) => any; +declare type OrArray = T | Array; +declare type ReplaceRootDirConfigObj = Record; +declare type ReplaceRootDirConfigValues = OrArray | OrArray | OrArray; +export declare const _replaceRootDirTags: (rootDir: string, config: T) => T; export declare const resolveWithPrefix: (resolver: string | null | undefined, { filePath, humanOptionName, optionName, prefix, rootDir, }: { filePath: string; humanOptionName: string; diff --git a/node_modules/jest-config/build/utils.d.ts.map b/node_modules/jest-config/build/utils.d.ts.map index 45ba6ca1f..7ae7d2925 100644 --- a/node_modules/jest-config/build/utils.d.ts.map +++ b/node_modules/jest-config/build/utils.d.ts.map @@ -1 +1 @@ -{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../src/utils.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,OAAO,EAAC,MAAM,EAAC,MAAM,aAAa,CAAC;AAKnC,aAAK,cAAc,GAAG;IACpB,OAAO,EAAE,MAAM,CAAC,IAAI,CAAC;IACrB,GAAG,EAAE,MAAM,CAAC;IACZ,QAAQ,EAAE,MAAM,CAAC,IAAI,CAAC;IACtB,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB,CAAC;AAEF,eAAO,MAAM,MAAM,EAAE,MAA8B,CAAC;AACpD,eAAO,MAAM,kBAAkB,QAI9B,CAAC;AAKF,eAAO,MAAM,OAAO,8GAsBnB,CAAC;AAEF,eAAO,MAAM,oBAAoB,0BACW,CA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ChC,OAAO,CAAC,MAAM,CAAC,GACf,OAAO,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;AAEzB,eAAO,MAAM,mBAAmB,yEAyB/B,CAAC;AAEF,eAAO,MAAM,iBAAiB;;;;;;YAgD7B,CAAC;AAEF;;;;;;;GAOG;AACH,eAAO,MAAM,kBAAkB;;;YAa3B,CAAC;AAEL;;;;;;;GAOG;AACH,eAAO,MAAM,cAAc;;;YAUvB,CAAC;AAEL;;;;;;;GAOG;AACH,eAAO,MAAM,SAAS;;;YAUlB,CAAC;AAEL,aAAK,UAAU,GAAG,MAAM,GAAG;IAAC,QAAQ,CAAC,MAAM,EAAE,KAAK,CAAA;CAAC,CAAC;AACpD,eAAO,MAAM,YAAY,gEAIL,CAAC;AAErB,eAAO,MAAM,YAAY;;;YAUrB,CAAC"} \ No newline at end of file diff --git a/node_modules/jest-config/build/utils.js b/node_modules/jest-config/build/utils.js index 02ecf4c43..f59b8b9b7 100644 --- a/node_modules/jest-config/build/utils.js +++ b/node_modules/jest-config/build/utils.js @@ -86,7 +86,7 @@ const resolve = (resolver, {key, filePath, rootDir, optional}) => { filePath )} in the ${_chalk().default.bold(key)} option was not found. ${_chalk().default.bold('')} is: ${rootDir}`); - } + } /// can cast as string since nulls will be thrown return module; }; @@ -106,31 +106,32 @@ const replaceRootDirInPath = (rootDir, filePath) => { rootDir, _path().default.normalize('./' + filePath.substr(''.length)) ); -}; // TODO: Type as returning same type as input +}; exports.replaceRootDirInPath = replaceRootDirInPath; const _replaceRootDirInObject = (rootDir, config) => { - if (config !== null) { - const newConfig = {}; - - for (const configKey in config) { - newConfig[configKey] = - configKey === 'rootDir' - ? config[configKey] - : _replaceRootDirTags(rootDir, config[configKey]); - } + const newConfig = {}; - return newConfig; + for (const configKey in config) { + newConfig[configKey] = + configKey === 'rootDir' + ? config[configKey] + : _replaceRootDirTags(rootDir, config[configKey]); } - return config; -}; // TODO: Type as returning same type as input + return newConfig; +}; const _replaceRootDirTags = (rootDir, config) => { + if (config == null) { + return config; + } + switch (typeof config) { case 'object': if (Array.isArray(config)) { + /// can be string[] or {}[] return config.map(item => _replaceRootDirTags(rootDir, item)); } diff --git a/node_modules/jest-config/package.json b/node_modules/jest-config/package.json index 4d212af30..edcc6ca08 100644 --- a/node_modules/jest-config/package.json +++ b/node_modules/jest-config/package.json @@ -1,58 +1,59 @@ { - "_args": [ - [ - "jest-config@24.8.0", - "/Users/drew.heavner/Documents/Github/sign-android-release" - ] - ], - "_development": true, - "_from": "jest-config@24.8.0", - "_id": "jest-config@24.8.0", + "_from": "jest-config@^24.9.0", + "_id": "jest-config@24.9.0", "_inBundle": false, - "_integrity": "sha512-Czl3Nn2uEzVGsOeaewGWoDPD8GStxCpAe0zOYs2x2l0fZAgPbCr3uwUkgNKV3LwE13VXythM946cd5rdGkkBZw==", + "_integrity": "sha512-RATtQJtVYQrp7fvWg6f5y3pEFj9I+H8sWw4aKxnDZ96mob5i5SD6ZEGWgMLXQ4LE8UurrjbdlLWdUeo+28QpfQ==", "_location": "/jest-config", - "_phantomChildren": {}, + "_phantomChildren": { + "@types/istanbul-lib-coverage": "2.0.1", + "@types/istanbul-reports": "1.1.1", + "@types/yargs-parser": "15.0.0", + "ansi-regex": "4.1.0", + "ansi-styles": "3.2.1", + "react-is": "16.8.6" + }, "_requested": { - "type": "version", + "type": "range", "registry": true, - "raw": "jest-config@24.8.0", + "raw": "jest-config@^24.9.0", "name": "jest-config", "escapedName": "jest-config", - "rawSpec": "24.8.0", + "rawSpec": "^24.9.0", "saveSpec": null, - "fetchSpec": "24.8.0" + "fetchSpec": "^24.9.0" }, "_requiredBy": [ - "/@jest/core", "/jest-runner", - "/jest-runtime", - "/jest/jest-cli" + "/jest-runtime" ], - "_resolved": "https://registry.npmjs.org/jest-config/-/jest-config-24.8.0.tgz", - "_spec": "24.8.0", - "_where": "/Users/drew.heavner/Documents/Github/sign-android-release", + "_resolved": "https://registry.npmjs.org/jest-config/-/jest-config-24.9.0.tgz", + "_shasum": "fb1bbc60c73a46af03590719efa4825e6e4dd1b5", + "_spec": "jest-config@^24.9.0", + "_where": "/Users/drew.heavner/Documents/Github/sign-android-release/node_modules/jest-runtime", "bugs": { "url": "https://github.com/facebook/jest/issues" }, + "bundleDependencies": false, "dependencies": { "@babel/core": "^7.1.0", - "@jest/test-sequencer": "^24.8.0", - "@jest/types": "^24.8.0", - "babel-jest": "^24.8.0", + "@jest/test-sequencer": "^24.9.0", + "@jest/types": "^24.9.0", + "babel-jest": "^24.9.0", "chalk": "^2.0.1", "glob": "^7.1.1", - "jest-environment-jsdom": "^24.8.0", - "jest-environment-node": "^24.8.0", - "jest-get-type": "^24.8.0", - "jest-jasmine2": "^24.8.0", + "jest-environment-jsdom": "^24.9.0", + "jest-environment-node": "^24.9.0", + "jest-get-type": "^24.9.0", + "jest-jasmine2": "^24.9.0", "jest-regex-util": "^24.3.0", - "jest-resolve": "^24.8.0", - "jest-util": "^24.8.0", - "jest-validate": "^24.8.0", + "jest-resolve": "^24.9.0", + "jest-util": "^24.9.0", + "jest-validate": "^24.9.0", "micromatch": "^3.1.10", - "pretty-format": "^24.8.0", + "pretty-format": "^24.9.0", "realpath-native": "^1.1.0" }, + "deprecated": false, "devDependencies": { "@types/babel__core": "^7.0.4", "@types/glob": "^7.1.1", @@ -61,7 +62,7 @@ "engines": { "node": ">= 6" }, - "gitHead": "845728f24b3ef41e450595c384e9b5c9fdf248a4", + "gitHead": "9ad0f4bc6b8bdd94989804226c28c9960d9da7d1", "homepage": "https://github.com/facebook/jest#readme", "license": "MIT", "main": "build/index.js", @@ -75,5 +76,5 @@ "directory": "packages/jest-config" }, "types": "build/index.d.ts", - "version": "24.8.0" + "version": "24.9.0" } diff --git a/node_modules/jest-config/tsconfig.json b/node_modules/jest-config/tsconfig.json deleted file mode 100644 index b33c16791..000000000 --- a/node_modules/jest-config/tsconfig.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "extends": "../../tsconfig.json", - "compilerOptions": { - "rootDir": "src", - "outDir": "build" - }, - // TODO: This is missing `jest-jasmine2`, but that is just - // `require.resolve`d, so no real use for its types - "references": [ - {"path": "../jest-environment-jsdom"}, - {"path": "../jest-environment-node"}, - {"path": "../jest-get-type"}, - {"path": "../jest-regex-util"}, - {"path": "../jest-resolve"}, - {"path": "../jest-types"}, - {"path": "../jest-util"}, - {"path": "../jest-validate"}, - {"path": "../pretty-format"} - ] -} diff --git a/node_modules/jest-docblock/LICENSE b/node_modules/jest-docblock/LICENSE index 10e779c44..b96dcb048 100644 --- a/node_modules/jest-docblock/LICENSE +++ b/node_modules/jest-docblock/LICENSE @@ -1,8 +1,6 @@ MIT License -For Jest software - -Copyright (c) 2014-present, Facebook, Inc. +Copyright (c) Facebook, Inc. and its affiliates. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/node_modules/jest-docblock/build/index.d.ts b/node_modules/jest-docblock/build/index.d.ts index bd7ee27da..fe88c94e8 100644 --- a/node_modules/jest-docblock/build/index.d.ts +++ b/node_modules/jest-docblock/build/index.d.ts @@ -4,9 +4,7 @@ * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ -declare type Pragmas = { - [key: string]: string | Array; -}; +declare type Pragmas = Record>; export declare function extract(contents: string): string; export declare function strip(contents: string): string; export declare function parse(docblock: string): Pragmas; diff --git a/node_modules/jest-docblock/build/index.d.ts.map b/node_modules/jest-docblock/build/index.d.ts.map index b3e57e502..2194b039a 100644 --- a/node_modules/jest-docblock/build/index.d.ts.map +++ b/node_modules/jest-docblock/build/index.d.ts.map @@ -1 +1 @@ -{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAKH,aAAK,OAAO,GAAG;IAAC,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,GAAG,KAAK,CAAC,MAAM,CAAC,CAAA;CAAC,CAAC;AAWvD,wBAAgB,OAAO,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,CAGhD;AAED,wBAAgB,KAAK,CAAC,QAAQ,EAAE,MAAM,UAGrC;AAED,wBAAgB,KAAK,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAE/C;AAED,wBAAgB,iBAAiB,CAC/B,QAAQ,EAAE,MAAM,GACf;IAAC,QAAQ,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,OAAO,CAAA;CAAC,CAuCtC;AAED,wBAAgB,KAAK,CAAC,EACpB,QAAa,EACb,OAAY,GACb,EAAE;IACD,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB,GAAG,MAAM,CAsCT"} \ No newline at end of file +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAKH,aAAK,OAAO,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC;AAWtD,wBAAgB,OAAO,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,CAGhD;AAED,wBAAgB,KAAK,CAAC,QAAQ,EAAE,MAAM,UAGrC;AAED,wBAAgB,KAAK,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAE/C;AAED,wBAAgB,iBAAiB,CAC/B,QAAQ,EAAE,MAAM,GACf;IAAC,QAAQ,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,OAAO,CAAA;CAAC,CAuCtC;AAED,wBAAgB,KAAK,CAAC,EACpB,QAAa,EACb,OAAY,GACb,EAAE;IACD,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB,GAAG,MAAM,CAsCT"} \ No newline at end of file diff --git a/node_modules/jest-docblock/package.json b/node_modules/jest-docblock/package.json index ef5014325..d839704b5 100644 --- a/node_modules/jest-docblock/package.json +++ b/node_modules/jest-docblock/package.json @@ -1,39 +1,35 @@ { - "_args": [ - [ - "jest-docblock@24.3.0", - "/Users/drew.heavner/Documents/Github/sign-android-release" - ] - ], - "_development": true, - "_from": "jest-docblock@24.3.0", - "_id": "jest-docblock@24.3.0", + "_from": "jest-docblock@^24.3.0", + "_id": "jest-docblock@24.9.0", "_inBundle": false, - "_integrity": "sha512-nlANmF9Yq1dufhFlKG9rasfQlrY7wINJbo3q01tu56Jv5eBU5jirylhF2O5ZBnLxzOVBGRDz/9NAwNyBtG4Nyg==", + "_integrity": "sha512-F1DjdpDMJMA1cN6He0FNYNZlo3yYmOtRUnktrT9Q37njYzC5WEaDdmbynIgy0L/IvXvvgsG8OsqhLPXTpfmZAA==", "_location": "/jest-docblock", "_phantomChildren": {}, "_requested": { - "type": "version", + "type": "range", "registry": true, - "raw": "jest-docblock@24.3.0", + "raw": "jest-docblock@^24.3.0", "name": "jest-docblock", "escapedName": "jest-docblock", - "rawSpec": "24.3.0", + "rawSpec": "^24.3.0", "saveSpec": null, - "fetchSpec": "24.3.0" + "fetchSpec": "^24.3.0" }, "_requiredBy": [ "/jest-runner" ], - "_resolved": "https://registry.npmjs.org/jest-docblock/-/jest-docblock-24.3.0.tgz", - "_spec": "24.3.0", - "_where": "/Users/drew.heavner/Documents/Github/sign-android-release", + "_resolved": "https://registry.npmjs.org/jest-docblock/-/jest-docblock-24.9.0.tgz", + "_shasum": "7970201802ba560e1c4092cc25cbedf5af5a8ce2", + "_spec": "jest-docblock@^24.3.0", + "_where": "/Users/drew.heavner/Documents/Github/sign-android-release/node_modules/jest-runner", "bugs": { "url": "https://github.com/facebook/jest/issues" }, + "bundleDependencies": false, "dependencies": { "detect-newline": "^2.1.0" }, + "deprecated": false, "description": "`jest-docblock` is a package that can extract and parse a specially-formatted comment called a \"docblock\" at the top of a file.", "devDependencies": { "@types/detect-newline": "^2.1.0" @@ -41,7 +37,7 @@ "engines": { "node": ">= 6" }, - "gitHead": "3a7a4f3a3f5489ac8e07dcddf76bb949c482ec87", + "gitHead": "9ad0f4bc6b8bdd94989804226c28c9960d9da7d1", "homepage": "https://github.com/facebook/jest#readme", "license": "MIT", "main": "build/index.js", @@ -54,5 +50,5 @@ "url": "git+https://github.com/facebook/jest.git", "directory": "packages/jest-docblock" }, - "version": "24.3.0" + "version": "24.9.0" } diff --git a/node_modules/jest-docblock/tsconfig.json b/node_modules/jest-docblock/tsconfig.json deleted file mode 100644 index 7bb06bce6..000000000 --- a/node_modules/jest-docblock/tsconfig.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "extends": "../../tsconfig.json", - "compilerOptions": { - "rootDir": "src", - "outDir": "build" - } -} diff --git a/node_modules/jest-each/LICENSE b/node_modules/jest-each/LICENSE index 10e779c44..b96dcb048 100644 --- a/node_modules/jest-each/LICENSE +++ b/node_modules/jest-each/LICENSE @@ -1,8 +1,6 @@ MIT License -For Jest software - -Copyright (c) 2014-present, Facebook, Inc. +Copyright (c) Facebook, Inc. and its affiliates. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/node_modules/jest-each/README.md b/node_modules/jest-each/README.md index b64ece9d6..4ed8fc56b 100644 --- a/node_modules/jest-each/README.md +++ b/node_modules/jest-each/README.md @@ -85,7 +85,7 @@ import each from 'jest-each'; ```js // es5 -const each = require('jest-each'); +const each = require('jest-each').default; ``` ## Array of rows diff --git a/node_modules/jest-each/build/index.d.ts b/node_modules/jest-each/build/index.d.ts index 2b7d00970..c2774ad58 100644 --- a/node_modules/jest-each/build/index.d.ts +++ b/node_modules/jest-each/build/index.d.ts @@ -7,7 +7,7 @@ */ import { Global } from '@jest/types'; import bind from './bind'; -declare type Global = NodeJS.Global; +declare type Global = Global.Global; declare const each: { (table: Global.EachTable, ...data: unknown[]): { describe: { @@ -31,7 +31,7 @@ declare const each: { xit: (title: string, test: Global.EachTestFn, timeout?: number | undefined) => void; xtest: (title: string, test: Global.EachTestFn, timeout?: number | undefined) => void; }; - withGlobal(g: NodeJS.Global): (table: Global.EachTable, ...data: unknown[]) => { + withGlobal(g: Global.Global): (table: Global.EachTable, ...data: unknown[]) => { describe: { (title: string, suite: Global.EachTestFn, timeout?: number | undefined): void; skip: (title: string, test: Global.EachTestFn, timeout?: number | undefined) => void; diff --git a/node_modules/jest-each/build/index.d.ts.map b/node_modules/jest-each/build/index.d.ts.map index 00bca54fc..ad9a4fc77 100644 --- a/node_modules/jest-each/build/index.d.ts.map +++ b/node_modules/jest-each/build/index.d.ts.map @@ -1 +1 @@ -{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAC,MAAM,EAAC,MAAM,aAAa,CAAC;AACnC,OAAO,IAAI,MAAM,QAAQ,CAAC;AAE1B,aAAK,MAAM,GAAG,MAAM,CAAC,MAAM,CAAC;AAkC5B,QAAA,MAAM,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACuB,CAAC;AAOlC,OAAO,EAAC,IAAI,EAAC,CAAC;AAEd,eAAe,IAAI,CAAC"} \ No newline at end of file +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAC,MAAM,EAAC,MAAM,aAAa,CAAC;AACnC,OAAO,IAAI,MAAM,QAAQ,CAAC;AAE1B,aAAK,MAAM,GAAG,MAAM,CAAC,MAAM,CAAC;AAiC5B,QAAA,MAAM,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACiC,CAAC;AAO5C,OAAO,EAAC,IAAI,EAAC,CAAC;AAEd,eAAe,IAAI,CAAC"} \ No newline at end of file diff --git a/node_modules/jest-each/build/table/template.d.ts b/node_modules/jest-each/build/table/template.d.ts index 3adb1e4cf..320f4afa0 100644 --- a/node_modules/jest-each/build/table/template.d.ts +++ b/node_modules/jest-each/build/table/template.d.ts @@ -5,9 +5,16 @@ * LICENSE file in the root directory of this source tree. * */ +declare type Template = Record; declare const _default: (title: string, headings: string[], row: unknown[]) => { title: string; arguments: unknown[]; }[]; export default _default; +export declare function getPath(obj: Obj, path: [A, B, C, D, E]): Obj[A][B][C][D][E]; +export declare function getPath(obj: Obj, path: [A, B, C, D]): Obj[A][B][C][D]; +export declare function getPath(obj: Obj, path: [A, B, C]): Obj[A][B][C]; +export declare function getPath(obj: Obj, path: [A, B]): Obj[A][B]; +export declare function getPath(obj: Obj, path: [A]): Obj[A]; +export declare function getPath(obj: Obj, path: Array): unknown; //# sourceMappingURL=template.d.ts.map \ No newline at end of file diff --git a/node_modules/jest-each/build/table/template.d.ts.map b/node_modules/jest-each/build/table/template.d.ts.map index 3e6ae5614..345b2b617 100644 --- a/node_modules/jest-each/build/table/template.d.ts.map +++ b/node_modules/jest-each/build/table/template.d.ts.map @@ -1 +1 @@ -{"version":3,"file":"template.d.ts","sourceRoot":"","sources":["../../src/table/template.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;;;;;AAWH,wBAWE"} \ No newline at end of file +{"version":3,"file":"template.d.ts","sourceRoot":"","sources":["../../src/table/template.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAOH,aAAK,QAAQ,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;;;;;AAIxC,wBAWE;AA6CF,wBAAgB,OAAO,CACrB,GAAG,SAAS,QAAQ,EACpB,CAAC,SAAS,MAAM,GAAG,EACnB,CAAC,SAAS,MAAM,GAAG,CAAC,CAAC,CAAC,EACtB,CAAC,SAAS,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,EACzB,CAAC,SAAS,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,EAC5B,CAAC,SAAS,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,EAC/B,GAAG,EAAE,GAAG,EAAE,IAAI,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,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AAS,QAAQ,EAAE,CAAC,SAAS,MAAM,GAAG,EAC/D,GAAG,EAAE,GAAG,EACR,IAAI,EAAE,CAAC,CAAC,CAAC,GACR,GAAG,CAAC,CAAC,CAAC,CAAC;AACV,wBAAgB,OAAO,CAAC,GAAG,SAAS,QAAQ,EAC1C,GAAG,EAAE,GAAG,EACR,IAAI,EAAE,KAAK,CAAC,MAAM,CAAC,GAClB,OAAO,CAAC"} \ No newline at end of file diff --git a/node_modules/jest-each/build/table/template.js b/node_modules/jest-each/build/table/template.js index 3392b0980..25af91cb8 100644 --- a/node_modules/jest-each/build/table/template.js +++ b/node_modules/jest-each/build/table/template.js @@ -3,6 +3,7 @@ Object.defineProperty(exports, '__esModule', { value: true }); +exports.getPath = getPath; exports.default = void 0; function _prettyFormat() { @@ -92,9 +93,10 @@ const replaceKeyPathWithValue = template => (title, match) => { }) ); }; +/* eslint import/export: 0*/ -const getPath = (template, [head, ...tail]) => { +function getPath(template, [head, ...tail]) { if (!head || !template.hasOwnProperty || !template.hasOwnProperty(head)) return template; return getPath(template[head], tail); -}; +} diff --git a/node_modules/jest-each/package.json b/node_modules/jest-each/package.json index e1cca3473..f8c9d7d51 100644 --- a/node_modules/jest-each/package.json +++ b/node_modules/jest-each/package.json @@ -1,34 +1,35 @@ { - "_args": [ - [ - "jest-each@24.8.0", - "/Users/drew.heavner/Documents/Github/sign-android-release" - ] - ], - "_development": true, - "_from": "jest-each@24.8.0", - "_id": "jest-each@24.8.0", + "_from": "jest-each@24.9.0", + "_id": "jest-each@24.9.0", "_inBundle": false, - "_integrity": "sha512-NrwK9gaL5+XgrgoCsd9svsoWdVkK4gnvyhcpzd6m487tXHqIdYeykgq3MKI1u4I+5Zf0tofr70at9dWJDeb+BA==", + "_integrity": "sha512-ONi0R4BvW45cw8s2Lrx8YgbeXL1oCQ/wIDwmsM3CqM/nlblNCPmnC3IPQlMbRFZu3wKdQ2U8BqM6lh3LJ5Bsog==", "_location": "/jest-each", - "_phantomChildren": {}, + "_phantomChildren": { + "@types/istanbul-lib-coverage": "2.0.1", + "@types/istanbul-reports": "1.1.1", + "@types/yargs-parser": "15.0.0", + "ansi-regex": "4.1.0", + "ansi-styles": "3.2.1", + "react-is": "16.8.6" + }, "_requested": { "type": "version", "registry": true, - "raw": "jest-each@24.8.0", + "raw": "jest-each@24.9.0", "name": "jest-each", "escapedName": "jest-each", - "rawSpec": "24.8.0", + "rawSpec": "24.9.0", "saveSpec": null, - "fetchSpec": "24.8.0" + "fetchSpec": "24.9.0" }, "_requiredBy": [ "/jest-circus", "/jest-jasmine2" ], - "_resolved": "https://registry.npmjs.org/jest-each/-/jest-each-24.8.0.tgz", - "_spec": "24.8.0", - "_where": "/Users/drew.heavner/Documents/Github/sign-android-release", + "_resolved": "https://registry.npmjs.org/jest-each/-/jest-each-24.9.0.tgz", + "_shasum": "eb2da602e2a610898dbc5f1f6df3ba86b55f8b05", + "_spec": "jest-each@24.9.0", + "_where": "/Users/drew.heavner/Documents/Github/sign-android-release/node_modules/jest-jasmine2", "author": { "name": "Matt Phillips", "url": "mattphillips" @@ -36,18 +37,20 @@ "bugs": { "url": "https://github.com/facebook/jest/issues" }, + "bundleDependencies": false, "dependencies": { - "@jest/types": "^24.8.0", + "@jest/types": "^24.9.0", "chalk": "^2.0.1", - "jest-get-type": "^24.8.0", - "jest-util": "^24.8.0", - "pretty-format": "^24.8.0" + "jest-get-type": "^24.9.0", + "jest-util": "^24.9.0", + "pretty-format": "^24.9.0" }, + "deprecated": false, "description": "Parameterised tests for Jest", "engines": { "node": ">= 6" }, - "gitHead": "845728f24b3ef41e450595c384e9b5c9fdf248a4", + "gitHead": "9ad0f4bc6b8bdd94989804226c28c9960d9da7d1", "homepage": "https://github.com/facebook/jest#readme", "keywords": [ "jest", @@ -67,5 +70,5 @@ "directory": "packages/jest-each" }, "types": "build/index.d.ts", - "version": "24.8.0" + "version": "24.9.0" } diff --git a/node_modules/jest-each/tsconfig.json b/node_modules/jest-each/tsconfig.json deleted file mode 100644 index b88a75787..000000000 --- a/node_modules/jest-each/tsconfig.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "extends": "../../tsconfig.json", - "compilerOptions": { - "rootDir": "src", - "outDir": "build" - }, - "references": [ - {"path": "../jest-get-type"}, - {"path": "../jest-types"}, - {"path": "../jest-util"}, - {"path": "../pretty-format"} - ] -} diff --git a/node_modules/jest-environment-jsdom/LICENSE b/node_modules/jest-environment-jsdom/LICENSE deleted file mode 100644 index 10e779c44..000000000 --- a/node_modules/jest-environment-jsdom/LICENSE +++ /dev/null @@ -1,23 +0,0 @@ -MIT License - -For Jest software - -Copyright (c) 2014-present, Facebook, Inc. - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/node_modules/jest-environment-jsdom/package.json b/node_modules/jest-environment-jsdom/package.json index 444293fb3..b55fd7f76 100644 --- a/node_modules/jest-environment-jsdom/package.json +++ b/node_modules/jest-environment-jsdom/package.json @@ -1,51 +1,52 @@ { - "_args": [ - [ - "jest-environment-jsdom@24.8.0", - "/Users/drew.heavner/Documents/Github/sign-android-release" - ] - ], - "_development": true, - "_from": "jest-environment-jsdom@24.8.0", - "_id": "jest-environment-jsdom@24.8.0", + "_from": "jest-environment-jsdom@^24.9.0", + "_id": "jest-environment-jsdom@24.9.0", "_inBundle": false, - "_integrity": "sha512-qbvgLmR7PpwjoFjM/sbuqHJt/NCkviuq9vus9NBn/76hhSidO+Z6Bn9tU8friecegbJL8gzZQEMZBQlFWDCwAQ==", + "_integrity": "sha512-Zv9FV9NBRzLuALXjvRijO2351DRQeLYXtpD4xNvfoVFw21IOKNhZAEUKcbiEtjTkm2GsJ3boMVgkaR7rN8qetA==", "_location": "/jest-environment-jsdom", - "_phantomChildren": {}, + "_phantomChildren": { + "@types/istanbul-lib-coverage": "2.0.1", + "@types/istanbul-reports": "1.1.1", + "@types/yargs-parser": "15.0.0" + }, "_requested": { - "type": "version", + "type": "range", "registry": true, - "raw": "jest-environment-jsdom@24.8.0", + "raw": "jest-environment-jsdom@^24.9.0", "name": "jest-environment-jsdom", "escapedName": "jest-environment-jsdom", - "rawSpec": "24.8.0", + "rawSpec": "^24.9.0", "saveSpec": null, - "fetchSpec": "24.8.0" + "fetchSpec": "^24.9.0" }, "_requiredBy": [ - "/jest-config" + "/jest-config", + "/jest/jest-cli/jest-config" ], - "_resolved": "https://registry.npmjs.org/jest-environment-jsdom/-/jest-environment-jsdom-24.8.0.tgz", - "_spec": "24.8.0", - "_where": "/Users/drew.heavner/Documents/Github/sign-android-release", + "_resolved": "https://registry.npmjs.org/jest-environment-jsdom/-/jest-environment-jsdom-24.9.0.tgz", + "_shasum": "4b0806c7fc94f95edb369a69cc2778eec2b7375b", + "_spec": "jest-environment-jsdom@^24.9.0", + "_where": "/Users/drew.heavner/Documents/Github/sign-android-release/node_modules/jest-config", "bugs": { "url": "https://github.com/facebook/jest/issues" }, + "bundleDependencies": false, "dependencies": { - "@jest/environment": "^24.8.0", - "@jest/fake-timers": "^24.8.0", - "@jest/types": "^24.8.0", - "jest-mock": "^24.8.0", - "jest-util": "^24.8.0", + "@jest/environment": "^24.9.0", + "@jest/fake-timers": "^24.9.0", + "@jest/types": "^24.9.0", + "jest-mock": "^24.9.0", + "jest-util": "^24.9.0", "jsdom": "^11.5.1" }, + "deprecated": false, "devDependencies": { "@types/jsdom": "^11.12.0" }, "engines": { "node": ">= 6" }, - "gitHead": "845728f24b3ef41e450595c384e9b5c9fdf248a4", + "gitHead": "9ad0f4bc6b8bdd94989804226c28c9960d9da7d1", "homepage": "https://github.com/facebook/jest#readme", "license": "MIT", "main": "build/index.js", @@ -59,5 +60,5 @@ "directory": "packages/jest-environment-jsdom" }, "types": "build/index.d.ts", - "version": "24.8.0" + "version": "24.9.0" } diff --git a/node_modules/jest-environment-jsdom/tsconfig.json b/node_modules/jest-environment-jsdom/tsconfig.json deleted file mode 100644 index 655d8c8aa..000000000 --- a/node_modules/jest-environment-jsdom/tsconfig.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "extends": "../../tsconfig.json", - "compilerOptions": { - "outDir": "build", - "rootDir": "src" - }, - "references": [ - {"path": "../jest-environment"}, - {"path": "../jest-fake-timers"}, - {"path": "../jest-mock"}, - {"path": "../jest-types"}, - {"path": "../jest-util"} - ] -} diff --git a/node_modules/jest-environment-node/LICENSE b/node_modules/jest-environment-node/LICENSE deleted file mode 100644 index 10e779c44..000000000 --- a/node_modules/jest-environment-node/LICENSE +++ /dev/null @@ -1,23 +0,0 @@ -MIT License - -For Jest software - -Copyright (c) 2014-present, Facebook, Inc. - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/node_modules/jest-environment-node/package.json b/node_modules/jest-environment-node/package.json index e4662ac78..a0ac8a327 100644 --- a/node_modules/jest-environment-node/package.json +++ b/node_modules/jest-environment-node/package.json @@ -1,47 +1,48 @@ { - "_args": [ - [ - "jest-environment-node@24.8.0", - "/Users/drew.heavner/Documents/Github/sign-android-release" - ] - ], - "_development": true, - "_from": "jest-environment-node@24.8.0", - "_id": "jest-environment-node@24.8.0", + "_from": "jest-environment-node@^24.9.0", + "_id": "jest-environment-node@24.9.0", "_inBundle": false, - "_integrity": "sha512-vIGUEScd1cdDgR6sqn2M08sJTRLQp6Dk/eIkCeO4PFHxZMOgy+uYLPMC4ix3PEfM5Au/x3uQ/5Tl0DpXXZsJ/Q==", + "_integrity": "sha512-6d4V2f4nxzIzwendo27Tr0aFm+IXWa0XEUnaH6nU0FMaozxovt+sfRvh4J47wL1OvF83I3SSTu0XK+i4Bqe7uA==", "_location": "/jest-environment-node", - "_phantomChildren": {}, + "_phantomChildren": { + "@types/istanbul-lib-coverage": "2.0.1", + "@types/istanbul-reports": "1.1.1", + "@types/yargs-parser": "15.0.0" + }, "_requested": { - "type": "version", + "type": "range", "registry": true, - "raw": "jest-environment-node@24.8.0", + "raw": "jest-environment-node@^24.9.0", "name": "jest-environment-node", "escapedName": "jest-environment-node", - "rawSpec": "24.8.0", + "rawSpec": "^24.9.0", "saveSpec": null, - "fetchSpec": "24.8.0" + "fetchSpec": "^24.9.0" }, "_requiredBy": [ - "/jest-config" + "/jest-config", + "/jest/jest-cli/jest-config" ], - "_resolved": "https://registry.npmjs.org/jest-environment-node/-/jest-environment-node-24.8.0.tgz", - "_spec": "24.8.0", - "_where": "/Users/drew.heavner/Documents/Github/sign-android-release", + "_resolved": "https://registry.npmjs.org/jest-environment-node/-/jest-environment-node-24.9.0.tgz", + "_shasum": "333d2d2796f9687f2aeebf0742b519f33c1cbfd3", + "_spec": "jest-environment-node@^24.9.0", + "_where": "/Users/drew.heavner/Documents/Github/sign-android-release/node_modules/jest-config", "bugs": { "url": "https://github.com/facebook/jest/issues" }, + "bundleDependencies": false, "dependencies": { - "@jest/environment": "^24.8.0", - "@jest/fake-timers": "^24.8.0", - "@jest/types": "^24.8.0", - "jest-mock": "^24.8.0", - "jest-util": "^24.8.0" + "@jest/environment": "^24.9.0", + "@jest/fake-timers": "^24.9.0", + "@jest/types": "^24.9.0", + "jest-mock": "^24.9.0", + "jest-util": "^24.9.0" }, + "deprecated": false, "engines": { "node": ">= 6" }, - "gitHead": "845728f24b3ef41e450595c384e9b5c9fdf248a4", + "gitHead": "9ad0f4bc6b8bdd94989804226c28c9960d9da7d1", "homepage": "https://github.com/facebook/jest#readme", "license": "MIT", "main": "build/index.js", @@ -55,5 +56,5 @@ "directory": "packages/jest-environment-node" }, "types": "build/index.d.ts", - "version": "24.8.0" + "version": "24.9.0" } diff --git a/node_modules/jest-environment-node/tsconfig.json b/node_modules/jest-environment-node/tsconfig.json deleted file mode 100644 index 655d8c8aa..000000000 --- a/node_modules/jest-environment-node/tsconfig.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "extends": "../../tsconfig.json", - "compilerOptions": { - "outDir": "build", - "rootDir": "src" - }, - "references": [ - {"path": "../jest-environment"}, - {"path": "../jest-fake-timers"}, - {"path": "../jest-mock"}, - {"path": "../jest-types"}, - {"path": "../jest-util"} - ] -} diff --git a/node_modules/jest-haste-map/build/index.d.ts.map b/node_modules/jest-haste-map/build/index.d.ts.map index 079a06fae..db7828a89 100644 --- a/node_modules/jest-haste-map/build/index.d.ts.map +++ b/node_modules/jest-haste-map/build/index.d.ts.map @@ -1 +1 @@ -{"version":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AAC"} \ No newline at end of file diff --git a/node_modules/jest-haste-map/build/index.js b/node_modules/jest-haste-map/build/index.js index b9ef98e72..7943a9bac 100644 --- a/node_modules/jest-haste-map/build/index.js +++ b/node_modules/jest-haste-map/build/index.js @@ -810,123 +810,120 @@ class HasteMap extends _events().default { } _buildHasteMap(data) { - var _this3 = this; - - return _asyncToGenerator(function*() { - const removedFiles = data.removedFiles, - changedFiles = data.changedFiles, - hasteMap = data.hasteMap; // If any files were removed or we did not track what files changed, process - // every file looking for changes. Otherwise, process only changed files. - - let map; - let mocks; - let filesToProcess; - - if (changedFiles === undefined || removedFiles.size) { - map = new Map(); - mocks = new Map(); - filesToProcess = hasteMap.files; - } else { - map = hasteMap.map; - mocks = hasteMap.mocks; - filesToProcess = changedFiles; - } + const removedFiles = data.removedFiles, + changedFiles = data.changedFiles, + hasteMap = data.hasteMap; // If any files were removed or we did not track what files changed, process + // every file looking for changes. Otherwise, process only changed files. + + let map; + let mocks; + let filesToProcess; + + if (changedFiles === undefined || removedFiles.size) { + map = new Map(); + mocks = new Map(); + filesToProcess = hasteMap.files; + } else { + map = hasteMap.map; + mocks = hasteMap.mocks; + filesToProcess = changedFiles; + } - var _iteratorNormalCompletion = true; - var _didIteratorError = false; - var _iteratorError = undefined; + var _iteratorNormalCompletion = true; + var _didIteratorError = false; + var _iteratorError = undefined; + try { + for ( + var _iterator = removedFiles[Symbol.iterator](), _step; + !(_iteratorNormalCompletion = (_step = _iterator.next()).done); + _iteratorNormalCompletion = true + ) { + const _step$value = _slicedToArray(_step.value, 2), + relativeFilePath = _step$value[0], + fileMetadata = _step$value[1]; + + this._recoverDuplicates( + hasteMap, + relativeFilePath, + fileMetadata[_constants.default.ID] + ); + } + } catch (err) { + _didIteratorError = true; + _iteratorError = err; + } finally { try { - for ( - var _iterator = removedFiles[Symbol.iterator](), _step; - !(_iteratorNormalCompletion = (_step = _iterator.next()).done); - _iteratorNormalCompletion = true - ) { - const _step$value = _slicedToArray(_step.value, 2), - relativeFilePath = _step$value[0], - fileMetadata = _step$value[1]; - - _this3._recoverDuplicates( - hasteMap, - relativeFilePath, - fileMetadata[_constants.default.ID] - ); + if (!_iteratorNormalCompletion && _iterator.return != null) { + _iterator.return(); } - } catch (err) { - _didIteratorError = true; - _iteratorError = err; } finally { - try { - if (!_iteratorNormalCompletion && _iterator.return != null) { - _iterator.return(); - } - } finally { - if (_didIteratorError) { - throw _iteratorError; - } + if (_didIteratorError) { + throw _iteratorError; } } + } - const promises = []; - var _iteratorNormalCompletion2 = true; - var _didIteratorError2 = false; - var _iteratorError2 = undefined; + const promises = []; + var _iteratorNormalCompletion2 = true; + var _didIteratorError2 = false; + var _iteratorError2 = undefined; - try { - for ( - var _iterator2 = filesToProcess.keys()[Symbol.iterator](), _step2; - !(_iteratorNormalCompletion2 = (_step2 = _iterator2.next()).done); - _iteratorNormalCompletion2 = true - ) { - const relativeFilePath = _step2.value; + try { + for ( + var _iterator2 = filesToProcess.keys()[Symbol.iterator](), _step2; + !(_iteratorNormalCompletion2 = (_step2 = _iterator2.next()).done); + _iteratorNormalCompletion2 = true + ) { + const relativeFilePath = _step2.value; - if ( - _this3._options.skipPackageJson && - relativeFilePath.endsWith(PACKAGE_JSON) - ) { - continue; - } // SHA-1, if requested, should already be present thanks to the crawler. + if ( + this._options.skipPackageJson && + relativeFilePath.endsWith(PACKAGE_JSON) + ) { + continue; + } // SHA-1, if requested, should already be present thanks to the crawler. - const filePath = fastPath.resolve( - _this3._options.rootDir, - relativeFilePath - ); + const filePath = fastPath.resolve( + this._options.rootDir, + relativeFilePath + ); - const promise = _this3._processFile(hasteMap, map, mocks, filePath); + const promise = this._processFile(hasteMap, map, mocks, filePath); - if (promise) { - promises.push(promise); - } + if (promise) { + promises.push(promise); + } + } + } catch (err) { + _didIteratorError2 = true; + _iteratorError2 = err; + } finally { + try { + if (!_iteratorNormalCompletion2 && _iterator2.return != null) { + _iterator2.return(); } - } catch (err) { - _didIteratorError2 = true; - _iteratorError2 = err; } finally { - try { - if (!_iteratorNormalCompletion2 && _iterator2.return != null) { - _iterator2.return(); - } - } finally { - if (_didIteratorError2) { - throw _iteratorError2; - } + if (_didIteratorError2) { + throw _iteratorError2; } } + } - try { - yield Promise.all(promises); - - _this3._cleanup(); + return Promise.all(promises).then( + () => { + this._cleanup(); hasteMap.map = map; hasteMap.mocks = mocks; return hasteMap; - } catch (error) { - _this3._cleanup(); + }, + error => { + this._cleanup(); throw error; } - })(); + ); } _cleanup() { diff --git a/node_modules/jest-haste-map/build/lib/dependencyExtractor.js b/node_modules/jest-haste-map/build/lib/dependencyExtractor.js index be0c9aa07..40914323c 100644 --- a/node_modules/jest-haste-map/build/lib/dependencyExtractor.js +++ b/node_modules/jest-haste-map/build/lib/dependencyExtractor.js @@ -63,7 +63,7 @@ const REQUIRE_OR_DYNAMIC_IMPORT_RE = createRegExp( ); const IMPORT_OR_EXPORT_RE = createRegExp( [ - '\\b(?:import|export)\\s+(?!type(?:of)?\\s+)[^\'"]+\\s+from\\s+', + '\\b(?:import|export)\\s+(?!type(?:of)?\\s+)(?:[^\'"]+\\s+from\\s+)?', CAPTURE_STRING_LITERAL(1) ], 'g' diff --git a/node_modules/jest-haste-map/build/persistence.d.ts b/node_modules/jest-haste-map/build/persistence.d.ts deleted file mode 100644 index 040f17eff..000000000 --- a/node_modules/jest-haste-map/build/persistence.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -import { Persistence } from './types'; -declare let chosenModule: Persistence; -export default chosenModule; -//# sourceMappingURL=persistence.d.ts.map \ No newline at end of file diff --git a/node_modules/jest-haste-map/build/persistence.d.ts.map b/node_modules/jest-haste-map/build/persistence.d.ts.map deleted file mode 100644 index 199d52ec6..000000000 --- a/node_modules/jest-haste-map/build/persistence.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"persistence.d.ts","sourceRoot":"","sources":["../src/persistence.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,WAAW,EAAC,MAAM,SAAS,CAAC;AAIpC,QAAA,IAAI,YAAY,EAAE,WAAW,CAAC;AAQ9B,eAAe,YAAY,CAAC"} \ No newline at end of file diff --git a/node_modules/jest-haste-map/build/persistence.js b/node_modules/jest-haste-map/build/persistence.js deleted file mode 100644 index 5456820a8..000000000 --- a/node_modules/jest-haste-map/build/persistence.js +++ /dev/null @@ -1,19 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, '__esModule', { - value: true -}); -exports.default = void 0; -// Try to load SQLite persistence, but fall back to file persistence when SQLite -let chosenModule; - -try { - require.resolve('better-sqlite3'); - - chosenModule = require('./persistence/sqlite').default; -} catch (_unused) { - chosenModule = require('./persistence/file').default; -} - -var _default = chosenModule; -exports.default = _default; diff --git a/node_modules/jest-haste-map/build/persistence/file.d.ts b/node_modules/jest-haste-map/build/persistence/file.d.ts deleted file mode 100644 index 48a3c5c0d..000000000 --- a/node_modules/jest-haste-map/build/persistence/file.d.ts +++ /dev/null @@ -1,9 +0,0 @@ -import { InternalHasteMap, Persistence } from '../types'; -declare class FilePersistence implements Persistence { - write(cachePath: string, internalHasteMap: InternalHasteMap): void; - read(cachePath: string): InternalHasteMap; - getType(): string; -} -declare const _default: FilePersistence; -export default _default; -//# sourceMappingURL=file.d.ts.map \ No newline at end of file diff --git a/node_modules/jest-haste-map/build/persistence/file.d.ts.map b/node_modules/jest-haste-map/build/persistence/file.d.ts.map deleted file mode 100644 index a4534d22e..000000000 --- a/node_modules/jest-haste-map/build/persistence/file.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"file.d.ts","sourceRoot":"","sources":["../../src/persistence/file.ts"],"names":[],"mappings":"AACA,OAAO,EAAC,gBAAgB,EAAE,WAAW,EAAC,MAAM,UAAU,CAAC;AAEvD,cAAM,eAAgB,YAAW,WAAW;IAC1C,KAAK,CAAC,SAAS,EAAE,MAAM,EAAE,gBAAgB,EAAE,gBAAgB,GAAG,IAAI;IAIlE,IAAI,CAAC,SAAS,EAAE,MAAM,GAAG,gBAAgB;IAIzC,OAAO;CAGR;;AAED,wBAAqC"} \ No newline at end of file diff --git a/node_modules/jest-haste-map/build/persistence/file.js b/node_modules/jest-haste-map/build/persistence/file.js deleted file mode 100644 index e411fb8b4..000000000 --- a/node_modules/jest-haste-map/build/persistence/file.js +++ /dev/null @@ -1,38 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, '__esModule', { - value: true -}); -exports.default = void 0; - -function _jestSerializer() { - const data = _interopRequireDefault(require('jest-serializer')); - - _jestSerializer = function _jestSerializer() { - return data; - }; - - return data; -} - -function _interopRequireDefault(obj) { - return obj && obj.__esModule ? obj : {default: obj}; -} - -class FilePersistence { - write(cachePath, internalHasteMap) { - _jestSerializer().default.writeFileSync(cachePath, internalHasteMap); - } - - read(cachePath) { - return _jestSerializer().default.readFileSync(cachePath); - } - - getType() { - return 'file'; - } -} - -var _default = new FilePersistence(); - -exports.default = _default; diff --git a/node_modules/jest-haste-map/build/persistence/mock-data.v8 b/node_modules/jest-haste-map/build/persistence/mock-data.v8 deleted file mode 100644 index 839c4a10a..000000000 Binary files a/node_modules/jest-haste-map/build/persistence/mock-data.v8 and /dev/null differ diff --git a/node_modules/jest-haste-map/build/persistence/sqlite.d.ts b/node_modules/jest-haste-map/build/persistence/sqlite.d.ts deleted file mode 100644 index 50807f3c3..000000000 --- a/node_modules/jest-haste-map/build/persistence/sqlite.d.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { InternalHasteMap, Persistence, FileData } from '../types'; -declare class SQLitePersistence implements Persistence { - read(cachePath: string): InternalHasteMap; - write(cachePath: string, internalHasteMap: InternalHasteMap, removedFiles: FileData, changedFiles?: FileData): void; - private getDatabase; - getType(): string; -} -declare const _default: SQLitePersistence; -export default _default; -//# sourceMappingURL=sqlite.d.ts.map \ No newline at end of file diff --git a/node_modules/jest-haste-map/build/persistence/sqlite.d.ts.map b/node_modules/jest-haste-map/build/persistence/sqlite.d.ts.map deleted file mode 100644 index 2c079e67d..000000000 --- a/node_modules/jest-haste-map/build/persistence/sqlite.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"sqlite.d.ts","sourceRoot":"","sources":["../../src/persistence/sqlite.ts"],"names":[],"mappings":"AAGA,OAAO,EACL,gBAAgB,EAChB,WAAW,EACX,QAAQ,EAGT,MAAM,UAAU,CAAC;AAGlB,cAAM,iBAAkB,YAAW,WAAW;IAC5C,IAAI,CAAC,SAAS,EAAE,MAAM,GAAG,gBAAgB;IAkGzC,KAAK,CACH,SAAS,EAAE,MAAM,EACjB,gBAAgB,EAAE,gBAAgB,EAClC,YAAY,EAAE,QAAQ,EACtB,YAAY,CAAC,EAAE,QAAQ,GACtB,IAAI;IA6HP,OAAO,CAAC,WAAW;IAoDnB,OAAO;CAGR;;AAED,wBAAuC"} \ No newline at end of file diff --git a/node_modules/jest-haste-map/build/persistence/sqlite.js b/node_modules/jest-haste-map/build/persistence/sqlite.js deleted file mode 100644 index cb1ad77ea..000000000 --- a/node_modules/jest-haste-map/build/persistence/sqlite.js +++ /dev/null @@ -1,718 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, '__esModule', { - value: true -}); -exports.default = void 0; - -function _v() { - const data = _interopRequireDefault(require('v8')); - - _v = function _v() { - return data; - }; - - return data; -} - -function _fs() { - const data = _interopRequireDefault(require('fs')); - - _fs = function _fs() { - return data; - }; - - return data; -} - -function _betterSqlite() { - const data = _interopRequireDefault(require('better-sqlite3')); - - _betterSqlite = function _betterSqlite() { - return data; - }; - - return data; -} - -var _constants = _interopRequireDefault(require('../constants')); - -function _interopRequireDefault(obj) { - return obj && obj.__esModule ? obj : {default: obj}; -} - -function _slicedToArray(arr, i) { - return ( - _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _nonIterableRest() - ); -} - -function _nonIterableRest() { - throw new TypeError('Invalid attempt to destructure non-iterable instance'); -} - -function _iterableToArrayLimit(arr, i) { - var _arr = []; - var _n = true; - var _d = false; - var _e = undefined; - try { - for ( - var _i = arr[Symbol.iterator](), _s; - !(_n = (_s = _i.next()).done); - _n = true - ) { - _arr.push(_s.value); - if (i && _arr.length === i) break; - } - } catch (err) { - _d = true; - _e = err; - } finally { - try { - if (!_n && _i['return'] != null) _i['return'](); - } finally { - if (_d) throw _e; - } - } - return _arr; -} - -function _arrayWithHoles(arr) { - if (Array.isArray(arr)) return arr; -} - -class SQLitePersistence { - read(cachePath) { - // Get database, throw if does not exist. - const db = this.getDatabase(cachePath, true); // Create empty map to populate. - - const internalHasteMap = { - files: new Map(), - map: new Map(), - mocks: new Map(), - duplicates: new Map(), - clocks: new Map() - }; // Fetch files. - - const filesArr = db.prepare(`SELECT * FROM files`).all(); - var _iteratorNormalCompletion = true; - var _didIteratorError = false; - var _iteratorError = undefined; - - try { - for ( - var _iterator = filesArr[Symbol.iterator](), _step; - !(_iteratorNormalCompletion = (_step = _iterator.next()).done); - _iteratorNormalCompletion = true - ) { - const file = _step.value; - internalHasteMap.files.set(file.filePath, [ - file.id, - file.mtime, - file.size, - file.visited, - file.dependencies, - file.sha1 - ]); - } // Fetch map. - } catch (err) { - _didIteratorError = true; - _iteratorError = err; - } finally { - try { - if (!_iteratorNormalCompletion && _iterator.return != null) { - _iterator.return(); - } - } finally { - if (_didIteratorError) { - throw _iteratorError; - } - } - } - - const mapsArr = db.prepare(`SELECT * FROM map`).all(); - var _iteratorNormalCompletion2 = true; - var _didIteratorError2 = false; - var _iteratorError2 = undefined; - - try { - for ( - var _iterator2 = mapsArr[Symbol.iterator](), _step2; - !(_iteratorNormalCompletion2 = (_step2 = _iterator2.next()).done); - _iteratorNormalCompletion2 = true - ) { - const map = _step2.value; - const mapItem = {}; - - if (map.genericPath !== null && map.genericType !== null) { - mapItem[_constants.default.GENERIC_PLATFORM] = [ - map.genericPath, - map.genericType - ]; - } - - if (map.nativePath !== null && map.nativeType !== null) { - mapItem[_constants.default.NATIVE_PLATFORM] = [ - map.nativePath, - map.nativeType - ]; - } - - if (map.iosPath !== null && map.iosType !== null) { - mapItem[_constants.default.IOS_PLATFORM] = [map.iosPath, map.iosType]; - } - - if (map.androidPath !== null && map.androidType !== null) { - mapItem[_constants.default.ANDROID_PLATFORM] = [ - map.androidPath, - map.androidType - ]; - } - - internalHasteMap.map.set(map.name, mapItem); - } // Fetch mocks. - } catch (err) { - _didIteratorError2 = true; - _iteratorError2 = err; - } finally { - try { - if (!_iteratorNormalCompletion2 && _iterator2.return != null) { - _iterator2.return(); - } - } finally { - if (_didIteratorError2) { - throw _iteratorError2; - } - } - } - - const mocksArr = db.prepare(`SELECT * FROM mocks`).all(); - var _iteratorNormalCompletion3 = true; - var _didIteratorError3 = false; - var _iteratorError3 = undefined; - - try { - for ( - var _iterator3 = mocksArr[Symbol.iterator](), _step3; - !(_iteratorNormalCompletion3 = (_step3 = _iterator3.next()).done); - _iteratorNormalCompletion3 = true - ) { - const mock = _step3.value; - internalHasteMap.mocks.set(mock.name, mock.filePath); - } // Fetch duplicates. - } catch (err) { - _didIteratorError3 = true; - _iteratorError3 = err; - } finally { - try { - if (!_iteratorNormalCompletion3 && _iterator3.return != null) { - _iterator3.return(); - } - } finally { - if (_didIteratorError3) { - throw _iteratorError3; - } - } - } - - const duplicatesArr = db.prepare(`SELECT * FROM duplicates`).all(); - var _iteratorNormalCompletion4 = true; - var _didIteratorError4 = false; - var _iteratorError4 = undefined; - - try { - for ( - var _iterator4 = duplicatesArr[Symbol.iterator](), _step4; - !(_iteratorNormalCompletion4 = (_step4 = _iterator4.next()).done); - _iteratorNormalCompletion4 = true - ) { - const duplicate = _step4.value; - internalHasteMap.duplicates.set( - name, - _v().default.deserialize(new Buffer(duplicate.serialized)) - ); - } // Fetch clocks. - } catch (err) { - _didIteratorError4 = true; - _iteratorError4 = err; - } finally { - try { - if (!_iteratorNormalCompletion4 && _iterator4.return != null) { - _iterator4.return(); - } - } finally { - if (_didIteratorError4) { - throw _iteratorError4; - } - } - } - - const clocksArr = db.prepare(`SELECT * FROM clocks`).all(); - var _iteratorNormalCompletion5 = true; - var _didIteratorError5 = false; - var _iteratorError5 = undefined; - - try { - for ( - var _iterator5 = clocksArr[Symbol.iterator](), _step5; - !(_iteratorNormalCompletion5 = (_step5 = _iterator5.next()).done); - _iteratorNormalCompletion5 = true - ) { - const clock = _step5.value; - internalHasteMap.clocks.set(clock.relativeRoot, clock.since); - } // Close database connection, - } catch (err) { - _didIteratorError5 = true; - _iteratorError5 = err; - } finally { - try { - if (!_iteratorNormalCompletion5 && _iterator5.return != null) { - _iterator5.return(); - } - } finally { - if (_didIteratorError5) { - throw _iteratorError5; - } - } - } - - db.close(); - return internalHasteMap; - } - - write(cachePath, internalHasteMap, removedFiles, changedFiles) { - const db = this.getDatabase(cachePath, false); - db.transaction(() => { - // Incrementally update files. - const runFileStmt = (stmt, [filePath, file]) => { - stmt.run( - filePath, - file[_constants.default.ID], - file[_constants.default.MTIME], - file[_constants.default.SIZE], - file[_constants.default.VISITED], - file[_constants.default.DEPENDENCIES], - file[_constants.default.SHA1] - ); - }; - - if (changedFiles !== undefined) { - const removeFileStmt = db.prepare(`DELETE FROM files WHERE filePath=?`); - var _iteratorNormalCompletion6 = true; - var _didIteratorError6 = false; - var _iteratorError6 = undefined; - - try { - for ( - var _iterator6 = removedFiles.keys()[Symbol.iterator](), _step6; - !(_iteratorNormalCompletion6 = (_step6 = _iterator6.next()).done); - _iteratorNormalCompletion6 = true - ) { - const filePath = _step6.value; - removeFileStmt.run(filePath); - } - } catch (err) { - _didIteratorError6 = true; - _iteratorError6 = err; - } finally { - try { - if (!_iteratorNormalCompletion6 && _iterator6.return != null) { - _iterator6.return(); - } - } finally { - if (_didIteratorError6) { - throw _iteratorError6; - } - } - } - - const upsertFileStmt = db.prepare( - `INSERT OR REPLACE INTO files (filePath, id, mtime, size, visited, dependencies, sha1) VALUES (?, ?, ?, ?, ?, ?, ?)` - ); - var _iteratorNormalCompletion7 = true; - var _didIteratorError7 = false; - var _iteratorError7 = undefined; - - try { - for ( - var _iterator7 = changedFiles[Symbol.iterator](), _step7; - !(_iteratorNormalCompletion7 = (_step7 = _iterator7.next()).done); - _iteratorNormalCompletion7 = true - ) { - const changedFile = _step7.value; - runFileStmt(upsertFileStmt, changedFile); - } - } catch (err) { - _didIteratorError7 = true; - _iteratorError7 = err; - } finally { - try { - if (!_iteratorNormalCompletion7 && _iterator7.return != null) { - _iterator7.return(); - } - } finally { - if (_didIteratorError7) { - throw _iteratorError7; - } - } - } - } else { - db.exec('DELETE FROM files'); - const insertFileStmt = db.prepare( - `INSERT INTO files (filePath, id, mtime, size, visited, dependencies, sha1) VALUES (?, ?, ?, ?, ?, ?, ?)` - ); - var _iteratorNormalCompletion8 = true; - var _didIteratorError8 = false; - var _iteratorError8 = undefined; - - try { - for ( - var _iterator8 = internalHasteMap.files[Symbol.iterator](), _step8; - !(_iteratorNormalCompletion8 = (_step8 = _iterator8.next()).done); - _iteratorNormalCompletion8 = true - ) { - const file = _step8.value; - runFileStmt(insertFileStmt, file); - } - } catch (err) { - _didIteratorError8 = true; - _iteratorError8 = err; - } finally { - try { - if (!_iteratorNormalCompletion8 && _iterator8.return != null) { - _iterator8.return(); - } - } finally { - if (_didIteratorError8) { - throw _iteratorError8; - } - } - } - } // Incrementally update map. - - const runMapStmt = (stmt, [name, mapItem]) => { - stmt.run( - name, - mapItem[_constants.default.GENERIC_PLATFORM] || [null, null], - mapItem[_constants.default.NATIVE_PLATFORM] || [null, null], - mapItem[_constants.default.IOS_PLATFORM] || [null, null], - mapItem[_constants.default.ANDROID_PLATFORM] || [null, null] - ); - }; - - if (changedFiles !== undefined) { - const removeMapItemStmt = db.prepare(`DELETE FROM map WHERE name=?`); - var _iteratorNormalCompletion9 = true; - var _didIteratorError9 = false; - var _iteratorError9 = undefined; - - try { - for ( - var _iterator9 = removedFiles.values()[Symbol.iterator](), _step9; - !(_iteratorNormalCompletion9 = (_step9 = _iterator9.next()).done); - _iteratorNormalCompletion9 = true - ) { - const file = _step9.value; - removeMapItemStmt.run(file[_constants.default.ID]); - } - } catch (err) { - _didIteratorError9 = true; - _iteratorError9 = err; - } finally { - try { - if (!_iteratorNormalCompletion9 && _iterator9.return != null) { - _iterator9.return(); - } - } finally { - if (_didIteratorError9) { - throw _iteratorError9; - } - } - } - - const upsertFileStmt = db.prepare( - `INSERT OR REPLACE INTO map (name, genericPath, genericType, nativePath, nativeType) VALUES (?, ?, ?, ?, ?)` - ); - var _iteratorNormalCompletion10 = true; - var _didIteratorError10 = false; - var _iteratorError10 = undefined; - - try { - for ( - var _iterator10 = changedFiles.values()[Symbol.iterator](), _step10; - !(_iteratorNormalCompletion10 = (_step10 = _iterator10.next()) - .done); - _iteratorNormalCompletion10 = true - ) { - const changedFile = _step10.value; - - if (changedFile[_constants.default.MODULE]) { - const mapItem = internalHasteMap.map.get( - changedFile[_constants.default.MODULE] - ); - runMapStmt(upsertFileStmt, [ - changedFile[_constants.default.MODULE], - mapItem - ]); - } - } - } catch (err) { - _didIteratorError10 = true; - _iteratorError10 = err; - } finally { - try { - if (!_iteratorNormalCompletion10 && _iterator10.return != null) { - _iterator10.return(); - } - } finally { - if (_didIteratorError10) { - throw _iteratorError10; - } - } - } - } else { - db.exec('DELETE FROM map'); - const insertMapItem = db.prepare( - `INSERT INTO map (name, genericPath, genericType, nativePath, nativeType, iosPath, iosType, androidPath, androidType) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?)` - ); - var _iteratorNormalCompletion11 = true; - var _didIteratorError11 = false; - var _iteratorError11 = undefined; - - try { - for ( - var _iterator11 = internalHasteMap.map[Symbol.iterator](), _step11; - !(_iteratorNormalCompletion11 = (_step11 = _iterator11.next()) - .done); - _iteratorNormalCompletion11 = true - ) { - const mapItem = _step11.value; - runMapStmt(insertMapItem, mapItem); - } - } catch (err) { - _didIteratorError11 = true; - _iteratorError11 = err; - } finally { - try { - if (!_iteratorNormalCompletion11 && _iterator11.return != null) { - _iterator11.return(); - } - } finally { - if (_didIteratorError11) { - throw _iteratorError11; - } - } - } - } // Replace mocks. - - db.exec('DELETE FROM mocks'); - const insertMock = db.prepare( - `INSERT INTO mocks (name, filePath) VALUES (?, ?)` - ); - var _iteratorNormalCompletion12 = true; - var _didIteratorError12 = false; - var _iteratorError12 = undefined; - - try { - for ( - var _iterator12 = internalHasteMap.mocks[Symbol.iterator](), _step12; - !(_iteratorNormalCompletion12 = (_step12 = _iterator12.next()).done); - _iteratorNormalCompletion12 = true - ) { - const _step12$value = _slicedToArray(_step12.value, 2), - name = _step12$value[0], - filePath = _step12$value[1]; - - insertMock.run(name, filePath); - } // Incrementally update duplicates. - } catch (err) { - _didIteratorError12 = true; - _iteratorError12 = err; - } finally { - try { - if (!_iteratorNormalCompletion12 && _iterator12.return != null) { - _iterator12.return(); - } - } finally { - if (_didIteratorError12) { - throw _iteratorError12; - } - } - } - - if (changedFiles === undefined) { - const insertDuplicateStmt = db.prepare( - `INSERT INTO duplicates (name, serialized) VALUES (?, ?)` - ); - var _iteratorNormalCompletion13 = true; - var _didIteratorError13 = false; - var _iteratorError13 = undefined; - - try { - for ( - var _iterator13 = internalHasteMap.duplicates[Symbol.iterator](), - _step13; - !(_iteratorNormalCompletion13 = (_step13 = _iterator13.next()) - .done); - _iteratorNormalCompletion13 = true - ) { - const _step13$value = _slicedToArray(_step13.value, 2), - name = _step13$value[0], - duplicate = _step13$value[1]; - - insertDuplicateStmt.run(name, _v().default.serialize(duplicate)); - } - } catch (err) { - _didIteratorError13 = true; - _iteratorError13 = err; - } finally { - try { - if (!_iteratorNormalCompletion13 && _iterator13.return != null) { - _iterator13.return(); - } - } finally { - if (_didIteratorError13) { - throw _iteratorError13; - } - } - } - } else if (removedFiles.size) { - const upsertDuplicateStmt = db.prepare( - `INSERT OR REPLACE INTO duplicates (name, serialized) VALUES (?, ?)` - ); - const deleteDuplicateStmt = db.prepare( - `DELETE FROM duplicates WHERE name=?` - ); - var _iteratorNormalCompletion14 = true; - var _didIteratorError14 = false; - var _iteratorError14 = undefined; - - try { - for ( - var _iterator14 = removedFiles.values()[Symbol.iterator](), _step14; - !(_iteratorNormalCompletion14 = (_step14 = _iterator14.next()) - .done); - _iteratorNormalCompletion14 = true - ) { - const file = _step14.value; - const moduleID = file[_constants.default.ID]; - const duplicate = internalHasteMap.duplicates.get(moduleID); - - if (duplicate) { - upsertDuplicateStmt.run(name, _v().default.serialize(duplicate)); - } else { - deleteDuplicateStmt.run(name); - } - } - } catch (err) { - _didIteratorError14 = true; - _iteratorError14 = err; - } finally { - try { - if (!_iteratorNormalCompletion14 && _iterator14.return != null) { - _iterator14.return(); - } - } finally { - if (_didIteratorError14) { - throw _iteratorError14; - } - } - } - } // Replace clocks. - - db.exec('DELETE FROM clocks'); - const insertClock = db.prepare( - `INSERT INTO clocks (relativeRoot, since) VALUES (?, ?)` - ); - var _iteratorNormalCompletion15 = true; - var _didIteratorError15 = false; - var _iteratorError15 = undefined; - - try { - for ( - var _iterator15 = internalHasteMap.clocks[Symbol.iterator](), _step15; - !(_iteratorNormalCompletion15 = (_step15 = _iterator15.next()).done); - _iteratorNormalCompletion15 = true - ) { - const _step15$value = _slicedToArray(_step15.value, 2), - relativeRoot = _step15$value[0], - since = _step15$value[1]; - - insertClock.run(relativeRoot, since); - } - } catch (err) { - _didIteratorError15 = true; - _iteratorError15 = err; - } finally { - try { - if (!_iteratorNormalCompletion15 && _iterator15.return != null) { - _iterator15.return(); - } - } finally { - if (_didIteratorError15) { - throw _iteratorError15; - } - } - } - })(); - db.close(); - } - - getDatabase(cachePath, mustExist) { - const dbExists = _fs().default.existsSync(cachePath); - - if (dbExists === false && mustExist) { - throw new Error(`Haste SQLite DB does not exist at ${cachePath}`); - } - - const db = (0, _betterSqlite().default)(cachePath, { - fileMustExist: dbExists - }); - - if (dbExists === false) { - db.exec(`CREATE TABLE IF NOT EXISTS files( - filePath text PRIMARY KEY, - id text NOT NULL, - mtime integer NOT NULL, - size integer NOT NULL, - visited integer NOT NULL, - dependencies text NOT NULL, - sha1 text - );`); - db.exec(`CREATE TABLE IF NOT EXISTS map( - name text NOT NULL, - genericPath text, - genericType integer, - nativePath text, - nativeType integer, - iosPath text, - iosType integer, - androidPath text, - androidType integer - );`); - db.exec(`CREATE TABLE IF NOT EXISTS mocks( - name text PRIMARY KEY, - filePath text NOT NULL - );`); - db.exec(`CREATE TABLE IF NOT EXISTS duplicates( - name text PRIMARY KEY, - serialized text NOT NULL - );`); - db.exec(`CREATE TABLE IF NOT EXISTS clocks( - relativeRoot text, - since text - );`); - } - - return db; - } - - getType() { - return 'sqlite'; - } -} - -var _default = new SQLitePersistence(); - -exports.default = _default; diff --git a/node_modules/jest-haste-map/package.json b/node_modules/jest-haste-map/package.json index 049fafb52..379fe9fd3 100644 --- a/node_modules/jest-haste-map/package.json +++ b/node_modules/jest-haste-map/package.json @@ -1,55 +1,54 @@ { - "_args": [ - [ - "jest-haste-map@24.8.1", - "/Users/drew.heavner/Documents/Github/sign-android-release" - ] - ], - "_development": true, - "_from": "jest-haste-map@24.8.1", - "_id": "jest-haste-map@24.8.1", + "_from": "jest-haste-map@^24.9.0", + "_id": "jest-haste-map@24.9.0", "_inBundle": false, - "_integrity": "sha512-SwaxMGVdAZk3ernAx2Uv2sorA7jm3Kx+lR0grp6rMmnY06Kn/urtKx1LPN2mGTea4fCT38impYT28FfcLUhX0g==", + "_integrity": "sha512-kfVFmsuWui2Sj1Rp1AJ4D9HqJwE4uwTlS/vO+eRUaMmd54BFpli2XhMQnPC2k4cHFVbB2Q2C+jtI1AGLgEnCjQ==", "_location": "/jest-haste-map", - "_phantomChildren": {}, + "_phantomChildren": { + "@types/istanbul-lib-coverage": "2.0.1", + "@types/istanbul-reports": "1.1.1", + "@types/yargs-parser": "15.0.0" + }, "_requested": { - "type": "version", + "type": "range", "registry": true, - "raw": "jest-haste-map@24.8.1", + "raw": "jest-haste-map@^24.9.0", "name": "jest-haste-map", "escapedName": "jest-haste-map", - "rawSpec": "24.8.1", + "rawSpec": "^24.9.0", "saveSpec": null, - "fetchSpec": "24.8.1" + "fetchSpec": "^24.9.0" }, "_requiredBy": [ - "/@jest/core", "/@jest/reporters", "/@jest/test-sequencer", "/@jest/transform", "/jest-runner", "/jest-runtime" ], - "_resolved": "https://registry.npmjs.org/jest-haste-map/-/jest-haste-map-24.8.1.tgz", - "_spec": "24.8.1", - "_where": "/Users/drew.heavner/Documents/Github/sign-android-release", + "_resolved": "https://registry.npmjs.org/jest-haste-map/-/jest-haste-map-24.9.0.tgz", + "_shasum": "b38a5d64274934e21fa417ae9a9fbeb77ceaac7d", + "_spec": "jest-haste-map@^24.9.0", + "_where": "/Users/drew.heavner/Documents/Github/sign-android-release/node_modules/@jest/reporters", "bugs": { "url": "https://github.com/facebook/jest/issues" }, + "bundleDependencies": false, "dependencies": { - "@jest/types": "^24.8.0", + "@jest/types": "^24.9.0", "anymatch": "^2.0.0", "fb-watchman": "^2.0.0", "fsevents": "^1.2.7", "graceful-fs": "^4.1.15", "invariant": "^2.2.4", - "jest-serializer": "^24.4.0", - "jest-util": "^24.8.0", - "jest-worker": "^24.6.0", + "jest-serializer": "^24.9.0", + "jest-util": "^24.9.0", + "jest-worker": "^24.9.0", "micromatch": "^3.1.10", "sane": "^4.0.3", "walker": "^1.0.7" }, + "deprecated": false, "devDependencies": { "@types/anymatch": "^1.3.1", "@types/fb-watchman": "^2.0.0", @@ -62,7 +61,7 @@ "engines": { "node": ">= 6" }, - "gitHead": "845728f24b3ef41e450595c384e9b5c9fdf248a4", + "gitHead": "9ad0f4bc6b8bdd94989804226c28c9960d9da7d1", "homepage": "https://github.com/facebook/jest#readme", "license": "MIT", "main": "build/index.js", @@ -79,5 +78,5 @@ "directory": "packages/jest-haste-map" }, "types": "build/index.d.ts", - "version": "24.8.1" + "version": "24.9.0" } diff --git a/node_modules/jest-haste-map/tsconfig.json b/node_modules/jest-haste-map/tsconfig.json deleted file mode 100644 index 8290de687..000000000 --- a/node_modules/jest-haste-map/tsconfig.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "extends": "../../tsconfig.json", - "compilerOptions": { - "rootDir": "src", - "outDir": "build" - }, - "references": [ - {"path": "../jest-worker"}, - {"path": "../jest-serializer"}, - {"path": "../jest-util"}, - {"path": "../jest-types"} - ] -} diff --git a/node_modules/jest-jasmine2/LICENSE b/node_modules/jest-jasmine2/LICENSE deleted file mode 100644 index 10e779c44..000000000 --- a/node_modules/jest-jasmine2/LICENSE +++ /dev/null @@ -1,23 +0,0 @@ -MIT License - -For Jest software - -Copyright (c) 2014-present, Facebook, Inc. - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/node_modules/jest-jasmine2/build/assertionErrorMessage.d.ts.map b/node_modules/jest-jasmine2/build/assertionErrorMessage.d.ts.map index 55a4f3724..ec12be922 100644 --- a/node_modules/jest-jasmine2/build/assertionErrorMessage.d.ts.map +++ b/node_modules/jest-jasmine2/build/assertionErrorMessage.d.ts.map @@ -1 +1 @@ -{"version":3,"file":"assertionErrorMessage.d.ts","sourceRoot":"","sources":["../src/assertionErrorMessage.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAIL,WAAW,EACZ,MAAM,oBAAoB,CAAC;AAE5B,OAAO,EAAC,uBAAuB,EAAC,MAAM,SAAS,CAAC;AAqEhD,iBAAS,qBAAqB,CAC5B,KAAK,EAAE,uBAAuB,EAC9B,OAAO,EAAE,WAAW,UA4CrB;AAED,eAAe,qBAAqB,CAAC"} \ No newline at end of file +{"version":3,"file":"assertionErrorMessage.d.ts","sourceRoot":"","sources":["../src/assertionErrorMessage.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAIL,WAAW,EACZ,MAAM,oBAAoB,CAAC;AAE5B,OAAO,EAAC,uBAAuB,EAAC,MAAM,SAAS,CAAC;AA4EhD,iBAAS,qBAAqB,CAC5B,KAAK,EAAE,uBAAuB,EAC9B,OAAO,EAAE,WAAW,UAyCrB;AAMD,eAAe,qBAAqB,CAAC"} \ No newline at end of file diff --git a/node_modules/jest-jasmine2/build/assertionErrorMessage.js b/node_modules/jest-jasmine2/build/assertionErrorMessage.js index 57d4ecdfd..4dccf74b1 100644 --- a/node_modules/jest-jasmine2/build/assertionErrorMessage.js +++ b/node_modules/jest-jasmine2/build/assertionErrorMessage.js @@ -61,27 +61,30 @@ const operatorMessage = operator => { }; const assertThrowingMatcherHint = operatorName => - _chalk.default.dim('assert') + - _chalk.default.dim('.' + operatorName + '(') + - _chalk.default.red('function') + - _chalk.default.dim(')'); - -const assertMatcherHint = (operator, operatorName) => { - let message = - _chalk.default.dim('assert') + - _chalk.default.dim('.' + operatorName + '(') + - _chalk.default.red('received') + - _chalk.default.dim(', ') + - _chalk.default.green('expected') + - _chalk.default.dim(')'); - - if (operator === '==') { - message += - ' or ' + + operatorName + ? _chalk.default.dim('assert') + + _chalk.default.dim('.' + operatorName + '(') + + _chalk.default.red('function') + + _chalk.default.dim(')') + : ''; + +const assertMatcherHint = (operator, operatorName, expected) => { + let message = ''; + + if (operator === '==' && expected === true) { + message = _chalk.default.dim('assert') + _chalk.default.dim('(') + _chalk.default.red('received') + - _chalk.default.dim(') '); + _chalk.default.dim(')'); + } else if (operatorName) { + message = + _chalk.default.dim('assert') + + _chalk.default.dim('.' + operatorName + '(') + + _chalk.default.red('received') + + _chalk.default.dim(', ') + + _chalk.default.green('expected') + + _chalk.default.dim(')'); } return message; @@ -103,8 +106,7 @@ function assertionErrorMessage(error, options) { if (operatorName === 'doesNotThrow') { return ( - assertThrowingMatcherHint(operatorName) + - '\n\n' + + buildHintString(assertThrowingMatcherHint(operatorName)) + _chalk.default.reset(`Expected the function not to throw an error.\n`) + _chalk.default.reset(`Instead, it threw:\n`) + ` ${(0, _jestMatcherUtils.printReceived)(actual)}` + @@ -117,8 +119,7 @@ function assertionErrorMessage(error, options) { if (operatorName === 'throws') { return ( - assertThrowingMatcherHint(operatorName) + - '\n\n' + + buildHintString(assertThrowingMatcherHint(operatorName)) + _chalk.default.reset(`Expected the function to throw an error.\n`) + _chalk.default.reset(`But it didn't throw anything.`) + _chalk.default.reset( @@ -129,8 +130,7 @@ function assertionErrorMessage(error, options) { } return ( - assertMatcherHint(operator, operatorName) + - '\n\n' + + buildHintString(assertMatcherHint(operator, operatorName, expected)) + _chalk.default.reset(`Expected value ${operatorMessage(operator)}`) + ` ${(0, _jestMatcherUtils.printExpected)(expected)}\n` + _chalk.default.reset(`Received:\n`) + @@ -141,5 +141,9 @@ function assertionErrorMessage(error, options) { ); } +function buildHintString(hint) { + return hint ? hint + '\n\n' : ''; +} + var _default = assertionErrorMessage; exports.default = _default; diff --git a/node_modules/jest-jasmine2/build/errorOnPrivate.d.ts.map b/node_modules/jest-jasmine2/build/errorOnPrivate.d.ts.map index 6a8aec822..7b9974ce4 100644 --- a/node_modules/jest-jasmine2/build/errorOnPrivate.d.ts.map +++ b/node_modules/jest-jasmine2/build/errorOnPrivate.d.ts.map @@ -1 +1 @@ -{"version":3,"file":"errorOnPrivate.d.ts","sourceRoot":"","sources":["../src/errorOnPrivate.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAC,MAAM,EAAC,MAAM,aAAa,CAAC;AAkCnC,wBAAgB,qBAAqB,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,GAAG,IAAI,CAkCjE"} \ No newline at end of file +{"version":3,"file":"errorOnPrivate.d.ts","sourceRoot":"","sources":["../src/errorOnPrivate.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAC,MAAM,EAAC,MAAM,aAAa,CAAC;AAkCnC,wBAAgB,qBAAqB,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,GAAG,IAAI,CAmCjE"} \ No newline at end of file diff --git a/node_modules/jest-jasmine2/build/errorOnPrivate.js b/node_modules/jest-jasmine2/build/errorOnPrivate.js index 05607605b..5b7342517 100644 --- a/node_modules/jest-jasmine2/build/errorOnPrivate.js +++ b/node_modules/jest-jasmine2/build/errorOnPrivate.js @@ -39,6 +39,7 @@ function installErrorOnPrivate(global) { }; }); Object.keys(disabledJasmineMethods).forEach(methodName => { + // @ts-ignore jasmine[methodName] = () => { throwAtFunction(disabledJasmineMethods[methodName], jasmine[methodName]); }; diff --git a/node_modules/jest-jasmine2/build/index.d.ts.map b/node_modules/jest-jasmine2/build/index.d.ts.map index 60f521806..65c7c62ce 100644 --- a/node_modules/jest-jasmine2/build/index.d.ts.map +++ b/node_modules/jest-jasmine2/build/index.d.ts.map @@ -1 +1 @@ -{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,OAAO,EAAC,MAAM,EAAS,MAAM,aAAa,CAAC;AAC3C,OAAO,EAAkB,UAAU,EAAC,MAAM,mBAAmB,CAAC;AAC9D,OAAO,EAAC,eAAe,EAAC,MAAM,mBAAmB,CAAC;AAElD,OAAO,OAAO,MAAM,cAAc,CAAC;AAQnC,OAAO,EAAC,OAAO,IAAI,WAAW,EAAC,MAAM,SAAS,CAAC;AAI/C,iBAAe,QAAQ,CACrB,YAAY,EAAE,MAAM,CAAC,YAAY,EACjC,MAAM,EAAE,MAAM,CAAC,aAAa,EAC5B,WAAW,EAAE,eAAe,EAC5B,OAAO,EAAE,OAAO,EAChB,QAAQ,EAAE,MAAM,GACf,OAAO,CAAC,UAAU,CAAC,CA8IrB;AAmCD,kBAAU,QAAQ,CAAC;IACjB,KAAY,OAAO,GAAG,WAAW,CAAC;CACnC;AAED,SAAS,QAAQ,CAAC"} \ No newline at end of file +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,OAAO,EAAC,MAAM,EAAS,MAAM,aAAa,CAAC;AAC3C,OAAO,EAAkB,UAAU,EAAC,MAAM,mBAAmB,CAAC;AAC9D,OAAO,EAAC,eAAe,EAAC,MAAM,mBAAmB,CAAC;AAElD,OAAO,OAAO,MAAM,cAAc,CAAC;AAQnC,OAAO,EAAC,OAAO,IAAI,WAAW,EAAC,MAAM,SAAS,CAAC;AAI/C,iBAAe,QAAQ,CACrB,YAAY,EAAE,MAAM,CAAC,YAAY,EACjC,MAAM,EAAE,MAAM,CAAC,aAAa,EAC5B,WAAW,EAAE,eAAe,EAC5B,OAAO,EAAE,OAAO,EAChB,QAAQ,EAAE,MAAM,GACf,OAAO,CAAC,UAAU,CAAC,CA+IrB;AAmCD,kBAAU,QAAQ,CAAC;IACjB,KAAY,OAAO,GAAG,WAAW,CAAC;CACnC;AAED,SAAS,QAAQ,CAAC"} \ No newline at end of file diff --git a/node_modules/jest-jasmine2/build/index.js b/node_modules/jest-jasmine2/build/index.js index 25b8a42ca..188b70e1e 100644 --- a/node_modules/jest-jasmine2/build/index.js +++ b/node_modules/jest-jasmine2/build/index.js @@ -72,7 +72,8 @@ function _jasmine() { const jasmineFactory = runtime.requireInternalModule(JASMINE); const jasmine = jasmineFactory.create({ process, - testPath + testPath, + testTimeout: globalConfig.testTimeout }); const env = jasmine.getEnv(); const jasmineInterface = jasmineFactory.interface(jasmine, env); diff --git a/node_modules/jest-jasmine2/build/jasmine/Env.d.ts b/node_modules/jest-jasmine2/build/jasmine/Env.d.ts index 8222b9f9c..cb74acb5c 100644 --- a/node_modules/jest-jasmine2/build/jasmine/Env.d.ts +++ b/node_modules/jest-jasmine2/build/jasmine/Env.d.ts @@ -25,9 +25,7 @@ export default function (j$: Jasmine): { seed: (value: unknown) => unknown; execute: (runnablesToRun: string[], suiteTree?: Suite | undefined) => Promise; fdescribe: (description: string, specDefinitions: Function) => Suite; - spyOn: (obj: { - [key: string]: any; - }, methodName: string, accessType?: "configurable" | "enumerable" | "value" | "writable" | "get" | "set" | undefined) => Spy; + spyOn: (obj: Record, methodName: string, accessType?: "configurable" | "enumerable" | "value" | "writable" | "get" | "set" | undefined) => Spy; beforeEach: (beforeEachFunction: (done: (error?: any) => void) => void, timeout?: number | undefined) => void; afterEach: (afterEachFunction: (done: (error?: any) => void) => void, timeout?: number | undefined) => void; clearReporters: () => void; diff --git a/node_modules/jest-jasmine2/build/jasmine/Env.d.ts.map b/node_modules/jest-jasmine2/build/jasmine/Env.d.ts.map index 64c727a49..c052577f9 100644 --- a/node_modules/jest-jasmine2/build/jasmine/Env.d.ts.map +++ b/node_modules/jest-jasmine2/build/jasmine/Env.d.ts.map @@ -1 +1 @@ -{"version":3,"file":"Env.d.ts","sourceRoot":"","sources":["../../src/jasmine/Env.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAqCH,OAAO,EAAC,OAAO,EAAE,uBAAuB,EAAE,QAAQ,EAAE,GAAG,EAAC,MAAM,UAAU,CAAC;AACzE,OAAO,IAAkB,MAAM,QAAQ,CAAC;AACxC,OAAO,KAAK,MAAM,SAAS,CAAC;AAE5B,MAAM,CAAC,OAAO,WAAU,EAAE,EAAE,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA0oBlC"} \ No newline at end of file +{"version":3,"file":"Env.d.ts","sourceRoot":"","sources":["../../src/jasmine/Env.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAqCH,OAAO,EAAC,OAAO,EAAE,uBAAuB,EAAE,QAAQ,EAAE,GAAG,EAAC,MAAM,UAAU,CAAC;AACzE,OAAO,IAAkB,MAAM,QAAQ,CAAC;AACxC,OAAO,KAAK,MAAM,SAAS,CAAC;AAE5B,MAAM,CAAC,OAAO,WAAU,EAAE,EAAE,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA6oBlC"} \ No newline at end of file diff --git a/node_modules/jest-jasmine2/build/jasmine/Env.js b/node_modules/jest-jasmine2/build/jasmine/Env.js index d0493a547..c66688b02 100644 --- a/node_modules/jest-jasmine2/build/jasmine/Env.js +++ b/node_modules/jest-jasmine2/build/jasmine/Env.js @@ -760,7 +760,10 @@ function _default(j$) { let checkIsError; let message; - if (error instanceof _assert.AssertionError) { + if ( + error instanceof _assert.AssertionError || + (error && error.name === _assert.AssertionError.name) + ) { checkIsError = false; // @ts-ignore TODO Possible error: j$.Spec does not have expand property message = (0, _assertionErrorMessage.default)(error, { diff --git a/node_modules/jest-jasmine2/build/jasmine/JsApiReporter.d.ts b/node_modules/jest-jasmine2/build/jasmine/JsApiReporter.d.ts index f22851895..5f83b0a7c 100644 --- a/node_modules/jest-jasmine2/build/jasmine/JsApiReporter.d.ts +++ b/node_modules/jest-jasmine2/build/jasmine/JsApiReporter.d.ts @@ -20,9 +20,7 @@ export default class JsApiReporter implements Reporter { suiteStarted: (result: SuiteResult) => void; suiteDone: (result: SuiteResult) => void; suiteResults: (index: number, length: number) => Array; - suites: () => { - [key: string]: SuiteResult; - }; + suites: () => Record; specResults: (index: number, length: number) => Array; specDone: (result: SpecResult) => void; specs: () => Array; diff --git a/node_modules/jest-jasmine2/build/jasmine/JsApiReporter.d.ts.map b/node_modules/jest-jasmine2/build/jasmine/JsApiReporter.d.ts.map index b054d49e9..819787081 100644 --- a/node_modules/jest-jasmine2/build/jasmine/JsApiReporter.d.ts.map +++ b/node_modules/jest-jasmine2/build/jasmine/JsApiReporter.d.ts.map @@ -1 +1 @@ -{"version":3,"file":"JsApiReporter.d.ts","sourceRoot":"","sources":["../../src/jasmine/JsApiReporter.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAyBH,OAAO,EAAC,QAAQ,EAAE,UAAU,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_modules/jest-jasmine2/build/jasmine/Spec.d.ts b/node_modules/jest-jasmine2/build/jasmine/Spec.d.ts index 1c1ddf394..19f89606b 100644 --- a/node_modules/jest-jasmine2/build/jasmine/Spec.d.ts +++ b/node_modules/jest-jasmine2/build/jasmine/Spec.d.ts @@ -77,5 +77,6 @@ export default class Spec { status(enabled?: boolean): "disabled" | "pending" | "failed" | "passed" | "todo"; isExecutable(): boolean; getFullName(): string; + isAssertionError(error: Error): boolean; } //# sourceMappingURL=Spec.d.ts.map \ No newline at end of file diff --git a/node_modules/jest-jasmine2/build/jasmine/Spec.d.ts.map b/node_modules/jest-jasmine2/build/jasmine/Spec.d.ts.map index 4106ad8f8..8f2f3168c 100644 --- a/node_modules/jest-jasmine2/build/jasmine/Spec.d.ts.map +++ b/node_modules/jest-jasmine2/build/jasmine/Spec.d.ts.map @@ -1 +1 @@ -{"version":3,"file":"Spec.d.ts","sourceRoot":"","sources":["../../src/jasmine/Spec.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AA2BH,OAAO,EAAC,MAAM,EAAC,MAAM,aAAa,CAAC;AACnC,OAAO,EAAC,eAAe,EAAE,YAAY,EAAE,MAAM,EAAC,MAAM,mBAAmB,CAAC;AAExE,OAAO,iBAAiB,MAAM,sBAAsB,CAAC;AACrD,OAAO,wBAAwB,EAAE,EAC/B,OAAO,IAAI,+BAA+B,EAC3C,MAAM,6BAA6B,CAAC;AAErC,OAAO,WAAW,EAAE,EAAC,WAAW,EAAC,MAAM,gBAAgB,CAAC;AACxD,OAAO,EAAC,uBAAuB,EAAC,MAAM,UAAU,CAAC;AAEjD,oBAAY,UAAU,GAAG;IACvB,EAAE,EAAE,MAAM,CAAC;IACX,cAAc,EAAE,CAAC,MAAM,EAAE,IAAI,CAAC,QAAQ,CAAC,KAAK,IAAI,CAAC;IACjD,WAAW,EAAE,MAAM,CAAC;IACpB,yBAAyB,EAAE,OAAO,CAAC;IACnC,WAAW,EAAE,MAAM,MAAM,CAAC,IAAI,CAAC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,CAAC,KAAK,EAAE,iBAAiB,GAAG,uBAAuB;IAyB9D,OAAO;IAIP,IAAI,CAAC,OAAO,CAAC,EAAE,MAAM;IAOrB,IAAI;IAIJ,SAAS;IAKT,MAAM,CAAC,OAAO,CAAC,EAAE,OAAO;IAoBxB,YAAY;IAIZ,WAAW;IAIX,gBAAgB,CAAC,KAAK,EAAE,KAAK;CAM9B"} \ No newline at end of file diff --git a/node_modules/jest-jasmine2/build/jasmine/Spec.js b/node_modules/jest-jasmine2/build/jasmine/Spec.js index f548bd316..ba489663a 100644 --- a/node_modules/jest-jasmine2/build/jasmine/Spec.js +++ b/node_modules/jest-jasmine2/build/jasmine/Spec.js @@ -214,12 +214,11 @@ class Spec { passed: false, expected: '', actual: '', - error: - error instanceof _assert.AssertionError - ? (0, _assertionErrorMessage.default)(error, { - expand: this.expand - }) - : error + error: this.isAssertionError(error) + ? (0, _assertionErrorMessage.default)(error, { + expand: this.expand + }) + : error }, true ); @@ -273,6 +272,13 @@ class Spec { getFullName() { return this.getSpecName(this); } + + isAssertionError(error) { + return ( + error instanceof _assert.AssertionError || + (error && error.name === _assert.AssertionError.name) + ); + } } exports.default = Spec; diff --git a/node_modules/jest-jasmine2/build/jasmine/createSpy.d.ts b/node_modules/jest-jasmine2/build/jasmine/createSpy.d.ts index e5714baff..ebb6e8eb0 100644 --- a/node_modules/jest-jasmine2/build/jasmine/createSpy.d.ts +++ b/node_modules/jest-jasmine2/build/jasmine/createSpy.d.ts @@ -6,9 +6,8 @@ * */ import { Spy } from '../types'; -interface Fn { +interface Fn extends Record { (): any; - [key: string]: any; } declare function createSpy(name: string, originalFn: Fn): Spy; export default createSpy; diff --git a/node_modules/jest-jasmine2/build/jasmine/createSpy.d.ts.map b/node_modules/jest-jasmine2/build/jasmine/createSpy.d.ts.map index 4c9d0bf7c..a5d046670 100644 --- a/node_modules/jest-jasmine2/build/jasmine/createSpy.d.ts.map +++ b/node_modules/jest-jasmine2/build/jasmine/createSpy.d.ts.map @@ -1 +1 @@ -{"version":3,"file":"createSpy.d.ts","sourceRoot":"","sources":["../../src/jasmine/createSpy.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AA0BH,OAAO,EAAC,GAAG,EAAC,MAAM,UAAU,CAAC;AAI7B,UAAU,EAAE;IACV,IAAI,GAAG,CAAC;IACR,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAC;CACpB;AAED,iBAAS,SAAS,CAAC,IAAI,EAAE,MAAM,EAAE,UAAU,EAAE,EAAE,GAAG,GAAG,CAqCpD;AAED,eAAe,SAAS,CAAC"} \ No newline at end of file +{"version":3,"file":"createSpy.d.ts","sourceRoot":"","sources":["../../src/jasmine/createSpy.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AA0BH,OAAO,EAAC,GAAG,EAAC,MAAM,UAAU,CAAC;AAI7B,UAAU,EAAG,SAAQ,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC;IACtC,IAAI,GAAG,CAAC;CACT;AAED,iBAAS,SAAS,CAAC,IAAI,EAAE,MAAM,EAAE,UAAU,EAAE,EAAE,GAAG,GAAG,CAqCpD;AAED,eAAe,SAAS,CAAC"} \ No newline at end of file diff --git a/node_modules/jest-jasmine2/build/jasmine/jasmineLight.js b/node_modules/jest-jasmine2/build/jasmine/jasmineLight.js index 371d611fb..4ae1907cb 100644 --- a/node_modules/jest-jasmine2/build/jasmine/jasmineLight.js +++ b/node_modules/jest-jasmine2/build/jasmine/jasmineLight.js @@ -55,7 +55,7 @@ function _defineProperty(obj, key, value) { const create = function create(createOptions) { const j$ = _objectSpread({}, createOptions); - j$._DEFAULT_TIMEOUT_INTERVAL = 5000; + j$._DEFAULT_TIMEOUT_INTERVAL = createOptions.testTimeout || 5000; j$.getEnv = function(options) { const env = (j$.currentEnv_ = j$.currentEnv_ || new j$.Env(options)); //jasmine. singletons in here (setTimeout blah blah). diff --git a/node_modules/jest-jasmine2/build/jasmine/spyRegistry.d.ts b/node_modules/jest-jasmine2/build/jasmine/spyRegistry.d.ts index b1889ccfb..db3c9e315 100644 --- a/node_modules/jest-jasmine2/build/jasmine/spyRegistry.d.ts +++ b/node_modules/jest-jasmine2/build/jasmine/spyRegistry.d.ts @@ -8,9 +8,7 @@ import { Spy } from '../types'; export default class SpyRegistry { allowRespy: (allow: unknown) => void; - spyOn: (obj: { - [key: string]: any; - }, methodName: string, accessType?: keyof PropertyDescriptor) => Spy; + spyOn: (obj: Record, methodName: string, accessType?: keyof PropertyDescriptor) => Spy; clearSpies: () => void; respy: unknown; private _spyOnProperty; diff --git a/node_modules/jest-jasmine2/build/jasmine/spyRegistry.d.ts.map b/node_modules/jest-jasmine2/build/jasmine/spyRegistry.d.ts.map index cb1189da6..56e30986c 100644 --- a/node_modules/jest-jasmine2/build/jasmine/spyRegistry.d.ts.map +++ b/node_modules/jest-jasmine2/build/jasmine/spyRegistry.d.ts.map @@ -1 +1 @@ -{"version":3,"file":"spyRegistry.d.ts","sourceRoot":"","sources":["../../src/jasmine/spyRegistry.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAyBH,OAAO,EAAC,GAAG,EAAC,MAAM,UAAU,CAAC;AAsB7B,MAAM,CAAC,OAAO,OAAO,WAAW;IAC9B,UAAU,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,IAAI,CAAC;IACrC,KAAK,EAAE,CACL,GAAG,EAAE;QAAC,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAA;KAAC,EACzB,UAAU,EAAE,MAAM,EAClB,UAAU,CAAC,EAAE,MAAM,kBAAkB,KAClC,GAAG,CAAC;IACT,UAAU,EAAE,MAAM,IAAI,CAAC;IACvB,KAAK,EAAE,OAAO,CAAC;IAEf,OAAO,CAAC,cAAc,CAIb;gBAEG,EACV,YAAuB,GACxB,GAAE;QACD,YAAY,CAAC,EAAE,MAAM,KAAK,CAAC,GAAG,CAAC,CAAC;KAC5B;CAgKP"} \ No newline at end of file +{"version":3,"file":"spyRegistry.d.ts","sourceRoot":"","sources":["../../src/jasmine/spyRegistry.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAyBH,OAAO,EAAC,GAAG,EAAC,MAAM,UAAU,CAAC;AAsB7B,MAAM,CAAC,OAAO,OAAO,WAAW;IAC9B,UAAU,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,IAAI,CAAC;IACrC,KAAK,EAAE,CACL,GAAG,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EACxB,UAAU,EAAE,MAAM,EAClB,UAAU,CAAC,EAAE,MAAM,kBAAkB,KAClC,GAAG,CAAC;IACT,UAAU,EAAE,MAAM,IAAI,CAAC;IACvB,KAAK,EAAE,OAAO,CAAC;IAEf,OAAO,CAAC,cAAc,CAIb;gBAEG,EACV,YAAuB,GACxB,GAAE;QACD,YAAY,CAAC,EAAE,MAAM,KAAK,CAAC,GAAG,CAAC,CAAC;KAC5B;CAgKP"} \ No newline at end of file diff --git a/node_modules/jest-jasmine2/build/jestExpect.d.ts.map b/node_modules/jest-jasmine2/build/jestExpect.d.ts.map index df77bb791..9cfd01cbb 100644 --- a/node_modules/jest-jasmine2/build/jestExpect.d.ts.map +++ b/node_modules/jest-jasmine2/build/jestExpect.d.ts.map @@ -1 +1 @@ -{"version":3,"file":"jestExpect.d.ts","sourceRoot":"","sources":["../src/jestExpect.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;;;;AAoBH,wBA+CE"} \ No newline at end of file +{"version":3,"file":"jestExpect.d.ts","sourceRoot":"","sources":["../src/jestExpect.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;;;;AAuBH,wBA+CE"} \ No newline at end of file diff --git a/node_modules/jest-jasmine2/build/reporter.d.ts.map b/node_modules/jest-jasmine2/build/reporter.d.ts.map index 1ef8882f5..a607d104a 100644 --- a/node_modules/jest-jasmine2/build/reporter.d.ts.map +++ b/node_modules/jest-jasmine2/build/reporter.d.ts.map @@ -1 +1 @@ -{"version":3,"file":"reporter.d.ts","sourceRoot":"","sources":["../src/reporter.ts"],"names":[],"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ACnC,OAAO,EAAkB,UAAU,EAAC,MAAM,mBAAmB,CAAC;AAE9D,OAAO,EAAC,UAAU,EAAC,MAAM,gBAAgB,CAAC;AAC1C,OAAO,EAAC,WAAW,EAAC,MAAM,iBAAiB,CAAC;AAC5C,OAAO,EAAC,QAAQ,EAAE,UAAU,EAAC,MAAM,SAAS,CAAC;AAI7C,MAAM,CAAC,OAAO,OAAO,gBAAiB,YAAW,QAAQ;IACvD,OAAO,CAAC,YAAY,CAAyB;IAC7C,OAAO,CAAC,aAAa,CAAsB;IAC3C,OAAO,CAAC,OAAO,CAAuB;IACtC,OAAO,CAAC,cAAc,CAAgB;IACtC,OAAO,CAAC,QAAQ,CAAM;IACtB,OAAO,CAAC,eAAe,CAAsB;IAC7C,OAAO,CAAC,WAAW,CAA4B;IAC/C,OAAO,CAAC,SAAS,CAAc;gBAG7B,YAAY,EAAE,MAAM,CAAC,YAAY,EACjC,MAAM,EAAE,MAAM,CAAC,aAAa,EAC5B,QAAQ,EAAE,MAAM,CAAC,IAAI;IAYvB,cAAc,CAAC,WAAW,EAAE,UAAU;IAEtC,WAAW,CAAC,IAAI,EAAE,UAAU;IAI5B,QAAQ,CAAC,MAAM,EAAE,UAAU,GAAG,IAAI;IAMlC,YAAY,CAAC,KAAK,EAAE,WAAW,GAAG,IAAI;IAItC,SAAS,CAAC,OAAO,EAAE,WAAW,GAAG,IAAI;IAIrC,WAAW,CAAC,WAAW,EAAE,UAAU,GAAG,IAAI;IAiD1C,UAAU,IAAI,OAAO,CAAC,UAAU,CAAC;IAIjC,OAAO,CAAC,yBAAyB;IAWjC,OAAO,CAAC,mBAAmB;CAmC5B"} \ No newline at end of file diff --git a/node_modules/jest-jasmine2/build/reporter.js b/node_modules/jest-jasmine2/build/reporter.js index 01c5c53d8..1177343d3 100644 --- a/node_modules/jest-jasmine2/build/reporter.js +++ b/node_modules/jest-jasmine2/build/reporter.js @@ -130,14 +130,9 @@ class Jasmine2Reporter { _addMissingMessageToStack(stack, message) { // Some errors (e.g. Angular injection error) don't prepend error.message // to stack, instead the first line of the stack is just plain 'Error' - const ERROR_REGEX = /^Error\s*\n/; - - if ( - stack && - message && - ERROR_REGEX.test(stack) && - stack.indexOf(message) === -1 - ) { + const ERROR_REGEX = /^Error:?\s*\n/; + + if (stack && message && !stack.includes(message)) { return message + stack.replace(ERROR_REGEX, '\n'); } diff --git a/node_modules/jest-jasmine2/build/setup_jest_globals.d.ts b/node_modules/jest-jasmine2/build/setup_jest_globals.d.ts index a0836dd36..85a87f98c 100644 --- a/node_modules/jest-jasmine2/build/setup_jest_globals.d.ts +++ b/node_modules/jest-jasmine2/build/setup_jest_globals.d.ts @@ -12,6 +12,6 @@ export declare type SetupOptions = { localRequire: (moduleName: string) => Plugin; testPath: Config.Path; }; -declare const _default: ({ config, globalConfig, localRequire, testPath, }: SetupOptions) => import("../../jest-snapshot/build/State").default; +declare const _default: ({ config, globalConfig, localRequire, testPath, }: SetupOptions) => import("jest-snapshot/build/State").default; export default _default; //# sourceMappingURL=setup_jest_globals.d.ts.map \ No newline at end of file diff --git a/node_modules/jest-jasmine2/build/setup_jest_globals.d.ts.map b/node_modules/jest-jasmine2/build/setup_jest_globals.d.ts.map index 316890202..3fba2da16 100644 --- a/node_modules/jest-jasmine2/build/setup_jest_globals.d.ts.map +++ b/node_modules/jest-jasmine2/build/setup_jest_globals.d.ts.map @@ -1 +1 @@ -{"version":3,"file":"setup_jest_globals.d.ts","sourceRoot":"","sources":["../src/setup_jest_globals.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAC,MAAM,EAAC,MAAM,aAAa,CAAC;AACnC,OAAO,EAAC,MAAM,EAAC,MAAM,eAAe,CAAC;AAUrC,oBAAY,YAAY,GAAG;IACzB,MAAM,EAAE,MAAM,CAAC,aAAa,CAAC;IAC7B,YAAY,EAAE,MAAM,CAAC,YAAY,CAAC;IAClC,YAAY,EAAE,CAAC,UAAU,EAAE,MAAM,KAAK,MAAM,CAAC;IAC7C,QAAQ,EAAE,MAAM,CAAC,IAAI,CAAC;CACvB,CAAC;;AA6DF,wBA6BE"} \ No newline at end of file +{"version":3,"file":"setup_jest_globals.d.ts","sourceRoot":"","sources":["../src/setup_jest_globals.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAC,MAAM,EAAS,MAAM,aAAa,CAAC;AAC3C,OAAO,EAAC,MAAM,EAAC,MAAM,eAAe,CAAC;AAYrC,oBAAY,YAAY,GAAG;IACzB,MAAM,EAAE,MAAM,CAAC,aAAa,CAAC;IAC7B,YAAY,EAAE,MAAM,CAAC,YAAY,CAAC;IAClC,YAAY,EAAE,CAAC,UAAU,EAAE,MAAM,KAAK,MAAM,CAAC;IAC7C,QAAQ,EAAE,MAAM,CAAC,IAAI,CAAC;CACvB,CAAC;;AA6DF,wBA6BE"} \ No newline at end of file diff --git a/node_modules/jest-jasmine2/build/types.d.ts b/node_modules/jest-jasmine2/build/types.d.ts index 36e3c015f..5d0ea5a97 100644 --- a/node_modules/jest-jasmine2/build/types.d.ts +++ b/node_modules/jest-jasmine2/build/types.d.ts @@ -41,13 +41,10 @@ export declare type Reporter = { suiteStarted: (result: SuiteResult) => void; }; export interface Spy extends Record { - (this: { - [key: string]: any; - }, ...args: Array): unknown; + (this: Record, ...args: Array): unknown; and: SpyStrategy; calls: CallTracker; restoreObjectToOriginalState?: () => void; - [key: string]: any; } export declare type Jasmine = { _DEFAULT_TIMEOUT_INTERVAL: number; diff --git a/node_modules/jest-jasmine2/build/types.d.ts.map b/node_modules/jest-jasmine2/build/types.d.ts.map index a3ee4a29e..099418a84 100644 --- a/node_modules/jest-jasmine2/build/types.d.ts.map +++ b/node_modules/jest-jasmine2/build/types.d.ts.map @@ -1 +1 @@ -{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;;AAEH,OAAO,EAAC,cAAc,EAAC,MAAM,QAAQ,CAAC;AACtC,OAAO,EAAC,MAAM,EAAC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S,CAAC;IAC5B,GAAG,EAAE,UAAU,CAAC,OAAO,GAAG,CAAC,CAAC;IAC5B,aAAa,EAAE,OAAO,aAAa,CAAC;IACpC,gBAAgB,EAAE,OAAO,gBAAgB,CAAC;IAC1C,IAAI,EAAE,OAAO,IAAI,CAAC;IAClB,WAAW,EAAE,OAAO,WAAW,CAAC;IAChC,KAAK,EAAE,OAAO,KAAK,CAAC;IACpB,KAAK,EAAE,OAAO,KAAK,CAAC;IACpB,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,MAAM,CAAC,IAAI,CAAC;IACtB,WAAW,EAAE,QAAQ,CAAC;CACvB,GAAG,OAAO,MAAM,GACf,MAAM,CAAC,MAAM,CAAC;AAEhB,OAAO,CAAC,MAAM,CAAC;IACb,OAAO,MAAM,CAAC;QACZ,UAAU,MAAM;YACd,MAAM,EAAE,OAAO,MAAM,CAAC;SACvB;KACF;CACF"} \ No newline at end of file diff --git a/node_modules/jest-jasmine2/package.json b/node_modules/jest-jasmine2/package.json index 33330317e..bad6fe7ee 100644 --- a/node_modules/jest-jasmine2/package.json +++ b/node_modules/jest-jasmine2/package.json @@ -1,62 +1,75 @@ { - "_args": [ - [ - "jest-jasmine2@24.8.0", - "/Users/drew.heavner/Documents/Github/sign-android-release" - ] - ], - "_development": true, - "_from": "jest-jasmine2@24.8.0", - "_id": "jest-jasmine2@24.8.0", + "_from": "jest-jasmine2@^24.9.0", + "_id": "jest-jasmine2@24.9.0", "_inBundle": false, - "_integrity": "sha512-cEky88npEE5LKd5jPpTdDCLvKkdyklnaRycBXL6GNmpxe41F0WN44+i7lpQKa/hcbXaQ+rc9RMaM4dsebrYong==", + "_integrity": "sha512-Cq7vkAgaYKp+PsX+2/JbTarrk0DmNhsEtqBXNwUHkdlbrTBLtMJINADf2mf5FkowNsq8evbPc07/qFO0AdKTzw==", "_location": "/jest-jasmine2", - "_phantomChildren": {}, + "_phantomChildren": { + "@babel/code-frame": "7.5.5", + "@types/istanbul-lib-coverage": "2.0.1", + "@types/istanbul-reports": "1.1.1", + "@types/stack-utils": "1.0.1", + "@types/yargs-parser": "15.0.0", + "ansi-regex": "4.1.0", + "ansi-styles": "3.2.1", + "callsites": "3.1.0", + "chalk": "2.4.2", + "graceful-fs": "4.2.0", + "micromatch": "3.1.10", + "react-is": "16.8.6", + "slash": "2.0.0", + "source-map": "0.6.1", + "stack-utils": "1.0.2" + }, "_requested": { - "type": "version", + "type": "range", "registry": true, - "raw": "jest-jasmine2@24.8.0", + "raw": "jest-jasmine2@^24.9.0", "name": "jest-jasmine2", "escapedName": "jest-jasmine2", - "rawSpec": "24.8.0", + "rawSpec": "^24.9.0", "saveSpec": null, - "fetchSpec": "24.8.0" + "fetchSpec": "^24.9.0" }, "_requiredBy": [ "/jest-config", - "/jest-runner" + "/jest-runner", + "/jest/jest-cli/jest-config" ], - "_resolved": "https://registry.npmjs.org/jest-jasmine2/-/jest-jasmine2-24.8.0.tgz", - "_spec": "24.8.0", - "_where": "/Users/drew.heavner/Documents/Github/sign-android-release", + "_resolved": "https://registry.npmjs.org/jest-jasmine2/-/jest-jasmine2-24.9.0.tgz", + "_shasum": "1f7b1bd3242c1774e62acabb3646d96afc3be6a0", + "_spec": "jest-jasmine2@^24.9.0", + "_where": "/Users/drew.heavner/Documents/Github/sign-android-release/node_modules/jest-config", "bugs": { "url": "https://github.com/facebook/jest/issues" }, + "bundleDependencies": false, "dependencies": { "@babel/traverse": "^7.1.0", - "@jest/environment": "^24.8.0", - "@jest/test-result": "^24.8.0", - "@jest/types": "^24.8.0", + "@jest/environment": "^24.9.0", + "@jest/test-result": "^24.9.0", + "@jest/types": "^24.9.0", "chalk": "^2.0.1", "co": "^4.6.0", - "expect": "^24.8.0", + "expect": "^24.9.0", "is-generator-fn": "^2.0.0", - "jest-each": "^24.8.0", - "jest-matcher-utils": "^24.8.0", - "jest-message-util": "^24.8.0", - "jest-runtime": "^24.8.0", - "jest-snapshot": "^24.8.0", - "jest-util": "^24.8.0", - "pretty-format": "^24.8.0", + "jest-each": "^24.9.0", + "jest-matcher-utils": "^24.9.0", + "jest-message-util": "^24.9.0", + "jest-runtime": "^24.9.0", + "jest-snapshot": "^24.9.0", + "jest-util": "^24.9.0", + "pretty-format": "^24.9.0", "throat": "^4.0.0" }, + "deprecated": false, "devDependencies": { "@types/babel__traverse": "^7.0.4" }, "engines": { "node": ">= 6" }, - "gitHead": "845728f24b3ef41e450595c384e9b5c9fdf248a4", + "gitHead": "9ad0f4bc6b8bdd94989804226c28c9960d9da7d1", "homepage": "https://github.com/facebook/jest#readme", "license": "MIT", "main": "build/index.js", @@ -70,5 +83,5 @@ "directory": "packages/jest-jasmine2" }, "types": "build/index.d.ts", - "version": "24.8.0" + "version": "24.9.0" } diff --git a/node_modules/jest-jasmine2/tsconfig.json b/node_modules/jest-jasmine2/tsconfig.json deleted file mode 100644 index 9cad84ed0..000000000 --- a/node_modules/jest-jasmine2/tsconfig.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "extends": "../../tsconfig", - "compilerOptions": { - "rootDir": "src", - "outDir": "build" - }, - "references": [ - {"path": "../expect"}, - {"path": "../jest-each"}, - {"path": "../jest-environment"}, - {"path": "../jest-matcher-utils"}, - {"path": "../jest-message-util"}, - {"path": "../jest-runtime"}, - {"path": "../jest-snapshot"}, - {"path": "../jest-test-result"}, - {"path": "../jest-types"}, - {"path": "../jest-util"}, - {"path": "../pretty-format"} - ] -} diff --git a/node_modules/jest-leak-detector/LICENSE b/node_modules/jest-leak-detector/LICENSE index 10e779c44..b96dcb048 100644 --- a/node_modules/jest-leak-detector/LICENSE +++ b/node_modules/jest-leak-detector/LICENSE @@ -1,8 +1,6 @@ MIT License -For Jest software - -Copyright (c) 2014-present, Facebook, Inc. +Copyright (c) Facebook, Inc. and its affiliates. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/node_modules/jest-leak-detector/README.md b/node_modules/jest-leak-detector/README.md index 29a2c6923..6f14d8699 100644 --- a/node_modules/jest-leak-detector/README.md +++ b/node_modules/jest-leak-detector/README.md @@ -12,11 +12,11 @@ let reference = {}; const detector = new LeakDetector(reference); // Reference is held in memory. -console.log(detector.isLeaked()); // true +console.log(detector.isLeaking()); // true // We destroy the only reference to the object. reference = null; // Reference is gone. -console.log(detector.isLeaked()); // false +console.log(detector.isLeaking()); // false ``` diff --git a/node_modules/jest-leak-detector/build/index.d.ts b/node_modules/jest-leak-detector/build/index.d.ts index 09b0ff81a..7439bdd9f 100644 --- a/node_modules/jest-leak-detector/build/index.d.ts +++ b/node_modules/jest-leak-detector/build/index.d.ts @@ -9,6 +9,5 @@ export default class { constructor(value: unknown); isLeaking(): boolean; private _runGarbageCollector; - private _isPrimitive; } //# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/node_modules/jest-leak-detector/build/index.d.ts.map b/node_modules/jest-leak-detector/build/index.d.ts.map index 4450d0e23..6646b8434 100644 --- a/node_modules/jest-leak-detector/build/index.d.ts.map +++ b/node_modules/jest-leak-detector/build/index.d.ts.map @@ -1 +1 @@ -{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAMH,MAAM,CAAC,OAAO;IACZ,OAAO,CAAC,qBAAqB,CAAU;gBAE3B,KAAK,EAAE,OAAO;IAiC1B,SAAS,IAAI,OAAO;IAMpB,OAAO,CAAC,oBAAoB;IAa5B,OAAO,CAAC,YAAY;CAGrB"} \ No newline at end of file +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAOH,MAAM,CAAC,OAAO;IACZ,OAAO,CAAC,qBAAqB,CAAU;gBAE3B,KAAK,EAAE,OAAO;IAiC1B,SAAS,IAAI,OAAO;IAMpB,OAAO,CAAC,oBAAoB;CAY7B"} \ No newline at end of file diff --git a/node_modules/jest-leak-detector/build/index.js b/node_modules/jest-leak-detector/build/index.js index 59fbc71c9..473d50590 100644 --- a/node_modules/jest-leak-detector/build/index.js +++ b/node_modules/jest-leak-detector/build/index.js @@ -35,6 +35,16 @@ function _prettyFormat() { return data; } +function _jestGetType() { + const data = require('jest-get-type'); + + _jestGetType = function _jestGetType() { + return data; + }; + + return data; +} + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : {default: obj}; } @@ -57,7 +67,7 @@ class _default { constructor(value) { _defineProperty(this, '_isReferenceBeingHeld', void 0); - if (this._isPrimitive(value)) { + if ((0, _jestGetType().isPrimitive)(value)) { throw new TypeError( [ 'Primitives cannot leak memory.', @@ -109,10 +119,6 @@ class _default { _v().default.setFlagsFromString('--no-expose-gc'); } } - - _isPrimitive(value) { - return value !== Object(value); - } } exports.default = _default; diff --git a/node_modules/jest-leak-detector/package.json b/node_modules/jest-leak-detector/package.json index a2b83c491..6f8d25fc9 100644 --- a/node_modules/jest-leak-detector/package.json +++ b/node_modules/jest-leak-detector/package.json @@ -1,39 +1,43 @@ { - "_args": [ - [ - "jest-leak-detector@24.8.0", - "/Users/drew.heavner/Documents/Github/sign-android-release" - ] - ], - "_development": true, - "_from": "jest-leak-detector@24.8.0", - "_id": "jest-leak-detector@24.8.0", + "_from": "jest-leak-detector@^24.9.0", + "_id": "jest-leak-detector@24.9.0", "_inBundle": false, - "_integrity": "sha512-cG0yRSK8A831LN8lIHxI3AblB40uhv0z+SsQdW3GoMMVcK+sJwrIIyax5tu3eHHNJ8Fu6IMDpnLda2jhn2pD/g==", + "_integrity": "sha512-tYkFIDsiKTGwb2FG1w8hX9V0aUb2ot8zY/2nFg087dUageonw1zrLMP4W6zsRO59dPkTSKie+D4rhMuP9nRmrA==", "_location": "/jest-leak-detector", - "_phantomChildren": {}, + "_phantomChildren": { + "@types/istanbul-lib-coverage": "2.0.1", + "@types/istanbul-reports": "1.1.1", + "@types/yargs-parser": "15.0.0", + "ansi-regex": "4.1.0", + "ansi-styles": "3.2.1", + "react-is": "16.8.6" + }, "_requested": { - "type": "version", + "type": "range", "registry": true, - "raw": "jest-leak-detector@24.8.0", + "raw": "jest-leak-detector@^24.9.0", "name": "jest-leak-detector", "escapedName": "jest-leak-detector", - "rawSpec": "24.8.0", + "rawSpec": "^24.9.0", "saveSpec": null, - "fetchSpec": "24.8.0" + "fetchSpec": "^24.9.0" }, "_requiredBy": [ "/jest-runner" ], - "_resolved": "https://registry.npmjs.org/jest-leak-detector/-/jest-leak-detector-24.8.0.tgz", - "_spec": "24.8.0", - "_where": "/Users/drew.heavner/Documents/Github/sign-android-release", + "_resolved": "https://registry.npmjs.org/jest-leak-detector/-/jest-leak-detector-24.9.0.tgz", + "_shasum": "b665dea7c77100c5c4f7dfcb153b65cf07dcf96a", + "_spec": "jest-leak-detector@^24.9.0", + "_where": "/Users/drew.heavner/Documents/Github/sign-android-release/node_modules/jest-runner", "bugs": { "url": "https://github.com/facebook/jest/issues" }, + "bundleDependencies": false, "dependencies": { - "pretty-format": "^24.8.0" + "jest-get-type": "^24.9.0", + "pretty-format": "^24.9.0" }, + "deprecated": false, "description": "Module for verifying whether an object has been garbage collected or not.", "devDependencies": { "@types/weak": "^1.0.0", @@ -42,7 +46,7 @@ "engines": { "node": ">= 6" }, - "gitHead": "845728f24b3ef41e450595c384e9b5c9fdf248a4", + "gitHead": "9ad0f4bc6b8bdd94989804226c28c9960d9da7d1", "homepage": "https://github.com/facebook/jest#readme", "license": "MIT", "main": "build/index.js", @@ -56,5 +60,5 @@ "directory": "packages/jest-leak-detector" }, "types": "build/index.d.ts", - "version": "24.8.0" + "version": "24.9.0" } diff --git a/node_modules/jest-leak-detector/tsconfig.json b/node_modules/jest-leak-detector/tsconfig.json deleted file mode 100644 index 3e70b1037..000000000 --- a/node_modules/jest-leak-detector/tsconfig.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "extends": "../../tsconfig.json", - "compilerOptions": { - "rootDir": "src", - "outDir": "build" - }, - "references": [ - {"path": "../pretty-format"} - ] -} diff --git a/node_modules/jest-mock/LICENSE b/node_modules/jest-mock/LICENSE index 10e779c44..b96dcb048 100644 --- a/node_modules/jest-mock/LICENSE +++ b/node_modules/jest-mock/LICENSE @@ -1,8 +1,6 @@ MIT License -For Jest software - -Copyright (c) 2014-present, Facebook, Inc. +Copyright (c) Facebook, Inc. and its affiliates. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/node_modules/jest-mock/build-es5/index.js b/node_modules/jest-mock/build-es5/index.js index 51a7278cc..b795e0dac 100644 --- a/node_modules/jest-mock/build-es5/index.js +++ b/node_modules/jest-mock/build-es5/index.js @@ -875,13 +875,18 @@ function () { if (!this.isMockFunction(original)) { if (typeof original !== 'function') { throw new Error('Cannot spy the ' + methodName + ' property because it is not a function; ' + this._typeOf(original) + ' given instead'); - } // @ts-ignore overriding original method with a Mock + } + var isMethodOwner = object.hasOwnProperty(methodName); // @ts-ignore overriding original method with a Mock object[methodName] = this._makeComponent({ type: 'function' }, function () { - object[methodName] = original; + if (isMethodOwner) { + object[methodName] = original; + } else { + delete object[methodName]; + } }); // @ts-ignore original method is now a Mock object[methodName].mockImplementation(function () { @@ -933,11 +938,13 @@ function () { if (!this.isMockFunction(original)) { if (typeof original !== 'function') { throw new Error('Cannot spy the ' + propertyName + ' property because it is not a function; ' + this._typeOf(original) + ' given instead'); - } + } // @ts-ignore: mock is assignable + descriptor[accessType] = this._makeComponent({ type: 'function' }, function () { + // @ts-ignore: mock is assignable descriptor[accessType] = original; Object.defineProperty(obj, propertyName, descriptor); }); diff --git a/node_modules/jest-mock/build-es5/index.js.map b/node_modules/jest-mock/build-es5/index.js.map index 49a570bbd..bc1ff9d41 100644 --- a/node_modules/jest-mock/build-es5/index.js.map +++ b/node_modules/jest-mock/build-es5/index.js.map @@ -1 +1 @@ -{"version":3,"sources":["webpack://jestMock/webpack/universalModuleDefinition","webpack://jestMock/webpack/bootstrap","webpack://jestMock/(webpack)/buildin/global.js","webpack://jestMock/./packages/jest-mock/src/index.ts"],"names":["g","Function","e","window","module","exports","MOCK_CONSTRUCTOR_NAME","FUNCTION_NAME_RESERVED_PATTERN","FUNCTION_NAME_RESERVED_REPLACE","RegExp","source","RESERVED_KEYWORDS","Set","matchArity","fn","length","mockConstructor","_a","apply","arguments","_b","_c","_d","_e","_f","_g","_h","_i","getObjectType","value","Object","prototype","toString","slice","getType","ref","typeName","Array","isArray","undefined","isReadonlyProp","object","prop","ModuleMockerClass","global","_environmentGlobal","_mockState","WeakMap","_mockConfigRegistry","_spyState","ModuleMocker","_invocationCallCounter","slots","EnvObjectProto","EnvFunctionProto","EnvRegExpProto","ObjectProto","FunctionProto","RegExpProto","ownNames","getOwnPropertyNames","i","propDesc","getOwnPropertyDescriptor","get","__esModule","add","getPrototypeOf","from","f","config","_defaultMockConfig","set","state","_defaultMockState","defaultReturnValue","isReturnValueLastSet","mockImpl","mockName","specificMockImpls","specificReturnValues","calls","instances","invocationCallOrder","results","metadata","restore","type","members","prototypeSlots","_getSlots","mocker","args","mockState","_ensureMockState","mockConfig","_ensureMockConfig","push","mockResult","finalReturnValue","thrownError","callDidThrowError","forEach","slot","protoImpl","generateFromMetadata","_protoImpl","shift","returnValue","specificMockImpl","error","_createMockFunction","_isMockFunction","getMockImplementation","defineProperty","configurable","enumerable","val","mockClear","delete","mockReset","mockRestore","mockReturnValueOnce","mockResolvedValueOnce","mockImplementationOnce","Promise","resolve","mockRejectedValueOnce","reject","mockReturnValue","mockResolvedValue","mockImplementation","mockRejectedValue","mockReturnThis","name","getMockName","unknownType","Error","boundFunctionPrefix","bindCall","startsWith","substring","has","test","replace","body","createConstructor","callbacks","refs","mock","_makeComponent","refID","slotMetadata","_generateMock","constructor","_metadata","setter","component","_refs","Map","size","match","getMetadata","implementation","methodName","accessType","_spyOnProperty","_typeOf","original","isMockFunction","obj","propertyName","descriptor","proto","JestMock"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD,O;ACVA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA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;AACD;;;oCAEe;AACd,WAAKC,mBAAL,GAA2B,IAAID,OAAJ,EAA3B;AACA,WAAKD,UAAL,GAAkB,IAAIC,OAAJ,EAAlB;AACD;;;sCAEiB;AAChB,WAAKE,SAAL,CAAeqD,OAAf,CAAuB,UAAAhB,OAAO;AAAA,eAAIA,OAAO,EAAX;AAAA,OAA9B;;AACA,WAAKrC,SAAL,GAAiB,IAAIrC,GAAJ,EAAjB;AACD;;;4BAEeiB,K,EAAoB;AAClC,aAAOA,KAAK,IAAI,IAAT,GAAgB,KAAKA,KAArB,WAAoCA,KAApC,CAAP;AACD;;;;;AAGH;;;AACA,IAAMiJ,QAAQ,GAAG,IAAInI,iBAAJ,CAAsBC,MAAtB,CAAjB;iBACSkI,Q","file":"index.js","sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"jestMock\"] = factory();\n\telse\n\t\troot[\"jestMock\"] = factory();\n})(window, function() {\nreturn "," \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = \"./packages/jest-mock/src/index.ts\");\n","var g;\n\n// This works in non-strict mode\ng = (function() {\n\treturn this;\n})();\n\ntry {\n\t// This works if eval is allowed (see CSP)\n\tg = g || new Function(\"return this\")();\n} catch (e) {\n\t// This works if the window reference is available\n\tif (typeof window === \"object\") g = window;\n}\n\n// g can still be undefined, but nothing to do about it...\n// We return undefined, instead of nothing here, so it's\n// easier to handle this case. if(!global) { ...}\n\nmodule.exports = g;\n","/**\n * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\ntype Global = NodeJS.Global; // | Window – add once TS improves typings;\n\nnamespace JestMock {\n export type ModuleMocker = ModuleMockerClass;\n export type MockFunctionMetadataType =\n | 'object'\n | 'array'\n | 'regexp'\n | 'function'\n | 'constant'\n | 'collection'\n | 'null'\n | 'undefined';\n\n export type MockFunctionMetadata<\n T,\n Y extends Array,\n Type = MockFunctionMetadataType\n > = {\n ref?: number;\n members?: {[key: string]: MockFunctionMetadata};\n mockImpl?: (...args: Y) => T;\n name?: string;\n refID?: number;\n type?: Type;\n value?: T;\n length?: number;\n };\n}\n\n/**\n * Possible types of a MockFunctionResult.\n * 'return': The call completed by returning normally.\n * 'throw': The call completed by throwing a value.\n * 'incomplete': The call has not completed yet. This is possible if you read\n * the mock function result from within the mock function itself\n * (or a function called by the mock function).\n */\ntype MockFunctionResultType = 'return' | 'throw' | 'incomplete';\n\n/**\n * Represents the result of a single call to a mock function.\n */\ntype MockFunctionResult = {\n /**\n * Indicates how the call completed.\n */\n type: MockFunctionResultType;\n /**\n * The value that was either thrown or returned by the function.\n * Undefined when type === 'incomplete'.\n */\n value: unknown;\n};\n\ntype MockFunctionState> = {\n calls: Array;\n instances: Array;\n invocationCallOrder: Array;\n /**\n * List of results of calls to the mock function.\n */\n results: Array;\n};\n\ntype MockFunctionConfig = {\n isReturnValueLastSet: boolean;\n defaultReturnValue: unknown;\n mockImpl: Function | undefined;\n mockName: string;\n specificReturnValues: Array;\n specificMockImpls: Array;\n};\n\n// see https://github.com/Microsoft/TypeScript/issues/25215\ntype NonFunctionPropertyNames = {\n [K in keyof T]: T[K] extends (...args: Array) => any ? never : K\n}[keyof T] &\n string;\ntype FunctionPropertyNames = {\n [K in keyof T]: T[K] extends (...args: Array) => any ? K : never\n}[keyof T] &\n string;\n\ninterface Mock = Array>\n extends Function,\n MockInstance {\n new (...args: Y): T;\n (...args: Y): T;\n}\n\ninterface SpyInstance> extends MockInstance {}\n\ninterface MockInstance> {\n _isMockFunction: true;\n _protoImpl: Function;\n getMockName(): string;\n getMockImplementation(): Function | undefined;\n mock: MockFunctionState;\n mockClear(): this;\n mockReset(): this;\n mockRestore(): void;\n mockImplementation(fn: (...args: Y) => T): this;\n mockImplementation(fn: () => Promise): this;\n mockImplementationOnce(fn: (...args: Y) => T): this;\n mockImplementationOnce(fn: () => Promise): this;\n mockName(name: string): this;\n mockReturnThis(): this;\n mockReturnValue(value: T): this;\n mockReturnValueOnce(value: T): this;\n mockResolvedValue(value: T): this;\n mockResolvedValueOnce(value: T): this;\n mockRejectedValue(value: T): this;\n mockRejectedValueOnce(value: T): this;\n}\n\nconst MOCK_CONSTRUCTOR_NAME = 'mockConstructor';\n\nconst FUNCTION_NAME_RESERVED_PATTERN = /[\\s!-\\/:-@\\[-`{-~]/;\nconst FUNCTION_NAME_RESERVED_REPLACE = new RegExp(\n FUNCTION_NAME_RESERVED_PATTERN.source,\n 'g',\n);\n\nconst RESERVED_KEYWORDS = new Set([\n 'arguments',\n 'await',\n 'break',\n 'case',\n 'catch',\n 'class',\n 'const',\n 'continue',\n 'debugger',\n 'default',\n 'delete',\n 'do',\n 'else',\n 'enum',\n 'eval',\n 'export',\n 'extends',\n 'false',\n 'finally',\n 'for',\n 'function',\n 'if',\n 'implements',\n 'import',\n 'in',\n 'instanceof',\n 'interface',\n 'let',\n 'new',\n 'null',\n 'package',\n 'private',\n 'protected',\n 'public',\n 'return',\n 'static',\n 'super',\n 'switch',\n 'this',\n 'throw',\n 'true',\n 'try',\n 'typeof',\n 'var',\n 'void',\n 'while',\n 'with',\n 'yield',\n]);\n\nfunction matchArity(fn: Function, length: number): Function {\n let mockConstructor;\n\n switch (length) {\n case 1:\n mockConstructor = function(this: unknown, _a: unknown) {\n return fn.apply(this, arguments);\n };\n break;\n case 2:\n mockConstructor = function(this: unknown, _a: unknown, _b: unknown) {\n return fn.apply(this, arguments);\n };\n break;\n case 3:\n mockConstructor = function(\n this: unknown,\n _a: unknown,\n _b: unknown,\n _c: unknown,\n ) {\n return fn.apply(this, arguments);\n };\n break;\n case 4:\n mockConstructor = function(\n this: unknown,\n _a: unknown,\n _b: unknown,\n _c: unknown,\n _d: unknown,\n ) {\n return fn.apply(this, arguments);\n };\n break;\n case 5:\n mockConstructor = function(\n this: unknown,\n _a: unknown,\n _b: unknown,\n _c: unknown,\n _d: unknown,\n _e: unknown,\n ) {\n return fn.apply(this, arguments);\n };\n break;\n case 6:\n mockConstructor = function(\n this: unknown,\n _a: unknown,\n _b: unknown,\n _c: unknown,\n _d: unknown,\n _e: unknown,\n _f: unknown,\n ) {\n return fn.apply(this, arguments);\n };\n break;\n case 7:\n mockConstructor = function(\n this: unknown,\n _a: unknown,\n _b: unknown,\n _c: unknown,\n _d: unknown,\n _e: unknown,\n _f: unknown,\n _g: unknown,\n ) {\n return fn.apply(this, arguments);\n };\n break;\n case 8:\n mockConstructor = function(\n this: unknown,\n _a: unknown,\n _b: unknown,\n _c: unknown,\n _d: unknown,\n _e: unknown,\n _f: unknown,\n _g: unknown,\n _h: unknown,\n ) {\n return fn.apply(this, arguments);\n };\n break;\n case 9:\n mockConstructor = function(\n this: unknown,\n _a: unknown,\n _b: unknown,\n _c: unknown,\n _d: unknown,\n _e: unknown,\n _f: unknown,\n _g: unknown,\n _h: unknown,\n _i: unknown,\n ) {\n return fn.apply(this, arguments);\n };\n break;\n default:\n mockConstructor = function(this: unknown) {\n return fn.apply(this, arguments);\n };\n break;\n }\n\n return mockConstructor;\n}\n\nfunction getObjectType(value: unknown): string {\n return Object.prototype.toString.apply(value).slice(8, -1);\n}\n\nfunction getType(ref?: unknown): JestMock.MockFunctionMetadataType | null {\n const typeName = getObjectType(ref);\n if (\n typeName === 'Function' ||\n typeName === 'AsyncFunction' ||\n typeName === 'GeneratorFunction'\n ) {\n return 'function';\n } else if (Array.isArray(ref)) {\n return 'array';\n } else if (typeName === 'Object') {\n return 'object';\n } else if (\n typeName === 'Number' ||\n typeName === 'String' ||\n typeName === 'Boolean' ||\n typeName === 'Symbol'\n ) {\n return 'constant';\n } else if (\n typeName === 'Map' ||\n typeName === 'WeakMap' ||\n typeName === 'Set'\n ) {\n return 'collection';\n } else if (typeName === 'RegExp') {\n return 'regexp';\n } else if (ref === undefined) {\n return 'undefined';\n } else if (ref === null) {\n return 'null';\n } else {\n return null;\n }\n}\n\nfunction isReadonlyProp(object: any, prop: string): boolean {\n if (\n prop === 'arguments' ||\n prop === 'caller' ||\n prop === 'callee' ||\n prop === 'name' ||\n prop === 'length'\n ) {\n const typeName = getObjectType(object);\n return (\n typeName === 'Function' ||\n typeName === 'AsyncFunction' ||\n typeName === 'GeneratorFunction'\n );\n }\n\n if (\n prop === 'source' ||\n prop === 'global' ||\n prop === 'ignoreCase' ||\n prop === 'multiline'\n ) {\n return getObjectType(object) === 'RegExp';\n }\n\n return false;\n}\n\nclass ModuleMockerClass {\n private _environmentGlobal: Global;\n private _mockState: WeakMap, MockFunctionState>;\n private _mockConfigRegistry: WeakMap;\n private _spyState: Set<() => void>;\n private _invocationCallCounter: number;\n ModuleMocker: typeof ModuleMockerClass;\n\n /**\n * @see README.md\n * @param global Global object of the test environment, used to create\n * mocks\n */\n constructor(global: Global) {\n this._environmentGlobal = global;\n this._mockState = new WeakMap();\n this._mockConfigRegistry = new WeakMap();\n this._spyState = new Set();\n this.ModuleMocker = ModuleMockerClass;\n this._invocationCallCounter = 1;\n }\n\n private _getSlots(object?: Record): Array {\n if (!object) {\n return [];\n }\n\n const slots = new Set();\n const EnvObjectProto = this._environmentGlobal.Object.prototype;\n const EnvFunctionProto = this._environmentGlobal.Function.prototype;\n const EnvRegExpProto = this._environmentGlobal.RegExp.prototype;\n\n // Also check the builtins in the current context as they leak through\n // core node modules.\n const ObjectProto = Object.prototype;\n const FunctionProto = Function.prototype;\n const RegExpProto = RegExp.prototype;\n\n // Properties of Object.prototype, Function.prototype and RegExp.prototype\n // are never reported as slots\n while (\n object != null &&\n object !== EnvObjectProto &&\n object !== EnvFunctionProto &&\n object !== EnvRegExpProto &&\n object !== ObjectProto &&\n object !== FunctionProto &&\n object !== RegExpProto\n ) {\n const ownNames = Object.getOwnPropertyNames(object);\n\n for (let i = 0; i < ownNames.length; i++) {\n const prop = ownNames[i];\n\n if (!isReadonlyProp(object, prop)) {\n const propDesc = Object.getOwnPropertyDescriptor(object, prop);\n // @ts-ignore Object.__esModule\n if ((propDesc !== undefined && !propDesc.get) || object.__esModule) {\n slots.add(prop);\n }\n }\n }\n\n object = Object.getPrototypeOf(object);\n }\n\n return Array.from(slots);\n }\n\n private _ensureMockConfig>(\n f: Mock,\n ): MockFunctionConfig {\n let config = this._mockConfigRegistry.get(f);\n if (!config) {\n config = this._defaultMockConfig();\n this._mockConfigRegistry.set(f, config);\n }\n return config;\n }\n\n private _ensureMockState>(\n f: Mock,\n ): MockFunctionState {\n let state = this._mockState.get(f);\n if (!state) {\n state = this._defaultMockState();\n this._mockState.set(f, state);\n }\n return state;\n }\n\n private _defaultMockConfig(): MockFunctionConfig {\n return {\n defaultReturnValue: undefined,\n isReturnValueLastSet: false,\n mockImpl: undefined,\n mockName: 'jest.fn()',\n specificMockImpls: [],\n specificReturnValues: [],\n };\n }\n\n private _defaultMockState>(): MockFunctionState<\n T,\n Y\n > {\n return {\n calls: [],\n instances: [],\n invocationCallOrder: [],\n results: [],\n };\n }\n\n private _makeComponent>(\n metadata: JestMock.MockFunctionMetadata,\n restore?: () => void,\n ): Record;\n private _makeComponent>(\n metadata: JestMock.MockFunctionMetadata,\n restore?: () => void,\n ): Array;\n private _makeComponent>(\n metadata: JestMock.MockFunctionMetadata,\n restore?: () => void,\n ): RegExp;\n private _makeComponent>(\n metadata: JestMock.MockFunctionMetadata<\n T,\n Y,\n 'constant' | 'collection' | 'null' | 'undefined'\n >,\n restore?: () => void,\n ): T;\n private _makeComponent>(\n metadata: JestMock.MockFunctionMetadata,\n restore?: () => void,\n ): Mock;\n private _makeComponent>(\n metadata: JestMock.MockFunctionMetadata,\n restore?: () => void,\n ):\n | Record\n | Array\n | RegExp\n | T\n | undefined\n | Mock {\n if (metadata.type === 'object') {\n return new this._environmentGlobal.Object();\n } else if (metadata.type === 'array') {\n return new this._environmentGlobal.Array();\n } else if (metadata.type === 'regexp') {\n return new this._environmentGlobal.RegExp('');\n } else if (\n metadata.type === 'constant' ||\n metadata.type === 'collection' ||\n metadata.type === 'null' ||\n metadata.type === 'undefined'\n ) {\n return metadata.value;\n } else if (metadata.type === 'function') {\n const prototype =\n (metadata.members &&\n metadata.members.prototype &&\n metadata.members.prototype.members) ||\n {};\n const prototypeSlots = this._getSlots(prototype);\n const mocker = this;\n const mockConstructor = matchArity(function(this: T, ...args: Y) {\n const mockState = mocker._ensureMockState(f);\n const mockConfig = mocker._ensureMockConfig(f);\n mockState.instances.push(this);\n mockState.calls.push(args);\n // Create and record an \"incomplete\" mock result immediately upon\n // calling rather than waiting for the mock to return. This avoids\n // issues caused by recursion where results can be recorded in the\n // wrong order.\n const mockResult = {\n type: ('incomplete' as unknown) as MockFunctionResultType,\n value: undefined,\n };\n mockState.results.push(mockResult);\n mockState.invocationCallOrder.push(mocker._invocationCallCounter++);\n\n // Will be set to the return value of the mock if an error is not thrown\n let finalReturnValue;\n // Will be set to the error that is thrown by the mock (if it throws)\n let thrownError;\n // Will be set to true if the mock throws an error. The presence of a\n // value in `thrownError` is not a 100% reliable indicator because a\n // function could throw a value of undefined.\n let callDidThrowError = false;\n\n try {\n // The bulk of the implementation is wrapped in an immediately\n // executed arrow function so the return value of the mock function\n // can be easily captured and recorded, despite the many separate\n // return points within the logic.\n finalReturnValue = (() => {\n if (this instanceof f) {\n // This is probably being called as a constructor\n prototypeSlots.forEach(slot => {\n // Copy prototype methods to the instance to make\n // it easier to interact with mock instance call and\n // return values\n if (prototype[slot].type === 'function') {\n // @ts-ignore no index signature\n const protoImpl = this[slot];\n // @ts-ignore no index signature\n this[slot] = mocker.generateFromMetadata(prototype[slot]);\n // @ts-ignore no index signature\n this[slot]._protoImpl = protoImpl;\n }\n });\n\n // Run the mock constructor implementation\n const mockImpl = mockConfig.specificMockImpls.length\n ? mockConfig.specificMockImpls.shift()\n : mockConfig.mockImpl;\n return mockImpl && mockImpl.apply(this, arguments);\n }\n\n const returnValue = mockConfig.defaultReturnValue;\n // If return value is last set, either specific or default, i.e.\n // mockReturnValueOnce()/mockReturnValue() is called and no\n // mockImplementationOnce()/mockImplementation() is called after\n // that.\n // use the set return value.\n if (mockConfig.specificReturnValues.length) {\n return mockConfig.specificReturnValues.shift();\n }\n\n if (mockConfig.isReturnValueLastSet) {\n return mockConfig.defaultReturnValue;\n }\n\n // If mockImplementationOnce()/mockImplementation() is last set,\n // or specific return values are used up, use the mock\n // implementation.\n let specificMockImpl;\n if (returnValue === undefined) {\n specificMockImpl = mockConfig.specificMockImpls.shift();\n if (specificMockImpl === undefined) {\n specificMockImpl = mockConfig.mockImpl;\n }\n if (specificMockImpl) {\n return specificMockImpl.apply(this, arguments);\n }\n }\n\n // Otherwise use prototype implementation\n if (returnValue === undefined && f._protoImpl) {\n return f._protoImpl.apply(this, arguments);\n }\n\n return returnValue;\n })();\n } catch (error) {\n // Store the thrown error so we can record it, then re-throw it.\n thrownError = error;\n callDidThrowError = true;\n throw error;\n } finally {\n // Record the result of the function.\n // NOTE: Intentionally NOT pushing/indexing into the array of mock\n // results here to avoid corrupting results data if mockClear()\n // is called during the execution of the mock.\n mockResult.type = callDidThrowError ? 'throw' : 'return';\n mockResult.value = callDidThrowError ? thrownError : finalReturnValue;\n }\n\n return finalReturnValue;\n }, metadata.length || 0);\n\n const f = (this._createMockFunction(\n metadata,\n mockConstructor,\n ) as unknown) as Mock;\n f._isMockFunction = true;\n f.getMockImplementation = () => this._ensureMockConfig(f).mockImpl;\n\n if (typeof restore === 'function') {\n this._spyState.add(restore);\n }\n\n this._mockState.set(f, this._defaultMockState());\n this._mockConfigRegistry.set(f, this._defaultMockConfig());\n\n Object.defineProperty(f, 'mock', {\n configurable: false,\n enumerable: true,\n get: () => this._ensureMockState(f),\n set: val => this._mockState.set(f, val),\n });\n\n f.mockClear = () => {\n this._mockState.delete(f);\n return f;\n };\n\n f.mockReset = () => {\n f.mockClear();\n this._mockConfigRegistry.delete(f);\n return f;\n };\n\n f.mockRestore = () => {\n f.mockReset();\n return restore ? restore() : undefined;\n };\n\n f.mockReturnValueOnce = (value: T) => {\n // next function call will return this value or default return value\n const mockConfig = this._ensureMockConfig(f);\n mockConfig.specificReturnValues.push(value);\n return f;\n };\n\n f.mockResolvedValueOnce = (value: T) =>\n f.mockImplementationOnce(() => Promise.resolve(value));\n\n f.mockRejectedValueOnce = (value: T) =>\n f.mockImplementationOnce(() => Promise.reject(value));\n\n f.mockReturnValue = (value: T) => {\n // next function call will return specified return value or this one\n const mockConfig = this._ensureMockConfig(f);\n mockConfig.isReturnValueLastSet = true;\n mockConfig.defaultReturnValue = value;\n return f;\n };\n\n f.mockResolvedValue = (value: T) =>\n f.mockImplementation(() => Promise.resolve(value));\n\n f.mockRejectedValue = (value: T) =>\n f.mockImplementation(() => Promise.reject(value));\n\n f.mockImplementationOnce = (\n fn: ((...args: Y) => T) | (() => Promise),\n ): Mock => {\n // next function call will use this mock implementation return value\n // or default mock implementation return value\n const mockConfig = this._ensureMockConfig(f);\n mockConfig.isReturnValueLastSet = false;\n mockConfig.specificMockImpls.push(fn);\n return f;\n };\n\n f.mockImplementation = (\n fn: ((...args: Y) => T) | (() => Promise),\n ): Mock => {\n // next function call will use mock implementation return value\n const mockConfig = this._ensureMockConfig(f);\n mockConfig.isReturnValueLastSet = false;\n mockConfig.defaultReturnValue = undefined;\n mockConfig.mockImpl = fn;\n return f;\n };\n\n f.mockReturnThis = () =>\n f.mockImplementation(function(this: T) {\n return this;\n });\n\n f.mockName = (name: string) => {\n if (name) {\n const mockConfig = this._ensureMockConfig(f);\n mockConfig.mockName = name;\n }\n return f;\n };\n\n f.getMockName = () => {\n const mockConfig = this._ensureMockConfig(f);\n return mockConfig.mockName || 'jest.fn()';\n };\n\n if (metadata.mockImpl) {\n f.mockImplementation(metadata.mockImpl);\n }\n\n return f;\n } else {\n const unknownType = metadata.type || 'undefined type';\n throw new Error('Unrecognized type ' + unknownType);\n }\n }\n\n private _createMockFunction>(\n metadata: JestMock.MockFunctionMetadata,\n mockConstructor: Function,\n ): Function {\n let name = metadata.name;\n if (!name) {\n return mockConstructor;\n }\n\n // Preserve `name` property of mocked function.\n const boundFunctionPrefix = 'bound ';\n let bindCall = '';\n // if-do-while for perf reasons. The common case is for the if to fail.\n if (name && name.startsWith(boundFunctionPrefix)) {\n do {\n name = name.substring(boundFunctionPrefix.length);\n // Call bind() just to alter the function name.\n bindCall = '.bind(null)';\n } while (name && name.startsWith(boundFunctionPrefix));\n }\n\n // Special case functions named `mockConstructor` to guard for infinite\n // loops.\n if (name === MOCK_CONSTRUCTOR_NAME) {\n return mockConstructor;\n }\n\n if (\n // It's a syntax error to define functions with a reserved keyword\n // as name.\n RESERVED_KEYWORDS.has(name) ||\n // It's also a syntax error to define functions with a name that starts with a number\n /^\\d/.test(name)\n ) {\n name = '$' + name;\n }\n\n // It's also a syntax error to define a function with a reserved character\n // as part of it's name.\n if (FUNCTION_NAME_RESERVED_PATTERN.test(name)) {\n name = name.replace(FUNCTION_NAME_RESERVED_REPLACE, '$');\n }\n\n const body =\n 'return function ' +\n name +\n '() {' +\n 'return ' +\n MOCK_CONSTRUCTOR_NAME +\n '.apply(this,arguments);' +\n '}' +\n bindCall;\n const createConstructor = new this._environmentGlobal.Function(\n MOCK_CONSTRUCTOR_NAME,\n body,\n );\n\n return createConstructor(mockConstructor);\n }\n\n private _generateMock>(\n metadata: JestMock.MockFunctionMetadata,\n callbacks: Array,\n refs: {\n [key: string]:\n | Record\n | Array\n | RegExp\n | T\n | undefined\n | Mock;\n },\n ): Mock {\n // metadata not compatible but it's the same type, maybe problem with\n // overloading of _makeComponent and not _generateMock?\n // @ts-ignore\n const mock = this._makeComponent(metadata);\n if (metadata.refID != null) {\n refs[metadata.refID] = mock;\n }\n\n this._getSlots(metadata.members).forEach(slot => {\n const slotMetadata = (metadata.members && metadata.members[slot]) || {};\n if (slotMetadata.ref != null) {\n callbacks.push(\n (function(ref) {\n return () => (mock[slot] = refs[ref]);\n })(slotMetadata.ref),\n );\n } else {\n mock[slot] = this._generateMock(slotMetadata, callbacks, refs);\n }\n });\n\n if (\n metadata.type !== 'undefined' &&\n metadata.type !== 'null' &&\n mock.prototype &&\n typeof mock.prototype === 'object'\n ) {\n mock.prototype.constructor = mock;\n }\n\n return mock;\n }\n\n /**\n * @see README.md\n * @param _metadata Metadata for the mock in the schema returned by the\n * getMetadata method of this module.\n */\n generateFromMetadata>(\n _metadata: JestMock.MockFunctionMetadata,\n ): Mock {\n const callbacks: Array = [];\n const refs = {};\n const mock = this._generateMock(_metadata, callbacks, refs);\n callbacks.forEach(setter => setter());\n return mock;\n }\n\n /**\n * @see README.md\n * @param component The component for which to retrieve metadata.\n */\n getMetadata>(\n component: T,\n _refs?: Map,\n ): JestMock.MockFunctionMetadata | null {\n const refs = _refs || new Map();\n const ref = refs.get(component);\n if (ref != null) {\n return {ref};\n }\n\n const type = getType(component);\n if (!type) {\n return null;\n }\n\n const metadata: JestMock.MockFunctionMetadata = {type};\n if (\n type === 'constant' ||\n type === 'collection' ||\n type === 'undefined' ||\n type === 'null'\n ) {\n metadata.value = component;\n return metadata;\n } else if (type === 'function') {\n // @ts-ignore this is a function so it has a name\n metadata.name = component.name;\n // @ts-ignore may be a mock\n if (component._isMockFunction === true) {\n // @ts-ignore may be a mock\n metadata.mockImpl = component.getMockImplementation();\n }\n }\n\n metadata.refID = refs.size;\n refs.set(component, metadata.refID);\n\n let members: {\n [key: string]: JestMock.MockFunctionMetadata;\n } | null = null;\n // Leave arrays alone\n if (type !== 'array') {\n this._getSlots(component).forEach(slot => {\n if (\n type === 'function' &&\n // @ts-ignore may be a mock\n component._isMockFunction === true &&\n slot.match(/^mock/)\n ) {\n return;\n }\n // @ts-ignore no index signature\n const slotMetadata = this.getMetadata(component[slot], refs);\n if (slotMetadata) {\n if (!members) {\n members = {};\n }\n members[slot] = slotMetadata;\n }\n });\n }\n\n if (members) {\n metadata.members = members;\n }\n\n return metadata;\n }\n\n isMockFunction(fn: any): fn is Mock {\n return !!fn && fn._isMockFunction === true;\n }\n\n fn>(\n implementation?: (...args: Y) => T,\n ): Mock {\n const length = implementation ? implementation.length : 0;\n const fn = this._makeComponent({length, type: 'function'});\n if (implementation) {\n fn.mockImplementation(implementation);\n }\n return fn;\n }\n\n spyOn>(\n object: T,\n methodName: M,\n accessType: 'get',\n ): SpyInstance;\n\n spyOn>(\n object: T,\n methodName: M,\n accessType: 'set',\n ): SpyInstance;\n\n spyOn>(\n object: T,\n methodName: M,\n ): T[M] extends (...args: Array) => any\n ? SpyInstance, Parameters>\n : never;\n\n spyOn>(\n object: T,\n methodName: M,\n accessType?: 'get' | 'set',\n ) {\n if (accessType) {\n return this._spyOnProperty(object, methodName, accessType);\n }\n\n if (typeof object !== 'object' && typeof object !== 'function') {\n throw new Error(\n 'Cannot spyOn on a primitive value; ' + this._typeOf(object) + ' given',\n );\n }\n\n const original = object[methodName];\n\n if (!this.isMockFunction(original)) {\n if (typeof original !== 'function') {\n throw new Error(\n 'Cannot spy the ' +\n methodName +\n ' property because it is not a function; ' +\n this._typeOf(original) +\n ' given instead',\n );\n }\n\n // @ts-ignore overriding original method with a Mock\n object[methodName] = this._makeComponent({type: 'function'}, () => {\n object[methodName] = original;\n });\n\n // @ts-ignore original method is now a Mock\n object[methodName].mockImplementation(function(this: unknown) {\n return original.apply(this, arguments);\n });\n }\n\n return object[methodName];\n }\n\n private _spyOnProperty>(\n obj: T,\n propertyName: M,\n accessType: 'get' | 'set' = 'get',\n ): Mock {\n if (typeof obj !== 'object' && typeof obj !== 'function') {\n throw new Error(\n 'Cannot spyOn on a primitive value; ' + this._typeOf(obj) + ' given',\n );\n }\n\n if (!obj) {\n throw new Error(\n 'spyOn could not find an object to spy upon for ' + propertyName + '',\n );\n }\n\n if (!propertyName) {\n throw new Error('No property name supplied');\n }\n\n let descriptor = Object.getOwnPropertyDescriptor(obj, propertyName);\n let proto = Object.getPrototypeOf(obj);\n\n while (!descriptor && proto !== null) {\n descriptor = Object.getOwnPropertyDescriptor(proto, propertyName);\n proto = Object.getPrototypeOf(proto);\n }\n\n if (!descriptor) {\n throw new Error(propertyName + ' property does not exist');\n }\n\n if (!descriptor.configurable) {\n throw new Error(propertyName + ' is not declared configurable');\n }\n\n if (!descriptor[accessType]) {\n throw new Error(\n 'Property ' + propertyName + ' does not have access type ' + accessType,\n );\n }\n\n const original = descriptor[accessType];\n\n if (!this.isMockFunction(original)) {\n if (typeof original !== 'function') {\n throw new Error(\n 'Cannot spy the ' +\n propertyName +\n ' property because it is not a function; ' +\n this._typeOf(original) +\n ' given instead',\n );\n }\n\n descriptor[accessType] = this._makeComponent({type: 'function'}, () => {\n descriptor![accessType] = original;\n Object.defineProperty(obj, propertyName, descriptor!);\n });\n\n (descriptor[accessType] as Mock).mockImplementation(function(\n this: unknown,\n ) {\n // @ts-ignore\n return original.apply(this, arguments);\n });\n }\n\n Object.defineProperty(obj, propertyName, descriptor);\n return descriptor[accessType] as Mock;\n }\n\n clearAllMocks() {\n this._mockState = new WeakMap();\n }\n\n resetAllMocks() {\n this._mockConfigRegistry = new WeakMap();\n this._mockState = new WeakMap();\n }\n\n restoreAllMocks() {\n this._spyState.forEach(restore => restore());\n this._spyState = new Set();\n }\n\n private _typeOf(value: any): string {\n return value == null ? '' + value : typeof value;\n }\n}\n\n/* eslint-disable-next-line no-redeclare */\nconst JestMock = new ModuleMockerClass(global);\nexport = JestMock;\n"],"sourceRoot":""} \ No newline at end of file +{"version":3,"sources":["webpack://jestMock/webpack/universalModuleDefinition","webpack://jestMock/webpack/bootstrap","webpack://jestMock/(webpack)/buildin/global.js","webpack://jestMock/./packages/jest-mock/src/index.ts"],"names":["g","Function","e","window","module","exports","MOCK_CONSTRUCTOR_NAME","FUNCTION_NAME_RESERVED_PATTERN","FUNCTION_NAME_RESERVED_REPLACE","RegExp","source","RESERVED_KEYWORDS","Set","matchArity","fn","length","mockConstructor","_a","apply","arguments","_b","_c","_d","_e","_f","_g","_h","_i","getObjectType","value","Object","prototype","toString","slice","getType","ref","typeName","Array","isArray","undefined","isReadonlyProp","object","prop","ModuleMockerClass","global","_environmentGlobal","_mockState","WeakMap","_mockConfigRegistry","_spyState","ModuleMocker","_invocationCallCounter","slots","EnvObjectProto","EnvFunctionProto","EnvRegExpProto","ObjectProto","FunctionProto","RegExpProto","ownNames","getOwnPropertyNames","i","propDesc","getOwnPropertyDescriptor","get","__esModule","add","getPrototypeOf","from","f","config","_defaultMockConfig","set","state","_defaultMockState","defaultReturnValue","isReturnValueLastSet","mockImpl","mockName","specificMockImpls","specificReturnValues","calls","instances","invocationCallOrder","results","metadata","restore","type","members","prototypeSlots","_getSlots","mocker","args","mockState","_ensureMockState","mockConfig","_ensureMockConfig","push","mockResult","finalReturnValue","thrownError","callDidThrowError","forEach","slot","protoImpl","generateFromMetadata","_protoImpl","shift","returnValue","specificMockImpl","error","_createMockFunction","_isMockFunction","getMockImplementation","defineProperty","configurable","enumerable","val","mockClear","delete","mockReset","mockRestore","mockReturnValueOnce","mockResolvedValueOnce","mockImplementationOnce","Promise","resolve","mockRejectedValueOnce","reject","mockReturnValue","mockResolvedValue","mockImplementation","mockRejectedValue","mockReturnThis","name","getMockName","unknownType","Error","boundFunctionPrefix","bindCall","startsWith","substring","has","test","replace","body","createConstructor","callbacks","refs","mock","_makeComponent","refID","slotMetadata","_generateMock","constructor","_metadata","setter","component","_refs","Map","size","match","getMetadata","implementation","methodName","accessType","_spyOnProperty","_typeOf","original","isMockFunction","isMethodOwner","hasOwnProperty","obj","propertyName","descriptor","proto","JestMock"],"mappings":"AAAA;AACA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CAAX,CAAoClC,kBAApC,CAAuD,YAErD;AACA;AACA,iBAAOqC,QAAQ,CAACtJ,KAAT,CAAe,IAAf,EAAqBC,SAArB,CAAP;AACD,SALD;AAMD;;AAEDW,YAAM,CAACoF,cAAP,CAAsB0D,GAAtB,EAA2BC,YAA3B,EAAyCC,UAAzC;AACA,aAAOA,UAAU,CAACT,UAAD,CAAjB;AACD;;;oCAEe;AACd,WAAKvH,UAAL,GAAkB,IAAIC,OAAJ,EAAlB;AACD;;;oCAEe;AACd,WAAKC,mBAAL,GAA2B,IAAID,OAAJ,EAA3B;AACA,WAAKD,UAAL,GAAkB,IAAIC,OAAJ,EAAlB;AACD;;;sCAEiB;AAChB,WAAKE,SAAL,CAAeqD,OAAf,CAAuB,UAAAhB,OAAO;AAAA,eAAIA,OAAO,EAAX;AAAA,OAA9B;;AACA,WAAKrC,SAAL,GAAiB,IAAIrC,GAAJ,EAAjB;AACD;;;4BAEeiB,K,EAAoB;AAClC,aAAOA,KAAK,IAAI,IAAT,GAAgB,KAAKA,KAArB,WAAoCA,KAApC,CAAP;AACD;;;;;AAGH;;;AACA,IAAMmJ,QAAQ,GAAG,IAAIrI,iBAAJ,CAAsBC,MAAtB,CAAjB;iBACSoI,Q","file":"index.js","sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"jestMock\"] = factory();\n\telse\n\t\troot[\"jestMock\"] = factory();\n})(window, function() {\nreturn "," \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = \"./packages/jest-mock/src/index.ts\");\n","var g;\n\n// This works in non-strict mode\ng = (function() {\n\treturn this;\n})();\n\ntry {\n\t// This works if eval is allowed (see CSP)\n\tg = g || new Function(\"return this\")();\n} catch (e) {\n\t// This works if the window reference is available\n\tif (typeof window === \"object\") g = window;\n}\n\n// g can still be undefined, but nothing to do about it...\n// We return undefined, instead of nothing here, so it's\n// easier to handle this case. if(!global) { ...}\n\nmodule.exports = g;\n","/**\n * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\ntype Global = NodeJS.Global; // | Window – add once TS improves typings;\n\nnamespace JestMock {\n export type ModuleMocker = ModuleMockerClass;\n export type MockFunctionMetadataType =\n | 'object'\n | 'array'\n | 'regexp'\n | 'function'\n | 'constant'\n | 'collection'\n | 'null'\n | 'undefined';\n\n export type MockFunctionMetadata<\n T,\n Y extends Array,\n Type = MockFunctionMetadataType\n > = {\n ref?: number;\n members?: Record>;\n mockImpl?: (...args: Y) => T;\n name?: string;\n refID?: number;\n type?: Type;\n value?: T;\n length?: number;\n };\n}\n\n/**\n * Possible types of a MockFunctionResult.\n * 'return': The call completed by returning normally.\n * 'throw': The call completed by throwing a value.\n * 'incomplete': The call has not completed yet. This is possible if you read\n * the mock function result from within the mock function itself\n * (or a function called by the mock function).\n */\ntype MockFunctionResultType = 'return' | 'throw' | 'incomplete';\n\n/**\n * Represents the result of a single call to a mock function.\n */\ntype MockFunctionResult = {\n /**\n * Indicates how the call completed.\n */\n type: MockFunctionResultType;\n /**\n * The value that was either thrown or returned by the function.\n * Undefined when type === 'incomplete'.\n */\n value: unknown;\n};\n\ntype MockFunctionState> = {\n calls: Array;\n instances: Array;\n invocationCallOrder: Array;\n /**\n * List of results of calls to the mock function.\n */\n results: Array;\n};\n\ntype MockFunctionConfig = {\n isReturnValueLastSet: boolean;\n defaultReturnValue: unknown;\n mockImpl: Function | undefined;\n mockName: string;\n specificReturnValues: Array;\n specificMockImpls: Array;\n};\n\n// see https://github.com/Microsoft/TypeScript/issues/25215\ntype NonFunctionPropertyNames = {\n [K in keyof T]: T[K] extends (...args: Array) => any ? never : K;\n}[keyof T] &\n string;\ntype FunctionPropertyNames = {\n [K in keyof T]: T[K] extends (...args: Array) => any ? K : never;\n}[keyof T] &\n string;\n\ninterface Mock = Array>\n extends Function,\n MockInstance {\n new (...args: Y): T;\n (...args: Y): T;\n}\n\ninterface SpyInstance> extends MockInstance {}\n\ninterface MockInstance> {\n _isMockFunction: true;\n _protoImpl: Function;\n getMockName(): string;\n getMockImplementation(): Function | undefined;\n mock: MockFunctionState;\n mockClear(): this;\n mockReset(): this;\n mockRestore(): void;\n mockImplementation(fn: (...args: Y) => T): this;\n mockImplementation(fn: () => Promise): this;\n mockImplementationOnce(fn: (...args: Y) => T): this;\n mockImplementationOnce(fn: () => Promise): this;\n mockName(name: string): this;\n mockReturnThis(): this;\n mockReturnValue(value: T): this;\n mockReturnValueOnce(value: T): this;\n mockResolvedValue(value: T): this;\n mockResolvedValueOnce(value: T): this;\n mockRejectedValue(value: T): this;\n mockRejectedValueOnce(value: T): this;\n}\n\nconst MOCK_CONSTRUCTOR_NAME = 'mockConstructor';\n\nconst FUNCTION_NAME_RESERVED_PATTERN = /[\\s!-\\/:-@\\[-`{-~]/;\nconst FUNCTION_NAME_RESERVED_REPLACE = new RegExp(\n FUNCTION_NAME_RESERVED_PATTERN.source,\n 'g',\n);\n\nconst RESERVED_KEYWORDS = new Set([\n 'arguments',\n 'await',\n 'break',\n 'case',\n 'catch',\n 'class',\n 'const',\n 'continue',\n 'debugger',\n 'default',\n 'delete',\n 'do',\n 'else',\n 'enum',\n 'eval',\n 'export',\n 'extends',\n 'false',\n 'finally',\n 'for',\n 'function',\n 'if',\n 'implements',\n 'import',\n 'in',\n 'instanceof',\n 'interface',\n 'let',\n 'new',\n 'null',\n 'package',\n 'private',\n 'protected',\n 'public',\n 'return',\n 'static',\n 'super',\n 'switch',\n 'this',\n 'throw',\n 'true',\n 'try',\n 'typeof',\n 'var',\n 'void',\n 'while',\n 'with',\n 'yield',\n]);\n\nfunction matchArity(fn: Function, length: number): Function {\n let mockConstructor;\n\n switch (length) {\n case 1:\n mockConstructor = function(this: unknown, _a: unknown) {\n return fn.apply(this, arguments);\n };\n break;\n case 2:\n mockConstructor = function(this: unknown, _a: unknown, _b: unknown) {\n return fn.apply(this, arguments);\n };\n break;\n case 3:\n mockConstructor = function(\n this: unknown,\n _a: unknown,\n _b: unknown,\n _c: unknown,\n ) {\n return fn.apply(this, arguments);\n };\n break;\n case 4:\n mockConstructor = function(\n this: unknown,\n _a: unknown,\n _b: unknown,\n _c: unknown,\n _d: unknown,\n ) {\n return fn.apply(this, arguments);\n };\n break;\n case 5:\n mockConstructor = function(\n this: unknown,\n _a: unknown,\n _b: unknown,\n _c: unknown,\n _d: unknown,\n _e: unknown,\n ) {\n return fn.apply(this, arguments);\n };\n break;\n case 6:\n mockConstructor = function(\n this: unknown,\n _a: unknown,\n _b: unknown,\n _c: unknown,\n _d: unknown,\n _e: unknown,\n _f: unknown,\n ) {\n return fn.apply(this, arguments);\n };\n break;\n case 7:\n mockConstructor = function(\n this: unknown,\n _a: unknown,\n _b: unknown,\n _c: unknown,\n _d: unknown,\n _e: unknown,\n _f: unknown,\n _g: unknown,\n ) {\n return fn.apply(this, arguments);\n };\n break;\n case 8:\n mockConstructor = function(\n this: unknown,\n _a: unknown,\n _b: unknown,\n _c: unknown,\n _d: unknown,\n _e: unknown,\n _f: unknown,\n _g: unknown,\n _h: unknown,\n ) {\n return fn.apply(this, arguments);\n };\n break;\n case 9:\n mockConstructor = function(\n this: unknown,\n _a: unknown,\n _b: unknown,\n _c: unknown,\n _d: unknown,\n _e: unknown,\n _f: unknown,\n _g: unknown,\n _h: unknown,\n _i: unknown,\n ) {\n return fn.apply(this, arguments);\n };\n break;\n default:\n mockConstructor = function(this: unknown) {\n return fn.apply(this, arguments);\n };\n break;\n }\n\n return mockConstructor;\n}\n\nfunction getObjectType(value: unknown): string {\n return Object.prototype.toString.apply(value).slice(8, -1);\n}\n\nfunction getType(ref?: unknown): JestMock.MockFunctionMetadataType | null {\n const typeName = getObjectType(ref);\n if (\n typeName === 'Function' ||\n typeName === 'AsyncFunction' ||\n typeName === 'GeneratorFunction'\n ) {\n return 'function';\n } else if (Array.isArray(ref)) {\n return 'array';\n } else if (typeName === 'Object') {\n return 'object';\n } else if (\n typeName === 'Number' ||\n typeName === 'String' ||\n typeName === 'Boolean' ||\n typeName === 'Symbol'\n ) {\n return 'constant';\n } else if (\n typeName === 'Map' ||\n typeName === 'WeakMap' ||\n typeName === 'Set'\n ) {\n return 'collection';\n } else if (typeName === 'RegExp') {\n return 'regexp';\n } else if (ref === undefined) {\n return 'undefined';\n } else if (ref === null) {\n return 'null';\n } else {\n return null;\n }\n}\n\nfunction isReadonlyProp(object: any, prop: string): boolean {\n if (\n prop === 'arguments' ||\n prop === 'caller' ||\n prop === 'callee' ||\n prop === 'name' ||\n prop === 'length'\n ) {\n const typeName = getObjectType(object);\n return (\n typeName === 'Function' ||\n typeName === 'AsyncFunction' ||\n typeName === 'GeneratorFunction'\n );\n }\n\n if (\n prop === 'source' ||\n prop === 'global' ||\n prop === 'ignoreCase' ||\n prop === 'multiline'\n ) {\n return getObjectType(object) === 'RegExp';\n }\n\n return false;\n}\n\nclass ModuleMockerClass {\n private _environmentGlobal: Global;\n private _mockState: WeakMap, MockFunctionState>;\n private _mockConfigRegistry: WeakMap;\n private _spyState: Set<() => void>;\n private _invocationCallCounter: number;\n ModuleMocker: typeof ModuleMockerClass;\n\n /**\n * @see README.md\n * @param global Global object of the test environment, used to create\n * mocks\n */\n constructor(global: Global) {\n this._environmentGlobal = global;\n this._mockState = new WeakMap();\n this._mockConfigRegistry = new WeakMap();\n this._spyState = new Set();\n this.ModuleMocker = ModuleMockerClass;\n this._invocationCallCounter = 1;\n }\n\n private _getSlots(object?: Record): Array {\n if (!object) {\n return [];\n }\n\n const slots = new Set();\n const EnvObjectProto = this._environmentGlobal.Object.prototype;\n const EnvFunctionProto = this._environmentGlobal.Function.prototype;\n const EnvRegExpProto = this._environmentGlobal.RegExp.prototype;\n\n // Also check the builtins in the current context as they leak through\n // core node modules.\n const ObjectProto = Object.prototype;\n const FunctionProto = Function.prototype;\n const RegExpProto = RegExp.prototype;\n\n // Properties of Object.prototype, Function.prototype and RegExp.prototype\n // are never reported as slots\n while (\n object != null &&\n object !== EnvObjectProto &&\n object !== EnvFunctionProto &&\n object !== EnvRegExpProto &&\n object !== ObjectProto &&\n object !== FunctionProto &&\n object !== RegExpProto\n ) {\n const ownNames = Object.getOwnPropertyNames(object);\n\n for (let i = 0; i < ownNames.length; i++) {\n const prop = ownNames[i];\n\n if (!isReadonlyProp(object, prop)) {\n const propDesc = Object.getOwnPropertyDescriptor(object, prop);\n // @ts-ignore Object.__esModule\n if ((propDesc !== undefined && !propDesc.get) || object.__esModule) {\n slots.add(prop);\n }\n }\n }\n\n object = Object.getPrototypeOf(object);\n }\n\n return Array.from(slots);\n }\n\n private _ensureMockConfig>(\n f: Mock,\n ): MockFunctionConfig {\n let config = this._mockConfigRegistry.get(f);\n if (!config) {\n config = this._defaultMockConfig();\n this._mockConfigRegistry.set(f, config);\n }\n return config;\n }\n\n private _ensureMockState>(\n f: Mock,\n ): MockFunctionState {\n let state = this._mockState.get(f);\n if (!state) {\n state = this._defaultMockState();\n this._mockState.set(f, state);\n }\n return state;\n }\n\n private _defaultMockConfig(): MockFunctionConfig {\n return {\n defaultReturnValue: undefined,\n isReturnValueLastSet: false,\n mockImpl: undefined,\n mockName: 'jest.fn()',\n specificMockImpls: [],\n specificReturnValues: [],\n };\n }\n\n private _defaultMockState>(): MockFunctionState<\n T,\n Y\n > {\n return {\n calls: [],\n instances: [],\n invocationCallOrder: [],\n results: [],\n };\n }\n\n private _makeComponent>(\n metadata: JestMock.MockFunctionMetadata,\n restore?: () => void,\n ): Record;\n private _makeComponent>(\n metadata: JestMock.MockFunctionMetadata,\n restore?: () => void,\n ): Array;\n private _makeComponent>(\n metadata: JestMock.MockFunctionMetadata,\n restore?: () => void,\n ): RegExp;\n private _makeComponent>(\n metadata: JestMock.MockFunctionMetadata<\n T,\n Y,\n 'constant' | 'collection' | 'null' | 'undefined'\n >,\n restore?: () => void,\n ): T;\n private _makeComponent>(\n metadata: JestMock.MockFunctionMetadata,\n restore?: () => void,\n ): Mock;\n private _makeComponent>(\n metadata: JestMock.MockFunctionMetadata,\n restore?: () => void,\n ):\n | Record\n | Array\n | RegExp\n | T\n | undefined\n | Mock {\n if (metadata.type === 'object') {\n return new this._environmentGlobal.Object();\n } else if (metadata.type === 'array') {\n return new this._environmentGlobal.Array();\n } else if (metadata.type === 'regexp') {\n return new this._environmentGlobal.RegExp('');\n } else if (\n metadata.type === 'constant' ||\n metadata.type === 'collection' ||\n metadata.type === 'null' ||\n metadata.type === 'undefined'\n ) {\n return metadata.value;\n } else if (metadata.type === 'function') {\n const prototype =\n (metadata.members &&\n metadata.members.prototype &&\n metadata.members.prototype.members) ||\n {};\n const prototypeSlots = this._getSlots(prototype);\n const mocker = this;\n const mockConstructor = matchArity(function(this: T, ...args: Y) {\n const mockState = mocker._ensureMockState(f);\n const mockConfig = mocker._ensureMockConfig(f);\n mockState.instances.push(this);\n mockState.calls.push(args);\n // Create and record an \"incomplete\" mock result immediately upon\n // calling rather than waiting for the mock to return. This avoids\n // issues caused by recursion where results can be recorded in the\n // wrong order.\n const mockResult: MockFunctionResult = {\n type: 'incomplete',\n value: undefined,\n };\n mockState.results.push(mockResult);\n mockState.invocationCallOrder.push(mocker._invocationCallCounter++);\n\n // Will be set to the return value of the mock if an error is not thrown\n let finalReturnValue;\n // Will be set to the error that is thrown by the mock (if it throws)\n let thrownError;\n // Will be set to true if the mock throws an error. The presence of a\n // value in `thrownError` is not a 100% reliable indicator because a\n // function could throw a value of undefined.\n let callDidThrowError = false;\n\n try {\n // The bulk of the implementation is wrapped in an immediately\n // executed arrow function so the return value of the mock function\n // can be easily captured and recorded, despite the many separate\n // return points within the logic.\n finalReturnValue = (() => {\n if (this instanceof f) {\n // This is probably being called as a constructor\n prototypeSlots.forEach(slot => {\n // Copy prototype methods to the instance to make\n // it easier to interact with mock instance call and\n // return values\n if (prototype[slot].type === 'function') {\n // @ts-ignore no index signature\n const protoImpl = this[slot];\n // @ts-ignore no index signature\n this[slot] = mocker.generateFromMetadata(prototype[slot]);\n // @ts-ignore no index signature\n this[slot]._protoImpl = protoImpl;\n }\n });\n\n // Run the mock constructor implementation\n const mockImpl = mockConfig.specificMockImpls.length\n ? mockConfig.specificMockImpls.shift()\n : mockConfig.mockImpl;\n return mockImpl && mockImpl.apply(this, arguments);\n }\n\n const returnValue = mockConfig.defaultReturnValue;\n // If return value is last set, either specific or default, i.e.\n // mockReturnValueOnce()/mockReturnValue() is called and no\n // mockImplementationOnce()/mockImplementation() is called after\n // that.\n // use the set return value.\n if (mockConfig.specificReturnValues.length) {\n return mockConfig.specificReturnValues.shift();\n }\n\n if (mockConfig.isReturnValueLastSet) {\n return mockConfig.defaultReturnValue;\n }\n\n // If mockImplementationOnce()/mockImplementation() is last set,\n // or specific return values are used up, use the mock\n // implementation.\n let specificMockImpl;\n if (returnValue === undefined) {\n specificMockImpl = mockConfig.specificMockImpls.shift();\n if (specificMockImpl === undefined) {\n specificMockImpl = mockConfig.mockImpl;\n }\n if (specificMockImpl) {\n return specificMockImpl.apply(this, arguments);\n }\n }\n\n // Otherwise use prototype implementation\n if (returnValue === undefined && f._protoImpl) {\n return f._protoImpl.apply(this, arguments);\n }\n\n return returnValue;\n })();\n } catch (error) {\n // Store the thrown error so we can record it, then re-throw it.\n thrownError = error;\n callDidThrowError = true;\n throw error;\n } finally {\n // Record the result of the function.\n // NOTE: Intentionally NOT pushing/indexing into the array of mock\n // results here to avoid corrupting results data if mockClear()\n // is called during the execution of the mock.\n mockResult.type = callDidThrowError ? 'throw' : 'return';\n mockResult.value = callDidThrowError ? thrownError : finalReturnValue;\n }\n\n return finalReturnValue;\n }, metadata.length || 0);\n\n const f = (this._createMockFunction(\n metadata,\n mockConstructor,\n ) as unknown) as Mock;\n f._isMockFunction = true;\n f.getMockImplementation = () => this._ensureMockConfig(f).mockImpl;\n\n if (typeof restore === 'function') {\n this._spyState.add(restore);\n }\n\n this._mockState.set(f, this._defaultMockState());\n this._mockConfigRegistry.set(f, this._defaultMockConfig());\n\n Object.defineProperty(f, 'mock', {\n configurable: false,\n enumerable: true,\n get: () => this._ensureMockState(f),\n set: val => this._mockState.set(f, val),\n });\n\n f.mockClear = () => {\n this._mockState.delete(f);\n return f;\n };\n\n f.mockReset = () => {\n f.mockClear();\n this._mockConfigRegistry.delete(f);\n return f;\n };\n\n f.mockRestore = () => {\n f.mockReset();\n return restore ? restore() : undefined;\n };\n\n f.mockReturnValueOnce = (value: T) => {\n // next function call will return this value or default return value\n const mockConfig = this._ensureMockConfig(f);\n mockConfig.specificReturnValues.push(value);\n return f;\n };\n\n f.mockResolvedValueOnce = (value: T) =>\n f.mockImplementationOnce(() => Promise.resolve(value));\n\n f.mockRejectedValueOnce = (value: T) =>\n f.mockImplementationOnce(() => Promise.reject(value));\n\n f.mockReturnValue = (value: T) => {\n // next function call will return specified return value or this one\n const mockConfig = this._ensureMockConfig(f);\n mockConfig.isReturnValueLastSet = true;\n mockConfig.defaultReturnValue = value;\n return f;\n };\n\n f.mockResolvedValue = (value: T) =>\n f.mockImplementation(() => Promise.resolve(value));\n\n f.mockRejectedValue = (value: T) =>\n f.mockImplementation(() => Promise.reject(value));\n\n f.mockImplementationOnce = (\n fn: ((...args: Y) => T) | (() => Promise),\n ): Mock => {\n // next function call will use this mock implementation return value\n // or default mock implementation return value\n const mockConfig = this._ensureMockConfig(f);\n mockConfig.isReturnValueLastSet = false;\n mockConfig.specificMockImpls.push(fn);\n return f;\n };\n\n f.mockImplementation = (\n fn: ((...args: Y) => T) | (() => Promise),\n ): Mock => {\n // next function call will use mock implementation return value\n const mockConfig = this._ensureMockConfig(f);\n mockConfig.isReturnValueLastSet = false;\n mockConfig.defaultReturnValue = undefined;\n mockConfig.mockImpl = fn;\n return f;\n };\n\n f.mockReturnThis = () =>\n f.mockImplementation(function(this: T) {\n return this;\n });\n\n f.mockName = (name: string) => {\n if (name) {\n const mockConfig = this._ensureMockConfig(f);\n mockConfig.mockName = name;\n }\n return f;\n };\n\n f.getMockName = () => {\n const mockConfig = this._ensureMockConfig(f);\n return mockConfig.mockName || 'jest.fn()';\n };\n\n if (metadata.mockImpl) {\n f.mockImplementation(metadata.mockImpl);\n }\n\n return f;\n } else {\n const unknownType = metadata.type || 'undefined type';\n throw new Error('Unrecognized type ' + unknownType);\n }\n }\n\n private _createMockFunction>(\n metadata: JestMock.MockFunctionMetadata,\n mockConstructor: Function,\n ): Function {\n let name = metadata.name;\n if (!name) {\n return mockConstructor;\n }\n\n // Preserve `name` property of mocked function.\n const boundFunctionPrefix = 'bound ';\n let bindCall = '';\n // if-do-while for perf reasons. The common case is for the if to fail.\n if (name && name.startsWith(boundFunctionPrefix)) {\n do {\n name = name.substring(boundFunctionPrefix.length);\n // Call bind() just to alter the function name.\n bindCall = '.bind(null)';\n } while (name && name.startsWith(boundFunctionPrefix));\n }\n\n // Special case functions named `mockConstructor` to guard for infinite\n // loops.\n if (name === MOCK_CONSTRUCTOR_NAME) {\n return mockConstructor;\n }\n\n if (\n // It's a syntax error to define functions with a reserved keyword\n // as name.\n RESERVED_KEYWORDS.has(name) ||\n // It's also a syntax error to define functions with a name that starts with a number\n /^\\d/.test(name)\n ) {\n name = '$' + name;\n }\n\n // It's also a syntax error to define a function with a reserved character\n // as part of it's name.\n if (FUNCTION_NAME_RESERVED_PATTERN.test(name)) {\n name = name.replace(FUNCTION_NAME_RESERVED_REPLACE, '$');\n }\n\n const body =\n 'return function ' +\n name +\n '() {' +\n 'return ' +\n MOCK_CONSTRUCTOR_NAME +\n '.apply(this,arguments);' +\n '}' +\n bindCall;\n const createConstructor = new this._environmentGlobal.Function(\n MOCK_CONSTRUCTOR_NAME,\n body,\n );\n\n return createConstructor(mockConstructor);\n }\n\n private _generateMock>(\n metadata: JestMock.MockFunctionMetadata,\n callbacks: Array,\n refs: {\n [key: string]:\n | Record\n | Array\n | RegExp\n | T\n | undefined\n | Mock;\n },\n ): Mock {\n // metadata not compatible but it's the same type, maybe problem with\n // overloading of _makeComponent and not _generateMock?\n // @ts-ignore\n const mock = this._makeComponent(metadata);\n if (metadata.refID != null) {\n refs[metadata.refID] = mock;\n }\n\n this._getSlots(metadata.members).forEach(slot => {\n const slotMetadata = (metadata.members && metadata.members[slot]) || {};\n if (slotMetadata.ref != null) {\n callbacks.push(\n (function(ref) {\n return () => (mock[slot] = refs[ref]);\n })(slotMetadata.ref),\n );\n } else {\n mock[slot] = this._generateMock(slotMetadata, callbacks, refs);\n }\n });\n\n if (\n metadata.type !== 'undefined' &&\n metadata.type !== 'null' &&\n mock.prototype &&\n typeof mock.prototype === 'object'\n ) {\n mock.prototype.constructor = mock;\n }\n\n return mock;\n }\n\n /**\n * @see README.md\n * @param _metadata Metadata for the mock in the schema returned by the\n * getMetadata method of this module.\n */\n generateFromMetadata>(\n _metadata: JestMock.MockFunctionMetadata,\n ): Mock {\n const callbacks: Array = [];\n const refs = {};\n const mock = this._generateMock(_metadata, callbacks, refs);\n callbacks.forEach(setter => setter());\n return mock;\n }\n\n /**\n * @see README.md\n * @param component The component for which to retrieve metadata.\n */\n getMetadata>(\n component: T,\n _refs?: Map,\n ): JestMock.MockFunctionMetadata | null {\n const refs = _refs || new Map();\n const ref = refs.get(component);\n if (ref != null) {\n return {ref};\n }\n\n const type = getType(component);\n if (!type) {\n return null;\n }\n\n const metadata: JestMock.MockFunctionMetadata = {type};\n if (\n type === 'constant' ||\n type === 'collection' ||\n type === 'undefined' ||\n type === 'null'\n ) {\n metadata.value = component;\n return metadata;\n } else if (type === 'function') {\n // @ts-ignore this is a function so it has a name\n metadata.name = component.name;\n // @ts-ignore may be a mock\n if (component._isMockFunction === true) {\n // @ts-ignore may be a mock\n metadata.mockImpl = component.getMockImplementation();\n }\n }\n\n metadata.refID = refs.size;\n refs.set(component, metadata.refID);\n\n let members: {\n [key: string]: JestMock.MockFunctionMetadata;\n } | null = null;\n // Leave arrays alone\n if (type !== 'array') {\n this._getSlots(component).forEach(slot => {\n if (\n type === 'function' &&\n // @ts-ignore may be a mock\n component._isMockFunction === true &&\n slot.match(/^mock/)\n ) {\n return;\n }\n // @ts-ignore no index signature\n const slotMetadata = this.getMetadata(component[slot], refs);\n if (slotMetadata) {\n if (!members) {\n members = {};\n }\n members[slot] = slotMetadata;\n }\n });\n }\n\n if (members) {\n metadata.members = members;\n }\n\n return metadata;\n }\n\n isMockFunction(fn: any): fn is Mock {\n return !!fn && fn._isMockFunction === true;\n }\n\n fn>(\n implementation?: (...args: Y) => T,\n ): Mock {\n const length = implementation ? implementation.length : 0;\n const fn = this._makeComponent({length, type: 'function'});\n if (implementation) {\n fn.mockImplementation(implementation);\n }\n return fn;\n }\n\n spyOn>(\n object: T,\n methodName: M,\n accessType: 'get',\n ): SpyInstance;\n\n spyOn>(\n object: T,\n methodName: M,\n accessType: 'set',\n ): SpyInstance;\n\n spyOn>(\n object: T,\n methodName: M,\n ): T[M] extends (...args: Array) => any\n ? SpyInstance, Parameters>\n : never;\n\n spyOn>(\n object: T,\n methodName: M,\n accessType?: 'get' | 'set',\n ) {\n if (accessType) {\n return this._spyOnProperty(object, methodName, accessType);\n }\n\n if (typeof object !== 'object' && typeof object !== 'function') {\n throw new Error(\n 'Cannot spyOn on a primitive value; ' + this._typeOf(object) + ' given',\n );\n }\n\n const original = object[methodName];\n\n if (!this.isMockFunction(original)) {\n if (typeof original !== 'function') {\n throw new Error(\n 'Cannot spy the ' +\n methodName +\n ' property because it is not a function; ' +\n this._typeOf(original) +\n ' given instead',\n );\n }\n\n const isMethodOwner = object.hasOwnProperty(methodName);\n\n // @ts-ignore overriding original method with a Mock\n object[methodName] = this._makeComponent({type: 'function'}, () => {\n if (isMethodOwner) {\n object[methodName] = original;\n } else {\n delete object[methodName];\n }\n });\n\n // @ts-ignore original method is now a Mock\n object[methodName].mockImplementation(function(this: unknown) {\n return original.apply(this, arguments);\n });\n }\n\n return object[methodName];\n }\n\n private _spyOnProperty>(\n obj: T,\n propertyName: M,\n accessType: 'get' | 'set' = 'get',\n ): Mock {\n if (typeof obj !== 'object' && typeof obj !== 'function') {\n throw new Error(\n 'Cannot spyOn on a primitive value; ' + this._typeOf(obj) + ' given',\n );\n }\n\n if (!obj) {\n throw new Error(\n 'spyOn could not find an object to spy upon for ' + propertyName + '',\n );\n }\n\n if (!propertyName) {\n throw new Error('No property name supplied');\n }\n\n let descriptor = Object.getOwnPropertyDescriptor(obj, propertyName);\n let proto = Object.getPrototypeOf(obj);\n\n while (!descriptor && proto !== null) {\n descriptor = Object.getOwnPropertyDescriptor(proto, propertyName);\n proto = Object.getPrototypeOf(proto);\n }\n\n if (!descriptor) {\n throw new Error(propertyName + ' property does not exist');\n }\n\n if (!descriptor.configurable) {\n throw new Error(propertyName + ' is not declared configurable');\n }\n\n if (!descriptor[accessType]) {\n throw new Error(\n 'Property ' + propertyName + ' does not have access type ' + accessType,\n );\n }\n\n const original = descriptor[accessType];\n\n if (!this.isMockFunction(original)) {\n if (typeof original !== 'function') {\n throw new Error(\n 'Cannot spy the ' +\n propertyName +\n ' property because it is not a function; ' +\n this._typeOf(original) +\n ' given instead',\n );\n }\n\n // @ts-ignore: mock is assignable\n descriptor[accessType] = this._makeComponent({type: 'function'}, () => {\n // @ts-ignore: mock is assignable\n descriptor![accessType] = original;\n Object.defineProperty(obj, propertyName, descriptor!);\n });\n\n (descriptor[accessType] as Mock).mockImplementation(function(\n this: unknown,\n ) {\n // @ts-ignore\n return original.apply(this, arguments);\n });\n }\n\n Object.defineProperty(obj, propertyName, descriptor);\n return descriptor[accessType] as Mock;\n }\n\n clearAllMocks() {\n this._mockState = new WeakMap();\n }\n\n resetAllMocks() {\n this._mockConfigRegistry = new WeakMap();\n this._mockState = new WeakMap();\n }\n\n restoreAllMocks() {\n this._spyState.forEach(restore => restore());\n this._spyState = new Set();\n }\n\n private _typeOf(value: any): string {\n return value == null ? '' + value : typeof value;\n }\n}\n\n/* eslint-disable-next-line no-redeclare */\nconst JestMock = new ModuleMockerClass(global);\nexport = JestMock;\n"],"sourceRoot":""} \ No newline at end of file diff --git a/node_modules/jest-mock/build/index.d.ts b/node_modules/jest-mock/build/index.d.ts index e4d3706b2..4d7cfb56d 100644 --- a/node_modules/jest-mock/build/index.d.ts +++ b/node_modules/jest-mock/build/index.d.ts @@ -11,9 +11,7 @@ declare namespace JestMock { type MockFunctionMetadataType = 'object' | 'array' | 'regexp' | 'function' | 'constant' | 'collection' | 'null' | 'undefined'; type MockFunctionMetadata, Type = MockFunctionMetadataType> = { ref?: number; - members?: { - [key: string]: MockFunctionMetadata; - }; + members?: Record>; mockImpl?: (...args: Y) => T; name?: string; refID?: number; diff --git a/node_modules/jest-mock/build/index.d.ts.map b/node_modules/jest-mock/build/index.d.ts.map index 7d6dec14d..565ef4c05 100644 --- a/node_modules/jest-mock/build/index.d.ts.map +++ b/node_modules/jest-mock/build/index.d.ts.map @@ -1 +1 @@ -{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;;AAEH,aAAK,MAAM,GAAG,MAAM,CAAC,MAAM,CAAC;AAE5B,kBAAU,QAAQ,CAAC;IACjB,KAAY,YAAY,GAAG,iBAAiB,CAAC;IAC7C,KAAY,wBAAwB,GAChC,QAAQ,GACR,OAAO,GACP,QAAQ,GACR,UAAU,GACV,UAAU,GACV,YAAY,GACZ,MAAM,GACN,WAAW,CAAC;IAEhB,KAAY,oBAAoB,CAC9B,CAAC,EACD,CAAC,SAAS,KAAK,CAAC,OAAO,CAAC,EACxB,IAA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CAAC,EAAE,EAAE,CAAC;IAExB,KAAK,CAAC,CAAC,SAAS,EAAE,EAAE,CAAC,SAAS,wBAAwB,CAAC,CAAC,CAAC,EACvD,MAAM,EAAE,CAAC,EACT,UAAU,EAAE,CAAC,EACb,UAAU,EAAE,KAAK,GAChB,WAAW,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;IAE5B,KAAK,CAAC,CAAC,SAAS,EAAE,EAAE,CAAC,SAAS,qBAAqB,CAAC,CAAC,CAAC,EACpD,MAAM,EAAE,CAAC,EACT,UAAU,EAAE,CAAC,GACZ,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,GAAG,IAAI,EAAE,KAAK,CAAC,GAAG,CAAC,KAAK,GAAG,GACxC,WAAW,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,UAAU,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,GAC/C,KAAK;IAkDT,OAAO,CAAC,cAAc;IA2EtB,aAAa;IAIb,aAAa;IAKb,eAAe;IAKf,OAAO,CAAC,OAAO;CAGhB;AAGD,QAAA,MAAM,QAAQ,mBAAgC,CAAC;AAC/C,SAAS,QAAQ,CAAC"} \ No newline at end of file diff --git a/node_modules/jest-mock/build/index.js b/node_modules/jest-mock/build/index.js index 6fd1fc2a2..555ed6f06 100644 --- a/node_modules/jest-mock/build/index.js +++ b/node_modules/jest-mock/build/index.js @@ -845,14 +845,20 @@ class ModuleMockerClass { this._typeOf(original) + ' given instead' ); - } // @ts-ignore overriding original method with a Mock + } + + const isMethodOwner = object.hasOwnProperty(methodName); // @ts-ignore overriding original method with a Mock object[methodName] = this._makeComponent( { type: 'function' }, () => { - object[methodName] = original; + if (isMethodOwner) { + object[methodName] = original; + } else { + delete object[methodName]; + } } ); // @ts-ignore original method is now a Mock @@ -914,13 +920,14 @@ class ModuleMockerClass { this._typeOf(original) + ' given instead' ); - } + } // @ts-ignore: mock is assignable descriptor[accessType] = this._makeComponent( { type: 'function' }, () => { + // @ts-ignore: mock is assignable descriptor[accessType] = original; Object.defineProperty(obj, propertyName, descriptor); } diff --git a/node_modules/jest-mock/package.json b/node_modules/jest-mock/package.json index 38a467331..d14be7b65 100644 --- a/node_modules/jest-mock/package.json +++ b/node_modules/jest-mock/package.json @@ -1,26 +1,23 @@ { - "_args": [ - [ - "jest-mock@24.8.0", - "/Users/drew.heavner/Documents/Github/sign-android-release" - ] - ], - "_development": true, - "_from": "jest-mock@24.8.0", - "_id": "jest-mock@24.8.0", + "_from": "jest-mock@^24.9.0", + "_id": "jest-mock@24.9.0", "_inBundle": false, - "_integrity": "sha512-6kWugwjGjJw+ZkK4mDa0Df3sDlUTsV47MSrT0nGQ0RBWJbpODDQ8MHDVtGtUYBne3IwZUhtB7elxHspU79WH3A==", + "_integrity": "sha512-3BEYN5WbSq9wd+SyLDES7AHnjH9A/ROBwmz7l2y+ol+NtSFO8DYiEBzoO1CeFc9a8DYy10EO4dDFVv/wN3zl1w==", "_location": "/jest-mock", - "_phantomChildren": {}, + "_phantomChildren": { + "@types/istanbul-lib-coverage": "2.0.1", + "@types/istanbul-reports": "1.1.1", + "@types/yargs-parser": "15.0.0" + }, "_requested": { - "type": "version", + "type": "range", "registry": true, - "raw": "jest-mock@24.8.0", + "raw": "jest-mock@^24.9.0", "name": "jest-mock", "escapedName": "jest-mock", - "rawSpec": "24.8.0", + "rawSpec": "^24.9.0", "saveSpec": null, - "fetchSpec": "24.8.0" + "fetchSpec": "^24.9.0" }, "_requiredBy": [ "/@jest/environment", @@ -29,21 +26,24 @@ "/jest-environment-node", "/jest-runtime" ], - "_resolved": "https://registry.npmjs.org/jest-mock/-/jest-mock-24.8.0.tgz", - "_spec": "24.8.0", - "_where": "/Users/drew.heavner/Documents/Github/sign-android-release", + "_resolved": "https://registry.npmjs.org/jest-mock/-/jest-mock-24.9.0.tgz", + "_shasum": "c22835541ee379b908673ad51087a2185c13f1c6", + "_spec": "jest-mock@^24.9.0", + "_where": "/Users/drew.heavner/Documents/Github/sign-android-release/node_modules/@jest/environment", "browser": "build-es5/index.js", "bugs": { "url": "https://github.com/facebook/jest/issues" }, + "bundleDependencies": false, "dependencies": { - "@jest/types": "^24.8.0" + "@jest/types": "^24.9.0" }, + "deprecated": false, "description": "## API", "engines": { "node": ">= 6" }, - "gitHead": "845728f24b3ef41e450595c384e9b5c9fdf248a4", + "gitHead": "9ad0f4bc6b8bdd94989804226c28c9960d9da7d1", "homepage": "https://github.com/facebook/jest#readme", "license": "MIT", "main": "build/index.js", @@ -57,5 +57,5 @@ "directory": "packages/jest-mock" }, "types": "build/index.d.ts", - "version": "24.8.0" + "version": "24.9.0" } diff --git a/node_modules/jest-mock/tsconfig.json b/node_modules/jest-mock/tsconfig.json deleted file mode 100644 index 3046cb6b9..000000000 --- a/node_modules/jest-mock/tsconfig.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "extends": "../../tsconfig.json", - "compilerOptions": { - "rootDir": "src", - "outDir": "build" - }, - "references": [{"path": "../jest-types"}] -} diff --git a/node_modules/jest-pnp-resolver/README.md b/node_modules/jest-pnp-resolver/README.md index fa5459085..20bf42a2b 100644 --- a/node_modules/jest-pnp-resolver/README.md +++ b/node_modules/jest-pnp-resolver/README.md @@ -13,6 +13,8 @@ yarn add -D jest-pnp-resolver ## Usage +As of `jest@^24.4.0` you don't need to manually add this package anymore. The default resolver will already use PnP. + Simply add the resolver to your configuration. For example, a minimal `jest.config.js` would be as such: ```js diff --git a/node_modules/jest-pnp-resolver/index.js b/node_modules/jest-pnp-resolver/index.js index 4643ff094..a61a57727 100644 --- a/node_modules/jest-pnp-resolver/index.js +++ b/node_modules/jest-pnp-resolver/index.js @@ -1,41 +1,49 @@ - -let pnp; - +let globalPnpApi; try { - pnp = require(`pnpapi`); -} catch (error) { - // not in PnP; not a problem + globalPnpApi = require(`pnpapi`); +} catch { + // Just ignore if we don't have a global PnP instance - perhaps + // we'll eventually find one at runtime due to multi-tree } -let defaultResolver; - -function requireDefaultResolver() { - if (!defaultResolver) { - try { - defaultResolver = require(`jest-resolve/build/defaultResolver`).default; - } catch (error) { - defaultResolver = require(`jest-resolve/build/default_resolver`).default; - } - } - - return defaultResolver; -} +const createRequire = require(`./createRequire`); +const getDefaultResolver = require(`./getDefaultResolver`); module.exports = (request, options) => { const {basedir, defaultResolver, extensions} = options; - if (pnp) { - const resolution = pnp.resolveRequest(request, `${basedir}/`, {extensions}); + if (process.versions.pnp) { + let pnpApi = globalPnpApi; + + // While technically it would be more correct to run this code + // everytime (since they file being run *may* belong to a + // different dependency tree than the one owning Jest), in + // practice this doesn't happen anywhere else than on the Jest + // repository itself (in the test env). So in order to preserve + // the performances, we can afford a slight incoherence here. + if (!pnpApi) { + try { + const baseReq = createRequire(`${basedir}/internal.js`); + pnpApi = baseReq(`pnpapi`); + } catch { + // The file isn't part of a PnP dependency tree, so we can + // just use the default Jest resolver. + } + } - // When the request is a native module, Jest expects to get the string back unmodified, but pnp returns null instead. - if (resolution === null) - return request; + if (pnpApi) { + const resolution = pnpApi.resolveRequest(request, `${basedir}/`, {extensions}); - return resolution; - } else { - if (!defaultResolver) - defaultResolver = requireDefaultResolver(); + // When the request is a native module, Jest expects to get the string back unmodified, but pnp returns null instead. + if (resolution === null) + return request; - return defaultResolver(request, options); + return resolution; + } } + + if (!defaultResolver) + defaultResolver = getDefaultResolver(); + + return defaultResolver(request, {...options, allowPnp: false}); }; diff --git a/node_modules/jest-pnp-resolver/package.json b/node_modules/jest-pnp-resolver/package.json index 4dbaa32be..ae2ac2553 100644 --- a/node_modules/jest-pnp-resolver/package.json +++ b/node_modules/jest-pnp-resolver/package.json @@ -1,36 +1,32 @@ { - "_args": [ - [ - "jest-pnp-resolver@1.2.1", - "/Users/drew.heavner/Documents/Github/sign-android-release" - ] - ], - "_development": true, - "_from": "jest-pnp-resolver@1.2.1", - "_id": "jest-pnp-resolver@1.2.1", + "_from": "jest-pnp-resolver@^1.2.1", + "_id": "jest-pnp-resolver@1.2.2", "_inBundle": false, - "_integrity": "sha512-pgFw2tm54fzgYvc/OHrnysABEObZCUNFnhjoRjaVOCN8NYc032/gVjPaHD4Aq6ApkSieWtfKAFQtmDKAmhupnQ==", + "_integrity": "sha512-olV41bKSMm8BdnuMsewT4jqlZ8+3TCARAXjZGT9jcoSnrfUnRCqnMoF9XEeoWjbzObpqF9dRhHQj0Xb9QdF6/w==", "_location": "/jest-pnp-resolver", "_phantomChildren": {}, "_requested": { - "type": "version", + "type": "range", "registry": true, - "raw": "jest-pnp-resolver@1.2.1", + "raw": "jest-pnp-resolver@^1.2.1", "name": "jest-pnp-resolver", "escapedName": "jest-pnp-resolver", - "rawSpec": "1.2.1", + "rawSpec": "^1.2.1", "saveSpec": null, - "fetchSpec": "1.2.1" + "fetchSpec": "^1.2.1" }, "_requiredBy": [ "/jest-resolve" ], - "_resolved": "https://registry.npmjs.org/jest-pnp-resolver/-/jest-pnp-resolver-1.2.1.tgz", - "_spec": "1.2.1", - "_where": "/Users/drew.heavner/Documents/Github/sign-android-release", + "_resolved": "https://registry.npmjs.org/jest-pnp-resolver/-/jest-pnp-resolver-1.2.2.tgz", + "_shasum": "b704ac0ae028a89108a4d040b3f919dfddc8e33c", + "_spec": "jest-pnp-resolver@^1.2.1", + "_where": "/Users/drew.heavner/Documents/Github/sign-android-release/node_modules/jest-resolve", "bugs": { "url": "https://github.com/arcanis/jest-pnp-resolver/issues" }, + "bundleDependencies": false, + "deprecated": false, "description": "plug'n'play resolver for Webpack", "engines": { "node": ">=6" @@ -56,5 +52,5 @@ "type": "git", "url": "git+https://github.com/arcanis/jest-pnp-resolver.git" }, - "version": "1.2.1" + "version": "1.2.2" } diff --git a/node_modules/jest-resolve-dependencies/LICENSE b/node_modules/jest-resolve-dependencies/LICENSE deleted file mode 100644 index 10e779c44..000000000 --- a/node_modules/jest-resolve-dependencies/LICENSE +++ /dev/null @@ -1,23 +0,0 @@ -MIT License - -For Jest software - -Copyright (c) 2014-present, Facebook, Inc. - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/node_modules/jest-resolve-dependencies/build/index.js b/node_modules/jest-resolve-dependencies/build/index.js index 3b56f3e12..9cd8b4195 100644 --- a/node_modules/jest-resolve-dependencies/build/index.js +++ b/node_modules/jest-resolve-dependencies/build/index.js @@ -102,7 +102,7 @@ class DependencyResolver { } visitedModules.add(file); - acc.push(module.file); + acc.push(file); return acc; }, []) ); diff --git a/node_modules/jest-resolve-dependencies/package.json b/node_modules/jest-resolve-dependencies/package.json index afb01271a..250665b1f 100644 --- a/node_modules/jest-resolve-dependencies/package.json +++ b/node_modules/jest-resolve-dependencies/package.json @@ -1,50 +1,50 @@ { - "_args": [ - [ - "jest-resolve-dependencies@24.8.0", - "/Users/drew.heavner/Documents/Github/sign-android-release" - ] - ], - "_development": true, - "_from": "jest-resolve-dependencies@24.8.0", - "_id": "jest-resolve-dependencies@24.8.0", + "_from": "jest-resolve-dependencies@^24.9.0", + "_id": "jest-resolve-dependencies@24.9.0", "_inBundle": false, - "_integrity": "sha512-hyK1qfIf/krV+fSNyhyJeq3elVMhK9Eijlwy+j5jqmZ9QsxwKBiP6qukQxaHtK8k6zql/KYWwCTQ+fDGTIJauw==", + "_integrity": "sha512-Fm7b6AlWnYhT0BXy4hXpactHIqER7erNgIsIozDXWl5dVm+k8XdGVe1oTg1JyaFnOxarMEbax3wyRJqGP2Pq+g==", "_location": "/jest-resolve-dependencies", - "_phantomChildren": {}, + "_phantomChildren": { + "@types/istanbul-lib-coverage": "2.0.1", + "@types/istanbul-reports": "1.1.1", + "@types/yargs-parser": "15.0.0" + }, "_requested": { - "type": "version", + "type": "range", "registry": true, - "raw": "jest-resolve-dependencies@24.8.0", + "raw": "jest-resolve-dependencies@^24.9.0", "name": "jest-resolve-dependencies", "escapedName": "jest-resolve-dependencies", - "rawSpec": "24.8.0", + "rawSpec": "^24.9.0", "saveSpec": null, - "fetchSpec": "24.8.0" + "fetchSpec": "^24.9.0" }, "_requiredBy": [ - "/@jest/core" + "/jest/jest-cli/@jest/core" ], - "_resolved": "https://registry.npmjs.org/jest-resolve-dependencies/-/jest-resolve-dependencies-24.8.0.tgz", - "_spec": "24.8.0", - "_where": "/Users/drew.heavner/Documents/Github/sign-android-release", + "_resolved": "https://registry.npmjs.org/jest-resolve-dependencies/-/jest-resolve-dependencies-24.9.0.tgz", + "_shasum": "ad055198959c4cfba8a4f066c673a3f0786507ab", + "_spec": "jest-resolve-dependencies@^24.9.0", + "_where": "/Users/drew.heavner/Documents/Github/sign-android-release/node_modules/jest/node_modules/jest-cli/node_modules/@jest/core", "bugs": { "url": "https://github.com/facebook/jest/issues" }, + "bundleDependencies": false, "dependencies": { - "@jest/types": "^24.8.0", + "@jest/types": "^24.9.0", "jest-regex-util": "^24.3.0", - "jest-snapshot": "^24.8.0" + "jest-snapshot": "^24.9.0" }, + "deprecated": false, "devDependencies": { - "jest-haste-map": "^24.8.0", - "jest-resolve": "^24.8.0", - "jest-runtime": "^24.8.0" + "jest-haste-map": "^24.9.0", + "jest-resolve": "^24.9.0", + "jest-runtime": "^24.9.0" }, "engines": { "node": ">= 6" }, - "gitHead": "845728f24b3ef41e450595c384e9b5c9fdf248a4", + "gitHead": "9ad0f4bc6b8bdd94989804226c28c9960d9da7d1", "homepage": "https://github.com/facebook/jest#readme", "license": "MIT", "main": "build/index.js", @@ -58,5 +58,5 @@ "directory": "packages/jest-resolve-dependencies" }, "types": "build/index.d.ts", - "version": "24.8.0" + "version": "24.9.0" } diff --git a/node_modules/jest-resolve-dependencies/tsconfig.json b/node_modules/jest-resolve-dependencies/tsconfig.json deleted file mode 100644 index 330ebb703..000000000 --- a/node_modules/jest-resolve-dependencies/tsconfig.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "extends": "../../tsconfig.json", - "compilerOptions": { - "rootDir": "src", - "outDir": "build" - }, - "references": [ - {"path": "../jest-regex-util"}, - {"path": "../jest-snapshot"}, - {"path": "../jest-types"} - ] -} diff --git a/node_modules/jest-resolve/LICENSE b/node_modules/jest-resolve/LICENSE index 10e779c44..b96dcb048 100644 --- a/node_modules/jest-resolve/LICENSE +++ b/node_modules/jest-resolve/LICENSE @@ -1,8 +1,6 @@ MIT License -For Jest software - -Copyright (c) 2014-present, Facebook, Inc. +Copyright (c) Facebook, Inc. and its affiliates. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/node_modules/jest-resolve/build/defaultResolver.d.ts b/node_modules/jest-resolve/build/defaultResolver.d.ts index 79241bc62..9acd812ef 100644 --- a/node_modules/jest-resolve/build/defaultResolver.d.ts +++ b/node_modules/jest-resolve/build/defaultResolver.d.ts @@ -15,5 +15,6 @@ declare type ResolverOptions = { rootDir?: Config.Path; }; export default function defaultResolver(path: Config.Path, options: ResolverOptions): Config.Path; +export declare const clearDefaultResolverCache: () => void; export {}; //# sourceMappingURL=defaultResolver.d.ts.map \ No newline at end of file diff --git a/node_modules/jest-resolve/build/defaultResolver.d.ts.map b/node_modules/jest-resolve/build/defaultResolver.d.ts.map index 9047e9959..a5b1c9a33 100644 --- a/node_modules/jest-resolve/build/defaultResolver.d.ts.map +++ b/node_modules/jest-resolve/build/defaultResolver.d.ts.map @@ -1 +1 @@ -{"version":3,"file":"defaultResolver.d.ts","sourceRoot":"","sources":["../src/defaultResolver.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAMH,OAAO,EAAC,MAAM,EAAC,MAAM,aAAa,CAAC;AAInC,aAAK,eAAe,GAAG;IACrB,OAAO,EAAE,MAAM,CAAC,IAAI,CAAC;IACrB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,eAAe,EAAE,OAAO,eAAe,CAAC;IACxC,UAAU,CAAC,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IAC3B,eAAe,CAAC,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IAChC,KAAK,CAAC,EAAE,KAAK,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;IAC3B,OAAO,CAAC,EAAE,MAAM,CAAC,IAAI,CAAC;CACvB,CAAC;AAEF,MAAM,CAAC,OAAO,UAAU,eAAe,CACrC,IAAI,EAAE,MAAM,CAAC,IAAI,EACjB,OAAO,EAAE,eAAe,GACvB,MAAM,CAAC,IAAI,CAgBb"} \ No newline at end of file +{"version":3,"file":"defaultResolver.d.ts","sourceRoot":"","sources":["../src/defaultResolver.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAMH,OAAO,EAAC,MAAM,EAAC,MAAM,aAAa,CAAC;AAInC,aAAK,eAAe,GAAG;IACrB,OAAO,EAAE,MAAM,CAAC,IAAI,CAAC;IACrB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,eAAe,EAAE,OAAO,eAAe,CAAC;IACxC,UAAU,CAAC,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IAC3B,eAAe,CAAC,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IAChC,KAAK,CAAC,EAAE,KAAK,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;IAC3B,OAAO,CAAC,EAAE,MAAM,CAAC,IAAI,CAAC;CACvB,CAAC;AAEF,MAAM,CAAC,OAAO,UAAU,eAAe,CACrC,IAAI,EAAE,MAAM,CAAC,IAAI,EACjB,OAAO,EAAE,eAAe,GACvB,MAAM,CAAC,IAAI,CAgBb;AAED,eAAO,MAAM,yBAAyB,YAErC,CAAC"} \ No newline at end of file diff --git a/node_modules/jest-resolve/build/defaultResolver.js b/node_modules/jest-resolve/build/defaultResolver.js index 370655888..9925bdcc0 100644 --- a/node_modules/jest-resolve/build/defaultResolver.js +++ b/node_modules/jest-resolve/build/defaultResolver.js @@ -4,6 +4,7 @@ Object.defineProperty(exports, '__esModule', { value: true }); exports.default = defaultResolver; +exports.clearDefaultResolverCache = void 0; function _fs() { const data = _interopRequireDefault(require('fs')); @@ -78,6 +79,11 @@ function defaultResolver(path, options) { }); } +const clearDefaultResolverCache = () => { + checkedPaths.clear(); +}; + +exports.clearDefaultResolverCache = clearDefaultResolverCache; const REGEX_RELATIVE_IMPORT = /^(?:\.\.?(?:\/|$)|\/|([A-Za-z]:)?[\\\/])/; function resolveSync(target, options) { diff --git a/node_modules/jest-resolve/build/index.d.ts b/node_modules/jest-resolve/build/index.d.ts index 498e8d9f6..1ae77d320 100644 --- a/node_modules/jest-resolve/build/index.d.ts +++ b/node_modules/jest-resolve/build/index.d.ts @@ -16,9 +16,7 @@ declare type FindNodeModuleConfig = { resolver?: Config.Path | null; rootDir?: Config.Path; }; -declare type BooleanObject = { - [key: string]: boolean; -}; +declare type BooleanObject = Record; declare namespace Resolver { type ResolveModuleConfig = { skipNodeResolution?: boolean; @@ -33,6 +31,7 @@ declare class Resolver { private readonly _modulePathCache; private readonly _supportsNativePlatform; constructor(moduleMap: ModuleMap, options: ResolverConfig); + static clearDefaultResolverCache(): void; static findNodeModule(path: Config.Path, options: FindNodeModuleConfig): Config.Path | null; resolveModuleFromDirIfExists(dirname: Config.Path, moduleName: string, options?: Resolver.ResolveModuleConfig): Config.Path | null; resolveModule(from: Config.Path, moduleName: string, options?: Resolver.ResolveModuleConfig): Config.Path; diff --git a/node_modules/jest-resolve/build/index.d.ts.map b/node_modules/jest-resolve/build/index.d.ts.map index e7561e140..a6e6a5223 100644 --- a/node_modules/jest-resolve/build/index.d.ts.map +++ b/node_modules/jest-resolve/build/index.d.ts.map @@ -1 +1 @@ -{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,OAAO,EAAC,MAAM,EAAC,MAAM,aAAa,CAAC;AACnC,OAAO,EAAC,SAAS,EAAC,MAAM,gBAAgB,CAAC;AAMzC,OAAO,EAAC,cAAc,EAAC,MAAM,SAAS,CAAC;AAEvC,aAAK,oBAAoB,GAAG;IAC1B,OAAO,EAAE,MAAM,CAAC,IAAI,CAAC;IACrB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,UAAU,CAAC,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IAC3B,eAAe,CAAC,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IAChC,KAAK,CAAC,EAAE,KAAK,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;IAC3B,QAAQ,CAAC,EAAE,MAAM,CAAC,IAAI,GAAG,IAAI,CAAC;IAC9B,OAAO,CAAC,EAAE,MAAM,CAAC,IAAI,CAAC;CACvB,CAAC;AAEF,aAAK,aAAa,GAAG;IAAC,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAA;CAAC,CAAC;AAE9C,kBAAU,QAAQ,CAAC;IACjB,KAAY,mBAAmB,GAAG;QAChC,kBAAkB,CAAC,EAAE,OAAO,CAAC;QAC7B,KAAK,CAAC,EAAE,KAAK,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;KAC5B,CAAC;CACH;AAgBD,cAAM,QAAQ;IACZ,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAiB;IAC1C,OAAO,CAAC,QAAQ,CAAC,UAAU,CAAY;IACvC,OAAO,CAAC,QAAQ,CAAC,cAAc,CAAsB;IACrD,OAAO,CAAC,QAAQ,CAAC,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ACjB,WAAW,CAAC,EAAE,MAAM,GACnB,MAAM;IAwBT,OAAO,CAAC,cAAc;IAItB,OAAO,CAAC,gBAAgB;IAaxB,OAAO,CAAC,YAAY;IASpB,OAAO,CAAC,mBAAmB;IAa3B,OAAO,CAAC,iBAAiB;IAMzB,qBAAqB,CACnB,IAAI,EAAE,MAAM,CAAC,IAAI,EACjB,UAAU,EAAE,MAAM,GACjB,MAAM,CAAC,IAAI,GAAG,IAAI;CA4DtB;AA6BD,SAAS,QAAQ,CAAC"} \ No newline at end of file diff --git a/node_modules/jest-resolve/build/index.js b/node_modules/jest-resolve/build/index.js index 883876d76..195c0f4d2 100644 --- a/node_modules/jest-resolve/build/index.js +++ b/node_modules/jest-resolve/build/index.js @@ -34,7 +34,32 @@ var _nodeModulesPaths = _interopRequireDefault(require('./nodeModulesPaths')); var _isBuiltinModule = _interopRequireDefault(require('./isBuiltinModule')); -var _defaultResolver = _interopRequireDefault(require('./defaultResolver')); +var _defaultResolver = _interopRequireWildcard(require('./defaultResolver')); + +function _interopRequireWildcard(obj) { + if (obj && obj.__esModule) { + return obj; + } else { + var newObj = {}; + if (obj != null) { + for (var key in obj) { + if (Object.prototype.hasOwnProperty.call(obj, key)) { + var desc = + Object.defineProperty && Object.getOwnPropertyDescriptor + ? Object.getOwnPropertyDescriptor(obj, key) + : {}; + if (desc.get || desc.set) { + Object.defineProperty(newObj, key, desc); + } else { + newObj[key] = obj[key]; + } + } + } + } + newObj.default = obj; + return newObj; + } +} function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : {default: obj}; @@ -63,7 +88,7 @@ const nodePaths = NODE_PATH ? NODE_PATH.split(_path().default.delimiter) .filter(Boolean) // The resolver expects absolute paths. .map(p => _path().default.resolve(resolvedCwd, p)) - : null; + : undefined; /* eslint-disable-next-line no-redeclare */ class Resolver { @@ -102,6 +127,10 @@ class Resolver { this._modulePathCache = new Map(); } + static clearDefaultResolverCache() { + (0, _defaultResolver.clearDefaultResolverCache)(); + } + static findNodeModule(path, options) { const resolver = options.resolver ? require(options.resolver) diff --git a/node_modules/jest-resolve/package.json b/node_modules/jest-resolve/package.json index 0919392cf..863b785ab 100644 --- a/node_modules/jest-resolve/package.json +++ b/node_modules/jest-resolve/package.json @@ -1,55 +1,57 @@ { - "_args": [ - [ - "jest-resolve@24.8.0", - "/Users/drew.heavner/Documents/Github/sign-android-release" - ] - ], - "_development": true, - "_from": "jest-resolve@24.8.0", - "_id": "jest-resolve@24.8.0", + "_from": "jest-resolve@^24.9.0", + "_id": "jest-resolve@24.9.0", "_inBundle": false, - "_integrity": "sha512-+hjSzi1PoRvnuOICoYd5V/KpIQmkAsfjFO71458hQ2Whi/yf1GDeBOFj8Gxw4LrApHsVJvn5fmjcPdmoUHaVKw==", + "_integrity": "sha512-TaLeLVL1l08YFZAt3zaPtjiVvyy4oSA6CRe+0AFPPVX3Q/VI0giIWWoAvoS5L96vj9Dqxj4fB5p2qrHCmTU/MQ==", "_location": "/jest-resolve", - "_phantomChildren": {}, + "_phantomChildren": { + "@types/istanbul-lib-coverage": "2.0.1", + "@types/istanbul-reports": "1.1.1", + "@types/yargs-parser": "15.0.0" + }, "_requested": { - "type": "version", + "type": "range", "registry": true, - "raw": "jest-resolve@24.8.0", + "raw": "jest-resolve@^24.9.0", "name": "jest-resolve", "escapedName": "jest-resolve", - "rawSpec": "24.8.0", + "rawSpec": "^24.9.0", "saveSpec": null, - "fetchSpec": "24.8.0" + "fetchSpec": "^24.9.0" }, "_requiredBy": [ "/@jest/reporters", "/jest-config", "/jest-runner", "/jest-runtime", - "/jest-snapshot" + "/jest-snapshot", + "/jest/jest-cli/@jest/core", + "/jest/jest-cli/jest-config" ], - "_resolved": "https://registry.npmjs.org/jest-resolve/-/jest-resolve-24.8.0.tgz", - "_spec": "24.8.0", - "_where": "/Users/drew.heavner/Documents/Github/sign-android-release", + "_resolved": "https://registry.npmjs.org/jest-resolve/-/jest-resolve-24.9.0.tgz", + "_shasum": "dff04c7687af34c4dd7e524892d9cf77e5d17321", + "_spec": "jest-resolve@^24.9.0", + "_where": "/Users/drew.heavner/Documents/Github/sign-android-release/node_modules/jest/node_modules/jest-cli/node_modules/@jest/core", "bugs": { "url": "https://github.com/facebook/jest/issues" }, + "bundleDependencies": false, "dependencies": { - "@jest/types": "^24.8.0", + "@jest/types": "^24.9.0", "browser-resolve": "^1.11.3", "chalk": "^2.0.1", "jest-pnp-resolver": "^1.2.1", "realpath-native": "^1.1.0" }, + "deprecated": false, "devDependencies": { "@types/browser-resolve": "^0.0.5", - "jest-haste-map": "^24.8.0" + "jest-haste-map": "^24.9.0" }, "engines": { "node": ">= 6" }, - "gitHead": "845728f24b3ef41e450595c384e9b5c9fdf248a4", + "gitHead": "9ad0f4bc6b8bdd94989804226c28c9960d9da7d1", "homepage": "https://github.com/facebook/jest#readme", "license": "MIT", "main": "build/index.js", @@ -63,5 +65,5 @@ "directory": "packages/jest-resolve" }, "types": "build/index.d.ts", - "version": "24.8.0" + "version": "24.9.0" } diff --git a/node_modules/jest-resolve/tsconfig.json b/node_modules/jest-resolve/tsconfig.json deleted file mode 100644 index befa0d307..000000000 --- a/node_modules/jest-resolve/tsconfig.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "extends": "../../tsconfig.json", - "compilerOptions": { - "rootDir": "src", - "outDir": "build" - }, - "references": [{"path": "../jest-types"}, {"path": "../jest-haste-map"}] -} diff --git a/node_modules/jest-runner/LICENSE b/node_modules/jest-runner/LICENSE deleted file mode 100644 index 10e779c44..000000000 --- a/node_modules/jest-runner/LICENSE +++ /dev/null @@ -1,23 +0,0 @@ -MIT License - -For Jest software - -Copyright (c) 2014-present, Facebook, Inc. - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/node_modules/jest-runner/build/index.d.ts b/node_modules/jest-runner/build/index.d.ts index b1f7ffbf1..ec90986a3 100644 --- a/node_modules/jest-runner/build/index.d.ts +++ b/node_modules/jest-runner/build/index.d.ts @@ -5,15 +5,21 @@ * LICENSE file in the root directory of this source tree. */ import { Config } from '@jest/types'; -import { OnTestFailure, OnTestStart, OnTestSuccess, Test as JestTest, TestRunnerContext, TestRunnerOptions, TestWatcher } from './types'; +import { OnTestFailure as JestOnTestFailure, OnTestStart as JestOnTestStart, OnTestSuccess as JestOnTestSuccess, Test as JestTest, TestRunnerContext as JestTestRunnerContext, TestRunnerOptions as JestTestRunnerOptions, TestWatcher as JestTestWatcher } from './types'; declare namespace TestRunner { type Test = JestTest; + type OnTestFailure = JestOnTestFailure; + type OnTestStart = JestOnTestStart; + type OnTestSuccess = JestOnTestSuccess; + type TestWatcher = JestTestWatcher; + type TestRunnerContext = JestTestRunnerContext; + type TestRunnerOptions = JestTestRunnerOptions; } declare class TestRunner { private _globalConfig; private _context; - constructor(globalConfig: Config.GlobalConfig, context?: TestRunnerContext); - runTests(tests: Array, watcher: TestWatcher, onStart: OnTestStart, onResult: OnTestSuccess, onFailure: OnTestFailure, options: TestRunnerOptions): Promise; + constructor(globalConfig: Config.GlobalConfig, context?: JestTestRunnerContext); + runTests(tests: Array, watcher: JestTestWatcher, onStart: JestOnTestStart, onResult: JestOnTestSuccess, onFailure: JestOnTestFailure, options: JestTestRunnerOptions): Promise; private _createInBandTestRun; private _createParallelTestRun; } diff --git a/node_modules/jest-runner/build/index.d.ts.map b/node_modules/jest-runner/build/index.d.ts.map index d71ea62df..3252da3a8 100644 --- a/node_modules/jest-runner/build/index.d.ts.map +++ b/node_modules/jest-runner/build/index.d.ts.map @@ -1 +1 @@ -{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAC,MAAM,EAAC,MAAM,aAAa,CAAC;AAOnC,OAAO,EACL,aAAa,EACb,WAAW,EACX,aAAa,EACb,IAAI,IAAI,QAAQ,EAChB,iBAAiB,EACjB,iBAAiB,EACjB,WAAW,EAEZ,MAAM,SAAS,CAAC;AAQjB,kBAAU,UAAU,CAAC;IACnB,KAAY,IAAI,GAAG,QAAQ,CAAC;CAC7B;AAGD,cAAM,UAAU;IACd,OAAO,CAAC,aAAa,CAAsB;IAC3C,OAAO,CAAC,QAAQ,CAAoB;gBAExB,YAAY,EAAE,MAAM,CAAC,YAAY,EAAE,OAAO,CAAC,EAAE,iBAAiB;IAKpE,QAAQ,CACZ,KAAK,EAAE,KAAK,CAAC,QAAQ,CAAC,EACtB,OAAO,EAAE,WAAW,EACpB,OAAO,EAAE,WAAW,EACpB,QAAQ,EAAE,aAAa,EACvB,SAAS,EAAE,aAAa,EACxB,OAAO,EAAE,iBAAiB,GACzB,OAAO,CAAC,IAAI,CAAC;YAYF,oBAAoB;YAkCpB,sBAAsB;CAuFrC;AASD,SAAS,UAAU,CAAC"} \ No newline at end of file +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAC,MAAM,EAAC,MAAM,aAAa,CAAC;AAOnC,OAAO,EACL,aAAa,IAAI,iBAAiB,EAClC,WAAW,IAAI,eAAe,EAC9B,aAAa,IAAI,iBAAiB,EAClC,IAAI,IAAI,QAAQ,EAChB,iBAAiB,IAAI,qBAAqB,EAC1C,iBAAiB,IAAI,qBAAqB,EAC1C,WAAW,IAAI,eAAe,EAE/B,MAAM,SAAS,CAAC;AAQjB,kBAAU,UAAU,CAAC;IACnB,KAAY,IAAI,GAAG,QAAQ,CAAC;IAC5B,KAAY,aAAa,GAAG,iBAAiB,CAAC;IAC9C,KAAY,WAAW,GAAG,eAAe,CAAC;IAC1C,KAAY,aAAa,GAAG,iBAAiB,CAAC;IAC9C,KAAY,WAAW,GAAG,eAAe,CAAC;IAC1C,KAAY,iBAAiB,GAAG,qBAAqB,CAAC;IACtD,KAAY,iBAAiB,GAAG,qBAAqB,CAAC;CACvD;AAGD,cAAM,UAAU;IACd,OAAO,CAAC,aAAa,CAAsB;IAC3C,OAAO,CAAC,QAAQ,CAAwB;gBAGtC,YAAY,EAAE,MAAM,CAAC,YAAY,EACjC,OAAO,CAAC,EAAE,qBAAqB;IAM3B,QAAQ,CACZ,KAAK,EAAE,KAAK,CAAC,QAAQ,CAAC,EACtB,OAAO,EAAE,eAAe,EACxB,OAAO,EAAE,eAAe,EACxB,QAAQ,EAAE,iBAAiB,EAC3B,SAAS,EAAE,iBAAiB,EAC5B,OAAO,EAAE,qBAAqB,GAC7B,OAAO,CAAC,IAAI,CAAC;YAYF,oBAAoB;YAkCpB,sBAAsB;CAuFrC;AASD,SAAS,UAAU,CAAC"} \ No newline at end of file diff --git a/node_modules/jest-runner/package.json b/node_modules/jest-runner/package.json index d6adf638a..47b686d91 100644 --- a/node_modules/jest-runner/package.json +++ b/node_modules/jest-runner/package.json @@ -1,58 +1,67 @@ { - "_args": [ - [ - "jest-runner@24.8.0", - "/Users/drew.heavner/Documents/Github/sign-android-release" - ] - ], - "_development": true, - "_from": "jest-runner@24.8.0", - "_id": "jest-runner@24.8.0", + "_from": "jest-runner@^24.9.0", + "_id": "jest-runner@24.9.0", "_inBundle": false, - "_integrity": "sha512-utFqC5BaA3JmznbissSs95X1ZF+d+4WuOWwpM9+Ak356YtMhHE/GXUondZdcyAAOTBEsRGAgH/0TwLzfI9h7ow==", + "_integrity": "sha512-KksJQyI3/0mhcfspnxxEOBueGrd5E4vV7ADQLT9ESaCzz02WnbdbKWIf5Mkaucoaj7obQckYPVX6JJhgUcoWWg==", "_location": "/jest-runner", - "_phantomChildren": {}, + "_phantomChildren": { + "@babel/code-frame": "7.5.5", + "@types/istanbul-lib-coverage": "2.0.1", + "@types/istanbul-reports": "1.1.1", + "@types/stack-utils": "1.0.1", + "@types/yargs-parser": "15.0.0", + "callsites": "3.1.0", + "chalk": "2.4.2", + "graceful-fs": "4.2.0", + "micromatch": "3.1.10", + "slash": "2.0.0", + "source-map": "0.6.1", + "stack-utils": "1.0.2" + }, "_requested": { - "type": "version", + "type": "range", "registry": true, - "raw": "jest-runner@24.8.0", + "raw": "jest-runner@^24.9.0", "name": "jest-runner", "escapedName": "jest-runner", - "rawSpec": "24.8.0", + "rawSpec": "^24.9.0", "saveSpec": null, - "fetchSpec": "24.8.0" + "fetchSpec": "^24.9.0" }, "_requiredBy": [ - "/@jest/core", - "/@jest/test-sequencer" + "/@jest/test-sequencer", + "/jest/jest-cli/@jest/core" ], - "_resolved": "https://registry.npmjs.org/jest-runner/-/jest-runner-24.8.0.tgz", - "_spec": "24.8.0", - "_where": "/Users/drew.heavner/Documents/Github/sign-android-release", + "_resolved": "https://registry.npmjs.org/jest-runner/-/jest-runner-24.9.0.tgz", + "_shasum": "574fafdbd54455c2b34b4bdf4365a23857fcdf42", + "_spec": "jest-runner@^24.9.0", + "_where": "/Users/drew.heavner/Documents/Github/sign-android-release/node_modules/jest/node_modules/jest-cli/node_modules/@jest/core", "bugs": { "url": "https://github.com/facebook/jest/issues" }, + "bundleDependencies": false, "dependencies": { "@jest/console": "^24.7.1", - "@jest/environment": "^24.8.0", - "@jest/test-result": "^24.8.0", - "@jest/types": "^24.8.0", + "@jest/environment": "^24.9.0", + "@jest/test-result": "^24.9.0", + "@jest/types": "^24.9.0", "chalk": "^2.4.2", "exit": "^0.1.2", "graceful-fs": "^4.1.15", - "jest-config": "^24.8.0", + "jest-config": "^24.9.0", "jest-docblock": "^24.3.0", - "jest-haste-map": "^24.8.0", - "jest-jasmine2": "^24.8.0", - "jest-leak-detector": "^24.8.0", - "jest-message-util": "^24.8.0", - "jest-resolve": "^24.8.0", - "jest-runtime": "^24.8.0", - "jest-util": "^24.8.0", + "jest-haste-map": "^24.9.0", + "jest-jasmine2": "^24.9.0", + "jest-leak-detector": "^24.9.0", + "jest-message-util": "^24.9.0", + "jest-resolve": "^24.9.0", + "jest-runtime": "^24.9.0", + "jest-util": "^24.9.0", "jest-worker": "^24.6.0", "source-map-support": "^0.5.6", "throat": "^4.0.0" }, + "deprecated": false, "devDependencies": { "@types/exit": "^0.1.30", "@types/graceful-fs": "^4.1.2", @@ -61,7 +70,7 @@ "engines": { "node": ">= 6" }, - "gitHead": "845728f24b3ef41e450595c384e9b5c9fdf248a4", + "gitHead": "9ad0f4bc6b8bdd94989804226c28c9960d9da7d1", "homepage": "https://github.com/facebook/jest#readme", "license": "MIT", "main": "build/index.js", @@ -75,5 +84,5 @@ "directory": "packages/jest-runner" }, "types": "build/index.d.ts", - "version": "24.8.0" + "version": "24.9.0" } diff --git a/node_modules/jest-runner/tsconfig.json b/node_modules/jest-runner/tsconfig.json deleted file mode 100644 index 69c0f3da8..000000000 --- a/node_modules/jest-runner/tsconfig.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "extends": "../../tsconfig.json", - "compilerOptions": { - "rootDir": "src", - "outDir": "build" - }, - "references": [ - {"path": "../jest-config"}, - {"path": "../jest-console"}, - {"path": "../jest-docblock"}, - {"path": "../jest-environment"}, - {"path": "../jest-haste-map"}, - {"path": "../jest-leak-detector"}, - {"path": "../jest-message-util"}, - {"path": "../jest-resolve"}, - {"path": "../jest-runtime"}, - {"path": "../jest-test-result"}, - {"path": "../jest-types"}, - {"path": "../jest-worker"}, - {"path": "../jest-util"} - ] -} diff --git a/node_modules/jest-runtime/LICENSE b/node_modules/jest-runtime/LICENSE deleted file mode 100644 index 10e779c44..000000000 --- a/node_modules/jest-runtime/LICENSE +++ /dev/null @@ -1,23 +0,0 @@ -MIT License - -For Jest software - -Copyright (c) 2014-present, Facebook, Inc. - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/node_modules/jest-runtime/build/helpers.d.ts b/node_modules/jest-runtime/build/helpers.d.ts index 6670acaf9..76dc0ec26 100644 --- a/node_modules/jest-runtime/build/helpers.d.ts +++ b/node_modules/jest-runtime/build/helpers.d.ts @@ -1,2 +1,8 @@ +/** + * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ export declare const findSiblingsWithFileExtension: (moduleFileExtensions: string[], from: string, moduleName: string) => string; //# sourceMappingURL=helpers.d.ts.map \ No newline at end of file diff --git a/node_modules/jest-runtime/build/helpers.d.ts.map b/node_modules/jest-runtime/build/helpers.d.ts.map index 0504a87c7..52b744e84 100644 --- a/node_modules/jest-runtime/build/helpers.d.ts.map +++ b/node_modules/jest-runtime/build/helpers.d.ts.map @@ -1 +1 @@ -{"version":3,"file":"helpers.d.ts","sourceRoot":"","sources":["../src/helpers.ts"],"names":[],"mappings":"AAOA,eAAO,MAAM,6BAA6B,8EA0CzC,CAAC"} \ No newline at end of file +{"version":3,"file":"helpers.d.ts","sourceRoot":"","sources":["../src/helpers.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAOH,eAAO,MAAM,6BAA6B,8EA0CzC,CAAC"} \ No newline at end of file diff --git a/node_modules/jest-runtime/build/helpers.js b/node_modules/jest-runtime/build/helpers.js index 4a4ca3ec0..652a1887a 100644 --- a/node_modules/jest-runtime/build/helpers.js +++ b/node_modules/jest-runtime/build/helpers.js @@ -39,7 +39,12 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : {default: obj}; } -// Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. +/** + * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ const findSiblingsWithFileExtension = ( moduleFileExtensions, from, diff --git a/node_modules/jest-runtime/build/index.d.ts.map b/node_modules/jest-runtime/build/index.d.ts.map index 9841a0055..cc8ee3a22 100644 --- a/node_modules/jest-runtime/build/index.d.ts.map +++ b/node_modules/jest-runtime/build/index.d.ts.map @@ -1 +1 @@ -{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;;AAGH,OAAO,EAAC,MAAM,EAAC,MAAM,aAAa,CAAC;AACnC,OAAO,EAEL,eAAe,EAGhB,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAAC,iBAAiB,EAAC,MAAM,kBAAkB,CAAC;AAEnD,OAAO,QAAQ,EAAE,EAAC,SAAS,EAAC,MAAM,gBAAgB,CAAC;AAEnD,OAAO,QAAQ,MAAM,cAAc,CAAC;AAIpC,OAAO,EACL,iBAAiB,EACjB,uBAAuB,EAGxB,MAAM,iB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jB,UAAU,CAAC,EAAE,MAAM,EACnB,OAAO,CAAC,EAAE,qBAAqB,EAC/B,eAAe,CAAC,EAAE,OAAO,GAAG,IAAI;IA6ElC,qBAAqB,CAAC,IAAI,EAAE,MAAM,CAAC,IAAI,EAAE,EAAE,CAAC,EAAE,MAAM;IAIpD,aAAa,CAAC,IAAI,EAAE,MAAM,CAAC,IAAI,EAAE,UAAU,EAAE,MAAM;IAInD,WAAW,CAAC,IAAI,EAAE,MAAM,CAAC,IAAI,EAAE,UAAU,EAAE,MAAM;IAuFjD,OAAO,CAAC,WAAW;IA8BnB,OAAO,CAAC,6BAA6B;IAarC,mBAAmB,CAAC,IAAI,EAAE,MAAM,CAAC,IAAI,EAAE,UAAU,EAAE,MAAM;IAuBzD,cAAc,CAAC,EAAE,EAAE,MAAM,IAAI;IAa7B,YAAY;IA2BZ,sBAAsB;IAItB,gBAAgB,CAAC,YAAY,EAAE,GAAG,CAAC,MAAM,CAAC;;;IAe1C,aAAa,IAAI,iBAAiB;IAIlC,OAAO,CACL,IAAI,EAAE,MAAM,EACZ,UAAU,EAAE,MAAM,EAClB,WAAW,EAAE,MAAM,OAAO,EAC1B,OAAO,CAAC,EAAE;QAAC,OAAO,CAAC,EAAE,OAAO,CAAA;KAAC;IAe/B,eAAe;IAIf,aAAa;IAIb,aAAa;IAIb,OAAO,CAAC,cAAc;IAItB,OAAO,CAAC,eAAe;IA6CvB,OAAO,CAAC,oBAAoB;IAqB5B,OAAO,CAAC,WAAW;IAoFnB,OAAO,CAAC,kBAAkB;IAQ1B,OAAO,CAAC,aAAa;IAwCrB,OAAO,CAAC,WAAW;IA8DnB,OAAO,CAAC,4BAA4B;IAwCpC,OAAO,CAAC,oBAAoB;IA8J5B,OAAO,CAAC,2BAA2B;CAcpC;AAID,SAAS,OAAO,CAAC"} \ No newline at end of file diff --git a/node_modules/jest-runtime/build/index.js b/node_modules/jest-runtime/build/index.js index 03fa4ba22..731effa5e 100644 --- a/node_modules/jest-runtime/build/index.js +++ b/node_modules/jest-runtime/build/index.js @@ -862,12 +862,10 @@ class Runtime { process.exitCode = 1; return; - } - - const wrapper = - runScript[_transform().ScriptTransformer.EVAL_RESULT_VARIABLE]; + } //Wrapper - const moduleArguments = new Set([ + runScript[_transform().ScriptTransformer.EVAL_RESULT_VARIABLE].call( + localModule.exports, localModule, // module object localModule.exports, // module exports localModule.require, // require implementation @@ -884,8 +882,8 @@ class Runtime { `You have requested '${globalVariable}' as a global variable, but it was not present. Please check your config or your global environment.` ); }) - ]); - wrapper.call(localModule.exports, ...Array.from(moduleArguments)); + ); + this._isCurrentlyExecutingManualMock = origCurrExecutingManualMock; this._currentlyExecutingModulePath = lastExecutingModulePath; } @@ -906,7 +904,8 @@ class Runtime { if (!(modulePath in this._mockMetaDataCache)) { // This allows us to handle circular dependencies while generating an // automock - this._mockMetaDataCache[modulePath] = this._moduleMocker.getMetadata({}); // In order to avoid it being possible for automocking to potentially + this._mockMetaDataCache[modulePath] = + this._moduleMocker.getMetadata({}) || {}; // In order to avoid it being possible for automocking to potentially // cause side-effects within the module environment, we need to execute // the module in isolation. This could cause issues if the module being // mocked has calls into side-effectful APIs on another module. @@ -1170,6 +1169,8 @@ class Runtime { this._environment.global.jasmine.addMatchers(matchers), advanceTimersByTime: msToRun => _getFakeTimers().advanceTimersByTime(msToRun), + advanceTimersToNextTimer: steps => + _getFakeTimers().advanceTimersToNextTimer(steps), autoMockOff: disableAutomock, autoMockOn: enableAutomock, clearAllMocks, diff --git a/node_modules/jest-runtime/node_modules/slash/index.js b/node_modules/jest-runtime/node_modules/slash/index.js deleted file mode 100644 index 75d72501a..000000000 --- a/node_modules/jest-runtime/node_modules/slash/index.js +++ /dev/null @@ -1,11 +0,0 @@ -'use strict'; -module.exports = input => { - const isExtendedLengthPath = /^\\\\\?\\/.test(input); - const hasNonAscii = /[^\u0000-\u0080]+/.test(input); // eslint-disable-line no-control-regex - - if (isExtendedLengthPath || hasNonAscii) { - return input; - } - - return input.replace(/\\/g, '/'); -}; diff --git a/node_modules/jest-runtime/node_modules/slash/license b/node_modules/jest-runtime/node_modules/slash/license deleted file mode 100644 index e7af2f771..000000000 --- a/node_modules/jest-runtime/node_modules/slash/license +++ /dev/null @@ -1,9 +0,0 @@ -MIT License - -Copyright (c) Sindre Sorhus (sindresorhus.com) - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/jest-runtime/node_modules/slash/package.json b/node_modules/jest-runtime/node_modules/slash/package.json deleted file mode 100644 index 5855bb0a8..000000000 --- a/node_modules/jest-runtime/node_modules/slash/package.json +++ /dev/null @@ -1,70 +0,0 @@ -{ - "_args": [ - [ - "slash@2.0.0", - "/Users/drew.heavner/Documents/Github/sign-android-release" - ] - ], - "_development": true, - "_from": "slash@2.0.0", - "_id": "slash@2.0.0", - "_inBundle": false, - "_integrity": "sha512-ZYKh3Wh2z1PpEXWr0MpSBZ0V6mZHAQfYevttO11c51CaWjGTaadiKZ+wVt1PbMlDV5qhMFslpZCemhwOK7C89A==", - "_location": "/jest-runtime/slash", - "_phantomChildren": {}, - "_requested": { - "type": "version", - "registry": true, - "raw": "slash@2.0.0", - "name": "slash", - "escapedName": "slash", - "rawSpec": "2.0.0", - "saveSpec": null, - "fetchSpec": "2.0.0" - }, - "_requiredBy": [ - "/jest-runtime" - ], - "_resolved": "https://registry.npmjs.org/slash/-/slash-2.0.0.tgz", - "_spec": "2.0.0", - "_where": "/Users/drew.heavner/Documents/Github/sign-android-release", - "author": { - "name": "Sindre Sorhus", - "email": "sindresorhus@gmail.com", - "url": "sindresorhus.com" - }, - "bugs": { - "url": "https://github.com/sindresorhus/slash/issues" - }, - "description": "Convert Windows backslash paths to slash paths", - "devDependencies": { - "ava": "*", - "xo": "*" - }, - "engines": { - "node": ">=6" - }, - "files": [ - "index.js" - ], - "homepage": "https://github.com/sindresorhus/slash#readme", - "keywords": [ - "path", - "seperator", - "sep", - "slash", - "backslash", - "windows", - "win" - ], - "license": "MIT", - "name": "slash", - "repository": { - "type": "git", - "url": "git+https://github.com/sindresorhus/slash.git" - }, - "scripts": { - "test": "xo && ava" - }, - "version": "2.0.0" -} diff --git a/node_modules/jest-runtime/node_modules/slash/readme.md b/node_modules/jest-runtime/node_modules/slash/readme.md deleted file mode 100644 index 5e2fedbc9..000000000 --- a/node_modules/jest-runtime/node_modules/slash/readme.md +++ /dev/null @@ -1,44 +0,0 @@ -# slash [![Build Status](https://travis-ci.org/sindresorhus/slash.svg?branch=master)](https://travis-ci.org/sindresorhus/slash) - -> Convert Windows backslash paths to slash paths: `foo\\bar` ➔ `foo/bar` - -[Forward-slash paths can be used in Windows](http://superuser.com/a/176395/6877) as long as they're not extended-length paths and don't contain any non-ascii characters. - -This was created since the `path` methods in Node outputs `\\` paths on Windows. - - -## Install - -``` -$ npm install slash -``` - - -## Usage - -```js -const path = require('path'); -const slash = require('slash'); - -const str = path.join('foo', 'bar'); -// Unix => foo/bar -// Windows => foo\\bar - -slash(str); -// Unix => foo/bar -// Windows => foo/bar -``` - - -## API - -### slash(path) - -Type: `string` - -Accepts a Windows backslash path and returns a slash path. - - -## License - -MIT © [Sindre Sorhus](https://sindresorhus.com) diff --git a/node_modules/jest-runtime/package.json b/node_modules/jest-runtime/package.json index bc2d926ca..f624b3349 100644 --- a/node_modules/jest-runtime/package.json +++ b/node_modules/jest-runtime/package.json @@ -1,80 +1,89 @@ { - "_args": [ - [ - "jest-runtime@24.8.0", - "/Users/drew.heavner/Documents/Github/sign-android-release" - ] - ], - "_development": true, - "_from": "jest-runtime@24.8.0", - "_id": "jest-runtime@24.8.0", + "_from": "jest-runtime@^24.9.0", + "_id": "jest-runtime@24.9.0", "_inBundle": false, - "_integrity": "sha512-Mq0aIXhvO/3bX44ccT+czU1/57IgOMyy80oM0XR/nyD5zgBcesF84BPabZi39pJVA6UXw+fY2Q1N+4BiVUBWOA==", + "_integrity": "sha512-8oNqgnmF3v2J6PVRM2Jfuj8oX3syKmaynlDMMKQ4iyzbQzIG6th5ub/lM2bCMTmoTKM3ykcUYI2Pw9xwNtjMnw==", "_location": "/jest-runtime", - "_phantomChildren": {}, + "_phantomChildren": { + "@babel/code-frame": "7.5.5", + "@types/istanbul-lib-coverage": "2.0.1", + "@types/istanbul-reports": "1.1.1", + "@types/stack-utils": "1.0.1", + "@types/yargs-parser": "15.0.0", + "callsites": "3.1.0", + "chalk": "2.4.2", + "graceful-fs": "4.2.0", + "micromatch": "3.1.10", + "slash": "2.0.0", + "source-map": "0.6.1", + "stack-utils": "1.0.2" + }, "_requested": { - "type": "version", + "type": "range", "registry": true, - "raw": "jest-runtime@24.8.0", + "raw": "jest-runtime@^24.9.0", "name": "jest-runtime", "escapedName": "jest-runtime", - "rawSpec": "24.8.0", + "rawSpec": "^24.9.0", "saveSpec": null, - "fetchSpec": "24.8.0" + "fetchSpec": "^24.9.0" }, "_requiredBy": [ - "/@jest/core", "/@jest/reporters", "/@jest/test-sequencer", "/jest-jasmine2", - "/jest-runner" + "/jest-runner", + "/jest/jest-cli/@jest/core" ], - "_resolved": "https://registry.npmjs.org/jest-runtime/-/jest-runtime-24.8.0.tgz", - "_spec": "24.8.0", - "_where": "/Users/drew.heavner/Documents/Github/sign-android-release", + "_resolved": "https://registry.npmjs.org/jest-runtime/-/jest-runtime-24.9.0.tgz", + "_shasum": "9f14583af6a4f7314a6a9d9f0226e1a781c8e4ac", + "_spec": "jest-runtime@^24.9.0", + "_where": "/Users/drew.heavner/Documents/Github/sign-android-release/node_modules/jest/node_modules/jest-cli/node_modules/@jest/core", "bin": { - "jest-runtime": "./bin/jest-runtime.js" + "jest-runtime": "bin/jest-runtime.js" }, "bugs": { "url": "https://github.com/facebook/jest/issues" }, + "bundleDependencies": false, "dependencies": { "@jest/console": "^24.7.1", - "@jest/environment": "^24.8.0", + "@jest/environment": "^24.9.0", "@jest/source-map": "^24.3.0", - "@jest/transform": "^24.8.0", - "@jest/types": "^24.8.0", - "@types/yargs": "^12.0.2", + "@jest/transform": "^24.9.0", + "@jest/types": "^24.9.0", + "@types/yargs": "^13.0.0", "chalk": "^2.0.1", "exit": "^0.1.2", "glob": "^7.1.3", "graceful-fs": "^4.1.15", - "jest-config": "^24.8.0", - "jest-haste-map": "^24.8.0", - "jest-message-util": "^24.8.0", - "jest-mock": "^24.8.0", + "jest-config": "^24.9.0", + "jest-haste-map": "^24.9.0", + "jest-message-util": "^24.9.0", + "jest-mock": "^24.9.0", "jest-regex-util": "^24.3.0", - "jest-resolve": "^24.8.0", - "jest-snapshot": "^24.8.0", - "jest-util": "^24.8.0", - "jest-validate": "^24.8.0", + "jest-resolve": "^24.9.0", + "jest-snapshot": "^24.9.0", + "jest-util": "^24.9.0", + "jest-validate": "^24.9.0", "realpath-native": "^1.1.0", "slash": "^2.0.0", "strip-bom": "^3.0.0", - "yargs": "^12.0.2" + "yargs": "^13.3.0" }, + "deprecated": false, "devDependencies": { "@types/exit": "^0.1.30", "@types/glob": "^7.1.1", "@types/graceful-fs": "^4.1.2", "@types/slash": "^2.0.0", "@types/strip-bom": "^3.0.0", - "jest-environment-node": "^24.8.0" + "jest-environment-node": "^24.9.0" }, "engines": { "node": ">= 6" }, - "gitHead": "845728f24b3ef41e450595c384e9b5c9fdf248a4", + "gitHead": "9ad0f4bc6b8bdd94989804226c28c9960d9da7d1", "homepage": "https://github.com/facebook/jest#readme", "license": "MIT", "main": "build/index.js", @@ -88,5 +97,5 @@ "directory": "packages/jest-runtime" }, "types": "build/index.d.ts", - "version": "24.8.0" + "version": "24.9.0" } diff --git a/node_modules/jest-runtime/tsconfig.json b/node_modules/jest-runtime/tsconfig.json deleted file mode 100644 index 2892d4eb0..000000000 --- a/node_modules/jest-runtime/tsconfig.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "extends": "../../tsconfig.json", - "compilerOptions": { - "rootDir": "src", - "outDir": "build" - }, - "references": [ - {"path": "../jest-config"}, - {"path": "../jest-console"}, - {"path": "../jest-environment"}, - {"path": "../jest-environment-node"}, - {"path": "../jest-haste-map"}, - {"path": "../jest-message-util"}, - {"path": "../jest-mock"}, - {"path": "../jest-regex-util"}, - {"path": "../jest-resolve"}, - {"path": "../jest-snapshot"}, - {"path": "../jest-source-map"}, - {"path": "../jest-types"}, - {"path": "../jest-util"}, - {"path": "../jest-validate"}, - {"path": "../pretty-format"} - ] -} diff --git a/node_modules/jest-serializer/LICENSE b/node_modules/jest-serializer/LICENSE index 10e779c44..b96dcb048 100644 --- a/node_modules/jest-serializer/LICENSE +++ b/node_modules/jest-serializer/LICENSE @@ -1,8 +1,6 @@ MIT License -For Jest software - -Copyright (c) 2014-present, Facebook, Inc. +Copyright (c) Facebook, Inc. and its affiliates. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/node_modules/jest-serializer/package.json b/node_modules/jest-serializer/package.json index 2d6e09b9f..f0175cb4a 100644 --- a/node_modules/jest-serializer/package.json +++ b/node_modules/jest-serializer/package.json @@ -1,41 +1,38 @@ { - "_args": [ - [ - "jest-serializer@24.4.0", - "/Users/drew.heavner/Documents/Github/sign-android-release" - ] - ], - "_development": true, - "_from": "jest-serializer@24.4.0", - "_id": "jest-serializer@24.4.0", + "_from": "jest-serializer@^24.9.0", + "_id": "jest-serializer@24.9.0", "_inBundle": false, - "_integrity": "sha512-k//0DtglVstc1fv+GY/VHDIjrtNjdYvYjMlbLUed4kxrE92sIUewOi5Hj3vrpB8CXfkJntRPDRjCrCvUhBdL8Q==", + "_integrity": "sha512-DxYipDr8OvfrKH3Kel6NdED3OXxjvxXZ1uIY2I9OFbGg+vUkkg7AGvi65qbhbWNPvDckXmzMPbK3u3HaDO49bQ==", "_location": "/jest-serializer", "_phantomChildren": {}, "_requested": { - "type": "version", + "type": "range", "registry": true, - "raw": "jest-serializer@24.4.0", + "raw": "jest-serializer@^24.9.0", "name": "jest-serializer", "escapedName": "jest-serializer", - "rawSpec": "24.4.0", + "rawSpec": "^24.9.0", "saveSpec": null, - "fetchSpec": "24.4.0" + "fetchSpec": "^24.9.0" }, "_requiredBy": [ - "/jest-haste-map" + "/jest-haste-map", + "/jest/jest-haste-map" ], - "_resolved": "https://registry.npmjs.org/jest-serializer/-/jest-serializer-24.4.0.tgz", - "_spec": "24.4.0", - "_where": "/Users/drew.heavner/Documents/Github/sign-android-release", + "_resolved": "https://registry.npmjs.org/jest-serializer/-/jest-serializer-24.9.0.tgz", + "_shasum": "e6d7d7ef96d31e8b9079a714754c5d5c58288e73", + "_spec": "jest-serializer@^24.9.0", + "_where": "/Users/drew.heavner/Documents/Github/sign-android-release/node_modules/jest-haste-map", "bugs": { "url": "https://github.com/facebook/jest/issues" }, + "bundleDependencies": false, + "deprecated": false, "description": "Module for serializing and deserializing object into memory and disk. By default, the `v8` implementations are used, but if not present, it defaults to `JSON` implementation. Both serializers have the advantage of being able to serialize `Map`, `Set`, `undefined`, `NaN`, etc, although the JSON one does it through a replacer/reviver.", "engines": { "node": ">= 6" }, - "gitHead": "a018000fc162db3cfd0ebf9f23fdb734f05821a6", + "gitHead": "9ad0f4bc6b8bdd94989804226c28c9960d9da7d1", "homepage": "https://github.com/facebook/jest#readme", "license": "MIT", "main": "build/index.js", @@ -49,5 +46,5 @@ "directory": "packages/jest-serializer" }, "types": "build/index.d.ts", - "version": "24.4.0" + "version": "24.9.0" } diff --git a/node_modules/jest-serializer/tsconfig.json b/node_modules/jest-serializer/tsconfig.json deleted file mode 100644 index 7bb06bce6..000000000 --- a/node_modules/jest-serializer/tsconfig.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "extends": "../../tsconfig.json", - "compilerOptions": { - "rootDir": "src", - "outDir": "build" - } -} diff --git a/node_modules/jest-snapshot/LICENSE b/node_modules/jest-snapshot/LICENSE index 10e779c44..b96dcb048 100644 --- a/node_modules/jest-snapshot/LICENSE +++ b/node_modules/jest-snapshot/LICENSE @@ -1,8 +1,6 @@ MIT License -For Jest software - -Copyright (c) 2014-present, Facebook, Inc. +Copyright (c) Facebook, Inc. and its affiliates. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/node_modules/jest-snapshot/build/State.d.ts b/node_modules/jest-snapshot/build/State.d.ts index d90cb014b..9f91c107e 100644 --- a/node_modules/jest-snapshot/build/State.d.ts +++ b/node_modules/jest-snapshot/build/State.d.ts @@ -24,6 +24,7 @@ export default class SnapshotState { private _index; private _updateSnapshot; private _snapshotData; + private _initialData; private _snapshotPath; private _inlineSnapshots; private _uncheckedKeys; @@ -37,6 +38,7 @@ export default class SnapshotState { constructor(snapshotPath: Config.Path, options: SnapshotStateOptions); markSnapshotsAsCheckedForTest(testName: string): void; private _addSnapshot; + clear(): void; save(): { deleted: boolean; saved: boolean; diff --git a/node_modules/jest-snapshot/build/State.d.ts.map b/node_modules/jest-snapshot/build/State.d.ts.map index a6a139acf..0b97fd3bd 100644 --- a/node_modules/jest-snapshot/build/State.d.ts.map +++ b/node_modules/jest-snapshot/build/State.d.ts.map @@ -1 +1 @@ -{"version":3,"file":"State.d.ts","sourceRoot":"","sources":["../src/State.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,OAAO,EAAC,MAAM,EAAC,MAAM,aAAa,CAAC;AAcnC,oBAA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Y,EAAE,MAAM,CAAC,IAAI,EAAE,OAAO,EAAE,oBAAoB;IAuBpE,6BAA6B,CAAC,QAAQ,EAAE,MAAM;IAQ9C,OAAO,CAAC,YAAY;IAwBpB,KAAK;IAWL,IAAI;;;;IA8BJ,iBAAiB,IAAI,MAAM;IAI3B,gBAAgB,IAAI,KAAK,CAAC,MAAM,CAAC;IAIjC,mBAAmB,IAAI,IAAI;IAQ3B,KAAK,CAAC,EACJ,QAAQ,EACR,QAAQ,EACR,GAAG,EACH,cAAc,EACd,KAAK,GACN,EAAE,oBAAoB;;;;;;;IA4FvB,IAAI,CAAC,QAAQ,EAAE,MAAM,EAAE,SAAS,EAAE,GAAG,EAAE,GAAG,CAAC,EAAE,MAAM;CAYpD"} \ No newline at end of file diff --git a/node_modules/jest-snapshot/build/State.js b/node_modules/jest-snapshot/build/State.js index b8b6a865c..16b15e746 100644 --- a/node_modules/jest-snapshot/build/State.js +++ b/node_modules/jest-snapshot/build/State.js @@ -50,6 +50,8 @@ class SnapshotState { _defineProperty(this, '_snapshotData', void 0); + _defineProperty(this, '_initialData', void 0); + _defineProperty(this, '_snapshotPath', void 0); _defineProperty(this, '_inlineSnapshots', void 0); @@ -79,6 +81,7 @@ class SnapshotState { data = _getSnapshotData.data, dirty = _getSnapshotData.dirty; + this._initialData = data; this._snapshotData = data; this._dirty = dirty; this._getBabelTraverse = options.getBabelTraverse; @@ -126,6 +129,17 @@ class SnapshotState { } } + clear() { + this._snapshotData = this._initialData; + this._inlineSnapshots = []; + this._counters = new Map(); + this._index = 0; + this.added = 0; + this.matched = 0; + this.unmatched = 0; + this.updated = 0; + } + save() { const hasExternalSnapshots = Object.keys(this._snapshotData).length; const hasInlineSnapshots = this._inlineSnapshots.length; diff --git a/node_modules/jest-snapshot/build/index.d.ts b/node_modules/jest-snapshot/build/index.d.ts index ca1d39910..05d7a5463 100644 --- a/node_modules/jest-snapshot/build/index.d.ts +++ b/node_modules/jest-snapshot/build/index.d.ts @@ -17,8 +17,9 @@ declare const JestSnapshot: { SnapshotState: typeof SnapshotState; addSerializer: (plugin: import("pretty-format/build/types").Plugin) => void; buildSnapshotResolver: (config: Config.ProjectConfig) => JestSnapshotResolver; - cleanup: (hasteFS: import("../../jest-haste-map/build/HasteFS").default, update: Config.SnapshotUpdateState, snapshotResolver: JestSnapshotResolver) => { + cleanup: (hasteFS: import("jest-haste-map/build/HasteFS").default, update: Config.SnapshotUpdateState, snapshotResolver: JestSnapshotResolver, testPathIgnorePatterns?: string[] | undefined) => { filesRemoved: number; + filesRemovedList: string[]; }; getSerializers: () => import("pretty-format/build/types").Plugin[]; isSnapshotPath: (path: string) => boolean; diff --git a/node_modules/jest-snapshot/build/index.d.ts.map b/node_modules/jest-snapshot/build/index.d.ts.map index a7c72b043..a59a321c1 100644 --- a/node_modules/jest-snapshot/build/index.d.ts.map +++ b/node_modules/jest-snapshot/build/index.d.ts.map @@ -1 +1 @@ -{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,OAAO,EAAC,MAAM,EAAC,MAAM,aAAa,CAAC;AAEnC,OAAO,EAAC,YAAY,EAAC,MAAM,QAAQ,CAAC;AAUpC,OAAO,EAGL,gBAAgB,IAAI,oBAAoB,EAEzC,MAAM,qBAAqB,CAAC;AAC7B,OAAO,aAAa,MAAM,SAAS,CAAC;AAEpC,OAAO,KAAK,KAAK,MAAM,SAAS,CAAC;AAEjC,aAAK,OAAO,GAAG,YAAY,GAAG;IAC5B,aAAa,EAAE,aAAa,CAAC;CAC9B,CAAC;AAobF,QAAA,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAajB,CAAC;AAEF,kBAAU,YAAY,CAAC;IACrB,KAAY,gBAAgB,GAAG,oBAAoB,CAAC;IACpD,KAAY,iBAAiB,GAAG,aAAa,CAAC;CAC/C;AAED,SAAS,YAAY,CAAC"} \ No newline at end of file +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,OAAO,EAAC,MAAM,EAAC,MAAM,aAAa,CAAC;AAEnC,OAAO,EAAC,YAAY,EAAC,MAAM,QAAQ,CAAC;AAQpC,OAAO,EAGL,gBAAgB,IAAI,oBAAoB,EAEzC,MAAM,qBAAqB,CAAC;AAC7B,OAAO,aAAa,MAAM,SAAS,CAAC;AAGpC,OAAO,KAAK,KAAK,MAAM,SAAS,CAAC;AAEjC,aAAK,OAAO,GAAG,YAAY,GAAG;IAC5B,aAAa,EAAE,aAAa,CAAC;CAC9B,CAAC;AAidF,QAAA,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAajB,CAAC;AAEF,kBAAU,YAAY,CAAC;IACrB,KAAY,gBAAgB,GAAG,oBAAoB,CAAC;IACpD,KAAY,iBAAiB,GAAG,aAAa,CAAC;CAC/C;AAED,SAAS,YAAY,CAAC"} \ No newline at end of file diff --git a/node_modules/jest-snapshot/build/index.js b/node_modules/jest-snapshot/build/index.js index 3601020a8..279b027a6 100644 --- a/node_modules/jest-snapshot/build/index.js +++ b/node_modules/jest-snapshot/build/index.js @@ -2,8 +2,6 @@ var _fs = _interopRequireDefault(require('fs')); -var _jestDiff = _interopRequireDefault(require('jest-diff')); - var _jestMatcherUtils = require('jest-matcher-utils'); var _snapshot_resolver = require('./snapshot_resolver'); @@ -12,6 +10,8 @@ var _State = _interopRequireDefault(require('./State')); var _plugins = require('./plugins'); +var _print = require('./print'); + var utils = _interopRequireWildcard(require('./utils')); function _interopRequireWildcard(obj) { @@ -54,7 +54,8 @@ const DID_NOT_THROW = 'Received function did not throw'; // same as toThrow const NOT_SNAPSHOT_MATCHERS = `.${(0, _jestMatcherUtils.BOLD_WEIGHT)( 'not' )} cannot be used with snapshot matchers`; -const HINT_ARG = (0, _jestMatcherUtils.BOLD_WEIGHT)('hint'); +const HINT_ARG = 'hint'; +const HINT_COLOR = _jestMatcherUtils.BOLD_WEIGHT; const INLINE_SNAPSHOT_ARG = 'snapshot'; const PROPERTY_MATCHERS_ARG = 'properties'; const INDENTATION_REGEX = /^([^\S\n]*)\S/m; // Display name in report when matcher fails same as in snapshot file, @@ -121,22 +122,35 @@ function stripAddedIndentation(inlineSnapshot) { const fileExists = (filePath, hasteFS) => hasteFS.exists(filePath) || jestExistsFile(filePath); -const cleanup = (hasteFS, update, snapshotResolver) => { +const cleanup = (hasteFS, update, snapshotResolver, testPathIgnorePatterns) => { const pattern = '\\.' + _snapshot_resolver.EXTENSION + '$'; const files = hasteFS.matchFiles(pattern); - const filesRemoved = files.reduce((acc, snapshotFile) => { - if (!fileExists(snapshotResolver.resolveTestPath(snapshotFile), hasteFS)) { + let testIgnorePatternsRegex = null; + + if (testPathIgnorePatterns && testPathIgnorePatterns.length > 0) { + testIgnorePatternsRegex = new RegExp(testPathIgnorePatterns.join('|')); + } + + const list = files.filter(snapshotFile => { + const testPath = snapshotResolver.resolveTestPath(snapshotFile); // ignore snapshots of ignored tests + + if (testIgnorePatternsRegex && testIgnorePatternsRegex.test(testPath)) { + return false; + } + + if (!fileExists(testPath, hasteFS)) { if (update === 'all') { _fs.default.unlinkSync(snapshotFile); } - return acc + 1; + return true; } - return acc; - }, 0); + return false; + }); return { - filesRemoved + filesRemoved: list.length, + filesRemovedList: list }; }; @@ -168,6 +182,14 @@ const toMatchSnapshot = function toMatchSnapshot( secondArgument }; + if (expectedArgument === HINT_ARG) { + options.expectedColor = HINT_COLOR; + } + + if (secondArgument === HINT_ARG) { + options.secondArgumentColor = HINT_COLOR; + } + if (arguments.length === 3 && !propertyMatchers) { throw new Error( 'Property matchers must be an object.\n\nTo provide a snapshot test name without property matchers, use: toMatchSnapshot("name")' @@ -347,19 +369,20 @@ const _toMatchSnapshot = ({ `${actual}`; } else { expected = (expected || '').trim(); - actual = (actual || '').trim(); - const diffMessage = (0, _jestDiff.default)(expected, actual, { - aAnnotation: 'Snapshot', - bAnnotation: 'Received', - expand: snapshotState.expand - }); + actual = (actual || '').trim(); // Assign to local variable because of declaration let expected: + // TypeScript thinks it could change before report function is called. + + const printed = (0, _print.printDiffOrStringified)( + expected, + actual, + received, + 'Snapshot', + 'Received', + snapshotState.expand + ); report = () => - `Snapshot name: ${printName(currentTestName, hint, count)}\n\n` + - (diffMessage || - (0, _jestMatcherUtils.EXPECTED_COLOR)('- ' + (expected || '')) + - '\n' + - (0, _jestMatcherUtils.RECEIVED_COLOR)('+ ' + actual)); + `Snapshot name: ${printName(currentTestName, hint, count)}\n\n` + printed; } // Passing the actual and expected objects so that a custom reporter // could access them, for example in order to display a custom visual diff, // or create a different error message @@ -391,6 +414,7 @@ const toThrowErrorMatchingSnapshot = function toThrowErrorMatchingSnapshot( const expectedArgument = typeof hint === 'string' && hint.length !== 0 ? HINT_ARG : ''; const options = { + expectedColor: HINT_COLOR, isNot: this.isNot, promise: this.promise, secondArgument: '' diff --git a/node_modules/jest-snapshot/build/inline_snapshots.js b/node_modules/jest-snapshot/build/inline_snapshots.js index d6cc2d921..66965e121 100644 --- a/node_modules/jest-snapshot/build/inline_snapshots.js +++ b/node_modules/jest-snapshot/build/inline_snapshots.js @@ -154,7 +154,15 @@ const groupSnapshotsByFrame = groupSnapshotsBy(({frame: {line, column}}) => const groupSnapshotsByFile = groupSnapshotsBy(({frame: {file}}) => file); const indent = (snapshot, numIndents, indentation) => { - const lines = snapshot.split('\n'); + const lines = snapshot.split('\n'); // Prevent re-identation of inline snapshots. + + if ( + lines.length >= 2 && + lines[1].startsWith(indentation.repeat(numIndents + 1)) + ) { + return snapshot; + } + return lines .map((line, index) => { if (index === 0) { diff --git a/node_modules/jest-snapshot/build/snapshot_resolver.js b/node_modules/jest-snapshot/build/snapshot_resolver.js index 13150b9a8..dabab1807 100644 --- a/node_modules/jest-snapshot/build/snapshot_resolver.js +++ b/node_modules/jest-snapshot/build/snapshot_resolver.js @@ -110,9 +110,7 @@ function verifyConsistentTransformations(custom) { if (resolvedTestPath !== custom.testPathForConsistencyCheck) { throw new Error( _chalk.default.bold( - `Custom snapshot resolver functions must transform paths consistently, i.e. expects resolveTestPath(resolveSnapshotPath('${ - custom.testPathForConsistencyCheck - }')) === ${resolvedTestPath}` + `Custom snapshot resolver functions must transform paths consistently, i.e. expects resolveTestPath(resolveSnapshotPath('${custom.testPathForConsistencyCheck}')) === ${resolvedTestPath}` ) ); } diff --git a/node_modules/jest-snapshot/build/types.d.ts b/node_modules/jest-snapshot/build/types.d.ts index 0c236a9c7..196912315 100644 --- a/node_modules/jest-snapshot/build/types.d.ts +++ b/node_modules/jest-snapshot/build/types.d.ts @@ -4,7 +4,5 @@ * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ -export declare type SnapshotData = { - [key: string]: string; -}; +export declare type SnapshotData = Record; //# sourceMappingURL=types.d.ts.map \ No newline at end of file diff --git a/node_modules/jest-snapshot/build/types.d.ts.map b/node_modules/jest-snapshot/build/types.d.ts.map index 6deedd1ea..659c550e2 100644 --- a/node_modules/jest-snapshot/build/types.d.ts.map +++ b/node_modules/jest-snapshot/build/types.d.ts.map @@ -1 +1 @@ -{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,oBAAY,YAAY,GAAG;IAAC,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAA;CAAC,CAAC"} \ No newline at end of file +{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,oBAAY,YAAY,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC"} \ No newline at end of file diff --git a/node_modules/jest-snapshot/build/utils.d.ts b/node_modules/jest-snapshot/build/utils.d.ts index cd2db13a8..940f248d1 100644 --- a/node_modules/jest-snapshot/build/utils.d.ts +++ b/node_modules/jest-snapshot/build/utils.d.ts @@ -5,22 +5,19 @@ * LICENSE file in the root directory of this source tree. */ import { Config } from '@jest/types'; -import { SnapshotData } from './types'; export declare const SNAPSHOT_VERSION = "1"; export declare const SNAPSHOT_GUIDE_LINK = "https://goo.gl/fbAQLP"; export declare const SNAPSHOT_VERSION_WARNING: string; export declare const testNameToKey: (testName: string, count: number) => string; export declare const keyToTestName: (key: string) => string; export declare const getSnapshotData: (snapshotPath: string, update: Config.SnapshotUpdateState) => { - data: SnapshotData; + data: Record; dirty: boolean; }; export declare const serialize: (data: string) => string; export declare const unescape: (data: string) => string; export declare const escapeBacktickString: (str: string) => string; export declare const ensureDirectoryExists: (filePath: string) => void; -export declare const saveSnapshotFile: (snapshotData: { - [key: string]: string; -}, snapshotPath: string) => void; +export declare const saveSnapshotFile: (snapshotData: Record, snapshotPath: string) => void; export declare const deepMerge: (target: any, source: any) => any; //# sourceMappingURL=utils.d.ts.map \ No newline at end of file diff --git a/node_modules/jest-snapshot/build/utils.d.ts.map b/node_modules/jest-snapshot/build/utils.d.ts.map index d903a3dcb..0b2157e59 100644 --- a/node_modules/jest-snapshot/build/utils.d.ts.map +++ b/node_modules/jest-snapshot/build/utils.d.ts.map @@ -1 +1 @@ -{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../src/utils.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAOH,OAAO,EAAC,MAAM,EAAC,MAAM,aAAa,CAAC;AAGnC,OAAO,EAAC,YAAY,EAAC,MAAM,SAAS,CAAC;AAErC,eAAO,MAAM,gBAAgB,MAAM,CAAC;AAEpC,eAAO,MAAM,mBAAmB,0BAA0B,CAAC;AAC3D,eAAO,MAAM,wBAAwB,QAIpC,CAAC;AAwDF,eAAO,MAAM,aAAa,6CACF,CAAC;AAEzB,eAAO,MAAM,aAAa,yBAMzB,CAAC;AAEF,eAAO,MAAM,eAAe;;;CAgC3B,CAAC;AAOF,eAAO,MAAM,SAAS,0BASnB,CAAC;AAGJ,eAAO,MAAM,QAAQ,0BAAyD,CAAC;AAE/E,eAAO,MAAM,oBAAoB,yBACC,CAAC;AAKnC,eAAO,MAAM,qBAAqB,4BAIjC,CAAC;AAIF,eAAO,MAAM,gBAAgB;;gCAoB5B,CAAC;AAEF,eAAO,MAAM,SAAS,mCAarB,CAAC"} \ No newline at end of file +{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../src/utils.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAOH,OAAO,EAAC,MAAM,EAAC,MAAM,aAAa,CAAC;AAKnC,eAAO,MAAM,gBAAgB,MAAM,CAAC;AAEpC,eAAO,MAAM,mBAAmB,0BAA0B,CAAC;AAC3D,eAAO,MAAM,wBAAwB,QAIpC,CAAC;AAwDF,eAAO,MAAM,aAAa,6CACF,CAAC;AAEzB,eAAO,MAAM,aAAa,yBAMzB,CAAC;AAEF,eAAO,MAAM,eAAe;;;CAgC3B,CAAC;AAOF,eAAO,MAAM,SAAS,0BASnB,CAAC;AAGJ,eAAO,MAAM,QAAQ,0BAAyD,CAAC;AAE/E,eAAO,MAAM,oBAAoB,yBACC,CAAC;AAKnC,eAAO,MAAM,qBAAqB,4BAIjC,CAAC;AAIF,eAAO,MAAM,gBAAgB,sEAoB5B,CAAC;AAqBF,eAAO,MAAM,SAAS,mCAerB,CAAC"} \ No newline at end of file diff --git a/node_modules/jest-snapshot/build/utils.js b/node_modules/jest-snapshot/build/utils.js index 1b1aa3932..dc3d4efc5 100644 --- a/node_modules/jest-snapshot/build/utils.js +++ b/node_modules/jest-snapshot/build/utils.js @@ -253,6 +253,23 @@ const saveSnapshotFile = (snapshotData, snapshotPath) => { exports.saveSnapshotFile = saveSnapshotFile; +const deepMergeArray = (target, source) => { + const mergedOutput = Array.from(target); + source.forEach((sourceElement, index) => { + const targetElement = mergedOutput[index]; + + if (Array.isArray(target[index])) { + mergedOutput[index] = deepMergeArray(target[index], sourceElement); + } else if (isObject(targetElement)) { + mergedOutput[index] = deepMerge(target[index], sourceElement); + } else { + // Source does not exist in target or target is primitive and cannot be deep merged + mergedOutput[index] = sourceElement; + } + }); + return mergedOutput; +}; + const deepMerge = (target, source) => { const mergedOutput = _objectSpread({}, target); @@ -264,6 +281,8 @@ const deepMerge = (target, source) => { [key]: source[key] }); else mergedOutput[key] = deepMerge(target[key], source[key]); + } else if (Array.isArray(source[key])) { + mergedOutput[key] = deepMergeArray(target[key], source[key]); } else { Object.assign(mergedOutput, { [key]: source[key] diff --git a/node_modules/jest-snapshot/node_modules/.bin/semver b/node_modules/jest-snapshot/node_modules/.bin/semver index 317eb293d..5aaadf42c 120000 --- a/node_modules/jest-snapshot/node_modules/.bin/semver +++ b/node_modules/jest-snapshot/node_modules/.bin/semver @@ -1 +1 @@ -../semver/bin/semver \ No newline at end of file +../semver/bin/semver.js \ No newline at end of file diff --git a/node_modules/jest-snapshot/node_modules/semver/CHANGELOG.md b/node_modules/jest-snapshot/node_modules/semver/CHANGELOG.md index 66304fdd2..f567dd3fe 100644 --- a/node_modules/jest-snapshot/node_modules/semver/CHANGELOG.md +++ b/node_modules/jest-snapshot/node_modules/semver/CHANGELOG.md @@ -1,5 +1,36 @@ # changes log +## 6.2.0 + +* Coerce numbers to strings when passed to semver.coerce() +* Add `rtl` option to coerce from right to left + +## 6.1.3 + +* Handle X-ranges properly in includePrerelease mode + +## 6.1.2 + +* Do not throw when testing invalid version strings + +## 6.1.1 + +* Add options support for semver.coerce() +* Handle undefined version passed to Range.test + +## 6.1.0 + +* Add semver.compareBuild function +* Support `*` in semver.intersects + +## 6.0 + +* Fix `intersects` logic. + + This is technically a bug fix, but since it is also a change to behavior + that may require users updating their code, it is marked as a major + version increment. + ## 5.7 * Add `minVersion` method diff --git a/node_modules/jest-snapshot/node_modules/semver/README.md b/node_modules/jest-snapshot/node_modules/semver/README.md index e5ccececf..2293a14fd 100644 --- a/node_modules/jest-snapshot/node_modules/semver/README.md +++ b/node_modules/jest-snapshot/node_modules/semver/README.md @@ -4,7 +4,7 @@ semver(1) -- The semantic versioner for npm ## Install ```bash -npm install --save semver +npm install semver ```` ## Usage @@ -60,6 +60,12 @@ Options: Coerce a string into SemVer if possible (does not imply --loose) +--rtl + Coerce version strings right to left + +--ltr + Coerce version strings left to right (default) + Program exits successfully if any valid version satisfies all supplied ranges, and prints all satisfying versions. @@ -231,7 +237,7 @@ comparator. Allows minor-level changes if not. #### Caret Ranges `^1.2.3` `^0.2.5` `^0.0.4` -Allows changes that do not modify the left-most non-zero digit in the +Allows changes that do not modify the left-most non-zero element in the `[major, minor, patch]` tuple. In other words, this allows patch and minor updates for versions `1.0.0` and above, patch updates for versions `0.X >=0.1.0`, and *no* updates for versions `0.0.X`. @@ -354,6 +360,9 @@ strings that they parse. `v2` is greater. Sorts in ascending order if passed to `Array.sort()`. * `rcompare(v1, v2)`: The reverse of compare. Sorts an array of versions in descending order when passed to `Array.sort()`. +* `compareBuild(v1, v2)`: The same as `compare` but considers `build` when two versions + are equal. Sorts in ascending order if passed to `Array.sort()`. + `v2` is greater. Sorts in ascending order if passed to `Array.sort()`. * `diff(v1, v2)`: Returns difference between two versions by the release type (`major`, `premajor`, `minor`, `preminor`, `patch`, `prepatch`, or `prerelease`), or null if the versions are the same. @@ -396,16 +405,39 @@ range, use the `satisfies(version, range)` function. ### Coercion -* `coerce(version)`: Coerces a string to semver if possible - -This aims to provide a very forgiving translation of a non-semver -string to semver. It looks for the first digit in a string, and -consumes all remaining characters which satisfy at least a partial semver -(e.g., `1`, `1.2`, `1.2.3`) up to the max permitted length (256 characters). -Longer versions are simply truncated (`4.6.3.9.2-alpha2` becomes `4.6.3`). -All surrounding text is simply ignored (`v3.4 replaces v3.3.1` becomes `3.4.0`). -Only text which lacks digits will fail coercion (`version one` is not valid). -The maximum length for any semver component considered for coercion is 16 characters; -longer components will be ignored (`10000000000000000.4.7.4` becomes `4.7.4`). -The maximum value for any semver component is `Integer.MAX_SAFE_INTEGER || (2**53 - 1)`; -higher value components are invalid (`9999999999999999.4.7.4` is likely invalid). +* `coerce(version, options)`: Coerces a string to semver if possible + +This aims to provide a very forgiving translation of a non-semver string to +semver. It looks for the first digit in a string, and consumes all +remaining characters which satisfy at least a partial semver (e.g., `1`, +`1.2`, `1.2.3`) up to the max permitted length (256 characters). Longer +versions are simply truncated (`4.6.3.9.2-alpha2` becomes `4.6.3`). All +surrounding text is simply ignored (`v3.4 replaces v3.3.1` becomes +`3.4.0`). Only text which lacks digits will fail coercion (`version one` +is not valid). The maximum length for any semver component considered for +coercion is 16 characters; longer components will be ignored +(`10000000000000000.4.7.4` becomes `4.7.4`). The maximum value for any +semver component is `Integer.MAX_SAFE_INTEGER || (2**53 - 1)`; higher value +components are invalid (`9999999999999999.4.7.4` is likely invalid). + +If the `options.rtl` flag is set, then `coerce` will return the right-most +coercible tuple that does not share an ending index with a longer coercible +tuple. For example, `1.2.3.4` will return `2.3.4` in rtl mode, not +`4.0.0`. `1.2.3/4` will return `4.0.0`, because the `4` is not a part of +any other overlapping SemVer tuple. + +### Clean + +* `clean(version)`: Clean a string to be a valid semver if possible + +This will return a cleaned and trimmed semver version. If the provided version is not valid a null will be returned. This does not work for ranges. + +ex. +* `s.clean(' = v 2.1.5foo')`: `null` +* `s.clean(' = v 2.1.5foo', { loose: true })`: `'2.1.5-foo'` +* `s.clean(' = v 2.1.5-foo')`: `null` +* `s.clean(' = v 2.1.5-foo', { loose: true })`: `'2.1.5-foo'` +* `s.clean('=v2.1.5')`: `'2.1.5'` +* `s.clean(' =v2.1.5')`: `2.1.5` +* `s.clean(' 2.1.5 ')`: `'2.1.5'` +* `s.clean('~1.0.0')`: `null` diff --git a/node_modules/jest-snapshot/node_modules/semver/bin/semver b/node_modules/jest-snapshot/node_modules/semver/bin/semver deleted file mode 100755 index 801e77f13..000000000 --- a/node_modules/jest-snapshot/node_modules/semver/bin/semver +++ /dev/null @@ -1,160 +0,0 @@ -#!/usr/bin/env node -// Standalone semver comparison program. -// Exits successfully and prints matching version(s) if -// any supplied version is valid and passes all tests. - -var argv = process.argv.slice(2) - -var versions = [] - -var range = [] - -var inc = null - -var version = require('../package.json').version - -var loose = false - -var includePrerelease = false - -var coerce = false - -var identifier - -var semver = require('../semver') - -var reverse = false - -var options = {} - -main() - -function main () { - if (!argv.length) return help() - while (argv.length) { - var a = argv.shift() - var indexOfEqualSign = a.indexOf('=') - if (indexOfEqualSign !== -1) { - a = a.slice(0, indexOfEqualSign) - argv.unshift(a.slice(indexOfEqualSign + 1)) - } - switch (a) { - case '-rv': case '-rev': case '--rev': case '--reverse': - reverse = true - break - case '-l': case '--loose': - loose = true - break - case '-p': case '--include-prerelease': - includePrerelease = true - break - case '-v': case '--version': - versions.push(argv.shift()) - break - case '-i': case '--inc': case '--increment': - switch (argv[0]) { - case 'major': case 'minor': case 'patch': case 'prerelease': - case 'premajor': case 'preminor': case 'prepatch': - inc = argv.shift() - break - default: - inc = 'patch' - break - } - break - case '--preid': - identifier = argv.shift() - break - case '-r': case '--range': - range.push(argv.shift()) - break - case '-c': case '--coerce': - coerce = true - break - case '-h': case '--help': case '-?': - return help() - default: - versions.push(a) - break - } - } - - var options = { loose: loose, includePrerelease: includePrerelease } - - versions = versions.map(function (v) { - return coerce ? (semver.coerce(v) || { version: v }).version : v - }).filter(function (v) { - return semver.valid(v) - }) - if (!versions.length) return fail() - if (inc && (versions.length !== 1 || range.length)) { return failInc() } - - for (var i = 0, l = range.length; i < l; i++) { - versions = versions.filter(function (v) { - return semver.satisfies(v, range[i], options) - }) - if (!versions.length) return fail() - } - return success(versions) -} - -function failInc () { - console.error('--inc can only be used on a single version with no range') - fail() -} - -function fail () { process.exit(1) } - -function success () { - var compare = reverse ? 'rcompare' : 'compare' - versions.sort(function (a, b) { - return semver[compare](a, b, options) - }).map(function (v) { - return semver.clean(v, options) - }).map(function (v) { - return inc ? semver.inc(v, inc, options, identifier) : v - }).forEach(function (v, i, _) { console.log(v) }) -} - -function help () { - console.log(['SemVer ' + version, - '', - 'A JavaScript implementation of the https://semver.org/ specification', - 'Copyright Isaac Z. Schlueter', - '', - 'Usage: semver [options] [ [...]]', - 'Prints valid versions sorted by SemVer precedence', - '', - 'Options:', - '-r --range ', - ' Print versions that match the specified range.', - '', - '-i --increment []', - ' Increment a version by the specified level. Level can', - ' be one of: major, minor, patch, premajor, preminor,', - " prepatch, or prerelease. Default level is 'patch'.", - ' Only one version may be specified.', - '', - '--preid ', - ' Identifier to be used to prefix premajor, preminor,', - ' prepatch or prerelease version increments.', - '', - '-l --loose', - ' Interpret versions and ranges loosely', - '', - '-p --include-prerelease', - ' Always include prerelease versions in range matching', - '', - '-c --coerce', - ' Coerce a string into SemVer if possible', - ' (does not imply --loose)', - '', - 'Program exits successfully if any valid version satisfies', - 'all supplied ranges, and prints all satisfying versions.', - '', - 'If no satisfying versions are found, then exits failure.', - '', - 'Versions are printed in ascending order, so supplying', - 'multiple versions to the utility will just sort them.' - ].join('\n')) -} diff --git a/node_modules/jest-snapshot/node_modules/semver/package.json b/node_modules/jest-snapshot/node_modules/semver/package.json index 2919dd7d3..a5cd26aab 100644 --- a/node_modules/jest-snapshot/node_modules/semver/package.json +++ b/node_modules/jest-snapshot/node_modules/semver/package.json @@ -1,42 +1,38 @@ { - "_args": [ - [ - "semver@5.7.0", - "/Users/drew.heavner/Documents/Github/sign-android-release" - ] - ], - "_development": true, - "_from": "semver@5.7.0", - "_id": "semver@5.7.0", + "_from": "semver@^6.2.0", + "_id": "semver@6.3.0", "_inBundle": false, - "_integrity": "sha512-Ya52jSX2u7QKghxeoFGpLwCtGlt7j0oY9DYb5apt9nPlJ42ID+ulTXESnt/qAQcoSERyZ5sl3LDIOw0nAn/5DA==", + "_integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", "_location": "/jest-snapshot/semver", "_phantomChildren": {}, "_requested": { - "type": "version", + "type": "range", "registry": true, - "raw": "semver@5.7.0", + "raw": "semver@^6.2.0", "name": "semver", "escapedName": "semver", - "rawSpec": "5.7.0", + "rawSpec": "^6.2.0", "saveSpec": null, - "fetchSpec": "5.7.0" + "fetchSpec": "^6.2.0" }, "_requiredBy": [ "/jest-snapshot" ], - "_resolved": "https://registry.npmjs.org/semver/-/semver-5.7.0.tgz", - "_spec": "5.7.0", - "_where": "/Users/drew.heavner/Documents/Github/sign-android-release", + "_resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", + "_shasum": "ee0a64c8af5e8ceea67687b133761e1becbd1d3d", + "_spec": "semver@^6.2.0", + "_where": "/Users/drew.heavner/Documents/Github/sign-android-release/node_modules/jest-snapshot", "bin": { - "semver": "./bin/semver" + "semver": "bin/semver.js" }, "bugs": { "url": "https://github.com/npm/node-semver/issues" }, + "bundleDependencies": false, + "deprecated": false, "description": "The semantic version parser used by npm.", "devDependencies": { - "tap": "^13.0.0-rc.18" + "tap": "^14.3.1" }, "files": [ "bin", @@ -52,7 +48,7 @@ "url": "git+https://github.com/npm/node-semver.git" }, "scripts": { - "postpublish": "git push origin --all; git push origin --tags", + "postpublish": "git push origin --follow-tags", "postversion": "npm publish", "preversion": "npm test", "test": "tap" @@ -60,5 +56,5 @@ "tap": { "check-coverage": true }, - "version": "5.7.0" + "version": "6.3.0" } diff --git a/node_modules/jest-snapshot/node_modules/semver/semver.js b/node_modules/jest-snapshot/node_modules/semver/semver.js index d315d5d68..636fa4365 100644 --- a/node_modules/jest-snapshot/node_modules/semver/semver.js +++ b/node_modules/jest-snapshot/node_modules/semver/semver.js @@ -29,75 +29,80 @@ var MAX_SAFE_COMPONENT_LENGTH = 16 // The actual regexps go on exports.re var re = exports.re = [] var src = exports.src = [] +var t = exports.tokens = {} var R = 0 +function tok (n) { + t[n] = R++ +} + // The following Regular Expressions can be used for tokenizing, // validating, and parsing SemVer version strings. // ## Numeric Identifier // A single `0`, or a non-zero digit followed by zero or more digits. -var NUMERICIDENTIFIER = R++ -src[NUMERICIDENTIFIER] = '0|[1-9]\\d*' -var NUMERICIDENTIFIERLOOSE = R++ -src[NUMERICIDENTIFIERLOOSE] = '[0-9]+' +tok('NUMERICIDENTIFIER') +src[t.NUMERICIDENTIFIER] = '0|[1-9]\\d*' +tok('NUMERICIDENTIFIERLOOSE') +src[t.NUMERICIDENTIFIERLOOSE] = '[0-9]+' // ## Non-numeric Identifier // Zero or more digits, followed by a letter or hyphen, and then zero or // more letters, digits, or hyphens. -var NONNUMERICIDENTIFIER = R++ -src[NONNUMERICIDENTIFIER] = '\\d*[a-zA-Z-][a-zA-Z0-9-]*' +tok('NONNUMERICIDENTIFIER') +src[t.NONNUMERICIDENTIFIER] = '\\d*[a-zA-Z-][a-zA-Z0-9-]*' // ## Main Version // Three dot-separated numeric identifiers. -var MAINVERSION = R++ -src[MAINVERSION] = '(' + src[NUMERICIDENTIFIER] + ')\\.' + - '(' + src[NUMERICIDENTIFIER] + ')\\.' + - '(' + src[NUMERICIDENTIFIER] + ')' +tok('MAINVERSION') +src[t.MAINVERSION] = '(' + src[t.NUMERICIDENTIFIER] + ')\\.' + + '(' + src[t.NUMERICIDENTIFIER] + ')\\.' + + '(' + src[t.NUMERICIDENTIFIER] + ')' -var MAINVERSIONLOOSE = R++ -src[MAINVERSIONLOOSE] = '(' + src[NUMERICIDENTIFIERLOOSE] + ')\\.' + - '(' + src[NUMERICIDENTIFIERLOOSE] + ')\\.' + - '(' + src[NUMERICIDENTIFIERLOOSE] + ')' +tok('MAINVERSIONLOOSE') +src[t.MAINVERSIONLOOSE] = '(' + src[t.NUMERICIDENTIFIERLOOSE] + ')\\.' + + '(' + src[t.NUMERICIDENTIFIERLOOSE] + ')\\.' + + '(' + src[t.NUMERICIDENTIFIERLOOSE] + ')' // ## Pre-release Version Identifier // A numeric identifier, or a non-numeric identifier. -var PRERELEASEIDENTIFIER = R++ -src[PRERELEASEIDENTIFIER] = '(?:' + src[NUMERICIDENTIFIER] + - '|' + src[NONNUMERICIDENTIFIER] + ')' +tok('PRERELEASEIDENTIFIER') +src[t.PRERELEASEIDENTIFIER] = '(?:' + src[t.NUMERICIDENTIFIER] + + '|' + src[t.NONNUMERICIDENTIFIER] + ')' -var PRERELEASEIDENTIFIERLOOSE = R++ -src[PRERELEASEIDENTIFIERLOOSE] = '(?:' + src[NUMERICIDENTIFIERLOOSE] + - '|' + src[NONNUMERICIDENTIFIER] + ')' +tok('PRERELEASEIDENTIFIERLOOSE') +src[t.PRERELEASEIDENTIFIERLOOSE] = '(?:' + src[t.NUMERICIDENTIFIERLOOSE] + + '|' + src[t.NONNUMERICIDENTIFIER] + ')' // ## Pre-release Version // Hyphen, followed by one or more dot-separated pre-release version // identifiers. -var PRERELEASE = R++ -src[PRERELEASE] = '(?:-(' + src[PRERELEASEIDENTIFIER] + - '(?:\\.' + src[PRERELEASEIDENTIFIER] + ')*))' +tok('PRERELEASE') +src[t.PRERELEASE] = '(?:-(' + src[t.PRERELEASEIDENTIFIER] + + '(?:\\.' + src[t.PRERELEASEIDENTIFIER] + ')*))' -var PRERELEASELOOSE = R++ -src[PRERELEASELOOSE] = '(?:-?(' + src[PRERELEASEIDENTIFIERLOOSE] + - '(?:\\.' + src[PRERELEASEIDENTIFIERLOOSE] + ')*))' +tok('PRERELEASELOOSE') +src[t.PRERELEASELOOSE] = '(?:-?(' + src[t.PRERELEASEIDENTIFIERLOOSE] + + '(?:\\.' + src[t.PRERELEASEIDENTIFIERLOOSE] + ')*))' // ## Build Metadata Identifier // Any combination of digits, letters, or hyphens. -var BUILDIDENTIFIER = R++ -src[BUILDIDENTIFIER] = '[0-9A-Za-z-]+' +tok('BUILDIDENTIFIER') +src[t.BUILDIDENTIFIER] = '[0-9A-Za-z-]+' // ## Build Metadata // Plus sign, followed by one or more period-separated build metadata // identifiers. -var BUILD = R++ -src[BUILD] = '(?:\\+(' + src[BUILDIDENTIFIER] + - '(?:\\.' + src[BUILDIDENTIFIER] + ')*))' +tok('BUILD') +src[t.BUILD] = '(?:\\+(' + src[t.BUILDIDENTIFIER] + + '(?:\\.' + src[t.BUILDIDENTIFIER] + ')*))' // ## Full Version String // A main version, followed optionally by a pre-release version and @@ -108,129 +113,133 @@ src[BUILD] = '(?:\\+(' + src[BUILDIDENTIFIER] + // capturing group, because it should not ever be used in version // comparison. -var FULL = R++ -var FULLPLAIN = 'v?' + src[MAINVERSION] + - src[PRERELEASE] + '?' + - src[BUILD] + '?' +tok('FULL') +tok('FULLPLAIN') +src[t.FULLPLAIN] = 'v?' + src[t.MAINVERSION] + + src[t.PRERELEASE] + '?' + + src[t.BUILD] + '?' -src[FULL] = '^' + FULLPLAIN + '$' +src[t.FULL] = '^' + src[t.FULLPLAIN] + '$' // like full, but allows v1.2.3 and =1.2.3, which people do sometimes. // also, 1.0.0alpha1 (prerelease without the hyphen) which is pretty // common in the npm registry. -var LOOSEPLAIN = '[v=\\s]*' + src[MAINVERSIONLOOSE] + - src[PRERELEASELOOSE] + '?' + - src[BUILD] + '?' +tok('LOOSEPLAIN') +src[t.LOOSEPLAIN] = '[v=\\s]*' + src[t.MAINVERSIONLOOSE] + + src[t.PRERELEASELOOSE] + '?' + + src[t.BUILD] + '?' -var LOOSE = R++ -src[LOOSE] = '^' + LOOSEPLAIN + '$' +tok('LOOSE') +src[t.LOOSE] = '^' + src[t.LOOSEPLAIN] + '$' -var GTLT = R++ -src[GTLT] = '((?:<|>)?=?)' +tok('GTLT') +src[t.GTLT] = '((?:<|>)?=?)' // Something like "2.*" or "1.2.x". // Note that "x.x" is a valid xRange identifer, meaning "any version" // Only the first item is strictly required. -var XRANGEIDENTIFIERLOOSE = R++ -src[XRANGEIDENTIFIERLOOSE] = src[NUMERICIDENTIFIERLOOSE] + '|x|X|\\*' -var XRANGEIDENTIFIER = R++ -src[XRANGEIDENTIFIER] = src[NUMERICIDENTIFIER] + '|x|X|\\*' - -var XRANGEPLAIN = R++ -src[XRANGEPLAIN] = '[v=\\s]*(' + src[XRANGEIDENTIFIER] + ')' + - '(?:\\.(' + src[XRANGEIDENTIFIER] + ')' + - '(?:\\.(' + src[XRANGEIDENTIFIER] + ')' + - '(?:' + src[PRERELEASE] + ')?' + - src[BUILD] + '?' + +tok('XRANGEIDENTIFIERLOOSE') +src[t.XRANGEIDENTIFIERLOOSE] = src[t.NUMERICIDENTIFIERLOOSE] + '|x|X|\\*' +tok('XRANGEIDENTIFIER') +src[t.XRANGEIDENTIFIER] = src[t.NUMERICIDENTIFIER] + '|x|X|\\*' + +tok('XRANGEPLAIN') +src[t.XRANGEPLAIN] = '[v=\\s]*(' + src[t.XRANGEIDENTIFIER] + ')' + + '(?:\\.(' + src[t.XRANGEIDENTIFIER] + ')' + + '(?:\\.(' + src[t.XRANGEIDENTIFIER] + ')' + + '(?:' + src[t.PRERELEASE] + ')?' + + src[t.BUILD] + '?' + ')?)?' -var XRANGEPLAINLOOSE = R++ -src[XRANGEPLAINLOOSE] = '[v=\\s]*(' + src[XRANGEIDENTIFIERLOOSE] + ')' + - '(?:\\.(' + src[XRANGEIDENTIFIERLOOSE] + ')' + - '(?:\\.(' + src[XRANGEIDENTIFIERLOOSE] + ')' + - '(?:' + src[PRERELEASELOOSE] + ')?' + - src[BUILD] + '?' + +tok('XRANGEPLAINLOOSE') +src[t.XRANGEPLAINLOOSE] = '[v=\\s]*(' + src[t.XRANGEIDENTIFIERLOOSE] + ')' + + '(?:\\.(' + src[t.XRANGEIDENTIFIERLOOSE] + ')' + + '(?:\\.(' + src[t.XRANGEIDENTIFIERLOOSE] + ')' + + '(?:' + src[t.PRERELEASELOOSE] + ')?' + + src[t.BUILD] + '?' + ')?)?' -var XRANGE = R++ -src[XRANGE] = '^' + src[GTLT] + '\\s*' + src[XRANGEPLAIN] + '$' -var XRANGELOOSE = R++ -src[XRANGELOOSE] = '^' + src[GTLT] + '\\s*' + src[XRANGEPLAINLOOSE] + '$' +tok('XRANGE') +src[t.XRANGE] = '^' + src[t.GTLT] + '\\s*' + src[t.XRANGEPLAIN] + '$' +tok('XRANGELOOSE') +src[t.XRANGELOOSE] = '^' + src[t.GTLT] + '\\s*' + src[t.XRANGEPLAINLOOSE] + '$' // Coercion. // Extract anything that could conceivably be a part of a valid semver -var COERCE = R++ -src[COERCE] = '(?:^|[^\\d])' + +tok('COERCE') +src[t.COERCE] = '(^|[^\\d])' + '(\\d{1,' + MAX_SAFE_COMPONENT_LENGTH + '})' + '(?:\\.(\\d{1,' + MAX_SAFE_COMPONENT_LENGTH + '}))?' + '(?:\\.(\\d{1,' + MAX_SAFE_COMPONENT_LENGTH + '}))?' + '(?:$|[^\\d])' +tok('COERCERTL') +re[t.COERCERTL] = new RegExp(src[t.COERCE], 'g') // Tilde ranges. // Meaning is "reasonably at or greater than" -var LONETILDE = R++ -src[LONETILDE] = '(?:~>?)' +tok('LONETILDE') +src[t.LONETILDE] = '(?:~>?)' -var TILDETRIM = R++ -src[TILDETRIM] = '(\\s*)' + src[LONETILDE] + '\\s+' -re[TILDETRIM] = new RegExp(src[TILDETRIM], 'g') +tok('TILDETRIM') +src[t.TILDETRIM] = '(\\s*)' + src[t.LONETILDE] + '\\s+' +re[t.TILDETRIM] = new RegExp(src[t.TILDETRIM], 'g') var tildeTrimReplace = '$1~' -var TILDE = R++ -src[TILDE] = '^' + src[LONETILDE] + src[XRANGEPLAIN] + '$' -var TILDELOOSE = R++ -src[TILDELOOSE] = '^' + src[LONETILDE] + src[XRANGEPLAINLOOSE] + '$' +tok('TILDE') +src[t.TILDE] = '^' + src[t.LONETILDE] + src[t.XRANGEPLAIN] + '$' +tok('TILDELOOSE') +src[t.TILDELOOSE] = '^' + src[t.LONETILDE] + src[t.XRANGEPLAINLOOSE] + '$' // Caret ranges. // Meaning is "at least and backwards compatible with" -var LONECARET = R++ -src[LONECARET] = '(?:\\^)' +tok('LONECARET') +src[t.LONECARET] = '(?:\\^)' -var CARETTRIM = R++ -src[CARETTRIM] = '(\\s*)' + src[LONECARET] + '\\s+' -re[CARETTRIM] = new RegExp(src[CARETTRIM], 'g') +tok('CARETTRIM') +src[t.CARETTRIM] = '(\\s*)' + src[t.LONECARET] + '\\s+' +re[t.CARETTRIM] = new RegExp(src[t.CARETTRIM], 'g') var caretTrimReplace = '$1^' -var CARET = R++ -src[CARET] = '^' + src[LONECARET] + src[XRANGEPLAIN] + '$' -var CARETLOOSE = R++ -src[CARETLOOSE] = '^' + src[LONECARET] + src[XRANGEPLAINLOOSE] + '$' +tok('CARET') +src[t.CARET] = '^' + src[t.LONECARET] + src[t.XRANGEPLAIN] + '$' +tok('CARETLOOSE') +src[t.CARETLOOSE] = '^' + src[t.LONECARET] + src[t.XRANGEPLAINLOOSE] + '$' // A simple gt/lt/eq thing, or just "" to indicate "any version" -var COMPARATORLOOSE = R++ -src[COMPARATORLOOSE] = '^' + src[GTLT] + '\\s*(' + LOOSEPLAIN + ')$|^$' -var COMPARATOR = R++ -src[COMPARATOR] = '^' + src[GTLT] + '\\s*(' + FULLPLAIN + ')$|^$' +tok('COMPARATORLOOSE') +src[t.COMPARATORLOOSE] = '^' + src[t.GTLT] + '\\s*(' + src[t.LOOSEPLAIN] + ')$|^$' +tok('COMPARATOR') +src[t.COMPARATOR] = '^' + src[t.GTLT] + '\\s*(' + src[t.FULLPLAIN] + ')$|^$' // An expression to strip any whitespace between the gtlt and the thing // it modifies, so that `> 1.2.3` ==> `>1.2.3` -var COMPARATORTRIM = R++ -src[COMPARATORTRIM] = '(\\s*)' + src[GTLT] + - '\\s*(' + LOOSEPLAIN + '|' + src[XRANGEPLAIN] + ')' +tok('COMPARATORTRIM') +src[t.COMPARATORTRIM] = '(\\s*)' + src[t.GTLT] + + '\\s*(' + src[t.LOOSEPLAIN] + '|' + src[t.XRANGEPLAIN] + ')' // this one has to use the /g flag -re[COMPARATORTRIM] = new RegExp(src[COMPARATORTRIM], 'g') +re[t.COMPARATORTRIM] = new RegExp(src[t.COMPARATORTRIM], 'g') var comparatorTrimReplace = '$1$2$3' // Something like `1.2.3 - 1.2.4` // Note that these all use the loose form, because they'll be // checked against either the strict or loose comparator form // later. -var HYPHENRANGE = R++ -src[HYPHENRANGE] = '^\\s*(' + src[XRANGEPLAIN] + ')' + +tok('HYPHENRANGE') +src[t.HYPHENRANGE] = '^\\s*(' + src[t.XRANGEPLAIN] + ')' + '\\s+-\\s+' + - '(' + src[XRANGEPLAIN] + ')' + + '(' + src[t.XRANGEPLAIN] + ')' + '\\s*$' -var HYPHENRANGELOOSE = R++ -src[HYPHENRANGELOOSE] = '^\\s*(' + src[XRANGEPLAINLOOSE] + ')' + +tok('HYPHENRANGELOOSE') +src[t.HYPHENRANGELOOSE] = '^\\s*(' + src[t.XRANGEPLAINLOOSE] + ')' + '\\s+-\\s+' + - '(' + src[XRANGEPLAINLOOSE] + ')' + + '(' + src[t.XRANGEPLAINLOOSE] + ')' + '\\s*$' // Star ranges basically just allow anything at all. -var STAR = R++ -src[STAR] = '(<|>)?=?\\s*\\*' +tok('STAR') +src[t.STAR] = '(<|>)?=?\\s*\\*' // Compile to actual regexp objects. // All are flag-free, unless they were created above with a flag. @@ -262,7 +271,7 @@ function parse (version, options) { return null } - var r = options.loose ? re[LOOSE] : re[FULL] + var r = options.loose ? re[t.LOOSE] : re[t.FULL] if (!r.test(version)) { return null } @@ -317,7 +326,7 @@ function SemVer (version, options) { this.options = options this.loose = !!options.loose - var m = version.trim().match(options.loose ? re[LOOSE] : re[FULL]) + var m = version.trim().match(options.loose ? re[t.LOOSE] : re[t.FULL]) if (!m) { throw new TypeError('Invalid Version: ' + version) @@ -425,6 +434,30 @@ SemVer.prototype.comparePre = function (other) { } while (++i) } +SemVer.prototype.compareBuild = function (other) { + if (!(other instanceof SemVer)) { + other = new SemVer(other, this.options) + } + + var i = 0 + do { + var a = this.build[i] + var b = other.build[i] + debug('prerelease compare', i, a, b) + if (a === undefined && b === undefined) { + return 0 + } else if (b === undefined) { + return 1 + } else if (a === undefined) { + return -1 + } else if (a === b) { + continue + } else { + return compareIdentifiers(a, b) + } + } while (++i) +} + // preminor will bump the version up to the next minor release, and immediately // down to pre-release. premajor and prepatch work the same way. SemVer.prototype.inc = function (release, identifier) { @@ -619,6 +652,13 @@ function compareLoose (a, b) { return compare(a, b, true) } +exports.compareBuild = compareBuild +function compareBuild (a, b, loose) { + var versionA = new SemVer(a, loose) + var versionB = new SemVer(b, loose) + return versionA.compare(versionB) || versionA.compareBuild(versionB) +} + exports.rcompare = rcompare function rcompare (a, b, loose) { return compare(b, a, loose) @@ -627,14 +667,14 @@ function rcompare (a, b, loose) { exports.sort = sort function sort (list, loose) { return list.sort(function (a, b) { - return exports.compare(a, b, loose) + return exports.compareBuild(a, b, loose) }) } exports.rsort = rsort function rsort (list, loose) { return list.sort(function (a, b) { - return exports.rcompare(a, b, loose) + return exports.compareBuild(b, a, loose) }) } @@ -747,14 +787,14 @@ function Comparator (comp, options) { var ANY = {} Comparator.prototype.parse = function (comp) { - var r = this.options.loose ? re[COMPARATORLOOSE] : re[COMPARATOR] + var r = this.options.loose ? re[t.COMPARATORLOOSE] : re[t.COMPARATOR] var m = comp.match(r) if (!m) { throw new TypeError('Invalid comparator: ' + comp) } - this.operator = m[1] + this.operator = m[1] !== undefined ? m[1] : '' if (this.operator === '=') { this.operator = '' } @@ -774,12 +814,16 @@ Comparator.prototype.toString = function () { Comparator.prototype.test = function (version) { debug('Comparator.test', version, this.options.loose) - if (this.semver === ANY) { + if (this.semver === ANY || version === ANY) { return true } if (typeof version === 'string') { - version = new SemVer(version, this.options) + try { + version = new SemVer(version, this.options) + } catch (er) { + return false + } } return cmp(version, this.operator, this.semver, this.options) @@ -800,9 +844,15 @@ Comparator.prototype.intersects = function (comp, options) { var rangeTmp if (this.operator === '') { + if (this.value === '') { + return true + } rangeTmp = new Range(comp.value, options) return satisfies(this.value, rangeTmp, options) } else if (comp.operator === '') { + if (comp.value === '') { + return true + } rangeTmp = new Range(this.value, options) return satisfies(comp.semver, rangeTmp, options) } @@ -892,18 +942,18 @@ Range.prototype.parseRange = function (range) { var loose = this.options.loose range = range.trim() // `1.2.3 - 1.2.4` => `>=1.2.3 <=1.2.4` - var hr = loose ? re[HYPHENRANGELOOSE] : re[HYPHENRANGE] + var hr = loose ? re[t.HYPHENRANGELOOSE] : re[t.HYPHENRANGE] range = range.replace(hr, hyphenReplace) debug('hyphen replace', range) // `> 1.2.3 < 1.2.5` => `>1.2.3 <1.2.5` - range = range.replace(re[COMPARATORTRIM], comparatorTrimReplace) - debug('comparator trim', range, re[COMPARATORTRIM]) + range = range.replace(re[t.COMPARATORTRIM], comparatorTrimReplace) + debug('comparator trim', range, re[t.COMPARATORTRIM]) // `~ 1.2.3` => `~1.2.3` - range = range.replace(re[TILDETRIM], tildeTrimReplace) + range = range.replace(re[t.TILDETRIM], tildeTrimReplace) // `^ 1.2.3` => `^1.2.3` - range = range.replace(re[CARETTRIM], caretTrimReplace) + range = range.replace(re[t.CARETTRIM], caretTrimReplace) // normalize spaces range = range.split(/\s+/).join(' ') @@ -911,7 +961,7 @@ Range.prototype.parseRange = function (range) { // At this point, the range is completely trimmed and // ready to be split into comparators. - var compRe = loose ? re[COMPARATORLOOSE] : re[COMPARATOR] + var compRe = loose ? re[t.COMPARATORLOOSE] : re[t.COMPARATOR] var set = range.split(' ').map(function (comp) { return parseComparator(comp, this.options) }, this).join(' ').split(/\s+/) @@ -934,16 +984,40 @@ Range.prototype.intersects = function (range, options) { } return this.set.some(function (thisComparators) { - return thisComparators.every(function (thisComparator) { - return range.set.some(function (rangeComparators) { - return rangeComparators.every(function (rangeComparator) { - return thisComparator.intersects(rangeComparator, options) - }) + return ( + isSatisfiable(thisComparators, options) && + range.set.some(function (rangeComparators) { + return ( + isSatisfiable(rangeComparators, options) && + thisComparators.every(function (thisComparator) { + return rangeComparators.every(function (rangeComparator) { + return thisComparator.intersects(rangeComparator, options) + }) + }) + ) }) - }) + ) }) } +// take a set of comparators and determine whether there +// exists a version which can satisfy it +function isSatisfiable (comparators, options) { + var result = true + var remainingComparators = comparators.slice() + var testComparator = remainingComparators.pop() + + while (result && remainingComparators.length) { + result = remainingComparators.every(function (otherComparator) { + return testComparator.intersects(otherComparator, options) + }) + + testComparator = remainingComparators.pop() + } + + return result +} + // Mostly just for testing and legacy API reasons exports.toComparators = toComparators function toComparators (range, options) { @@ -987,7 +1061,7 @@ function replaceTildes (comp, options) { } function replaceTilde (comp, options) { - var r = options.loose ? re[TILDELOOSE] : re[TILDE] + var r = options.loose ? re[t.TILDELOOSE] : re[t.TILDE] return comp.replace(r, function (_, M, m, p, pr) { debug('tilde', comp, _, M, m, p, pr) var ret @@ -1028,7 +1102,7 @@ function replaceCarets (comp, options) { function replaceCaret (comp, options) { debug('caret', comp, options) - var r = options.loose ? re[CARETLOOSE] : re[CARET] + var r = options.loose ? re[t.CARETLOOSE] : re[t.CARET] return comp.replace(r, function (_, M, m, p, pr) { debug('caret', comp, _, M, m, p, pr) var ret @@ -1087,7 +1161,7 @@ function replaceXRanges (comp, options) { function replaceXRange (comp, options) { comp = comp.trim() - var r = options.loose ? re[XRANGELOOSE] : re[XRANGE] + var r = options.loose ? re[t.XRANGELOOSE] : re[t.XRANGE] return comp.replace(r, function (ret, gtlt, M, m, p, pr) { debug('xRange', comp, ret, gtlt, M, m, p, pr) var xM = isX(M) @@ -1099,10 +1173,14 @@ function replaceXRange (comp, options) { gtlt = '' } + // if we're including prereleases in the match, then we need + // to fix this to -0, the lowest possible prerelease value + pr = options.includePrerelease ? '-0' : '' + if (xM) { if (gtlt === '>' || gtlt === '<') { // nothing is allowed - ret = '<0.0.0' + ret = '<0.0.0-0' } else { // nothing is forbidden ret = '*' @@ -1139,11 +1217,12 @@ function replaceXRange (comp, options) { } } - ret = gtlt + M + '.' + m + '.' + p + ret = gtlt + M + '.' + m + '.' + p + pr } else if (xm) { - ret = '>=' + M + '.0.0 <' + (+M + 1) + '.0.0' + ret = '>=' + M + '.0.0' + pr + ' <' + (+M + 1) + '.0.0' + pr } else if (xp) { - ret = '>=' + M + '.' + m + '.0 <' + M + '.' + (+m + 1) + '.0' + ret = '>=' + M + '.' + m + '.0' + pr + + ' <' + M + '.' + (+m + 1) + '.0' + pr } debug('xRange return', ret) @@ -1157,10 +1236,10 @@ function replaceXRange (comp, options) { function replaceStars (comp, options) { debug('replaceStars', comp, options) // Looseness is ignored here. star is always as loose as it gets! - return comp.trim().replace(re[STAR], '') + return comp.trim().replace(re[t.STAR], '') } -// This function is passed to string.replace(re[HYPHENRANGE]) +// This function is passed to string.replace(re[t.HYPHENRANGE]) // M, m, patch, prerelease, build // 1.2 - 3.4.5 => >=1.2.0 <=3.4.5 // 1.2.3 - 3.4 => >=1.2.0 <3.5.0 Any 3.4.x will do @@ -1200,7 +1279,11 @@ Range.prototype.test = function (version) { } if (typeof version === 'string') { - version = new SemVer(version, this.options) + try { + version = new SemVer(version, this.options) + } catch (er) { + return false + } } for (var i = 0; i < this.set.length; i++) { @@ -1462,22 +1545,52 @@ function intersects (r1, r2, options) { } exports.coerce = coerce -function coerce (version) { +function coerce (version, options) { if (version instanceof SemVer) { return version } + if (typeof version === 'number') { + version = String(version) + } + if (typeof version !== 'string') { return null } - var match = version.match(re[COERCE]) + options = options || {} + + var match = null + if (!options.rtl) { + match = version.match(re[t.COERCE]) + } else { + // Find the right-most coercible string that does not share + // a terminus with a more left-ward coercible string. + // Eg, '1.2.3.4' wants to coerce '2.3.4', not '3.4' or '4' + // + // Walk through the string checking with a /g regexp + // Manually set the index so as to pick up overlapping matches. + // Stop when we get a match that ends at the string end, since no + // coercible string can be more right-ward without the same terminus. + var next + while ((next = re[t.COERCERTL].exec(version)) && + (!match || match.index + match[0].length !== version.length) + ) { + if (!match || + next.index + next[0].length !== match.index + match[0].length) { + match = next + } + re[t.COERCERTL].lastIndex = next.index + next[1].length + next[2].length + } + // leave it in a clean state + re[t.COERCERTL].lastIndex = -1 + } - if (match == null) { + if (match === null) { return null } - return parse(match[1] + - '.' + (match[2] || '0') + - '.' + (match[3] || '0')) + return parse(match[2] + + '.' + (match[3] || '0') + + '.' + (match[4] || '0'), options) } diff --git a/node_modules/jest-snapshot/package.json b/node_modules/jest-snapshot/package.json index bf962755b..aeb691f7c 100644 --- a/node_modules/jest-snapshot/package.json +++ b/node_modules/jest-snapshot/package.json @@ -1,67 +1,80 @@ { - "_args": [ - [ - "jest-snapshot@24.8.0", - "/Users/drew.heavner/Documents/Github/sign-android-release" - ] - ], - "_development": true, - "_from": "jest-snapshot@24.8.0", - "_id": "jest-snapshot@24.8.0", + "_from": "jest-snapshot@24.9.0", + "_id": "jest-snapshot@24.9.0", "_inBundle": false, - "_integrity": "sha512-5ehtWoc8oU9/cAPe6fez6QofVJLBKyqkY2+TlKTOf0VllBB/mqUNdARdcjlZrs9F1Cv+/HKoCS/BknT0+tmfPg==", + "_integrity": "sha512-uI/rszGSs73xCM0l+up7O7a40o90cnrk429LOiK3aeTvfC0HHmldbd81/B7Ix81KSFe1lwkbl7GnBGG4UfuDew==", "_location": "/jest-snapshot", - "_phantomChildren": {}, + "_phantomChildren": { + "@babel/code-frame": "7.5.5", + "@types/istanbul-lib-coverage": "2.0.1", + "@types/istanbul-reports": "1.1.1", + "@types/stack-utils": "1.0.1", + "@types/yargs-parser": "15.0.0", + "ansi-regex": "4.1.0", + "ansi-styles": "3.2.1", + "callsites": "3.1.0", + "chalk": "2.4.2", + "graceful-fs": "4.2.0", + "micromatch": "3.1.10", + "react-is": "16.8.6", + "slash": "2.0.0", + "source-map": "0.6.1", + "stack-utils": "1.0.2" + }, "_requested": { "type": "version", "registry": true, - "raw": "jest-snapshot@24.8.0", + "raw": "jest-snapshot@24.9.0", "name": "jest-snapshot", "escapedName": "jest-snapshot", - "rawSpec": "24.8.0", + "rawSpec": "24.9.0", "saveSpec": null, - "fetchSpec": "24.8.0" + "fetchSpec": "24.9.0" }, "_requiredBy": [ - "/@jest/core", "/jest-circus", "/jest-jasmine2", "/jest-resolve-dependencies", - "/jest-runtime" + "/jest-runtime", + "/jest/jest-cli/@jest/core" ], - "_resolved": "https://registry.npmjs.org/jest-snapshot/-/jest-snapshot-24.8.0.tgz", - "_spec": "24.8.0", - "_where": "/Users/drew.heavner/Documents/Github/sign-android-release", + "_resolved": "https://registry.npmjs.org/jest-snapshot/-/jest-snapshot-24.9.0.tgz", + "_shasum": "ec8e9ca4f2ec0c5c87ae8f925cf97497b0e951ba", + "_spec": "jest-snapshot@24.9.0", + "_where": "/Users/drew.heavner/Documents/Github/sign-android-release/node_modules/jest/node_modules/jest-cli/node_modules/@jest/core", "bugs": { "url": "https://github.com/facebook/jest/issues" }, + "bundleDependencies": false, "dependencies": { "@babel/types": "^7.0.0", - "@jest/types": "^24.8.0", + "@jest/types": "^24.9.0", "chalk": "^2.0.1", - "expect": "^24.8.0", - "jest-diff": "^24.8.0", - "jest-matcher-utils": "^24.8.0", - "jest-message-util": "^24.8.0", - "jest-resolve": "^24.8.0", + "expect": "^24.9.0", + "jest-diff": "^24.9.0", + "jest-get-type": "^24.9.0", + "jest-matcher-utils": "^24.9.0", + "jest-message-util": "^24.9.0", + "jest-resolve": "^24.9.0", "mkdirp": "^0.5.1", "natural-compare": "^1.4.0", - "pretty-format": "^24.8.0", - "semver": "^5.5.0" + "pretty-format": "^24.9.0", + "semver": "^6.2.0" }, + "deprecated": false, "devDependencies": { "@babel/traverse": "^7.3.4", "@types/mkdirp": "^0.5.2", "@types/natural-compare": "^1.4.0", "@types/prettier": "^1.16.1", - "@types/semver": "^5.5.0", - "jest-haste-map": "^24.8.0", + "@types/semver": "^6.0.1", + "jest-haste-map": "^24.9.0", "prettier": "^1.13.4" }, "engines": { "node": ">= 6" }, - "gitHead": "845728f24b3ef41e450595c384e9b5c9fdf248a4", + "gitHead": "9ad0f4bc6b8bdd94989804226c28c9960d9da7d1", "homepage": "https://github.com/facebook/jest#readme", "license": "MIT", "main": "build/index.js", @@ -75,5 +88,5 @@ "directory": "packages/jest-snapshot" }, "types": "build/index.d.ts", - "version": "24.8.0" + "version": "24.9.0" } diff --git a/node_modules/jest-snapshot/tsconfig.json b/node_modules/jest-snapshot/tsconfig.json deleted file mode 100644 index dba6475fc..000000000 --- a/node_modules/jest-snapshot/tsconfig.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "extends": "../../tsconfig.json", - "compilerOptions": { - "rootDir": "src", - "outDir": "build" - }, - "references": [ - {"path": "../expect"}, - {"path": "../jest-diff"}, - {"path": "../jest-haste-map"}, - {"path": "../jest-matcher-utils"}, - {"path": "../jest-message-util"}, - {"path": "../jest-resolve"}, - {"path": "../jest-types"}, - {"path": "../pretty-format"} - ] -} diff --git a/node_modules/jest-util/LICENSE b/node_modules/jest-util/LICENSE index 10e779c44..b96dcb048 100644 --- a/node_modules/jest-util/LICENSE +++ b/node_modules/jest-util/LICENSE @@ -1,8 +1,6 @@ MIT License -For Jest software - -Copyright (c) 2014-present, Facebook, Inc. +Copyright (c) Facebook, Inc. and its affiliates. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/node_modules/jest-util/build/index.d.ts b/node_modules/jest-util/build/index.d.ts index f12cca695..fd86eec4f 100644 --- a/node_modules/jest-util/build/index.d.ts +++ b/node_modules/jest-util/build/index.d.ts @@ -30,7 +30,7 @@ declare const _default: { createDirectory: typeof createDirectory; deepCyclicCopy: typeof deepCyclicCopy; formatTestResults: typeof formatTestResults; - getCallsite: (level: number, sourceMaps?: import("@jest/source-map").SourceMapRegistry | null | undefined) => import("callsites").CallSite; + getCallsite: (level: number, sourceMaps?: Record | null | undefined) => import("callsites").CallSite; getConsoleOutput: (root: string, verbose: boolean, buffer: import("@jest/console/build/types").LogEntry[]) => string; getFailedSnapshotTests: typeof getFailedSnapshotTests; installCommonGlobals: typeof installCommonGlobals; diff --git a/node_modules/jest-util/build/installCommonGlobals.d.ts b/node_modules/jest-util/build/installCommonGlobals.d.ts index 38a4eb41e..a97459df0 100644 --- a/node_modules/jest-util/build/installCommonGlobals.d.ts +++ b/node_modules/jest-util/build/installCommonGlobals.d.ts @@ -4,6 +4,7 @@ * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ +/// import { Config } from '@jest/types'; export default function (globalObject: NodeJS.Global, globals: Config.ConfigGlobals): NodeJS.Global & Config.ConfigGlobals; //# sourceMappingURL=installCommonGlobals.d.ts.map \ No newline at end of file diff --git a/node_modules/jest-util/build/installCommonGlobals.d.ts.map b/node_modules/jest-util/build/installCommonGlobals.d.ts.map index 1dd43c501..5034844e9 100644 --- a/node_modules/jest-util/build/installCommonGlobals.d.ts.map +++ b/node_modules/jest-util/build/installCommonGlobals.d.ts.map @@ -1 +1 @@ -{"version":3,"file":"installCommonGlobals.d.ts","sourceRoot":"","sources":["../src/installCommonGlobals.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,OAAO,EAAC,MAAM,EAAC,MAAM,aAAa,CAAC;AAMnC,MAAM,CAAC,OAAO,WACZ,YAAY,EAAE,MAAM,CAAC,MAAM,EAC3B,OAAO,EAAE,MAAM,CAAC,aAAa,GAC5B,MAAM,CAAC,MAAM,GAAG,MAAM,CAAC,aAAa,CAqDtC"} \ No newline at end of file +{"version":3,"file":"installCommonGlobals.d.ts","sourceRoot":"","sources":["../src/installCommonGlobals.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;;AAGH,OAAO,EAAC,MAAM,EAAC,MAAM,aAAa,CAAC;AAMnC,MAAM,CAAC,OAAO,WACZ,YAAY,EAAE,MAAM,CAAC,MAAM,EAC3B,OAAO,EAAE,MAAM,CAAC,aAAa,GAC5B,MAAM,CAAC,MAAM,GAAG,MAAM,CAAC,aAAa,CAqDtC"} \ No newline at end of file diff --git a/node_modules/jest-util/build/isInteractive.d.ts b/node_modules/jest-util/build/isInteractive.d.ts index 34ccd1c83..ae0f85410 100644 --- a/node_modules/jest-util/build/isInteractive.d.ts +++ b/node_modules/jest-util/build/isInteractive.d.ts @@ -1,3 +1,9 @@ +/** + * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ declare const _default: boolean; export default _default; //# sourceMappingURL=isInteractive.d.ts.map \ No newline at end of file diff --git a/node_modules/jest-util/build/isInteractive.d.ts.map b/node_modules/jest-util/build/isInteractive.d.ts.map index d5e37a220..e5007e387 100644 --- a/node_modules/jest-util/build/isInteractive.d.ts.map +++ b/node_modules/jest-util/build/isInteractive.d.ts.map @@ -1 +1 @@ -{"version":3,"file":"isInteractive.d.ts","sourceRoot":"","sources":["../src/isInteractive.ts"],"names":[],"mappings":";AAIA,wBAA8E"} \ No newline at end of file +{"version":3,"file":"isInteractive.d.ts","sourceRoot":"","sources":["../src/isInteractive.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;;AAIH,wBAA8E"} \ No newline at end of file diff --git a/node_modules/jest-util/build/isInteractive.js b/node_modules/jest-util/build/isInteractive.js index 9c1bf160e..7801d4b8e 100644 --- a/node_modules/jest-util/build/isInteractive.js +++ b/node_modules/jest-util/build/isInteractive.js @@ -19,7 +19,12 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : {default: obj}; } -// Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. +/** + * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ var _default = !!process.stdout.isTTY && process.env.TERM !== 'dumb' && !_isCi().default; diff --git a/node_modules/jest-util/build/setGlobal.d.ts b/node_modules/jest-util/build/setGlobal.d.ts index 48fe5657d..ec7c75591 100644 --- a/node_modules/jest-util/build/setGlobal.d.ts +++ b/node_modules/jest-util/build/setGlobal.d.ts @@ -4,6 +4,7 @@ * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ +/// declare const _default: (globalToMutate: NodeJS.Global | Window, key: string, value: unknown) => void; export default _default; //# sourceMappingURL=setGlobal.d.ts.map \ No newline at end of file diff --git a/node_modules/jest-util/build/setGlobal.d.ts.map b/node_modules/jest-util/build/setGlobal.d.ts.map index d07f87781..91346c3fe 100644 --- a/node_modules/jest-util/build/setGlobal.d.ts.map +++ b/node_modules/jest-util/build/setGlobal.d.ts.map @@ -1 +1 @@ -{"version":3,"file":"setGlobal.d.ts","sourceRoot":"","sources":["../src/setGlobal.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;;AAEH,wBAOE"} \ No newline at end of file +{"version":3,"file":"setGlobal.d.ts","sourceRoot":"","sources":["../src/setGlobal.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;;;AAEH,wBAOE"} \ No newline at end of file diff --git a/node_modules/jest-util/node_modules/callsites/index.d.ts b/node_modules/jest-util/node_modules/callsites/index.d.ts deleted file mode 100644 index 61f597cf5..000000000 --- a/node_modules/jest-util/node_modules/callsites/index.d.ts +++ /dev/null @@ -1,96 +0,0 @@ -declare namespace callsites { - interface CallSite { - /** - Returns the value of `this`. - */ - getThis(): unknown | undefined; - - /** - Returns the type of `this` as a string. This is the name of the function stored in the constructor field of `this`, if available, otherwise the object's `[[Class]]` internal property. - */ - getTypeName(): string | null; - - /** - Returns the current function. - */ - getFunction(): Function | undefined; - - /** - Returns the name of the current function, typically its `name` property. If a name property is not available an attempt will be made to try to infer a name from the function's context. - */ - getFunctionName(): string | null; - - /** - Returns the name of the property of `this` or one of its prototypes that holds the current function. - */ - getMethodName(): string | undefined; - - /** - Returns the name of the script if this function was defined in a script. - */ - getFileName(): string | null; - - /** - Returns the current line number if this function was defined in a script. - */ - getLineNumber(): number | null; - - /** - Returns the current column number if this function was defined in a script. - */ - getColumnNumber(): number | null; - - /** - Returns a string representing the location where `eval` was called if this function was created using a call to `eval`. - */ - getEvalOrigin(): string | undefined; - - /** - Returns `true` if this is a top-level invocation, that is, if it's a global object. - */ - isToplevel(): boolean; - - /** - Returns `true` if this call takes place in code defined by a call to `eval`. - */ - isEval(): boolean; - - /** - Returns `true` if this call is in native V8 code. - */ - isNative(): boolean; - - /** - Returns `true` if this is a constructor call. - */ - isConstructor(): boolean; - } -} - -declare const callsites: { - /** - Get callsites from the V8 stack trace API. - - @returns An array of `CallSite` objects. - - @example - ``` - import callsites = require('callsites'); - - function unicorn() { - console.log(callsites()[0].getFileName()); - //=> '/Users/sindresorhus/dev/callsites/test.js' - } - - unicorn(); - ``` - */ - (): callsites.CallSite[]; - - // TODO: Remove this for the next major release, refactor the whole definition to: - // declare function callsites(): callsites.CallSite[]; - // export = callsites; - default: typeof callsites; -}; - -export = callsites; diff --git a/node_modules/jest-util/node_modules/callsites/index.js b/node_modules/jest-util/node_modules/callsites/index.js deleted file mode 100644 index 486c24104..000000000 --- a/node_modules/jest-util/node_modules/callsites/index.js +++ /dev/null @@ -1,13 +0,0 @@ -'use strict'; - -const callsites = () => { - const _prepareStackTrace = Error.prepareStackTrace; - Error.prepareStackTrace = (_, stack) => stack; - const stack = new Error().stack.slice(1); - Error.prepareStackTrace = _prepareStackTrace; - return stack; -}; - -module.exports = callsites; -// TODO: Remove this for the next major release -module.exports.default = callsites; diff --git a/node_modules/jest-util/node_modules/callsites/license b/node_modules/jest-util/node_modules/callsites/license deleted file mode 100644 index e7af2f771..000000000 --- a/node_modules/jest-util/node_modules/callsites/license +++ /dev/null @@ -1,9 +0,0 @@ -MIT License - -Copyright (c) Sindre Sorhus (sindresorhus.com) - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/jest-util/node_modules/callsites/package.json b/node_modules/jest-util/node_modules/callsites/package.json deleted file mode 100644 index 93b57929a..000000000 --- a/node_modules/jest-util/node_modules/callsites/package.json +++ /dev/null @@ -1,75 +0,0 @@ -{ - "_args": [ - [ - "callsites@3.1.0", - "/Users/drew.heavner/Documents/Github/sign-android-release" - ] - ], - "_development": true, - "_from": "callsites@3.1.0", - "_id": "callsites@3.1.0", - "_inBundle": false, - "_integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==", - "_location": "/jest-util/callsites", - "_phantomChildren": {}, - "_requested": { - "type": "version", - "registry": true, - "raw": "callsites@3.1.0", - "name": "callsites", - "escapedName": "callsites", - "rawSpec": "3.1.0", - "saveSpec": null, - "fetchSpec": "3.1.0" - }, - "_requiredBy": [ - "/jest-util" - ], - "_resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", - "_spec": "3.1.0", - "_where": "/Users/drew.heavner/Documents/Github/sign-android-release", - "author": { - "name": "Sindre Sorhus", - "email": "sindresorhus@gmail.com", - "url": "sindresorhus.com" - }, - "bugs": { - "url": "https://github.com/sindresorhus/callsites/issues" - }, - "description": "Get callsites from the V8 stack trace API", - "devDependencies": { - "ava": "^1.4.1", - "tsd": "^0.7.2", - "xo": "^0.24.0" - }, - "engines": { - "node": ">=6" - }, - "files": [ - "index.js", - "index.d.ts" - ], - "homepage": "https://github.com/sindresorhus/callsites#readme", - "keywords": [ - "stacktrace", - "v8", - "callsite", - "callsites", - "stack", - "trace", - "function", - "file", - "line", - "debug" - ], - "license": "MIT", - "name": "callsites", - "repository": { - "type": "git", - "url": "git+https://github.com/sindresorhus/callsites.git" - }, - "scripts": { - "test": "xo && ava && tsd" - }, - "version": "3.1.0" -} diff --git a/node_modules/jest-util/node_modules/callsites/readme.md b/node_modules/jest-util/node_modules/callsites/readme.md deleted file mode 100644 index fc846138f..000000000 --- a/node_modules/jest-util/node_modules/callsites/readme.md +++ /dev/null @@ -1,48 +0,0 @@ -# callsites [![Build Status](https://travis-ci.org/sindresorhus/callsites.svg?branch=master)](https://travis-ci.org/sindresorhus/callsites) - -> Get callsites from the [V8 stack trace API](https://v8.dev/docs/stack-trace-api) - - -## Install - -``` -$ npm install callsites -``` - - -## Usage - -```js -const callsites = require('callsites'); - -function unicorn() { - console.log(callsites()[0].getFileName()); - //=> '/Users/sindresorhus/dev/callsites/test.js' -} - -unicorn(); -``` - - -## API - -Returns an array of callsite objects with the following methods: - -- `getThis`: returns the value of `this`. -- `getTypeName`: returns the type of `this` as a string. This is the name of the function stored in the constructor field of `this`, if available, otherwise the object's `[[Class]]` internal property. -- `getFunction`: returns the current function. -- `getFunctionName`: returns the name of the current function, typically its `name` property. If a name property is not available an attempt will be made to try to infer a name from the function's context. -- `getMethodName`: returns the name of the property of `this` or one of its prototypes that holds the current function. -- `getFileName`: if this function was defined in a script returns the name of the script. -- `getLineNumber`: if this function was defined in a script returns the current line number. -- `getColumnNumber`: if this function was defined in a script returns the current column number -- `getEvalOrigin`: if this function was created using a call to `eval` returns a string representing the location where `eval` was called. -- `isToplevel`: is this a top-level invocation, that is, is this the global object? -- `isEval`: does this call take place in code defined by a call to `eval`? -- `isNative`: is this call in native V8 code? -- `isConstructor`: is this a constructor call? - - -## License - -MIT © [Sindre Sorhus](https://sindresorhus.com) diff --git a/node_modules/jest-util/node_modules/slash/index.js b/node_modules/jest-util/node_modules/slash/index.js deleted file mode 100644 index 75d72501a..000000000 --- a/node_modules/jest-util/node_modules/slash/index.js +++ /dev/null @@ -1,11 +0,0 @@ -'use strict'; -module.exports = input => { - const isExtendedLengthPath = /^\\\\\?\\/.test(input); - const hasNonAscii = /[^\u0000-\u0080]+/.test(input); // eslint-disable-line no-control-regex - - if (isExtendedLengthPath || hasNonAscii) { - return input; - } - - return input.replace(/\\/g, '/'); -}; diff --git a/node_modules/jest-util/node_modules/slash/license b/node_modules/jest-util/node_modules/slash/license deleted file mode 100644 index e7af2f771..000000000 --- a/node_modules/jest-util/node_modules/slash/license +++ /dev/null @@ -1,9 +0,0 @@ -MIT License - -Copyright (c) Sindre Sorhus (sindresorhus.com) - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/jest-util/node_modules/slash/package.json b/node_modules/jest-util/node_modules/slash/package.json deleted file mode 100644 index 687d8f6c0..000000000 --- a/node_modules/jest-util/node_modules/slash/package.json +++ /dev/null @@ -1,70 +0,0 @@ -{ - "_args": [ - [ - "slash@2.0.0", - "/Users/drew.heavner/Documents/Github/sign-android-release" - ] - ], - "_development": true, - "_from": "slash@2.0.0", - "_id": "slash@2.0.0", - "_inBundle": false, - "_integrity": "sha512-ZYKh3Wh2z1PpEXWr0MpSBZ0V6mZHAQfYevttO11c51CaWjGTaadiKZ+wVt1PbMlDV5qhMFslpZCemhwOK7C89A==", - "_location": "/jest-util/slash", - "_phantomChildren": {}, - "_requested": { - "type": "version", - "registry": true, - "raw": "slash@2.0.0", - "name": "slash", - "escapedName": "slash", - "rawSpec": "2.0.0", - "saveSpec": null, - "fetchSpec": "2.0.0" - }, - "_requiredBy": [ - "/jest-util" - ], - "_resolved": "https://registry.npmjs.org/slash/-/slash-2.0.0.tgz", - "_spec": "2.0.0", - "_where": "/Users/drew.heavner/Documents/Github/sign-android-release", - "author": { - "name": "Sindre Sorhus", - "email": "sindresorhus@gmail.com", - "url": "sindresorhus.com" - }, - "bugs": { - "url": "https://github.com/sindresorhus/slash/issues" - }, - "description": "Convert Windows backslash paths to slash paths", - "devDependencies": { - "ava": "*", - "xo": "*" - }, - "engines": { - "node": ">=6" - }, - "files": [ - "index.js" - ], - "homepage": "https://github.com/sindresorhus/slash#readme", - "keywords": [ - "path", - "seperator", - "sep", - "slash", - "backslash", - "windows", - "win" - ], - "license": "MIT", - "name": "slash", - "repository": { - "type": "git", - "url": "git+https://github.com/sindresorhus/slash.git" - }, - "scripts": { - "test": "xo && ava" - }, - "version": "2.0.0" -} diff --git a/node_modules/jest-util/node_modules/slash/readme.md b/node_modules/jest-util/node_modules/slash/readme.md deleted file mode 100644 index 5e2fedbc9..000000000 --- a/node_modules/jest-util/node_modules/slash/readme.md +++ /dev/null @@ -1,44 +0,0 @@ -# slash [![Build Status](https://travis-ci.org/sindresorhus/slash.svg?branch=master)](https://travis-ci.org/sindresorhus/slash) - -> Convert Windows backslash paths to slash paths: `foo\\bar` ➔ `foo/bar` - -[Forward-slash paths can be used in Windows](http://superuser.com/a/176395/6877) as long as they're not extended-length paths and don't contain any non-ascii characters. - -This was created since the `path` methods in Node outputs `\\` paths on Windows. - - -## Install - -``` -$ npm install slash -``` - - -## Usage - -```js -const path = require('path'); -const slash = require('slash'); - -const str = path.join('foo', 'bar'); -// Unix => foo/bar -// Windows => foo\\bar - -slash(str); -// Unix => foo/bar -// Windows => foo/bar -``` - - -## API - -### slash(path) - -Type: `string` - -Accepts a Windows backslash path and returns a slash path. - - -## License - -MIT © [Sindre Sorhus](https://sindresorhus.com) diff --git a/node_modules/jest-util/package.json b/node_modules/jest-util/package.json index 70a6b9a69..b5f7b8274 100644 --- a/node_modules/jest-util/package.json +++ b/node_modules/jest-util/package.json @@ -1,29 +1,30 @@ { - "_args": [ - [ - "jest-util@24.8.0", - "/Users/drew.heavner/Documents/Github/sign-android-release" - ] - ], - "_development": true, - "_from": "jest-util@24.8.0", - "_id": "jest-util@24.8.0", + "_from": "jest-util@^24.9.0", + "_id": "jest-util@24.9.0", "_inBundle": false, - "_integrity": "sha512-DYZeE+XyAnbNt0BG1OQqKy/4GVLPtzwGx5tsnDrFcax36rVE3lTA5fbvgmbVPUZf9w77AJ8otqR4VBbfFJkUZA==", + "_integrity": "sha512-x+cZU8VRmOJxbA1K5oDBdxQmdq0OIdADarLxk0Mq+3XS4jgvhG/oKGWcIDCtPG0HgjxOYvF+ilPJQsAyXfbNOg==", "_location": "/jest-util", - "_phantomChildren": {}, + "_phantomChildren": { + "@types/istanbul-lib-coverage": "2.0.1", + "@types/istanbul-reports": "1.1.1", + "@types/yargs-parser": "15.0.0", + "callsites": "3.1.0", + "chalk": "2.4.2", + "graceful-fs": "4.2.0", + "slash": "2.0.0", + "source-map": "0.6.1" + }, "_requested": { - "type": "version", + "type": "range", "registry": true, - "raw": "jest-util@24.8.0", + "raw": "jest-util@^24.9.0", "name": "jest-util", "escapedName": "jest-util", - "rawSpec": "24.8.0", + "rawSpec": "^24.9.0", "saveSpec": null, - "fetchSpec": "24.8.0" + "fetchSpec": "^24.9.0" }, "_requiredBy": [ - "/@jest/core", "/@jest/reporters", "/@jest/transform", "/jest-circus", @@ -36,20 +37,23 @@ "/jest-runner", "/jest-runtime", "/jest-watcher", - "/jest/jest-cli" + "/jest/@jest/transform", + "/jest/jest-haste-map" ], - "_resolved": "https://registry.npmjs.org/jest-util/-/jest-util-24.8.0.tgz", - "_spec": "24.8.0", - "_where": "/Users/drew.heavner/Documents/Github/sign-android-release", + "_resolved": "https://registry.npmjs.org/jest-util/-/jest-util-24.9.0.tgz", + "_shasum": "7396814e48536d2e85a37de3e4c431d7cb140162", + "_spec": "jest-util@^24.9.0", + "_where": "/Users/drew.heavner/Documents/Github/sign-android-release/node_modules/@jest/reporters", "bugs": { "url": "https://github.com/facebook/jest/issues" }, + "bundleDependencies": false, "dependencies": { - "@jest/console": "^24.7.1", - "@jest/fake-timers": "^24.8.0", - "@jest/source-map": "^24.3.0", - "@jest/test-result": "^24.8.0", - "@jest/types": "^24.8.0", + "@jest/console": "^24.9.0", + "@jest/fake-timers": "^24.9.0", + "@jest/source-map": "^24.9.0", + "@jest/test-result": "^24.9.0", + "@jest/types": "^24.9.0", "callsites": "^3.0.0", "chalk": "^2.0.1", "graceful-fs": "^4.1.15", @@ -58,16 +62,17 @@ "slash": "^2.0.0", "source-map": "^0.6.0" }, + "deprecated": false, "devDependencies": { "@types/graceful-fs": "^4.1.2", - "@types/is-ci": "^1.0.10", + "@types/is-ci": "^2.0.0", "@types/mkdirp": "^0.5.2", "@types/slash": "^2.0.0" }, "engines": { "node": ">= 6" }, - "gitHead": "845728f24b3ef41e450595c384e9b5c9fdf248a4", + "gitHead": "9ad0f4bc6b8bdd94989804226c28c9960d9da7d1", "homepage": "https://github.com/facebook/jest#readme", "license": "MIT", "main": "build/index.js", @@ -81,5 +86,5 @@ "directory": "packages/jest-util" }, "types": "build/index.d.ts", - "version": "24.8.0" + "version": "24.9.0" } diff --git a/node_modules/jest-util/tsconfig.json b/node_modules/jest-util/tsconfig.json deleted file mode 100644 index f40d52b2f..000000000 --- a/node_modules/jest-util/tsconfig.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "extends": "../../tsconfig.json", - "compilerOptions": { - "rootDir": "src", - "outDir": "build" - }, - "references": [ - {"path": "../jest-console"}, - {"path": "../jest-fake-timers"}, - {"path": "../jest-source-map"}, - {"path": "../jest-test-result"}, - {"path": "../jest-types"} - ] -} diff --git a/node_modules/jest-validate/LICENSE b/node_modules/jest-validate/LICENSE index 10e779c44..b96dcb048 100644 --- a/node_modules/jest-validate/LICENSE +++ b/node_modules/jest-validate/LICENSE @@ -1,8 +1,6 @@ MIT License -For Jest software - -Copyright (c) 2014-present, Facebook, Inc. +Copyright (c) Facebook, Inc. and its affiliates. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/node_modules/jest-validate/build/condition.d.ts b/node_modules/jest-validate/build/condition.d.ts index 0fc309653..43e0004e4 100644 --- a/node_modules/jest-validate/build/condition.d.ts +++ b/node_modules/jest-validate/build/condition.d.ts @@ -6,5 +6,5 @@ */ export declare function getValues(validOption: any): any[]; export declare function validationCondition(option: any, validOption: any): boolean; -export declare function multipleValidOptions(...args: Array): any[]; +export declare function multipleValidOptions>(...args: T): T[number]; //# sourceMappingURL=condition.d.ts.map \ No newline at end of file diff --git a/node_modules/jest-validate/build/condition.d.ts.map b/node_modules/jest-validate/build/condition.d.ts.map index 424c32af1..bea58a28c 100644 --- a/node_modules/jest-validate/build/condition.d.ts.map +++ b/node_modules/jest-validate/build/condition.d.ts.map @@ -1 +1 @@ -{"version":3,"file":"condition.d.ts","sourceRoot":"","sources":["../src/condition.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAeH,wBAAgB,SAAS,CAAC,WAAW,EAAE,GAAG,SASzC;AAED,wBAAgB,mBAAmB,CAAC,MAAM,EAAE,GAAG,EAAE,WAAW,EAAE,GAAG,GAAG,OAAO,CAE1E;AAID,wBAAgB,oBAAoB,CAAC,GAAG,IAAI,EAAE,KAAK,CAAC,GAAG,CAAC,SAKvD"} \ No newline at end of file +{"version":3,"file":"condition.d.ts","sourceRoot":"","sources":["../src/condition.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAeH,wBAAgB,SAAS,CAAC,WAAW,EAAE,GAAG,SASzC;AAED,wBAAgB,mBAAmB,CAAC,MAAM,EAAE,GAAG,EAAE,WAAW,EAAE,GAAG,GAAG,OAAO,CAE1E;AAED,wBAAgB,oBAAoB,CAAC,CAAC,SAAS,KAAK,CAAC,GAAG,CAAC,EACvD,GAAG,IAAI,EAAE,CAAC,GACT,CAAC,CAAC,MAAM,CAAC,CAKX"} \ No newline at end of file diff --git a/node_modules/jest-validate/build/condition.js b/node_modules/jest-validate/build/condition.js index 0cd6b4aca..5f6165e42 100644 --- a/node_modules/jest-validate/build/condition.js +++ b/node_modules/jest-validate/build/condition.js @@ -38,8 +38,7 @@ function getValues(validOption) { function validationCondition(option, validOption) { return getValues(validOption).some(e => validationConditionSingle(option, e)); -} // TODO: This should infer the types of its arguments, and return a union type of the types -// See https://github.com/Microsoft/TypeScript/issues/5453 +} function multipleValidOptions(...args) { const options = [...args]; // @ts-ignore diff --git a/node_modules/jest-validate/build/deprecated.d.ts b/node_modules/jest-validate/build/deprecated.d.ts index 1688e6921..94bc648cb 100644 --- a/node_modules/jest-validate/build/deprecated.d.ts +++ b/node_modules/jest-validate/build/deprecated.d.ts @@ -5,7 +5,5 @@ * LICENSE file in the root directory of this source tree. */ import { ValidationOptions } from './types'; -export declare const deprecationWarning: (config: { - [key: string]: any; -}, option: string, deprecatedOptions: Record, options: ValidationOptions) => boolean; +export declare const deprecationWarning: (config: Record, option: string, deprecatedOptions: Record, options: ValidationOptions) => boolean; //# sourceMappingURL=deprecated.d.ts.map \ No newline at end of file diff --git a/node_modules/jest-validate/build/deprecated.d.ts.map b/node_modules/jest-validate/build/deprecated.d.ts.map index 9065c57f5..1488faf0c 100644 --- a/node_modules/jest-validate/build/deprecated.d.ts.map +++ b/node_modules/jest-validate/build/deprecated.d.ts.map @@ -1 +1 @@ -{"version":3,"file":"deprecated.d.ts","sourceRoot":"","sources":["../src/deprecated.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAoB,iBAAiB,EAAC,MAAM,SAAS,CAAC;AAW7D,eAAO,MAAM,kBAAkB;;sGAa9B,CAAC"} \ No newline at end of file +{"version":3,"file":"deprecated.d.ts","sourceRoot":"","sources":["../src/deprecated.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAoB,iBAAiB,EAAC,MAAM,SAAS,CAAC;AAW7D,eAAO,MAAM,kBAAkB,mIAa9B,CAAC"} \ No newline at end of file diff --git a/node_modules/jest-validate/build/index.d.ts b/node_modules/jest-validate/build/index.d.ts index 7ca3829d3..a4c57f611 100644 --- a/node_modules/jest-validate/build/index.d.ts +++ b/node_modules/jest-validate/build/index.d.ts @@ -13,9 +13,7 @@ declare const _default: { format: (value: any) => string; logValidationWarning: (name: string, message: string, comment?: string | null | undefined) => void; multipleValidOptions: typeof multipleValidOptions; - validate: (config: { - [key: string]: any; - }, options: import("./types").ValidationOptions) => { + validate: (config: Record, options: import("./types").ValidationOptions) => { hasDeprecationWarnings: boolean; isValid: boolean; }; diff --git a/node_modules/jest-validate/build/index.d.ts.map b/node_modules/jest-validate/build/index.d.ts.map index 47284f3e8..92279438d 100644 --- a/node_modules/jest-validate/build/index.d.ts.map +++ b/node_modules/jest-validate/build/index.d.ts.map @@ -1 +1 @@ -{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAIL,eAAe,EAChB,MAAM,SAAS,CAAC;AAEjB,OAAO,kBAAkB,MAAM,sBAAsB,CAAC;AACtD,OAAO,EAAC,oBAAoB,EAAC,MAAM,aAAa,CAAC;;;;;;;;;;;;;;;AAEjD,kBAQE"} \ No newline at end of file +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAIL,eAAe,EAChB,MAAM,SAAS,CAAC;AAEjB,OAAO,kBAAkB,MAAM,sBAAsB,CAAC;AACtD,OAAO,EAAC,oBAAoB,EAAC,MAAM,aAAa,CAAC;;;;;;;;;;;;;AAEjD,kBAQE"} \ No newline at end of file diff --git a/node_modules/jest-validate/build/types.d.ts b/node_modules/jest-validate/build/types.d.ts index cda99a4f4..6826cb93b 100644 --- a/node_modules/jest-validate/build/types.d.ts +++ b/node_modules/jest-validate/build/types.d.ts @@ -13,22 +13,14 @@ export declare type DeprecatedOptions = Record; export declare type ValidationOptions = { comment?: string; condition?: (option: any, validOption: any) => boolean; - deprecate?: (config: { - [key: string]: any; - }, option: string, deprecatedOptions: DeprecatedOptions, options: ValidationOptions) => boolean; + deprecate?: (config: Record, option: string, deprecatedOptions: DeprecatedOptions, options: ValidationOptions) => boolean; deprecatedConfig?: DeprecatedOptions; error?: (option: string, received: any, defaultValue: any, options: ValidationOptions, path?: Array) => void; - exampleConfig: { - [key: string]: any; - }; + exampleConfig: Record; recursive?: boolean; recursiveBlacklist?: Array; title?: Title; - unknown?: (config: { - [key: string]: any; - }, exampleConfig: { - [key: string]: any; - }, option: string, options: ValidationOptions, path?: Array) => void; + unknown?: (config: Record, exampleConfig: Record, option: string, options: ValidationOptions, path?: Array) => void; }; export {}; //# sourceMappingURL=types.d.ts.map \ No newline at end of file diff --git a/node_modules/jest-validate/build/types.d.ts.map b/node_modules/jest-validate/build/types.d.ts.map index 1d731b914..731027919 100644 --- a/node_modules/jest-validate/build/types.d.ts.map +++ b/node_modules/jest-validate/build/types.d.ts.map @@ -1 +1 @@ -{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,aAAK,KAAK,GAAG;IACX,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB,CAAC;AAEF,oBAAY,iBAAiB,GAAG,MAAM,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAC;AAEzD,oBAAY,iBAAiB,GAAG;IAC9B,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,SAAS,CAAC,EAAE,CAAC,MAAM,EAAE,GAAG,EAAE,WAAW,EAAE,GAAG,KAAK,OAAO,CAAC;IACvD,SAAS,CAAC,EAAE,CACV,MAAM,EAAE;QAAC,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAA;KAAC,EA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E,GAAG,EAAE,WAAW,EAAE,GAAG,KAAK,OAAO,CAAC;IACvD,SAAS,CAAC,EAAE,CACV,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EAC3B,MAAM,EAAE,MAAM,EACd,iBAAiB,EAAE,iBAAiB,EACpC,OAAO,EAAE,iBAAiB,KACvB,OAAO,CAAC;IACb,gBAAgB,CAAC,EAAE,iBAAiB,CAAC;IACrC,KAAK,CAAC,EAAE,CACN,MAAM,EAAE,MAAM,EACd,QAAQ,EAAE,GAAG,EACb,YAAY,EAAE,GAAG,EACjB,OAAO,EAAE,iBAAiB,EAC1B,IAAI,CAAC,EAAE,KAAK,CAAC,MAAM,CAAC,KACjB,IAAI,CAAC;IACV,aAAa,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IACnC,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,kBAAkB,CAAC,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IACnC,KAAK,CAAC,EAAE,KAAK,CAAC;IACd,OAAO,CAAC,EAAE,CACR,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EAC3B,aAAa,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EAClC,MAAM,EAAE,MAAM,EACd,OAAO,EAAE,iBAAiB,EAC1B,IAAI,CAAC,EAAE,KAAK,CAAC,MAAM,CAAC,KACjB,IAAI,CAAC;CACX,CAAC"} \ No newline at end of file diff --git a/node_modules/jest-validate/build/validate.d.ts b/node_modules/jest-validate/build/validate.d.ts index 042365535..ceba2c898 100644 --- a/node_modules/jest-validate/build/validate.d.ts +++ b/node_modules/jest-validate/build/validate.d.ts @@ -5,9 +5,7 @@ * LICENSE file in the root directory of this source tree. */ import { ValidationOptions } from './types'; -declare const validate: (config: { - [key: string]: any; -}, options: ValidationOptions) => { +declare const validate: (config: Record, options: ValidationOptions) => { hasDeprecationWarnings: boolean; isValid: boolean; }; diff --git a/node_modules/jest-validate/build/validate.d.ts.map b/node_modules/jest-validate/build/validate.d.ts.map index ac215ab2d..83f122326 100644 --- a/node_modules/jest-validate/build/validate.d.ts.map +++ b/node_modules/jest-validate/build/validate.d.ts.map @@ -1 +1 @@ -{"version":3,"file":"validate.d.ts","sourceRoot":"","sources":["../src/validate.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAC,iBAAiB,EAAC,MAAM,SAAS,CAAC;AAuE1C,QAAA,MAAM,QAAQ;;;;;CA0Bb,CAAC;AAEF,eAAe,QAAQ,CAAC"} \ No newline at end of file +{"version":3,"file":"validate.d.ts","sourceRoot":"","sources":["../src/validate.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAC,iBAAiB,EAAC,MAAM,SAAS,CAAC;AA0F1C,QAAA,MAAM,QAAQ;;;CA0Bb,CAAC;AAEF,eAAe,QAAQ,CAAC"} \ No newline at end of file diff --git a/node_modules/jest-validate/build/validate.js b/node_modules/jest-validate/build/validate.js index 553f6445d..e31a16bbf 100644 --- a/node_modules/jest-validate/build/validate.js +++ b/node_modules/jest-validate/build/validate.js @@ -7,6 +7,8 @@ exports.default = void 0; var _defaultConfig = _interopRequireDefault(require('./defaultConfig')); +var _utils = require('./utils'); + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : {default: obj}; } @@ -73,6 +75,21 @@ const _validate = (config, exampleConfig, options, path = []) => { options ); hasDeprecationWarnings = hasDeprecationWarnings || isDeprecatedKey; + } else if (allowsMultipleTypes(key)) { + const value = config[key]; + + if ( + typeof options.condition === 'function' && + typeof options.error === 'function' + ) { + if (key === 'maxWorkers' && !isOfTypeStringOrNumber(value)) { + throw new _utils.ValidationError( + 'Validation Error', + `${key} has to be of type string or number`, + `maxWorkers=50% or\nmaxWorkers=3` + ); + } + } } else if (Object.hasOwnProperty.call(exampleConfig, key)) { if ( typeof options.condition === 'function' && @@ -105,6 +122,11 @@ const _validate = (config, exampleConfig, options, path = []) => { }; }; +const allowsMultipleTypes = key => key === 'maxWorkers'; + +const isOfTypeStringOrNumber = value => + typeof value === 'number' || typeof value === 'string'; + const validate = (config, options) => { hasDeprecationWarnings = false; // Preserve default blacklist entries even with user-supplied blacklist diff --git a/node_modules/jest-validate/build/warnings.d.ts b/node_modules/jest-validate/build/warnings.d.ts index cd9f73957..c77597834 100644 --- a/node_modules/jest-validate/build/warnings.d.ts +++ b/node_modules/jest-validate/build/warnings.d.ts @@ -5,9 +5,5 @@ * LICENSE file in the root directory of this source tree. */ import { ValidationOptions } from './types'; -export declare const unknownOptionWarning: (config: { - [s: string]: any; -}, exampleConfig: { - [key: string]: any; -}, option: string, options: ValidationOptions, path?: string[] | undefined) => void; +export declare const unknownOptionWarning: (config: Record, exampleConfig: Record, option: string, options: ValidationOptions, path?: string[] | undefined) => void; //# sourceMappingURL=warnings.d.ts.map \ No newline at end of file diff --git a/node_modules/jest-validate/build/warnings.d.ts.map b/node_modules/jest-validate/build/warnings.d.ts.map index 982cbe7f8..a01f6ad0a 100644 --- a/node_modules/jest-validate/build/warnings.d.ts.map +++ b/node_modules/jest-validate/build/warnings.d.ts.map @@ -1 +1 @@ -{"version":3,"file":"warnings.d.ts","sourceRoot":"","sources":["../src/warnings.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,OAAO,EAAC,iBAAiB,EAAC,MAAM,SAAS,CAAC;AAQ1C,eAAO,MAAM,oBAAoB;;;;mFAsBhC,CAAC"} \ No newline at end of file +{"version":3,"file":"warnings.d.ts","sourceRoot":"","sources":["../src/warnings.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,OAAO,EAAC,iBAAiB,EAAC,MAAM,SAAS,CAAC;AAQ1C,eAAO,MAAM,oBAAoB,oJAsBhC,CAAC"} \ No newline at end of file diff --git a/node_modules/jest-validate/package.json b/node_modules/jest-validate/package.json index 4ed4dac2c..fb5bc5208 100644 --- a/node_modules/jest-validate/package.json +++ b/node_modules/jest-validate/package.json @@ -1,56 +1,53 @@ { - "_args": [ - [ - "jest-validate@24.8.0", - "/Users/drew.heavner/Documents/Github/sign-android-release" - ] - ], - "_development": true, - "_from": "jest-validate@24.8.0", - "_id": "jest-validate@24.8.0", + "_from": "jest-validate@^24.9.0", + "_id": "jest-validate@24.9.0", "_inBundle": false, - "_integrity": "sha512-+/N7VOEMW1Vzsrk3UWBDYTExTPwf68tavEPKDnJzrC6UlHtUDU/fuEdXqFoHzv9XnQ+zW6X3qMZhJ3YexfeLDA==", + "_integrity": "sha512-HPIt6C5ACwiqSiwi+OfSSHbK8sG7akG8eATl+IPKaeIjtPOeBUd/g3J7DghugzxrGjI93qS/+RPKe1H6PqvhRQ==", "_location": "/jest-validate", - "_phantomChildren": {}, + "_phantomChildren": { + "@types/istanbul-lib-coverage": "2.0.1", + "@types/istanbul-reports": "1.1.1", + "@types/yargs-parser": "15.0.0", + "ansi-regex": "4.1.0", + "ansi-styles": "3.2.1", + "react-is": "16.8.6" + }, "_requested": { - "type": "version", + "type": "range", "registry": true, - "raw": "jest-validate@24.8.0", + "raw": "jest-validate@^24.9.0", "name": "jest-validate", "escapedName": "jest-validate", - "rawSpec": "24.8.0", + "rawSpec": "^24.9.0", "saveSpec": null, - "fetchSpec": "24.8.0" + "fetchSpec": "^24.9.0" }, "_requiredBy": [ - "/@jest/core", "/jest-config", - "/jest-runtime", - "/jest/jest-cli" + "/jest-runtime" ], - "_resolved": "https://registry.npmjs.org/jest-validate/-/jest-validate-24.8.0.tgz", - "_spec": "24.8.0", - "_where": "/Users/drew.heavner/Documents/Github/sign-android-release", + "_resolved": "https://registry.npmjs.org/jest-validate/-/jest-validate-24.9.0.tgz", + "_shasum": "0775c55360d173cd854e40180756d4ff52def8ab", + "_spec": "jest-validate@^24.9.0", + "_where": "/Users/drew.heavner/Documents/Github/sign-android-release/node_modules/jest-runtime", "bugs": { "url": "https://github.com/facebook/jest/issues" }, + "bundleDependencies": false, "dependencies": { - "@jest/types": "^24.8.0", - "camelcase": "^5.0.0", + "@jest/types": "^24.9.0", + "camelcase": "^5.3.1", "chalk": "^2.0.1", - "jest-get-type": "^24.8.0", - "leven": "^2.1.0", - "pretty-format": "^24.8.0" + "jest-get-type": "^24.9.0", + "leven": "^3.1.0", + "pretty-format": "^24.9.0" }, + "deprecated": false, "description": "Generic configuration validation tool that helps you with warnings, errors and deprecation messages as well as showing users examples of correct configuration.", - "devDependencies": { - "@types/camelcase": "^4.1.0", - "@types/leven": "^2.1.1" - }, "engines": { "node": ">= 6" }, - "gitHead": "845728f24b3ef41e450595c384e9b5c9fdf248a4", + "gitHead": "9ad0f4bc6b8bdd94989804226c28c9960d9da7d1", "homepage": "https://github.com/facebook/jest#readme", "license": "MIT", "main": "build/index.js", @@ -64,5 +61,5 @@ "directory": "packages/jest-validate" }, "types": "build/index.d.ts", - "version": "24.8.0" + "version": "24.9.0" } diff --git a/node_modules/jest-validate/tsconfig.json b/node_modules/jest-validate/tsconfig.json deleted file mode 100644 index 7c6366820..000000000 --- a/node_modules/jest-validate/tsconfig.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "extends": "../../tsconfig.json", - "compilerOptions": { - "rootDir": "src", - "outDir": "build" - }, - "references": [ - {"path": "../jest-get-type"}, - {"path": "../jest-types"}, - {"path": "../pretty-format"} - ] -} diff --git a/node_modules/jest-watcher/LICENSE b/node_modules/jest-watcher/LICENSE index 10e779c44..b96dcb048 100644 --- a/node_modules/jest-watcher/LICENSE +++ b/node_modules/jest-watcher/LICENSE @@ -1,8 +1,6 @@ MIT License -For Jest software - -Copyright (c) 2014-present, Facebook, Inc. +Copyright (c) Facebook, Inc. and its affiliates. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/node_modules/jest-watcher/build/JestHooks.d.ts b/node_modules/jest-watcher/build/JestHooks.d.ts index 31e82d7d1..206e02af5 100644 --- a/node_modules/jest-watcher/build/JestHooks.d.ts +++ b/node_modules/jest-watcher/build/JestHooks.d.ts @@ -8,10 +8,12 @@ import { JestHookSubscriber, JestHookEmitter } from './types'; declare type AvailableHooks = 'onFileChange' | 'onTestRunComplete' | 'shouldRunTestSuite'; declare class JestHooks { private _listeners; + private _subscriber; + private _emitter; constructor(); isUsed(hook: AvailableHooks): number; - getSubscriber(): JestHookSubscriber; - getEmitter(): JestHookEmitter; + getSubscriber(): Readonly; + getEmitter(): Readonly; } export default JestHooks; //# sourceMappingURL=JestHooks.d.ts.map \ No newline at end of file diff --git a/node_modules/jest-watcher/build/JestHooks.d.ts.map b/node_modules/jest-watcher/build/JestHooks.d.ts.map index 83317d34f..32c90cf4f 100644 --- a/node_modules/jest-watcher/build/JestHooks.d.ts.map +++ b/node_modules/jest-watcher/build/JestHooks.d.ts.map @@ -1 +1 @@ -{"version":3,"file":"JestHooks.d.ts","sourceRoot":"","sources":["../src/JestHooks.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EACL,kBAAkB,EAClB,eAAe,EAIhB,MAAM,SAAS,CAAC;AAEjB,aAAK,cAAc,GACf,cAAc,GACd,mBAAmB,GACnB,oBAAoB,CAAC;AAEzB,cAAM,SAAS;IACb,OAAO,CAAC,UAAU,CAIhB;;IAUF,MAAM,CAAC,IAAI,EAAE,cAAc;IAI3B,aAAa,IAAI,kBAAkB;IAcnC,UAAU,IAAI,eAAe;CAmB9B;AAED,eAAe,SAAS,CAAC"} \ No newline at end of file +{"version":3,"file":"JestHooks.d.ts","sourceRoot":"","sources":["../src/JestHooks.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EACL,kBAAkB,EAClB,eAAe,EAIhB,MAAM,SAAS,CAAC;AAEjB,aAAK,cAAc,GACf,cAAc,GACd,mBAAmB,GACnB,oBAAoB,CAAC;AAEzB,cAAM,SAAS;IACb,OAAO,CAAC,UAAU,CAIhB;IAEF,OAAO,CAAC,WAAW,CAAqB;IACxC,OAAO,CAAC,QAAQ,CAAkB;;IAwClC,MAAM,CAAC,IAAI,EAAE,cAAc;IAI3B,aAAa,IAAI,QAAQ,CAAC,kBAAkB,CAAC;IAI7C,UAAU,IAAI,QAAQ,CAAC,eAAe,CAAC;CAGxC;AAED,eAAe,SAAS,CAAC"} \ No newline at end of file diff --git a/node_modules/jest-watcher/build/JestHooks.js b/node_modules/jest-watcher/build/JestHooks.js index 34a29cca6..04630f223 100644 --- a/node_modules/jest-watcher/build/JestHooks.js +++ b/node_modules/jest-watcher/build/JestHooks.js @@ -59,21 +59,20 @@ function _defineProperty(obj, key, value) { */ class JestHooks { constructor() { + var _this = this; + _defineProperty(this, '_listeners', void 0); + _defineProperty(this, '_subscriber', void 0); + + _defineProperty(this, '_emitter', void 0); + this._listeners = { onFileChange: [], onTestRunComplete: [], shouldRunTestSuite: [] }; - } - - isUsed(hook) { - return this._listeners[hook] && this._listeners[hook].length; - } - - getSubscriber() { - return { + this._subscriber = { onFileChange: fn => { this._listeners.onFileChange.push(fn); }, @@ -84,12 +83,7 @@ class JestHooks { this._listeners.shouldRunTestSuite.push(fn); } }; - } - - getEmitter() { - var _this = this; - - return { + this._emitter = { onFileChange: fs => this._listeners.onFileChange.forEach(listener => listener(fs)), onTestRunComplete: results => @@ -114,6 +108,18 @@ class JestHooks { })() }; } + + isUsed(hook) { + return this._listeners[hook] && this._listeners[hook].length; + } + + getSubscriber() { + return this._subscriber; + } + + getEmitter() { + return this._emitter; + } } var _default = JestHooks; diff --git a/node_modules/jest-watcher/package.json b/node_modules/jest-watcher/package.json index 2033f3014..b1c506e8a 100644 --- a/node_modules/jest-watcher/package.json +++ b/node_modules/jest-watcher/package.json @@ -1,45 +1,50 @@ { - "_args": [ - [ - "jest-watcher@24.8.0", - "/Users/drew.heavner/Documents/Github/sign-android-release" - ] - ], - "_development": true, - "_from": "jest-watcher@24.8.0", - "_id": "jest-watcher@24.8.0", + "_from": "jest-watcher@^24.9.0", + "_id": "jest-watcher@24.9.0", "_inBundle": false, - "_integrity": "sha512-SBjwHt5NedQoVu54M5GEx7cl7IGEFFznvd/HNT8ier7cCAx/Qgu9ZMlaTQkvK22G1YOpcWBLQPFSImmxdn3DAw==", + "_integrity": "sha512-+/fLOfKPXXYJDYlks62/4R4GoT+GU1tYZed99JSCOsmzkkF7727RqKrjNAxtfO4YpGv11wybgRvCjR73lK2GZw==", "_location": "/jest-watcher", - "_phantomChildren": {}, + "_phantomChildren": { + "@types/istanbul-lib-coverage": "2.0.1", + "@types/istanbul-reports": "1.1.1", + "@types/yargs-parser": "15.0.0", + "callsites": "3.1.0", + "chalk": "2.4.2", + "graceful-fs": "4.2.0", + "slash": "2.0.0", + "source-map": "0.6.1" + }, "_requested": { - "type": "version", + "type": "range", "registry": true, - "raw": "jest-watcher@24.8.0", + "raw": "jest-watcher@^24.9.0", "name": "jest-watcher", "escapedName": "jest-watcher", - "rawSpec": "24.8.0", + "rawSpec": "^24.9.0", "saveSpec": null, - "fetchSpec": "24.8.0" + "fetchSpec": "^24.9.0" }, "_requiredBy": [ - "/@jest/core" + "/jest/jest-cli/@jest/core" ], - "_resolved": "https://registry.npmjs.org/jest-watcher/-/jest-watcher-24.8.0.tgz", - "_spec": "24.8.0", - "_where": "/Users/drew.heavner/Documents/Github/sign-android-release", + "_resolved": "https://registry.npmjs.org/jest-watcher/-/jest-watcher-24.9.0.tgz", + "_shasum": "4b56e5d1ceff005f5b88e528dc9afc8dd4ed2b3b", + "_spec": "jest-watcher@^24.9.0", + "_where": "/Users/drew.heavner/Documents/Github/sign-android-release/node_modules/jest/node_modules/jest-cli/node_modules/@jest/core", "bugs": { "url": "https://github.com/facebook/jest/issues" }, + "bundleDependencies": false, "dependencies": { - "@jest/test-result": "^24.8.0", - "@jest/types": "^24.8.0", - "@types/yargs": "^12.0.9", + "@jest/test-result": "^24.9.0", + "@jest/types": "^24.9.0", + "@types/yargs": "^13.0.0", "ansi-escapes": "^3.0.0", "chalk": "^2.0.1", - "jest-util": "^24.8.0", + "jest-util": "^24.9.0", "string-length": "^2.0.0" }, + "deprecated": false, "description": "Delightful JavaScript Testing.", "devDependencies": { "@types/ansi-escapes": "^3.0.0", @@ -48,7 +53,7 @@ "engines": { "node": ">= 6" }, - "gitHead": "845728f24b3ef41e450595c384e9b5c9fdf248a4", + "gitHead": "9ad0f4bc6b8bdd94989804226c28c9960d9da7d1", "homepage": "https://jestjs.io/", "license": "MIT", "main": "build/index.js", @@ -61,5 +66,5 @@ "url": "git+https://github.com/facebook/jest.git", "directory": "packages/jest-watcher" }, - "version": "24.8.0" + "version": "24.9.0" } diff --git a/node_modules/jest-watcher/tsconfig.json b/node_modules/jest-watcher/tsconfig.json deleted file mode 100644 index eb392c86a..000000000 --- a/node_modules/jest-watcher/tsconfig.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "extends": "../../tsconfig.json", - "compilerOptions": { - "rootDir": "src", - "outDir": "build" - }, - "references": [ - {"path": "../jest-test-result"}, - {"path": "../jest-types"}, - {"path": "../jest-util"} - ] -} diff --git a/node_modules/jest-worker/LICENSE b/node_modules/jest-worker/LICENSE index 10e779c44..b96dcb048 100644 --- a/node_modules/jest-worker/LICENSE +++ b/node_modules/jest-worker/LICENSE @@ -1,8 +1,6 @@ MIT License -For Jest software - -Copyright (c) 2014-present, Facebook, Inc. +Copyright (c) Facebook, Inc. and its affiliates. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/node_modules/jest-worker/build/Farm.d.ts.map b/node_modules/jest-worker/build/Farm.d.ts.map index 5c576bd6b..95d95412a 100644 --- a/node_modules/jest-worker/build/Farm.d.ts.map +++ b/node_modules/jest-worker/build/Farm.d.ts.map @@ -1 +1 @@ -{"version":3,"file":"Farm.d.ts","sourceRoot":"","sources":["../src/Farm.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAEL,WAAW,EAOZ,MAAM,SAAS,CAAC;AAEjB,MAAM,CAAC,OAAO,OAAO,IAAI;IACvB,OAAO,CAAC,iBAAiB,CAAkC;IAC3D,OAAO,CAAC,UAAU,CAAmC;IACrD,OAAO,CAAC,SAAS,CAAW;IAC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AAC,YAAY;IAYpB,OAAO,CAAC,QAAQ;IA0BhB,OAAO,CAAC,QAAQ;IAmBhB,OAAO,CAAC,KAAK;IAUb,OAAO,CAAC,KAAK;IAIb,OAAO,CAAC,OAAO;IAIf,OAAO,CAAC,SAAS;CAGlB"} \ No newline at end of file diff --git a/node_modules/jest-worker/package.json b/node_modules/jest-worker/package.json index 66e1f2edb..f6947ea0c 100644 --- a/node_modules/jest-worker/package.json +++ b/node_modules/jest-worker/package.json @@ -1,44 +1,41 @@ { - "_args": [ - [ - "jest-worker@24.6.0", - "/Users/drew.heavner/Documents/Github/sign-android-release" - ] - ], - "_development": true, - "_from": "jest-worker@24.6.0", - "_id": "jest-worker@24.6.0", + "_from": "jest-worker@^24.6.0", + "_id": "jest-worker@24.9.0", "_inBundle": false, - "_integrity": "sha512-jDwgW5W9qGNvpI1tNnvajh0a5IE/PuGLFmHk6aR/BZFz8tSgGw17GsDPXAJ6p91IvYDjOw8GpFbvvZGAK+DPQQ==", + "_integrity": "sha512-51PE4haMSXcHohnSMdM42anbvZANYTqMrr52tVKPqqsPJMzoP6FYYDVqahX/HrAoKEKz3uUPzSvKs9A3qR4iVw==", "_location": "/jest-worker", "_phantomChildren": { "has-flag": "3.0.0" }, "_requested": { - "type": "version", + "type": "range", "registry": true, - "raw": "jest-worker@24.6.0", + "raw": "jest-worker@^24.6.0", "name": "jest-worker", "escapedName": "jest-worker", - "rawSpec": "24.6.0", + "rawSpec": "^24.6.0", "saveSpec": null, - "fetchSpec": "24.6.0" + "fetchSpec": "^24.6.0" }, "_requiredBy": [ "/@jest/reporters", "/jest-haste-map", - "/jest-runner" + "/jest-runner", + "/jest/jest-haste-map" ], - "_resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-24.6.0.tgz", - "_spec": "24.6.0", - "_where": "/Users/drew.heavner/Documents/Github/sign-android-release", + "_resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-24.9.0.tgz", + "_shasum": "5dbfdb5b2d322e98567898238a9697bcce67b3e5", + "_spec": "jest-worker@^24.6.0", + "_where": "/Users/drew.heavner/Documents/Github/sign-android-release/node_modules/@jest/reporters", "bugs": { "url": "https://github.com/facebook/jest/issues" }, + "bundleDependencies": false, "dependencies": { - "merge-stream": "^1.0.1", + "merge-stream": "^2.0.0", "supports-color": "^6.1.0" }, + "deprecated": false, "description": "Module for executing heavy tasks under forked processes in parallel, by providing a `Promise` based interface, minimum overhead, and bound workers.", "devDependencies": { "@types/merge-stream": "^1.1.2", @@ -49,7 +46,7 @@ "engines": { "node": ">= 6" }, - "gitHead": "04e6a66d2ba8b18bee080bb28547db74a255d2c7", + "gitHead": "9ad0f4bc6b8bdd94989804226c28c9960d9da7d1", "homepage": "https://github.com/facebook/jest#readme", "license": "MIT", "main": "build/index.js", @@ -63,5 +60,5 @@ "directory": "packages/jest-worker" }, "types": "build/index.d.ts", - "version": "24.6.0" + "version": "24.9.0" } diff --git a/node_modules/jest-worker/tsconfig.json b/node_modules/jest-worker/tsconfig.json deleted file mode 100644 index 7bb06bce6..000000000 --- a/node_modules/jest-worker/tsconfig.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "extends": "../../tsconfig.json", - "compilerOptions": { - "rootDir": "src", - "outDir": "build" - } -} diff --git a/node_modules/jest/node_modules/jest-cli/LICENSE b/node_modules/jest/node_modules/jest-cli/LICENSE deleted file mode 100644 index 10e779c44..000000000 --- a/node_modules/jest/node_modules/jest-cli/LICENSE +++ /dev/null @@ -1,23 +0,0 @@ -MIT License - -For Jest software - -Copyright (c) 2014-present, Facebook, Inc. - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/node_modules/jest/node_modules/jest-cli/build/cli/args.d.ts b/node_modules/jest/node_modules/jest-cli/build/cli/args.d.ts index 30bcadd17..2c026b9b4 100644 --- a/node_modules/jest/node_modules/jest-cli/build/cli/args.d.ts +++ b/node_modules/jest/node_modules/jest-cli/build/cli/args.d.ts @@ -41,7 +41,7 @@ export declare const check: (argv: import("yargs").Arguments { if (argv.hasOwnProperty('maxWorkers') && argv.maxWorkers === undefined) { throw new Error( - 'The --maxWorkers (-w) option requires a number to be specified.\n' + + 'The --maxWorkers (-w) option requires a number or string to be specified.\n' + 'Example usage: jest --maxWorkers 2\n' + + 'Example usage: jest --maxWorkers 50%\n' + 'Or did you mean --watch?' ); } @@ -103,7 +104,8 @@ const options = { description: 'The opposite of `onlyChanged`. If `onlyChanged` is set by ' + 'default, running jest with `--all` will force Jest to run all tests ' + - 'instead of running only tests related to changed files.' + 'instead of running only tests related to changed files.', + type: 'boolean' }, automock: { default: undefined, @@ -114,7 +116,8 @@ const options = { alias: 'b', default: undefined, description: - 'Exit the test suite immediately after `n` number of failing tests.' + 'Exit the test suite immediately after `n` number of failing tests.', + type: 'boolean' }, browser: { default: undefined, @@ -380,7 +383,7 @@ const options = { 'will spawn for running tests. This defaults to the number of the ' + 'cores available on your machine. (its usually best not to override ' + 'this default)', - type: 'number' + type: 'string' }, moduleDirectories: { description: @@ -653,6 +656,10 @@ const options = { 'provided: `/path/to/testSequencer.js`', type: 'string' }, + testTimeout: { + description: 'This option sets the default timeouts of test cases.', + type: 'number' + }, testURL: { description: 'This option sets the URL for the jsdom environment.', type: 'string' diff --git a/node_modules/jest/node_modules/jest-cli/build/cli/index.d.ts b/node_modules/jest/node_modules/jest-cli/build/cli/index.d.ts index 3a66df884..ca138d85e 100644 --- a/node_modules/jest/node_modules/jest-cli/build/cli/index.d.ts +++ b/node_modules/jest/node_modules/jest-cli/build/cli/index.d.ts @@ -43,7 +43,7 @@ export declare const buildArgv: (maybeArgv?: string[] | undefined) => yargs.Argu json: boolean; lastCommit: boolean; logHeapUsage: boolean; - maxWorkers: number; + maxWorkers: string | number; moduleDirectories: string[]; moduleFileExtensions: string[]; moduleNameMapper: string; @@ -80,6 +80,7 @@ export declare const buildArgv: (maybeArgv?: string[] | undefined) => yargs.Argu testRunner: string; testSequencer: string; testURL: string; + testTimeout: number | null | undefined; timers: string; transform: string; transformIgnorePatterns: string[]; diff --git a/node_modules/jest/node_modules/jest-cli/build/cli/index.d.ts.map b/node_modules/jest/node_modules/jest-cli/build/cli/index.d.ts.map index 0623466e9..32fac6df1 100644 --- a/node_modules/jest/node_modules/jest-cli/build/cli/index.d.ts.map +++ b/node_modules/jest/node_modules/jest-cli/build/cli/index.d.ts.map @@ -1 +1 @@ -{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/cli/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,OAAO,EAAC,MAAM,EAAC,MAAM,aAAa,CAAC;AAQnC,OAAO,KAAK,MAAM,OAAO,CAAC;AAM1B,wBAAsB,GAAG,CAAC,SAAS,CAAC,EAAE,KAAK,CAAC,MAAM,CAAC,EAAE,OAAO,CAAC,EAAE,MAAM,CAAC,IAAI,iBAoBzE;AAED,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkCrB,CAAC"} \ No newline at end of file +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/cli/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,OAAO,EAAC,MAAM,EAAC,MAAM,aAAa,CAAC;AAQnC,OAAO,KAAK,MAAM,OAAO,CAAC;AAK1B,wBAAsB,GAAG,CAAC,SAAS,CAAC,EAAE,KAAK,CAAC,MAAM,CAAC,EAAE,OAAO,CAAC,EAAE,MAAM,CAAC,IAAI,iBAyBzE;AAED,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkCrB,CAAC"} \ No newline at end of file diff --git a/node_modules/jest/node_modules/jest-cli/build/cli/index.js b/node_modules/jest/node_modules/jest-cli/build/cli/index.js index e0d01f356..621799fe5 100644 --- a/node_modules/jest/node_modules/jest-cli/build/cli/index.js +++ b/node_modules/jest/node_modules/jest-cli/build/cli/index.js @@ -98,8 +98,6 @@ function _realpathNative() { var _init = _interopRequireDefault(require('../init')); -var _version = _interopRequireDefault(require('../version')); - var args = _interopRequireWildcard(require('./args')); function _interopRequireWildcard(obj) { @@ -219,7 +217,13 @@ function _run() { } catch (error) { (0, _jestUtil().clearLine)(process.stderr); (0, _jestUtil().clearLine)(process.stdout); - console.error(_chalk().default.red(error.stack)); + + if (error.stack) { + console.error(_chalk().default.red(error.stack)); + } else { + console.error(_chalk().default.red(error)); + } + (0, _exit().default)(1); throw error; } @@ -229,7 +233,7 @@ function _run() { const buildArgv = maybeArgv => { const version = - (0, _version.default)() + + (0, _core().getVersion)() + (__dirname.includes(`packages${_path().default.sep}jest-cli`) ? '-dev' : ''); diff --git a/node_modules/jest/node_modules/jest-cli/build/index.d.ts b/node_modules/jest/node_modules/jest-cli/build/index.d.ts index a85b90d8f..98ce3b406 100644 --- a/node_modules/jest/node_modules/jest-cli/build/index.d.ts +++ b/node_modules/jest/node_modules/jest-cli/build/index.d.ts @@ -5,9 +5,8 @@ * LICENSE file in the root directory of this source tree. */ /// -import { SearchSource, TestScheduler, TestWatcher } from '@jest/core'; +import { getVersion, SearchSource, TestScheduler, TestWatcher } from '@jest/core'; import { run } from './cli'; -import { default as getVersion } from './version'; declare const _default: { SearchSource: typeof SearchSource; TestScheduler: typeof TestScheduler; @@ -50,7 +49,7 @@ declare const _default: { json: boolean; lastCommit: boolean; logHeapUsage: boolean; - maxWorkers: number; + maxWorkers: string | number; moduleDirectories: string[]; moduleFileExtensions: string[]; moduleNameMapper: string; @@ -87,6 +86,7 @@ declare const _default: { testRunner: string; testSequencer: string; testURL: string; + testTimeout: number | null | undefined; timers: string; transform: string; transformIgnorePatterns: string[]; diff --git a/node_modules/jest/node_modules/jest-cli/build/index.d.ts.map b/node_modules/jest/node_modules/jest-cli/build/index.d.ts.map index 6cdfa0708..26c74a7ca 100644 --- a/node_modules/jest/node_modules/jest-cli/build/index.d.ts.map +++ b/node_modules/jest/node_modules/jest-cli/build/index.d.ts.map @@ -1 +1 @@ -{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;;AAGH,OAAO,EAAS,YAAY,EAAE,aAAa,EAAE,WAAW,EAAC,MAAM,YAAY,CAAC;AAC5E,OAAO,EAAC,GAAG,EAAC,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAC,OAAO,IAAI,UAAU,EAAC,MAAM,WAAW,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEhD,kBAOE"} \ No newline at end of file +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;;AAGH,OAAO,EACL,UAAU,EAEV,YAAY,EACZ,aAAa,EACb,WAAW,EACZ,MAAM,YAAY,CAAC;AACpB,OAAO,EAAC,GAAG,EAAC,MAAM,OAAO,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAE1B,kBAOE"} \ No newline at end of file diff --git a/node_modules/jest/node_modules/jest-cli/build/index.js b/node_modules/jest/node_modules/jest-cli/build/index.js index d00de65bc..4063b36bb 100644 --- a/node_modules/jest/node_modules/jest-cli/build/index.js +++ b/node_modules/jest/node_modules/jest-cli/build/index.js @@ -12,12 +12,6 @@ function _core() { var _cli = require('./cli'); -var _version = _interopRequireDefault(require('./version')); - -function _interopRequireDefault(obj) { - return obj && obj.__esModule ? obj : {default: obj}; -} - /** * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. * @@ -29,7 +23,7 @@ module.exports = { SearchSource: _core().SearchSource, TestScheduler: _core().TestScheduler, TestWatcher: _core().TestWatcher, - getVersion: _version.default, + getVersion: _core().getVersion, run: _cli.run, runCLI: _core().runCLI }; diff --git a/node_modules/jest/node_modules/jest-cli/build/init/generate_config_file.d.ts b/node_modules/jest/node_modules/jest-cli/build/init/generate_config_file.d.ts index 00fae61ee..8d9f6b13e 100644 --- a/node_modules/jest/node_modules/jest-cli/build/init/generate_config_file.d.ts +++ b/node_modules/jest/node_modules/jest-cli/build/init/generate_config_file.d.ts @@ -4,8 +4,6 @@ * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ -declare const generateConfigFile: (results: { - [key: string]: unknown; -}) => string; +declare const generateConfigFile: (results: Record) => string; export default generateConfigFile; //# sourceMappingURL=generate_config_file.d.ts.map \ No newline at end of file diff --git a/node_modules/jest/node_modules/jest-cli/build/init/generate_config_file.d.ts.map b/node_modules/jest/node_modules/jest-cli/build/init/generate_config_file.d.ts.map index a5860524e..662504b7b 100644 --- a/node_modules/jest/node_modules/jest-cli/build/init/generate_config_file.d.ts.map +++ b/node_modules/jest/node_modules/jest-cli/build/init/generate_config_file.d.ts.map @@ -1 +1 @@ -{"version":3,"file":"generate_config_file.d.ts","sourceRoot":"","sources":["../../src/init/generate_config_file.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AA4BH,QAAA,MAAM,kBAAkB;;YAgDvB,CAAC;AAEF,eAAe,kBAAkB,CAAC"} \ No newline at end of file +{"version":3,"file":"generate_config_file.d.ts","sourceRoot":"","sources":["../../src/init/generate_config_file.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AA4BH,QAAA,MAAM,kBAAkB,8CAgDvB,CAAC;AAEF,eAAe,kBAAkB,CAAC"} \ No newline at end of file diff --git a/node_modules/jest/node_modules/jest-cli/build/init/types.d.ts b/node_modules/jest/node_modules/jest-cli/build/init/types.d.ts index 348182ecb..a0baea1a9 100644 --- a/node_modules/jest/node_modules/jest-cli/build/init/types.d.ts +++ b/node_modules/jest/node_modules/jest-cli/build/init/types.d.ts @@ -7,8 +7,6 @@ import { Config } from '@jest/types'; export declare type ProjectPackageJson = { jest?: Partial; - scripts?: { - [key: string]: string; - }; + scripts?: Record; }; //# sourceMappingURL=types.d.ts.map \ No newline at end of file diff --git a/node_modules/jest/node_modules/jest-cli/build/init/types.d.ts.map b/node_modules/jest/node_modules/jest-cli/build/init/types.d.ts.map index ec1acb2d6..3cb8ed914 100644 --- a/node_modules/jest/node_modules/jest-cli/build/init/types.d.ts.map +++ b/node_modules/jest/node_modules/jest-cli/build/init/types.d.ts.map @@ -1 +1 @@ -{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/init/types.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAC,MAAM,EAAC,MAAM,aAAa,CAAC;AAEnC,oBAAY,kBAAkB,GAAG;IAC/B,IAAI,CAAC,EAAE,OAAO,CAAC,MAAM,CAAC,cAAc,CAAC,CAAC;IACtC,OAAO,CAAC,EAAE;QAAC,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAA;KAAC,CAAC;CACnC,CAAC"} \ No newline at end of file +{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/init/types.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAC,MAAM,EAAC,MAAM,aAAa,CAAC;AAEnC,oBAAY,kBAAkB,GAAG;IAC/B,IAAI,CAAC,EAAE,OAAO,CAAC,MAAM,CAAC,cAAc,CAAC,CAAC;IACtC,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CAClC,CAAC"} \ No newline at end of file diff --git a/node_modules/jest/node_modules/jest-cli/build/version.d.ts b/node_modules/jest/node_modules/jest-cli/build/version.d.ts deleted file mode 100644 index f52c98ea3..000000000 --- a/node_modules/jest/node_modules/jest-cli/build/version.d.ts +++ /dev/null @@ -1,8 +0,0 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -export default function getVersion(): string; -//# sourceMappingURL=version.d.ts.map \ No newline at end of file diff --git a/node_modules/jest/node_modules/jest-cli/build/version.d.ts.map b/node_modules/jest/node_modules/jest-cli/build/version.d.ts.map deleted file mode 100644 index c8badd219..000000000 --- a/node_modules/jest/node_modules/jest-cli/build/version.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"version.d.ts","sourceRoot":"","sources":["../src/version.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAIH,MAAM,CAAC,OAAO,UAAU,UAAU,IAAI,MAAM,CAE3C"} \ No newline at end of file diff --git a/node_modules/jest/node_modules/jest-cli/build/version.js b/node_modules/jest/node_modules/jest-cli/build/version.js deleted file mode 100644 index 62f7d7cc0..000000000 --- a/node_modules/jest/node_modules/jest-cli/build/version.js +++ /dev/null @@ -1,19 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, '__esModule', { - value: true -}); -exports.default = getVersion; - -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -const _require = require('../package.json'), - VERSION = _require.version; - -function getVersion() { - return VERSION; -} diff --git a/node_modules/jest/node_modules/jest-cli/package.json b/node_modules/jest/node_modules/jest-cli/package.json index 9a329a650..e2fc1c7a4 100644 --- a/node_modules/jest/node_modules/jest-cli/package.json +++ b/node_modules/jest/node_modules/jest-cli/package.json @@ -1,65 +1,116 @@ { - "_args": [ - [ - "jest-cli@24.8.0", - "/Users/drew.heavner/Documents/Github/sign-android-release" - ] - ], - "_development": true, - "_from": "jest-cli@24.8.0", - "_id": "jest-cli@24.8.0", + "_from": "jest-cli@24.9.0", + "_id": "jest-cli@24.9.0", "_inBundle": false, - "_integrity": "sha512-+p6J00jSMPQ116ZLlHJJvdf8wbjNbZdeSX9ptfHX06/MSNaXmKihQzx5vQcw0q2G6JsdVkUIdWbOWtSnaYs3yA==", + "_integrity": "sha512-+VLRKyitT3BWoMeSUIHRxV/2g8y9gw91Jh5z2UmXZzkZKpbC08CSehVxgHUwTpy+HwGcns/tqafQDJW7imYvGg==", "_location": "/jest/jest-cli", - "_phantomChildren": {}, + "_phantomChildren": { + "@babel/core": "7.12.3", + "@jest/console": "24.7.1", + "@jest/fake-timers": "24.9.0", + "@jest/reporters": "24.9.0", + "@jest/source-map": "24.9.0", + "@jest/test-sequencer": "24.9.0", + "@jest/transform": "24.9.0", + "@types/istanbul-lib-coverage": "2.0.1", + "@types/istanbul-reports": "1.1.1", + "@types/yargs": "13.0.11", + "ansi-escapes": "3.2.0", + "babel-jest": "24.9.0", + "callsites": "3.1.0", + "camelcase": "5.3.1", + "chalk": "2.4.2", + "cliui": "5.0.0", + "find-up": "3.0.0", + "get-caller-file": "2.0.5", + "glob": "7.1.6", + "graceful-fs": "4.2.0", + "is-ci": "2.0.0", + "jest-changed-files": "24.9.0", + "jest-environment-jsdom": "24.9.0", + "jest-environment-node": "24.9.0", + "jest-get-type": "24.9.0", + "jest-haste-map": "24.9.0", + "jest-jasmine2": "24.9.0", + "jest-message-util": "24.9.0", + "jest-regex-util": "24.3.0", + "jest-resolve": "24.9.0", + "jest-resolve-dependencies": "24.9.0", + "jest-runner": "24.9.0", + "jest-runtime": "24.9.0", + "jest-snapshot": "24.9.0", + "jest-watcher": "24.9.0", + "kleur": "3.0.3", + "leven": "3.1.0", + "micromatch": "3.1.10", + "mkdirp": "0.5.5", + "p-each-series": "1.0.0", + "pretty-format": "24.9.0", + "realpath-native": "1.1.0", + "require-directory": "2.1.1", + "require-main-filename": "2.0.0", + "rimraf": "2.7.1", + "set-blocking": "2.0.0", + "sisteransi": "1.0.5", + "slash": "2.0.0", + "source-map": "0.6.1", + "string-width": "3.1.0", + "strip-ansi": "5.2.0", + "which-module": "2.0.0", + "y18n": "4.0.0", + "yargs-parser": "13.1.2" + }, "_requested": { "type": "version", "registry": true, - "raw": "jest-cli@24.8.0", + "raw": "jest-cli@24.9.0", "name": "jest-cli", "escapedName": "jest-cli", - "rawSpec": "24.8.0", + "rawSpec": "24.9.0", "saveSpec": null, - "fetchSpec": "24.8.0" + "fetchSpec": "24.9.0" }, "_requiredBy": [ "/jest" ], - "_resolved": "https://registry.npmjs.org/jest-cli/-/jest-cli-24.8.0.tgz", - "_spec": "24.8.0", - "_where": "/Users/drew.heavner/Documents/Github/sign-android-release", + "_resolved": "https://registry.npmjs.org/jest-cli/-/jest-cli-24.9.0.tgz", + "_shasum": "ad2de62d07472d419c6abc301fc432b98b10d2af", + "_spec": "jest-cli@24.9.0", + "_where": "/Users/drew.heavner/Documents/Github/sign-android-release/node_modules/jest", "bin": { - "jest": "./bin/jest.js" + "jest": "bin/jest.js" }, "bugs": { "url": "https://github.com/facebook/jest/issues" }, + "bundleDependencies": false, "dependencies": { - "@jest/core": "^24.8.0", - "@jest/test-result": "^24.8.0", - "@jest/types": "^24.8.0", + "@jest/core": "^24.9.0", + "@jest/test-result": "^24.9.0", + "@jest/types": "^24.9.0", "chalk": "^2.0.1", "exit": "^0.1.2", "import-local": "^2.0.0", "is-ci": "^2.0.0", - "jest-config": "^24.8.0", - "jest-util": "^24.8.0", - "jest-validate": "^24.8.0", + "jest-config": "^24.9.0", + "jest-util": "^24.9.0", + "jest-validate": "^24.9.0", "prompts": "^2.0.1", "realpath-native": "^1.1.0", - "yargs": "^12.0.2" + "yargs": "^13.3.0" }, + "deprecated": false, "description": "Delightful JavaScript Testing.", "devDependencies": { "@types/exit": "^0.1.30", - "@types/is-ci": "^1.1.0", - "@types/prompts": "^1.2.0", - "@types/yargs": "^12.0.2" + "@types/is-ci": "^2.0.0", + "@types/prompts": "^2.0.1", + "@types/yargs": "^13.0.0" }, "engines": { "node": ">= 6" }, - "gitHead": "845728f24b3ef41e450595c384e9b5c9fdf248a4", + "gitHead": "9ad0f4bc6b8bdd94989804226c28c9960d9da7d1", "homepage": "https://jestjs.io/", "keywords": [ "ava", @@ -99,5 +150,5 @@ "directory": "packages/jest-cli" }, "types": "build/index.d.ts", - "version": "24.8.0" + "version": "24.9.0" } diff --git a/node_modules/jest/node_modules/jest-cli/tsconfig.json b/node_modules/jest/node_modules/jest-cli/tsconfig.json deleted file mode 100644 index 214e78d81..000000000 --- a/node_modules/jest/node_modules/jest-cli/tsconfig.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "extends": "../../tsconfig.json", - "compilerOptions": { - "rootDir": "src", - "outDir": "build" - }, - "references": [ - {"path": "../jest-core"}, - {"path": "../jest-config"}, - {"path": "../jest-test-result"}, - {"path": "../jest-types"}, - {"path": "../jest-util"}, - {"path": "../jest-validate"} - ] -} diff --git a/node_modules/json5/CHANGELOG.md b/node_modules/json5/CHANGELOG.md index b27fd07f6..5e6d09c93 100644 --- a/node_modules/json5/CHANGELOG.md +++ b/node_modules/json5/CHANGELOG.md @@ -1,3 +1,29 @@ +### v2.1.3 [[code][c2.1.3], [diff][d2.1.3]] + +[c2.1.3]: https://github.com/json5/json5/tree/v2.1.3 +[d2.1.3]: https://github.com/json5/json5/compare/v2.1.2...v2.1.3 + +- Fix: An out of memory bug when parsing numbers has been fixed. ([#228], + [#229]) + +### v2.1.2 [[code][c2.1.2], [diff][d2.1.2]] + +[c2.1.2]: https://github.com/json5/json5/tree/v2.1.2 +[d2.1.2]: https://github.com/json5/json5/compare/v2.1.1...v2.1.2 + +- Fix: Bump `minimist` to `v1.2.5`. ([#222]) + +### v2.1.1 [[code][c2.1.1], [diff][d2.1.1]] + +[c2.1.1]: https://github.com/json5/json5/tree/v2.1.1 +[d2.1.1]: https://github.com/json5/json5/compare/v2.0.1...v2.1.1 + +- New: `package.json` and `package.json5` include a `module` property so + bundlers like webpack, rollup and parcel can take advantage of the ES Module + build. ([#208]) +- Fix: `stringify` outputs `\0` as `\\x00` when followed by a digit. ([#210]) +- Fix: Spelling mistakes have been fixed. ([#196]) + ### v2.1.0 [[code][c2.1.0], [diff][d2.1.0]] [c2.1.0]: https://github.com/json5/json5/tree/v2.1.0 @@ -313,3 +339,6 @@ parser for the regular JSON format. [#181]: https://github.com/json5/json5/issues/181 [#182]: https://github.com/json5/json5/issues/182 [#187]: https://github.com/json5/json5/issues/187 +[#196]: https://github.com/json5/json5/issues/196 +[#208]: https://github.com/json5/json5/issues/208 +[#210]: https://github.com/json5/json5/issues/210 diff --git a/node_modules/json5/README.md b/node_modules/json5/README.md index 9064b12ba..4f803270b 100644 --- a/node_modules/json5/README.md +++ b/node_modules/json5/README.md @@ -199,7 +199,7 @@ To report bugs or request features regarding the JSON5 data format, please submit an issue to the [official specification repository](https://github.com/json5/json5-spec). -To report bugs or request features regarding the JavaScript implentation of +To report bugs or request features regarding the JavaScript implementation of JSON5, please submit an issue to this repository. ## License @@ -221,7 +221,7 @@ implementation of JSON5 was also modeled directly off of Doug’s open-source code. [json_parse.js]: -https://github.com/douglascrockford/JSON-js/blob/master/json_parse.js +https://github.com/douglascrockford/JSON-js/blob/03157639c7a7cddd2e9f032537f346f1a87c0f6d/json_parse.js [Max Nanasy](https://github.com/MaxNanasy) has been an early and prolific supporter, contributing multiple patches and ideas. diff --git a/node_modules/json5/dist/index.js b/node_modules/json5/dist/index.js index dcbe04fe3..9f98eb39d 100644 --- a/node_modules/json5/dist/index.js +++ b/node_modules/json5/dist/index.js @@ -18,7 +18,7 @@ }); var _core = createCommonjsModule(function (module) { - var core = module.exports = { version: '2.5.7' }; + var core = module.exports = { version: '2.6.5' }; if (typeof __e == 'number') { __e = core; } // eslint-disable-line no-undef }); var _core_1 = _core.version; @@ -114,14 +114,31 @@ return 'Symbol('.concat(key === undefined ? '' : key, ')_', (++id + px).toString(36)); }; + var _library = false; + + var _shared = createCommonjsModule(function (module) { + var SHARED = '__core-js_shared__'; + var store = _global[SHARED] || (_global[SHARED] = {}); + + (module.exports = function (key, value) { + return store[key] || (store[key] = value !== undefined ? value : {}); + })('versions', []).push({ + version: _core.version, + mode: _library ? 'pure' : 'global', + copyright: '© 2019 Denis Pushkarev (zloirock.ru)' + }); + }); + + var _functionToString = _shared('native-function-to-string', Function.toString); + var _redefine = createCommonjsModule(function (module) { var SRC = _uid('src'); + var TO_STRING = 'toString'; - var $toString = Function[TO_STRING]; - var TPL = ('' + $toString).split(TO_STRING); + var TPL = ('' + _functionToString).split(TO_STRING); _core.inspectSource = function (it) { - return $toString.call(it); + return _functionToString.call(it); }; (module.exports = function (O, key, val, safe) { @@ -141,7 +158,7 @@ } // add fake Function#toString for correct work wrapped methods / constructors with methods like LoDash isNative })(Function.prototype, TO_STRING, function toString() { - return typeof this == 'function' && this[SRC] || $toString.call(this); + return typeof this == 'function' && this[SRC] || _functionToString.call(this); }); }); @@ -295,11 +312,11 @@ var util = { isSpaceSeparator: function isSpaceSeparator (c) { - return unicode.Space_Separator.test(c) + return typeof c === 'string' && unicode.Space_Separator.test(c) }, isIdStartChar: function isIdStartChar (c) { - return ( + return typeof c === 'string' && ( (c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z') || (c === '$') || (c === '_') || @@ -308,7 +325,7 @@ }, isIdContinueChar: function isIdContinueChar (c) { - return ( + return typeof c === 'string' && ( (c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z') || (c >= '0' && c <= '9') || @@ -319,11 +336,11 @@ }, isDigit: function isDigit (c) { - return /[0-9]/.test(c) + return typeof c === 'string' && /[0-9]/.test(c) }, isHexDigit: function isHexDigit (c) { - return /[0-9A-Fa-f]/.test(c) + return typeof c === 'string' && /[0-9A-Fa-f]/.test(c) }, }; @@ -1541,15 +1558,20 @@ var product = ''; - for (var i = 0, list = value; i < list.length; i += 1) { - var c = list[i]; - + for (var i = 0; i < value.length; i++) { + var c = value[i]; switch (c) { case "'": case '"': quotes[c]++; product += c; continue + + case '\0': + if (util.isDigit(value[i + 1])) { + product += '\\x00'; + continue + } } if (replacements[c]) { diff --git a/node_modules/json5/dist/index.min.js b/node_modules/json5/dist/index.min.js index b336abad6..da63a9da3 100644 --- a/node_modules/json5/dist/index.min.js +++ b/node_modules/json5/dist/index.min.js @@ -1 +1 @@ -!function(u,D){"object"==typeof exports&&"undefined"!=typeof module?module.exports=D():"function"==typeof define&&define.amd?define(D):u.JSON5=D()}(this,function(){"use strict";function u(u,D){return u(D={exports:{}},D.exports),D.exports}var D=u(function(u){var D=u.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=D)}),e=u(function(u){var D=u.exports={version:"2.5.7"};"number"==typeof __e&&(__e=D)}),t=(e.version,function(u){return"object"==typeof u?null!==u:"function"==typeof u}),r=function(u){if(!t(u))throw TypeError(u+" is not an object!");return u},F=function(u){try{return!!u()}catch(u){return!0}},n=!F(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a}),C=D.document,A=t(C)&&t(C.createElement),E=!n&&!F(function(){return 7!=Object.defineProperty((u="div",A?C.createElement(u):{}),"a",{get:function(){return 7}}).a;var u}),i=Object.defineProperty,o={f:n?Object.defineProperty:function(u,D,e){if(r(u),D=function(u,D){if(!t(u))return u;var e,r;if(D&&"function"==typeof(e=u.toString)&&!t(r=e.call(u)))return r;if("function"==typeof(e=u.valueOf)&&!t(r=e.call(u)))return r;if(!D&&"function"==typeof(e=u.toString)&&!t(r=e.call(u)))return r;throw TypeError("Can't convert object to primitive value")}(D,!0),r(e),E)try{return i(u,D,e)}catch(u){}if("get"in e||"set"in e)throw TypeError("Accessors not supported!");return"value"in e&&(u[D]=e.value),u}},a=n?function(u,D,e){return o.f(u,D,function(u,D){return{enumerable:!(1&u),configurable:!(2&u),writable:!(4&u),value:D}}(1,e))}:function(u,D,e){return u[D]=e,u},c={}.hasOwnProperty,B=function(u,D){return c.call(u,D)},s=0,f=Math.random(),l=u(function(u){var t,r="Symbol(".concat(void 0===(t="src")?"":t,")_",(++s+f).toString(36)),F=Function.toString,n=(""+F).split("toString");e.inspectSource=function(u){return F.call(u)},(u.exports=function(u,e,t,F){var C="function"==typeof t;C&&(B(t,"name")||a(t,"name",e)),u[e]!==t&&(C&&(B(t,r)||a(t,r,u[e]?""+u[e]:n.join(String(e)))),u===D?u[e]=t:F?u[e]?u[e]=t:a(u,e,t):(delete u[e],a(u,e,t)))})(Function.prototype,"toString",function(){return"function"==typeof this&&this[r]||F.call(this)})}),d=function(u,D,e){if(function(u){if("function"!=typeof u)throw TypeError(u+" is not a function!")}(u),void 0===D)return u;switch(e){case 1:return function(e){return u.call(D,e)};case 2:return function(e,t){return u.call(D,e,t)};case 3:return function(e,t,r){return u.call(D,e,t,r)}}return function(){return u.apply(D,arguments)}},v=function(u,t,r){var F,n,C,A,E=u&v.F,i=u&v.G,o=u&v.S,c=u&v.P,B=u&v.B,s=i?D:o?D[t]||(D[t]={}):(D[t]||{}).prototype,f=i?e:e[t]||(e[t]={}),p=f.prototype||(f.prototype={});for(F in i&&(r=t),r)C=((n=!E&&s&&void 0!==s[F])?s:r)[F],A=B&&n?d(C,D):c&&"function"==typeof C?d(Function.call,C):C,s&&l(s,F,C,u&v.U),f[F]!=C&&a(f,F,A),c&&p[F]!=C&&(p[F]=C)};D.core=e,v.F=1,v.G=2,v.S=4,v.P=8,v.B=16,v.W=32,v.U=64,v.R=128;var p,h=v,m=Math.ceil,g=Math.floor,y=function(u){return isNaN(u=+u)?0:(u>0?g:m)(u)},w=(p=!1,function(u,D){var e,t,r=String(function(u){if(null==u)throw TypeError("Can't call method on "+u);return u}(u)),F=y(D),n=r.length;return F<0||F>=n?p?"":void 0:(e=r.charCodeAt(F))<55296||e>56319||F+1===n||(t=r.charCodeAt(F+1))<56320||t>57343?p?r.charAt(F):e:p?r.slice(F,F+2):t-56320+(e-55296<<10)+65536});h(h.P,"String",{codePointAt:function(u){return w(this,u)}});e.String.codePointAt;var S=Math.max,b=Math.min,x=String.fromCharCode,N=String.fromCodePoint;h(h.S+h.F*(!!N&&1!=N.length),"String",{fromCodePoint:function(u){for(var D,e,t,r=arguments,F=[],n=arguments.length,C=0;n>C;){if(D=+r[C++],t=1114111,((e=y(e=D))<0?S(e+t,0):b(e,t))!==D)throw RangeError(D+" is not a valid code point");F.push(D<65536?x(D):x(55296+((D-=65536)>>10),D%1024+56320))}return F.join("")}});e.String.fromCodePoint;var P,I,O,_,j,V,J,M,L,k,T,H,$,z,R={Space_Separator:/[\u1680\u2000-\u200A\u202F\u205F\u3000]/,ID_Start:/[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u08A0-\u08B4\u08B6-\u08BD\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-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u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312E\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FEA\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\u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E\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC00-\uDC34\uDC47-\uDC4A\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE80-\uDEAA\uDF00-\uDF19]|\uD806[\uDCA0-\uDCDF\uDCFF\uDE00\uDE0B-\uDE32\uDE3A\uDE50\uDE5C-\uDE83\uDE86-\uDE89\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC2E\uDC40\uDC72-\uDC8F\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD30\uDD46]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50\uDF93-\uDF9F\uDFE0\uDFE1]|\uD821[\uDC00-\uDFEC]|\uD822[\uDC00-\uDEF2]|\uD82C[\uDC00-\uDD1E\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB]|\uD83A[\uDC00-\uDCC4\uDD00-\uDD43]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]/,ID_Continue:/[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u0483-\u0487\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u05D0-\u05EA\u05F0-\u05F2\u0610-\u061A\u0620-\u0669\u066E-\u06D3\u06D5-\u06DC\u06DF-\u06E8\u06EA-\u06FC\u06FF\u0710-\u074A\u074D-\u07B1\u07C0-\u07F5\u07FA\u0800-\u082D\u0840-\u085B\u0860-\u086A\u08A0-\u08B4\u08B6-\u08BD\u08D4-\u08E1\u08E3-\u0963\u0966-\u096F\u0971-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09E6-\u09F1\u09FC\u0A01-\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A59-\u0A5C\u0A5E\u0A66-\u0A75\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABC-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AD0\u0AE0-\u0AE3\u0AE6-\u0AEF\u0AF9-\u0AFF\u0B01-\u0B03\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3C-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B5C\u0B5D\u0B5F-\u0B63\u0B66-\u0B6F\u0B71\u0B82\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD0\u0BD7\u0BE6-\u0BEF\u0C00-\u0C03\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C58-\u0C5A\u0C60-\u0C63\u0C66-\u0C6F\u0C80-\u0C83\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBC-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CDE\u0CE0-\u0CE3\u0CE6-\u0CEF\u0CF1\u0CF2\u0D00-\u0D03\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D44\u0D46-\u0D48\u0D4A-\u0D4E\u0D54-\u0D57\u0D5F-\u0D63\u0D66-\u0D6F\u0D7A-\u0D7F\u0D82\u0D83\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E01-\u0E3A\u0E40-\u0E4E\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB9\u0EBB-\u0EBD\u0EC0-\u0EC4\u0EC6\u0EC8-\u0ECD\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E-\u0F47\u0F49-\u0F6C\u0F71-\u0F84\u0F86-\u0F97\u0F99-\u0FBC\u0FC6\u1000-\u1049\u1050-\u109D\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u135D-\u135F\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1714\u1720-\u1734\u1740-\u1753\u1760-\u176C\u176E-\u1770\u1772\u1773\u1780-\u17D3\u17D7\u17DC\u17DD\u17E0-\u17E9\u180B-\u180D\u1810-\u1819\u1820-\u1877\u1880-\u18AA\u18B0-\u18F5\u1900-\u191E\u1920-\u192B\u1930-\u193B\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19D9\u1A00-\u1A1B\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA7\u1AB0-\u1ABD\u1B00-\u1B4B\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BF3\u1C00-\u1C37\u1C40-\u1C49\u1C4D-\u1C7D\u1C80-\u1C88\u1CD0-\u1CD2\u1CD4-\u1CF9\u1D00-\u1DF9\u1DFB-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u203F\u2040\u2054\u2071\u207F\u2090-\u209C\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D7F-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2DE0-\u2DFF\u2E2F\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u3099\u309A\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312E\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FEA\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66F\uA674-\uA67D\uA67F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA827\uA840-\uA873\uA880-\uA8C5\uA8D0-\uA8D9\uA8E0-\uA8F7\uA8FB\uA8FD\uA900-\uA92D\uA930-\uA953\uA960-\uA97C\uA980-\uA9C0\uA9CF-\uA9D9\uA9E0-\uA9FE\uAA00-\uAA36\uAA40-\uAA4D\uAA50-\uAA59\uAA60-\uAA76\uAA7A-\uAAC2\uAADB-\uAADD\uAAE0-\uAAEF\uAAF2-\uAAF6\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABEA\uABEC\uABED\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF3F\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5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\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDC00-\uDC4A\uDC50-\uDC59\uDC80-\uDCC5\uDCC7\uDCD0-\uDCD9\uDD80-\uDDB5\uDDB8-\uDDC0\uDDD8-\uDDDD\uDE00-\uDE40\uDE44\uDE50-\uDE59\uDE80-\uDEB7\uDEC0-\uDEC9\uDF00-\uDF19\uDF1D-\uDF2B\uDF30-\uDF39]|\uD806[\uDCA0-\uDCE9\uDCFF\uDE00-\uDE3E\uDE47\uDE50-\uDE83\uDE86-\uDE99\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC36\uDC38-\uDC40\uDC50-\uDC59\uDC72-\uDC8F\uDC92-\uDCA7\uDCA9-\uDCB6\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD36\uDD3A\uDD3C\uDD3D\uDD3F-\uDD47\uDD50-\uDD59]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE60-\uDE69\uDED0-\uDEED\uDEF0-\uDEF4\uDF00-\uDF36\uDF40-\uDF43\uDF50-\uDF59\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50-\uDF7E\uDF8F-\uDF9F\uDFE0\uDFE1]|\uD821[\uDC00-\uDFEC]|\uD822[\uDC00-\uDEF2]|\uD82C[\uDC00-\uDD1E\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99\uDC9D\uDC9E]|\uD834[\uDD65-\uDD69\uDD6D-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB\uDFCE-\uDFFF]|\uD836[\uDE00-\uDE36\uDE3B-\uDE6C\uDE75\uDE84\uDE9B-\uDE9F\uDEA1-\uDEAF]|\uD838[\uDC00-\uDC06\uDC08-\uDC18\uDC1B-\uDC21\uDC23\uDC24\uDC26-\uDC2A]|\uD83A[\uDC00-\uDCC4\uDCD0-\uDCD6\uDD00-\uDD4A\uDD50-\uDD59]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]|\uDB40[\uDD00-\uDDEF]/},G={isSpaceSeparator:function(u){return R.Space_Separator.test(u)},isIdStartChar:function(u){return u>="a"&&u<="z"||u>="A"&&u<="Z"||"$"===u||"_"===u||R.ID_Start.test(u)},isIdContinueChar:function(u){return u>="a"&&u<="z"||u>="A"&&u<="Z"||u>="0"&&u<="9"||"$"===u||"_"===u||"‌"===u||"‍"===u||R.ID_Continue.test(u)},isDigit:function(u){return/[0-9]/.test(u)},isHexDigit:function(u){return/[0-9A-Fa-f]/.test(u)}};function U(){for(k="default",T="",H=!1,$=1;;){z=Z();var u=W[k]();if(u)return u}}function Z(){if(P[_])return String.fromCodePoint(P.codePointAt(_))}function q(){var u=Z();return"\n"===u?(j++,V=0):u?V+=u.length:V++,u&&(_+=u.length),u}var W={default:function(){switch(z){case"\t":case"\v":case"\f":case" ":case" ":case"\ufeff":case"\n":case"\r":case"\u2028":case"\u2029":return void q();case"/":return q(),void(k="comment");case void 0:return q(),X("eof")}if(!G.isSpaceSeparator(z))return W[I]();q()},comment:function(){switch(z){case"*":return q(),void(k="multiLineComment");case"/":return q(),void(k="singleLineComment")}throw eu(q())},multiLineComment:function(){switch(z){case"*":return q(),void(k="multiLineCommentAsterisk");case void 0:throw eu(q())}q()},multiLineCommentAsterisk:function(){switch(z){case"*":return void q();case"/":return q(),void(k="default");case void 0:throw eu(q())}q(),k="multiLineComment"},singleLineComment:function(){switch(z){case"\n":case"\r":case"\u2028":case"\u2029":return q(),void(k="default");case void 0:return q(),X("eof")}q()},value:function(){switch(z){case"{":case"[":return X("punctuator",q());case"n":return q(),K("ull"),X("null",null);case"t":return q(),K("rue"),X("boolean",!0);case"f":return q(),K("alse"),X("boolean",!1);case"-":case"+":return"-"===q()&&($=-1),void(k="sign");case".":return T=q(),void(k="decimalPointLeading");case"0":return T=q(),void(k="zero");case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":return T=q(),void(k="decimalInteger");case"I":return q(),K("nfinity"),X("numeric",1/0);case"N":return q(),K("aN"),X("numeric",NaN);case'"':case"'":return H='"'===q(),T="",void(k="string")}throw eu(q())},identifierNameStartEscape:function(){if("u"!==z)throw eu(q());q();var u=Q();switch(u){case"$":case"_":break;default:if(!G.isIdStartChar(u))throw ru()}T+=u,k="identifierName"},identifierName:function(){switch(z){case"$":case"_":case"‌":case"‍":return void(T+=q());case"\\":return q(),void(k="identifierNameEscape")}if(!G.isIdContinueChar(z))return X("identifier",T);T+=q()},identifierNameEscape:function(){if("u"!==z)throw eu(q());q();var u=Q();switch(u){case"$":case"_":case"‌":case"‍":break;default:if(!G.isIdContinueChar(u))throw ru()}T+=u,k="identifierName"},sign:function(){switch(z){case".":return T=q(),void(k="decimalPointLeading");case"0":return T=q(),void(k="zero");case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":return T=q(),void(k="decimalInteger");case"I":return q(),K("nfinity"),X("numeric",$*(1/0));case"N":return q(),K("aN"),X("numeric",NaN)}throw eu(q())},zero:function(){switch(z){case".":return T+=q(),void(k="decimalPoint");case"e":case"E":return T+=q(),void(k="decimalExponent");case"x":case"X":return T+=q(),void(k="hexadecimal")}return X("numeric",0*$)},decimalInteger:function(){switch(z){case".":return T+=q(),void(k="decimalPoint");case"e":case"E":return T+=q(),void(k="decimalExponent")}if(!G.isDigit(z))return X("numeric",$*Number(T));T+=q()},decimalPointLeading:function(){if(G.isDigit(z))return T+=q(),void(k="decimalFraction");throw eu(q())},decimalPoint:function(){switch(z){case"e":case"E":return T+=q(),void(k="decimalExponent")}return G.isDigit(z)?(T+=q(),void(k="decimalFraction")):X("numeric",$*Number(T))},decimalFraction:function(){switch(z){case"e":case"E":return T+=q(),void(k="decimalExponent")}if(!G.isDigit(z))return X("numeric",$*Number(T));T+=q()},decimalExponent:function(){switch(z){case"+":case"-":return T+=q(),void(k="decimalExponentSign")}if(G.isDigit(z))return T+=q(),void(k="decimalExponentInteger");throw eu(q())},decimalExponentSign:function(){if(G.isDigit(z))return T+=q(),void(k="decimalExponentInteger");throw eu(q())},decimalExponentInteger:function(){if(!G.isDigit(z))return X("numeric",$*Number(T));T+=q()},hexadecimal:function(){if(G.isHexDigit(z))return T+=q(),void(k="hexadecimalInteger");throw eu(q())},hexadecimalInteger:function(){if(!G.isHexDigit(z))return X("numeric",$*Number(T));T+=q()},string:function(){switch(z){case"\\":return q(),void(T+=function(){switch(Z()){case"b":return q(),"\b";case"f":return q(),"\f";case"n":return q(),"\n";case"r":return q(),"\r";case"t":return q(),"\t";case"v":return q(),"\v";case"0":if(q(),G.isDigit(Z()))throw eu(q());return"\0";case"x":return q(),function(){var u="",D=Z();if(!G.isHexDigit(D))throw eu(q());if(u+=q(),D=Z(),!G.isHexDigit(D))throw eu(q());return u+=q(),String.fromCodePoint(parseInt(u,16))}();case"u":return q(),Q();case"\n":case"\u2028":case"\u2029":return q(),"";case"\r":return q(),"\n"===Z()&&q(),"";case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":case void 0:throw eu(q())}return q()}());case'"':return H?(q(),X("string",T)):void(T+=q());case"'":return H?void(T+=q()):(q(),X("string",T));case"\n":case"\r":throw eu(q());case"\u2028":case"\u2029":!function(u){console.warn("JSON5: '"+Fu(u)+"' in strings is not valid ECMAScript; consider escaping")}(z);break;case void 0:throw eu(q())}T+=q()},start:function(){switch(z){case"{":case"[":return X("punctuator",q())}k="value"},beforePropertyName:function(){switch(z){case"$":case"_":return T=q(),void(k="identifierName");case"\\":return q(),void(k="identifierNameStartEscape");case"}":return X("punctuator",q());case'"':case"'":return H='"'===q(),void(k="string")}if(G.isIdStartChar(z))return T+=q(),void(k="identifierName");throw eu(q())},afterPropertyName:function(){if(":"===z)return X("punctuator",q());throw eu(q())},beforePropertyValue:function(){k="value"},afterPropertyValue:function(){switch(z){case",":case"}":return X("punctuator",q())}throw eu(q())},beforeArrayValue:function(){if("]"===z)return X("punctuator",q());k="value"},afterArrayValue:function(){switch(z){case",":case"]":return X("punctuator",q())}throw eu(q())},end:function(){throw eu(q())}};function X(u,D){return{type:u,value:D,line:j,column:V}}function K(u){for(var D=0,e=u;D0;){var e=Z();if(!G.isHexDigit(e))throw eu(q());u+=q()}return String.fromCodePoint(parseInt(u,16))}var Y={start:function(){if("eof"===J.type)throw tu();uu()},beforePropertyName:function(){switch(J.type){case"identifier":case"string":return M=J.value,void(I="afterPropertyName");case"punctuator":return void Du();case"eof":throw tu()}},afterPropertyName:function(){if("eof"===J.type)throw tu();I="beforePropertyValue"},beforePropertyValue:function(){if("eof"===J.type)throw tu();uu()},beforeArrayValue:function(){if("eof"===J.type)throw tu();"punctuator"!==J.type||"]"!==J.value?uu():Du()},afterPropertyValue:function(){if("eof"===J.type)throw tu();switch(J.value){case",":return void(I="beforePropertyName");case"}":Du()}},afterArrayValue:function(){if("eof"===J.type)throw tu();switch(J.value){case",":return void(I="beforeArrayValue");case"]":Du()}},end:function(){}};function uu(){var u;switch(J.type){case"punctuator":switch(J.value){case"{":u={};break;case"[":u=[]}break;case"null":case"boolean":case"numeric":case"string":u=J.value}if(void 0===L)L=u;else{var D=O[O.length-1];Array.isArray(D)?D.push(u):D[M]=u}if(null!==u&&"object"==typeof u)O.push(u),I=Array.isArray(u)?"beforeArrayValue":"beforePropertyName";else{var e=O[O.length-1];I=null==e?"end":Array.isArray(e)?"afterArrayValue":"afterPropertyValue"}}function Du(){O.pop();var u=O[O.length-1];I=null==u?"end":Array.isArray(u)?"afterArrayValue":"afterPropertyValue"}function eu(u){return nu(void 0===u?"JSON5: invalid end of input at "+j+":"+V:"JSON5: invalid character '"+Fu(u)+"' at "+j+":"+V)}function tu(){return nu("JSON5: invalid end of input at "+j+":"+V)}function ru(){return nu("JSON5: invalid identifier character at "+j+":"+(V-=5))}function Fu(u){var D={"'":"\\'",'"':'\\"',"\\":"\\\\","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r","\t":"\\t","\v":"\\v","\0":"\\0","\u2028":"\\u2028","\u2029":"\\u2029"};if(D[u])return D[u];if(u<" "){var e=u.charCodeAt(0).toString(16);return"\\x"+("00"+e).substring(e.length)}return u}function nu(u){var D=new SyntaxError(u);return D.lineNumber=j,D.columnNumber=V,D}return{parse:function(u,D){P=String(u),I="start",O=[],_=0,j=1,V=0,J=void 0,M=void 0,L=void 0;do{J=U(),Y[I]()}while("eof"!==J.type);return"function"==typeof D?function u(D,e,t){var r=D[e];if(null!=r&&"object"==typeof r)for(var F in r){var n=u(r,F,t);void 0===n?delete r[F]:r[F]=n}return t.call(D,e,r)}({"":L},"",D):L},stringify:function(u,D,e){var t,r,F,n=[],C="",A="";if(null==D||"object"!=typeof D||Array.isArray(D)||(e=D.space,F=D.quote,D=D.replacer),"function"==typeof D)r=D;else if(Array.isArray(D)){t=[];for(var E=0,i=D;E0&&(e=Math.min(10,Math.floor(e)),A=" ".substr(0,e)):"string"==typeof e&&(A=e.substr(0,10)),c("",{"":u});function c(u,D){var e=D[u];switch(null!=e&&("function"==typeof e.toJSON5?e=e.toJSON5(u):"function"==typeof e.toJSON&&(e=e.toJSON(u))),r&&(e=r.call(D,u,e)),e instanceof Number?e=Number(e):e instanceof String?e=String(e):e instanceof Boolean&&(e=e.valueOf()),e){case null:return"null";case!0:return"true";case!1:return"false"}return"string"==typeof e?B(e):"number"==typeof e?String(e):"object"==typeof e?Array.isArray(e)?function(u){if(n.indexOf(u)>=0)throw TypeError("Converting circular structure to JSON5");n.push(u);var D=C;C+=A;for(var e,t=[],r=0;r=0)throw TypeError("Converting circular structure to JSON5");n.push(u);var D=C;C+=A;for(var e,r,F=t||Object.keys(u),E=[],i=0,o=F;i0?y:g)(u)},S=(h=!1,function(u,D){var e,t,r=String(function(u){if(null==u)throw TypeError("Can't call method on "+u);return u}(u)),F=w(D),n=r.length;return F<0||F>=n?h?"":void 0:(e=r.charCodeAt(F))<55296||e>56319||F+1===n||(t=r.charCodeAt(F+1))<56320||t>57343?h?r.charAt(F):e:h?r.slice(F,F+2):t-56320+(e-55296<<10)+65536});m(m.P,"String",{codePointAt:function(u){return S(this,u)}});e.String.codePointAt;var b=Math.max,x=Math.min,N=String.fromCharCode,P=String.fromCodePoint;m(m.S+m.F*(!!P&&1!=P.length),"String",{fromCodePoint:function(u){for(var D,e,t,r=arguments,F=[],n=arguments.length,C=0;n>C;){if(D=+r[C++],t=1114111,((e=w(e=D))<0?b(e+t,0):x(e,t))!==D)throw RangeError(D+" is not a valid code point");F.push(D<65536?N(D):N(55296+((D-=65536)>>10),D%1024+56320))}return F.join("")}});e.String.fromCodePoint;var _,I,O,j,V,J,M,k,L,T,z,H,$,R,G={Space_Separator:/[\u1680\u2000-\u200A\u202F\u205F\u3000]/,ID_Start:/[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u08A0-\u08B4\u08B6-\u08BD\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312E\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FEA\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDE80-\uDE9C\uDEA0-\uDED0\uDF00-\uDF1F\uDF2D-\uDF4A\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE4\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC03-\uDC37\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE2B\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC00-\uDC34\uDC47-\uDC4A\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE80-\uDEAA\uDF00-\uDF19]|\uD806[\uDCA0-\uDCDF\uDCFF\uDE00\uDE0B-\uDE32\uDE3A\uDE50\uDE5C-\uDE83\uDE86-\uDE89\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC2E\uDC40\uDC72-\uDC8F\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD30\uDD46]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50\uDF93-\uDF9F\uDFE0\uDFE1]|\uD821[\uDC00-\uDFEC]|\uD822[\uDC00-\uDEF2]|\uD82C[\uDC00-\uDD1E\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB]|\uD83A[\uDC00-\uDCC4\uDD00-\uDD43]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]/,ID_Continue:/[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u0483-\u0487\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u05D0-\u05EA\u05F0-\u05F2\u0610-\u061A\u0620-\u0669\u066E-\u06D3\u06D5-\u06DC\u06DF-\u06E8\u06EA-\u06FC\u06FF\u0710-\u074A\u074D-\u07B1\u07C0-\u07F5\u07FA\u0800-\u082D\u0840-\u085B\u0860-\u086A\u08A0-\u08B4\u08B6-\u08BD\u08D4-\u08E1\u08E3-\u0963\u0966-\u096F\u0971-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09E6-\u09F1\u09FC\u0A01-\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3C\u0A3E-\u0A42\u0A47\u0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\u0DBB\u0DBD\u0DC0-\u0DC6\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E01-\u0E3A\u0E40-\u0E4E\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB9\u0EBB-\u0EBD\u0EC0-\u0EC4\u0EC6\u0EC8-\u0ECD\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E-\u0F47\u0F49-\u0F6C\u0F71-\u0F84\u0F86-\u0F97\u0F99-\u0FBC\u0FC6\u1000-\u1049\u1050-\u109D\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u135D-\u135F\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1714\u1720-\u1734\u1740-\u1753\u1760-\u176C\u176E-\u1770\u1772\u1773\u1780-\u17D3\u17D7\u17DC\u17DD\u17E0-\u17E9\u180B-\u180D\u1810-\u1819\u1820-\u1877\u1880-\u18AA\u18B0-\u18F5\u1900-\u191E\u1920-\u192B\u1930-\u193B\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19D9\u1A00-\u1A1B\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA7\u1AB0-\u1ABD\u1B00-\u1B4B\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BF3\u1C00-\u1C37\u1C40-\u1C49\u1C4D-\u1C7D\u1C80-\u1C88\u1CD0-\u1CD2\u1CD4-\u1CF9\u1D00-\u1DF9\u1DFB-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u203F\u2040\u2054\u2071\u207F\u2090-\u209C\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D7F-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2DE0-\u2DFF\u2E2F\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u3099\u309A\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312E\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FEA\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66F\uA674-\uA67D\uA67F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA827\uA840-\uA873\uA880-\uA8C5\uA8D0-\uA8D9\uA8E0-\uA8F7\uA8FB\uA8FD\uA900-\u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C00-\uDC08\uDC0A-\uDC36\uDC38-\uDC40\uDC50-\uDC59\uDC72-\uDC8F\uDC92-\uDCA7\uDCA9-\uDCB6\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD36\uDD3A\uDD3C\uDD3D\uDD3F-\uDD47\uDD50-\uDD59]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE60-\uDE69\uDED0-\uDEED\uDEF0-\uDEF4\uDF00-\uDF36\uDF40-\uDF43\uDF50-\uDF59\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50-\uDF7E\uDF8F-\uDF9F\uDFE0\uDFE1]|\uD821[\uDC00-\uDFEC]|\uD822[\uDC00-\uDEF2]|\uD82C[\uDC00-\uDD1E\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99\uDC9D\uDC9E]|\uD834[\uDD65-\uDD69\uDD6D-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB\uDFCE-\uDFFF]|\uD836[\uDE00-\uDE36\uDE3B-\uDE6C\uDE75\uDE84\uDE9B-\uDE9F\uDEA1-\uDEAF]|\uD838[\uDC00-\uDC06\uDC08-\uDC18\uDC1B-\uDC21\uDC23\uDC24\uDC26-\uDC2A]|\uD83A[\uDC00-\uDCC4\uDCD0-\uDCD6\uDD00-\uDD4A\uDD50-\uDD59]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]|\uDB40[\uDD00-\uDDEF]/},U={isSpaceSeparator:function(u){return"string"==typeof u&&G.Space_Separator.test(u)},isIdStartChar:function(u){return"string"==typeof u&&(u>="a"&&u<="z"||u>="A"&&u<="Z"||"$"===u||"_"===u||G.ID_Start.test(u))},isIdContinueChar:function(u){return"string"==typeof u&&(u>="a"&&u<="z"||u>="A"&&u<="Z"||u>="0"&&u<="9"||"$"===u||"_"===u||"‌"===u||"‍"===u||G.ID_Continue.test(u))},isDigit:function(u){return"string"==typeof u&&/[0-9]/.test(u)},isHexDigit:function(u){return"string"==typeof u&&/[0-9A-Fa-f]/.test(u)}};function Z(){for(T="default",z="",H=!1,$=1;;){R=q();var u=X[T]();if(u)return u}}function q(){if(_[j])return String.fromCodePoint(_.codePointAt(j))}function W(){var u=q();return"\n"===u?(V++,J=0):u?J+=u.length:J++,u&&(j+=u.length),u}var X={default:function(){switch(R){case"\t":case"\v":case"\f":case" ":case" ":case"\ufeff":case"\n":case"\r":case"\u2028":case"\u2029":return void W();case"/":return W(),void(T="comment");case void 0:return W(),K("eof")}if(!U.isSpaceSeparator(R))return X[I]();W()},comment:function(){switch(R){case"*":return W(),void(T="multiLineComment");case"/":return W(),void(T="singleLineComment")}throw tu(W())},multiLineComment:function(){switch(R){case"*":return W(),void(T="multiLineCommentAsterisk");case void 0:throw tu(W())}W()},multiLineCommentAsterisk:function(){switch(R){case"*":return void W();case"/":return W(),void(T="default");case void 0:throw tu(W())}W(),T="multiLineComment"},singleLineComment:function(){switch(R){case"\n":case"\r":case"\u2028":case"\u2029":return W(),void(T="default");case void 0:return W(),K("eof")}W()},value:function(){switch(R){case"{":case"[":return K("punctuator",W());case"n":return W(),Q("ull"),K("null",null);case"t":return W(),Q("rue"),K("boolean",!0);case"f":return W(),Q("alse"),K("boolean",!1);case"-":case"+":return"-"===W()&&($=-1),void(T="sign");case".":return z=W(),void(T="decimalPointLeading");case"0":return z=W(),void(T="zero");case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":return z=W(),void(T="decimalInteger");case"I":return W(),Q("nfinity"),K("numeric",1/0);case"N":return W(),Q("aN"),K("numeric",NaN);case'"':case"'":return H='"'===W(),z="",void(T="string")}throw tu(W())},identifierNameStartEscape:function(){if("u"!==R)throw tu(W());W();var u=Y();switch(u){case"$":case"_":break;default:if(!U.isIdStartChar(u))throw Fu()}z+=u,T="identifierName"},identifierName:function(){switch(R){case"$":case"_":case"‌":case"‍":return void(z+=W());case"\\":return W(),void(T="identifierNameEscape")}if(!U.isIdContinueChar(R))return K("identifier",z);z+=W()},identifierNameEscape:function(){if("u"!==R)throw tu(W());W();var u=Y();switch(u){case"$":case"_":case"‌":case"‍":break;default:if(!U.isIdContinueChar(u))throw Fu()}z+=u,T="identifierName"},sign:function(){switch(R){case".":return z=W(),void(T="decimalPointLeading");case"0":return z=W(),void(T="zero");case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":return z=W(),void(T="decimalInteger");case"I":return W(),Q("nfinity"),K("numeric",$*(1/0));case"N":return W(),Q("aN"),K("numeric",NaN)}throw tu(W())},zero:function(){switch(R){case".":return z+=W(),void(T="decimalPoint");case"e":case"E":return z+=W(),void(T="decimalExponent");case"x":case"X":return z+=W(),void(T="hexadecimal")}return K("numeric",0*$)},decimalInteger:function(){switch(R){case".":return z+=W(),void(T="decimalPoint");case"e":case"E":return z+=W(),void(T="decimalExponent")}if(!U.isDigit(R))return K("numeric",$*Number(z));z+=W()},decimalPointLeading:function(){if(U.isDigit(R))return z+=W(),void(T="decimalFraction");throw tu(W())},decimalPoint:function(){switch(R){case"e":case"E":return z+=W(),void(T="decimalExponent")}return U.isDigit(R)?(z+=W(),void(T="decimalFraction")):K("numeric",$*Number(z))},decimalFraction:function(){switch(R){case"e":case"E":return z+=W(),void(T="decimalExponent")}if(!U.isDigit(R))return K("numeric",$*Number(z));z+=W()},decimalExponent:function(){switch(R){case"+":case"-":return z+=W(),void(T="decimalExponentSign")}if(U.isDigit(R))return z+=W(),void(T="decimalExponentInteger");throw tu(W())},decimalExponentSign:function(){if(U.isDigit(R))return z+=W(),void(T="decimalExponentInteger");throw tu(W())},decimalExponentInteger:function(){if(!U.isDigit(R))return K("numeric",$*Number(z));z+=W()},hexadecimal:function(){if(U.isHexDigit(R))return z+=W(),void(T="hexadecimalInteger");throw tu(W())},hexadecimalInteger:function(){if(!U.isHexDigit(R))return K("numeric",$*Number(z));z+=W()},string:function(){switch(R){case"\\":return W(),void(z+=function(){switch(q()){case"b":return W(),"\b";case"f":return W(),"\f";case"n":return W(),"\n";case"r":return W(),"\r";case"t":return W(),"\t";case"v":return W(),"\v";case"0":if(W(),U.isDigit(q()))throw tu(W());return"\0";case"x":return W(),function(){var u="",D=q();if(!U.isHexDigit(D))throw tu(W());if(u+=W(),D=q(),!U.isHexDigit(D))throw tu(W());return u+=W(),String.fromCodePoint(parseInt(u,16))}();case"u":return W(),Y();case"\n":case"\u2028":case"\u2029":return W(),"";case"\r":return W(),"\n"===q()&&W(),"";case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":case void 0:throw tu(W())}return W()}());case'"':return H?(W(),K("string",z)):void(z+=W());case"'":return H?void(z+=W()):(W(),K("string",z));case"\n":case"\r":throw tu(W());case"\u2028":case"\u2029":!function(u){console.warn("JSON5: '"+nu(u)+"' in strings is not valid ECMAScript; consider escaping")}(R);break;case void 0:throw tu(W())}z+=W()},start:function(){switch(R){case"{":case"[":return K("punctuator",W())}T="value"},beforePropertyName:function(){switch(R){case"$":case"_":return z=W(),void(T="identifierName");case"\\":return W(),void(T="identifierNameStartEscape");case"}":return K("punctuator",W());case'"':case"'":return H='"'===W(),void(T="string")}if(U.isIdStartChar(R))return z+=W(),void(T="identifierName");throw tu(W())},afterPropertyName:function(){if(":"===R)return K("punctuator",W());throw tu(W())},beforePropertyValue:function(){T="value"},afterPropertyValue:function(){switch(R){case",":case"}":return K("punctuator",W())}throw tu(W())},beforeArrayValue:function(){if("]"===R)return K("punctuator",W());T="value"},afterArrayValue:function(){switch(R){case",":case"]":return K("punctuator",W())}throw tu(W())},end:function(){throw tu(W())}};function K(u,D){return{type:u,value:D,line:V,column:J}}function Q(u){for(var D=0,e=u;D0;){var e=q();if(!U.isHexDigit(e))throw tu(W());u+=W()}return String.fromCodePoint(parseInt(u,16))}var uu={start:function(){if("eof"===M.type)throw ru();Du()},beforePropertyName:function(){switch(M.type){case"identifier":case"string":return k=M.value,void(I="afterPropertyName");case"punctuator":return void eu();case"eof":throw ru()}},afterPropertyName:function(){if("eof"===M.type)throw ru();I="beforePropertyValue"},beforePropertyValue:function(){if("eof"===M.type)throw ru();Du()},beforeArrayValue:function(){if("eof"===M.type)throw ru();"punctuator"!==M.type||"]"!==M.value?Du():eu()},afterPropertyValue:function(){if("eof"===M.type)throw ru();switch(M.value){case",":return void(I="beforePropertyName");case"}":eu()}},afterArrayValue:function(){if("eof"===M.type)throw ru();switch(M.value){case",":return void(I="beforeArrayValue");case"]":eu()}},end:function(){}};function Du(){var u;switch(M.type){case"punctuator":switch(M.value){case"{":u={};break;case"[":u=[]}break;case"null":case"boolean":case"numeric":case"string":u=M.value}if(void 0===L)L=u;else{var D=O[O.length-1];Array.isArray(D)?D.push(u):D[k]=u}if(null!==u&&"object"==typeof u)O.push(u),I=Array.isArray(u)?"beforeArrayValue":"beforePropertyName";else{var e=O[O.length-1];I=null==e?"end":Array.isArray(e)?"afterArrayValue":"afterPropertyValue"}}function eu(){O.pop();var u=O[O.length-1];I=null==u?"end":Array.isArray(u)?"afterArrayValue":"afterPropertyValue"}function tu(u){return Cu(void 0===u?"JSON5: invalid end of input at "+V+":"+J:"JSON5: invalid character '"+nu(u)+"' at "+V+":"+J)}function ru(){return Cu("JSON5: invalid end of input at "+V+":"+J)}function Fu(){return Cu("JSON5: invalid identifier character at "+V+":"+(J-=5))}function nu(u){var D={"'":"\\'",'"':'\\"',"\\":"\\\\","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r","\t":"\\t","\v":"\\v","\0":"\\0","\u2028":"\\u2028","\u2029":"\\u2029"};if(D[u])return D[u];if(u<" "){var e=u.charCodeAt(0).toString(16);return"\\x"+("00"+e).substring(e.length)}return u}function Cu(u){var D=new SyntaxError(u);return D.lineNumber=V,D.columnNumber=J,D}return{parse:function(u,D){_=String(u),I="start",O=[],j=0,V=1,J=0,M=void 0,k=void 0,L=void 0;do{M=Z(),uu[I]()}while("eof"!==M.type);return"function"==typeof D?function u(D,e,t){var r=D[e];if(null!=r&&"object"==typeof r)for(var F in r){var n=u(r,F,t);void 0===n?delete r[F]:r[F]=n}return t.call(D,e,r)}({"":L},"",D):L},stringify:function(u,D,e){var t,r,F,n=[],C="",A="";if(null==D||"object"!=typeof D||Array.isArray(D)||(e=D.space,F=D.quote,D=D.replacer),"function"==typeof D)r=D;else if(Array.isArray(D)){t=[];for(var i=0,E=D;i0&&(e=Math.min(10,Math.floor(e)),A=" ".substr(0,e)):"string"==typeof e&&(A=e.substr(0,10)),c("",{"":u});function c(u,D){var e=D[u];switch(null!=e&&("function"==typeof e.toJSON5?e=e.toJSON5(u):"function"==typeof e.toJSON&&(e=e.toJSON(u))),r&&(e=r.call(D,u,e)),e instanceof Number?e=Number(e):e instanceof String?e=String(e):e instanceof Boolean&&(e=e.valueOf()),e){case null:return"null";case!0:return"true";case!1:return"false"}return"string"==typeof e?B(e):"number"==typeof e?String(e):"object"==typeof e?Array.isArray(e)?function(u){if(n.indexOf(u)>=0)throw TypeError("Converting circular structure to JSON5");n.push(u);var D=C;C+=A;for(var e,t=[],r=0;r=0)throw TypeError("Converting circular structure to JSON5");n.push(u);var D=C;C+=A;for(var e,r,F=t||Object.keys(u),i=[],E=0,o=F;Eunicode.Space_Separator.test(u),isIdStartChar:u=>u>="a"&&u<="z"||u>="A"&&u<="Z"||"$"===u||"_"===u||unicode.ID_Start.test(u),isIdContinueChar:u=>u>="a"&&u<="z"||u>="A"&&u<="Z"||u>="0"&&u<="9"||"$"===u||"_"===u||"‌"===u||"‍"===u||unicode.ID_Continue.test(u),isDigit:u=>/[0-9]/.test(u),isHexDigit:u=>/[0-9A-Fa-f]/.test(u)};let source,parseState,stack,pos,line,column,token,key,root;var parse=function(u,D){source=String(u),parseState="start",stack=[],pos=0,line=1,column=0,token=void 0,key=void 0,root=void 0;do{token=lex(),parseStates[parseState]()}while("eof"!==token.type);return"function"==typeof D?internalize({"":root},"",D):root};function internalize(u,D,e){const r=u[D];if(null!=r&&"object"==typeof r)for(const u in r){const D=internalize(r,u,e);void 0===D?delete r[u]:r[u]=D}return e.call(u,D,r)}let lexState,buffer,doubleQuote,sign,c;function lex(){for(lexState="default",buffer="",doubleQuote=!1,sign=1;;){c=peek();const u=lexStates[lexState]();if(u)return u}}function peek(){if(source[pos])return String.fromCodePoint(source.codePointAt(pos))}function read(){const u=peek();return"\n"===u?(line++,column=0):u?column+=u.length:column++,u&&(pos+=u.length),u}const lexStates={default(){switch(c){case"\t":case"\v":case"\f":case" ":case" ":case"\ufeff":case"\n":case"\r":case"\u2028":case"\u2029":return void read();case"/":return read(),void(lexState="comment");case void 0:return read(),newToken("eof")}if(!util.isSpaceSeparator(c))return lexStates[parseState]();read()},comment(){switch(c){case"*":return read(),void(lexState="multiLineComment");case"/":return read(),void(lexState="singleLineComment")}throw invalidChar(read())},multiLineComment(){switch(c){case"*":return read(),void(lexState="multiLineCommentAsterisk");case void 0:throw invalidChar(read())}read()},multiLineCommentAsterisk(){switch(c){case"*":return void read();case"/":return read(),void(lexState="default");case void 0:throw invalidChar(read())}read(),lexState="multiLineComment"},singleLineComment(){switch(c){case"\n":case"\r":case"\u2028":case"\u2029":return read(),void(lexState="default");case void 0:return read(),newToken("eof")}read()},value(){switch(c){case"{":case"[":return newToken("punctuator",read());case"n":return read(),literal("ull"),newToken("null",null);case"t":return read(),literal("rue"),newToken("boolean",!0);case"f":return read(),literal("alse"),newToken("boolean",!1);case"-":case"+":return"-"===read()&&(sign=-1),void(lexState="sign");case".":return buffer=read(),void(lexState="decimalPointLeading");case"0":return buffer=read(),void(lexState="zero");case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":return buffer=read(),void(lexState="decimalInteger");case"I":return read(),literal("nfinity"),newToken("numeric",1/0);case"N":return read(),literal("aN"),newToken("numeric",NaN);case'"':case"'":return doubleQuote='"'===read(),buffer="",void(lexState="string")}throw invalidChar(read())},identifierNameStartEscape(){if("u"!==c)throw invalidChar(read());read();const u=unicodeEscape();switch(u){case"$":case"_":break;default:if(!util.isIdStartChar(u))throw invalidIdentifier()}buffer+=u,lexState="identifierName"},identifierName(){switch(c){case"$":case"_":case"‌":case"‍":return void(buffer+=read());case"\\":return read(),void(lexState="identifierNameEscape")}if(!util.isIdContinueChar(c))return newToken("identifier",buffer);buffer+=read()},identifierNameEscape(){if("u"!==c)throw invalidChar(read());read();const u=unicodeEscape();switch(u){case"$":case"_":case"‌":case"‍":break;default:if(!util.isIdContinueChar(u))throw invalidIdentifier()}buffer+=u,lexState="identifierName"},sign(){switch(c){case".":return buffer=read(),void(lexState="decimalPointLeading");case"0":return buffer=read(),void(lexState="zero");case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":return buffer=read(),void(lexState="decimalInteger");case"I":return read(),literal("nfinity"),newToken("numeric",sign*(1/0));case"N":return read(),literal("aN"),newToken("numeric",NaN)}throw invalidChar(read())},zero(){switch(c){case".":return buffer+=read(),void(lexState="decimalPoint");case"e":case"E":return buffer+=read(),void(lexState="decimalExponent");case"x":case"X":return buffer+=read(),void(lexState="hexadecimal")}return newToken("numeric",0*sign)},decimalInteger(){switch(c){case".":return buffer+=read(),void(lexState="decimalPoint");case"e":case"E":return buffer+=read(),void(lexState="decimalExponent")}if(!util.isDigit(c))return newToken("numeric",sign*Number(buffer));buffer+=read()},decimalPointLeading(){if(util.isDigit(c))return buffer+=read(),void(lexState="decimalFraction");throw invalidChar(read())},decimalPoint(){switch(c){case"e":case"E":return buffer+=read(),void(lexState="decimalExponent")}return util.isDigit(c)?(buffer+=read(),void(lexState="decimalFraction")):newToken("numeric",sign*Number(buffer))},decimalFraction(){switch(c){case"e":case"E":return buffer+=read(),void(lexState="decimalExponent")}if(!util.isDigit(c))return newToken("numeric",sign*Number(buffer));buffer+=read()},decimalExponent(){switch(c){case"+":case"-":return buffer+=read(),void(lexState="decimalExponentSign")}if(util.isDigit(c))return buffer+=read(),void(lexState="decimalExponentInteger");throw invalidChar(read())},decimalExponentSign(){if(util.isDigit(c))return buffer+=read(),void(lexState="decimalExponentInteger");throw invalidChar(read())},decimalExponentInteger(){if(!util.isDigit(c))return newToken("numeric",sign*Number(buffer));buffer+=read()},hexadecimal(){if(util.isHexDigit(c))return buffer+=read(),void(lexState="hexadecimalInteger");throw invalidChar(read())},hexadecimalInteger(){if(!util.isHexDigit(c))return newToken("numeric",sign*Number(buffer));buffer+=read()},string(){switch(c){case"\\":return read(),void(buffer+=escape());case'"':return doubleQuote?(read(),newToken("string",buffer)):void(buffer+=read());case"'":return doubleQuote?void(buffer+=read()):(read(),newToken("string",buffer));case"\n":case"\r":throw invalidChar(read());case"\u2028":case"\u2029":separatorChar(c);break;case void 0:throw invalidChar(read())}buffer+=read()},start(){switch(c){case"{":case"[":return newToken("punctuator",read())}lexState="value"},beforePropertyName(){switch(c){case"$":case"_":return buffer=read(),void(lexState="identifierName");case"\\":return read(),void(lexState="identifierNameStartEscape");case"}":return newToken("punctuator",read());case'"':case"'":return doubleQuote='"'===read(),void(lexState="string")}if(util.isIdStartChar(c))return buffer+=read(),void(lexState="identifierName");throw invalidChar(read())},afterPropertyName(){if(":"===c)return newToken("punctuator",read());throw invalidChar(read())},beforePropertyValue(){lexState="value"},afterPropertyValue(){switch(c){case",":case"}":return newToken("punctuator",read())}throw invalidChar(read())},beforeArrayValue(){if("]"===c)return newToken("punctuator",read());lexState="value"},afterArrayValue(){switch(c){case",":case"]":return newToken("punctuator",read())}throw invalidChar(read())},end(){throw invalidChar(read())}};function newToken(u,D){return{type:u,value:D,line:line,column:column}}function literal(u){for(const D of u){if(peek()!==D)throw invalidChar(read());read()}}function escape(){switch(peek()){case"b":return read(),"\b";case"f":return read(),"\f";case"n":return read(),"\n";case"r":return read(),"\r";case"t":return read(),"\t";case"v":return read(),"\v";case"0":if(read(),util.isDigit(peek()))throw invalidChar(read());return"\0";case"x":return read(),hexEscape();case"u":return read(),unicodeEscape();case"\n":case"\u2028":case"\u2029":return read(),"";case"\r":return read(),"\n"===peek()&&read(),"";case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":case void 0:throw invalidChar(read())}return read()}function hexEscape(){let u="",D=peek();if(!util.isHexDigit(D))throw invalidChar(read());if(u+=read(),D=peek(),!util.isHexDigit(D))throw invalidChar(read());return u+=read(),String.fromCodePoint(parseInt(u,16))}function unicodeEscape(){let u="",D=4;for(;D-- >0;){const D=peek();if(!util.isHexDigit(D))throw invalidChar(read());u+=read()}return String.fromCodePoint(parseInt(u,16))}const parseStates={start(){if("eof"===token.type)throw invalidEOF();push()},beforePropertyName(){switch(token.type){case"identifier":case"string":return key=token.value,void(parseState="afterPropertyName");case"punctuator":return void pop();case"eof":throw invalidEOF()}},afterPropertyName(){if("eof"===token.type)throw invalidEOF();parseState="beforePropertyValue"},beforePropertyValue(){if("eof"===token.type)throw invalidEOF();push()},beforeArrayValue(){if("eof"===token.type)throw invalidEOF();"punctuator"!==token.type||"]"!==token.value?push():pop()},afterPropertyValue(){if("eof"===token.type)throw invalidEOF();switch(token.value){case",":return void(parseState="beforePropertyName");case"}":pop()}},afterArrayValue(){if("eof"===token.type)throw invalidEOF();switch(token.value){case",":return void(parseState="beforeArrayValue");case"]":pop()}},end(){}};function push(){let u;switch(token.type){case"punctuator":switch(token.value){case"{":u={};break;case"[":u=[]}break;case"null":case"boolean":case"numeric":case"string":u=token.value}if(void 0===root)root=u;else{const D=stack[stack.length-1];Array.isArray(D)?D.push(u):D[key]=u}if(null!==u&&"object"==typeof u)stack.push(u),parseState=Array.isArray(u)?"beforeArrayValue":"beforePropertyName";else{const u=stack[stack.length-1];parseState=null==u?"end":Array.isArray(u)?"afterArrayValue":"afterPropertyValue"}}function pop(){stack.pop();const u=stack[stack.length-1];parseState=null==u?"end":Array.isArray(u)?"afterArrayValue":"afterPropertyValue"}function invalidChar(u){return syntaxError(void 0===u?`JSON5: invalid end of input at ${line}:${column}`:`JSON5: invalid character '${formatChar(u)}' at ${line}:${column}`)}function invalidEOF(){return syntaxError(`JSON5: invalid end of input at ${line}:${column}`)}function invalidIdentifier(){return syntaxError(`JSON5: invalid identifier character at ${line}:${column-=5}`)}function separatorChar(u){console.warn(`JSON5: '${formatChar(u)}' in strings is not valid ECMAScript; consider escaping`)}function formatChar(u){const D={"'":"\\'",'"':'\\"',"\\":"\\\\","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r","\t":"\\t","\v":"\\v","\0":"\\0","\u2028":"\\u2028","\u2029":"\\u2029"};if(D[u])return D[u];if(u<" "){const D=u.charCodeAt(0).toString(16);return"\\x"+("00"+D).substring(D.length)}return u}function syntaxError(u){const D=new SyntaxError(u);return D.lineNumber=line,D.columnNumber=column,D}var stringify=function(u,D,e){const r=[];let t,F,C,a="",A="";if(null==D||"object"!=typeof D||Array.isArray(D)||(e=D.space,C=D.quote,D=D.replacer),"function"==typeof D)F=D;else if(Array.isArray(D)){t=[];for(const u of D){let D;"string"==typeof u?D=u:("number"==typeof u||u instanceof String||u instanceof Number)&&(D=String(u)),void 0!==D&&t.indexOf(D)<0&&t.push(D)}}return e instanceof Number?e=Number(e):e instanceof String&&(e=String(e)),"number"==typeof e?e>0&&(e=Math.min(10,Math.floor(e)),A=" ".substr(0,e)):"string"==typeof e&&(A=e.substr(0,10)),E("",{"":u});function E(u,D){let e=D[u];switch(null!=e&&("function"==typeof e.toJSON5?e=e.toJSON5(u):"function"==typeof e.toJSON&&(e=e.toJSON(u))),F&&(e=F.call(D,u,e)),e instanceof Number?e=Number(e):e instanceof String?e=String(e):e instanceof Boolean&&(e=e.valueOf()),e){case null:return"null";case!0:return"true";case!1:return"false"}return"string"==typeof e?n(e):"number"==typeof e?String(e):"object"==typeof e?Array.isArray(e)?function(u){if(r.indexOf(u)>=0)throw TypeError("Converting circular structure to JSON5");r.push(u);let D=a;a+=A;let e,t=[];for(let D=0;D=0)throw TypeError("Converting circular structure to JSON5");r.push(u);let D=a;a+=A;let e,F=t||Object.keys(u),C=[];for(const D of F){const e=E(D,u);if(void 0!==e){let u=i(D)+":";""!==A&&(u+=" "),u+=e,C.push(u)}}if(0===C.length)e="{}";else{let u;if(""===A)u=C.join(","),e="{"+u+"}";else{let r=",\n"+a;u=C.join(r),e="{\n"+a+u+",\n"+D+"}"}}return r.pop(),a=D,e}(e):void 0}function n(u){const D={"'":.1,'"':.2},e={"'":"\\'",'"':'\\"',"\\":"\\\\","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r","\t":"\\t","\v":"\\v","\0":"\\0","\u2028":"\\u2028","\u2029":"\\u2029"};let r="";for(const t of u){switch(t){case"'":case'"':D[t]++,r+=t;continue}if(e[t])r+=e[t];else if(t<" "){let u=t.charCodeAt(0).toString(16);r+="\\x"+("00"+u).substring(u.length)}else r+=t}const t=C||Object.keys(D).reduce((u,e)=>D[u]"string"==typeof u&&unicode.Space_Separator.test(u),isIdStartChar:u=>"string"==typeof u&&(u>="a"&&u<="z"||u>="A"&&u<="Z"||"$"===u||"_"===u||unicode.ID_Start.test(u)),isIdContinueChar:u=>"string"==typeof u&&(u>="a"&&u<="z"||u>="A"&&u<="Z"||u>="0"&&u<="9"||"$"===u||"_"===u||"‌"===u||"‍"===u||unicode.ID_Continue.test(u)),isDigit:u=>"string"==typeof u&&/[0-9]/.test(u),isHexDigit:u=>"string"==typeof u&&/[0-9A-Fa-f]/.test(u)};let source,parseState,stack,pos,line,column,token,key,root;var parse=function(u,D){source=String(u),parseState="start",stack=[],pos=0,line=1,column=0,token=void 0,key=void 0,root=void 0;do{token=lex(),parseStates[parseState]()}while("eof"!==token.type);return"function"==typeof D?internalize({"":root},"",D):root};function internalize(u,D,e){const r=u[D];if(null!=r&&"object"==typeof r)for(const u in r){const D=internalize(r,u,e);void 0===D?delete r[u]:r[u]=D}return e.call(u,D,r)}let lexState,buffer,doubleQuote,sign,c;function lex(){for(lexState="default",buffer="",doubleQuote=!1,sign=1;;){c=peek();const u=lexStates[lexState]();if(u)return u}}function peek(){if(source[pos])return String.fromCodePoint(source.codePointAt(pos))}function read(){const u=peek();return"\n"===u?(line++,column=0):u?column+=u.length:column++,u&&(pos+=u.length),u}const lexStates={default(){switch(c){case"\t":case"\v":case"\f":case" ":case" ":case"\ufeff":case"\n":case"\r":case"\u2028":case"\u2029":return void read();case"/":return read(),void(lexState="comment");case void 0:return read(),newToken("eof")}if(!util.isSpaceSeparator(c))return lexStates[parseState]();read()},comment(){switch(c){case"*":return read(),void(lexState="multiLineComment");case"/":return read(),void(lexState="singleLineComment")}throw invalidChar(read())},multiLineComment(){switch(c){case"*":return read(),void(lexState="multiLineCommentAsterisk");case void 0:throw invalidChar(read())}read()},multiLineCommentAsterisk(){switch(c){case"*":return void read();case"/":return read(),void(lexState="default");case void 0:throw invalidChar(read())}read(),lexState="multiLineComment"},singleLineComment(){switch(c){case"\n":case"\r":case"\u2028":case"\u2029":return read(),void(lexState="default");case void 0:return read(),newToken("eof")}read()},value(){switch(c){case"{":case"[":return newToken("punctuator",read());case"n":return read(),literal("ull"),newToken("null",null);case"t":return read(),literal("rue"),newToken("boolean",!0);case"f":return read(),literal("alse"),newToken("boolean",!1);case"-":case"+":return"-"===read()&&(sign=-1),void(lexState="sign");case".":return buffer=read(),void(lexState="decimalPointLeading");case"0":return buffer=read(),void(lexState="zero");case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":return buffer=read(),void(lexState="decimalInteger");case"I":return read(),literal("nfinity"),newToken("numeric",1/0);case"N":return read(),literal("aN"),newToken("numeric",NaN);case'"':case"'":return doubleQuote='"'===read(),buffer="",void(lexState="string")}throw invalidChar(read())},identifierNameStartEscape(){if("u"!==c)throw invalidChar(read());read();const u=unicodeEscape();switch(u){case"$":case"_":break;default:if(!util.isIdStartChar(u))throw invalidIdentifier()}buffer+=u,lexState="identifierName"},identifierName(){switch(c){case"$":case"_":case"‌":case"‍":return void(buffer+=read());case"\\":return read(),void(lexState="identifierNameEscape")}if(!util.isIdContinueChar(c))return newToken("identifier",buffer);buffer+=read()},identifierNameEscape(){if("u"!==c)throw invalidChar(read());read();const u=unicodeEscape();switch(u){case"$":case"_":case"‌":case"‍":break;default:if(!util.isIdContinueChar(u))throw invalidIdentifier()}buffer+=u,lexState="identifierName"},sign(){switch(c){case".":return buffer=read(),void(lexState="decimalPointLeading");case"0":return buffer=read(),void(lexState="zero");case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":return buffer=read(),void(lexState="decimalInteger");case"I":return read(),literal("nfinity"),newToken("numeric",sign*(1/0));case"N":return read(),literal("aN"),newToken("numeric",NaN)}throw invalidChar(read())},zero(){switch(c){case".":return buffer+=read(),void(lexState="decimalPoint");case"e":case"E":return buffer+=read(),void(lexState="decimalExponent");case"x":case"X":return buffer+=read(),void(lexState="hexadecimal")}return newToken("numeric",0*sign)},decimalInteger(){switch(c){case".":return buffer+=read(),void(lexState="decimalPoint");case"e":case"E":return buffer+=read(),void(lexState="decimalExponent")}if(!util.isDigit(c))return newToken("numeric",sign*Number(buffer));buffer+=read()},decimalPointLeading(){if(util.isDigit(c))return buffer+=read(),void(lexState="decimalFraction");throw invalidChar(read())},decimalPoint(){switch(c){case"e":case"E":return buffer+=read(),void(lexState="decimalExponent")}return util.isDigit(c)?(buffer+=read(),void(lexState="decimalFraction")):newToken("numeric",sign*Number(buffer))},decimalFraction(){switch(c){case"e":case"E":return buffer+=read(),void(lexState="decimalExponent")}if(!util.isDigit(c))return newToken("numeric",sign*Number(buffer));buffer+=read()},decimalExponent(){switch(c){case"+":case"-":return buffer+=read(),void(lexState="decimalExponentSign")}if(util.isDigit(c))return buffer+=read(),void(lexState="decimalExponentInteger");throw invalidChar(read())},decimalExponentSign(){if(util.isDigit(c))return buffer+=read(),void(lexState="decimalExponentInteger");throw invalidChar(read())},decimalExponentInteger(){if(!util.isDigit(c))return newToken("numeric",sign*Number(buffer));buffer+=read()},hexadecimal(){if(util.isHexDigit(c))return buffer+=read(),void(lexState="hexadecimalInteger");throw invalidChar(read())},hexadecimalInteger(){if(!util.isHexDigit(c))return newToken("numeric",sign*Number(buffer));buffer+=read()},string(){switch(c){case"\\":return read(),void(buffer+=escape());case'"':return doubleQuote?(read(),newToken("string",buffer)):void(buffer+=read());case"'":return doubleQuote?void(buffer+=read()):(read(),newToken("string",buffer));case"\n":case"\r":throw invalidChar(read());case"\u2028":case"\u2029":separatorChar(c);break;case void 0:throw invalidChar(read())}buffer+=read()},start(){switch(c){case"{":case"[":return newToken("punctuator",read())}lexState="value"},beforePropertyName(){switch(c){case"$":case"_":return buffer=read(),void(lexState="identifierName");case"\\":return read(),void(lexState="identifierNameStartEscape");case"}":return newToken("punctuator",read());case'"':case"'":return doubleQuote='"'===read(),void(lexState="string")}if(util.isIdStartChar(c))return buffer+=read(),void(lexState="identifierName");throw invalidChar(read())},afterPropertyName(){if(":"===c)return newToken("punctuator",read());throw invalidChar(read())},beforePropertyValue(){lexState="value"},afterPropertyValue(){switch(c){case",":case"}":return newToken("punctuator",read())}throw invalidChar(read())},beforeArrayValue(){if("]"===c)return newToken("punctuator",read());lexState="value"},afterArrayValue(){switch(c){case",":case"]":return newToken("punctuator",read())}throw invalidChar(read())},end(){throw invalidChar(read())}};function newToken(u,D){return{type:u,value:D,line:line,column:column}}function literal(u){for(const D of u){if(peek()!==D)throw invalidChar(read());read()}}function escape(){switch(peek()){case"b":return read(),"\b";case"f":return read(),"\f";case"n":return read(),"\n";case"r":return read(),"\r";case"t":return read(),"\t";case"v":return read(),"\v";case"0":if(read(),util.isDigit(peek()))throw invalidChar(read());return"\0";case"x":return read(),hexEscape();case"u":return read(),unicodeEscape();case"\n":case"\u2028":case"\u2029":return read(),"";case"\r":return read(),"\n"===peek()&&read(),"";case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":case void 0:throw invalidChar(read())}return read()}function hexEscape(){let u="",D=peek();if(!util.isHexDigit(D))throw invalidChar(read());if(u+=read(),D=peek(),!util.isHexDigit(D))throw invalidChar(read());return u+=read(),String.fromCodePoint(parseInt(u,16))}function unicodeEscape(){let u="",D=4;for(;D-- >0;){const D=peek();if(!util.isHexDigit(D))throw invalidChar(read());u+=read()}return String.fromCodePoint(parseInt(u,16))}const parseStates={start(){if("eof"===token.type)throw invalidEOF();push()},beforePropertyName(){switch(token.type){case"identifier":case"string":return key=token.value,void(parseState="afterPropertyName");case"punctuator":return void pop();case"eof":throw invalidEOF()}},afterPropertyName(){if("eof"===token.type)throw invalidEOF();parseState="beforePropertyValue"},beforePropertyValue(){if("eof"===token.type)throw invalidEOF();push()},beforeArrayValue(){if("eof"===token.type)throw invalidEOF();"punctuator"!==token.type||"]"!==token.value?push():pop()},afterPropertyValue(){if("eof"===token.type)throw invalidEOF();switch(token.value){case",":return void(parseState="beforePropertyName");case"}":pop()}},afterArrayValue(){if("eof"===token.type)throw invalidEOF();switch(token.value){case",":return void(parseState="beforeArrayValue");case"]":pop()}},end(){}};function push(){let u;switch(token.type){case"punctuator":switch(token.value){case"{":u={};break;case"[":u=[]}break;case"null":case"boolean":case"numeric":case"string":u=token.value}if(void 0===root)root=u;else{const D=stack[stack.length-1];Array.isArray(D)?D.push(u):D[key]=u}if(null!==u&&"object"==typeof u)stack.push(u),parseState=Array.isArray(u)?"beforeArrayValue":"beforePropertyName";else{const u=stack[stack.length-1];parseState=null==u?"end":Array.isArray(u)?"afterArrayValue":"afterPropertyValue"}}function pop(){stack.pop();const u=stack[stack.length-1];parseState=null==u?"end":Array.isArray(u)?"afterArrayValue":"afterPropertyValue"}function invalidChar(u){return syntaxError(void 0===u?`JSON5: invalid end of input at ${line}:${column}`:`JSON5: invalid character '${formatChar(u)}' at ${line}:${column}`)}function invalidEOF(){return syntaxError(`JSON5: invalid end of input at ${line}:${column}`)}function invalidIdentifier(){return syntaxError(`JSON5: invalid identifier character at ${line}:${column-=5}`)}function separatorChar(u){console.warn(`JSON5: '${formatChar(u)}' in strings is not valid ECMAScript; consider escaping`)}function formatChar(u){const D={"'":"\\'",'"':'\\"',"\\":"\\\\","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r","\t":"\\t","\v":"\\v","\0":"\\0","\u2028":"\\u2028","\u2029":"\\u2029"};if(D[u])return D[u];if(u<" "){const D=u.charCodeAt(0).toString(16);return"\\x"+("00"+D).substring(D.length)}return u}function syntaxError(u){const D=new SyntaxError(u);return D.lineNumber=line,D.columnNumber=column,D}var stringify=function(u,D,e){const r=[];let t,F,C,a="",A="";if(null==D||"object"!=typeof D||Array.isArray(D)||(e=D.space,C=D.quote,D=D.replacer),"function"==typeof D)F=D;else if(Array.isArray(D)){t=[];for(const u of D){let D;"string"==typeof u?D=u:("number"==typeof u||u instanceof String||u instanceof Number)&&(D=String(u)),void 0!==D&&t.indexOf(D)<0&&t.push(D)}}return e instanceof Number?e=Number(e):e instanceof String&&(e=String(e)),"number"==typeof e?e>0&&(e=Math.min(10,Math.floor(e)),A=" ".substr(0,e)):"string"==typeof e&&(A=e.substr(0,10)),E("",{"":u});function E(u,D){let e=D[u];switch(null!=e&&("function"==typeof e.toJSON5?e=e.toJSON5(u):"function"==typeof e.toJSON&&(e=e.toJSON(u))),F&&(e=F.call(D,u,e)),e instanceof Number?e=Number(e):e instanceof String?e=String(e):e instanceof Boolean&&(e=e.valueOf()),e){case null:return"null";case!0:return"true";case!1:return"false"}return"string"==typeof e?n(e):"number"==typeof e?String(e):"object"==typeof e?Array.isArray(e)?function(u){if(r.indexOf(u)>=0)throw TypeError("Converting circular structure to JSON5");r.push(u);let D=a;a+=A;let e,t=[];for(let D=0;D=0)throw TypeError("Converting circular structure to JSON5");r.push(u);let D=a;a+=A;let e,F=t||Object.keys(u),C=[];for(const D of F){const e=E(D,u);if(void 0!==e){let u=i(D)+":";""!==A&&(u+=" "),u+=e,C.push(u)}}if(0===C.length)e="{}";else{let u;if(""===A)u=C.join(","),e="{"+u+"}";else{let r=",\n"+a;u=C.join(r),e="{\n"+a+u+",\n"+D+"}"}}return r.pop(),a=D,e}(e):void 0}function n(u){const D={"'":.1,'"':.2},e={"'":"\\'",'"':'\\"',"\\":"\\\\","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r","\t":"\\t","\v":"\\v","\0":"\\0","\u2028":"\\u2028","\u2029":"\\u2029"};let r="";for(let t=0;tD[u]= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z') || (c === '$') || (c === '_') || @@ -24,7 +24,7 @@ var util = { }, isIdContinueChar (c) { - return ( + return typeof c === 'string' && ( (c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z') || (c >= '0' && c <= '9') || @@ -35,11 +35,11 @@ var util = { }, isDigit (c) { - return /[0-9]/.test(c) + return typeof c === 'string' && /[0-9]/.test(c) }, isHexDigit (c) { - return /[0-9A-Fa-f]/.test(c) + return typeof c === 'string' && /[0-9A-Fa-f]/.test(c) }, }; @@ -1253,13 +1253,20 @@ var stringify = function stringify (value, replacer, space) { let product = ''; - for (const c of value) { + for (let i = 0; i < value.length; i++) { + const c = value[i]; switch (c) { case "'": case '"': quotes[c]++; product += c; continue + + case '\0': + if (util.isDigit(value[i + 1])) { + product += '\\x00'; + continue + } } if (replacements[c]) { diff --git a/node_modules/json5/lib/stringify.js b/node_modules/json5/lib/stringify.js index 0df12f49f..7cb3b0e10 100644 --- a/node_modules/json5/lib/stringify.js +++ b/node_modules/json5/lib/stringify.js @@ -124,13 +124,20 @@ module.exports = function stringify (value, replacer, space) { let product = '' - for (const c of value) { + for (let i = 0; i < value.length; i++) { + const c = value[i] switch (c) { case "'": case '"': quotes[c]++ product += c continue + + case '\0': + if (util.isDigit(value[i + 1])) { + product += '\\x00' + continue + } } if (replacements[c]) { diff --git a/node_modules/json5/lib/util.js b/node_modules/json5/lib/util.js index 3b5e46641..40bfe2fa6 100644 --- a/node_modules/json5/lib/util.js +++ b/node_modules/json5/lib/util.js @@ -2,11 +2,11 @@ const unicode = require('../lib/unicode') module.exports = { isSpaceSeparator (c) { - return unicode.Space_Separator.test(c) + return typeof c === 'string' && unicode.Space_Separator.test(c) }, isIdStartChar (c) { - return ( + return typeof c === 'string' && ( (c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z') || (c === '$') || (c === '_') || @@ -15,7 +15,7 @@ module.exports = { }, isIdContinueChar (c) { - return ( + return typeof c === 'string' && ( (c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z') || (c >= '0' && c <= '9') || @@ -26,10 +26,10 @@ module.exports = { }, isDigit (c) { - return /[0-9]/.test(c) + return typeof c === 'string' && /[0-9]/.test(c) }, isHexDigit (c) { - return /[0-9A-Fa-f]/.test(c) + return typeof c === 'string' && /[0-9A-Fa-f]/.test(c) }, } diff --git a/node_modules/json5/package.json b/node_modules/json5/package.json index d5769b69f..40a53e275 100644 --- a/node_modules/json5/package.json +++ b/node_modules/json5/package.json @@ -1,34 +1,27 @@ { - "_args": [ - [ - "json5@2.1.0", - "/Users/drew.heavner/Documents/Github/sign-android-release" - ] - ], - "_development": true, - "_from": "json5@2.1.0", - "_id": "json5@2.1.0", + "_from": "json5@2.x", + "_id": "json5@2.1.3", "_inBundle": false, - "_integrity": "sha512-8Mh9h6xViijj36g7Dxi+Y4S6hNGV96vcJZr/SrlHh1LR/pEn/8j/+qIBbs44YKl69Lrfctp4QD+AdWLTMqEZAQ==", + "_integrity": "sha512-KXPvOm8K9IJKFM0bmdn8QXh7udDh1g/giieX0NLCaMnb4hEiVFqnop2ImTXCc5e0/oHz3LTqmHGtExn5hfMkOA==", "_location": "/json5", "_phantomChildren": {}, "_requested": { - "type": "version", + "type": "range", "registry": true, - "raw": "json5@2.1.0", + "raw": "json5@2.x", "name": "json5", "escapedName": "json5", - "rawSpec": "2.1.0", + "rawSpec": "2.x", "saveSpec": null, - "fetchSpec": "2.1.0" + "fetchSpec": "2.x" }, "_requiredBy": [ - "/@babel/core", "/ts-jest" ], - "_resolved": "https://registry.npmjs.org/json5/-/json5-2.1.0.tgz", - "_spec": "2.1.0", - "_where": "/Users/drew.heavner/Documents/Github/sign-android-release", + "_resolved": "https://registry.npmjs.org/json5/-/json5-2.1.3.tgz", + "_shasum": "c9b0f7fa9233bfe5807fe66fcf3a5617ed597d43", + "_spec": "json5@2.x", + "_where": "/Users/drew.heavner/Documents/Github/sign-android-release/node_modules/ts-jest", "author": { "name": "Aseem Kishore", "email": "aseem.kishore@gmail.com" @@ -40,6 +33,7 @@ "bugs": { "url": "https://github.com/json5/json5/issues" }, + "bundleDependencies": false, "contributors": [ { "name": "Max Nanasy", @@ -55,25 +49,26 @@ } ], "dependencies": { - "minimist": "^1.2.0" + "minimist": "^1.2.5" }, + "deprecated": false, "description": "JSON for humans.", "devDependencies": { - "core-js": "^2.5.7", - "eslint": "^5.3.0", - "eslint-config-standard": "^11.0.0", - "eslint-plugin-import": "^2.14.0", - "eslint-plugin-node": "^7.0.1", - "eslint-plugin-promise": "^3.8.0", - "eslint-plugin-standard": "^3.1.0", + "core-js": "^2.6.5", + "eslint": "^5.15.3", + "eslint-config-standard": "^12.0.0", + "eslint-plugin-import": "^2.16.0", + "eslint-plugin-node": "^8.0.1", + "eslint-plugin-promise": "^4.0.1", + "eslint-plugin-standard": "^4.0.0", "regenerate": "^1.4.0", "rollup": "^0.64.1", - "rollup-plugin-buble": "^0.19.2", - "rollup-plugin-commonjs": "^9.1.5", - "rollup-plugin-node-resolve": "^3.3.0", + "rollup-plugin-buble": "^0.19.6", + "rollup-plugin-commonjs": "^9.2.1", + "rollup-plugin-node-resolve": "^3.4.0", "rollup-plugin-terser": "^1.0.1", - "sinon": "^6.1.5", - "tap": "^12.0.1", + "sinon": "^6.3.5", + "tap": "^12.6.0", "unicode-10.0.0": "^0.7.5" }, "engines": { @@ -93,6 +88,7 @@ ], "license": "MIT", "main": "lib/index.js", + "module": "dist/index.mjs", "name": "json5", "repository": { "type": "git", @@ -110,5 +106,5 @@ "test": "tap -Rspec --100 test", "version": "npm run build-package && git add package.json5" }, - "version": "2.1.0" + "version": "2.1.3" } diff --git a/node_modules/kind-of/CHANGELOG.md b/node_modules/kind-of/CHANGELOG.md index fb30b06df..01687d5cb 100644 --- a/node_modules/kind-of/CHANGELOG.md +++ b/node_modules/kind-of/CHANGELOG.md @@ -32,6 +32,10 @@ Changelog entries are classified using the following labels _(from [keep-a-chang +## [6.0.3] - 2020-01-16 + +- Merge pull request #31 for issue #30 + ## [6.0.0] - 2017-10-13 - refactor code to be more performant @@ -153,5 +157,4 @@ Changelog entries are classified using the following labels _(from [keep-a-chang [0.1.0]: https://github.com/jonschlinkert/kind-of/commit/2fae09b0b19b1aadb558e9be39f0c3ef6034eb87 [Unreleased]: https://github.com/jonschlinkert/kind-of/compare/0.1.2...HEAD -[keep-a-changelog]: https://github.com/olivierlacan/keep-a-changelog - +[keep-a-changelog]: https://github.com/olivierlacan/keep-a-changelog \ No newline at end of file diff --git a/node_modules/kind-of/README.md b/node_modules/kind-of/README.md index 4b0d4a818..0411dc58a 100644 --- a/node_modules/kind-of/README.md +++ b/node_modules/kind-of/README.md @@ -329,37 +329,39 @@ $ npm install -g verbose/verb#dev verb-generate-readme && verb You might also be interested in these projects: -* [is-glob](https://www.npmjs.com/package/is-glob): Returns `true` if the given string looks like a glob pattern or an extglob pattern… [more](https://github.com/jonschlinkert/is-glob) | [homepage](https://github.com/jonschlinkert/is-glob "Returns `true` if the given string looks like a glob pattern or an extglob pattern. This makes it easy to create code that only uses external modules like node-glob when necessary, resulting in much faster code execution and initialization time, and a bet") -* [is-number](https://www.npmjs.com/package/is-number): Returns true if the value is a number. comprehensive tests. | [homepage](https://github.com/jonschlinkert/is-number "Returns true if the value is a number. comprehensive tests.") +* [is-glob](https://www.npmjs.com/package/is-glob): Returns `true` if the given string looks like a glob pattern or an extglob pattern… [more](https://github.com/micromatch/is-glob) | [homepage](https://github.com/micromatch/is-glob "Returns `true` if the given string looks like a glob pattern or an extglob pattern. This makes it easy to create code that only uses external modules like node-glob when necessary, resulting in much faster code execution and initialization time, and a bet") +* [is-number](https://www.npmjs.com/package/is-number): Returns true if a number or string value is a finite number. Useful for regex… [more](https://github.com/jonschlinkert/is-number) | [homepage](https://github.com/jonschlinkert/is-number "Returns true if a number or string value is a finite number. Useful for regex matches, parsing, user input, etc.") * [is-primitive](https://www.npmjs.com/package/is-primitive): Returns `true` if the value is a primitive. | [homepage](https://github.com/jonschlinkert/is-primitive "Returns `true` if the value is a primitive. ") ### Contributors -| **Commits** | **Contributor** | -| --- | --- | -| 98 | [jonschlinkert](https://github.com/jonschlinkert) | -| 3 | [aretecode](https://github.com/aretecode) | -| 2 | [miguelmota](https://github.com/miguelmota) | -| 1 | [dtothefp](https://github.com/dtothefp) | -| 1 | [ianstormtaylor](https://github.com/ianstormtaylor) | -| 1 | [ksheedlo](https://github.com/ksheedlo) | -| 1 | [pdehaan](https://github.com/pdehaan) | -| 1 | [laggingreflex](https://github.com/laggingreflex) | -| 1 | [charlike-old](https://github.com/charlike-old) | +| **Commits** | **Contributor** | +| --- | --- | +| 102 | [jonschlinkert](https://github.com/jonschlinkert) | +| 3 | [aretecode](https://github.com/aretecode) | +| 2 | [miguelmota](https://github.com/miguelmota) | +| 1 | [doowb](https://github.com/doowb) | +| 1 | [dtothefp](https://github.com/dtothefp) | +| 1 | [ianstormtaylor](https://github.com/ianstormtaylor) | +| 1 | [ksheedlo](https://github.com/ksheedlo) | +| 1 | [pdehaan](https://github.com/pdehaan) | +| 1 | [laggingreflex](https://github.com/laggingreflex) | +| 1 | [tunnckoCore](https://github.com/tunnckoCore) | +| 1 | [xiaofen9](https://github.com/xiaofen9) | ### Author **Jon Schlinkert** -* [linkedin/in/jonschlinkert](https://linkedin.com/in/jonschlinkert) -* [github/jonschlinkert](https://github.com/jonschlinkert) -* [twitter/jonschlinkert](https://twitter.com/jonschlinkert) +* [GitHub Profile](https://github.com/jonschlinkert) +* [Twitter Profile](https://twitter.com/jonschlinkert) +* [LinkedIn Profile](https://linkedin.com/in/jonschlinkert) ### License -Copyright © 2017, [Jon Schlinkert](https://github.com/jonschlinkert). +Copyright © 2020, [Jon Schlinkert](https://github.com/jonschlinkert). Released under the [MIT License](LICENSE). *** -_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.6.0, on December 01, 2017._ \ No newline at end of file +_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.8.0, on January 16, 2020._ \ No newline at end of file diff --git a/node_modules/kind-of/index.js b/node_modules/kind-of/index.js index aa2bb3944..dfa799b78 100644 --- a/node_modules/kind-of/index.js +++ b/node_modules/kind-of/index.js @@ -66,7 +66,7 @@ module.exports = function kindOf(val) { }; function ctorName(val) { - return val.constructor ? val.constructor.name : null; + return typeof val.constructor === 'function' ? val.constructor.name : null; } function isArray(val) { diff --git a/node_modules/kind-of/package.json b/node_modules/kind-of/package.json index ea8a227b6..f7e118ebd 100644 --- a/node_modules/kind-of/package.json +++ b/node_modules/kind-of/package.json @@ -1,26 +1,19 @@ { - "_args": [ - [ - "kind-of@6.0.2", - "/Users/drew.heavner/Documents/Github/sign-android-release" - ] - ], - "_development": true, - "_from": "kind-of@6.0.2", - "_id": "kind-of@6.0.2", + "_from": "kind-of@6.0.3", + "_id": "kind-of@6.0.3", "_inBundle": false, - "_integrity": "sha512-s5kLOcnH0XqDO+FvuaLX8DDjZ18CGFk7VygH40QoKPUQhW4e2rvM0rwUq0t8IQDOwYSeLK01U90OjzBTme2QqA==", + "_integrity": "sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==", "_location": "/kind-of", "_phantomChildren": {}, "_requested": { "type": "version", "registry": true, - "raw": "kind-of@6.0.2", + "raw": "kind-of@6.0.3", "name": "kind-of", "escapedName": "kind-of", - "rawSpec": "6.0.2", + "rawSpec": "6.0.3", "saveSpec": null, - "fetchSpec": "6.0.2" + "fetchSpec": "6.0.3" }, "_requiredBy": [ "/base/is-accessor-descriptor", @@ -38,9 +31,10 @@ "/snapdragon-node/is-data-descriptor", "/snapdragon-node/is-descriptor" ], - "_resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.2.tgz", - "_spec": "6.0.2", - "_where": "/Users/drew.heavner/Documents/Github/sign-android-release", + "_resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz", + "_shasum": "07c05034a6c349fa06e24fa35aa76db4580ce4dd", + "_spec": "kind-of@6.0.3", + "_where": "/Users/drew.heavner/Documents/Github/sign-android-release/node_modules/micromatch", "author": { "name": "Jon Schlinkert", "url": "https://github.com/jonschlinkert" @@ -48,6 +42,7 @@ "bugs": { "url": "https://github.com/jonschlinkert/kind-of/issues" }, + "bundleDependencies": false, "contributors": [ { "name": "David Fox-Powell", @@ -82,6 +77,7 @@ "url": "https://i.am.charlike.online" } ], + "deprecated": false, "description": "Get the native type of a value.", "devDependencies": { "benchmarked": "^2.0.0", @@ -156,5 +152,5 @@ "verb" ] }, - "version": "6.0.2" + "version": "6.0.3" } diff --git a/node_modules/lcid/index.js b/node_modules/lcid/index.js deleted file mode 100644 index b666ef00a..000000000 --- a/node_modules/lcid/index.js +++ /dev/null @@ -1,23 +0,0 @@ -'use strict'; -const invertKv = require('invert-kv'); -const all = require('./lcid.json'); - -const inverted = invertKv(all); - -exports.from = lcidCode => { - if (typeof lcidCode !== 'number') { - throw new TypeError('Expected a number'); - } - - return inverted[lcidCode]; -}; - -exports.to = localeId => { - if (typeof localeId !== 'string') { - throw new TypeError('Expected a string'); - } - - return all[localeId]; -}; - -exports.all = all; diff --git a/node_modules/lcid/lcid.json b/node_modules/lcid/lcid.json deleted file mode 100644 index 9c89f6a49..000000000 --- a/node_modules/lcid/lcid.json +++ /dev/null @@ -1,203 +0,0 @@ -{ - "af_ZA": 1078, - "am_ET": 1118, - "ar_AE": 14337, - "ar_BH": 15361, - "ar_DZ": 5121, - "ar_EG": 3073, - "ar_IQ": 2049, - "ar_JO": 11265, - "ar_KW": 13313, - "ar_LB": 12289, - "ar_LY": 4097, - "ar_MA": 6145, - "ar_OM": 8193, - "ar_QA": 16385, - "ar_SA": 1025, - "ar_SY": 10241, - "ar_TN": 7169, - "ar_YE": 9217, - "arn_CL": 1146, - "as_IN": 1101, - "az_AZ": 2092, - "ba_RU": 1133, - "be_BY": 1059, - "bg_BG": 1026, - "bn_IN": 1093, - "bo_BT": 2129, - "bo_CN": 1105, - "br_FR": 1150, - "bs_BA": 8218, - "ca_ES": 1027, - "co_FR": 1155, - "cs_CZ": 1029, - "cy_GB": 1106, - "da_DK": 1030, - "de_AT": 3079, - "de_CH": 2055, - "de_DE": 1031, - "de_LI": 5127, - "de_LU": 4103, - "div_MV": 1125, - "dsb_DE": 2094, - "el_GR": 1032, - "en_AU": 3081, - "en_BZ": 10249, - "en_CA": 4105, - "en_CB": 9225, - "en_GB": 2057, - "en_IE": 6153, - "en_IN": 18441, - "en_JA": 8201, - "en_MY": 17417, - "en_NZ": 5129, - "en_PH": 13321, - "en_TT": 11273, - "en_US": 1033, - "en_ZA": 7177, - "en_ZW": 12297, - "es_AR": 11274, - "es_BO": 16394, - "es_CL": 13322, - "es_CO": 9226, - "es_CR": 5130, - "es_DO": 7178, - "es_EC": 12298, - "es_ES": 3082, - "es_GT": 4106, - "es_HN": 18442, - "es_MX": 2058, - "es_NI": 19466, - "es_PA": 6154, - "es_PE": 10250, - "es_PR": 20490, - "es_PY": 15370, - "es_SV": 17418, - "es_UR": 14346, - "es_US": 21514, - "es_VE": 8202, - "et_EE": 1061, - "eu_ES": 1069, - "fa_IR": 1065, - "fi_FI": 1035, - "fil_PH": 1124, - "fo_FO": 1080, - "fr_BE": 2060, - "fr_CA": 3084, - "fr_CH": 4108, - "fr_FR": 1036, - "fr_LU": 5132, - "fr_MC": 6156, - "fy_NL": 1122, - "ga_IE": 2108, - "gbz_AF": 1164, - "gl_ES": 1110, - "gsw_FR": 1156, - "gu_IN": 1095, - "ha_NG": 1128, - "he_IL": 1037, - "hi_IN": 1081, - "hr_BA": 4122, - "hr_HR": 1050, - "hu_HU": 1038, - "hy_AM": 1067, - "id_ID": 1057, - "ii_CN": 1144, - "is_IS": 1039, - "it_CH": 2064, - "it_IT": 1040, - "iu_CA": 2141, - "ja_JP": 1041, - "ka_GE": 1079, - "kh_KH": 1107, - "kk_KZ": 1087, - "kl_GL": 1135, - "kn_IN": 1099, - "ko_KR": 1042, - "kok_IN": 1111, - "ky_KG": 1088, - "lb_LU": 1134, - "lo_LA": 1108, - "lt_LT": 1063, - "lv_LV": 1062, - "mi_NZ": 1153, - "mk_MK": 1071, - "ml_IN": 1100, - "mn_CN": 2128, - "mn_MN": 1104, - "moh_CA": 1148, - "mr_IN": 1102, - "ms_BN": 2110, - "ms_MY": 1086, - "mt_MT": 1082, - "my_MM": 1109, - "nb_NO": 1044, - "ne_NP": 1121, - "nl_BE": 2067, - "nl_NL": 1043, - "nn_NO": 2068, - "ns_ZA": 1132, - "oc_FR": 1154, - "or_IN": 1096, - "pa_IN": 1094, - "pl_PL": 1045, - "ps_AF": 1123, - "pt_BR": 1046, - "pt_PT": 2070, - "qut_GT": 1158, - "quz_BO": 1131, - "quz_EC": 2155, - "quz_PE": 3179, - "rm_CH": 1047, - "ro_RO": 1048, - "ru_RU": 1049, - "rw_RW": 1159, - "sa_IN": 1103, - "sah_RU": 1157, - "se_FI": 3131, - "se_NO": 1083, - "se_SE": 2107, - "si_LK": 1115, - "sk_SK": 1051, - "sl_SI": 1060, - "sma_NO": 6203, - "sma_SE": 7227, - "smj_NO": 4155, - "smj_SE": 5179, - "smn_FI": 9275, - "sms_FI": 8251, - "sq_AL": 1052, - "sr_BA": 7194, - "sr_SP": 3098, - "sv_FI": 2077, - "sv_SE": 1053, - "sw_KE": 1089, - "syr_SY": 1114, - "ta_IN": 1097, - "te_IN": 1098, - "tg_TJ": 1064, - "th_TH": 1054, - "tk_TM": 1090, - "tmz_DZ": 2143, - "tn_ZA": 1074, - "tr_TR": 1055, - "tt_RU": 1092, - "ug_CN": 1152, - "uk_UA": 1058, - "ur_IN": 2080, - "ur_PK": 1056, - "uz_UZ": 2115, - "vi_VN": 1066, - "wen_DE": 1070, - "wo_SN": 1160, - "xh_ZA": 1076, - "yo_NG": 1130, - "zh_CHS": 4, - "zh_CHT": 31748, - "zh_CN": 2052, - "zh_HK": 3076, - "zh_MO": 5124, - "zh_SG": 4100, - "zh_TW": 1028, - "zu_ZA": 1077 -} diff --git a/node_modules/lcid/license b/node_modules/lcid/license deleted file mode 100644 index e7af2f771..000000000 --- a/node_modules/lcid/license +++ /dev/null @@ -1,9 +0,0 @@ -MIT License - -Copyright (c) Sindre Sorhus (sindresorhus.com) - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/lcid/package.json b/node_modules/lcid/package.json deleted file mode 100644 index de5ef5156..000000000 --- a/node_modules/lcid/package.json +++ /dev/null @@ -1,83 +0,0 @@ -{ - "_args": [ - [ - "lcid@2.0.0", - "/Users/drew.heavner/Documents/Github/sign-android-release" - ] - ], - "_development": true, - "_from": "lcid@2.0.0", - "_id": "lcid@2.0.0", - "_inBundle": false, - "_integrity": "sha512-avPEb8P8EGnwXKClwsNUgryVjllcRqtMYa49NTsbQagYuT1DcXnl1915oxWjoyGrXR6zH/Y0Zc96xWsPcoDKeA==", - "_location": "/lcid", - "_phantomChildren": {}, - "_requested": { - "type": "version", - "registry": true, - "raw": "lcid@2.0.0", - "name": "lcid", - "escapedName": "lcid", - "rawSpec": "2.0.0", - "saveSpec": null, - "fetchSpec": "2.0.0" - }, - "_requiredBy": [ - "/os-locale" - ], - "_resolved": "https://registry.npmjs.org/lcid/-/lcid-2.0.0.tgz", - "_spec": "2.0.0", - "_where": "/Users/drew.heavner/Documents/Github/sign-android-release", - "author": { - "name": "Sindre Sorhus", - "email": "sindresorhus@gmail.com", - "url": "sindresorhus.com" - }, - "bugs": { - "url": "https://github.com/sindresorhus/lcid/issues" - }, - "dependencies": { - "invert-kv": "^2.0.0" - }, - "description": "Mapping between standard locale identifiers and Windows locale identifiers (LCID)", - "devDependencies": { - "ava": "*", - "xo": "*" - }, - "engines": { - "node": ">=6" - }, - "files": [ - "index.js", - "lcid.json" - ], - "homepage": "https://github.com/sindresorhus/lcid#readme", - "keywords": [ - "lcid", - "locale", - "string", - "str", - "id", - "identifier", - "windows", - "language", - "lang", - "map", - "mapping", - "convert", - "json", - "bcp47", - "ietf", - "tag" - ], - "license": "MIT", - "name": "lcid", - "repository": { - "type": "git", - "url": "git+https://github.com/sindresorhus/lcid.git" - }, - "scripts": { - "test": "xo && ava" - }, - "version": "2.0.0" -} diff --git a/node_modules/lcid/readme.md b/node_modules/lcid/readme.md deleted file mode 100644 index 2b1aa798b..000000000 --- a/node_modules/lcid/readme.md +++ /dev/null @@ -1,35 +0,0 @@ -# lcid [![Build Status](https://travis-ci.org/sindresorhus/lcid.svg?branch=master)](https://travis-ci.org/sindresorhus/lcid) - -> Mapping between [standard locale identifiers](https://en.wikipedia.org/wiki/Locale_(computer_software)) and [Windows locale identifiers (LCID)](http://en.wikipedia.org/wiki/Locale#Specifics_for_Microsoft_platforms) - -Based on the [mapping](https://github.com/python/cpython/blob/8f7bb100d0fa7fb2714f3953b5b627878277c7c6/Lib/locale.py#L1465-L1674) used in the Python standard library. - -The mapping itself is just a [JSON file](lcid.json) and can be used wherever. - - -## Install - -``` -$ npm install lcid -``` - - -## Usage - -```js -const lcid = require('lcid'); - -lcid.from(1044); -//=> 'nb_NO' - -lcid.to('nb_NO'); -//=> 1044 - -lcid.all; -//=> {'af_ZA': 1078, ...} -``` - - -## License - -MIT © [Sindre Sorhus](https://sindresorhus.com) diff --git a/node_modules/leven/index.js b/node_modules/leven/index.js index bb44b7919..25f5a3d5c 100644 --- a/node_modules/leven/index.js +++ b/node_modules/leven/index.js @@ -1,85 +1,77 @@ -/* eslint-disable no-nested-ternary */ 'use strict'; -var arr = []; -var charCodeCache = []; +const array = []; +const charCodeCache = []; -module.exports = function (a, b) { - if (a === b) { +const leven = (left, right) => { + if (left === right) { return 0; } - var swap = a; + const swap = left; // Swapping the strings if `a` is longer than `b` so we know which one is the // shortest & which one is the longest - if (a.length > b.length) { - a = b; - b = swap; + if (left.length > right.length) { + left = right; + right = swap; } - var aLen = a.length; - var bLen = b.length; - - if (aLen === 0) { - return bLen; - } - - if (bLen === 0) { - return aLen; - } + let leftLength = left.length; + let rightLength = right.length; // Performing suffix trimming: // We can linearly drop suffix common to both strings since they // don't increase distance at all // Note: `~-` is the bitwise way to perform a `- 1` operation - while (aLen > 0 && (a.charCodeAt(~-aLen) === b.charCodeAt(~-bLen))) { - aLen--; - bLen--; - } - - if (aLen === 0) { - return bLen; + while (leftLength > 0 && (left.charCodeAt(~-leftLength) === right.charCodeAt(~-rightLength))) { + leftLength--; + rightLength--; } // Performing prefix trimming // We can linearly drop prefix common to both strings since they // don't increase distance at all - var start = 0; + let start = 0; - while (start < aLen && (a.charCodeAt(start) === b.charCodeAt(start))) { + while (start < leftLength && (left.charCodeAt(start) === right.charCodeAt(start))) { start++; } - aLen -= start; - bLen -= start; + leftLength -= start; + rightLength -= start; - if (aLen === 0) { - return bLen; + if (leftLength === 0) { + return rightLength; } - var bCharCode; - var ret; - var tmp; - var tmp2; - var i = 0; - var j = 0; + let bCharCode; + let result; + let temp; + let temp2; + let i = 0; + let j = 0; - while (i < aLen) { - charCodeCache[start + i] = a.charCodeAt(start + i); - arr[i] = ++i; + while (i < leftLength) { + charCodeCache[i] = left.charCodeAt(start + i); + array[i] = ++i; } - while (j < bLen) { - bCharCode = b.charCodeAt(start + j); - tmp = j++; - ret = j; + while (j < rightLength) { + bCharCode = right.charCodeAt(start + j); + temp = j++; + result = j; - for (i = 0; i < aLen; i++) { - tmp2 = bCharCode === charCodeCache[start + i] ? tmp : tmp + 1; - tmp = arr[i]; - ret = arr[i] = tmp > ret ? tmp2 > ret ? ret + 1 : tmp2 : tmp2 > tmp ? tmp + 1 : tmp2; + for (i = 0; i < leftLength; i++) { + temp2 = bCharCode === charCodeCache[i] ? temp : temp + 1; + temp = array[i]; + // eslint-disable-next-line no-multi-assign + result = array[i] = temp > result ? temp2 > result ? result + 1 : temp2 : temp2 > temp ? temp + 1 : temp2; } } - return ret; + return result; }; + +module.exports = leven; +// TODO: Remove this for the next major release +module.exports.default = leven; diff --git a/node_modules/leven/license b/node_modules/leven/license index 654d0bfe9..e7af2f771 100644 --- a/node_modules/leven/license +++ b/node_modules/leven/license @@ -1,21 +1,9 @@ -The MIT License (MIT) +MIT License Copyright (c) Sindre Sorhus (sindresorhus.com) -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/leven/package.json b/node_modules/leven/package.json index e1cca5e21..a0044f88b 100644 --- a/node_modules/leven/package.json +++ b/node_modules/leven/package.json @@ -1,33 +1,28 @@ { - "_args": [ - [ - "leven@2.1.0", - "/Users/drew.heavner/Documents/Github/sign-android-release" - ] - ], - "_development": true, - "_from": "leven@2.1.0", - "_id": "leven@2.1.0", + "_from": "leven@^3.1.0", + "_id": "leven@3.1.0", "_inBundle": false, - "_integrity": "sha1-wuep93IJTe6dNCAq6KzORoeHVYA=", + "_integrity": "sha512-qsda+H8jTaUaN/x5vzW2rzc+8Rw4TAQ/4KjB46IwK5VH+IlVeeeje/EoZRpiXvIqjFgK84QffqPztGI3VBLG1A==", "_location": "/leven", "_phantomChildren": {}, "_requested": { - "type": "version", + "type": "range", "registry": true, - "raw": "leven@2.1.0", + "raw": "leven@^3.1.0", "name": "leven", "escapedName": "leven", - "rawSpec": "2.1.0", + "rawSpec": "^3.1.0", "saveSpec": null, - "fetchSpec": "2.1.0" + "fetchSpec": "^3.1.0" }, "_requiredBy": [ - "/jest-validate" + "/jest-validate", + "/jest/jest-cli/jest-validate" ], - "_resolved": "https://registry.npmjs.org/leven/-/leven-2.1.0.tgz", - "_spec": "2.1.0", - "_where": "/Users/drew.heavner/Documents/Github/sign-android-release", + "_resolved": "https://registry.npmjs.org/leven/-/leven-3.1.0.tgz", + "_shasum": "77891de834064cccba82ae7842bb6b14a13ed7f2", + "_spec": "leven@^3.1.0", + "_where": "/Users/drew.heavner/Documents/Github/sign-android-release/node_modules/jest-validate", "author": { "name": "Sindre Sorhus", "email": "sindresorhus@gmail.com", @@ -36,25 +31,29 @@ "bugs": { "url": "https://github.com/sindresorhus/leven/issues" }, + "bundleDependencies": false, + "deprecated": false, "description": "Measure the difference between two strings using the fastest JS implementation of the Levenshtein distance algorithm", "devDependencies": { - "ava": "^0.17.0", - "fast-levenshtein": "^2.0.5", + "ava": "^1.4.1", + "fast-levenshtein": "^2.0.6", "ld": "^0.1.0", - "levdist": "^2.0.0", - "levenshtein": "^1.0.4", - "levenshtein-component": "0.0.1", - "levenshtein-edit-distance": "^2.0.0", + "levdist": "^2.2.9", + "levenshtein": "^1.0.5", + "levenshtein-component": "^0.0.1", + "levenshtein-edit-distance": "^2.0.3", "matcha": "^0.7.0", - "natural": "^0.4.0", - "talisman": "^0.18.0", - "xo": "^0.16.0" + "natural": "^0.6.3", + "talisman": "^0.21.0", + "tsd": "^0.7.2", + "xo": "^0.24.0" }, "engines": { - "node": ">=0.10.0" + "node": ">=6" }, "files": [ - "index.js" + "index.js", + "index.d.ts" ], "homepage": "https://github.com/sindresorhus/leven#readme", "keywords": [ @@ -85,7 +84,7 @@ }, "scripts": { "bench": "matcha bench.js", - "test": "xo && ava" + "test": "xo && ava && tsd" }, - "version": "2.1.0" + "version": "3.1.0" } diff --git a/node_modules/leven/readme.md b/node_modules/leven/readme.md index 9493c9f38..33625c46f 100644 --- a/node_modules/leven/readme.md +++ b/node_modules/leven/readme.md @@ -1,13 +1,13 @@ # leven [![Build Status](https://travis-ci.org/sindresorhus/leven.svg?branch=master)](https://travis-ci.org/sindresorhus/leven) > Measure the difference between two strings
-> The fastest JS implementation of the [Levenshtein distance](http://en.wikipedia.org/wiki/Levenshtein_distance) algorithm +> One of the fastest JS implementations of the [Levenshtein distance](https://en.wikipedia.org/wiki/Levenshtein_distance) algorithm ## Install ``` -$ npm install --save leven +$ npm install leven ``` @@ -28,15 +28,15 @@ $ npm run bench ``` ``` - 401,487 op/s » leven - 371,707 op/s » talisman - 264,191 op/s » levenshtein-edit-distance - 152,923 op/s » fast-levenshtein - 57,267 op/s » levenshtein-component - 19,915 op/s » levdist - 21,802 op/s » ld - 18,079 op/s » natural - 11,761 op/s » levenshtein + 165,926 op/s » leven + 164,398 op/s » talisman + 1,044 op/s » levenshtein-edit-distance + 628 op/s » fast-levenshtein + 497 op/s » levenshtein-component + 195 op/s » ld + 190 op/s » levenshtein + 168 op/s » levdist + 10 op/s » natural ``` diff --git a/node_modules/lodash/README.md b/node_modules/lodash/README.md index 292832fef..a57334908 100644 --- a/node_modules/lodash/README.md +++ b/node_modules/lodash/README.md @@ -1,4 +1,4 @@ -# lodash v4.17.15 +# lodash v4.17.19 The [Lodash](https://lodash.com/) library exported as [Node.js](https://nodejs.org/) modules. @@ -28,7 +28,7 @@ var at = require('lodash/at'); var curryN = require('lodash/fp/curryN'); ``` -See the [package source](https://github.com/lodash/lodash/tree/4.17.15-npm) for more details. +See the [package source](https://github.com/lodash/lodash/tree/4.17.19-npm) for more details. **Note:**
Install [n_](https://www.npmjs.com/package/n_) for Lodash use in the Node.js < 6 REPL. diff --git a/node_modules/lodash/core.js b/node_modules/lodash/core.js index 89c77ded0..31a2bc01b 100644 --- a/node_modules/lodash/core.js +++ b/node_modules/lodash/core.js @@ -1,7 +1,7 @@ /** * @license * Lodash (Custom Build) - * Build: `lodash core -o ./dist/lodash.core.js` + * Build: `lodash core exports="node" -o ./npm-package/core.js` * Copyright OpenJS Foundation and other contributors * Released under MIT license * Based on Underscore.js 1.8.3 @@ -3826,29 +3826,10 @@ /*--------------------------------------------------------------------------*/ - // Some AMD build optimizers, like r.js, check for condition patterns like: - if (typeof define == 'function' && typeof define.amd == 'object' && define.amd) { - // Expose Lodash on the global object to prevent errors when Lodash is - // loaded by a script tag in the presence of an AMD loader. - // See http://requirejs.org/docs/errors.html#mismatch for more details. - // Use `_.noConflict` to remove Lodash from the global object. - root._ = lodash; - - // Define as an anonymous module so, through path mapping, it can be - // referenced as the "underscore" module. - define(function() { - return lodash; - }); - } - // Check for `exports` after `define` in case a build optimizer adds it. - else if (freeModule) { + if (freeModule) { // Export for Node.js. (freeModule.exports = lodash)._ = lodash; // Export for CommonJS support. freeExports._ = lodash; } - else { - // Export to the global object. - root._ = lodash; - } }.call(this)); diff --git a/node_modules/lodash/core.min.js b/node_modules/lodash/core.min.js index bb543ff54..64f14e48b 100644 --- a/node_modules/lodash/core.min.js +++ b/node_modules/lodash/core.min.js @@ -1,7 +1,7 @@ /** * @license * Lodash (Custom Build) lodash.com/license | Underscore.js 1.8.3 underscorejs.org/LICENSE - * Build: `lodash core -o ./dist/lodash.core.js` + * Build: `lodash core exports="node" -o ./npm-package/core.js` */ ;(function(){function n(n){return H(n)&&pn.call(n,"callee")&&!yn.call(n,"callee")}function t(n,t){return n.push.apply(n,t),n}function r(n){return function(t){return null==t?Z:t[n]}}function e(n,t,r,e,u){return u(n,function(n,u,o){r=e?(e=false,n):t(r,n,u,o)}),r}function u(n,t){return j(t,function(t){return n[t]})}function o(n){return n instanceof i?n:new i(n)}function i(n,t){this.__wrapped__=n,this.__actions__=[],this.__chain__=!!t}function c(n,t,r){if(typeof n!="function")throw new TypeError("Expected a function"); return setTimeout(function(){n.apply(Z,r)},t)}function f(n,t){var r=true;return mn(n,function(n,e,u){return r=!!t(n,e,u)}),r}function a(n,t,r){for(var e=-1,u=n.length;++e arrLength)) { return false; } - // Assume cyclic values are equal. - var stacked = stack.get(array); - if (stacked && stack.get(other)) { - return stacked == other; + // Check that cyclic values are equal. + var arrStacked = stack.get(array); + var othStacked = stack.get(other); + if (arrStacked && othStacked) { + return arrStacked == other && othStacked == array; } var index = -1, result = true, @@ -5783,10 +5804,11 @@ return false; } } - // Assume cyclic values are equal. - var stacked = stack.get(object); - if (stacked && stack.get(other)) { - return stacked == other; + // Check that cyclic values are equal. + var objStacked = stack.get(object); + var othStacked = stack.get(other); + if (objStacked && othStacked) { + return objStacked == other && othStacked == object; } var result = true; stack.set(object, other); @@ -9167,6 +9189,10 @@ * // The `_.property` iteratee shorthand. * _.filter(users, 'active'); * // => objects for ['barney'] + * + * // Combining several predicates using `_.overEvery` or `_.overSome`. + * _.filter(users, _.overSome([{ 'age': 36 }, ['age', 40]])); + * // => objects for ['fred', 'barney'] */ function filter(collection, predicate) { var func = isArray(collection) ? arrayFilter : baseFilter; @@ -9916,15 +9942,15 @@ * var users = [ * { 'user': 'fred', 'age': 48 }, * { 'user': 'barney', 'age': 36 }, - * { 'user': 'fred', 'age': 40 }, + * { 'user': 'fred', 'age': 30 }, * { 'user': 'barney', 'age': 34 } * ]; * * _.sortBy(users, [function(o) { return o.user; }]); - * // => objects for [['barney', 36], ['barney', 34], ['fred', 48], ['fred', 40]] + * // => objects for [['barney', 36], ['barney', 34], ['fred', 48], ['fred', 30]] * * _.sortBy(users, ['user', 'age']); - * // => objects for [['barney', 34], ['barney', 36], ['fred', 40], ['fred', 48]] + * // => objects for [['barney', 34], ['barney', 36], ['fred', 30], ['fred', 48]] */ var sortBy = baseRest(function(collection, iteratees) { if (collection == null) { @@ -14799,11 +14825,11 @@ // Use a sourceURL for easier debugging. // The sourceURL gets injected into the source that's eval-ed, so be careful - // with lookup (in case of e.g. prototype pollution), and strip newlines if any. - // A newline wouldn't be a valid sourceURL anyway, and it'd enable code injection. + // to normalize all kinds of whitespace, so e.g. newlines (and unicode versions of it) can't sneak in + // and escape the comment, thus injecting code that gets evaled. var sourceURL = '//# sourceURL=' + (hasOwnProperty.call(options, 'sourceURL') - ? (options.sourceURL + '').replace(/[\r\n]/g, ' ') + ? (options.sourceURL + '').replace(/\s/g, ' ') : ('lodash.templateSources[' + (++templateCounter) + ']') ) + '\n'; @@ -14836,8 +14862,6 @@ // If `variable` is not specified wrap a with-statement around the generated // code to add the data object to the top of the scope chain. - // Like with sourceURL, we take care to not check the option's prototype, - // as this configuration is a code injection vector. var variable = hasOwnProperty.call(options, 'variable') && options.variable; if (!variable) { source = 'with (obj) {\n' + source + '\n}\n'; @@ -15544,6 +15568,9 @@ * values against any array or object value, respectively. See `_.isEqual` * for a list of supported value comparisons. * + * **Note:** Multiple values can be checked by combining several matchers + * using `_.overSome` + * * @static * @memberOf _ * @since 3.0.0 @@ -15559,6 +15586,10 @@ * * _.filter(objects, _.matches({ 'a': 4, 'c': 6 })); * // => [{ 'a': 4, 'b': 5, 'c': 6 }] + * + * // Checking for several possible values + * _.filter(users, _.overSome([_.matches({ 'a': 1 }), _.matches({ 'a': 4 })])); + * // => [{ 'a': 1, 'b': 2, 'c': 3 }, { 'a': 4, 'b': 5, 'c': 6 }] */ function matches(source) { return baseMatches(baseClone(source, CLONE_DEEP_FLAG)); @@ -15573,6 +15604,9 @@ * `srcValue` values against any array or object value, respectively. See * `_.isEqual` for a list of supported value comparisons. * + * **Note:** Multiple values can be checked by combining several matchers + * using `_.overSome` + * * @static * @memberOf _ * @since 3.2.0 @@ -15589,6 +15623,10 @@ * * _.find(objects, _.matchesProperty('a', 4)); * // => { 'a': 4, 'b': 5, 'c': 6 } + * + * // Checking for several possible values + * _.filter(users, _.overSome([_.matchesProperty('a', 1), _.matchesProperty('a', 4)])); + * // => [{ 'a': 1, 'b': 2, 'c': 3 }, { 'a': 4, 'b': 5, 'c': 6 }] */ function matchesProperty(path, srcValue) { return baseMatchesProperty(path, baseClone(srcValue, CLONE_DEEP_FLAG)); @@ -15812,6 +15850,10 @@ * Creates a function that checks if **all** of the `predicates` return * truthy when invoked with the arguments it receives. * + * Following shorthands are possible for providing predicates. + * Pass an `Object` and it will be used as an parameter for `_.matches` to create the predicate. + * Pass an `Array` of parameters for `_.matchesProperty` and the predicate will be created using them. + * * @static * @memberOf _ * @since 4.0.0 @@ -15838,6 +15880,10 @@ * Creates a function that checks if **any** of the `predicates` return * truthy when invoked with the arguments it receives. * + * Following shorthands are possible for providing predicates. + * Pass an `Object` and it will be used as an parameter for `_.matches` to create the predicate. + * Pass an `Array` of parameters for `_.matchesProperty` and the predicate will be created using them. + * * @static * @memberOf _ * @since 4.0.0 @@ -15857,6 +15903,9 @@ * * func(NaN); * // => false + * + * var matchesFunc = _.overSome([{ 'a': 1 }, { 'a': 2 }]) + * var matchesPropertyFunc = _.overSome([['a', 1], ['a', 2]]) */ var overSome = createOver(arraySome); diff --git a/node_modules/lodash/lodash.min.js b/node_modules/lodash/lodash.min.js index 13ec307da..e23037163 100644 --- a/node_modules/lodash/lodash.min.js +++ b/node_modules/lodash/lodash.min.js @@ -1,137 +1,139 @@ /** * @license - * Lodash lodash.com/license | Underscore.js 1.8.3 underscorejs.org/LICENSE + * Lodash + * Copyright OpenJS Foundation and other contributors + * Released under MIT license + * Based on Underscore.js 1.8.3 + * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors */ -;(function(){function n(n,t,r){switch(r.length){case 0:return n.call(t);case 1:return n.call(t,r[0]);case 2:return n.call(t,r[0],r[1]);case 3:return n.call(t,r[0],r[1],r[2])}return n.apply(t,r)}function t(n,t,r,e){for(var u=-1,i=null==n?0:n.length;++u"']/g,G=RegExp(V.source),H=RegExp(K.source),J=/<%-([\s\S]+?)%>/g,Y=/<%([\s\S]+?)%>/g,Q=/<%=([\s\S]+?)%>/g,X=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,nn=/^\w*$/,tn=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,rn=/[\\^$.*+?()[\]{}|]/g,en=RegExp(rn.source),un=/^\s+|\s+$/g,on=/^\s+/,fn=/\s+$/,cn=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,an=/\{\n\/\* \[wrapped with (.+)\] \*/,ln=/,? & /,sn=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,hn=/\\(\\)?/g,pn=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,_n=/\w*$/,vn=/^[-+]0x[0-9a-f]+$/i,gn=/^0b[01]+$/i,dn=/^\[object .+?Constructor\]$/,yn=/^0o[0-7]+$/i,bn=/^(?:0|[1-9]\d*)$/,xn=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,jn=/($^)/,wn=/['\n\r\u2028\u2029\\]/g,mn="[\\ufe0e\\ufe0f]?(?:[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]|\\ud83c[\\udffb-\\udfff])?(?:\\u200d(?:[^\\ud800-\\udfff]|(?:\\ud83c[\\udde6-\\uddff]){2}|[\\ud800-\\udbff][\\udc00-\\udfff])[\\ufe0e\\ufe0f]?(?:[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]|\\ud83c[\\udffb-\\udfff])?)*",An="(?:[\\u2700-\\u27bf]|(?:\\ud83c[\\udde6-\\uddff]){2}|[\\ud800-\\udbff][\\udc00-\\udfff])"+mn,En="(?:[^\\ud800-\\udfff][\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]?|[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]|(?:\\ud83c[\\udde6-\\uddff]){2}|[\\ud800-\\udbff][\\udc00-\\udfff]|[\\ud800-\\udfff])",kn=RegExp("['\u2019]","g"),Sn=RegExp("[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]","g"),On=RegExp("\\ud83c[\\udffb-\\udfff](?=\\ud83c[\\udffb-\\udfff])|"+En+mn,"g"),In=RegExp(["[A-Z\\xc0-\\xd6\\xd8-\\xde]?[a-z\\xdf-\\xf6\\xf8-\\xff]+(?:['\u2019](?:d|ll|m|re|s|t|ve))?(?=[\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000]|[A-Z\\xc0-\\xd6\\xd8-\\xde]|$)|(?:[A-Z\\xc0-\\xd6\\xd8-\\xde]|[^\\ud800-\\udfff\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000\\d+\\u2700-\\u27bfa-z\\xdf-\\xf6\\xf8-\\xffA-Z\\xc0-\\xd6\\xd8-\\xde])+(?:['\u2019](?:D|LL|M|RE|S|T|VE))?(?=[\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000]|[A-Z\\xc0-\\xd6\\xd8-\\xde](?:[a-z\\xdf-\\xf6\\xf8-\\xff]|[^\\ud800-\\udfff\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000\\d+\\u2700-\\u27bfa-z\\xdf-\\xf6\\xf8-\\xffA-Z\\xc0-\\xd6\\xd8-\\xde])|$)|[A-Z\\xc0-\\xd6\\xd8-\\xde]?(?:[a-z\\xdf-\\xf6\\xf8-\\xff]|[^\\ud800-\\udfff\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000\\d+\\u2700-\\u27bfa-z\\xdf-\\xf6\\xf8-\\xffA-Z\\xc0-\\xd6\\xd8-\\xde])+(?:['\u2019](?:d|ll|m|re|s|t|ve))?|[A-Z\\xc0-\\xd6\\xd8-\\xde]+(?:['\u2019](?:D|LL|M|RE|S|T|VE))?|\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])|\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])|\\d+",An].join("|"),"g"),Rn=RegExp("[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\ufe0e\\ufe0f]"),zn=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,Wn="Array Buffer DataView Date Error Float32Array Float64Array Function Int8Array Int16Array Int32Array Map Math Object Promise RegExp Set String Symbol TypeError Uint8Array Uint8ClampedArray Uint16Array Uint32Array WeakMap _ clearTimeout isFinite parseInt setTimeout".split(" "),Bn={}; -Bn["[object Float32Array]"]=Bn["[object Float64Array]"]=Bn["[object Int8Array]"]=Bn["[object Int16Array]"]=Bn["[object Int32Array]"]=Bn["[object Uint8Array]"]=Bn["[object Uint8ClampedArray]"]=Bn["[object Uint16Array]"]=Bn["[object Uint32Array]"]=true,Bn["[object Arguments]"]=Bn["[object Array]"]=Bn["[object ArrayBuffer]"]=Bn["[object Boolean]"]=Bn["[object DataView]"]=Bn["[object Date]"]=Bn["[object Error]"]=Bn["[object Function]"]=Bn["[object Map]"]=Bn["[object Number]"]=Bn["[object Object]"]=Bn["[object RegExp]"]=Bn["[object Set]"]=Bn["[object String]"]=Bn["[object WeakMap]"]=false; -var Ln={};Ln["[object Arguments]"]=Ln["[object Array]"]=Ln["[object ArrayBuffer]"]=Ln["[object DataView]"]=Ln["[object Boolean]"]=Ln["[object Date]"]=Ln["[object Float32Array]"]=Ln["[object Float64Array]"]=Ln["[object Int8Array]"]=Ln["[object Int16Array]"]=Ln["[object Int32Array]"]=Ln["[object Map]"]=Ln["[object Number]"]=Ln["[object Object]"]=Ln["[object RegExp]"]=Ln["[object Set]"]=Ln["[object String]"]=Ln["[object Symbol]"]=Ln["[object Uint8Array]"]=Ln["[object Uint8ClampedArray]"]=Ln["[object Uint16Array]"]=Ln["[object Uint32Array]"]=true, -Ln["[object Error]"]=Ln["[object Function]"]=Ln["[object WeakMap]"]=false;var Un={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},Cn=parseFloat,Dn=parseInt,Mn=typeof global=="object"&&global&&global.Object===Object&&global,Tn=typeof self=="object"&&self&&self.Object===Object&&self,$n=Mn||Tn||Function("return this")(),Fn=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Nn=Fn&&typeof module=="object"&&module&&!module.nodeType&&module,Pn=Nn&&Nn.exports===Fn,Zn=Pn&&Mn.process,qn=function(){ -try{var n=Nn&&Nn.f&&Nn.f("util").types;return n?n:Zn&&Zn.binding&&Zn.binding("util")}catch(n){}}(),Vn=qn&&qn.isArrayBuffer,Kn=qn&&qn.isDate,Gn=qn&&qn.isMap,Hn=qn&&qn.isRegExp,Jn=qn&&qn.isSet,Yn=qn&&qn.isTypedArray,Qn=b("length"),Xn=x({"\xc0":"A","\xc1":"A","\xc2":"A","\xc3":"A","\xc4":"A","\xc5":"A","\xe0":"a","\xe1":"a","\xe2":"a","\xe3":"a","\xe4":"a","\xe5":"a","\xc7":"C","\xe7":"c","\xd0":"D","\xf0":"d","\xc8":"E","\xc9":"E","\xca":"E","\xcb":"E","\xe8":"e","\xe9":"e","\xea":"e","\xeb":"e","\xcc":"I", -"\xcd":"I","\xce":"I","\xcf":"I","\xec":"i","\xed":"i","\xee":"i","\xef":"i","\xd1":"N","\xf1":"n","\xd2":"O","\xd3":"O","\xd4":"O","\xd5":"O","\xd6":"O","\xd8":"O","\xf2":"o","\xf3":"o","\xf4":"o","\xf5":"o","\xf6":"o","\xf8":"o","\xd9":"U","\xda":"U","\xdb":"U","\xdc":"U","\xf9":"u","\xfa":"u","\xfb":"u","\xfc":"u","\xdd":"Y","\xfd":"y","\xff":"y","\xc6":"Ae","\xe6":"ae","\xde":"Th","\xfe":"th","\xdf":"ss","\u0100":"A","\u0102":"A","\u0104":"A","\u0101":"a","\u0103":"a","\u0105":"a","\u0106":"C", -"\u0108":"C","\u010a":"C","\u010c":"C","\u0107":"c","\u0109":"c","\u010b":"c","\u010d":"c","\u010e":"D","\u0110":"D","\u010f":"d","\u0111":"d","\u0112":"E","\u0114":"E","\u0116":"E","\u0118":"E","\u011a":"E","\u0113":"e","\u0115":"e","\u0117":"e","\u0119":"e","\u011b":"e","\u011c":"G","\u011e":"G","\u0120":"G","\u0122":"G","\u011d":"g","\u011f":"g","\u0121":"g","\u0123":"g","\u0124":"H","\u0126":"H","\u0125":"h","\u0127":"h","\u0128":"I","\u012a":"I","\u012c":"I","\u012e":"I","\u0130":"I","\u0129":"i", -"\u012b":"i","\u012d":"i","\u012f":"i","\u0131":"i","\u0134":"J","\u0135":"j","\u0136":"K","\u0137":"k","\u0138":"k","\u0139":"L","\u013b":"L","\u013d":"L","\u013f":"L","\u0141":"L","\u013a":"l","\u013c":"l","\u013e":"l","\u0140":"l","\u0142":"l","\u0143":"N","\u0145":"N","\u0147":"N","\u014a":"N","\u0144":"n","\u0146":"n","\u0148":"n","\u014b":"n","\u014c":"O","\u014e":"O","\u0150":"O","\u014d":"o","\u014f":"o","\u0151":"o","\u0154":"R","\u0156":"R","\u0158":"R","\u0155":"r","\u0157":"r","\u0159":"r", -"\u015a":"S","\u015c":"S","\u015e":"S","\u0160":"S","\u015b":"s","\u015d":"s","\u015f":"s","\u0161":"s","\u0162":"T","\u0164":"T","\u0166":"T","\u0163":"t","\u0165":"t","\u0167":"t","\u0168":"U","\u016a":"U","\u016c":"U","\u016e":"U","\u0170":"U","\u0172":"U","\u0169":"u","\u016b":"u","\u016d":"u","\u016f":"u","\u0171":"u","\u0173":"u","\u0174":"W","\u0175":"w","\u0176":"Y","\u0177":"y","\u0178":"Y","\u0179":"Z","\u017b":"Z","\u017d":"Z","\u017a":"z","\u017c":"z","\u017e":"z","\u0132":"IJ","\u0133":"ij", -"\u0152":"Oe","\u0153":"oe","\u0149":"'n","\u017f":"s"}),nt=x({"&":"&","<":"<",">":">",'"':""","'":"'"}),tt=x({"&":"&","<":"<",">":">",""":'"',"'":"'"}),rt=function x(mn){function An(n){if(yu(n)&&!ff(n)&&!(n instanceof Un)){if(n instanceof On)return n;if(oi.call(n,"__wrapped__"))return Fe(n)}return new On(n)}function En(){}function On(n,t){this.__wrapped__=n,this.__actions__=[],this.__chain__=!!t,this.__index__=0,this.__values__=T}function Un(n){this.__wrapped__=n, -this.__actions__=[],this.__dir__=1,this.__filtered__=false,this.__iteratees__=[],this.__takeCount__=4294967295,this.__views__=[]}function Mn(n){var t=-1,r=null==n?0:n.length;for(this.clear();++t=t?n:t)),n}function _t(n,t,e,u,i,o){var f,c=1&t,a=2&t,l=4&t;if(e&&(f=i?e(n,u,i,o):e(n)),f!==T)return f;if(!du(n))return n;if(u=ff(n)){if(f=me(n),!c)return Ur(n,f)}else{var s=vo(n),h="[object Function]"==s||"[object GeneratorFunction]"==s;if(af(n))return Ir(n,c);if("[object Object]"==s||"[object Arguments]"==s||h&&!i){if(f=a||h?{}:Ae(n),!c)return a?Mr(n,lt(f,n)):Dr(n,at(f,n))}else{if(!Ln[s])return i?n:{};f=Ee(n,s,c)}}if(o||(o=new Zn), -i=o.get(n))return i;o.set(n,f),pf(n)?n.forEach(function(r){f.add(_t(r,t,e,r,n,o))}):sf(n)&&n.forEach(function(r,u){f.set(u,_t(r,t,e,u,n,o))});var a=l?a?ve:_e:a?Bu:Wu,p=u?T:a(n);return r(p||n,function(r,u){p&&(u=r,r=n[u]),ot(f,u,_t(r,t,e,u,n,o))}),f}function vt(n){var t=Wu(n);return function(r){return gt(r,n,t)}}function gt(n,t,r){var e=r.length;if(null==n)return!e;for(n=Qu(n);e--;){var u=r[e],i=t[u],o=n[u];if(o===T&&!(u in n)||!i(o))return false}return true}function dt(n,t,r){if(typeof n!="function")throw new ti("Expected a function"); -return bo(function(){n.apply(T,r)},t)}function yt(n,t,r,e){var u=-1,i=o,a=true,l=n.length,s=[],h=t.length;if(!l)return s;r&&(t=c(t,k(r))),e?(i=f,a=false):200<=t.length&&(i=O,a=false,t=new Nn(t));n:for(;++ut}function Rt(n,t){return null!=n&&oi.call(n,t)}function zt(n,t){return null!=n&&t in Qu(n)}function Wt(n,t,r){for(var e=r?f:o,u=n[0].length,i=n.length,a=i,l=Ku(i),s=1/0,h=[];a--;){var p=n[a];a&&t&&(p=c(p,k(t))),s=Ci(p.length,s), -l[a]=!r&&(t||120<=u&&120<=p.length)?new Nn(a&&p):T}var p=n[0],_=-1,v=l[0];n:for(;++_r.length?t:kt(t,hr(r,0,-1)),r=null==t?t:t[Me(Ve(r))],null==r?T:n(r,t,e)}function Ut(n){return yu(n)&&"[object Arguments]"==Ot(n)}function Ct(n){ -return yu(n)&&"[object ArrayBuffer]"==Ot(n)}function Dt(n){return yu(n)&&"[object Date]"==Ot(n)}function Mt(n,t,r,e,u){if(n===t)t=true;else if(null==n||null==t||!yu(n)&&!yu(t))t=n!==n&&t!==t;else n:{var i=ff(n),o=ff(t),f=i?"[object Array]":vo(n),c=o?"[object Array]":vo(t),f="[object Arguments]"==f?"[object Object]":f,c="[object Arguments]"==c?"[object Object]":c,a="[object Object]"==f,o="[object Object]"==c;if((c=f==c)&&af(n)){if(!af(t)){t=false;break n}i=true,a=false}if(c&&!a)u||(u=new Zn),t=i||_f(n)?se(n,t,r,e,Mt,u):he(n,t,f,r,e,Mt,u);else{ -if(!(1&r)&&(i=a&&oi.call(n,"__wrapped__"),f=o&&oi.call(t,"__wrapped__"),i||f)){n=i?n.value():n,t=f?t.value():t,u||(u=new Zn),t=Mt(n,t,r,e,u);break n}if(c)t:if(u||(u=new Zn),i=1&r,f=_e(n),o=f.length,c=_e(t).length,o==c||i){for(a=o;a--;){var l=f[a];if(!(i?l in t:oi.call(t,l))){t=false;break t}}if((c=u.get(n))&&u.get(t))t=c==t;else{c=true,u.set(n,t),u.set(t,n);for(var s=i;++at?r:0,Se(t,r)?n[t]:T}function Xt(n,t,r){var e=-1;return t=c(t.length?t:[$u],k(ye())),n=Gt(n,function(n){return{ -a:c(t,function(t){return t(n)}),b:++e,c:n}}),w(n,function(n,t){var e;n:{e=-1;for(var u=n.a,i=t.a,o=u.length,f=r.length;++e=f?c:c*("desc"==r[e]?-1:1);break n}}e=n.b-t.b}return e})}function nr(n,t){return tr(n,t,function(t,r){return zu(n,r)})}function tr(n,t,r){for(var e=-1,u=t.length,i={};++et||9007199254740991t&&(t=-t>u?0:u+t),r=r>u?u:r,0>r&&(r+=u),u=t>r?0:r-t>>>0,t>>>=0,r=Ku(u);++e=u){for(;e>>1,o=n[i];null!==o&&!wu(o)&&(r?o<=t:ot.length?n:kt(n,hr(t,0,-1)),null==n||delete n[Me(Ve(t))]}function jr(n,t,r,e){for(var u=n.length,i=e?u:-1;(e?i--:++ie)return e?br(n[0]):[];for(var u=-1,i=Ku(e);++u=e?n:hr(n,t,r)}function Ir(n,t){if(t)return n.slice();var r=n.length,r=gi?gi(r):new n.constructor(r);return n.copy(r),r}function Rr(n){var t=new n.constructor(n.byteLength);return new vi(t).set(new vi(n)), -t}function zr(n,t){return new n.constructor(t?Rr(n.buffer):n.buffer,n.byteOffset,n.length)}function Wr(n,t){if(n!==t){var r=n!==T,e=null===n,u=n===n,i=wu(n),o=t!==T,f=null===t,c=t===t,a=wu(t);if(!f&&!a&&!i&&n>t||i&&o&&c&&!f&&!a||e&&o&&c||!r&&c||!u)return 1;if(!e&&!i&&!a&&nu?T:i,u=1),t=Qu(t);++eo&&f[0]!==a&&f[o-1]!==a?[]:L(f,a), -o-=c.length,or?r?or(t,n):t:(r=or(t,Oi(n/D(t))),Rn.test(t)?Or(M(r),0,n).join(""):r.slice(0,n))}function te(t,r,e,u){function i(){for(var r=-1,c=arguments.length,a=-1,l=u.length,s=Ku(l+c),h=this&&this!==$n&&this instanceof i?f:t;++at||e)&&(1&n&&(i[2]=h[2],t|=1&r?0:4),(r=h[3])&&(e=i[3],i[3]=e?Br(e,r,h[4]):r,i[4]=e?L(i[3],"__lodash_placeholder__"):h[4]),(r=h[5])&&(e=i[5],i[5]=e?Lr(e,r,h[6]):r,i[6]=e?L(i[5],"__lodash_placeholder__"):h[6]),(r=h[7])&&(i[7]=r),128&n&&(i[8]=null==i[8]?h[8]:Ci(i[8],h[8])),null==i[9]&&(i[9]=h[9]),i[0]=h[0],i[1]=t),n=i[0], -t=i[1],r=i[2],e=i[3],u=i[4],f=i[9]=i[9]===T?c?0:n.length:Ui(i[9]-a,0),!f&&24&t&&(t&=-25),Ue((h?co:yo)(t&&1!=t?8==t||16==t?Kr(n,t,f):32!=t&&33!=t||u.length?Jr.apply(T,i):te(n,t,r,e):Pr(n,t,r),i),n,t)}function ce(n,t,r,e){return n===T||lu(n,ei[r])&&!oi.call(e,r)?t:n}function ae(n,t,r,e,u,i){return du(n)&&du(t)&&(i.set(t,n),Yt(n,t,T,ae,i),i.delete(t)),n}function le(n){return xu(n)?T:n}function se(n,t,r,e,u,i){var o=1&r,f=n.length,c=t.length;if(f!=c&&!(o&&c>f))return false;if((c=i.get(n))&&i.get(t))return c==t; -var c=-1,a=true,l=2&r?new Nn:T;for(i.set(n,t),i.set(t,n);++cr&&(r=Ui(e+r,0)),_(n,ye(t,3),r)):-1}function Pe(n,t,r){var e=null==n?0:n.length;if(!e)return-1;var u=e-1;return r!==T&&(u=Eu(r),u=0>r?Ui(e+u,0):Ci(u,e-1)), -_(n,ye(t,3),u,true)}function Ze(n){return(null==n?0:n.length)?wt(n,1):[]}function qe(n){return n&&n.length?n[0]:T}function Ve(n){var t=null==n?0:n.length;return t?n[t-1]:T}function Ke(n,t){return n&&n.length&&t&&t.length?er(n,t):n}function Ge(n){return null==n?n:$i.call(n)}function He(n){if(!n||!n.length)return[];var t=0;return n=i(n,function(n){if(hu(n))return t=Ui(n.length,t),true}),A(t,function(t){return c(n,b(t))})}function Je(t,r){if(!t||!t.length)return[];var e=He(t);return null==r?e:c(e,function(t){ -return n(r,T,t)})}function Ye(n){return n=An(n),n.__chain__=true,n}function Qe(n,t){return t(n)}function Xe(){return this}function nu(n,t){return(ff(n)?r:uo)(n,ye(t,3))}function tu(n,t){return(ff(n)?e:io)(n,ye(t,3))}function ru(n,t){return(ff(n)?c:Gt)(n,ye(t,3))}function eu(n,t,r){return t=r?T:t,t=n&&null==t?n.length:t,fe(n,128,T,T,T,T,t)}function uu(n,t){var r;if(typeof t!="function")throw new ti("Expected a function");return n=Eu(n),function(){return 0<--n&&(r=t.apply(this,arguments)),1>=n&&(t=T), -r}}function iu(n,t,r){return t=r?T:t,n=fe(n,8,T,T,T,T,T,t),n.placeholder=iu.placeholder,n}function ou(n,t,r){return t=r?T:t,n=fe(n,16,T,T,T,T,T,t),n.placeholder=ou.placeholder,n}function fu(n,t,r){function e(t){var r=c,e=a;return c=a=T,_=t,s=n.apply(e,r)}function u(n){var r=n-p;return n-=_,p===T||r>=t||0>r||g&&n>=l}function i(){var n=Go();if(u(n))return o(n);var r,e=bo;r=n-_,n=t-(n-p),r=g?Ci(n,l-r):n,h=e(i,r)}function o(n){return h=T,d&&c?e(n):(c=a=T,s)}function f(){var n=Go(),r=u(n);if(c=arguments, -a=this,p=n,r){if(h===T)return _=n=p,h=bo(i,t),v?e(n):s;if(g)return lo(h),h=bo(i,t),e(p)}return h===T&&(h=bo(i,t)),s}var c,a,l,s,h,p,_=0,v=false,g=false,d=true;if(typeof n!="function")throw new ti("Expected a function");return t=Su(t)||0,du(r)&&(v=!!r.leading,l=(g="maxWait"in r)?Ui(Su(r.maxWait)||0,t):l,d="trailing"in r?!!r.trailing:d),f.cancel=function(){h!==T&&lo(h),_=0,c=p=a=h=T},f.flush=function(){return h===T?s:o(Go())},f}function cu(n,t){function r(){var e=arguments,u=t?t.apply(this,e):e[0],i=r.cache; -return i.has(u)?i.get(u):(e=n.apply(this,e),r.cache=i.set(u,e)||i,e)}if(typeof n!="function"||null!=t&&typeof t!="function")throw new ti("Expected a function");return r.cache=new(cu.Cache||Fn),r}function au(n){if(typeof n!="function")throw new ti("Expected a function");return function(){var t=arguments;switch(t.length){case 0:return!n.call(this);case 1:return!n.call(this,t[0]);case 2:return!n.call(this,t[0],t[1]);case 3:return!n.call(this,t[0],t[1],t[2])}return!n.apply(this,t)}}function lu(n,t){return n===t||n!==n&&t!==t; -}function su(n){return null!=n&&gu(n.length)&&!_u(n)}function hu(n){return yu(n)&&su(n)}function pu(n){if(!yu(n))return false;var t=Ot(n);return"[object Error]"==t||"[object DOMException]"==t||typeof n.message=="string"&&typeof n.name=="string"&&!xu(n)}function _u(n){return!!du(n)&&(n=Ot(n),"[object Function]"==n||"[object GeneratorFunction]"==n||"[object AsyncFunction]"==n||"[object Proxy]"==n)}function vu(n){return typeof n=="number"&&n==Eu(n)}function gu(n){return typeof n=="number"&&-1=n; -}function du(n){var t=typeof n;return null!=n&&("object"==t||"function"==t)}function yu(n){return null!=n&&typeof n=="object"}function bu(n){return typeof n=="number"||yu(n)&&"[object Number]"==Ot(n)}function xu(n){return!(!yu(n)||"[object Object]"!=Ot(n))&&(n=di(n),null===n||(n=oi.call(n,"constructor")&&n.constructor,typeof n=="function"&&n instanceof n&&ii.call(n)==li))}function ju(n){return typeof n=="string"||!ff(n)&&yu(n)&&"[object String]"==Ot(n)}function wu(n){return typeof n=="symbol"||yu(n)&&"[object Symbol]"==Ot(n); -}function mu(n){if(!n)return[];if(su(n))return ju(n)?M(n):Ur(n);if(wi&&n[wi]){n=n[wi]();for(var t,r=[];!(t=n.next()).done;)r.push(t.value);return r}return t=vo(n),("[object Map]"==t?W:"[object Set]"==t?U:Uu)(n)}function Au(n){return n?(n=Su(n),n===$||n===-$?1.7976931348623157e308*(0>n?-1:1):n===n?n:0):0===n?n:0}function Eu(n){n=Au(n);var t=n%1;return n===n?t?n-t:n:0}function ku(n){return n?pt(Eu(n),0,4294967295):0}function Su(n){if(typeof n=="number")return n;if(wu(n))return F;if(du(n)&&(n=typeof n.valueOf=="function"?n.valueOf():n, -n=du(n)?n+"":n),typeof n!="string")return 0===n?n:+n;n=n.replace(un,"");var t=gn.test(n);return t||yn.test(n)?Dn(n.slice(2),t?2:8):vn.test(n)?F:+n}function Ou(n){return Cr(n,Bu(n))}function Iu(n){return null==n?"":yr(n)}function Ru(n,t,r){return n=null==n?T:kt(n,t),n===T?r:n}function zu(n,t){return null!=n&&we(n,t,zt)}function Wu(n){return su(n)?qn(n):Vt(n)}function Bu(n){if(su(n))n=qn(n,true);else if(du(n)){var t,r=ze(n),e=[];for(t in n)("constructor"!=t||!r&&oi.call(n,t))&&e.push(t);n=e}else{if(t=[], -null!=n)for(r in Qu(n))t.push(r);n=t}return n}function Lu(n,t){if(null==n)return{};var r=c(ve(n),function(n){return[n]});return t=ye(t),tr(n,r,function(n,r){return t(n,r[0])})}function Uu(n){return null==n?[]:S(n,Wu(n))}function Cu(n){return $f(Iu(n).toLowerCase())}function Du(n){return(n=Iu(n))&&n.replace(xn,Xn).replace(Sn,"")}function Mu(n,t,r){return n=Iu(n),t=r?T:t,t===T?zn.test(n)?n.match(In)||[]:n.match(sn)||[]:n.match(t)||[]}function Tu(n){return function(){return n}}function $u(n){return n; -}function Fu(n){return qt(typeof n=="function"?n:_t(n,1))}function Nu(n,t,e){var u=Wu(t),i=Et(t,u);null!=e||du(t)&&(i.length||!u.length)||(e=t,t=n,n=this,i=Et(t,Wu(t)));var o=!(du(e)&&"chain"in e&&!e.chain),f=_u(n);return r(i,function(r){var e=t[r];n[r]=e,f&&(n.prototype[r]=function(){var t=this.__chain__;if(o||t){var r=n(this.__wrapped__);return(r.__actions__=Ur(this.__actions__)).push({func:e,args:arguments,thisArg:n}),r.__chain__=t,r}return e.apply(n,a([this.value()],arguments))})}),n}function Pu(){} -function Zu(n){return Ie(n)?b(Me(n)):rr(n)}function qu(){return[]}function Vu(){return false}mn=null==mn?$n:rt.defaults($n.Object(),mn,rt.pick($n,Wn));var Ku=mn.Array,Gu=mn.Date,Hu=mn.Error,Ju=mn.Function,Yu=mn.Math,Qu=mn.Object,Xu=mn.RegExp,ni=mn.String,ti=mn.TypeError,ri=Ku.prototype,ei=Qu.prototype,ui=mn["__core-js_shared__"],ii=Ju.prototype.toString,oi=ei.hasOwnProperty,fi=0,ci=function(){var n=/[^.]+$/.exec(ui&&ui.keys&&ui.keys.IE_PROTO||"");return n?"Symbol(src)_1."+n:""}(),ai=ei.toString,li=ii.call(Qu),si=$n._,hi=Xu("^"+ii.call(oi).replace(rn,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),pi=Pn?mn.Buffer:T,_i=mn.Symbol,vi=mn.Uint8Array,gi=pi?pi.g:T,di=B(Qu.getPrototypeOf,Qu),yi=Qu.create,bi=ei.propertyIsEnumerable,xi=ri.splice,ji=_i?_i.isConcatSpreadable:T,wi=_i?_i.iterator:T,mi=_i?_i.toStringTag:T,Ai=function(){ -try{var n=je(Qu,"defineProperty");return n({},"",{}),n}catch(n){}}(),Ei=mn.clearTimeout!==$n.clearTimeout&&mn.clearTimeout,ki=Gu&&Gu.now!==$n.Date.now&&Gu.now,Si=mn.setTimeout!==$n.setTimeout&&mn.setTimeout,Oi=Yu.ceil,Ii=Yu.floor,Ri=Qu.getOwnPropertySymbols,zi=pi?pi.isBuffer:T,Wi=mn.isFinite,Bi=ri.join,Li=B(Qu.keys,Qu),Ui=Yu.max,Ci=Yu.min,Di=Gu.now,Mi=mn.parseInt,Ti=Yu.random,$i=ri.reverse,Fi=je(mn,"DataView"),Ni=je(mn,"Map"),Pi=je(mn,"Promise"),Zi=je(mn,"Set"),qi=je(mn,"WeakMap"),Vi=je(Qu,"create"),Ki=qi&&new qi,Gi={},Hi=Te(Fi),Ji=Te(Ni),Yi=Te(Pi),Qi=Te(Zi),Xi=Te(qi),no=_i?_i.prototype:T,to=no?no.valueOf:T,ro=no?no.toString:T,eo=function(){ -function n(){}return function(t){return du(t)?yi?yi(t):(n.prototype=t,t=new n,n.prototype=T,t):{}}}();An.templateSettings={escape:J,evaluate:Y,interpolate:Q,variable:"",imports:{_:An}},An.prototype=En.prototype,An.prototype.constructor=An,On.prototype=eo(En.prototype),On.prototype.constructor=On,Un.prototype=eo(En.prototype),Un.prototype.constructor=Un,Mn.prototype.clear=function(){this.__data__=Vi?Vi(null):{},this.size=0},Mn.prototype.delete=function(n){return n=this.has(n)&&delete this.__data__[n], -this.size-=n?1:0,n},Mn.prototype.get=function(n){var t=this.__data__;return Vi?(n=t[n],"__lodash_hash_undefined__"===n?T:n):oi.call(t,n)?t[n]:T},Mn.prototype.has=function(n){var t=this.__data__;return Vi?t[n]!==T:oi.call(t,n)},Mn.prototype.set=function(n,t){var r=this.__data__;return this.size+=this.has(n)?0:1,r[n]=Vi&&t===T?"__lodash_hash_undefined__":t,this},Tn.prototype.clear=function(){this.__data__=[],this.size=0},Tn.prototype.delete=function(n){var t=this.__data__;return n=ft(t,n),!(0>n)&&(n==t.length-1?t.pop():xi.call(t,n,1), ---this.size,true)},Tn.prototype.get=function(n){var t=this.__data__;return n=ft(t,n),0>n?T:t[n][1]},Tn.prototype.has=function(n){return-1e?(++this.size,r.push([n,t])):r[e][1]=t,this},Fn.prototype.clear=function(){this.size=0,this.__data__={hash:new Mn,map:new(Ni||Tn),string:new Mn}},Fn.prototype.delete=function(n){return n=be(this,n).delete(n),this.size-=n?1:0,n},Fn.prototype.get=function(n){return be(this,n).get(n); -},Fn.prototype.has=function(n){return be(this,n).has(n)},Fn.prototype.set=function(n,t){var r=be(this,n),e=r.size;return r.set(n,t),this.size+=r.size==e?0:1,this},Nn.prototype.add=Nn.prototype.push=function(n){return this.__data__.set(n,"__lodash_hash_undefined__"),this},Nn.prototype.has=function(n){return this.__data__.has(n)},Zn.prototype.clear=function(){this.__data__=new Tn,this.size=0},Zn.prototype.delete=function(n){var t=this.__data__;return n=t.delete(n),this.size=t.size,n},Zn.prototype.get=function(n){ -return this.__data__.get(n)},Zn.prototype.has=function(n){return this.__data__.has(n)},Zn.prototype.set=function(n,t){var r=this.__data__;if(r instanceof Tn){var e=r.__data__;if(!Ni||199>e.length)return e.push([n,t]),this.size=++r.size,this;r=this.__data__=new Fn(e)}return r.set(n,t),this.size=r.size,this};var uo=Fr(mt),io=Fr(At,true),oo=Nr(),fo=Nr(true),co=Ki?function(n,t){return Ki.set(n,t),n}:$u,ao=Ai?function(n,t){return Ai(n,"toString",{configurable:true,enumerable:false,value:Tu(t),writable:true})}:$u,lo=Ei||function(n){ -return $n.clearTimeout(n)},so=Zi&&1/U(new Zi([,-0]))[1]==$?function(n){return new Zi(n)}:Pu,ho=Ki?function(n){return Ki.get(n)}:Pu,po=Ri?function(n){return null==n?[]:(n=Qu(n),i(Ri(n),function(t){return bi.call(n,t)}))}:qu,_o=Ri?function(n){for(var t=[];n;)a(t,po(n)),n=di(n);return t}:qu,vo=Ot;(Fi&&"[object DataView]"!=vo(new Fi(new ArrayBuffer(1)))||Ni&&"[object Map]"!=vo(new Ni)||Pi&&"[object Promise]"!=vo(Pi.resolve())||Zi&&"[object Set]"!=vo(new Zi)||qi&&"[object WeakMap]"!=vo(new qi))&&(vo=function(n){ -var t=Ot(n);if(n=(n="[object Object]"==t?n.constructor:T)?Te(n):"")switch(n){case Hi:return"[object DataView]";case Ji:return"[object Map]";case Yi:return"[object Promise]";case Qi:return"[object Set]";case Xi:return"[object WeakMap]"}return t});var go=ui?_u:Vu,yo=Ce(co),bo=Si||function(n,t){return $n.setTimeout(n,t)},xo=Ce(ao),jo=function(n){n=cu(n,function(n){return 500===t.size&&t.clear(),n});var t=n.cache;return n}(function(n){var t=[];return 46===n.charCodeAt(0)&&t.push(""),n.replace(tn,function(n,r,e,u){ -t.push(e?u.replace(hn,"$1"):r||n)}),t}),wo=fr(function(n,t){return hu(n)?yt(n,wt(t,1,hu,true)):[]}),mo=fr(function(n,t){var r=Ve(t);return hu(r)&&(r=T),hu(n)?yt(n,wt(t,1,hu,true),ye(r,2)):[]}),Ao=fr(function(n,t){var r=Ve(t);return hu(r)&&(r=T),hu(n)?yt(n,wt(t,1,hu,true),T,r):[]}),Eo=fr(function(n){var t=c(n,Er);return t.length&&t[0]===n[0]?Wt(t):[]}),ko=fr(function(n){var t=Ve(n),r=c(n,Er);return t===Ve(r)?t=T:r.pop(),r.length&&r[0]===n[0]?Wt(r,ye(t,2)):[]}),So=fr(function(n){var t=Ve(n),r=c(n,Er);return(t=typeof t=="function"?t:T)&&r.pop(), -r.length&&r[0]===n[0]?Wt(r,T,t):[]}),Oo=fr(Ke),Io=pe(function(n,t){var r=null==n?0:n.length,e=ht(n,t);return ur(n,c(t,function(n){return Se(n,r)?+n:n}).sort(Wr)),e}),Ro=fr(function(n){return br(wt(n,1,hu,true))}),zo=fr(function(n){var t=Ve(n);return hu(t)&&(t=T),br(wt(n,1,hu,true),ye(t,2))}),Wo=fr(function(n){var t=Ve(n),t=typeof t=="function"?t:T;return br(wt(n,1,hu,true),T,t)}),Bo=fr(function(n,t){return hu(n)?yt(n,t):[]}),Lo=fr(function(n){return mr(i(n,hu))}),Uo=fr(function(n){var t=Ve(n);return hu(t)&&(t=T), -mr(i(n,hu),ye(t,2))}),Co=fr(function(n){var t=Ve(n),t=typeof t=="function"?t:T;return mr(i(n,hu),T,t)}),Do=fr(He),Mo=fr(function(n){var t=n.length,t=1=t}),of=Ut(function(){return arguments}())?Ut:function(n){return yu(n)&&oi.call(n,"callee")&&!bi.call(n,"callee")},ff=Ku.isArray,cf=Vn?k(Vn):Ct,af=zi||Vu,lf=Kn?k(Kn):Dt,sf=Gn?k(Gn):Tt,hf=Hn?k(Hn):Nt,pf=Jn?k(Jn):Pt,_f=Yn?k(Yn):Zt,vf=ee(Kt),gf=ee(function(n,t){return n<=t}),df=$r(function(n,t){ -if(ze(t)||su(t))Cr(t,Wu(t),n);else for(var r in t)oi.call(t,r)&&ot(n,r,t[r])}),yf=$r(function(n,t){Cr(t,Bu(t),n)}),bf=$r(function(n,t,r,e){Cr(t,Bu(t),n,e)}),xf=$r(function(n,t,r,e){Cr(t,Wu(t),n,e)}),jf=pe(ht),wf=fr(function(n,t){n=Qu(n);var r=-1,e=t.length,u=2--n)return t.apply(this,arguments)}},An.ary=eu,An.assign=df,An.assignIn=yf,An.assignInWith=bf,An.assignWith=xf,An.at=jf,An.before=uu,An.bind=Ho,An.bindAll=Nf,An.bindKey=Jo,An.castArray=function(){if(!arguments.length)return[];var n=arguments[0];return ff(n)?n:[n]},An.chain=Ye,An.chunk=function(n,t,r){if(t=(r?Oe(n,t,r):t===T)?1:Ui(Eu(t),0),r=null==n?0:n.length,!r||1>t)return[];for(var e=0,u=0,i=Ku(Oi(r/t));et?0:t,e)):[]},An.dropRight=function(n,t,r){var e=null==n?0:n.length;return e?(t=r||t===T?1:Eu(t),t=e-t,hr(n,0,0>t?0:t)):[]},An.dropRightWhile=function(n,t){return n&&n.length?jr(n,ye(t,3),true,true):[]; -},An.dropWhile=function(n,t){return n&&n.length?jr(n,ye(t,3),true):[]},An.fill=function(n,t,r,e){var u=null==n?0:n.length;if(!u)return[];for(r&&typeof r!="number"&&Oe(n,t,r)&&(r=0,e=u),u=n.length,r=Eu(r),0>r&&(r=-r>u?0:u+r),e=e===T||e>u?u:Eu(e),0>e&&(e+=u),e=r>e?0:ku(e);r>>0,r?(n=Iu(n))&&(typeof t=="string"||null!=t&&!hf(t))&&(t=yr(t),!t&&Rn.test(n))?Or(M(n),0,r):n.split(t,r):[]},An.spread=function(t,r){if(typeof t!="function")throw new ti("Expected a function");return r=null==r?0:Ui(Eu(r),0), -fr(function(e){var u=e[r];return e=Or(e,0,r),u&&a(e,u),n(t,this,e)})},An.tail=function(n){var t=null==n?0:n.length;return t?hr(n,1,t):[]},An.take=function(n,t,r){return n&&n.length?(t=r||t===T?1:Eu(t),hr(n,0,0>t?0:t)):[]},An.takeRight=function(n,t,r){var e=null==n?0:n.length;return e?(t=r||t===T?1:Eu(t),t=e-t,hr(n,0>t?0:t,e)):[]},An.takeRightWhile=function(n,t){return n&&n.length?jr(n,ye(t,3),false,true):[]},An.takeWhile=function(n,t){return n&&n.length?jr(n,ye(t,3)):[]},An.tap=function(n,t){return t(n), -n},An.throttle=function(n,t,r){var e=true,u=true;if(typeof n!="function")throw new ti("Expected a function");return du(r)&&(e="leading"in r?!!r.leading:e,u="trailing"in r?!!r.trailing:u),fu(n,t,{leading:e,maxWait:t,trailing:u})},An.thru=Qe,An.toArray=mu,An.toPairs=zf,An.toPairsIn=Wf,An.toPath=function(n){return ff(n)?c(n,Me):wu(n)?[n]:Ur(jo(Iu(n)))},An.toPlainObject=Ou,An.transform=function(n,t,e){var u=ff(n),i=u||af(n)||_f(n);if(t=ye(t,4),null==e){var o=n&&n.constructor;e=i?u?new o:[]:du(n)&&_u(o)?eo(di(n)):{}; -}return(i?r:mt)(n,function(n,r,u){return t(e,n,r,u)}),e},An.unary=function(n){return eu(n,1)},An.union=Ro,An.unionBy=zo,An.unionWith=Wo,An.uniq=function(n){return n&&n.length?br(n):[]},An.uniqBy=function(n,t){return n&&n.length?br(n,ye(t,2)):[]},An.uniqWith=function(n,t){return t=typeof t=="function"?t:T,n&&n.length?br(n,T,t):[]},An.unset=function(n,t){return null==n||xr(n,t)},An.unzip=He,An.unzipWith=Je,An.update=function(n,t,r){return null==n?n:lr(n,t,kr(r)(kt(n,t)),void 0)},An.updateWith=function(n,t,r,e){ -return e=typeof e=="function"?e:T,null!=n&&(n=lr(n,t,kr(r)(kt(n,t)),e)),n},An.values=Uu,An.valuesIn=function(n){return null==n?[]:S(n,Bu(n))},An.without=Bo,An.words=Mu,An.wrap=function(n,t){return nf(kr(t),n)},An.xor=Lo,An.xorBy=Uo,An.xorWith=Co,An.zip=Do,An.zipObject=function(n,t){return Ar(n||[],t||[],ot)},An.zipObjectDeep=function(n,t){return Ar(n||[],t||[],lr)},An.zipWith=Mo,An.entries=zf,An.entriesIn=Wf,An.extend=yf,An.extendWith=bf,Nu(An,An),An.add=Qf,An.attempt=Ff,An.camelCase=Bf,An.capitalize=Cu, -An.ceil=Xf,An.clamp=function(n,t,r){return r===T&&(r=t,t=T),r!==T&&(r=Su(r),r=r===r?r:0),t!==T&&(t=Su(t),t=t===t?t:0),pt(Su(n),t,r)},An.clone=function(n){return _t(n,4)},An.cloneDeep=function(n){return _t(n,5)},An.cloneDeepWith=function(n,t){return t=typeof t=="function"?t:T,_t(n,5,t)},An.cloneWith=function(n,t){return t=typeof t=="function"?t:T,_t(n,4,t)},An.conformsTo=function(n,t){return null==t||gt(n,t,Wu(t))},An.deburr=Du,An.defaultTo=function(n,t){return null==n||n!==n?t:n},An.divide=nc,An.endsWith=function(n,t,r){ -n=Iu(n),t=yr(t);var e=n.length,e=r=r===T?e:pt(Eu(r),0,e);return r-=t.length,0<=r&&n.slice(r,e)==t},An.eq=lu,An.escape=function(n){return(n=Iu(n))&&H.test(n)?n.replace(K,nt):n},An.escapeRegExp=function(n){return(n=Iu(n))&&en.test(n)?n.replace(rn,"\\$&"):n},An.every=function(n,t,r){var e=ff(n)?u:bt;return r&&Oe(n,t,r)&&(t=T),e(n,ye(t,3))},An.find=Fo,An.findIndex=Ne,An.findKey=function(n,t){return p(n,ye(t,3),mt)},An.findLast=No,An.findLastIndex=Pe,An.findLastKey=function(n,t){return p(n,ye(t,3),At); -},An.floor=tc,An.forEach=nu,An.forEachRight=tu,An.forIn=function(n,t){return null==n?n:oo(n,ye(t,3),Bu)},An.forInRight=function(n,t){return null==n?n:fo(n,ye(t,3),Bu)},An.forOwn=function(n,t){return n&&mt(n,ye(t,3))},An.forOwnRight=function(n,t){return n&&At(n,ye(t,3))},An.get=Ru,An.gt=ef,An.gte=uf,An.has=function(n,t){return null!=n&&we(n,t,Rt)},An.hasIn=zu,An.head=qe,An.identity=$u,An.includes=function(n,t,r,e){return n=su(n)?n:Uu(n),r=r&&!e?Eu(r):0,e=n.length,0>r&&(r=Ui(e+r,0)),ju(n)?r<=e&&-1r&&(r=Ui(e+r,0)),v(n,t,r)):-1},An.inRange=function(n,t,r){return t=Au(t),r===T?(r=t,t=0):r=Au(r),n=Su(n),n>=Ci(t,r)&&n=n},An.isSet=pf,An.isString=ju,An.isSymbol=wu,An.isTypedArray=_f,An.isUndefined=function(n){return n===T},An.isWeakMap=function(n){return yu(n)&&"[object WeakMap]"==vo(n)},An.isWeakSet=function(n){return yu(n)&&"[object WeakSet]"==Ot(n)},An.join=function(n,t){return null==n?"":Bi.call(n,t)},An.kebabCase=Lf,An.last=Ve,An.lastIndexOf=function(n,t,r){var e=null==n?0:n.length;if(!e)return-1;var u=e;if(r!==T&&(u=Eu(r),u=0>u?Ui(e+u,0):Ci(u,e-1)), -t===t){for(r=u+1;r--&&n[r]!==t;);n=r}else n=_(n,d,u,true);return n},An.lowerCase=Uf,An.lowerFirst=Cf,An.lt=vf,An.lte=gf,An.max=function(n){return n&&n.length?xt(n,$u,It):T},An.maxBy=function(n,t){return n&&n.length?xt(n,ye(t,2),It):T},An.mean=function(n){return y(n,$u)},An.meanBy=function(n,t){return y(n,ye(t,2))},An.min=function(n){return n&&n.length?xt(n,$u,Kt):T},An.minBy=function(n,t){return n&&n.length?xt(n,ye(t,2),Kt):T},An.stubArray=qu,An.stubFalse=Vu,An.stubObject=function(){return{}},An.stubString=function(){ -return""},An.stubTrue=function(){return true},An.multiply=rc,An.nth=function(n,t){return n&&n.length?Qt(n,Eu(t)):T},An.noConflict=function(){return $n._===this&&($n._=si),this},An.noop=Pu,An.now=Go,An.pad=function(n,t,r){n=Iu(n);var e=(t=Eu(t))?D(n):0;return!t||e>=t?n:(t=(t-e)/2,ne(Ii(t),r)+n+ne(Oi(t),r))},An.padEnd=function(n,t,r){n=Iu(n);var e=(t=Eu(t))?D(n):0;return t&&et){var e=n;n=t,t=e}return r||n%1||t%1?(r=Ti(),Ci(n+r*(t-n+Cn("1e-"+((r+"").length-1))),t)):ir(n,t)},An.reduce=function(n,t,r){var e=ff(n)?l:j,u=3>arguments.length;return e(n,ye(t,4),r,u,uo)},An.reduceRight=function(n,t,r){var e=ff(n)?s:j,u=3>arguments.length; -return e(n,ye(t,4),r,u,io)},An.repeat=function(n,t,r){return t=(r?Oe(n,t,r):t===T)?1:Eu(t),or(Iu(n),t)},An.replace=function(){var n=arguments,t=Iu(n[0]);return 3>n.length?t:t.replace(n[1],n[2])},An.result=function(n,t,r){t=Sr(t,n);var e=-1,u=t.length;for(u||(u=1,n=T);++en||9007199254740991=i)return n;if(i=r-D(e),1>i)return e;if(r=o?Or(o,0,i).join(""):n.slice(0,i),u===T)return r+e;if(o&&(i+=r.length-i),hf(u)){if(n.slice(i).search(u)){ -var f=r;for(u.global||(u=Xu(u.source,Iu(_n.exec(u))+"g")),u.lastIndex=0;o=u.exec(f);)var c=o.index;r=r.slice(0,c===T?i:c)}}else n.indexOf(yr(u),i)!=i&&(u=r.lastIndexOf(u),-1e.__dir__?"Right":"")}),e},Un.prototype[n+"Right"]=function(t){return this.reverse()[n](t).reverse()}}),r(["filter","map","takeWhile"],function(n,t){ -var r=t+1,e=1==r||3==r;Un.prototype[n]=function(n){var t=this.clone();return t.__iteratees__.push({iteratee:ye(n,3),type:r}),t.__filtered__=t.__filtered__||e,t}}),r(["head","last"],function(n,t){var r="take"+(t?"Right":"");Un.prototype[n]=function(){return this[r](1).value()[0]}}),r(["initial","tail"],function(n,t){var r="drop"+(t?"":"Right");Un.prototype[n]=function(){return this.__filtered__?new Un(this):this[r](1)}}),Un.prototype.compact=function(){return this.filter($u)},Un.prototype.find=function(n){ -return this.filter(n).head()},Un.prototype.findLast=function(n){return this.reverse().find(n)},Un.prototype.invokeMap=fr(function(n,t){return typeof n=="function"?new Un(this):this.map(function(r){return Lt(r,n,t)})}),Un.prototype.reject=function(n){return this.filter(au(ye(n)))},Un.prototype.slice=function(n,t){n=Eu(n);var r=this;return r.__filtered__&&(0t)?new Un(r):(0>n?r=r.takeRight(-n):n&&(r=r.drop(n)),t!==T&&(t=Eu(t),r=0>t?r.dropRight(-t):r.take(t-n)),r)},Un.prototype.takeRightWhile=function(n){ -return this.reverse().takeWhile(n).reverse()},Un.prototype.toArray=function(){return this.take(4294967295)},mt(Un.prototype,function(n,t){var r=/^(?:filter|find|map|reject)|While$/.test(t),e=/^(?:head|last)$/.test(t),u=An[e?"take"+("last"==t?"Right":""):t],i=e||/^find/.test(t);u&&(An.prototype[t]=function(){function t(n){return n=u.apply(An,a([n],f)),e&&h?n[0]:n}var o=this.__wrapped__,f=e?[1]:arguments,c=o instanceof Un,l=f[0],s=c||ff(o);s&&r&&typeof l=="function"&&1!=l.length&&(c=s=false);var h=this.__chain__,p=!!this.__actions__.length,l=i&&!h,c=c&&!p; -return!i&&s?(o=c?o:new Un(this),o=n.apply(o,f),o.__actions__.push({func:Qe,args:[t],thisArg:T}),new On(o,h)):l&&c?n.apply(this,f):(o=this.thru(t),l?e?o.value()[0]:o.value():o)})}),r("pop push shift sort splice unshift".split(" "),function(n){var t=ri[n],r=/^(?:push|sort|unshift)$/.test(n)?"tap":"thru",e=/^(?:pop|shift)$/.test(n);An.prototype[n]=function(){var n=arguments;if(e&&!this.__chain__){var u=this.value();return t.apply(ff(u)?u:[],n)}return this[r](function(r){return t.apply(ff(r)?r:[],n)}); -}}),mt(Un.prototype,function(n,t){var r=An[t];if(r){var e=r.name+"";oi.call(Gi,e)||(Gi[e]=[]),Gi[e].push({name:t,func:r})}}),Gi[Jr(T,2).name]=[{name:"wrapper",func:T}],Un.prototype.clone=function(){var n=new Un(this.__wrapped__);return n.__actions__=Ur(this.__actions__),n.__dir__=this.__dir__,n.__filtered__=this.__filtered__,n.__iteratees__=Ur(this.__iteratees__),n.__takeCount__=this.__takeCount__,n.__views__=Ur(this.__views__),n},Un.prototype.reverse=function(){if(this.__filtered__){var n=new Un(this); -n.__dir__=-1,n.__filtered__=true}else n=this.clone(),n.__dir__*=-1;return n},Un.prototype.value=function(){var n,t=this.__wrapped__.value(),r=this.__dir__,e=ff(t),u=0>r,i=e?t.length:0;n=i;for(var o=this.__views__,f=0,c=-1,a=o.length;++c=this.__values__.length;return{done:n,value:n?T:this.__values__[this.__index__++]}},An.prototype.plant=function(n){ -for(var t,r=this;r instanceof En;){var e=Fe(r);e.__index__=0,e.__values__=T,t?u.__wrapped__=e:t=e;var u=e,r=r.__wrapped__}return u.__wrapped__=n,t},An.prototype.reverse=function(){var n=this.__wrapped__;return n instanceof Un?(this.__actions__.length&&(n=new Un(this)),n=n.reverse(),n.__actions__.push({func:Qe,args:[Ge],thisArg:T}),new On(n,this.__chain__)):this.thru(Ge)},An.prototype.toJSON=An.prototype.valueOf=An.prototype.value=function(){return wr(this.__wrapped__,this.__actions__)},An.prototype.first=An.prototype.head, -wi&&(An.prototype[wi]=Xe),An}();typeof define=="function"&&typeof define.amd=="object"&&define.amd?($n._=rt, define(function(){return rt})):Nn?((Nn.exports=rt)._=rt,Fn._=rt):$n._=rt}).call(this); \ No newline at end of file +(function(){function n(n,t,r){switch(r.length){case 0:return n.call(t);case 1:return n.call(t,r[0]);case 2:return n.call(t,r[0],r[1]);case 3:return n.call(t,r[0],r[1],r[2])}return n.apply(t,r)}function t(n,t,r,e){for(var u=-1,i=null==n?0:n.length;++u-1}function f(n,t,r){for(var e=-1,u=null==n?0:n.length;++e-1;);return r}function W(n,t){for(var r=n.length;r--&&y(t,n[r],0)>-1;);return r}function L(n,t){for(var r=n.length,e=0;r--;)n[r]===t&&++e;return e}function C(n){return"\\"+Gr[n]}function U(n,t){ +return null==n?Y:n[t]}function B(n){return Dr.test(n)}function T(n){return Mr.test(n)}function $(n){for(var t,r=[];!(t=n.next()).done;)r.push(t.value);return r}function D(n){var t=-1,r=Array(n.size);return n.forEach(function(n,e){r[++t]=[e,n]}),r}function M(n,t){return function(r){return n(t(r))}}function F(n,t){for(var r=-1,e=n.length,u=0,i=[];++r>>1,Un=[["ary",dn],["bind",sn],["bindKey",hn],["curry",_n],["curryRight",vn],["flip",wn],["partial",gn],["partialRight",yn],["rearg",bn]],Bn="[object Arguments]",Tn="[object Array]",$n="[object AsyncFunction]",Dn="[object Boolean]",Mn="[object Date]",Fn="[object DOMException]",Nn="[object Error]",Pn="[object Function]",qn="[object GeneratorFunction]",Zn="[object Map]",Kn="[object Number]",Vn="[object Null]",Gn="[object Object]",Hn="[object Promise]",Jn="[object Proxy]",Yn="[object RegExp]",Qn="[object Set]",Xn="[object String]",nt="[object Symbol]",tt="[object Undefined]",rt="[object WeakMap]",et="[object WeakSet]",ut="[object ArrayBuffer]",it="[object DataView]",ot="[object Float32Array]",ft="[object Float64Array]",ct="[object Int8Array]",at="[object Int16Array]",lt="[object Int32Array]",st="[object Uint8Array]",ht="[object Uint8ClampedArray]",pt="[object Uint16Array]",_t="[object Uint32Array]",vt=/\b__p \+= '';/g,gt=/\b(__p \+=) '' \+/g,yt=/(__e\(.*?\)|\b__t\)) \+\n'';/g,dt=/&(?:amp|lt|gt|quot|#39);/g,bt=/[&<>"']/g,wt=RegExp(dt.source),mt=RegExp(bt.source),xt=/<%-([\s\S]+?)%>/g,jt=/<%([\s\S]+?)%>/g,At=/<%=([\s\S]+?)%>/g,kt=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Ot=/^\w*$/,It=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Rt=/[\\^$.*+?()[\]{}|]/g,zt=RegExp(Rt.source),Et=/^\s+|\s+$/g,St=/^\s+/,Wt=/\s+$/,Lt=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,Ct=/\{\n\/\* \[wrapped with (.+)\] \*/,Ut=/,? & /,Bt=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,Tt=/\\(\\)?/g,$t=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,Dt=/\w*$/,Mt=/^[-+]0x[0-9a-f]+$/i,Ft=/^0b[01]+$/i,Nt=/^\[object .+?Constructor\]$/,Pt=/^0o[0-7]+$/i,qt=/^(?:0|[1-9]\d*)$/,Zt=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Kt=/($^)/,Vt=/['\n\r\u2028\u2029\\]/g,Gt="\\ud800-\\udfff",Ht="\\u0300-\\u036f",Jt="\\ufe20-\\ufe2f",Yt="\\u20d0-\\u20ff",Qt=Ht+Jt+Yt,Xt="\\u2700-\\u27bf",nr="a-z\\xdf-\\xf6\\xf8-\\xff",tr="\\xac\\xb1\\xd7\\xf7",rr="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",er="\\u2000-\\u206f",ur=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",ir="A-Z\\xc0-\\xd6\\xd8-\\xde",or="\\ufe0e\\ufe0f",fr=tr+rr+er+ur,cr="['\u2019]",ar="["+Gt+"]",lr="["+fr+"]",sr="["+Qt+"]",hr="\\d+",pr="["+Xt+"]",_r="["+nr+"]",vr="[^"+Gt+fr+hr+Xt+nr+ir+"]",gr="\\ud83c[\\udffb-\\udfff]",yr="(?:"+sr+"|"+gr+")",dr="[^"+Gt+"]",br="(?:\\ud83c[\\udde6-\\uddff]){2}",wr="[\\ud800-\\udbff][\\udc00-\\udfff]",mr="["+ir+"]",xr="\\u200d",jr="(?:"+_r+"|"+vr+")",Ar="(?:"+mr+"|"+vr+")",kr="(?:"+cr+"(?:d|ll|m|re|s|t|ve))?",Or="(?:"+cr+"(?:D|LL|M|RE|S|T|VE))?",Ir=yr+"?",Rr="["+or+"]?",zr="(?:"+xr+"(?:"+[dr,br,wr].join("|")+")"+Rr+Ir+")*",Er="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Sr="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",Wr=Rr+Ir+zr,Lr="(?:"+[pr,br,wr].join("|")+")"+Wr,Cr="(?:"+[dr+sr+"?",sr,br,wr,ar].join("|")+")",Ur=RegExp(cr,"g"),Br=RegExp(sr,"g"),Tr=RegExp(gr+"(?="+gr+")|"+Cr+Wr,"g"),$r=RegExp([mr+"?"+_r+"+"+kr+"(?="+[lr,mr,"$"].join("|")+")",Ar+"+"+Or+"(?="+[lr,mr+jr,"$"].join("|")+")",mr+"?"+jr+"+"+kr,mr+"+"+Or,Sr,Er,hr,Lr].join("|"),"g"),Dr=RegExp("["+xr+Gt+Qt+or+"]"),Mr=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,Fr=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],Nr=-1,Pr={}; +Pr[ot]=Pr[ft]=Pr[ct]=Pr[at]=Pr[lt]=Pr[st]=Pr[ht]=Pr[pt]=Pr[_t]=!0,Pr[Bn]=Pr[Tn]=Pr[ut]=Pr[Dn]=Pr[it]=Pr[Mn]=Pr[Nn]=Pr[Pn]=Pr[Zn]=Pr[Kn]=Pr[Gn]=Pr[Yn]=Pr[Qn]=Pr[Xn]=Pr[rt]=!1;var qr={};qr[Bn]=qr[Tn]=qr[ut]=qr[it]=qr[Dn]=qr[Mn]=qr[ot]=qr[ft]=qr[ct]=qr[at]=qr[lt]=qr[Zn]=qr[Kn]=qr[Gn]=qr[Yn]=qr[Qn]=qr[Xn]=qr[nt]=qr[st]=qr[ht]=qr[pt]=qr[_t]=!0,qr[Nn]=qr[Pn]=qr[rt]=!1;var Zr={"\xc0":"A","\xc1":"A","\xc2":"A","\xc3":"A","\xc4":"A","\xc5":"A","\xe0":"a","\xe1":"a","\xe2":"a","\xe3":"a","\xe4":"a","\xe5":"a", +"\xc7":"C","\xe7":"c","\xd0":"D","\xf0":"d","\xc8":"E","\xc9":"E","\xca":"E","\xcb":"E","\xe8":"e","\xe9":"e","\xea":"e","\xeb":"e","\xcc":"I","\xcd":"I","\xce":"I","\xcf":"I","\xec":"i","\xed":"i","\xee":"i","\xef":"i","\xd1":"N","\xf1":"n","\xd2":"O","\xd3":"O","\xd4":"O","\xd5":"O","\xd6":"O","\xd8":"O","\xf2":"o","\xf3":"o","\xf4":"o","\xf5":"o","\xf6":"o","\xf8":"o","\xd9":"U","\xda":"U","\xdb":"U","\xdc":"U","\xf9":"u","\xfa":"u","\xfb":"u","\xfc":"u","\xdd":"Y","\xfd":"y","\xff":"y","\xc6":"Ae", +"\xe6":"ae","\xde":"Th","\xfe":"th","\xdf":"ss","\u0100":"A","\u0102":"A","\u0104":"A","\u0101":"a","\u0103":"a","\u0105":"a","\u0106":"C","\u0108":"C","\u010a":"C","\u010c":"C","\u0107":"c","\u0109":"c","\u010b":"c","\u010d":"c","\u010e":"D","\u0110":"D","\u010f":"d","\u0111":"d","\u0112":"E","\u0114":"E","\u0116":"E","\u0118":"E","\u011a":"E","\u0113":"e","\u0115":"e","\u0117":"e","\u0119":"e","\u011b":"e","\u011c":"G","\u011e":"G","\u0120":"G","\u0122":"G","\u011d":"g","\u011f":"g","\u0121":"g", +"\u0123":"g","\u0124":"H","\u0126":"H","\u0125":"h","\u0127":"h","\u0128":"I","\u012a":"I","\u012c":"I","\u012e":"I","\u0130":"I","\u0129":"i","\u012b":"i","\u012d":"i","\u012f":"i","\u0131":"i","\u0134":"J","\u0135":"j","\u0136":"K","\u0137":"k","\u0138":"k","\u0139":"L","\u013b":"L","\u013d":"L","\u013f":"L","\u0141":"L","\u013a":"l","\u013c":"l","\u013e":"l","\u0140":"l","\u0142":"l","\u0143":"N","\u0145":"N","\u0147":"N","\u014a":"N","\u0144":"n","\u0146":"n","\u0148":"n","\u014b":"n","\u014c":"O", +"\u014e":"O","\u0150":"O","\u014d":"o","\u014f":"o","\u0151":"o","\u0154":"R","\u0156":"R","\u0158":"R","\u0155":"r","\u0157":"r","\u0159":"r","\u015a":"S","\u015c":"S","\u015e":"S","\u0160":"S","\u015b":"s","\u015d":"s","\u015f":"s","\u0161":"s","\u0162":"T","\u0164":"T","\u0166":"T","\u0163":"t","\u0165":"t","\u0167":"t","\u0168":"U","\u016a":"U","\u016c":"U","\u016e":"U","\u0170":"U","\u0172":"U","\u0169":"u","\u016b":"u","\u016d":"u","\u016f":"u","\u0171":"u","\u0173":"u","\u0174":"W","\u0175":"w", +"\u0176":"Y","\u0177":"y","\u0178":"Y","\u0179":"Z","\u017b":"Z","\u017d":"Z","\u017a":"z","\u017c":"z","\u017e":"z","\u0132":"IJ","\u0133":"ij","\u0152":"Oe","\u0153":"oe","\u0149":"'n","\u017f":"s"},Kr={"&":"&","<":"<",">":">",'"':""","'":"'"},Vr={"&":"&","<":"<",">":">",""":'"',"'":"'"},Gr={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},Hr=parseFloat,Jr=parseInt,Yr="object"==typeof global&&global&&global.Object===Object&&global,Qr="object"==typeof self&&self&&self.Object===Object&&self,Xr=Yr||Qr||Function("return this")(),ne="object"==typeof exports&&exports&&!exports.nodeType&&exports,te=ne&&"object"==typeof module&&module&&!module.nodeType&&module,re=te&&te.exports===ne,ee=re&&Yr.process,ue=function(){ +try{var n=te&&te.require&&te.require("util").types;return n?n:ee&&ee.binding&&ee.binding("util")}catch(n){}}(),ie=ue&&ue.isArrayBuffer,oe=ue&&ue.isDate,fe=ue&&ue.isMap,ce=ue&&ue.isRegExp,ae=ue&&ue.isSet,le=ue&&ue.isTypedArray,se=m("length"),he=x(Zr),pe=x(Kr),_e=x(Vr),ve=function p(x){function q(n){if(oc(n)&&!yh(n)&&!(n instanceof Bt)){if(n instanceof H)return n;if(yl.call(n,"__wrapped__"))return to(n)}return new H(n)}function G(){}function H(n,t){this.__wrapped__=n,this.__actions__=[],this.__chain__=!!t, +this.__index__=0,this.__values__=Y}function Bt(n){this.__wrapped__=n,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=Wn,this.__views__=[]}function Gt(){var n=new Bt(this.__wrapped__);return n.__actions__=Uu(this.__actions__),n.__dir__=this.__dir__,n.__filtered__=this.__filtered__,n.__iteratees__=Uu(this.__iteratees__),n.__takeCount__=this.__takeCount__,n.__views__=Uu(this.__views__),n}function Ht(){if(this.__filtered__){var n=new Bt(this);n.__dir__=-1, +n.__filtered__=!0}else n=this.clone(),n.__dir__*=-1;return n}function Jt(){var n=this.__wrapped__.value(),t=this.__dir__,r=yh(n),e=t<0,u=r?n.length:0,i=Ai(0,u,this.__views__),o=i.start,f=i.end,c=f-o,a=e?f:o-1,l=this.__iteratees__,s=l.length,h=0,p=Vl(c,this.__takeCount__);if(!r||!e&&u==c&&p==c)return du(n,this.__actions__);var _=[];n:for(;c--&&h-1}function cr(n,t){var r=this.__data__,e=Er(r,n);return e<0?(++this.size,r.push([n,t])):r[e][1]=t,this}function ar(n){var t=-1,r=null==n?0:n.length;for(this.clear();++t=t?n:t)),n}function Dr(n,t,e,u,i,o){var f,c=t&on,a=t&fn,l=t&cn;if(e&&(f=i?e(n,u,i,o):e(n)),f!==Y)return f;if(!ic(n))return n;var s=yh(n);if(s){if(f=Ii(n),!c)return Uu(n,f)}else{var h=Is(n),p=h==Pn||h==qn;if(bh(n))return ku(n,c);if(h==Gn||h==Bn||p&&!i){if(f=a||p?{}:Ri(n),!c)return a?$u(n,Lr(f,n)):Tu(n,Wr(f,n))}else{if(!qr[h])return i?n:{};f=zi(n,h,c)}}o||(o=new dr);var _=o.get(n);if(_)return _;o.set(n,f),jh(n)?n.forEach(function(r){f.add(Dr(r,t,e,r,n,o))}):mh(n)&&n.forEach(function(r,u){ +f.set(u,Dr(r,t,e,u,n,o))});var v=l?a?gi:vi:a?Nc:Fc,g=s?Y:v(n);return r(g||n,function(r,u){g&&(u=r,r=n[u]),zr(f,u,Dr(r,t,e,u,n,o))}),f}function Mr(n){var t=Fc(n);return function(r){return Zr(r,n,t)}}function Zr(n,t,r){var e=r.length;if(null==n)return!e;for(n=cl(n);e--;){var u=r[e],i=t[u],o=n[u];if(o===Y&&!(u in n)||!i(o))return!1}return!0}function Kr(n,t,r){if("function"!=typeof n)throw new sl(tn);return Es(function(){n.apply(Y,r)},t)}function Vr(n,t,r,e){var u=-1,i=o,a=!0,l=n.length,s=[],h=t.length; +if(!l)return s;r&&(t=c(t,R(r))),e?(i=f,a=!1):t.length>=X&&(i=E,a=!1,t=new vr(t));n:for(;++uu?0:u+r), +e=e===Y||e>u?u:jc(e),e<0&&(e+=u),e=r>e?0:Ac(e);r0&&r(f)?t>1?te(f,t-1,r,e,u):a(u,f):e||(u[u.length]=f)}return u}function ee(n,t){return n&&ys(n,t,Fc)}function ue(n,t){return n&&ds(n,t,Fc)}function se(n,t){return i(t,function(t){return rc(n[t])})}function ve(n,t){t=ju(t,n);for(var r=0,e=t.length;null!=n&&rt}function we(n,t){return null!=n&&yl.call(n,t)}function me(n,t){return null!=n&&t in cl(n)}function xe(n,t,r){return n>=Vl(t,r)&&n=120&&p.length>=120)?new vr(a&&p):Y}p=n[0]; +var _=-1,v=l[0];n:for(;++_-1;)f!==n&&Sl.call(f,a,1),Sl.call(n,a,1);return n}function Qe(n,t){for(var r=n?t.length:0,e=r-1;r--;){ +var u=t[r];if(r==e||u!==i){var i=u;Wi(u)?Sl.call(n,u,1):vu(n,u)}}return n}function Xe(n,t){return n+Ml(Jl()*(t-n+1))}function nu(n,t,r,e){for(var u=-1,i=Kl(Dl((t-n)/(r||1)),0),o=el(i);i--;)o[e?i:++u]=n,n+=r;return o}function tu(n,t){var r="";if(!n||t<1||t>zn)return r;do t%2&&(r+=n),t=Ml(t/2),t&&(n+=n);while(t);return r}function ru(n,t){return Ss(Zi(n,t,Sa),n+"")}function eu(n){return kr(na(n))}function uu(n,t){var r=na(n);return Yi(r,$r(t,0,r.length))}function iu(n,t,r,e){if(!ic(n))return n;t=ju(t,n); +for(var u=-1,i=t.length,o=i-1,f=n;null!=f&&++uu?0:u+t),r=r>u?u:r,r<0&&(r+=u),u=t>r?0:r-t>>>0,t>>>=0;for(var i=el(u);++e>>1,o=n[i];null!==o&&!yc(o)&&(r?o<=t:o=X){var s=t?null:js(n);if(s)return N(s);c=!1,u=E,l=new vr}else l=t?[]:a;n:for(;++e=e?n:fu(n,t,r)}function ku(n,t){if(t)return n.slice();var r=n.length,e=Il?Il(r):new n.constructor(r); +return n.copy(e),e}function Ou(n){var t=new n.constructor(n.byteLength);return new Ol(t).set(new Ol(n)),t}function Iu(n,t){return new n.constructor(t?Ou(n.buffer):n.buffer,n.byteOffset,n.byteLength)}function Ru(n){var t=new n.constructor(n.source,Dt.exec(n));return t.lastIndex=n.lastIndex,t}function zu(n){return hs?cl(hs.call(n)):{}}function Eu(n,t){return new n.constructor(t?Ou(n.buffer):n.buffer,n.byteOffset,n.length)}function Su(n,t){if(n!==t){var r=n!==Y,e=null===n,u=n===n,i=yc(n),o=t!==Y,f=null===t,c=t===t,a=yc(t); +if(!f&&!a&&!i&&n>t||i&&o&&c&&!f&&!a||e&&o&&c||!r&&c||!u)return 1;if(!e&&!i&&!a&&n=f)return c;return c*("desc"==r[e]?-1:1)}}return n.index-t.index}function Lu(n,t,r,e){for(var u=-1,i=n.length,o=r.length,f=-1,c=t.length,a=Kl(i-o,0),l=el(c+a),s=!e;++f1?r[u-1]:Y,o=u>2?r[2]:Y;for(i=n.length>3&&"function"==typeof i?(u--,i):Y,o&&Li(r[0],r[1],o)&&(i=u<3?Y:i,u=1),t=cl(t);++e-1?u[i?t[o]:o]:Y}}function Hu(n){return _i(function(t){var r=t.length,e=r,u=H.prototype.thru;for(n&&t.reverse();e--;){var i=t[e];if("function"!=typeof i)throw new sl(tn);if(u&&!o&&"wrapper"==yi(i))var o=new H([],!0)}for(e=o?e:r;++e1&&d.reverse(),s&&cf))return!1;var a=i.get(n),l=i.get(t);if(a&&l)return a==t&&l==n;var s=-1,p=!0,_=r&ln?new vr:Y;for(i.set(n,t),i.set(t,n);++s1?"& ":"")+t[e],t=t.join(r>2?", ":" "),n.replace(Lt,"{\n/* [wrapped with "+t+"] */\n")}function Si(n){return yh(n)||gh(n)||!!(Wl&&n&&n[Wl])}function Wi(n,t){var r=typeof n; +return t=null==t?zn:t,!!t&&("number"==r||"symbol"!=r&&qt.test(n))&&n>-1&&n%1==0&&n0){if(++t>=jn)return arguments[0]}else t=0; +return n.apply(Y,arguments)}}function Yi(n,t){var r=-1,e=n.length,u=e-1;for(t=t===Y?e:t;++r=this.__values__.length;return{done:n,value:n?Y:this.__values__[this.__index__++]}}function rf(){return this}function ef(n){for(var t,r=this;r instanceof G;){var e=to(r);e.__index__=0,e.__values__=Y,t?u.__wrapped__=e:t=e;var u=e;r=r.__wrapped__}return u.__wrapped__=n,t}function uf(){var n=this.__wrapped__;if(n instanceof Bt){var t=n;return this.__actions__.length&&(t=new Bt(this)),t=t.reverse(),t.__actions__.push({func:Qo,args:[Ro],thisArg:Y}),new H(t,this.__chain__)}return this.thru(Ro); +}function of(){return du(this.__wrapped__,this.__actions__)}function ff(n,t,r){var e=yh(n)?u:Gr;return r&&Li(n,t,r)&&(t=Y),e(n,bi(t,3))}function cf(n,t){return(yh(n)?i:ne)(n,bi(t,3))}function af(n,t){return te(vf(n,t),1)}function lf(n,t){return te(vf(n,t),Rn)}function sf(n,t,r){return r=r===Y?1:jc(r),te(vf(n,t),r)}function hf(n,t){return(yh(n)?r:vs)(n,bi(t,3))}function pf(n,t){return(yh(n)?e:gs)(n,bi(t,3))}function _f(n,t,r,e){n=Vf(n)?n:na(n),r=r&&!e?jc(r):0;var u=n.length;return r<0&&(r=Kl(u+r,0)), +gc(n)?r<=u&&n.indexOf(t,r)>-1:!!u&&y(n,t,r)>-1}function vf(n,t){return(yh(n)?c:Fe)(n,bi(t,3))}function gf(n,t,r,e){return null==n?[]:(yh(t)||(t=null==t?[]:[t]),r=e?Y:r,yh(r)||(r=null==r?[]:[r]),Ve(n,t,r))}function yf(n,t,r){var e=yh(n)?l:j,u=arguments.length<3;return e(n,bi(t,4),r,u,vs)}function df(n,t,r){var e=yh(n)?s:j,u=arguments.length<3;return e(n,bi(t,4),r,u,gs)}function bf(n,t){return(yh(n)?i:ne)(n,Lf(bi(t,3)))}function wf(n){return(yh(n)?kr:eu)(n)}function mf(n,t,r){return t=(r?Li(n,t,r):t===Y)?1:jc(t), +(yh(n)?Or:uu)(n,t)}function xf(n){return(yh(n)?Ir:ou)(n)}function jf(n){if(null==n)return 0;if(Vf(n))return gc(n)?K(n):n.length;var t=Is(n);return t==Zn||t==Qn?n.size:$e(n).length}function Af(n,t,r){var e=yh(n)?h:cu;return r&&Li(n,t,r)&&(t=Y),e(n,bi(t,3))}function kf(n,t){if("function"!=typeof t)throw new sl(tn);return n=jc(n),function(){if(--n<1)return t.apply(this,arguments)}}function Of(n,t,r){return t=r?Y:t,t=n&&null==t?n.length:t,fi(n,dn,Y,Y,Y,Y,t)}function If(n,t){var r;if("function"!=typeof t)throw new sl(tn); +return n=jc(n),function(){return--n>0&&(r=t.apply(this,arguments)),n<=1&&(t=Y),r}}function Rf(n,t,r){t=r?Y:t;var e=fi(n,_n,Y,Y,Y,Y,Y,t);return e.placeholder=Rf.placeholder,e}function zf(n,t,r){t=r?Y:t;var e=fi(n,vn,Y,Y,Y,Y,Y,t);return e.placeholder=zf.placeholder,e}function Ef(n,t,r){function e(t){var r=h,e=p;return h=p=Y,d=t,v=n.apply(e,r)}function u(n){return d=n,g=Es(f,t),b?e(n):v}function i(n){var r=n-y,e=n-d,u=t-r;return w?Vl(u,_-e):u}function o(n){var r=n-y,e=n-d;return y===Y||r>=t||r<0||w&&e>=_; +}function f(){var n=ih();return o(n)?c(n):(g=Es(f,i(n)),Y)}function c(n){return g=Y,m&&h?e(n):(h=p=Y,v)}function a(){g!==Y&&xs(g),d=0,h=y=p=g=Y}function l(){return g===Y?v:c(ih())}function s(){var n=ih(),r=o(n);if(h=arguments,p=this,y=n,r){if(g===Y)return u(y);if(w)return xs(g),g=Es(f,t),e(y)}return g===Y&&(g=Es(f,t)),v}var h,p,_,v,g,y,d=0,b=!1,w=!1,m=!0;if("function"!=typeof n)throw new sl(tn);return t=kc(t)||0,ic(r)&&(b=!!r.leading,w="maxWait"in r,_=w?Kl(kc(r.maxWait)||0,t):_,m="trailing"in r?!!r.trailing:m), +s.cancel=a,s.flush=l,s}function Sf(n){return fi(n,wn)}function Wf(n,t){if("function"!=typeof n||null!=t&&"function"!=typeof t)throw new sl(tn);var r=function(){var e=arguments,u=t?t.apply(this,e):e[0],i=r.cache;if(i.has(u))return i.get(u);var o=n.apply(this,e);return r.cache=i.set(u,o)||i,o};return r.cache=new(Wf.Cache||ar),r}function Lf(n){if("function"!=typeof n)throw new sl(tn);return function(){var t=arguments;switch(t.length){case 0:return!n.call(this);case 1:return!n.call(this,t[0]);case 2: +return!n.call(this,t[0],t[1]);case 3:return!n.call(this,t[0],t[1],t[2])}return!n.apply(this,t)}}function Cf(n){return If(2,n)}function Uf(n,t){if("function"!=typeof n)throw new sl(tn);return t=t===Y?t:jc(t),ru(n,t)}function Bf(t,r){if("function"!=typeof t)throw new sl(tn);return r=null==r?0:Kl(jc(r),0),ru(function(e){var u=e[r],i=Au(e,0,r);return u&&a(i,u),n(t,this,i)})}function Tf(n,t,r){var e=!0,u=!0;if("function"!=typeof n)throw new sl(tn);return ic(r)&&(e="leading"in r?!!r.leading:e,u="trailing"in r?!!r.trailing:u), +Ef(n,t,{leading:e,maxWait:t,trailing:u})}function $f(n){return Of(n,1)}function Df(n,t){return sh(xu(t),n)}function Mf(){if(!arguments.length)return[];var n=arguments[0];return yh(n)?n:[n]}function Ff(n){return Dr(n,cn)}function Nf(n,t){return t="function"==typeof t?t:Y,Dr(n,cn,t)}function Pf(n){return Dr(n,on|cn)}function qf(n,t){return t="function"==typeof t?t:Y,Dr(n,on|cn,t)}function Zf(n,t){return null==t||Zr(n,t,Fc(t))}function Kf(n,t){return n===t||n!==n&&t!==t}function Vf(n){return null!=n&&uc(n.length)&&!rc(n); +}function Gf(n){return oc(n)&&Vf(n)}function Hf(n){return n===!0||n===!1||oc(n)&&de(n)==Dn}function Jf(n){return oc(n)&&1===n.nodeType&&!_c(n)}function Yf(n){if(null==n)return!0;if(Vf(n)&&(yh(n)||"string"==typeof n||"function"==typeof n.splice||bh(n)||Ah(n)||gh(n)))return!n.length;var t=Is(n);if(t==Zn||t==Qn)return!n.size;if($i(n))return!$e(n).length;for(var r in n)if(yl.call(n,r))return!1;return!0}function Qf(n,t){return ze(n,t)}function Xf(n,t,r){r="function"==typeof r?r:Y;var e=r?r(n,t):Y;return e===Y?ze(n,t,Y,r):!!e; +}function nc(n){if(!oc(n))return!1;var t=de(n);return t==Nn||t==Fn||"string"==typeof n.message&&"string"==typeof n.name&&!_c(n)}function tc(n){return"number"==typeof n&&Pl(n)}function rc(n){if(!ic(n))return!1;var t=de(n);return t==Pn||t==qn||t==$n||t==Jn}function ec(n){return"number"==typeof n&&n==jc(n)}function uc(n){return"number"==typeof n&&n>-1&&n%1==0&&n<=zn}function ic(n){var t=typeof n;return null!=n&&("object"==t||"function"==t)}function oc(n){return null!=n&&"object"==typeof n}function fc(n,t){ +return n===t||We(n,t,mi(t))}function cc(n,t,r){return r="function"==typeof r?r:Y,We(n,t,mi(t),r)}function ac(n){return pc(n)&&n!=+n}function lc(n){if(Rs(n))throw new il(nn);return Le(n)}function sc(n){return null===n}function hc(n){return null==n}function pc(n){return"number"==typeof n||oc(n)&&de(n)==Kn}function _c(n){if(!oc(n)||de(n)!=Gn)return!1;var t=Rl(n);if(null===t)return!0;var r=yl.call(t,"constructor")&&t.constructor;return"function"==typeof r&&r instanceof r&&gl.call(r)==ml}function vc(n){ +return ec(n)&&n>=-zn&&n<=zn}function gc(n){return"string"==typeof n||!yh(n)&&oc(n)&&de(n)==Xn}function yc(n){return"symbol"==typeof n||oc(n)&&de(n)==nt}function dc(n){return n===Y}function bc(n){return oc(n)&&Is(n)==rt}function wc(n){return oc(n)&&de(n)==et}function mc(n){if(!n)return[];if(Vf(n))return gc(n)?V(n):Uu(n);if(Ll&&n[Ll])return $(n[Ll]());var t=Is(n);return(t==Zn?D:t==Qn?N:na)(n)}function xc(n){if(!n)return 0===n?n:0;if(n=kc(n),n===Rn||n===-Rn){return(n<0?-1:1)*En}return n===n?n:0}function jc(n){ +var t=xc(n),r=t%1;return t===t?r?t-r:t:0}function Ac(n){return n?$r(jc(n),0,Wn):0}function kc(n){if("number"==typeof n)return n;if(yc(n))return Sn;if(ic(n)){var t="function"==typeof n.valueOf?n.valueOf():n;n=ic(t)?t+"":t}if("string"!=typeof n)return 0===n?n:+n;n=n.replace(Et,"");var r=Ft.test(n);return r||Pt.test(n)?Jr(n.slice(2),r?2:8):Mt.test(n)?Sn:+n}function Oc(n){return Bu(n,Nc(n))}function Ic(n){return n?$r(jc(n),-zn,zn):0===n?n:0}function Rc(n){return null==n?"":pu(n)}function zc(n,t){var r=_s(n); +return null==t?r:Wr(r,t)}function Ec(n,t){return v(n,bi(t,3),ee)}function Sc(n,t){return v(n,bi(t,3),ue)}function Wc(n,t){return null==n?n:ys(n,bi(t,3),Nc)}function Lc(n,t){return null==n?n:ds(n,bi(t,3),Nc)}function Cc(n,t){return n&&ee(n,bi(t,3))}function Uc(n,t){return n&&ue(n,bi(t,3))}function Bc(n){return null==n?[]:se(n,Fc(n))}function Tc(n){return null==n?[]:se(n,Nc(n))}function $c(n,t,r){var e=null==n?Y:ve(n,t);return e===Y?r:e}function Dc(n,t){return null!=n&&Oi(n,t,we)}function Mc(n,t){return null!=n&&Oi(n,t,me); +}function Fc(n){return Vf(n)?Ar(n):$e(n)}function Nc(n){return Vf(n)?Ar(n,!0):De(n)}function Pc(n,t){var r={};return t=bi(t,3),ee(n,function(n,e,u){Cr(r,t(n,e,u),n)}),r}function qc(n,t){var r={};return t=bi(t,3),ee(n,function(n,e,u){Cr(r,e,t(n,e,u))}),r}function Zc(n,t){return Kc(n,Lf(bi(t)))}function Kc(n,t){if(null==n)return{};var r=c(gi(n),function(n){return[n]});return t=bi(t),He(n,r,function(n,r){return t(n,r[0])})}function Vc(n,t,r){t=ju(t,n);var e=-1,u=t.length;for(u||(u=1,n=Y);++et){ +var e=n;n=t,t=e}if(r||n%1||t%1){var u=Jl();return Vl(n+u*(t-n+Hr("1e-"+((u+"").length-1))),t)}return Xe(n,t)}function ia(n){return Jh(Rc(n).toLowerCase())}function oa(n){return n=Rc(n),n&&n.replace(Zt,he).replace(Br,"")}function fa(n,t,r){n=Rc(n),t=pu(t);var e=n.length;r=r===Y?e:$r(jc(r),0,e);var u=r;return r-=t.length,r>=0&&n.slice(r,u)==t}function ca(n){return n=Rc(n),n&&mt.test(n)?n.replace(bt,pe):n}function aa(n){return n=Rc(n),n&&zt.test(n)?n.replace(Rt,"\\$&"):n}function la(n,t,r){n=Rc(n),t=jc(t); +var e=t?K(n):0;if(!t||e>=t)return n;var u=(t-e)/2;return ni(Ml(u),r)+n+ni(Dl(u),r)}function sa(n,t,r){n=Rc(n),t=jc(t);var e=t?K(n):0;return t&&e>>0)?(n=Rc(n),n&&("string"==typeof t||null!=t&&!xh(t))&&(t=pu(t),!t&&B(n))?Au(V(n),0,r):n.split(t,r)):[]}function ya(n,t,r){return n=Rc(n),r=null==r?0:$r(jc(r),0,n.length),t=pu(t),n.slice(r,r+t.length)==t}function da(n,t,r){var e=q.templateSettings;r&&Li(n,t,r)&&(t=Y),n=Rc(n),t=zh({},t,e,ci);var u,i,o=zh({},t.imports,e.imports,ci),f=Fc(o),c=z(o,f),a=0,l=t.interpolate||Kt,s="__p += '",h=al((t.escape||Kt).source+"|"+l.source+"|"+(l===At?$t:Kt).source+"|"+(t.evaluate||Kt).source+"|$","g"),p="//# sourceURL="+(yl.call(t,"sourceURL")?(t.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++Nr+"]")+"\n"; +n.replace(h,function(t,r,e,o,f,c){return e||(e=o),s+=n.slice(a,c).replace(Vt,C),r&&(u=!0,s+="' +\n__e("+r+") +\n'"),f&&(i=!0,s+="';\n"+f+";\n__p += '"),e&&(s+="' +\n((__t = ("+e+")) == null ? '' : __t) +\n'"),a=c+t.length,t}),s+="';\n";var _=yl.call(t,"variable")&&t.variable;_||(s="with (obj) {\n"+s+"\n}\n"),s=(i?s.replace(vt,""):s).replace(gt,"$1").replace(yt,"$1;"),s="function("+(_||"obj")+") {\n"+(_?"":"obj || (obj = {});\n")+"var __t, __p = ''"+(u?", __e = _.escape":"")+(i?", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n":";\n")+s+"return __p\n}"; +var v=Yh(function(){return ol(f,p+"return "+s).apply(Y,c)});if(v.source=s,nc(v))throw v;return v}function ba(n){return Rc(n).toLowerCase()}function wa(n){return Rc(n).toUpperCase()}function ma(n,t,r){if(n=Rc(n),n&&(r||t===Y))return n.replace(Et,"");if(!n||!(t=pu(t)))return n;var e=V(n),u=V(t);return Au(e,S(e,u),W(e,u)+1).join("")}function xa(n,t,r){if(n=Rc(n),n&&(r||t===Y))return n.replace(Wt,"");if(!n||!(t=pu(t)))return n;var e=V(n);return Au(e,0,W(e,V(t))+1).join("")}function ja(n,t,r){if(n=Rc(n), +n&&(r||t===Y))return n.replace(St,"");if(!n||!(t=pu(t)))return n;var e=V(n);return Au(e,S(e,V(t))).join("")}function Aa(n,t){var r=mn,e=xn;if(ic(t)){var u="separator"in t?t.separator:u;r="length"in t?jc(t.length):r,e="omission"in t?pu(t.omission):e}n=Rc(n);var i=n.length;if(B(n)){var o=V(n);i=o.length}if(r>=i)return n;var f=r-K(e);if(f<1)return e;var c=o?Au(o,0,f).join(""):n.slice(0,f);if(u===Y)return c+e;if(o&&(f+=c.length-f),xh(u)){if(n.slice(f).search(u)){var a,l=c;for(u.global||(u=al(u.source,Rc(Dt.exec(u))+"g")), +u.lastIndex=0;a=u.exec(l);)var s=a.index;c=c.slice(0,s===Y?f:s)}}else if(n.indexOf(pu(u),f)!=f){var h=c.lastIndexOf(u);h>-1&&(c=c.slice(0,h))}return c+e}function ka(n){return n=Rc(n),n&&wt.test(n)?n.replace(dt,_e):n}function Oa(n,t,r){return n=Rc(n),t=r?Y:t,t===Y?T(n)?J(n):_(n):n.match(t)||[]}function Ia(t){var r=null==t?0:t.length,e=bi();return t=r?c(t,function(n){if("function"!=typeof n[1])throw new sl(tn);return[e(n[0]),n[1]]}):[],ru(function(e){for(var u=-1;++uzn)return[];var r=Wn,e=Vl(n,Wn);t=bi(t),n-=Wn;for(var u=O(e,t);++r1?n[t-1]:Y;return r="function"==typeof r?(n.pop(), +r):Y,Vo(n,r)}),Js=_i(function(n){var t=n.length,r=t?n[0]:0,e=this.__wrapped__,u=function(t){return Tr(t,n)};return!(t>1||this.__actions__.length)&&e instanceof Bt&&Wi(r)?(e=e.slice(r,+r+(t?1:0)),e.__actions__.push({func:Qo,args:[u],thisArg:Y}),new H(e,this.__chain__).thru(function(n){return t&&!n.length&&n.push(Y),n})):this.thru(u)}),Ys=Du(function(n,t,r){yl.call(n,r)?++n[r]:Cr(n,r,1)}),Qs=Gu(lo),Xs=Gu(so),nh=Du(function(n,t,r){yl.call(n,r)?n[r].push(t):Cr(n,r,[t])}),th=ru(function(t,r,e){var u=-1,i="function"==typeof r,o=Vf(t)?el(t.length):[]; +return vs(t,function(t){o[++u]=i?n(r,t,e):ke(t,r,e)}),o}),rh=Du(function(n,t,r){Cr(n,r,t)}),eh=Du(function(n,t,r){n[r?0:1].push(t)},function(){return[[],[]]}),uh=ru(function(n,t){if(null==n)return[];var r=t.length;return r>1&&Li(n,t[0],t[1])?t=[]:r>2&&Li(t[0],t[1],t[2])&&(t=[t[0]]),Ve(n,te(t,1),[])}),ih=Tl||function(){return Xr.Date.now()},oh=ru(function(n,t,r){var e=sn;if(r.length){var u=F(r,di(oh));e|=gn}return fi(n,e,t,r,u)}),fh=ru(function(n,t,r){var e=sn|hn;if(r.length){var u=F(r,di(fh));e|=gn; +}return fi(t,e,n,r,u)}),ch=ru(function(n,t){return Kr(n,1,t)}),ah=ru(function(n,t,r){return Kr(n,kc(t)||0,r)});Wf.Cache=ar;var lh=ms(function(t,r){r=1==r.length&&yh(r[0])?c(r[0],R(bi())):c(te(r,1),R(bi()));var e=r.length;return ru(function(u){for(var i=-1,o=Vl(u.length,e);++i=t}),gh=Oe(function(){return arguments}())?Oe:function(n){return oc(n)&&yl.call(n,"callee")&&!El.call(n,"callee")},yh=el.isArray,dh=ie?R(ie):Ie,bh=Nl||Na,wh=oe?R(oe):Re,mh=fe?R(fe):Se,xh=ce?R(ce):Ce,jh=ae?R(ae):Ue,Ah=le?R(le):Be,kh=ei(Me),Oh=ei(function(n,t){return n<=t}),Ih=Mu(function(n,t){if($i(t)||Vf(t))return Bu(t,Fc(t),n),Y;for(var r in t)yl.call(t,r)&&zr(n,r,t[r])}),Rh=Mu(function(n,t){Bu(t,Nc(t),n)}),zh=Mu(function(n,t,r,e){Bu(t,Nc(t),n,e)}),Eh=Mu(function(n,t,r,e){Bu(t,Fc(t),n,e); +}),Sh=_i(Tr),Wh=ru(function(n,t){n=cl(n);var r=-1,e=t.length,u=e>2?t[2]:Y;for(u&&Li(t[0],t[1],u)&&(e=1);++r1),t}),Bu(n,gi(n),r),e&&(r=Dr(r,on|fn|cn,li));for(var u=t.length;u--;)vu(r,t[u]);return r}),Mh=_i(function(n,t){return null==n?{}:Ge(n,t)}),Fh=oi(Fc),Nh=oi(Nc),Ph=Zu(function(n,t,r){return t=t.toLowerCase(),n+(r?ia(t):t)}),qh=Zu(function(n,t,r){return n+(r?"-":"")+t.toLowerCase()}),Zh=Zu(function(n,t,r){return n+(r?" ":"")+t.toLowerCase()}),Kh=qu("toLowerCase"),Vh=Zu(function(n,t,r){ +return n+(r?"_":"")+t.toLowerCase()}),Gh=Zu(function(n,t,r){return n+(r?" ":"")+Jh(t)}),Hh=Zu(function(n,t,r){return n+(r?" ":"")+t.toUpperCase()}),Jh=qu("toUpperCase"),Yh=ru(function(t,r){try{return n(t,Y,r)}catch(n){return nc(n)?n:new il(n)}}),Qh=_i(function(n,t){return r(t,function(t){t=Qi(t),Cr(n,t,oh(n[t],n))}),n}),Xh=Hu(),np=Hu(!0),tp=ru(function(n,t){return function(r){return ke(r,n,t)}}),rp=ru(function(n,t){return function(r){return ke(n,r,t)}}),ep=Xu(c),up=Xu(u),ip=Xu(h),op=ri(),fp=ri(!0),cp=Qu(function(n,t){ +return n+t},0),ap=ii("ceil"),lp=Qu(function(n,t){return n/t},1),sp=ii("floor"),hp=Qu(function(n,t){return n*t},1),pp=ii("round"),_p=Qu(function(n,t){return n-t},0);return q.after=kf,q.ary=Of,q.assign=Ih,q.assignIn=Rh,q.assignInWith=zh,q.assignWith=Eh,q.at=Sh,q.before=If,q.bind=oh,q.bindAll=Qh,q.bindKey=fh,q.castArray=Mf,q.chain=Jo,q.chunk=ro,q.compact=eo,q.concat=uo,q.cond=Ia,q.conforms=Ra,q.constant=za,q.countBy=Ys,q.create=zc,q.curry=Rf,q.curryRight=zf,q.debounce=Ef,q.defaults=Wh,q.defaultsDeep=Lh, +q.defer=ch,q.delay=ah,q.difference=Ls,q.differenceBy=Cs,q.differenceWith=Us,q.drop=io,q.dropRight=oo,q.dropRightWhile=fo,q.dropWhile=co,q.fill=ao,q.filter=cf,q.flatMap=af,q.flatMapDeep=lf,q.flatMapDepth=sf,q.flatten=ho,q.flattenDeep=po,q.flattenDepth=_o,q.flip=Sf,q.flow=Xh,q.flowRight=np,q.fromPairs=vo,q.functions=Bc,q.functionsIn=Tc,q.groupBy=nh,q.initial=bo,q.intersection=Bs,q.intersectionBy=Ts,q.intersectionWith=$s,q.invert=Ch,q.invertBy=Uh,q.invokeMap=th,q.iteratee=Wa,q.keyBy=rh,q.keys=Fc,q.keysIn=Nc, +q.map=vf,q.mapKeys=Pc,q.mapValues=qc,q.matches=La,q.matchesProperty=Ca,q.memoize=Wf,q.merge=Th,q.mergeWith=$h,q.method=tp,q.methodOf=rp,q.mixin=Ua,q.negate=Lf,q.nthArg=$a,q.omit=Dh,q.omitBy=Zc,q.once=Cf,q.orderBy=gf,q.over=ep,q.overArgs=lh,q.overEvery=up,q.overSome=ip,q.partial=sh,q.partialRight=hh,q.partition=eh,q.pick=Mh,q.pickBy=Kc,q.property=Da,q.propertyOf=Ma,q.pull=Ds,q.pullAll=Ao,q.pullAllBy=ko,q.pullAllWith=Oo,q.pullAt=Ms,q.range=op,q.rangeRight=fp,q.rearg=ph,q.reject=bf,q.remove=Io,q.rest=Uf, +q.reverse=Ro,q.sampleSize=mf,q.set=Gc,q.setWith=Hc,q.shuffle=xf,q.slice=zo,q.sortBy=uh,q.sortedUniq=Bo,q.sortedUniqBy=To,q.split=ga,q.spread=Bf,q.tail=$o,q.take=Do,q.takeRight=Mo,q.takeRightWhile=Fo,q.takeWhile=No,q.tap=Yo,q.throttle=Tf,q.thru=Qo,q.toArray=mc,q.toPairs=Fh,q.toPairsIn=Nh,q.toPath=Va,q.toPlainObject=Oc,q.transform=Jc,q.unary=$f,q.union=Fs,q.unionBy=Ns,q.unionWith=Ps,q.uniq=Po,q.uniqBy=qo,q.uniqWith=Zo,q.unset=Yc,q.unzip=Ko,q.unzipWith=Vo,q.update=Qc,q.updateWith=Xc,q.values=na,q.valuesIn=ta, +q.without=qs,q.words=Oa,q.wrap=Df,q.xor=Zs,q.xorBy=Ks,q.xorWith=Vs,q.zip=Gs,q.zipObject=Go,q.zipObjectDeep=Ho,q.zipWith=Hs,q.entries=Fh,q.entriesIn=Nh,q.extend=Rh,q.extendWith=zh,Ua(q,q),q.add=cp,q.attempt=Yh,q.camelCase=Ph,q.capitalize=ia,q.ceil=ap,q.clamp=ra,q.clone=Ff,q.cloneDeep=Pf,q.cloneDeepWith=qf,q.cloneWith=Nf,q.conformsTo=Zf,q.deburr=oa,q.defaultTo=Ea,q.divide=lp,q.endsWith=fa,q.eq=Kf,q.escape=ca,q.escapeRegExp=aa,q.every=ff,q.find=Qs,q.findIndex=lo,q.findKey=Ec,q.findLast=Xs,q.findLastIndex=so, +q.findLastKey=Sc,q.floor=sp,q.forEach=hf,q.forEachRight=pf,q.forIn=Wc,q.forInRight=Lc,q.forOwn=Cc,q.forOwnRight=Uc,q.get=$c,q.gt=_h,q.gte=vh,q.has=Dc,q.hasIn=Mc,q.head=go,q.identity=Sa,q.includes=_f,q.indexOf=yo,q.inRange=ea,q.invoke=Bh,q.isArguments=gh,q.isArray=yh,q.isArrayBuffer=dh,q.isArrayLike=Vf,q.isArrayLikeObject=Gf,q.isBoolean=Hf,q.isBuffer=bh,q.isDate=wh,q.isElement=Jf,q.isEmpty=Yf,q.isEqual=Qf,q.isEqualWith=Xf,q.isError=nc,q.isFinite=tc,q.isFunction=rc,q.isInteger=ec,q.isLength=uc,q.isMap=mh, +q.isMatch=fc,q.isMatchWith=cc,q.isNaN=ac,q.isNative=lc,q.isNil=hc,q.isNull=sc,q.isNumber=pc,q.isObject=ic,q.isObjectLike=oc,q.isPlainObject=_c,q.isRegExp=xh,q.isSafeInteger=vc,q.isSet=jh,q.isString=gc,q.isSymbol=yc,q.isTypedArray=Ah,q.isUndefined=dc,q.isWeakMap=bc,q.isWeakSet=wc,q.join=wo,q.kebabCase=qh,q.last=mo,q.lastIndexOf=xo,q.lowerCase=Zh,q.lowerFirst=Kh,q.lt=kh,q.lte=Oh,q.max=Ha,q.maxBy=Ja,q.mean=Ya,q.meanBy=Qa,q.min=Xa,q.minBy=nl,q.stubArray=Fa,q.stubFalse=Na,q.stubObject=Pa,q.stubString=qa, +q.stubTrue=Za,q.multiply=hp,q.nth=jo,q.noConflict=Ba,q.noop=Ta,q.now=ih,q.pad=la,q.padEnd=sa,q.padStart=ha,q.parseInt=pa,q.random=ua,q.reduce=yf,q.reduceRight=df,q.repeat=_a,q.replace=va,q.result=Vc,q.round=pp,q.runInContext=p,q.sample=wf,q.size=jf,q.snakeCase=Vh,q.some=Af,q.sortedIndex=Eo,q.sortedIndexBy=So,q.sortedIndexOf=Wo,q.sortedLastIndex=Lo,q.sortedLastIndexBy=Co,q.sortedLastIndexOf=Uo,q.startCase=Gh,q.startsWith=ya,q.subtract=_p,q.sum=tl,q.sumBy=rl,q.template=da,q.times=Ka,q.toFinite=xc,q.toInteger=jc, +q.toLength=Ac,q.toLower=ba,q.toNumber=kc,q.toSafeInteger=Ic,q.toString=Rc,q.toUpper=wa,q.trim=ma,q.trimEnd=xa,q.trimStart=ja,q.truncate=Aa,q.unescape=ka,q.uniqueId=Ga,q.upperCase=Hh,q.upperFirst=Jh,q.each=hf,q.eachRight=pf,q.first=go,Ua(q,function(){var n={};return ee(q,function(t,r){yl.call(q.prototype,r)||(n[r]=t)}),n}(),{chain:!1}),q.VERSION=Q,r(["bind","bindKey","curry","curryRight","partial","partialRight"],function(n){q[n].placeholder=q}),r(["drop","take"],function(n,t){Bt.prototype[n]=function(r){ +r=r===Y?1:Kl(jc(r),0);var e=this.__filtered__&&!t?new Bt(this):this.clone();return e.__filtered__?e.__takeCount__=Vl(r,e.__takeCount__):e.__views__.push({size:Vl(r,Wn),type:n+(e.__dir__<0?"Right":"")}),e},Bt.prototype[n+"Right"]=function(t){return this.reverse()[n](t).reverse()}}),r(["filter","map","takeWhile"],function(n,t){var r=t+1,e=r==kn||r==In;Bt.prototype[n]=function(n){var t=this.clone();return t.__iteratees__.push({iteratee:bi(n,3),type:r}),t.__filtered__=t.__filtered__||e,t}}),r(["head","last"],function(n,t){ +var r="take"+(t?"Right":"");Bt.prototype[n]=function(){return this[r](1).value()[0]}}),r(["initial","tail"],function(n,t){var r="drop"+(t?"":"Right");Bt.prototype[n]=function(){return this.__filtered__?new Bt(this):this[r](1)}}),Bt.prototype.compact=function(){return this.filter(Sa)},Bt.prototype.find=function(n){return this.filter(n).head()},Bt.prototype.findLast=function(n){return this.reverse().find(n)},Bt.prototype.invokeMap=ru(function(n,t){return"function"==typeof n?new Bt(this):this.map(function(r){ +return ke(r,n,t)})}),Bt.prototype.reject=function(n){return this.filter(Lf(bi(n)))},Bt.prototype.slice=function(n,t){n=jc(n);var r=this;return r.__filtered__&&(n>0||t<0)?new Bt(r):(n<0?r=r.takeRight(-n):n&&(r=r.drop(n)),t!==Y&&(t=jc(t),r=t<0?r.dropRight(-t):r.take(t-n)),r)},Bt.prototype.takeRightWhile=function(n){return this.reverse().takeWhile(n).reverse()},Bt.prototype.toArray=function(){return this.take(Wn)},ee(Bt.prototype,function(n,t){var r=/^(?:filter|find|map|reject)|While$/.test(t),e=/^(?:head|last)$/.test(t),u=q[e?"take"+("last"==t?"Right":""):t],i=e||/^find/.test(t); +u&&(q.prototype[t]=function(){var t=this.__wrapped__,o=e?[1]:arguments,f=t instanceof Bt,c=o[0],l=f||yh(t),s=function(n){var t=u.apply(q,a([n],o));return e&&h?t[0]:t};l&&r&&"function"==typeof c&&1!=c.length&&(f=l=!1);var h=this.__chain__,p=!!this.__actions__.length,_=i&&!h,v=f&&!p;if(!i&&l){t=v?t:new Bt(this);var g=n.apply(t,o);return g.__actions__.push({func:Qo,args:[s],thisArg:Y}),new H(g,h)}return _&&v?n.apply(this,o):(g=this.thru(s),_?e?g.value()[0]:g.value():g)})}),r(["pop","push","shift","sort","splice","unshift"],function(n){ +var t=hl[n],r=/^(?:push|sort|unshift)$/.test(n)?"tap":"thru",e=/^(?:pop|shift)$/.test(n);q.prototype[n]=function(){var n=arguments;if(e&&!this.__chain__){var u=this.value();return t.apply(yh(u)?u:[],n)}return this[r](function(r){return t.apply(yh(r)?r:[],n)})}}),ee(Bt.prototype,function(n,t){var r=q[t];if(r){var e=r.name+"";yl.call(is,e)||(is[e]=[]),is[e].push({name:t,func:r})}}),is[Ju(Y,hn).name]=[{name:"wrapper",func:Y}],Bt.prototype.clone=Gt,Bt.prototype.reverse=Ht,Bt.prototype.value=Jt,q.prototype.at=Js, +q.prototype.chain=Xo,q.prototype.commit=nf,q.prototype.next=tf,q.prototype.plant=ef,q.prototype.reverse=uf,q.prototype.toJSON=q.prototype.valueOf=q.prototype.value=of,q.prototype.first=q.prototype.head,Ll&&(q.prototype[Ll]=rf),q},ge=ve();"function"==typeof define&&"object"==typeof define.amd&&define.amd?(Xr._=ge,define(function(){return ge})):te?((te.exports=ge)._=ge,ne._=ge):Xr._=ge}).call(this); \ No newline at end of file diff --git a/node_modules/lodash/package.json b/node_modules/lodash/package.json index e872e6570..40e85d6be 100644 --- a/node_modules/lodash/package.json +++ b/node_modules/lodash/package.json @@ -1,26 +1,26 @@ { "_args": [ [ - "lodash@4.17.15", + "lodash@4.17.19", "/Users/drew.heavner/Documents/Github/sign-android-release" ] ], "_development": true, - "_from": "lodash@4.17.15", - "_id": "lodash@4.17.15", + "_from": "lodash@4.17.19", + "_id": "lodash@4.17.19", "_inBundle": false, - "_integrity": "sha512-8xOcRHvCjnocdS5cpwXQXVzmmh5e5+saE2QGoeQmbKmRS6J3VQppPOIt0MnmE+4xlZoumy0GPG0D0MVIQbNA1A==", + "_integrity": "sha512-JNvd8XER9GQX0v2qJgsaN/mzFCNA5BRe/j8JN9d+tWyGLSodKQHKFicdwNYzWwI3wjRnaKPsGj1XkBjx/F96DQ==", "_location": "/lodash", "_phantomChildren": {}, "_requested": { "type": "version", "registry": true, - "raw": "lodash@4.17.15", + "raw": "lodash@4.17.19", "name": "lodash", "escapedName": "lodash", - "rawSpec": "4.17.15", + "rawSpec": "4.17.19", "saveSpec": null, - "fetchSpec": "4.17.15" + "fetchSpec": "4.17.19" }, "_requiredBy": [ "/@babel/core", @@ -29,8 +29,8 @@ "/@babel/types", "/request-promise-core" ], - "_resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.15.tgz", - "_spec": "4.17.15", + "_resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.19.tgz", + "_spec": "4.17.19", "_where": "/Users/drew.heavner/Documents/Github/sign-android-release", "author": { "name": "John-David Dalton", @@ -67,5 +67,5 @@ "scripts": { "test": "echo \"See https://travis-ci.org/lodash-archive/lodash-cli for testing details.\"" }, - "version": "4.17.15" + "version": "4.17.19" } diff --git a/node_modules/make-dir/node_modules/.bin/semver b/node_modules/make-dir/node_modules/.bin/semver deleted file mode 120000 index 317eb293d..000000000 --- a/node_modules/make-dir/node_modules/.bin/semver +++ /dev/null @@ -1 +0,0 @@ -../semver/bin/semver \ No newline at end of file diff --git a/node_modules/make-dir/node_modules/semver/CHANGELOG.md b/node_modules/make-dir/node_modules/semver/CHANGELOG.md deleted file mode 100644 index 66304fdd2..000000000 --- a/node_modules/make-dir/node_modules/semver/CHANGELOG.md +++ /dev/null @@ -1,39 +0,0 @@ -# changes log - -## 5.7 - -* Add `minVersion` method - -## 5.6 - -* Move boolean `loose` param to an options object, with - backwards-compatibility protection. -* Add ability to opt out of special prerelease version handling with - the `includePrerelease` option flag. - -## 5.5 - -* Add version coercion capabilities - -## 5.4 - -* Add intersection checking - -## 5.3 - -* Add `minSatisfying` method - -## 5.2 - -* Add `prerelease(v)` that returns prerelease components - -## 5.1 - -* Add Backus-Naur for ranges -* Remove excessively cute inspection methods - -## 5.0 - -* Remove AMD/Browserified build artifacts -* Fix ltr and gtr when using the `*` range -* Fix for range `*` with a prerelease identifier diff --git a/node_modules/make-dir/node_modules/semver/LICENSE b/node_modules/make-dir/node_modules/semver/LICENSE deleted file mode 100644 index 19129e315..000000000 --- a/node_modules/make-dir/node_modules/semver/LICENSE +++ /dev/null @@ -1,15 +0,0 @@ -The ISC License - -Copyright (c) Isaac Z. Schlueter and Contributors - -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR -ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR -IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/node_modules/make-dir/node_modules/semver/README.md b/node_modules/make-dir/node_modules/semver/README.md deleted file mode 100644 index e5ccececf..000000000 --- a/node_modules/make-dir/node_modules/semver/README.md +++ /dev/null @@ -1,411 +0,0 @@ -semver(1) -- The semantic versioner for npm -=========================================== - -## Install - -```bash -npm install --save semver -```` - -## Usage - -As a node module: - -```js -const semver = require('semver') - -semver.valid('1.2.3') // '1.2.3' -semver.valid('a.b.c') // null -semver.clean(' =v1.2.3 ') // '1.2.3' -semver.satisfies('1.2.3', '1.x || >=2.5.0 || 5.0.0 - 7.2.3') // true -semver.gt('1.2.3', '9.8.7') // false -semver.lt('1.2.3', '9.8.7') // true -semver.minVersion('>=1.0.0') // '1.0.0' -semver.valid(semver.coerce('v2')) // '2.0.0' -semver.valid(semver.coerce('42.6.7.9.3-alpha')) // '42.6.7' -``` - -As a command-line utility: - -``` -$ semver -h - -A JavaScript implementation of the https://semver.org/ specification -Copyright Isaac Z. Schlueter - -Usage: semver [options] [ [...]] -Prints valid versions sorted by SemVer precedence - -Options: --r --range - Print versions that match the specified range. - --i --increment [] - Increment a version by the specified level. Level can - be one of: major, minor, patch, premajor, preminor, - prepatch, or prerelease. Default level is 'patch'. - Only one version may be specified. - ---preid - Identifier to be used to prefix premajor, preminor, - prepatch or prerelease version increments. - --l --loose - Interpret versions and ranges loosely - --p --include-prerelease - Always include prerelease versions in range matching - --c --coerce - Coerce a string into SemVer if possible - (does not imply --loose) - -Program exits successfully if any valid version satisfies -all supplied ranges, and prints all satisfying versions. - -If no satisfying versions are found, then exits failure. - -Versions are printed in ascending order, so supplying -multiple versions to the utility will just sort them. -``` - -## Versions - -A "version" is described by the `v2.0.0` specification found at -. - -A leading `"="` or `"v"` character is stripped off and ignored. - -## Ranges - -A `version range` is a set of `comparators` which specify versions -that satisfy the range. - -A `comparator` is composed of an `operator` and a `version`. The set -of primitive `operators` is: - -* `<` Less than -* `<=` Less than or equal to -* `>` Greater than -* `>=` Greater than or equal to -* `=` Equal. If no operator is specified, then equality is assumed, - so this operator is optional, but MAY be included. - -For example, the comparator `>=1.2.7` would match the versions -`1.2.7`, `1.2.8`, `2.5.3`, and `1.3.9`, but not the versions `1.2.6` -or `1.1.0`. - -Comparators can be joined by whitespace to form a `comparator set`, -which is satisfied by the **intersection** of all of the comparators -it includes. - -A range is composed of one or more comparator sets, joined by `||`. A -version matches a range if and only if every comparator in at least -one of the `||`-separated comparator sets is satisfied by the version. - -For example, the range `>=1.2.7 <1.3.0` would match the versions -`1.2.7`, `1.2.8`, and `1.2.99`, but not the versions `1.2.6`, `1.3.0`, -or `1.1.0`. - -The range `1.2.7 || >=1.2.9 <2.0.0` would match the versions `1.2.7`, -`1.2.9`, and `1.4.6`, but not the versions `1.2.8` or `2.0.0`. - -### Prerelease Tags - -If a version has a prerelease tag (for example, `1.2.3-alpha.3`) then -it will only be allowed to satisfy comparator sets if at least one -comparator with the same `[major, minor, patch]` tuple also has a -prerelease tag. - -For example, the range `>1.2.3-alpha.3` would be allowed to match the -version `1.2.3-alpha.7`, but it would *not* be satisfied by -`3.4.5-alpha.9`, even though `3.4.5-alpha.9` is technically "greater -than" `1.2.3-alpha.3` according to the SemVer sort rules. The version -range only accepts prerelease tags on the `1.2.3` version. The -version `3.4.5` *would* satisfy the range, because it does not have a -prerelease flag, and `3.4.5` is greater than `1.2.3-alpha.7`. - -The purpose for this behavior is twofold. First, prerelease versions -frequently are updated very quickly, and contain many breaking changes -that are (by the author's design) not yet fit for public consumption. -Therefore, by default, they are excluded from range matching -semantics. - -Second, a user who has opted into using a prerelease version has -clearly indicated the intent to use *that specific* set of -alpha/beta/rc versions. By including a prerelease tag in the range, -the user is indicating that they are aware of the risk. However, it -is still not appropriate to assume that they have opted into taking a -similar risk on the *next* set of prerelease versions. - -Note that this behavior can be suppressed (treating all prerelease -versions as if they were normal versions, for the purpose of range -matching) by setting the `includePrerelease` flag on the options -object to any -[functions](https://github.com/npm/node-semver#functions) that do -range matching. - -#### Prerelease Identifiers - -The method `.inc` takes an additional `identifier` string argument that -will append the value of the string as a prerelease identifier: - -```javascript -semver.inc('1.2.3', 'prerelease', 'beta') -// '1.2.4-beta.0' -``` - -command-line example: - -```bash -$ semver 1.2.3 -i prerelease --preid beta -1.2.4-beta.0 -``` - -Which then can be used to increment further: - -```bash -$ semver 1.2.4-beta.0 -i prerelease -1.2.4-beta.1 -``` - -### Advanced Range Syntax - -Advanced range syntax desugars to primitive comparators in -deterministic ways. - -Advanced ranges may be combined in the same way as primitive -comparators using white space or `||`. - -#### Hyphen Ranges `X.Y.Z - A.B.C` - -Specifies an inclusive set. - -* `1.2.3 - 2.3.4` := `>=1.2.3 <=2.3.4` - -If a partial version is provided as the first version in the inclusive -range, then the missing pieces are replaced with zeroes. - -* `1.2 - 2.3.4` := `>=1.2.0 <=2.3.4` - -If a partial version is provided as the second version in the -inclusive range, then all versions that start with the supplied parts -of the tuple are accepted, but nothing that would be greater than the -provided tuple parts. - -* `1.2.3 - 2.3` := `>=1.2.3 <2.4.0` -* `1.2.3 - 2` := `>=1.2.3 <3.0.0` - -#### X-Ranges `1.2.x` `1.X` `1.2.*` `*` - -Any of `X`, `x`, or `*` may be used to "stand in" for one of the -numeric values in the `[major, minor, patch]` tuple. - -* `*` := `>=0.0.0` (Any version satisfies) -* `1.x` := `>=1.0.0 <2.0.0` (Matching major version) -* `1.2.x` := `>=1.2.0 <1.3.0` (Matching major and minor versions) - -A partial version range is treated as an X-Range, so the special -character is in fact optional. - -* `""` (empty string) := `*` := `>=0.0.0` -* `1` := `1.x.x` := `>=1.0.0 <2.0.0` -* `1.2` := `1.2.x` := `>=1.2.0 <1.3.0` - -#### Tilde Ranges `~1.2.3` `~1.2` `~1` - -Allows patch-level changes if a minor version is specified on the -comparator. Allows minor-level changes if not. - -* `~1.2.3` := `>=1.2.3 <1.(2+1).0` := `>=1.2.3 <1.3.0` -* `~1.2` := `>=1.2.0 <1.(2+1).0` := `>=1.2.0 <1.3.0` (Same as `1.2.x`) -* `~1` := `>=1.0.0 <(1+1).0.0` := `>=1.0.0 <2.0.0` (Same as `1.x`) -* `~0.2.3` := `>=0.2.3 <0.(2+1).0` := `>=0.2.3 <0.3.0` -* `~0.2` := `>=0.2.0 <0.(2+1).0` := `>=0.2.0 <0.3.0` (Same as `0.2.x`) -* `~0` := `>=0.0.0 <(0+1).0.0` := `>=0.0.0 <1.0.0` (Same as `0.x`) -* `~1.2.3-beta.2` := `>=1.2.3-beta.2 <1.3.0` Note that prereleases in - the `1.2.3` version will be allowed, if they are greater than or - equal to `beta.2`. So, `1.2.3-beta.4` would be allowed, but - `1.2.4-beta.2` would not, because it is a prerelease of a - different `[major, minor, patch]` tuple. - -#### Caret Ranges `^1.2.3` `^0.2.5` `^0.0.4` - -Allows changes that do not modify the left-most non-zero digit in the -`[major, minor, patch]` tuple. In other words, this allows patch and -minor updates for versions `1.0.0` and above, patch updates for -versions `0.X >=0.1.0`, and *no* updates for versions `0.0.X`. - -Many authors treat a `0.x` version as if the `x` were the major -"breaking-change" indicator. - -Caret ranges are ideal when an author may make breaking changes -between `0.2.4` and `0.3.0` releases, which is a common practice. -However, it presumes that there will *not* be breaking changes between -`0.2.4` and `0.2.5`. It allows for changes that are presumed to be -additive (but non-breaking), according to commonly observed practices. - -* `^1.2.3` := `>=1.2.3 <2.0.0` -* `^0.2.3` := `>=0.2.3 <0.3.0` -* `^0.0.3` := `>=0.0.3 <0.0.4` -* `^1.2.3-beta.2` := `>=1.2.3-beta.2 <2.0.0` Note that prereleases in - the `1.2.3` version will be allowed, if they are greater than or - equal to `beta.2`. So, `1.2.3-beta.4` would be allowed, but - `1.2.4-beta.2` would not, because it is a prerelease of a - different `[major, minor, patch]` tuple. -* `^0.0.3-beta` := `>=0.0.3-beta <0.0.4` Note that prereleases in the - `0.0.3` version *only* will be allowed, if they are greater than or - equal to `beta`. So, `0.0.3-pr.2` would be allowed. - -When parsing caret ranges, a missing `patch` value desugars to the -number `0`, but will allow flexibility within that value, even if the -major and minor versions are both `0`. - -* `^1.2.x` := `>=1.2.0 <2.0.0` -* `^0.0.x` := `>=0.0.0 <0.1.0` -* `^0.0` := `>=0.0.0 <0.1.0` - -A missing `minor` and `patch` values will desugar to zero, but also -allow flexibility within those values, even if the major version is -zero. - -* `^1.x` := `>=1.0.0 <2.0.0` -* `^0.x` := `>=0.0.0 <1.0.0` - -### Range Grammar - -Putting all this together, here is a Backus-Naur grammar for ranges, -for the benefit of parser authors: - -```bnf -range-set ::= range ( logical-or range ) * -logical-or ::= ( ' ' ) * '||' ( ' ' ) * -range ::= hyphen | simple ( ' ' simple ) * | '' -hyphen ::= partial ' - ' partial -simple ::= primitive | partial | tilde | caret -primitive ::= ( '<' | '>' | '>=' | '<=' | '=' ) partial -partial ::= xr ( '.' xr ( '.' xr qualifier ? )? )? -xr ::= 'x' | 'X' | '*' | nr -nr ::= '0' | ['1'-'9'] ( ['0'-'9'] ) * -tilde ::= '~' partial -caret ::= '^' partial -qualifier ::= ( '-' pre )? ( '+' build )? -pre ::= parts -build ::= parts -parts ::= part ( '.' part ) * -part ::= nr | [-0-9A-Za-z]+ -``` - -## Functions - -All methods and classes take a final `options` object argument. All -options in this object are `false` by default. The options supported -are: - -- `loose` Be more forgiving about not-quite-valid semver strings. - (Any resulting output will always be 100% strict compliant, of - course.) For backwards compatibility reasons, if the `options` - argument is a boolean value instead of an object, it is interpreted - to be the `loose` param. -- `includePrerelease` Set to suppress the [default - behavior](https://github.com/npm/node-semver#prerelease-tags) of - excluding prerelease tagged versions from ranges unless they are - explicitly opted into. - -Strict-mode Comparators and Ranges will be strict about the SemVer -strings that they parse. - -* `valid(v)`: Return the parsed version, or null if it's not valid. -* `inc(v, release)`: Return the version incremented by the release - type (`major`, `premajor`, `minor`, `preminor`, `patch`, - `prepatch`, or `prerelease`), or null if it's not valid - * `premajor` in one call will bump the version up to the next major - version and down to a prerelease of that major version. - `preminor`, and `prepatch` work the same way. - * If called from a non-prerelease version, the `prerelease` will work the - same as `prepatch`. It increments the patch version, then makes a - prerelease. If the input version is already a prerelease it simply - increments it. -* `prerelease(v)`: Returns an array of prerelease components, or null - if none exist. Example: `prerelease('1.2.3-alpha.1') -> ['alpha', 1]` -* `major(v)`: Return the major version number. -* `minor(v)`: Return the minor version number. -* `patch(v)`: Return the patch version number. -* `intersects(r1, r2, loose)`: Return true if the two supplied ranges - or comparators intersect. -* `parse(v)`: Attempt to parse a string as a semantic version, returning either - a `SemVer` object or `null`. - -### Comparison - -* `gt(v1, v2)`: `v1 > v2` -* `gte(v1, v2)`: `v1 >= v2` -* `lt(v1, v2)`: `v1 < v2` -* `lte(v1, v2)`: `v1 <= v2` -* `eq(v1, v2)`: `v1 == v2` This is true if they're logically equivalent, - even if they're not the exact same string. You already know how to - compare strings. -* `neq(v1, v2)`: `v1 != v2` The opposite of `eq`. -* `cmp(v1, comparator, v2)`: Pass in a comparison string, and it'll call - the corresponding function above. `"==="` and `"!=="` do simple - string comparison, but are included for completeness. Throws if an - invalid comparison string is provided. -* `compare(v1, v2)`: Return `0` if `v1 == v2`, or `1` if `v1` is greater, or `-1` if - `v2` is greater. Sorts in ascending order if passed to `Array.sort()`. -* `rcompare(v1, v2)`: The reverse of compare. Sorts an array of versions - in descending order when passed to `Array.sort()`. -* `diff(v1, v2)`: Returns difference between two versions by the release type - (`major`, `premajor`, `minor`, `preminor`, `patch`, `prepatch`, or `prerelease`), - or null if the versions are the same. - -### Comparators - -* `intersects(comparator)`: Return true if the comparators intersect - -### Ranges - -* `validRange(range)`: Return the valid range or null if it's not valid -* `satisfies(version, range)`: Return true if the version satisfies the - range. -* `maxSatisfying(versions, range)`: Return the highest version in the list - that satisfies the range, or `null` if none of them do. -* `minSatisfying(versions, range)`: Return the lowest version in the list - that satisfies the range, or `null` if none of them do. -* `minVersion(range)`: Return the lowest version that can possibly match - the given range. -* `gtr(version, range)`: Return `true` if version is greater than all the - versions possible in the range. -* `ltr(version, range)`: Return `true` if version is less than all the - versions possible in the range. -* `outside(version, range, hilo)`: Return true if the version is outside - the bounds of the range in either the high or low direction. The - `hilo` argument must be either the string `'>'` or `'<'`. (This is - the function called by `gtr` and `ltr`.) -* `intersects(range)`: Return true if any of the ranges comparators intersect - -Note that, since ranges may be non-contiguous, a version might not be -greater than a range, less than a range, *or* satisfy a range! For -example, the range `1.2 <1.2.9 || >2.0.0` would have a hole from `1.2.9` -until `2.0.0`, so the version `1.2.10` would not be greater than the -range (because `2.0.1` satisfies, which is higher), nor less than the -range (since `1.2.8` satisfies, which is lower), and it also does not -satisfy the range. - -If you want to know if a version satisfies or does not satisfy a -range, use the `satisfies(version, range)` function. - -### Coercion - -* `coerce(version)`: Coerces a string to semver if possible - -This aims to provide a very forgiving translation of a non-semver -string to semver. It looks for the first digit in a string, and -consumes all remaining characters which satisfy at least a partial semver -(e.g., `1`, `1.2`, `1.2.3`) up to the max permitted length (256 characters). -Longer versions are simply truncated (`4.6.3.9.2-alpha2` becomes `4.6.3`). -All surrounding text is simply ignored (`v3.4 replaces v3.3.1` becomes `3.4.0`). -Only text which lacks digits will fail coercion (`version one` is not valid). -The maximum length for any semver component considered for coercion is 16 characters; -longer components will be ignored (`10000000000000000.4.7.4` becomes `4.7.4`). -The maximum value for any semver component is `Integer.MAX_SAFE_INTEGER || (2**53 - 1)`; -higher value components are invalid (`9999999999999999.4.7.4` is likely invalid). diff --git a/node_modules/make-dir/node_modules/semver/bin/semver b/node_modules/make-dir/node_modules/semver/bin/semver deleted file mode 100755 index 801e77f13..000000000 --- a/node_modules/make-dir/node_modules/semver/bin/semver +++ /dev/null @@ -1,160 +0,0 @@ -#!/usr/bin/env node -// Standalone semver comparison program. -// Exits successfully and prints matching version(s) if -// any supplied version is valid and passes all tests. - -var argv = process.argv.slice(2) - -var versions = [] - -var range = [] - -var inc = null - -var version = require('../package.json').version - -var loose = false - -var includePrerelease = false - -var coerce = false - -var identifier - -var semver = require('../semver') - -var reverse = false - -var options = {} - -main() - -function main () { - if (!argv.length) return help() - while (argv.length) { - var a = argv.shift() - var indexOfEqualSign = a.indexOf('=') - if (indexOfEqualSign !== -1) { - a = a.slice(0, indexOfEqualSign) - argv.unshift(a.slice(indexOfEqualSign + 1)) - } - switch (a) { - case '-rv': case '-rev': case '--rev': case '--reverse': - reverse = true - break - case '-l': case '--loose': - loose = true - break - case '-p': case '--include-prerelease': - includePrerelease = true - break - case '-v': case '--version': - versions.push(argv.shift()) - break - case '-i': case '--inc': case '--increment': - switch (argv[0]) { - case 'major': case 'minor': case 'patch': case 'prerelease': - case 'premajor': case 'preminor': case 'prepatch': - inc = argv.shift() - break - default: - inc = 'patch' - break - } - break - case '--preid': - identifier = argv.shift() - break - case '-r': case '--range': - range.push(argv.shift()) - break - case '-c': case '--coerce': - coerce = true - break - case '-h': case '--help': case '-?': - return help() - default: - versions.push(a) - break - } - } - - var options = { loose: loose, includePrerelease: includePrerelease } - - versions = versions.map(function (v) { - return coerce ? (semver.coerce(v) || { version: v }).version : v - }).filter(function (v) { - return semver.valid(v) - }) - if (!versions.length) return fail() - if (inc && (versions.length !== 1 || range.length)) { return failInc() } - - for (var i = 0, l = range.length; i < l; i++) { - versions = versions.filter(function (v) { - return semver.satisfies(v, range[i], options) - }) - if (!versions.length) return fail() - } - return success(versions) -} - -function failInc () { - console.error('--inc can only be used on a single version with no range') - fail() -} - -function fail () { process.exit(1) } - -function success () { - var compare = reverse ? 'rcompare' : 'compare' - versions.sort(function (a, b) { - return semver[compare](a, b, options) - }).map(function (v) { - return semver.clean(v, options) - }).map(function (v) { - return inc ? semver.inc(v, inc, options, identifier) : v - }).forEach(function (v, i, _) { console.log(v) }) -} - -function help () { - console.log(['SemVer ' + version, - '', - 'A JavaScript implementation of the https://semver.org/ specification', - 'Copyright Isaac Z. Schlueter', - '', - 'Usage: semver [options] [ [...]]', - 'Prints valid versions sorted by SemVer precedence', - '', - 'Options:', - '-r --range ', - ' Print versions that match the specified range.', - '', - '-i --increment []', - ' Increment a version by the specified level. Level can', - ' be one of: major, minor, patch, premajor, preminor,', - " prepatch, or prerelease. Default level is 'patch'.", - ' Only one version may be specified.', - '', - '--preid ', - ' Identifier to be used to prefix premajor, preminor,', - ' prepatch or prerelease version increments.', - '', - '-l --loose', - ' Interpret versions and ranges loosely', - '', - '-p --include-prerelease', - ' Always include prerelease versions in range matching', - '', - '-c --coerce', - ' Coerce a string into SemVer if possible', - ' (does not imply --loose)', - '', - 'Program exits successfully if any valid version satisfies', - 'all supplied ranges, and prints all satisfying versions.', - '', - 'If no satisfying versions are found, then exits failure.', - '', - 'Versions are printed in ascending order, so supplying', - 'multiple versions to the utility will just sort them.' - ].join('\n')) -} diff --git a/node_modules/make-dir/node_modules/semver/package.json b/node_modules/make-dir/node_modules/semver/package.json deleted file mode 100644 index 7b6d776ab..000000000 --- a/node_modules/make-dir/node_modules/semver/package.json +++ /dev/null @@ -1,64 +0,0 @@ -{ - "_args": [ - [ - "semver@5.7.0", - "/Users/drew.heavner/Documents/Github/sign-android-release" - ] - ], - "_development": true, - "_from": "semver@5.7.0", - "_id": "semver@5.7.0", - "_inBundle": false, - "_integrity": "sha512-Ya52jSX2u7QKghxeoFGpLwCtGlt7j0oY9DYb5apt9nPlJ42ID+ulTXESnt/qAQcoSERyZ5sl3LDIOw0nAn/5DA==", - "_location": "/make-dir/semver", - "_phantomChildren": {}, - "_requested": { - "type": "version", - "registry": true, - "raw": "semver@5.7.0", - "name": "semver", - "escapedName": "semver", - "rawSpec": "5.7.0", - "saveSpec": null, - "fetchSpec": "5.7.0" - }, - "_requiredBy": [ - "/make-dir" - ], - "_resolved": "https://registry.npmjs.org/semver/-/semver-5.7.0.tgz", - "_spec": "5.7.0", - "_where": "/Users/drew.heavner/Documents/Github/sign-android-release", - "bin": { - "semver": "./bin/semver" - }, - "bugs": { - "url": "https://github.com/npm/node-semver/issues" - }, - "description": "The semantic version parser used by npm.", - "devDependencies": { - "tap": "^13.0.0-rc.18" - }, - "files": [ - "bin", - "range.bnf", - "semver.js" - ], - "homepage": "https://github.com/npm/node-semver#readme", - "license": "ISC", - "main": "semver.js", - "name": "semver", - "repository": { - "type": "git", - "url": "git+https://github.com/npm/node-semver.git" - }, - "scripts": { - "postpublish": "git push origin --all; git push origin --tags", - "postversion": "npm publish", - "preversion": "npm test", - "test": "tap" - }, - "tap": { - "check-coverage": true - }, - "version": "5.7.0" -} diff --git a/node_modules/make-dir/node_modules/semver/range.bnf b/node_modules/make-dir/node_modules/semver/range.bnf deleted file mode 100644 index d4c6ae0d7..000000000 --- a/node_modules/make-dir/node_modules/semver/range.bnf +++ /dev/null @@ -1,16 +0,0 @@ -range-set ::= range ( logical-or range ) * -logical-or ::= ( ' ' ) * '||' ( ' ' ) * -range ::= hyphen | simple ( ' ' simple ) * | '' -hyphen ::= partial ' - ' partial -simple ::= primitive | partial | tilde | caret -primitive ::= ( '<' | '>' | '>=' | '<=' | '=' ) partial -partial ::= xr ( '.' xr ( '.' xr qualifier ? )? )? -xr ::= 'x' | 'X' | '*' | nr -nr ::= '0' | [1-9] ( [0-9] ) * -tilde ::= '~' partial -caret ::= '^' partial -qualifier ::= ( '-' pre )? ( '+' build )? -pre ::= parts -build ::= parts -parts ::= part ( '.' part ) * -part ::= nr | [-0-9A-Za-z]+ diff --git a/node_modules/make-dir/node_modules/semver/semver.js b/node_modules/make-dir/node_modules/semver/semver.js deleted file mode 100644 index d315d5d68..000000000 --- a/node_modules/make-dir/node_modules/semver/semver.js +++ /dev/null @@ -1,1483 +0,0 @@ -exports = module.exports = SemVer - -var debug -/* istanbul ignore next */ -if (typeof process === 'object' && - process.env && - process.env.NODE_DEBUG && - /\bsemver\b/i.test(process.env.NODE_DEBUG)) { - debug = function () { - var args = Array.prototype.slice.call(arguments, 0) - args.unshift('SEMVER') - console.log.apply(console, args) - } -} else { - debug = function () {} -} - -// Note: this is the semver.org version of the spec that it implements -// Not necessarily the package version of this code. -exports.SEMVER_SPEC_VERSION = '2.0.0' - -var MAX_LENGTH = 256 -var MAX_SAFE_INTEGER = Number.MAX_SAFE_INTEGER || - /* istanbul ignore next */ 9007199254740991 - -// Max safe segment length for coercion. -var MAX_SAFE_COMPONENT_LENGTH = 16 - -// The actual regexps go on exports.re -var re = exports.re = [] -var src = exports.src = [] -var R = 0 - -// The following Regular Expressions can be used for tokenizing, -// validating, and parsing SemVer version strings. - -// ## Numeric Identifier -// A single `0`, or a non-zero digit followed by zero or more digits. - -var NUMERICIDENTIFIER = R++ -src[NUMERICIDENTIFIER] = '0|[1-9]\\d*' -var NUMERICIDENTIFIERLOOSE = R++ -src[NUMERICIDENTIFIERLOOSE] = '[0-9]+' - -// ## Non-numeric Identifier -// Zero or more digits, followed by a letter or hyphen, and then zero or -// more letters, digits, or hyphens. - -var NONNUMERICIDENTIFIER = R++ -src[NONNUMERICIDENTIFIER] = '\\d*[a-zA-Z-][a-zA-Z0-9-]*' - -// ## Main Version -// Three dot-separated numeric identifiers. - -var MAINVERSION = R++ -src[MAINVERSION] = '(' + src[NUMERICIDENTIFIER] + ')\\.' + - '(' + src[NUMERICIDENTIFIER] + ')\\.' + - '(' + src[NUMERICIDENTIFIER] + ')' - -var MAINVERSIONLOOSE = R++ -src[MAINVERSIONLOOSE] = '(' + src[NUMERICIDENTIFIERLOOSE] + ')\\.' + - '(' + src[NUMERICIDENTIFIERLOOSE] + ')\\.' + - '(' + src[NUMERICIDENTIFIERLOOSE] + ')' - -// ## Pre-release Version Identifier -// A numeric identifier, or a non-numeric identifier. - -var PRERELEASEIDENTIFIER = R++ -src[PRERELEASEIDENTIFIER] = '(?:' + src[NUMERICIDENTIFIER] + - '|' + src[NONNUMERICIDENTIFIER] + ')' - -var PRERELEASEIDENTIFIERLOOSE = R++ -src[PRERELEASEIDENTIFIERLOOSE] = '(?:' + src[NUMERICIDENTIFIERLOOSE] + - '|' + src[NONNUMERICIDENTIFIER] + ')' - -// ## Pre-release Version -// Hyphen, followed by one or more dot-separated pre-release version -// identifiers. - -var PRERELEASE = R++ -src[PRERELEASE] = '(?:-(' + src[PRERELEASEIDENTIFIER] + - '(?:\\.' + src[PRERELEASEIDENTIFIER] + ')*))' - -var PRERELEASELOOSE = R++ -src[PRERELEASELOOSE] = '(?:-?(' + src[PRERELEASEIDENTIFIERLOOSE] + - '(?:\\.' + src[PRERELEASEIDENTIFIERLOOSE] + ')*))' - -// ## Build Metadata Identifier -// Any combination of digits, letters, or hyphens. - -var BUILDIDENTIFIER = R++ -src[BUILDIDENTIFIER] = '[0-9A-Za-z-]+' - -// ## Build Metadata -// Plus sign, followed by one or more period-separated build metadata -// identifiers. - -var BUILD = R++ -src[BUILD] = '(?:\\+(' + src[BUILDIDENTIFIER] + - '(?:\\.' + src[BUILDIDENTIFIER] + ')*))' - -// ## Full Version String -// A main version, followed optionally by a pre-release version and -// build metadata. - -// Note that the only major, minor, patch, and pre-release sections of -// the version string are capturing groups. The build metadata is not a -// capturing group, because it should not ever be used in version -// comparison. - -var FULL = R++ -var FULLPLAIN = 'v?' + src[MAINVERSION] + - src[PRERELEASE] + '?' + - src[BUILD] + '?' - -src[FULL] = '^' + FULLPLAIN + '$' - -// like full, but allows v1.2.3 and =1.2.3, which people do sometimes. -// also, 1.0.0alpha1 (prerelease without the hyphen) which is pretty -// common in the npm registry. -var LOOSEPLAIN = '[v=\\s]*' + src[MAINVERSIONLOOSE] + - src[PRERELEASELOOSE] + '?' + - src[BUILD] + '?' - -var LOOSE = R++ -src[LOOSE] = '^' + LOOSEPLAIN + '$' - -var GTLT = R++ -src[GTLT] = '((?:<|>)?=?)' - -// Something like "2.*" or "1.2.x". -// Note that "x.x" is a valid xRange identifer, meaning "any version" -// Only the first item is strictly required. -var XRANGEIDENTIFIERLOOSE = R++ -src[XRANGEIDENTIFIERLOOSE] = src[NUMERICIDENTIFIERLOOSE] + '|x|X|\\*' -var XRANGEIDENTIFIER = R++ -src[XRANGEIDENTIFIER] = src[NUMERICIDENTIFIER] + '|x|X|\\*' - -var XRANGEPLAIN = R++ -src[XRANGEPLAIN] = '[v=\\s]*(' + src[XRANGEIDENTIFIER] + ')' + - '(?:\\.(' + src[XRANGEIDENTIFIER] + ')' + - '(?:\\.(' + src[XRANGEIDENTIFIER] + ')' + - '(?:' + src[PRERELEASE] + ')?' + - src[BUILD] + '?' + - ')?)?' - -var XRANGEPLAINLOOSE = R++ -src[XRANGEPLAINLOOSE] = '[v=\\s]*(' + src[XRANGEIDENTIFIERLOOSE] + ')' + - '(?:\\.(' + src[XRANGEIDENTIFIERLOOSE] + ')' + - '(?:\\.(' + src[XRANGEIDENTIFIERLOOSE] + ')' + - '(?:' + src[PRERELEASELOOSE] + ')?' + - src[BUILD] + '?' + - ')?)?' - -var XRANGE = R++ -src[XRANGE] = '^' + src[GTLT] + '\\s*' + src[XRANGEPLAIN] + '$' -var XRANGELOOSE = R++ -src[XRANGELOOSE] = '^' + src[GTLT] + '\\s*' + src[XRANGEPLAINLOOSE] + '$' - -// Coercion. -// Extract anything that could conceivably be a part of a valid semver -var COERCE = R++ -src[COERCE] = '(?:^|[^\\d])' + - '(\\d{1,' + MAX_SAFE_COMPONENT_LENGTH + '})' + - '(?:\\.(\\d{1,' + MAX_SAFE_COMPONENT_LENGTH + '}))?' + - '(?:\\.(\\d{1,' + MAX_SAFE_COMPONENT_LENGTH + '}))?' + - '(?:$|[^\\d])' - -// Tilde ranges. -// Meaning is "reasonably at or greater than" -var LONETILDE = R++ -src[LONETILDE] = '(?:~>?)' - -var TILDETRIM = R++ -src[TILDETRIM] = '(\\s*)' + src[LONETILDE] + '\\s+' -re[TILDETRIM] = new RegExp(src[TILDETRIM], 'g') -var tildeTrimReplace = '$1~' - -var TILDE = R++ -src[TILDE] = '^' + src[LONETILDE] + src[XRANGEPLAIN] + '$' -var TILDELOOSE = R++ -src[TILDELOOSE] = '^' + src[LONETILDE] + src[XRANGEPLAINLOOSE] + '$' - -// Caret ranges. -// Meaning is "at least and backwards compatible with" -var LONECARET = R++ -src[LONECARET] = '(?:\\^)' - -var CARETTRIM = R++ -src[CARETTRIM] = '(\\s*)' + src[LONECARET] + '\\s+' -re[CARETTRIM] = new RegExp(src[CARETTRIM], 'g') -var caretTrimReplace = '$1^' - -var CARET = R++ -src[CARET] = '^' + src[LONECARET] + src[XRANGEPLAIN] + '$' -var CARETLOOSE = R++ -src[CARETLOOSE] = '^' + src[LONECARET] + src[XRANGEPLAINLOOSE] + '$' - -// A simple gt/lt/eq thing, or just "" to indicate "any version" -var COMPARATORLOOSE = R++ -src[COMPARATORLOOSE] = '^' + src[GTLT] + '\\s*(' + LOOSEPLAIN + ')$|^$' -var COMPARATOR = R++ -src[COMPARATOR] = '^' + src[GTLT] + '\\s*(' + FULLPLAIN + ')$|^$' - -// An expression to strip any whitespace between the gtlt and the thing -// it modifies, so that `> 1.2.3` ==> `>1.2.3` -var COMPARATORTRIM = R++ -src[COMPARATORTRIM] = '(\\s*)' + src[GTLT] + - '\\s*(' + LOOSEPLAIN + '|' + src[XRANGEPLAIN] + ')' - -// this one has to use the /g flag -re[COMPARATORTRIM] = new RegExp(src[COMPARATORTRIM], 'g') -var comparatorTrimReplace = '$1$2$3' - -// Something like `1.2.3 - 1.2.4` -// Note that these all use the loose form, because they'll be -// checked against either the strict or loose comparator form -// later. -var HYPHENRANGE = R++ -src[HYPHENRANGE] = '^\\s*(' + src[XRANGEPLAIN] + ')' + - '\\s+-\\s+' + - '(' + src[XRANGEPLAIN] + ')' + - '\\s*$' - -var HYPHENRANGELOOSE = R++ -src[HYPHENRANGELOOSE] = '^\\s*(' + src[XRANGEPLAINLOOSE] + ')' + - '\\s+-\\s+' + - '(' + src[XRANGEPLAINLOOSE] + ')' + - '\\s*$' - -// Star ranges basically just allow anything at all. -var STAR = R++ -src[STAR] = '(<|>)?=?\\s*\\*' - -// Compile to actual regexp objects. -// All are flag-free, unless they were created above with a flag. -for (var i = 0; i < R; i++) { - debug(i, src[i]) - if (!re[i]) { - re[i] = new RegExp(src[i]) - } -} - -exports.parse = parse -function parse (version, options) { - if (!options || typeof options !== 'object') { - options = { - loose: !!options, - includePrerelease: false - } - } - - if (version instanceof SemVer) { - return version - } - - if (typeof version !== 'string') { - return null - } - - if (version.length > MAX_LENGTH) { - return null - } - - var r = options.loose ? re[LOOSE] : re[FULL] - if (!r.test(version)) { - return null - } - - try { - return new SemVer(version, options) - } catch (er) { - return null - } -} - -exports.valid = valid -function valid (version, options) { - var v = parse(version, options) - return v ? v.version : null -} - -exports.clean = clean -function clean (version, options) { - var s = parse(version.trim().replace(/^[=v]+/, ''), options) - return s ? s.version : null -} - -exports.SemVer = SemVer - -function SemVer (version, options) { - if (!options || typeof options !== 'object') { - options = { - loose: !!options, - includePrerelease: false - } - } - if (version instanceof SemVer) { - if (version.loose === options.loose) { - return version - } else { - version = version.version - } - } else if (typeof version !== 'string') { - throw new TypeError('Invalid Version: ' + version) - } - - if (version.length > MAX_LENGTH) { - throw new TypeError('version is longer than ' + MAX_LENGTH + ' characters') - } - - if (!(this instanceof SemVer)) { - return new SemVer(version, options) - } - - debug('SemVer', version, options) - this.options = options - this.loose = !!options.loose - - var m = version.trim().match(options.loose ? re[LOOSE] : re[FULL]) - - if (!m) { - throw new TypeError('Invalid Version: ' + version) - } - - this.raw = version - - // these are actually numbers - this.major = +m[1] - this.minor = +m[2] - this.patch = +m[3] - - if (this.major > MAX_SAFE_INTEGER || this.major < 0) { - throw new TypeError('Invalid major version') - } - - if (this.minor > MAX_SAFE_INTEGER || this.minor < 0) { - throw new TypeError('Invalid minor version') - } - - if (this.patch > MAX_SAFE_INTEGER || this.patch < 0) { - throw new TypeError('Invalid patch version') - } - - // numberify any prerelease numeric ids - if (!m[4]) { - this.prerelease = [] - } else { - this.prerelease = m[4].split('.').map(function (id) { - if (/^[0-9]+$/.test(id)) { - var num = +id - if (num >= 0 && num < MAX_SAFE_INTEGER) { - return num - } - } - return id - }) - } - - this.build = m[5] ? m[5].split('.') : [] - this.format() -} - -SemVer.prototype.format = function () { - this.version = this.major + '.' + this.minor + '.' + this.patch - if (this.prerelease.length) { - this.version += '-' + this.prerelease.join('.') - } - return this.version -} - -SemVer.prototype.toString = function () { - return this.version -} - -SemVer.prototype.compare = function (other) { - debug('SemVer.compare', this.version, this.options, other) - if (!(other instanceof SemVer)) { - other = new SemVer(other, this.options) - } - - return this.compareMain(other) || this.comparePre(other) -} - -SemVer.prototype.compareMain = function (other) { - if (!(other instanceof SemVer)) { - other = new SemVer(other, this.options) - } - - return compareIdentifiers(this.major, other.major) || - compareIdentifiers(this.minor, other.minor) || - compareIdentifiers(this.patch, other.patch) -} - -SemVer.prototype.comparePre = function (other) { - if (!(other instanceof SemVer)) { - other = new SemVer(other, this.options) - } - - // NOT having a prerelease is > having one - if (this.prerelease.length && !other.prerelease.length) { - return -1 - } else if (!this.prerelease.length && other.prerelease.length) { - return 1 - } else if (!this.prerelease.length && !other.prerelease.length) { - return 0 - } - - var i = 0 - do { - var a = this.prerelease[i] - var b = other.prerelease[i] - debug('prerelease compare', i, a, b) - if (a === undefined && b === undefined) { - return 0 - } else if (b === undefined) { - return 1 - } else if (a === undefined) { - return -1 - } else if (a === b) { - continue - } else { - return compareIdentifiers(a, b) - } - } while (++i) -} - -// preminor will bump the version up to the next minor release, and immediately -// down to pre-release. premajor and prepatch work the same way. -SemVer.prototype.inc = function (release, identifier) { - switch (release) { - case 'premajor': - this.prerelease.length = 0 - this.patch = 0 - this.minor = 0 - this.major++ - this.inc('pre', identifier) - break - case 'preminor': - this.prerelease.length = 0 - this.patch = 0 - this.minor++ - this.inc('pre', identifier) - break - case 'prepatch': - // If this is already a prerelease, it will bump to the next version - // drop any prereleases that might already exist, since they are not - // relevant at this point. - this.prerelease.length = 0 - this.inc('patch', identifier) - this.inc('pre', identifier) - break - // If the input is a non-prerelease version, this acts the same as - // prepatch. - case 'prerelease': - if (this.prerelease.length === 0) { - this.inc('patch', identifier) - } - this.inc('pre', identifier) - break - - case 'major': - // If this is a pre-major version, bump up to the same major version. - // Otherwise increment major. - // 1.0.0-5 bumps to 1.0.0 - // 1.1.0 bumps to 2.0.0 - if (this.minor !== 0 || - this.patch !== 0 || - this.prerelease.length === 0) { - this.major++ - } - this.minor = 0 - this.patch = 0 - this.prerelease = [] - break - case 'minor': - // If this is a pre-minor version, bump up to the same minor version. - // Otherwise increment minor. - // 1.2.0-5 bumps to 1.2.0 - // 1.2.1 bumps to 1.3.0 - if (this.patch !== 0 || this.prerelease.length === 0) { - this.minor++ - } - this.patch = 0 - this.prerelease = [] - break - case 'patch': - // If this is not a pre-release version, it will increment the patch. - // If it is a pre-release it will bump up to the same patch version. - // 1.2.0-5 patches to 1.2.0 - // 1.2.0 patches to 1.2.1 - if (this.prerelease.length === 0) { - this.patch++ - } - this.prerelease = [] - break - // This probably shouldn't be used publicly. - // 1.0.0 "pre" would become 1.0.0-0 which is the wrong direction. - case 'pre': - if (this.prerelease.length === 0) { - this.prerelease = [0] - } else { - var i = this.prerelease.length - while (--i >= 0) { - if (typeof this.prerelease[i] === 'number') { - this.prerelease[i]++ - i = -2 - } - } - if (i === -1) { - // didn't increment anything - this.prerelease.push(0) - } - } - if (identifier) { - // 1.2.0-beta.1 bumps to 1.2.0-beta.2, - // 1.2.0-beta.fooblz or 1.2.0-beta bumps to 1.2.0-beta.0 - if (this.prerelease[0] === identifier) { - if (isNaN(this.prerelease[1])) { - this.prerelease = [identifier, 0] - } - } else { - this.prerelease = [identifier, 0] - } - } - break - - default: - throw new Error('invalid increment argument: ' + release) - } - this.format() - this.raw = this.version - return this -} - -exports.inc = inc -function inc (version, release, loose, identifier) { - if (typeof (loose) === 'string') { - identifier = loose - loose = undefined - } - - try { - return new SemVer(version, loose).inc(release, identifier).version - } catch (er) { - return null - } -} - -exports.diff = diff -function diff (version1, version2) { - if (eq(version1, version2)) { - return null - } else { - var v1 = parse(version1) - var v2 = parse(version2) - var prefix = '' - if (v1.prerelease.length || v2.prerelease.length) { - prefix = 'pre' - var defaultResult = 'prerelease' - } - for (var key in v1) { - if (key === 'major' || key === 'minor' || key === 'patch') { - if (v1[key] !== v2[key]) { - return prefix + key - } - } - } - return defaultResult // may be undefined - } -} - -exports.compareIdentifiers = compareIdentifiers - -var numeric = /^[0-9]+$/ -function compareIdentifiers (a, b) { - var anum = numeric.test(a) - var bnum = numeric.test(b) - - if (anum && bnum) { - a = +a - b = +b - } - - return a === b ? 0 - : (anum && !bnum) ? -1 - : (bnum && !anum) ? 1 - : a < b ? -1 - : 1 -} - -exports.rcompareIdentifiers = rcompareIdentifiers -function rcompareIdentifiers (a, b) { - return compareIdentifiers(b, a) -} - -exports.major = major -function major (a, loose) { - return new SemVer(a, loose).major -} - -exports.minor = minor -function minor (a, loose) { - return new SemVer(a, loose).minor -} - -exports.patch = patch -function patch (a, loose) { - return new SemVer(a, loose).patch -} - -exports.compare = compare -function compare (a, b, loose) { - return new SemVer(a, loose).compare(new SemVer(b, loose)) -} - -exports.compareLoose = compareLoose -function compareLoose (a, b) { - return compare(a, b, true) -} - -exports.rcompare = rcompare -function rcompare (a, b, loose) { - return compare(b, a, loose) -} - -exports.sort = sort -function sort (list, loose) { - return list.sort(function (a, b) { - return exports.compare(a, b, loose) - }) -} - -exports.rsort = rsort -function rsort (list, loose) { - return list.sort(function (a, b) { - return exports.rcompare(a, b, loose) - }) -} - -exports.gt = gt -function gt (a, b, loose) { - return compare(a, b, loose) > 0 -} - -exports.lt = lt -function lt (a, b, loose) { - return compare(a, b, loose) < 0 -} - -exports.eq = eq -function eq (a, b, loose) { - return compare(a, b, loose) === 0 -} - -exports.neq = neq -function neq (a, b, loose) { - return compare(a, b, loose) !== 0 -} - -exports.gte = gte -function gte (a, b, loose) { - return compare(a, b, loose) >= 0 -} - -exports.lte = lte -function lte (a, b, loose) { - return compare(a, b, loose) <= 0 -} - -exports.cmp = cmp -function cmp (a, op, b, loose) { - switch (op) { - case '===': - if (typeof a === 'object') - a = a.version - if (typeof b === 'object') - b = b.version - return a === b - - case '!==': - if (typeof a === 'object') - a = a.version - if (typeof b === 'object') - b = b.version - return a !== b - - case '': - case '=': - case '==': - return eq(a, b, loose) - - case '!=': - return neq(a, b, loose) - - case '>': - return gt(a, b, loose) - - case '>=': - return gte(a, b, loose) - - case '<': - return lt(a, b, loose) - - case '<=': - return lte(a, b, loose) - - default: - throw new TypeError('Invalid operator: ' + op) - } -} - -exports.Comparator = Comparator -function Comparator (comp, options) { - if (!options || typeof options !== 'object') { - options = { - loose: !!options, - includePrerelease: false - } - } - - if (comp instanceof Comparator) { - if (comp.loose === !!options.loose) { - return comp - } else { - comp = comp.value - } - } - - if (!(this instanceof Comparator)) { - return new Comparator(comp, options) - } - - debug('comparator', comp, options) - this.options = options - this.loose = !!options.loose - this.parse(comp) - - if (this.semver === ANY) { - this.value = '' - } else { - this.value = this.operator + this.semver.version - } - - debug('comp', this) -} - -var ANY = {} -Comparator.prototype.parse = function (comp) { - var r = this.options.loose ? re[COMPARATORLOOSE] : re[COMPARATOR] - var m = comp.match(r) - - if (!m) { - throw new TypeError('Invalid comparator: ' + comp) - } - - this.operator = m[1] - if (this.operator === '=') { - this.operator = '' - } - - // if it literally is just '>' or '' then allow anything. - if (!m[2]) { - this.semver = ANY - } else { - this.semver = new SemVer(m[2], this.options.loose) - } -} - -Comparator.prototype.toString = function () { - return this.value -} - -Comparator.prototype.test = function (version) { - debug('Comparator.test', version, this.options.loose) - - if (this.semver === ANY) { - return true - } - - if (typeof version === 'string') { - version = new SemVer(version, this.options) - } - - return cmp(version, this.operator, this.semver, this.options) -} - -Comparator.prototype.intersects = function (comp, options) { - if (!(comp instanceof Comparator)) { - throw new TypeError('a Comparator is required') - } - - if (!options || typeof options !== 'object') { - options = { - loose: !!options, - includePrerelease: false - } - } - - var rangeTmp - - if (this.operator === '') { - rangeTmp = new Range(comp.value, options) - return satisfies(this.value, rangeTmp, options) - } else if (comp.operator === '') { - rangeTmp = new Range(this.value, options) - return satisfies(comp.semver, rangeTmp, options) - } - - var sameDirectionIncreasing = - (this.operator === '>=' || this.operator === '>') && - (comp.operator === '>=' || comp.operator === '>') - var sameDirectionDecreasing = - (this.operator === '<=' || this.operator === '<') && - (comp.operator === '<=' || comp.operator === '<') - var sameSemVer = this.semver.version === comp.semver.version - var differentDirectionsInclusive = - (this.operator === '>=' || this.operator === '<=') && - (comp.operator === '>=' || comp.operator === '<=') - var oppositeDirectionsLessThan = - cmp(this.semver, '<', comp.semver, options) && - ((this.operator === '>=' || this.operator === '>') && - (comp.operator === '<=' || comp.operator === '<')) - var oppositeDirectionsGreaterThan = - cmp(this.semver, '>', comp.semver, options) && - ((this.operator === '<=' || this.operator === '<') && - (comp.operator === '>=' || comp.operator === '>')) - - return sameDirectionIncreasing || sameDirectionDecreasing || - (sameSemVer && differentDirectionsInclusive) || - oppositeDirectionsLessThan || oppositeDirectionsGreaterThan -} - -exports.Range = Range -function Range (range, options) { - if (!options || typeof options !== 'object') { - options = { - loose: !!options, - includePrerelease: false - } - } - - if (range instanceof Range) { - if (range.loose === !!options.loose && - range.includePrerelease === !!options.includePrerelease) { - return range - } else { - return new Range(range.raw, options) - } - } - - if (range instanceof Comparator) { - return new Range(range.value, options) - } - - if (!(this instanceof Range)) { - return new Range(range, options) - } - - this.options = options - this.loose = !!options.loose - this.includePrerelease = !!options.includePrerelease - - // First, split based on boolean or || - this.raw = range - this.set = range.split(/\s*\|\|\s*/).map(function (range) { - return this.parseRange(range.trim()) - }, this).filter(function (c) { - // throw out any that are not relevant for whatever reason - return c.length - }) - - if (!this.set.length) { - throw new TypeError('Invalid SemVer Range: ' + range) - } - - this.format() -} - -Range.prototype.format = function () { - this.range = this.set.map(function (comps) { - return comps.join(' ').trim() - }).join('||').trim() - return this.range -} - -Range.prototype.toString = function () { - return this.range -} - -Range.prototype.parseRange = function (range) { - var loose = this.options.loose - range = range.trim() - // `1.2.3 - 1.2.4` => `>=1.2.3 <=1.2.4` - var hr = loose ? re[HYPHENRANGELOOSE] : re[HYPHENRANGE] - range = range.replace(hr, hyphenReplace) - debug('hyphen replace', range) - // `> 1.2.3 < 1.2.5` => `>1.2.3 <1.2.5` - range = range.replace(re[COMPARATORTRIM], comparatorTrimReplace) - debug('comparator trim', range, re[COMPARATORTRIM]) - - // `~ 1.2.3` => `~1.2.3` - range = range.replace(re[TILDETRIM], tildeTrimReplace) - - // `^ 1.2.3` => `^1.2.3` - range = range.replace(re[CARETTRIM], caretTrimReplace) - - // normalize spaces - range = range.split(/\s+/).join(' ') - - // At this point, the range is completely trimmed and - // ready to be split into comparators. - - var compRe = loose ? re[COMPARATORLOOSE] : re[COMPARATOR] - var set = range.split(' ').map(function (comp) { - return parseComparator(comp, this.options) - }, this).join(' ').split(/\s+/) - if (this.options.loose) { - // in loose mode, throw out any that are not valid comparators - set = set.filter(function (comp) { - return !!comp.match(compRe) - }) - } - set = set.map(function (comp) { - return new Comparator(comp, this.options) - }, this) - - return set -} - -Range.prototype.intersects = function (range, options) { - if (!(range instanceof Range)) { - throw new TypeError('a Range is required') - } - - return this.set.some(function (thisComparators) { - return thisComparators.every(function (thisComparator) { - return range.set.some(function (rangeComparators) { - return rangeComparators.every(function (rangeComparator) { - return thisComparator.intersects(rangeComparator, options) - }) - }) - }) - }) -} - -// Mostly just for testing and legacy API reasons -exports.toComparators = toComparators -function toComparators (range, options) { - return new Range(range, options).set.map(function (comp) { - return comp.map(function (c) { - return c.value - }).join(' ').trim().split(' ') - }) -} - -// comprised of xranges, tildes, stars, and gtlt's at this point. -// already replaced the hyphen ranges -// turn into a set of JUST comparators. -function parseComparator (comp, options) { - debug('comp', comp, options) - comp = replaceCarets(comp, options) - debug('caret', comp) - comp = replaceTildes(comp, options) - debug('tildes', comp) - comp = replaceXRanges(comp, options) - debug('xrange', comp) - comp = replaceStars(comp, options) - debug('stars', comp) - return comp -} - -function isX (id) { - return !id || id.toLowerCase() === 'x' || id === '*' -} - -// ~, ~> --> * (any, kinda silly) -// ~2, ~2.x, ~2.x.x, ~>2, ~>2.x ~>2.x.x --> >=2.0.0 <3.0.0 -// ~2.0, ~2.0.x, ~>2.0, ~>2.0.x --> >=2.0.0 <2.1.0 -// ~1.2, ~1.2.x, ~>1.2, ~>1.2.x --> >=1.2.0 <1.3.0 -// ~1.2.3, ~>1.2.3 --> >=1.2.3 <1.3.0 -// ~1.2.0, ~>1.2.0 --> >=1.2.0 <1.3.0 -function replaceTildes (comp, options) { - return comp.trim().split(/\s+/).map(function (comp) { - return replaceTilde(comp, options) - }).join(' ') -} - -function replaceTilde (comp, options) { - var r = options.loose ? re[TILDELOOSE] : re[TILDE] - return comp.replace(r, function (_, M, m, p, pr) { - debug('tilde', comp, _, M, m, p, pr) - var ret - - if (isX(M)) { - ret = '' - } else if (isX(m)) { - ret = '>=' + M + '.0.0 <' + (+M + 1) + '.0.0' - } else if (isX(p)) { - // ~1.2 == >=1.2.0 <1.3.0 - ret = '>=' + M + '.' + m + '.0 <' + M + '.' + (+m + 1) + '.0' - } else if (pr) { - debug('replaceTilde pr', pr) - ret = '>=' + M + '.' + m + '.' + p + '-' + pr + - ' <' + M + '.' + (+m + 1) + '.0' - } else { - // ~1.2.3 == >=1.2.3 <1.3.0 - ret = '>=' + M + '.' + m + '.' + p + - ' <' + M + '.' + (+m + 1) + '.0' - } - - debug('tilde return', ret) - return ret - }) -} - -// ^ --> * (any, kinda silly) -// ^2, ^2.x, ^2.x.x --> >=2.0.0 <3.0.0 -// ^2.0, ^2.0.x --> >=2.0.0 <3.0.0 -// ^1.2, ^1.2.x --> >=1.2.0 <2.0.0 -// ^1.2.3 --> >=1.2.3 <2.0.0 -// ^1.2.0 --> >=1.2.0 <2.0.0 -function replaceCarets (comp, options) { - return comp.trim().split(/\s+/).map(function (comp) { - return replaceCaret(comp, options) - }).join(' ') -} - -function replaceCaret (comp, options) { - debug('caret', comp, options) - var r = options.loose ? re[CARETLOOSE] : re[CARET] - return comp.replace(r, function (_, M, m, p, pr) { - debug('caret', comp, _, M, m, p, pr) - var ret - - if (isX(M)) { - ret = '' - } else if (isX(m)) { - ret = '>=' + M + '.0.0 <' + (+M + 1) + '.0.0' - } else if (isX(p)) { - if (M === '0') { - ret = '>=' + M + '.' + m + '.0 <' + M + '.' + (+m + 1) + '.0' - } else { - ret = '>=' + M + '.' + m + '.0 <' + (+M + 1) + '.0.0' - } - } else if (pr) { - debug('replaceCaret pr', pr) - if (M === '0') { - if (m === '0') { - ret = '>=' + M + '.' + m + '.' + p + '-' + pr + - ' <' + M + '.' + m + '.' + (+p + 1) - } else { - ret = '>=' + M + '.' + m + '.' + p + '-' + pr + - ' <' + M + '.' + (+m + 1) + '.0' - } - } else { - ret = '>=' + M + '.' + m + '.' + p + '-' + pr + - ' <' + (+M + 1) + '.0.0' - } - } else { - debug('no pr') - if (M === '0') { - if (m === '0') { - ret = '>=' + M + '.' + m + '.' + p + - ' <' + M + '.' + m + '.' + (+p + 1) - } else { - ret = '>=' + M + '.' + m + '.' + p + - ' <' + M + '.' + (+m + 1) + '.0' - } - } else { - ret = '>=' + M + '.' + m + '.' + p + - ' <' + (+M + 1) + '.0.0' - } - } - - debug('caret return', ret) - return ret - }) -} - -function replaceXRanges (comp, options) { - debug('replaceXRanges', comp, options) - return comp.split(/\s+/).map(function (comp) { - return replaceXRange(comp, options) - }).join(' ') -} - -function replaceXRange (comp, options) { - comp = comp.trim() - var r = options.loose ? re[XRANGELOOSE] : re[XRANGE] - return comp.replace(r, function (ret, gtlt, M, m, p, pr) { - debug('xRange', comp, ret, gtlt, M, m, p, pr) - var xM = isX(M) - var xm = xM || isX(m) - var xp = xm || isX(p) - var anyX = xp - - if (gtlt === '=' && anyX) { - gtlt = '' - } - - if (xM) { - if (gtlt === '>' || gtlt === '<') { - // nothing is allowed - ret = '<0.0.0' - } else { - // nothing is forbidden - ret = '*' - } - } else if (gtlt && anyX) { - // we know patch is an x, because we have any x at all. - // replace X with 0 - if (xm) { - m = 0 - } - p = 0 - - if (gtlt === '>') { - // >1 => >=2.0.0 - // >1.2 => >=1.3.0 - // >1.2.3 => >= 1.2.4 - gtlt = '>=' - if (xm) { - M = +M + 1 - m = 0 - p = 0 - } else { - m = +m + 1 - p = 0 - } - } else if (gtlt === '<=') { - // <=0.7.x is actually <0.8.0, since any 0.7.x should - // pass. Similarly, <=7.x is actually <8.0.0, etc. - gtlt = '<' - if (xm) { - M = +M + 1 - } else { - m = +m + 1 - } - } - - ret = gtlt + M + '.' + m + '.' + p - } else if (xm) { - ret = '>=' + M + '.0.0 <' + (+M + 1) + '.0.0' - } else if (xp) { - ret = '>=' + M + '.' + m + '.0 <' + M + '.' + (+m + 1) + '.0' - } - - debug('xRange return', ret) - - return ret - }) -} - -// Because * is AND-ed with everything else in the comparator, -// and '' means "any version", just remove the *s entirely. -function replaceStars (comp, options) { - debug('replaceStars', comp, options) - // Looseness is ignored here. star is always as loose as it gets! - return comp.trim().replace(re[STAR], '') -} - -// This function is passed to string.replace(re[HYPHENRANGE]) -// M, m, patch, prerelease, build -// 1.2 - 3.4.5 => >=1.2.0 <=3.4.5 -// 1.2.3 - 3.4 => >=1.2.0 <3.5.0 Any 3.4.x will do -// 1.2 - 3.4 => >=1.2.0 <3.5.0 -function hyphenReplace ($0, - from, fM, fm, fp, fpr, fb, - to, tM, tm, tp, tpr, tb) { - if (isX(fM)) { - from = '' - } else if (isX(fm)) { - from = '>=' + fM + '.0.0' - } else if (isX(fp)) { - from = '>=' + fM + '.' + fm + '.0' - } else { - from = '>=' + from - } - - if (isX(tM)) { - to = '' - } else if (isX(tm)) { - to = '<' + (+tM + 1) + '.0.0' - } else if (isX(tp)) { - to = '<' + tM + '.' + (+tm + 1) + '.0' - } else if (tpr) { - to = '<=' + tM + '.' + tm + '.' + tp + '-' + tpr - } else { - to = '<=' + to - } - - return (from + ' ' + to).trim() -} - -// if ANY of the sets match ALL of its comparators, then pass -Range.prototype.test = function (version) { - if (!version) { - return false - } - - if (typeof version === 'string') { - version = new SemVer(version, this.options) - } - - for (var i = 0; i < this.set.length; i++) { - if (testSet(this.set[i], version, this.options)) { - return true - } - } - return false -} - -function testSet (set, version, options) { - for (var i = 0; i < set.length; i++) { - if (!set[i].test(version)) { - return false - } - } - - if (version.prerelease.length && !options.includePrerelease) { - // Find the set of versions that are allowed to have prereleases - // For example, ^1.2.3-pr.1 desugars to >=1.2.3-pr.1 <2.0.0 - // That should allow `1.2.3-pr.2` to pass. - // However, `1.2.4-alpha.notready` should NOT be allowed, - // even though it's within the range set by the comparators. - for (i = 0; i < set.length; i++) { - debug(set[i].semver) - if (set[i].semver === ANY) { - continue - } - - if (set[i].semver.prerelease.length > 0) { - var allowed = set[i].semver - if (allowed.major === version.major && - allowed.minor === version.minor && - allowed.patch === version.patch) { - return true - } - } - } - - // Version has a -pre, but it's not one of the ones we like. - return false - } - - return true -} - -exports.satisfies = satisfies -function satisfies (version, range, options) { - try { - range = new Range(range, options) - } catch (er) { - return false - } - return range.test(version) -} - -exports.maxSatisfying = maxSatisfying -function maxSatisfying (versions, range, options) { - var max = null - var maxSV = null - try { - var rangeObj = new Range(range, options) - } catch (er) { - return null - } - versions.forEach(function (v) { - if (rangeObj.test(v)) { - // satisfies(v, range, options) - if (!max || maxSV.compare(v) === -1) { - // compare(max, v, true) - max = v - maxSV = new SemVer(max, options) - } - } - }) - return max -} - -exports.minSatisfying = minSatisfying -function minSatisfying (versions, range, options) { - var min = null - var minSV = null - try { - var rangeObj = new Range(range, options) - } catch (er) { - return null - } - versions.forEach(function (v) { - if (rangeObj.test(v)) { - // satisfies(v, range, options) - if (!min || minSV.compare(v) === 1) { - // compare(min, v, true) - min = v - minSV = new SemVer(min, options) - } - } - }) - return min -} - -exports.minVersion = minVersion -function minVersion (range, loose) { - range = new Range(range, loose) - - var minver = new SemVer('0.0.0') - if (range.test(minver)) { - return minver - } - - minver = new SemVer('0.0.0-0') - if (range.test(minver)) { - return minver - } - - minver = null - for (var i = 0; i < range.set.length; ++i) { - var comparators = range.set[i] - - comparators.forEach(function (comparator) { - // Clone to avoid manipulating the comparator's semver object. - var compver = new SemVer(comparator.semver.version) - switch (comparator.operator) { - case '>': - if (compver.prerelease.length === 0) { - compver.patch++ - } else { - compver.prerelease.push(0) - } - compver.raw = compver.format() - /* fallthrough */ - case '': - case '>=': - if (!minver || gt(minver, compver)) { - minver = compver - } - break - case '<': - case '<=': - /* Ignore maximum versions */ - break - /* istanbul ignore next */ - default: - throw new Error('Unexpected operation: ' + comparator.operator) - } - }) - } - - if (minver && range.test(minver)) { - return minver - } - - return null -} - -exports.validRange = validRange -function validRange (range, options) { - try { - // Return '*' instead of '' so that truthiness works. - // This will throw if it's invalid anyway - return new Range(range, options).range || '*' - } catch (er) { - return null - } -} - -// Determine if version is less than all the versions possible in the range -exports.ltr = ltr -function ltr (version, range, options) { - return outside(version, range, '<', options) -} - -// Determine if version is greater than all the versions possible in the range. -exports.gtr = gtr -function gtr (version, range, options) { - return outside(version, range, '>', options) -} - -exports.outside = outside -function outside (version, range, hilo, options) { - version = new SemVer(version, options) - range = new Range(range, options) - - var gtfn, ltefn, ltfn, comp, ecomp - switch (hilo) { - case '>': - gtfn = gt - ltefn = lte - ltfn = lt - comp = '>' - ecomp = '>=' - break - case '<': - gtfn = lt - ltefn = gte - ltfn = gt - comp = '<' - ecomp = '<=' - break - default: - throw new TypeError('Must provide a hilo val of "<" or ">"') - } - - // If it satisifes the range it is not outside - if (satisfies(version, range, options)) { - return false - } - - // From now on, variable terms are as if we're in "gtr" mode. - // but note that everything is flipped for the "ltr" function. - - for (var i = 0; i < range.set.length; ++i) { - var comparators = range.set[i] - - var high = null - var low = null - - comparators.forEach(function (comparator) { - if (comparator.semver === ANY) { - comparator = new Comparator('>=0.0.0') - } - high = high || comparator - low = low || comparator - if (gtfn(comparator.semver, high.semver, options)) { - high = comparator - } else if (ltfn(comparator.semver, low.semver, options)) { - low = comparator - } - }) - - // If the edge version comparator has a operator then our version - // isn't outside it - if (high.operator === comp || high.operator === ecomp) { - return false - } - - // If the lowest version comparator has an operator and our version - // is less than it then it isn't higher than the range - if ((!low.operator || low.operator === comp) && - ltefn(version, low.semver)) { - return false - } else if (low.operator === ecomp && ltfn(version, low.semver)) { - return false - } - } - return true -} - -exports.prerelease = prerelease -function prerelease (version, options) { - var parsed = parse(version, options) - return (parsed && parsed.prerelease.length) ? parsed.prerelease : null -} - -exports.intersects = intersects -function intersects (r1, r2, options) { - r1 = new Range(r1, options) - r2 = new Range(r2, options) - return r1.intersects(r2) -} - -exports.coerce = coerce -function coerce (version) { - if (version instanceof SemVer) { - return version - } - - if (typeof version !== 'string') { - return null - } - - var match = version.match(re[COERCE]) - - if (match == null) { - return null - } - - return parse(match[1] + - '.' + (match[2] || '0') + - '.' + (match[3] || '0')) -} diff --git a/node_modules/make-error/README.md b/node_modules/make-error/README.md index 66d6ffa25..5c089a265 100644 --- a/node_modules/make-error/README.md +++ b/node_modules/make-error/README.md @@ -1,7 +1,8 @@ -# make-error [![Build Status](https://img.shields.io/travis/JsCommunity/make-error/master.svg)](http://travis-ci.org/JsCommunity/make-error) +# make-error -> Make your own error types! +[![Package Version](https://badgen.net/npm/v/make-error)](https://npmjs.org/package/make-error) [![Build Status](https://travis-ci.org/JsCommunity/make-error.png?branch=master)](https://travis-ci.org/JsCommunity/make-error) [![PackagePhobia](https://badgen.net/packagephobia/install/make-error)](https://packagephobia.now.sh/result?p=make-error) [![Latest Commit](https://badgen.net/github/last-commit/JsCommunity/make-error)](https://github.com/JsCommunity/make-error/commits/master) +> Make your own error types! ## Features @@ -23,7 +24,7 @@ Installation of the [npm package](https://npmjs.org/package/make-error): Then require the package: ```javascript -var makeError = require('make-error'); +var makeError = require("make-error"); ``` ### Browser @@ -39,40 +40,40 @@ You can directly use the build provided at [unpkg.com](https://unpkg.com): ### Basic named error ```javascript -var CustomError = makeError('CustomError') +var CustomError = makeError("CustomError"); // Parameters are forwarded to the super class (here Error). -throw new CustomError('a message') +throw new CustomError("a message"); ``` ### Advanced error class ```javascript -function CustomError (customValue) { - CustomError.super.call(this, 'custom error message') +function CustomError(customValue) { + CustomError.super.call(this, "custom error message"); - this.customValue = customValue + this.customValue = customValue; } -makeError(CustomError) +makeError(CustomError); // Feel free to extend the prototype. -CustomError.prototype.myMethod = function CustomError$myMethod () { - console.log('CustomError.myMethod (%s, %s)', this.code, this.message) -} +CustomError.prototype.myMethod = function CustomError$myMethod() { + console.log("CustomError.myMethod (%s, %s)", this.code, this.message); +}; //----- try { - throw new CustomError(42) + throw new CustomError(42); } catch (error) { - error.myMethod() + error.myMethod(); } ``` ### Specialized error ```javascript -var SpecializedError = makeError('SpecializedError', CustomError); +var SpecializedError = makeError("SpecializedError", CustomError); throw new SpecializedError(42); ``` @@ -82,11 +83,11 @@ throw new SpecializedError(42); > Best for ES2015+. ```javascript -import {BaseError} from 'make-error' +import { BaseError } from "make-error"; class CustomError extends BaseError { - constructor () { - super('custom error message') + constructor() { + super("custom error message"); } } ``` @@ -97,7 +98,7 @@ class CustomError extends BaseError { ## Contributions -Contributions are *very* welcomed, either on the documentation or on +Contributions are _very_ welcomed, either on the documentation or on the code. You may: diff --git a/node_modules/make-error/dist/make-error.js b/node_modules/make-error/dist/make-error.js index 7068a7ed5..32444c690 100644 --- a/node_modules/make-error/dist/make-error.js +++ b/node_modules/make-error/dist/make-error.js @@ -1 +1 @@ -!function(f){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=f();else if("function"==typeof define&&define.amd)define([],f);else{("undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this).makeError=f()}}(function(){return function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a="function"==typeof require&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n||e)},l,l.exports,e,t,n,r)}return n[o].exports}for(var i="function"==typeof require&&require,o=0;o; +declare function makeError( + name: string +): makeError.Constructor; /** * Set the constructor prototype to `BaseError`. */ -declare function makeError(super_: { new (...args: any[]): T }): makeError.Constructor; +declare function makeError(super_: { + new (...args: any[]): T; +}): makeError.Constructor; /** * Create a specialized error instance. */ -declare function makeError(name: string | Function, super_: K): K & makeError.SpecializedConstructor; +declare function makeError( + name: string | Function, + super_: K +): K & makeError.SpecializedConstructor; -declare module makeError { +declare namespace makeError { /** * Use with ES2015+ inheritance. */ - export class BaseError implements Error { + export class BaseError extends Error { message: string; name: string; stack: string; @@ -25,15 +32,15 @@ declare module makeError { constructor(message?: string); } - export interface Constructor { + export interface Constructor { new (message?: string): T; - super_: any - prototype: T + super_: any; + prototype: T; } - export interface SpecializedConstructor { - super_: any - prototype: T + export interface SpecializedConstructor { + super_: any; + prototype: T; } } diff --git a/node_modules/make-error/index.js b/node_modules/make-error/index.js index 9fbf6f002..fab604076 100644 --- a/node_modules/make-error/index.js +++ b/node_modules/make-error/index.js @@ -1,68 +1,65 @@ // ISC @ Julien Fontanet -'use strict' +"use strict"; // =================================================================== -var construct = typeof Reflect !== 'undefined' ? Reflect.construct : undefined -var defineProperty = Object.defineProperty +var construct = typeof Reflect !== "undefined" ? Reflect.construct : undefined; +var defineProperty = Object.defineProperty; // ------------------------------------------------------------------- -var captureStackTrace = Error.captureStackTrace +var captureStackTrace = Error.captureStackTrace; if (captureStackTrace === undefined) { - captureStackTrace = function captureStackTrace (error) { - var container = new Error() + captureStackTrace = function captureStackTrace(error) { + var container = new Error(); - defineProperty(error, 'stack', { + defineProperty(error, "stack", { configurable: true, - get: function getStack () { - var stack = container.stack + get: function getStack() { + var stack = container.stack; // Replace property with value for faster future accesses. - defineProperty(this, 'stack', { + defineProperty(this, "stack", { configurable: true, value: stack, - writable: true - }) + writable: true, + }); - return stack + return stack; }, - set: function setStack (stack) { - defineProperty(error, 'stack', { + set: function setStack(stack) { + defineProperty(error, "stack", { configurable: true, value: stack, - writable: true - }) - } - }) - } + writable: true, + }); + }, + }); + }; } // ------------------------------------------------------------------- -function BaseError (message) { +function BaseError(message) { if (message !== undefined) { - defineProperty(this, 'message', { + defineProperty(this, "message", { configurable: true, value: message, - writable: true - }) + writable: true, + }); } - var cname = this.constructor.name - if ( - cname !== undefined && - cname !== this.name - ) { - defineProperty(this, 'name', { + var cname = this.constructor.name; + if (cname !== undefined && cname !== this.name) { + defineProperty(this, "name", { configurable: true, value: cname, - writable: true - }) + writable: true, + }); } - captureStackTrace(this, this.constructor) + captureStackTrace(this, this.constructor); } BaseError.prototype = Object.create(Error.prototype, { @@ -70,65 +67,72 @@ BaseError.prototype = Object.create(Error.prototype, { constructor: { configurable: true, value: BaseError, - writable: true - } -}) + writable: true, + }, +}); // ------------------------------------------------------------------- // Sets the name of a function if possible (depends of the JS engine). -var setFunctionName = (function () { - function setFunctionName (fn, name) { - return defineProperty(fn, 'name', { +var setFunctionName = (function() { + function setFunctionName(fn, name) { + return defineProperty(fn, "name", { configurable: true, - value: name - }) + value: name, + }); } try { - var f = function () {} - setFunctionName(f, 'foo') - if (f.name === 'foo') { - return setFunctionName + var f = function() {}; + setFunctionName(f, "foo"); + if (f.name === "foo") { + return setFunctionName; } } catch (_) {} -})() +})(); // ------------------------------------------------------------------- -function makeError (constructor, super_) { +function makeError(constructor, super_) { if (super_ == null || super_ === Error) { - super_ = BaseError - } else if (typeof super_ !== 'function') { - throw new TypeError('super_ should be a function') + super_ = BaseError; + } else if (typeof super_ !== "function") { + throw new TypeError("super_ should be a function"); } - var name - if (typeof constructor === 'string') { - name = constructor - constructor = construct !== undefined - ? function () { return construct(super_, arguments, this.constructor) } - : function () { super_.apply(this, arguments) } + var name; + if (typeof constructor === "string") { + name = constructor; + constructor = + construct !== undefined + ? function() { + return construct(super_, arguments, this.constructor); + } + : function() { + super_.apply(this, arguments); + }; // If the name can be set, do it once and for all. if (setFunctionName !== undefined) { - setFunctionName(constructor, name) - name = undefined + setFunctionName(constructor, name); + name = undefined; } - } else if (typeof constructor !== 'function') { - throw new TypeError('constructor should be either a string or a function') + } else if (typeof constructor !== "function") { + throw new TypeError("constructor should be either a string or a function"); } // Also register the super constructor also as `constructor.super_` just // like Node's `util.inherits()`. - constructor.super_ = constructor['super'] = super_ + // + // eslint-disable-next-line dot-notation + constructor.super_ = constructor["super"] = super_; var properties = { constructor: { configurable: true, value: constructor, - writable: true - } - } + writable: true, + }, + }; // If the name could not be set on the constructor, set it on the // prototype. @@ -136,12 +140,12 @@ function makeError (constructor, super_) { properties.name = { configurable: true, value: name, - writable: true - } + writable: true, + }; } - constructor.prototype = Object.create(super_.prototype, properties) + constructor.prototype = Object.create(super_.prototype, properties); - return constructor + return constructor; } -exports = module.exports = makeError -exports.BaseError = BaseError +exports = module.exports = makeError; +exports.BaseError = BaseError; diff --git a/node_modules/make-error/package.json b/node_modules/make-error/package.json index 5acf46337..368e09390 100644 --- a/node_modules/make-error/package.json +++ b/node_modules/make-error/package.json @@ -1,33 +1,27 @@ { - "_args": [ - [ - "make-error@1.3.5", - "/Users/drew.heavner/Documents/Github/sign-android-release" - ] - ], - "_development": true, - "_from": "make-error@1.3.5", - "_id": "make-error@1.3.5", + "_from": "make-error@1.x", + "_id": "make-error@1.3.6", "_inBundle": false, - "_integrity": "sha512-c3sIjNUow0+8swNwVpqoH4YCShKNFkMaw6oH1mNS2haDZQqkeZFlHS3dhoeEbKKmJB4vXpJucU6oH75aDYeE9g==", + "_integrity": "sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw==", "_location": "/make-error", "_phantomChildren": {}, "_requested": { - "type": "version", + "type": "range", "registry": true, - "raw": "make-error@1.3.5", + "raw": "make-error@1.x", "name": "make-error", "escapedName": "make-error", - "rawSpec": "1.3.5", + "rawSpec": "1.x", "saveSpec": null, - "fetchSpec": "1.3.5" + "fetchSpec": "1.x" }, "_requiredBy": [ "/ts-jest" ], - "_resolved": "https://registry.npmjs.org/make-error/-/make-error-1.3.5.tgz", - "_spec": "1.3.5", - "_where": "/Users/drew.heavner/Documents/Github/sign-android-release", + "_resolved": "https://registry.npmjs.org/make-error/-/make-error-1.3.6.tgz", + "_shasum": "2eb2e37ea9b67c4891f684a1394799af484cf7a2", + "_spec": "make-error@1.x", + "_where": "/Users/drew.heavner/Documents/Github/sign-android-release/node_modules/ts-jest", "author": { "name": "Julien Fontanet", "email": "julien.fontanet@isonoe.net" @@ -35,12 +29,21 @@ "bugs": { "url": "https://github.com/JsCommunity/make-error/issues" }, + "bundleDependencies": false, + "deprecated": false, "description": "Make your own error types!", "devDependencies": { - "browserify": "^14.5.0", - "husky": "^0.14.3", - "jest": "^20", - "standard": "^10.0.3", + "browserify": "^16.2.3", + "eslint": "^6.5.1", + "eslint-config-prettier": "^6.4.0", + "eslint-config-standard": "^14.1.0", + "eslint-plugin-import": "^2.14.0", + "eslint-plugin-node": "^10.0.0", + "eslint-plugin-promise": "^4.0.1", + "eslint-plugin-standard": "^4.0.0", + "husky": "^3.0.9", + "jest": "^24", + "prettier": "^1.14.3", "uglify-js": "^3.3.2" }, "files": [ @@ -49,6 +52,11 @@ "index.d.ts" ], "homepage": "https://github.com/JsCommunity/make-error", + "husky": { + "hooks": { + "commit-msg": "npm run test" + } + }, "jest": { "testEnvironment": "node" }, @@ -74,11 +82,11 @@ "url": "git://github.com/JsCommunity/make-error.git" }, "scripts": { - "commitmsg": "yarn test", "dev-test": "jest --watch", + "format": "prettier --write '**'", "prepublishOnly": "mkdir -p dist && browserify -s makeError index.js | uglifyjs -c > dist/make-error.js", - "pretest": "standard", + "pretest": "eslint --ignore-path .gitignore .", "test": "jest" }, - "version": "1.3.5" + "version": "1.3.6" } diff --git a/node_modules/map-age-cleaner/dist/index.d.ts b/node_modules/map-age-cleaner/dist/index.d.ts deleted file mode 100644 index fbf5ce08f..000000000 --- a/node_modules/map-age-cleaner/dist/index.d.ts +++ /dev/null @@ -1,20 +0,0 @@ -interface Entry { - [key: string]: any; -} -interface MaxAgeEntry extends Entry { - maxAge: number; -} -/** - * Automatically cleanup the items in the provided `map`. The property of the expiration timestamp should be named `maxAge`. - * - * @param map - Map instance which should be cleaned up. - */ -export default function mapAgeCleaner(map: Map): any; -/** - * Automatically cleanup the items in the provided `map`. - * - * @param map - Map instance which should be cleaned up. - * @param property - Name of the property which olds the expiry timestamp. - */ -export default function mapAgeCleaner(map: Map, property: string): any; -export {}; diff --git a/node_modules/map-age-cleaner/dist/index.js b/node_modules/map-age-cleaner/dist/index.js deleted file mode 100644 index ff137dec8..000000000 --- a/node_modules/map-age-cleaner/dist/index.js +++ /dev/null @@ -1,92 +0,0 @@ -"use strict"; -var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } - function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } - function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; -var __importDefault = (this && this.__importDefault) || function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; -}; -Object.defineProperty(exports, "__esModule", { value: true }); -const p_defer_1 = __importDefault(require("p-defer")); -function mapAgeCleaner(map, property = 'maxAge') { - let processingKey; - let processingTimer; - let processingDeferred; - const cleanup = () => __awaiter(this, void 0, void 0, function* () { - if (processingKey !== undefined) { - // If we are already processing an item, we can safely exit - return; - } - const setupTimer = (item) => __awaiter(this, void 0, void 0, function* () { - processingDeferred = p_defer_1.default(); - const delay = item[1][property] - Date.now(); - if (delay <= 0) { - // Remove the item immediately if the delay is equal to or below 0 - map.delete(item[0]); - processingDeferred.resolve(); - return; - } - // Keep track of the current processed key - processingKey = item[0]; - processingTimer = setTimeout(() => { - // Remove the item when the timeout fires - map.delete(item[0]); - if (processingDeferred) { - processingDeferred.resolve(); - } - }, delay); - // tslint:disable-next-line:strict-type-predicates - if (typeof processingTimer.unref === 'function') { - // Don't hold up the process from exiting - processingTimer.unref(); - } - return processingDeferred.promise; - }); - try { - for (const entry of map) { - yield setupTimer(entry); - } - } - catch (_a) { - // Do nothing if an error occurs, this means the timer was cleaned up and we should stop processing - } - processingKey = undefined; - }); - const reset = () => { - processingKey = undefined; - if (processingTimer !== undefined) { - clearTimeout(processingTimer); - processingTimer = undefined; - } - if (processingDeferred !== undefined) { // tslint:disable-line:early-exit - processingDeferred.reject(undefined); - processingDeferred = undefined; - } - }; - const originalSet = map.set.bind(map); - map.set = (key, value) => { - if (map.has(key)) { - // If the key already exist, remove it so we can add it back at the end of the map. - map.delete(key); - } - // Call the original `map.set` - const result = originalSet(key, value); - // If we are already processing a key and the key added is the current processed key, stop processing it - if (processingKey && processingKey === key) { - reset(); - } - // Always run the cleanup method in case it wasn't started yet - cleanup(); // tslint:disable-line:no-floating-promises - return result; - }; - cleanup(); // tslint:disable-line:no-floating-promises - return map; -} -exports.default = mapAgeCleaner; -// Add support for CJS -module.exports = mapAgeCleaner; -module.exports.default = mapAgeCleaner; diff --git a/node_modules/map-age-cleaner/license b/node_modules/map-age-cleaner/license deleted file mode 100644 index 0711ab006..000000000 --- a/node_modules/map-age-cleaner/license +++ /dev/null @@ -1,9 +0,0 @@ -MIT License - -Copyright (c) Sam Verschueren (github.com/SamVerschueren) - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/map-age-cleaner/package.json b/node_modules/map-age-cleaner/package.json deleted file mode 100644 index a45ec8cc5..000000000 --- a/node_modules/map-age-cleaner/package.json +++ /dev/null @@ -1,95 +0,0 @@ -{ - "_args": [ - [ - "map-age-cleaner@0.1.3", - "/Users/drew.heavner/Documents/Github/sign-android-release" - ] - ], - "_development": true, - "_from": "map-age-cleaner@0.1.3", - "_id": "map-age-cleaner@0.1.3", - "_inBundle": false, - "_integrity": "sha512-bJzx6nMoP6PDLPBFmg7+xRKeFZvFboMrGlxmNj9ClvX53KrmvM5bXFXEWjbz4cz1AFn+jWJ9z/DJSz7hrs0w3w==", - "_location": "/map-age-cleaner", - "_phantomChildren": {}, - "_requested": { - "type": "version", - "registry": true, - "raw": "map-age-cleaner@0.1.3", - "name": "map-age-cleaner", - "escapedName": "map-age-cleaner", - "rawSpec": "0.1.3", - "saveSpec": null, - "fetchSpec": "0.1.3" - }, - "_requiredBy": [ - "/mem" - ], - "_resolved": "https://registry.npmjs.org/map-age-cleaner/-/map-age-cleaner-0.1.3.tgz", - "_spec": "0.1.3", - "_where": "/Users/drew.heavner/Documents/Github/sign-android-release", - "author": { - "name": "Sam Verschueren", - "email": "sam.verschueren@gmail.com", - "url": "github.com/SamVerschueren" - }, - "bugs": { - "url": "https://github.com/SamVerschueren/map-age-cleaner/issues" - }, - "dependencies": { - "p-defer": "^1.0.0" - }, - "description": "Automatically cleanup expired items in a Map", - "devDependencies": { - "@types/delay": "^2.0.1", - "@types/node": "^10.7.1", - "ava": "^0.25.0", - "codecov": "^3.0.0", - "del-cli": "^1.1.0", - "delay": "^3.0.0", - "nyc": "^12.0.0", - "tslint": "^5.11.0", - "tslint-xo": "^0.9.0", - "typescript": "^3.0.1" - }, - "engines": { - "node": ">=6" - }, - "files": [ - "dist/index.js", - "dist/index.d.ts" - ], - "homepage": "https://github.com/SamVerschueren/map-age-cleaner#readme", - "keywords": [ - "map", - "age", - "cleaner", - "maxage", - "expire", - "expiration", - "expiring" - ], - "license": "MIT", - "main": "dist/index.js", - "name": "map-age-cleaner", - "nyc": { - "exclude": [ - "dist/test.js" - ] - }, - "repository": { - "type": "git", - "url": "git+https://github.com/SamVerschueren/map-age-cleaner.git" - }, - "scripts": { - "build": "npm run clean && tsc", - "clean": "del-cli dist", - "lint": "tslint --format stylish --project .", - "prepublishOnly": "npm run build", - "pretest": "npm run build -- --sourceMap", - "test": "npm run lint && nyc ava dist/test.js" - }, - "sideEffects": false, - "typings": "dist/index.d.ts", - "version": "0.1.3" -} diff --git a/node_modules/map-age-cleaner/readme.md b/node_modules/map-age-cleaner/readme.md deleted file mode 100644 index 471d93353..000000000 --- a/node_modules/map-age-cleaner/readme.md +++ /dev/null @@ -1,67 +0,0 @@ -# map-age-cleaner - -[![Build Status](https://travis-ci.org/SamVerschueren/map-age-cleaner.svg?branch=master)](https://travis-ci.org/SamVerschueren/map-age-cleaner) [![codecov](https://codecov.io/gh/SamVerschueren/map-age-cleaner/badge.svg?branch=master)](https://codecov.io/gh/SamVerschueren/map-age-cleaner?branch=master) - -> Automatically cleanup expired items in a Map - - -## Install - -``` -$ npm install map-age-cleaner -``` - - -## Usage - -```js -import mapAgeCleaner from 'map-age-cleaner'; - -const map = new Map([ - ['unicorn', {data: '🦄', maxAge: Date.now() + 1000}] -]); - -mapAgeCleaner(map); - -map.has('unicorn'); -//=> true - -// Wait for 1 second... - -map.has('unicorn'); -//=> false -``` - -> **Note**: Items have to be ordered ascending based on the expiry property. This means that the item which will be expired first, should be in the first position of the `Map`. - - -## API - -### mapAgeCleaner(map, [property]) - -Returns the `Map` instance. - -#### map - -Type: `Map` - -Map instance which should be cleaned up. - -#### property - -Type: `string`
-Default: `maxAge` - -Name of the property which olds the expiry timestamp. - - -## Related - -- [expiry-map](https://github.com/SamVerschueren/expiry-map) - A `Map` implementation with expirable items -- [expiry-set](https://github.com/SamVerschueren/expiry-set) - A `Set` implementation with expirable keys -- [mem](https://github.com/sindresorhus/mem) - Memoize functions - - -## License - -MIT © [Sam Verschueren](https://github.com/SamVerschueren) diff --git a/node_modules/mem/index.d.ts b/node_modules/mem/index.d.ts deleted file mode 100644 index 786625520..000000000 --- a/node_modules/mem/index.d.ts +++ /dev/null @@ -1,96 +0,0 @@ -declare namespace mem { - interface CacheStorage { - has(key: KeyType): boolean; - get(key: KeyType): ValueType | undefined; - set(key: KeyType, value: ValueType): void; - delete(key: KeyType): void; - clear?: () => void; - } - - interface Options< - ArgumentsType extends unknown[], - CacheKeyType extends unknown, - ReturnType extends unknown - > { - /** - Milliseconds until the cache expires. - - @default Infinity - */ - readonly maxAge?: number; - - /** - Determines the cache key for storing the result based on the function arguments. By default, if there's only one argument and it's a [primitive](https://developer.mozilla.org/en-US/docs/Glossary/Primitive), it's used directly as a key, otherwise it's all the function arguments JSON stringified as an array. - - You could for example change it to only cache on the first argument `x => JSON.stringify(x)`. - */ - readonly cacheKey?: (...arguments: ArgumentsType) => CacheKeyType; - - /** - Use a different cache storage. You could for example use a `WeakMap` instead or [`quick-lru`](https://github.com/sindresorhus/quick-lru) for a LRU cache. - - @default new Map() - */ - readonly cache?: CacheStorage; - - /** - Cache rejected promises. - - @default false - */ - readonly cachePromiseRejection?: boolean; - } -} - -declare const mem: { - /** - [Memoize](https://en.wikipedia.org/wiki/Memoization) functions - An optimization used to speed up consecutive function calls by caching the result of calls with identical input. - - @param fn - Function to be memoized. - - @example - ``` - import mem = require('mem'); - - let i = 0; - const counter = () => ++i; - const memoized = mem(counter); - - memoized('foo'); - //=> 1 - - // Cached as it's the same arguments - memoized('foo'); - //=> 1 - - // Not cached anymore as the arguments changed - memoized('bar'); - //=> 2 - - memoized('bar'); - //=> 2 - ``` - */ - < - ArgumentsType extends unknown[], - ReturnType extends unknown, - CacheKeyType extends unknown - >( - fn: (...arguments: ArgumentsType) => ReturnType, - options?: mem.Options - ): (...arguments: ArgumentsType) => ReturnType; - - /** - Clear all cached data of a memoized function. - - @param fn - Memoized function. - */ - clear( - fn: (...arguments: ArgumentsType) => ReturnType - ): void; - - // TODO: Remove this for the next major release - default: typeof mem; -}; - -export = mem; diff --git a/node_modules/mem/index.js b/node_modules/mem/index.js deleted file mode 100644 index 51faf012c..000000000 --- a/node_modules/mem/index.js +++ /dev/null @@ -1,88 +0,0 @@ -'use strict'; -const mimicFn = require('mimic-fn'); -const isPromise = require('p-is-promise'); -const mapAgeCleaner = require('map-age-cleaner'); - -const cacheStore = new WeakMap(); - -const defaultCacheKey = (...arguments_) => { - if (arguments_.length === 0) { - return '__defaultKey'; - } - - if (arguments_.length === 1) { - const [firstArgument] = arguments_; - if ( - firstArgument === null || - firstArgument === undefined || - (typeof firstArgument !== 'function' && typeof firstArgument !== 'object') - ) { - return firstArgument; - } - } - - return JSON.stringify(arguments_); -}; - -const mem = (fn, options) => { - options = Object.assign({ - cacheKey: defaultCacheKey, - cache: new Map(), - cachePromiseRejection: false - }, options); - - if (typeof options.maxAge === 'number') { - mapAgeCleaner(options.cache); - } - - const {cache} = options; - options.maxAge = options.maxAge || 0; - - const setData = (key, data) => { - cache.set(key, { - data, - maxAge: Date.now() + options.maxAge - }); - }; - - const memoized = function (...arguments_) { - const key = options.cacheKey(...arguments_); - - if (cache.has(key)) { - return cache.get(key).data; - } - - const cacheItem = fn.call(this, ...arguments_); - - setData(key, cacheItem); - - if (isPromise(cacheItem) && options.cachePromiseRejection === false) { - // Remove rejected promises from cache unless `cachePromiseRejection` is set to `true` - cacheItem.catch(() => cache.delete(key)); - } - - return cacheItem; - }; - - try { - // The below call will throw in some host environments - // See https://github.com/sindresorhus/mimic-fn/issues/10 - mimicFn(memoized, fn); - } catch (_) {} - - cacheStore.set(memoized, options.cache); - - return memoized; -}; - -module.exports = mem; -// TODO: Remove this for the next major release -module.exports.default = mem; - -module.exports.clear = fn => { - const cache = cacheStore.get(fn); - - if (cache && typeof cache.clear === 'function') { - cache.clear(); - } -}; diff --git a/node_modules/mem/license b/node_modules/mem/license deleted file mode 100644 index e7af2f771..000000000 --- a/node_modules/mem/license +++ /dev/null @@ -1,9 +0,0 @@ -MIT License - -Copyright (c) Sindre Sorhus (sindresorhus.com) - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/mem/package.json b/node_modules/mem/package.json deleted file mode 100644 index 8c1d4239a..000000000 --- a/node_modules/mem/package.json +++ /dev/null @@ -1,82 +0,0 @@ -{ - "_args": [ - [ - "mem@4.3.0", - "/Users/drew.heavner/Documents/Github/sign-android-release" - ] - ], - "_development": true, - "_from": "mem@4.3.0", - "_id": "mem@4.3.0", - "_inBundle": false, - "_integrity": "sha512-qX2bG48pTqYRVmDB37rn/6PT7LcR8T7oAX3bf99u1Tt1nzxYfxkgqDwUwolPlXweM0XzBOBFzSx4kfp7KP1s/w==", - "_location": "/mem", - "_phantomChildren": {}, - "_requested": { - "type": "version", - "registry": true, - "raw": "mem@4.3.0", - "name": "mem", - "escapedName": "mem", - "rawSpec": "4.3.0", - "saveSpec": null, - "fetchSpec": "4.3.0" - }, - "_requiredBy": [ - "/os-locale" - ], - "_resolved": "https://registry.npmjs.org/mem/-/mem-4.3.0.tgz", - "_spec": "4.3.0", - "_where": "/Users/drew.heavner/Documents/Github/sign-android-release", - "author": { - "name": "Sindre Sorhus", - "email": "sindresorhus@gmail.com", - "url": "sindresorhus.com" - }, - "bugs": { - "url": "https://github.com/sindresorhus/mem/issues" - }, - "dependencies": { - "map-age-cleaner": "^0.1.1", - "mimic-fn": "^2.0.0", - "p-is-promise": "^2.0.0" - }, - "description": "Memoize functions - An optimization used to speed up consecutive function calls by caching the result of calls with identical input", - "devDependencies": { - "ava": "^1.4.1", - "delay": "^4.1.0", - "tsd": "^0.7.1", - "xo": "^0.24.0" - }, - "engines": { - "node": ">=6" - }, - "files": [ - "index.js", - "index.d.ts" - ], - "homepage": "https://github.com/sindresorhus/mem#readme", - "keywords": [ - "memoize", - "function", - "mem", - "memoization", - "cache", - "caching", - "optimize", - "performance", - "ttl", - "expire", - "promise" - ], - "license": "MIT", - "name": "mem", - "repository": { - "type": "git", - "url": "git+https://github.com/sindresorhus/mem.git" - }, - "scripts": { - "test": "xo && ava && tsd" - }, - "version": "4.3.0" -} diff --git a/node_modules/mem/readme.md b/node_modules/mem/readme.md deleted file mode 100644 index add4222b6..000000000 --- a/node_modules/mem/readme.md +++ /dev/null @@ -1,167 +0,0 @@ -# mem [![Build Status](https://travis-ci.org/sindresorhus/mem.svg?branch=master)](https://travis-ci.org/sindresorhus/mem) - -> [Memoize](https://en.wikipedia.org/wiki/Memoization) functions - An optimization used to speed up consecutive function calls by caching the result of calls with identical input - -Memory is automatically released when an item expires. - - -## Install - -``` -$ npm install mem -``` - - -## Usage - -```js -const mem = require('mem'); - -let i = 0; -const counter = () => ++i; -const memoized = mem(counter); - -memoized('foo'); -//=> 1 - -// Cached as it's the same arguments -memoized('foo'); -//=> 1 - -// Not cached anymore as the arguments changed -memoized('bar'); -//=> 2 - -memoized('bar'); -//=> 2 -``` - -##### Works fine with promise returning functions - -```js -const mem = require('mem'); - -let i = 0; -const counter = async () => ++i; -const memoized = mem(counter); - -(async () => { - console.log(await memoized()); - //=> 1 - - // The return value didn't increase as it's cached - console.log(await memoized()); - //=> 1 -})(); -``` - -```js -const mem = require('mem'); -const got = require('got'); -const delay = require('delay'); - -const memGot = mem(got, {maxAge: 1000}); - -(async () => { - await memGot('sindresorhus.com'); - - // This call is cached - await memGot('sindresorhus.com'); - - await delay(2000); - - // This call is not cached as the cache has expired - await memGot('sindresorhus.com'); -})(); -``` - - -## API - -### mem(fn, [options]) - -#### fn - -Type: `Function` - -Function to be memoized. - -#### options - -Type: `Object` - -##### maxAge - -Type: `number`
-Default: `Infinity` - -Milliseconds until the cache expires. - -##### cacheKey - -Type: `Function` - -Determines the cache key for storing the result based on the function arguments. By default, if there's only one argument and it's a [primitive](https://developer.mozilla.org/en-US/docs/Glossary/Primitive), it's used directly as a key, otherwise it's all the function arguments JSON stringified as an array. - -You could for example change it to only cache on the first argument `x => JSON.stringify(x)`. - -##### cache - -Type: `Object`
-Default: `new Map()` - -Use a different cache storage. Must implement the following methods: `.has(key)`, `.get(key)`, `.set(key, value)`, `.delete(key)`, and optionally `.clear()`. You could for example use a `WeakMap` instead or [`quick-lru`](https://github.com/sindresorhus/quick-lru) for a LRU cache. - -##### cachePromiseRejection - -Type: `boolean`
-Default: `false` - -Cache rejected promises. - -### mem.clear(fn) - -Clear all cached data of a memoized function. - -#### fn - -Type: `Function` - -Memoized function. - - -## Tips - -### Cache statistics - -If you want to know how many times your cache had a hit or a miss, you can make use of [stats-map](https://github.com/SamVerschueren/stats-map) as a replacement for the default cache. - -#### Example - -```js -const mem = require('mem'); -const StatsMap = require('stats-map'); -const got = require('got'); - -const cache = new StatsMap(); -const memGot = mem(got, {cache}); - -(async () => { - await memGot('sindresorhus.com'); - await memGot('sindresorhus.com'); - await memGot('sindresorhus.com'); - - console.log(cache.stats); - //=> {hits: 2, misses: 1} -})(); -``` - - -## Related - -- [p-memoize](https://github.com/sindresorhus/p-memoize) - Memoize promise-returning & async functions - - -## License - -MIT © [Sindre Sorhus](https://sindresorhus.com) diff --git a/node_modules/merge-stream/README.md b/node_modules/merge-stream/README.md index 966bde69c..0d5484115 100644 --- a/node_modules/merge-stream/README.md +++ b/node_modules/merge-stream/README.md @@ -50,6 +50,29 @@ stream = require('merge-stream')(); return stream.isEmpty() ? null : stream; ``` +## Gulp example + +An example use case for **merge-stream** is to combine parts of a task in a project's **gulpfile.js** like this: + +```js +const gulp = require('gulp'); +const htmlValidator = require('gulp-w3c-html-validator'); +const jsHint = require('gulp-jshint'); +const mergeStream = require('merge-stream'); + +function lint() { + return mergeStream( + gulp.src('src/*.html') + .pipe(htmlValidator()) + .pipe(htmlValidator.reporter()), + gulp.src('src/*.js') + .pipe(jsHint()) + .pipe(jsHint.reporter()) + ); +} +gulp.task('lint', lint); +``` + ## License MIT diff --git a/node_modules/merge-stream/index.js b/node_modules/merge-stream/index.js index f907ad65a..b1a9e1a02 100644 --- a/node_modules/merge-stream/index.js +++ b/node_modules/merge-stream/index.js @@ -1,6 +1,6 @@ 'use strict'; -var PassThrough = require('readable-stream/passthrough') +const { PassThrough } = require('stream'); module.exports = function (/*streams...*/) { var sources = [] diff --git a/node_modules/merge-stream/package.json b/node_modules/merge-stream/package.json index 9c3a752ab..f1673115b 100644 --- a/node_modules/merge-stream/package.json +++ b/node_modules/merge-stream/package.json @@ -1,33 +1,27 @@ { - "_args": [ - [ - "merge-stream@1.0.1", - "/Users/drew.heavner/Documents/Github/sign-android-release" - ] - ], - "_development": true, - "_from": "merge-stream@1.0.1", - "_id": "merge-stream@1.0.1", + "_from": "merge-stream@^2.0.0", + "_id": "merge-stream@2.0.0", "_inBundle": false, - "_integrity": "sha1-QEEgLVCKNCugAXQAjfDCUbjBNeE=", + "_integrity": "sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w==", "_location": "/merge-stream", "_phantomChildren": {}, "_requested": { - "type": "version", + "type": "range", "registry": true, - "raw": "merge-stream@1.0.1", + "raw": "merge-stream@^2.0.0", "name": "merge-stream", "escapedName": "merge-stream", - "rawSpec": "1.0.1", + "rawSpec": "^2.0.0", "saveSpec": null, - "fetchSpec": "1.0.1" + "fetchSpec": "^2.0.0" }, "_requiredBy": [ "/jest-worker" ], - "_resolved": "https://registry.npmjs.org/merge-stream/-/merge-stream-1.0.1.tgz", - "_spec": "1.0.1", - "_where": "/Users/drew.heavner/Documents/Github/sign-android-release", + "_resolved": "https://registry.npmjs.org/merge-stream/-/merge-stream-2.0.0.tgz", + "_shasum": "52823629a14dd00c9770fb6ad47dc6310f2c1f60", + "_spec": "merge-stream@^2.0.0", + "_where": "/Users/drew.heavner/Documents/Github/sign-android-release/node_modules/jest-worker", "author": { "name": "Stephen Sugden", "email": "me@stephensugden.com" @@ -35,13 +29,13 @@ "bugs": { "url": "https://github.com/grncdr/merge-stream/issues" }, - "dependencies": { - "readable-stream": "^2.0.1" - }, + "bundleDependencies": false, + "dependencies": {}, + "deprecated": false, "description": "Create a stream that emits events from multiple other streams", "devDependencies": { "from2": "^2.0.3", - "istanbul": "^0.3.2" + "istanbul": "^0.4.5" }, "files": [ "index.js" @@ -56,5 +50,5 @@ "scripts": { "test": "istanbul cover test.js && istanbul check-cover --statements 100 --branches 100" }, - "version": "1.0.1" + "version": "2.0.0" } diff --git a/node_modules/mime-db/HISTORY.md b/node_modules/mime-db/HISTORY.md index 0907d627f..85c0319c8 100644 --- a/node_modules/mime-db/HISTORY.md +++ b/node_modules/mime-db/HISTORY.md @@ -1,3 +1,32 @@ +1.44.0 / 2020-04-22 +=================== + + * Add charsets from IANA + * Add extension `.cjs` to `application/node` + * Add new upstream MIME types + +1.43.0 / 2020-01-05 +=================== + + * Add `application/x-keepass2` with extension `.kdbx` + * Add extension `.mxmf` to `audio/mobile-xmf` + * Add extensions from IANA for `application/*+xml` types + * Add new upstream MIME types + +1.42.0 / 2019-09-25 +=================== + + * Add `image/vnd.ms-dds` with extension `.dds` + * Add new upstream MIME types + * Remove compressible from `multipart/mixed` + +1.41.0 / 2019-08-30 +=================== + + * Add new upstream MIME types + * Add `application/toml` with extension `.toml` + * Mark `font/ttf` as compressible + 1.40.0 / 2019-04-20 =================== diff --git a/node_modules/mime-db/README.md b/node_modules/mime-db/README.md index dcc9d093a..d6a6f80aa 100644 --- a/node_modules/mime-db/README.md +++ b/node_modules/mime-db/README.md @@ -34,11 +34,13 @@ https://cdn.jsdelivr.net/gh/jshttp/mime-db@master/db.json ## Usage + + ```js -var db = require('mime-db'); +var db = require('mime-db') // grab data on .js files -var data = db['application/javascript']; +var data = db['application/javascript'] ``` ## Data Structure @@ -76,13 +78,19 @@ and the values being an object with the following keys: To update the build, run `npm run build`. -## Adding Custom Media Types +### Adding Custom Media Types The best way to get new media types included in this library is to register them with the IANA. The community registration procedure is outlined in [RFC 6838 section 5](http://tools.ietf.org/html/rfc6838#section-5). Types registered with the IANA are automatically pulled into this library. +If that is not possible / feasible, they can be added directly here as a +"custom" type. To do this, it is required to have a primary source that +definitively lists the media type. If an extension is going to be listed as +associateed with this media type, the source must definitively link the +media type and extension as well. + [coveralls-image]: https://badgen.net/coveralls/c/github/jshttp/mime-db/master [coveralls-url]: https://coveralls.io/r/jshttp/mime-db?branch=master [node-image]: https://badgen.net/npm/node/mime-db diff --git a/node_modules/mime-db/db.json b/node_modules/mime-db/db.json index a5fc98708..e69f352d9 100644 --- a/node_modules/mime-db/db.json +++ b/node_modules/mime-db/db.json @@ -4,6 +4,7 @@ }, "application/3gpdash-qoe-report+xml": { "source": "iana", + "charset": "UTF-8", "compressible": true }, "application/3gpp-ims+xml": { @@ -60,6 +61,14 @@ "source": "iana", "compressible": true }, + "application/alto-updatestreamcontrol+json": { + "source": "iana", + "compressible": true + }, + "application/alto-updatestreamparams+json": { + "source": "iana", + "compressible": true + }, "application/aml": { "source": "iana" }, @@ -92,7 +101,8 @@ }, "application/atomdeleted+xml": { "source": "iana", - "compressible": true + "compressible": true, + "extensions": ["atomdeleted"] }, "application/atomicmail": { "source": "iana" @@ -104,15 +114,25 @@ }, "application/atsc-dwd+xml": { "source": "iana", - "compressible": true + "compressible": true, + "extensions": ["dwd"] + }, + "application/atsc-dynamic-event-message": { + "source": "iana" }, "application/atsc-held+xml": { + "source": "iana", + "compressible": true, + "extensions": ["held"] + }, + "application/atsc-rdt+json": { "source": "iana", "compressible": true }, "application/atsc-rsat+xml": { "source": "iana", - "compressible": true + "compressible": true, + "extensions": ["rsat"] }, "application/atxml": { "source": "iana" @@ -134,6 +154,7 @@ }, "application/beep+xml": { "source": "iana", + "charset": "UTF-8", "compressible": true }, "application/calendar+json": { @@ -142,7 +163,8 @@ }, "application/calendar+xml": { "source": "iana", - "compressible": true + "compressible": true, + "extensions": ["xcs"] }, "application/call-completion": { "source": "iana" @@ -150,9 +172,17 @@ "application/cals-1840": { "source": "iana" }, + "application/cap+xml": { + "source": "iana", + "charset": "UTF-8", + "compressible": true + }, "application/cbor": { "source": "iana" }, + "application/cbor-seq": { + "source": "iana" + }, "application/cccex": { "source": "iana" }, @@ -167,7 +197,8 @@ }, "application/cdfx+xml": { "source": "iana", - "compressible": true + "compressible": true, + "extensions": ["cdfx"] }, "application/cdmi-capability": { "source": "iana", @@ -206,6 +237,10 @@ "application/cfw": { "source": "iana" }, + "application/clue+xml": { + "source": "iana", + "compressible": true + }, "application/clue_info+xml": { "source": "iana", "compressible": true @@ -330,6 +365,9 @@ "compressible": true, "extensions": ["dbk"] }, + "application/dots+cbor": { + "source": "iana" + }, "application/dskpp+xml": { "source": "iana", "compressible": true @@ -403,7 +441,8 @@ }, "application/emotionml+xml": { "source": "iana", - "compressible": true + "compressible": true, + "extensions": ["emotionml"] }, "application/encaprtp": { "source": "iana" @@ -436,14 +475,17 @@ }, "application/fdt+xml": { "source": "iana", - "compressible": true + "compressible": true, + "extensions": ["fdt"] }, "application/fhir+json": { "source": "iana", + "charset": "UTF-8", "compressible": true }, "application/fhir+xml": { "source": "iana", + "charset": "UTF-8", "compressible": true }, "application/fido.trusted-apps+json": { @@ -452,6 +494,9 @@ "application/fits": { "source": "iana" }, + "application/flexfec": { + "source": "iana" + }, "application/font-sfnt": { "source": "iana" }, @@ -537,6 +582,7 @@ }, "application/im-iscomposing+xml": { "source": "iana", + "charset": "UTF-8", "compressible": true }, "application/index": { @@ -574,7 +620,8 @@ }, "application/its+xml": { "source": "iana", - "compressible": true + "compressible": true, + "extensions": ["its"] }, "application/java-archive": { "source": "apache", @@ -659,7 +706,8 @@ }, "application/lgr+xml": { "source": "iana", - "compressible": true + "compressible": true, + "extensions": ["lgr"] }, "application/link-format": { "source": "iana" @@ -677,6 +725,10 @@ "source": "iana", "compressible": true }, + "application/lpf+zip": { + "source": "iana", + "compressible": false + }, "application/lxf": { "source": "iana" }, @@ -813,13 +865,18 @@ "application/mikey": { "source": "iana" }, + "application/mipc": { + "source": "iana" + }, "application/mmt-aei+xml": { "source": "iana", - "compressible": true + "compressible": true, + "extensions": ["maei"] }, "application/mmt-usd+xml": { "source": "iana", - "compressible": true + "compressible": true, + "extensions": ["musd"] }, "application/mods+xml": { "source": "iana", @@ -857,18 +914,22 @@ }, "application/mrb-consumer+xml": { "source": "iana", - "compressible": true + "compressible": true, + "extensions": ["xdf"] }, "application/mrb-publish+xml": { "source": "iana", - "compressible": true + "compressible": true, + "extensions": ["xdf"] }, "application/msc-ivr+xml": { "source": "iana", + "charset": "UTF-8", "compressible": true }, "application/msc-mixer+xml": { "source": "iana", + "charset": "UTF-8", "compressible": true }, "application/msword": { @@ -880,6 +941,9 @@ "source": "iana", "compressible": true }, + "application/multipart-core": { + "source": "iana" + }, "application/mxf": { "source": "iana", "extensions": ["mxf"] @@ -896,10 +960,12 @@ "source": "iana" }, "application/news-checkgroups": { - "source": "iana" + "source": "iana", + "charset": "US-ASCII" }, "application/news-groupinfo": { - "source": "iana" + "source": "iana", + "charset": "US-ASCII" }, "application/news-transmission": { "source": "iana" @@ -909,7 +975,8 @@ "compressible": true }, "application/node": { - "source": "iana" + "source": "iana", + "extensions": ["cjs"] }, "application/nss": { "source": "iana" @@ -964,7 +1031,8 @@ }, "application/p2p-overlay+xml": { "source": "iana", - "compressible": true + "compressible": true, + "extensions": ["relo"] }, "application/parityfec": { "source": "iana" @@ -1006,10 +1074,12 @@ }, "application/pidf+xml": { "source": "iana", + "charset": "UTF-8", "compressible": true }, "application/pidf-diff+xml": { "source": "iana", + "charset": "UTF-8", "compressible": true }, "application/pkcs10": { @@ -1061,6 +1131,7 @@ }, "application/poc-settings+xml": { "source": "iana", + "charset": "UTF-8", "compressible": true }, "application/postscript": { @@ -1082,7 +1153,8 @@ }, "application/provenance+xml": { "source": "iana", - "compressible": true + "compressible": true, + "extensions": ["provx"] }, "application/prs.alvestrand.titrax-sheet": { "source": "iana" @@ -1113,6 +1185,10 @@ "compressible": true, "extensions": ["pskcxml"] }, + "application/pvd+json": { + "source": "iana", + "compressible": true + }, "application/qsig": { "source": "iana" }, @@ -1176,15 +1252,18 @@ }, "application/route-apd+xml": { "source": "iana", - "compressible": true + "compressible": true, + "extensions": ["rapd"] }, "application/route-s-tsid+xml": { "source": "iana", - "compressible": true + "compressible": true, + "extensions": ["sls"] }, "application/route-usd+xml": { "source": "iana", - "compressible": true + "compressible": true, + "extensions": ["rusd"] }, "application/rpki-ghostbusters": { "source": "iana", @@ -1233,6 +1312,9 @@ "source": "iana", "compressible": true }, + "application/sbe": { + "source": "iana" + }, "application/sbml+xml": { "source": "iana", "compressible": true, @@ -1277,6 +1359,14 @@ "compressible": true }, "application/senml+xml": { + "source": "iana", + "compressible": true, + "extensions": ["senmlx"] + }, + "application/senml-etch+cbor": { + "source": "iana" + }, + "application/senml-etch+json": { "source": "iana", "compressible": true }, @@ -1292,7 +1382,8 @@ }, "application/sensml+xml": { "source": "iana", - "compressible": true + "compressible": true, + "extensions": ["sensmlx"] }, "application/sensml-exi": { "source": "iana" @@ -1346,6 +1437,9 @@ "application/simplesymbolcontainer": { "source": "iana" }, + "application/sipc": { + "source": "iana" + }, "application/slate": { "source": "iana" }, @@ -1411,6 +1505,11 @@ "source": "iana", "compressible": true }, + "application/swid+xml": { + "source": "iana", + "compressible": true, + "extensions": ["swidtag"] + }, "application/tamp-apex-update": { "source": "iana" }, @@ -1451,6 +1550,10 @@ "source": "iana", "compressible": true }, + "application/td+json": { + "source": "iana", + "compressible": true + }, "application/tei+xml": { "source": "iana", "compressible": true, @@ -1484,6 +1587,10 @@ "application/tnauthlist": { "source": "iana" }, + "application/toml": { + "compressible": true, + "extensions": ["toml"] + }, "application/trickle-ice-sdpfrag": { "source": "iana" }, @@ -1492,7 +1599,8 @@ }, "application/ttml+xml": { "source": "iana", - "compressible": true + "compressible": true, + "extensions": ["ttml"] }, "application/tve-trigger": { "source": "iana" @@ -1512,7 +1620,8 @@ }, "application/urc-ressheet+xml": { "source": "iana", - "compressible": true + "compressible": true, + "extensions": ["rsheet"] }, "application/urc-targetdesc+xml": { "source": "iana", @@ -1538,7 +1647,8 @@ }, "application/vnd.1000minds.decision-model+xml": { "source": "iana", - "compressible": true + "compressible": true, + "extensions": ["1km"] }, "application/vnd.3gpp-prose+xml": { "source": "iana", @@ -1640,6 +1750,10 @@ "source": "iana", "compressible": true }, + "application/vnd.3gpp.mcvideo-info+xml": { + "source": "iana", + "compressible": true + }, "application/vnd.3gpp.mcvideo-location-info+xml": { "source": "iana", "compressible": true @@ -1771,9 +1885,36 @@ "application/vnd.afpc.afplinedata": { "source": "iana" }, + "application/vnd.afpc.afplinedata-pagedef": { + "source": "iana" + }, + "application/vnd.afpc.foca-charset": { + "source": "iana" + }, + "application/vnd.afpc.foca-codedfont": { + "source": "iana" + }, + "application/vnd.afpc.foca-codepage": { + "source": "iana" + }, "application/vnd.afpc.modca": { "source": "iana" }, + "application/vnd.afpc.modca-formdef": { + "source": "iana" + }, + "application/vnd.afpc.modca-mediummap": { + "source": "iana" + }, + "application/vnd.afpc.modca-objectcontainer": { + "source": "iana" + }, + "application/vnd.afpc.modca-overlay": { + "source": "iana" + }, + "application/vnd.afpc.modca-pagesegment": { + "source": "iana" + }, "application/vnd.ah-barcode": { "source": "iana" }, @@ -1812,6 +1953,9 @@ "source": "iana", "compressible": true }, + "application/vnd.android.ota": { + "source": "iana" + }, "application/vnd.android.package-archive": { "source": "apache", "compressible": false, @@ -1845,6 +1989,10 @@ "source": "iana", "compressible": true }, + "application/vnd.aplextor.warrp+json": { + "source": "iana", + "compressible": true + }, "application/vnd.apothekende.reservation+json": { "source": "iana", "compressible": true @@ -1909,7 +2057,8 @@ }, "application/vnd.balsamiq.bmml+xml": { "source": "iana", - "compressible": true + "compressible": true, + "extensions": ["bmml"] }, "application/vnd.balsamiq.bmpr": { "source": "iana" @@ -1917,6 +2066,9 @@ "application/vnd.banana-accounting": { "source": "iana" }, + "application/vnd.bbf.usp.error": { + "source": "iana" + }, "application/vnd.bbf.usp.msg": { "source": "iana" }, @@ -1952,6 +2104,12 @@ "source": "iana", "extensions": ["bmi"] }, + "application/vnd.bpf": { + "source": "iana" + }, + "application/vnd.bpf3": { + "source": "iana" + }, "application/vnd.businessobjects": { "source": "iana", "extensions": ["rep"] @@ -1991,6 +2149,9 @@ "source": "iana", "extensions": ["mmd"] }, + "application/vnd.ciedi": { + "source": "iana" + }, "application/vnd.cinderella": { "source": "iana", "extensions": ["cdy"] @@ -2107,6 +2268,13 @@ "compressible": true, "extensions": ["wbs"] }, + "application/vnd.cryptii.pipe+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.crypto-shade-file": { + "source": "iana" + }, "application/vnd.ctc-posml": { "source": "iana", "extensions": ["pml"] @@ -2170,6 +2338,9 @@ "source": "iana", "compressible": true }, + "application/vnd.dbf": { + "source": "iana" + }, "application/vnd.debian.binary-package": { "source": "iana" }, @@ -2254,6 +2425,10 @@ "source": "iana", "extensions": ["ait"] }, + "application/vnd.dvb.dvbisl+xml": { + "source": "iana", + "compressible": true + }, "application/vnd.dvb.dvbj": { "source": "iana" }, @@ -2540,6 +2715,10 @@ "application/vnd.ffsns": { "source": "iana" }, + "application/vnd.ficlab.flb+zip": { + "source": "iana", + "compressible": false + }, "application/vnd.filmit.zfc": { "source": "iana" }, @@ -2638,6 +2817,10 @@ "source": "iana", "extensions": ["txd"] }, + "application/vnd.gentics.grd+json": { + "source": "iana", + "compressible": true + }, "application/vnd.geo+json": { "source": "iana", "compressible": true @@ -3004,6 +3187,10 @@ "source": "iana", "extensions": ["fcs"] }, + "application/vnd.iso11783-10+zip": { + "source": "iana", + "compressible": false + }, "application/vnd.jam": { "source": "iana", "extensions": ["jam"] @@ -3103,6 +3290,9 @@ "source": "iana", "extensions": ["sse"] }, + "application/vnd.las": { + "source": "iana" + }, "application/vnd.las.las+json": { "source": "iana", "compressible": true @@ -3112,6 +3302,9 @@ "compressible": true, "extensions": ["lasxml"] }, + "application/vnd.laszip": { + "source": "iana" + }, "application/vnd.leap+json": { "source": "iana", "compressible": true @@ -3129,6 +3322,13 @@ "compressible": true, "extensions": ["lbe"] }, + "application/vnd.logipipe.circuit+zip": { + "source": "iana", + "compressible": false + }, + "application/vnd.loom": { + "source": "iana" + }, "application/vnd.lotus-1-2-3": { "source": "iana", "extensions": ["123"] @@ -3587,7 +3787,8 @@ }, "application/vnd.nokia.n-gage.ac+xml": { "source": "iana", - "compressible": true + "compressible": true, + "extensions": ["ac"] }, "application/vnd.nokia.n-gage.data": { "source": "iana", @@ -3720,6 +3921,10 @@ "application/vnd.ocf+cbor": { "source": "iana" }, + "application/vnd.oci.image.manifest.v1+json": { + "source": "iana", + "compressible": true + }, "application/vnd.oftn.l10n+json": { "source": "iana", "compressible": true @@ -3908,14 +4113,17 @@ }, "application/vnd.omads-email+xml": { "source": "iana", + "charset": "UTF-8", "compressible": true }, "application/vnd.omads-file+xml": { "source": "iana", + "charset": "UTF-8", "compressible": true }, "application/vnd.omads-folder+xml": { "source": "iana", + "charset": "UTF-8", "compressible": true }, "application/vnd.omaloc-supl-init": { @@ -3941,7 +4149,8 @@ }, "application/vnd.openblox.game+xml": { "source": "iana", - "compressible": true + "compressible": true, + "extensions": ["obgx"] }, "application/vnd.openblox.game-binary": { "source": "iana" @@ -3955,7 +4164,8 @@ }, "application/vnd.openstreetmap.data+xml": { "source": "iana", - "compressible": true + "compressible": true, + "extensions": ["osm"] }, "application/vnd.openxmlformats-officedocument.custom-properties+xml": { "source": "iana", @@ -4525,6 +4735,9 @@ "source": "iana", "extensions": ["st"] }, + "application/vnd.sar": { + "source": "iana" + }, "application/vnd.sbm.cid": { "source": "iana" }, @@ -4583,6 +4796,9 @@ "source": "iana", "extensions": ["semf"] }, + "application/vnd.shade-save-file": { + "source": "iana" + }, "application/vnd.shana.informed.formdata": { "source": "iana", "extensions": ["ifm"] @@ -4603,6 +4819,16 @@ "source": "iana", "compressible": true }, + "application/vnd.shopkick+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.shp": { + "source": "iana" + }, + "application/vnd.shx": { + "source": "iana" + }, "application/vnd.sigrok.session": { "source": "iana" }, @@ -4625,9 +4851,13 @@ "source": "iana", "extensions": ["teacher"] }, + "application/vnd.snesdev-page-table": { + "source": "iana" + }, "application/vnd.software602.filler.form+xml": { "source": "iana", - "compressible": true + "compressible": true, + "extensions": ["fo"] }, "application/vnd.software602.filler.form-xml-zip": { "source": "iana" @@ -4754,15 +4984,18 @@ }, "application/vnd.syncml+xml": { "source": "iana", + "charset": "UTF-8", "compressible": true, "extensions": ["xsm"] }, "application/vnd.syncml.dm+wbxml": { "source": "iana", + "charset": "UTF-8", "extensions": ["bdm"] }, "application/vnd.syncml.dm+xml": { "source": "iana", + "charset": "UTF-8", "compressible": true, "extensions": ["xdm"] }, @@ -4774,13 +5007,16 @@ }, "application/vnd.syncml.dmddf+xml": { "source": "iana", - "compressible": true + "charset": "UTF-8", + "compressible": true, + "extensions": ["ddf"] }, "application/vnd.syncml.dmtnds+wbxml": { "source": "iana" }, "application/vnd.syncml.dmtnds+xml": { "source": "iana", + "charset": "UTF-8", "compressible": true }, "application/vnd.syncml.ds.notification": { @@ -4920,6 +5156,9 @@ "application/vnd.veryant.thin": { "source": "iana" }, + "application/vnd.ves.encrypted": { + "source": "iana" + }, "application/vnd.vidsoft.vidconference": { "source": "iana" }, @@ -4946,6 +5185,7 @@ }, "application/vnd.wap.wbxml": { "source": "iana", + "charset": "UTF-8", "extensions": ["wbxml"] }, "application/vnd.wap.wmlc": { @@ -5408,6 +5648,9 @@ "application/x-javascript": { "compressible": true }, + "application/x-keepass2": { + "extensions": ["kdbx"] + }, "application/x-latex": { "source": "apache", "compressible": false, @@ -5539,6 +5782,9 @@ "source": "apache", "extensions": ["p7r"] }, + "application/x-pki-message": { + "source": "iana" + }, "application/x-rar-compressed": { "source": "apache", "compressible": false, @@ -5681,9 +5927,15 @@ "compressible": true }, "application/x-x509-ca-cert": { - "source": "apache", + "source": "iana", "extensions": ["der","crt","pem"] }, + "application/x-x509-ca-ra-cert": { + "source": "iana" + }, + "application/x-x509-next-ca-cert": { + "source": "iana" + }, "application/x-xfig": { "source": "apache", "extensions": ["fig"] @@ -5720,11 +5972,13 @@ }, "application/xcap-att+xml": { "source": "iana", - "compressible": true + "compressible": true, + "extensions": ["xav"] }, "application/xcap-caps+xml": { "source": "iana", - "compressible": true + "compressible": true, + "extensions": ["xca"] }, "application/xcap-diff+xml": { "source": "iana", @@ -5733,15 +5987,18 @@ }, "application/xcap-el+xml": { "source": "iana", - "compressible": true + "compressible": true, + "extensions": ["xel"] }, "application/xcap-error+xml": { "source": "iana", - "compressible": true + "compressible": true, + "extensions": ["xer"] }, "application/xcap-ns+xml": { "source": "iana", - "compressible": true + "compressible": true, + "extensions": ["xns"] }, "application/xcon-conference-info+xml": { "source": "iana", @@ -5767,7 +6024,8 @@ }, "application/xliff+xml": { "source": "iana", - "compressible": true + "compressible": true, + "extensions": ["xlf"] }, "application/xml": { "source": "iana", @@ -5988,6 +6246,9 @@ "audio/evs": { "source": "iana" }, + "audio/flexfec": { + "source": "iana" + }, "audio/fwdred": { "source": "iana" }, @@ -6079,12 +6340,16 @@ "audio/melp600": { "source": "iana" }, + "audio/mhas": { + "source": "iana" + }, "audio/midi": { "source": "apache", "extensions": ["mid","midi","kar","rmi"] }, "audio/mobile-xmf": { - "source": "iana" + "source": "iana", + "extensions": ["mxmf"] }, "audio/mp3": { "compressible": false, @@ -6197,6 +6462,9 @@ "audio/tetra_acelp": { "source": "iana" }, + "audio/tetra_acelp_bb": { + "source": "iana" + }, "audio/tone": { "source": "iana" }, @@ -6474,6 +6742,7 @@ }, "font/ttf": { "source": "iana", + "compressible": true, "extensions": ["ttf"] }, "font/woff": { @@ -6544,6 +6813,14 @@ "source": "iana", "extensions": ["heifs"] }, + "image/hej2k": { + "source": "iana", + "extensions": ["hej2"] + }, + "image/hsj2": { + "source": "iana", + "extensions": ["hsj2"] + }, "image/ief": { "source": "iana", "extensions": ["ief"] @@ -6562,6 +6839,14 @@ "compressible": false, "extensions": ["jpeg","jpg","jpe"] }, + "image/jph": { + "source": "iana", + "extensions": ["jph"] + }, + "image/jphc": { + "source": "iana", + "extensions": ["jhc"] + }, "image/jpm": { "source": "iana", "compressible": false, @@ -6576,6 +6861,30 @@ "source": "iana", "extensions": ["jxr"] }, + "image/jxra": { + "source": "iana", + "extensions": ["jxra"] + }, + "image/jxrs": { + "source": "iana", + "extensions": ["jxrs"] + }, + "image/jxs": { + "source": "iana", + "extensions": ["jxs"] + }, + "image/jxsc": { + "source": "iana", + "extensions": ["jxsc"] + }, + "image/jxsi": { + "source": "iana", + "extensions": ["jxsi"] + }, + "image/jxss": { + "source": "iana", + "extensions": ["jxss"] + }, "image/ktx": { "source": "iana", "extensions": ["ktx"] @@ -6689,6 +6998,9 @@ "image/vnd.mozilla.apng": { "source": "iana" }, + "image/vnd.ms-dds": { + "extensions": ["dds"] + }, "image/vnd.ms-modi": { "source": "iana", "extensions": ["mdi"] @@ -6922,6 +7234,14 @@ "compressible": false, "extensions": ["msh","mesh","silo"] }, + "model/mtl": { + "source": "iana", + "extensions": ["mtl"] + }, + "model/obj": { + "source": "iana", + "extensions": ["obj"] + }, "model/stl": { "source": "iana", "extensions": ["stl"] @@ -7041,8 +7361,7 @@ "source": "iana" }, "multipart/mixed": { - "source": "iana", - "compressible": false + "source": "iana" }, "multipart/multilingual": { "source": "iana" @@ -7120,6 +7439,9 @@ "text/enriched": { "source": "iana" }, + "text/flexfec": { + "source": "iana" + }, "text/fwdred": { "source": "iana" }, @@ -7167,11 +7489,13 @@ }, "text/n3": { "source": "iana", + "charset": "UTF-8", "compressible": true, "extensions": ["n3"] }, "text/parameters": { - "source": "iana" + "source": "iana", + "charset": "UTF-8" }, "text/parityfec": { "source": "iana" @@ -7182,7 +7506,8 @@ "extensions": ["txt","text","conf","def","list","log","in","ini"] }, "text/provenance-notation": { - "source": "iana" + "source": "iana", + "charset": "UTF-8" }, "text/prs.fallenstein.rst": { "source": "iana" @@ -7294,7 +7619,8 @@ "extensions": ["scurl"] }, "text/vnd.debian.copyright": { - "source": "iana" + "source": "iana", + "charset": "UTF-8" }, "text/vnd.dmclientscript": { "source": "iana" @@ -7304,6 +7630,10 @@ "extensions": ["sub"] }, "text/vnd.esmertec.theme-descriptor": { + "source": "iana", + "charset": "UTF-8" + }, + "text/vnd.ficlab.flt": { "source": "iana" }, "text/vnd.fly": { @@ -7359,12 +7689,17 @@ "text/vnd.si.uricatalogue": { "source": "iana" }, + "text/vnd.sosi": { + "source": "iana" + }, "text/vnd.sun.j2me.app-descriptor": { "source": "iana", + "charset": "UTF-8", "extensions": ["jad"] }, "text/vnd.trolltech.linguist": { - "source": "iana" + "source": "iana", + "charset": "UTF-8" }, "text/vnd.wap.si": { "source": "iana" @@ -7381,6 +7716,7 @@ "extensions": ["wmls"] }, "text/vtt": { + "source": "iana", "charset": "UTF-8", "compressible": true, "extensions": ["vtt"] @@ -7511,6 +7847,9 @@ "video/encaprtp": { "source": "iana" }, + "video/flexfec": { + "source": "iana" + }, "video/h261": { "source": "iana", "extensions": ["h261"] @@ -7750,6 +8089,9 @@ "source": "iana", "extensions": ["viv"] }, + "video/vnd.youtube.yt": { + "source": "iana" + }, "video/vp8": { "source": "iana" }, diff --git a/node_modules/mime-db/package.json b/node_modules/mime-db/package.json index 4a205bc82..5be902150 100644 --- a/node_modules/mime-db/package.json +++ b/node_modules/mime-db/package.json @@ -1,36 +1,31 @@ { - "_args": [ - [ - "mime-db@1.40.0", - "/Users/drew.heavner/Documents/Github/sign-android-release" - ] - ], - "_development": true, - "_from": "mime-db@1.40.0", - "_id": "mime-db@1.40.0", + "_from": "mime-db@1.44.0", + "_id": "mime-db@1.44.0", "_inBundle": false, - "_integrity": "sha512-jYdeOMPy9vnxEqFRRo6ZvTZ8d9oPb+k18PKoYNYUe2stVEBPPwsln/qWzdbmaIvnhZ9v2P+CuecK+fpUfsV2mA==", + "_integrity": "sha512-/NOTfLrsPBVeH7YtFPgsVWveuL+4SjjYxaQ1xtM1KMFj7HdxlBlxeyNLzhyJVx7r4rZGJAZ/6lkKCitSc/Nmpg==", "_location": "/mime-db", "_phantomChildren": {}, "_requested": { "type": "version", "registry": true, - "raw": "mime-db@1.40.0", + "raw": "mime-db@1.44.0", "name": "mime-db", "escapedName": "mime-db", - "rawSpec": "1.40.0", + "rawSpec": "1.44.0", "saveSpec": null, - "fetchSpec": "1.40.0" + "fetchSpec": "1.44.0" }, "_requiredBy": [ "/mime-types" ], - "_resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.40.0.tgz", - "_spec": "1.40.0", - "_where": "/Users/drew.heavner/Documents/Github/sign-android-release", + "_resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.44.0.tgz", + "_shasum": "fa11c5eb0aca1334b4233cb4d52f10c5a6272f92", + "_spec": "mime-db@1.44.0", + "_where": "/Users/drew.heavner/Documents/Github/sign-android-release/node_modules/mime-types", "bugs": { "url": "https://github.com/jshttp/mime-db/issues" }, + "bundleDependencies": false, "contributors": [ { "name": "Douglas Christopher Wilson", @@ -47,22 +42,24 @@ "url": "http://github.com/broofa" } ], + "deprecated": false, "description": "Media Type Database", "devDependencies": { - "bluebird": "3.5.4", + "bluebird": "3.7.2", "co": "4.6.0", "cogent": "1.0.1", - "csv-parse": "4.3.4", - "eslint": "5.16.0", - "eslint-config-standard": "12.0.0", - "eslint-plugin-import": "2.16.0", - "eslint-plugin-node": "8.0.1", - "eslint-plugin-promise": "4.1.1", - "eslint-plugin-standard": "4.0.0", + "csv-parse": "4.8.9", + "eslint": "6.8.0", + "eslint-config-standard": "14.1.1", + "eslint-plugin-import": "2.20.2", + "eslint-plugin-markdown": "1.0.2", + "eslint-plugin-node": "11.1.0", + "eslint-plugin-promise": "4.2.1", + "eslint-plugin-standard": "4.0.1", "gnode": "0.1.2", - "mocha": "6.1.4", - "nyc": "14.0.0", - "raw-body": "2.3.3", + "mocha": "7.1.1", + "nyc": "15.0.1", + "raw-body": "2.4.1", "stream-to-array": "2.3.0" }, "engines": { @@ -94,12 +91,12 @@ "scripts": { "build": "node scripts/build", "fetch": "node scripts/fetch-apache && gnode scripts/fetch-iana && node scripts/fetch-nginx", - "lint": "eslint .", + "lint": "eslint --plugin markdown --ext js,md .", "test": "mocha --reporter spec --bail --check-leaks test/", "test-cov": "nyc --reporter=html --reporter=text npm test", "test-travis": "nyc --reporter=text npm test", "update": "npm run fetch && npm run build", "version": "node scripts/version-history.js && git add HISTORY.md" }, - "version": "1.40.0" + "version": "1.44.0" } diff --git a/node_modules/mime-types/HISTORY.md b/node_modules/mime-types/HISTORY.md index aef15bb33..e93149ae9 100644 --- a/node_modules/mime-types/HISTORY.md +++ b/node_modules/mime-types/HISTORY.md @@ -1,3 +1,28 @@ +2.1.27 / 2020-04-23 +=================== + + * deps: mime-db@1.44.0 + - Add charsets from IANA + - Add extension `.cjs` to `application/node` + - Add new upstream MIME types + +2.1.26 / 2020-01-05 +=================== + + * deps: mime-db@1.43.0 + - Add `application/x-keepass2` with extension `.kdbx` + - Add extension `.mxmf` to `audio/mobile-xmf` + - Add extensions from IANA for `application/*+xml` types + - Add new upstream MIME types + +2.1.25 / 2019-11-12 +=================== + + * deps: mime-db@1.42.0 + - Add new upstream MIME types + - Add `application/toml` with extension `.toml` + - Add `image/vnd.ms-dds` with extension `.dds` + 2.1.24 / 2019-04-20 =================== diff --git a/node_modules/mime-types/README.md b/node_modules/mime-types/README.md index 1dbef2b57..3863339aa 100644 --- a/node_modules/mime-types/README.md +++ b/node_modules/mime-types/README.md @@ -36,6 +36,8 @@ so open a PR there if you'd like to add mime types. ## API + + ```js var mime = require('mime-types') ``` @@ -46,11 +48,13 @@ All functions return `false` if input is invalid or not found. Lookup the content-type associated with a file. + + ```js -mime.lookup('json') // 'application/json' -mime.lookup('.md') // 'text/markdown' -mime.lookup('file.html') // 'text/html' -mime.lookup('folder/file.js') // 'application/javascript' +mime.lookup('json') // 'application/json' +mime.lookup('.md') // 'text/markdown' +mime.lookup('file.html') // 'text/html' +mime.lookup('folder/file.js') // 'application/javascript' mime.lookup('folder/.htaccess') // false mime.lookup('cats') // false @@ -64,8 +68,10 @@ content-type, otherwise the given content-type is used. Then if the content-type does not already have a `charset` parameter, `mime.charset` is used to get the default charset and add to the returned content-type. + + ```js -mime.contentType('markdown') // 'text/x-markdown; charset=utf-8' +mime.contentType('markdown') // 'text/x-markdown; charset=utf-8' mime.contentType('file.json') // 'application/json; charset=utf-8' mime.contentType('text/html') // 'text/html; charset=utf-8' mime.contentType('text/html; charset=iso-8859-1') // 'text/html; charset=iso-8859-1' @@ -78,6 +84,8 @@ mime.contentType(path.extname('/path/to/file.json')) // 'application/json; chars Get the default extension for a content-type. + + ```js mime.extension('application/octet-stream') // 'bin' ``` @@ -86,6 +94,8 @@ mime.extension('application/octet-stream') // 'bin' Lookup the implied default charset of a content-type. + + ```js mime.charset('text/markdown') // 'UTF-8' ``` diff --git a/node_modules/mime-types/package.json b/node_modules/mime-types/package.json index 780f5808f..e4a2131ad 100644 --- a/node_modules/mime-types/package.json +++ b/node_modules/mime-types/package.json @@ -1,37 +1,32 @@ { - "_args": [ - [ - "mime-types@2.1.24", - "/Users/drew.heavner/Documents/Github/sign-android-release" - ] - ], - "_development": true, - "_from": "mime-types@2.1.24", - "_id": "mime-types@2.1.24", + "_from": "mime-types@~2.1.19", + "_id": "mime-types@2.1.27", "_inBundle": false, - "_integrity": "sha512-WaFHS3MCl5fapm3oLxU4eYDw77IQM2ACcxQ9RIxfaC3ooc6PFuBMGZZsYpvoXS5D5QTWPieo1jjLdAm3TBP3cQ==", + "_integrity": "sha512-JIhqnCasI9yD+SsmkquHBxTSEuZdQX5BuQnS2Vc7puQQQ+8yiP5AY5uWhpdv4YL4VM5c6iliiYWPgJ/nJQLp7w==", "_location": "/mime-types", "_phantomChildren": {}, "_requested": { - "type": "version", + "type": "range", "registry": true, - "raw": "mime-types@2.1.24", + "raw": "mime-types@~2.1.19", "name": "mime-types", "escapedName": "mime-types", - "rawSpec": "2.1.24", + "rawSpec": "~2.1.19", "saveSpec": null, - "fetchSpec": "2.1.24" + "fetchSpec": "~2.1.19" }, "_requiredBy": [ "/form-data", "/request" ], - "_resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.24.tgz", - "_spec": "2.1.24", - "_where": "/Users/drew.heavner/Documents/Github/sign-android-release", + "_resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.27.tgz", + "_shasum": "47949f98e279ea53119f5722e0f34e529bec009f", + "_spec": "mime-types@~2.1.19", + "_where": "/Users/drew.heavner/Documents/Github/sign-android-release/node_modules/request", "bugs": { "url": "https://github.com/jshttp/mime-types/issues" }, + "bundleDependencies": false, "contributors": [ { "name": "Douglas Christopher Wilson", @@ -49,18 +44,20 @@ } ], "dependencies": { - "mime-db": "1.40.0" + "mime-db": "1.44.0" }, + "deprecated": false, "description": "The ultimate javascript content-type utility.", "devDependencies": { - "eslint": "5.16.0", - "eslint-config-standard": "12.0.0", - "eslint-plugin-import": "2.17.2", - "eslint-plugin-node": "8.0.1", - "eslint-plugin-promise": "4.1.1", - "eslint-plugin-standard": "4.0.0", - "mocha": "6.1.4", - "nyc": "14.0.0" + "eslint": "6.8.0", + "eslint-config-standard": "14.1.1", + "eslint-plugin-import": "2.20.2", + "eslint-plugin-markdown": "1.0.2", + "eslint-plugin-node": "11.1.0", + "eslint-plugin-promise": "4.2.1", + "eslint-plugin-standard": "4.0.1", + "mocha": "7.1.1", + "nyc": "15.0.1" }, "engines": { "node": ">= 0.6" @@ -82,10 +79,10 @@ "url": "git+https://github.com/jshttp/mime-types.git" }, "scripts": { - "lint": "eslint .", + "lint": "eslint --plugin markdown --ext js,md .", "test": "mocha --reporter spec test/test.js", "test-cov": "nyc --reporter=html --reporter=text npm test", "test-travis": "nyc --reporter=text npm test" }, - "version": "2.1.24" + "version": "2.1.27" } diff --git a/node_modules/mimic-fn/index.d.ts b/node_modules/mimic-fn/index.d.ts deleted file mode 100644 index b4047d589..000000000 --- a/node_modules/mimic-fn/index.d.ts +++ /dev/null @@ -1,54 +0,0 @@ -declare const mimicFn: { - /** - Make a function mimic another one. It will copy over the properties `name`, `length`, `displayName`, and any custom properties you may have set. - - @param to - Mimicking function. - @param from - Function to mimic. - @returns The modified `to` function. - - @example - ``` - import mimicFn = require('mimic-fn'); - - function foo() {} - foo.unicorn = '🦄'; - - function wrapper() { - return foo(); - } - - console.log(wrapper.name); - //=> 'wrapper' - - mimicFn(wrapper, foo); - - console.log(wrapper.name); - //=> 'foo' - - console.log(wrapper.unicorn); - //=> '🦄' - ``` - */ - < - ArgumentsType extends unknown[], - ReturnType, - FunctionType extends (...arguments: ArgumentsType) => ReturnType - >( - to: (...arguments: ArgumentsType) => ReturnType, - from: FunctionType - ): FunctionType; - - // TODO: Remove this for the next major release, refactor the whole definition to: - // declare function mimicFn< - // ArgumentsType extends unknown[], - // ReturnType, - // FunctionType extends (...arguments: ArgumentsType) => ReturnType - // >( - // to: (...arguments: ArgumentsType) => ReturnType, - // from: FunctionType - // ): FunctionType; - // export = mimicFn; - default: typeof mimicFn; -}; - -export = mimicFn; diff --git a/node_modules/mimic-fn/index.js b/node_modules/mimic-fn/index.js deleted file mode 100644 index 1a5970517..000000000 --- a/node_modules/mimic-fn/index.js +++ /dev/null @@ -1,13 +0,0 @@ -'use strict'; - -const mimicFn = (to, from) => { - for (const prop of Reflect.ownKeys(from)) { - Object.defineProperty(to, prop, Object.getOwnPropertyDescriptor(from, prop)); - } - - return to; -}; - -module.exports = mimicFn; -// TODO: Remove this for the next major release -module.exports.default = mimicFn; diff --git a/node_modules/mimic-fn/license b/node_modules/mimic-fn/license deleted file mode 100644 index e7af2f771..000000000 --- a/node_modules/mimic-fn/license +++ /dev/null @@ -1,9 +0,0 @@ -MIT License - -Copyright (c) Sindre Sorhus (sindresorhus.com) - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/mimic-fn/package.json b/node_modules/mimic-fn/package.json deleted file mode 100644 index 885556e32..000000000 --- a/node_modules/mimic-fn/package.json +++ /dev/null @@ -1,78 +0,0 @@ -{ - "_args": [ - [ - "mimic-fn@2.1.0", - "/Users/drew.heavner/Documents/Github/sign-android-release" - ] - ], - "_development": true, - "_from": "mimic-fn@2.1.0", - "_id": "mimic-fn@2.1.0", - "_inBundle": false, - "_integrity": "sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==", - "_location": "/mimic-fn", - "_phantomChildren": {}, - "_requested": { - "type": "version", - "registry": true, - "raw": "mimic-fn@2.1.0", - "name": "mimic-fn", - "escapedName": "mimic-fn", - "rawSpec": "2.1.0", - "saveSpec": null, - "fetchSpec": "2.1.0" - }, - "_requiredBy": [ - "/mem" - ], - "_resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-2.1.0.tgz", - "_spec": "2.1.0", - "_where": "/Users/drew.heavner/Documents/Github/sign-android-release", - "author": { - "name": "Sindre Sorhus", - "email": "sindresorhus@gmail.com", - "url": "sindresorhus.com" - }, - "bugs": { - "url": "https://github.com/sindresorhus/mimic-fn/issues" - }, - "description": "Make a function mimic another one", - "devDependencies": { - "ava": "^1.4.1", - "tsd": "^0.7.1", - "xo": "^0.24.0" - }, - "engines": { - "node": ">=6" - }, - "files": [ - "index.js", - "index.d.ts" - ], - "homepage": "https://github.com/sindresorhus/mimic-fn#readme", - "keywords": [ - "function", - "mimic", - "imitate", - "rename", - "copy", - "inherit", - "properties", - "name", - "func", - "fn", - "set", - "infer", - "change" - ], - "license": "MIT", - "name": "mimic-fn", - "repository": { - "type": "git", - "url": "git+https://github.com/sindresorhus/mimic-fn.git" - }, - "scripts": { - "test": "xo && ava && tsd" - }, - "version": "2.1.0" -} diff --git a/node_modules/mimic-fn/readme.md b/node_modules/mimic-fn/readme.md deleted file mode 100644 index 0ef8a13d7..000000000 --- a/node_modules/mimic-fn/readme.md +++ /dev/null @@ -1,69 +0,0 @@ -# mimic-fn [![Build Status](https://travis-ci.org/sindresorhus/mimic-fn.svg?branch=master)](https://travis-ci.org/sindresorhus/mimic-fn) - -> Make a function mimic another one - -Useful when you wrap a function in another function and like to preserve the original name and other properties. - - -## Install - -``` -$ npm install mimic-fn -``` - - -## Usage - -```js -const mimicFn = require('mimic-fn'); - -function foo() {} -foo.unicorn = '🦄'; - -function wrapper() { - return foo(); -} - -console.log(wrapper.name); -//=> 'wrapper' - -mimicFn(wrapper, foo); - -console.log(wrapper.name); -//=> 'foo' - -console.log(wrapper.unicorn); -//=> '🦄' -``` - - -## API - -It will copy over the properties `name`, `length`, `displayName`, and any custom properties you may have set. - -### mimicFn(to, from) - -Modifies the `to` function and returns it. - -#### to - -Type: `Function` - -Mimicking function. - -#### from - -Type: `Function` - -Function to mimic. - - -## Related - -- [rename-fn](https://github.com/sindresorhus/rename-fn) - Rename a function -- [keep-func-props](https://github.com/ehmicky/keep-func-props) - Wrap a function without changing its name, length and other properties - - -## License - -MIT © [Sindre Sorhus](https://sindresorhus.com) diff --git a/node_modules/minimist/example/parse.js b/node_modules/minimist/example/parse.js index abff3e8ee..f7c8d4980 100644 --- a/node_modules/minimist/example/parse.js +++ b/node_modules/minimist/example/parse.js @@ -1,2 +1,2 @@ var argv = require('../')(process.argv.slice(2)); -console.dir(argv); +console.log(argv); diff --git a/node_modules/minimist/index.js b/node_modules/minimist/index.js index 6a0559d58..d2afe5e4d 100644 --- a/node_modules/minimist/index.js +++ b/node_modules/minimist/index.js @@ -68,12 +68,21 @@ module.exports = function (args, opts) { function setKey (obj, keys, value) { var o = obj; - keys.slice(0,-1).forEach(function (key) { + for (var i = 0; i < keys.length-1; i++) { + var key = keys[i]; + if (key === '__proto__') return; if (o[key] === undefined) o[key] = {}; + if (o[key] === Object.prototype || o[key] === Number.prototype + || o[key] === String.prototype) o[key] = {}; + if (o[key] === Array.prototype) o[key] = []; o = o[key]; - }); + } var key = keys[keys.length - 1]; + if (key === '__proto__') return; + if (o === Object.prototype || o === Number.prototype + || o === String.prototype) o = {}; + if (o === Array.prototype) o = []; if (o[key] === undefined || flags.bools[key] || typeof o[key] === 'boolean') { o[key] = value; } @@ -171,7 +180,7 @@ module.exports = function (args, opts) { setArg(key, args[i+1], arg); i++; } - else if (args[i+1] && /true|false/.test(args[i+1])) { + else if (args[i+1] && /^(true|false)$/.test(args[i+1])) { setArg(key, args[i+1] === 'true', arg); i++; } diff --git a/node_modules/minimist/package.json b/node_modules/minimist/package.json index a5732755f..d2e22d74e 100644 --- a/node_modules/minimist/package.json +++ b/node_modules/minimist/package.json @@ -1,35 +1,31 @@ { - "_args": [ - [ - "minimist@1.2.0", - "/Users/drew.heavner/Documents/Github/sign-android-release" - ] - ], - "_development": true, - "_from": "minimist@1.2.0", - "_id": "minimist@1.2.0", + "_from": "minimist@1.2.5", + "_id": "minimist@1.2.5", "_inBundle": false, - "_integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=", + "_integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==", "_location": "/minimist", "_phantomChildren": {}, "_requested": { "type": "version", "registry": true, - "raw": "minimist@1.2.0", + "raw": "minimist@1.2.5", "name": "minimist", "escapedName": "minimist", - "rawSpec": "1.2.0", + "rawSpec": "1.2.5", "saveSpec": null, - "fetchSpec": "1.2.0" + "fetchSpec": "1.2.5" }, "_requiredBy": [ + "/@babel/core/json5", "/@cnakazawa/watch", "/json5", + "/mkdirp", "/sane" ], - "_resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", - "_spec": "1.2.0", - "_where": "/Users/drew.heavner/Documents/Github/sign-android-release", + "_resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz", + "_shasum": "67d66014b66a6a8aaa0c083c5fd58df4e4e97602", + "_spec": "minimist@1.2.5", + "_where": "/Users/drew.heavner/Documents/Github/sign-android-release/node_modules/@babel/core/node_modules/json5", "author": { "name": "James Halliday", "email": "mail@substack.net", @@ -38,6 +34,8 @@ "bugs": { "url": "https://github.com/substack/minimist/issues" }, + "bundleDependencies": false, + "deprecated": false, "description": "parse argument options", "devDependencies": { "covert": "^1.0.0", @@ -75,5 +73,5 @@ "opera/12" ] }, - "version": "1.2.0" + "version": "1.2.5" } diff --git a/node_modules/minimist/readme.markdown b/node_modules/minimist/readme.markdown index 30a74cf8c..5fd97ab11 100644 --- a/node_modules/minimist/readme.markdown +++ b/node_modules/minimist/readme.markdown @@ -5,15 +5,11 @@ parse argument options This module is the guts of optimist's argument parser without all the fanciful decoration. -[![browser support](https://ci.testling.com/substack/minimist.png)](http://ci.testling.com/substack/minimist) - -[![build status](https://secure.travis-ci.org/substack/minimist.png)](http://travis-ci.org/substack/minimist) - # example ``` js var argv = require('minimist')(process.argv.slice(2)); -console.dir(argv); +console.log(argv); ``` ``` @@ -33,6 +29,13 @@ $ node example/parse.js -x 3 -y 4 -n5 -abc --beep=boop foo bar baz beep: 'boop' } ``` +# security + +Previous versions had a prototype pollution bug that could cause privilege +escalation in some circumstances when handling untrusted user input. + +Please use version 1.2.3 or later: https://snyk.io/vuln/SNYK-JS-MINIMIST-559764 + # methods ``` js @@ -65,19 +68,20 @@ argument names to use as aliases first non-option * `opts['--']` - when true, populate `argv._` with everything before the `--` and `argv['--']` with everything after the `--`. Here's an example: + + ``` + > require('./')('one two three -- four five --six'.split(' '), { '--': true }) + { _: [ 'one', 'two', 'three' ], + '--': [ 'four', 'five', '--six' ] } + ``` + + Note that with `opts['--']` set, parsing for arguments still stops after the + `--`. + * `opts.unknown` - a function which is invoked with a command line parameter not defined in the `opts` configuration object. If the function returns `false`, the unknown option is not added to `argv`. -``` -> require('./')('one two three -- four five --six'.split(' '), { '--': true }) -{ _: [ 'one', 'two', 'three' ], - '--': [ 'four', 'five', '--six' ] } -``` - -Note that with `opts['--']` set, parsing for arguments still stops after the -`--`. - # install With [npm](https://npmjs.org) do: diff --git a/node_modules/minimist/test/bool.js b/node_modules/minimist/test/bool.js index 14b0717ce..5f7dbde16 100644 --- a/node_modules/minimist/test/bool.js +++ b/node_modules/minimist/test/bool.js @@ -164,3 +164,15 @@ test('boolean --boool=false', function (t) { t.same(parsed.boool, false); t.end(); }); + +test('boolean using something similar to true', function (t) { + var opts = { boolean: 'h' }; + var result = parse(['-h', 'true.txt'], opts); + var expected = { + h: true, + '_': ['true.txt'] + }; + + t.same(result, expected); + t.end(); +}); \ No newline at end of file diff --git a/node_modules/mkdirp/.travis.yml b/node_modules/mkdirp/.travis.yml deleted file mode 100644 index 74c57bf15..000000000 --- a/node_modules/mkdirp/.travis.yml +++ /dev/null @@ -1,8 +0,0 @@ -language: node_js -node_js: - - "0.8" - - "0.10" - - "0.12" - - "iojs" -before_install: - - npm install -g npm@~1.4.6 diff --git a/node_modules/mkdirp/examples/pow.js b/node_modules/mkdirp/examples/pow.js deleted file mode 100644 index e6924212e..000000000 --- a/node_modules/mkdirp/examples/pow.js +++ /dev/null @@ -1,6 +0,0 @@ -var mkdirp = require('mkdirp'); - -mkdirp('/tmp/foo/bar/baz', function (err) { - if (err) console.error(err) - else console.log('pow!') -}); diff --git a/node_modules/mkdirp/index.js b/node_modules/mkdirp/index.js index 6ce241b58..468d7cd8d 100644 --- a/node_modules/mkdirp/index.js +++ b/node_modules/mkdirp/index.js @@ -17,7 +17,7 @@ function mkdirP (p, opts, f, made) { var xfs = opts.fs || fs; if (mode === undefined) { - mode = _0777 & (~process.umask()); + mode = _0777 } if (!made) made = null; @@ -31,6 +31,7 @@ function mkdirP (p, opts, f, made) { } switch (er.code) { case 'ENOENT': + if (path.dirname(p) === p) return cb(er); mkdirP(path.dirname(p), opts, function (er, made) { if (er) cb(er, made); else mkdirP(p, opts, cb, made); @@ -61,7 +62,7 @@ mkdirP.sync = function sync (p, opts, made) { var xfs = opts.fs || fs; if (mode === undefined) { - mode = _0777 & (~process.umask()); + mode = _0777 } if (!made) made = null; diff --git a/node_modules/mkdirp/node_modules/minimist/.travis.yml b/node_modules/mkdirp/node_modules/minimist/.travis.yml deleted file mode 100644 index cc4dba29d..000000000 --- a/node_modules/mkdirp/node_modules/minimist/.travis.yml +++ /dev/null @@ -1,4 +0,0 @@ -language: node_js -node_js: - - "0.8" - - "0.10" diff --git a/node_modules/mkdirp/node_modules/minimist/LICENSE b/node_modules/mkdirp/node_modules/minimist/LICENSE deleted file mode 100644 index ee27ba4b4..000000000 --- a/node_modules/mkdirp/node_modules/minimist/LICENSE +++ /dev/null @@ -1,18 +0,0 @@ -This software is released under the MIT license: - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of -the Software, and to permit persons to whom the Software is furnished to do so, -subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS -FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR -COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER -IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/mkdirp/node_modules/minimist/example/parse.js b/node_modules/mkdirp/node_modules/minimist/example/parse.js deleted file mode 100644 index abff3e8ee..000000000 --- a/node_modules/mkdirp/node_modules/minimist/example/parse.js +++ /dev/null @@ -1,2 +0,0 @@ -var argv = require('../')(process.argv.slice(2)); -console.dir(argv); diff --git a/node_modules/mkdirp/node_modules/minimist/index.js b/node_modules/mkdirp/node_modules/minimist/index.js deleted file mode 100644 index 584f551a6..000000000 --- a/node_modules/mkdirp/node_modules/minimist/index.js +++ /dev/null @@ -1,187 +0,0 @@ -module.exports = function (args, opts) { - if (!opts) opts = {}; - - var flags = { bools : {}, strings : {} }; - - [].concat(opts['boolean']).filter(Boolean).forEach(function (key) { - flags.bools[key] = true; - }); - - [].concat(opts.string).filter(Boolean).forEach(function (key) { - flags.strings[key] = true; - }); - - var aliases = {}; - Object.keys(opts.alias || {}).forEach(function (key) { - aliases[key] = [].concat(opts.alias[key]); - aliases[key].forEach(function (x) { - aliases[x] = [key].concat(aliases[key].filter(function (y) { - return x !== y; - })); - }); - }); - - var defaults = opts['default'] || {}; - - var argv = { _ : [] }; - Object.keys(flags.bools).forEach(function (key) { - setArg(key, defaults[key] === undefined ? false : defaults[key]); - }); - - var notFlags = []; - - if (args.indexOf('--') !== -1) { - notFlags = args.slice(args.indexOf('--')+1); - args = args.slice(0, args.indexOf('--')); - } - - function setArg (key, val) { - var value = !flags.strings[key] && isNumber(val) - ? Number(val) : val - ; - setKey(argv, key.split('.'), value); - - (aliases[key] || []).forEach(function (x) { - setKey(argv, x.split('.'), value); - }); - } - - for (var i = 0; i < args.length; i++) { - var arg = args[i]; - - if (/^--.+=/.test(arg)) { - // Using [\s\S] instead of . because js doesn't support the - // 'dotall' regex modifier. See: - // http://stackoverflow.com/a/1068308/13216 - var m = arg.match(/^--([^=]+)=([\s\S]*)$/); - setArg(m[1], m[2]); - } - else if (/^--no-.+/.test(arg)) { - var key = arg.match(/^--no-(.+)/)[1]; - setArg(key, false); - } - else if (/^--.+/.test(arg)) { - var key = arg.match(/^--(.+)/)[1]; - var next = args[i + 1]; - if (next !== undefined && !/^-/.test(next) - && !flags.bools[key] - && (aliases[key] ? !flags.bools[aliases[key]] : true)) { - setArg(key, next); - i++; - } - else if (/^(true|false)$/.test(next)) { - setArg(key, next === 'true'); - i++; - } - else { - setArg(key, flags.strings[key] ? '' : true); - } - } - else if (/^-[^-]+/.test(arg)) { - var letters = arg.slice(1,-1).split(''); - - var broken = false; - for (var j = 0; j < letters.length; j++) { - var next = arg.slice(j+2); - - if (next === '-') { - setArg(letters[j], next) - continue; - } - - if (/[A-Za-z]/.test(letters[j]) - && /-?\d+(\.\d*)?(e-?\d+)?$/.test(next)) { - setArg(letters[j], next); - broken = true; - break; - } - - if (letters[j+1] && letters[j+1].match(/\W/)) { - setArg(letters[j], arg.slice(j+2)); - broken = true; - break; - } - else { - setArg(letters[j], flags.strings[letters[j]] ? '' : true); - } - } - - var key = arg.slice(-1)[0]; - if (!broken && key !== '-') { - if (args[i+1] && !/^(-|--)[^-]/.test(args[i+1]) - && !flags.bools[key] - && (aliases[key] ? !flags.bools[aliases[key]] : true)) { - setArg(key, args[i+1]); - i++; - } - else if (args[i+1] && /true|false/.test(args[i+1])) { - setArg(key, args[i+1] === 'true'); - i++; - } - else { - setArg(key, flags.strings[key] ? '' : true); - } - } - } - else { - argv._.push( - flags.strings['_'] || !isNumber(arg) ? arg : Number(arg) - ); - } - } - - Object.keys(defaults).forEach(function (key) { - if (!hasKey(argv, key.split('.'))) { - setKey(argv, key.split('.'), defaults[key]); - - (aliases[key] || []).forEach(function (x) { - setKey(argv, x.split('.'), defaults[key]); - }); - } - }); - - notFlags.forEach(function(key) { - argv._.push(key); - }); - - return argv; -}; - -function hasKey (obj, keys) { - var o = obj; - keys.slice(0,-1).forEach(function (key) { - o = (o[key] || {}); - }); - - var key = keys[keys.length - 1]; - return key in o; -} - -function setKey (obj, keys, value) { - var o = obj; - keys.slice(0,-1).forEach(function (key) { - if (o[key] === undefined) o[key] = {}; - o = o[key]; - }); - - var key = keys[keys.length - 1]; - if (o[key] === undefined || typeof o[key] === 'boolean') { - o[key] = value; - } - else if (Array.isArray(o[key])) { - o[key].push(value); - } - else { - o[key] = [ o[key], value ]; - } -} - -function isNumber (x) { - if (typeof x === 'number') return true; - if (/^0x[0-9a-f]+$/i.test(x)) return true; - return /^[-+]?(?:\d+(?:\.\d*)?|\.\d+)(e[-+]?\d+)?$/.test(x); -} - -function longest (xs) { - return Math.max.apply(null, xs.map(function (x) { return x.length })); -} diff --git a/node_modules/mkdirp/node_modules/minimist/package.json b/node_modules/mkdirp/node_modules/minimist/package.json deleted file mode 100644 index 5567e709a..000000000 --- a/node_modules/mkdirp/node_modules/minimist/package.json +++ /dev/null @@ -1,75 +0,0 @@ -{ - "_args": [ - [ - "minimist@0.0.8", - "/Users/drew.heavner/Documents/Github/sign-android-release" - ] - ], - "_development": true, - "_from": "minimist@0.0.8", - "_id": "minimist@0.0.8", - "_inBundle": false, - "_integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0=", - "_location": "/mkdirp/minimist", - "_phantomChildren": {}, - "_requested": { - "type": "version", - "registry": true, - "raw": "minimist@0.0.8", - "name": "minimist", - "escapedName": "minimist", - "rawSpec": "0.0.8", - "saveSpec": null, - "fetchSpec": "0.0.8" - }, - "_requiredBy": [ - "/mkdirp" - ], - "_resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz", - "_spec": "0.0.8", - "_where": "/Users/drew.heavner/Documents/Github/sign-android-release", - "author": { - "name": "James Halliday", - "email": "mail@substack.net", - "url": "http://substack.net" - }, - "bugs": { - "url": "https://github.com/substack/minimist/issues" - }, - "description": "parse argument options", - "devDependencies": { - "tap": "~0.4.0", - "tape": "~1.0.4" - }, - "homepage": "https://github.com/substack/minimist", - "keywords": [ - "argv", - "getopt", - "parser", - "optimist" - ], - "license": "MIT", - "main": "index.js", - "name": "minimist", - "repository": { - "type": "git", - "url": "git://github.com/substack/minimist.git" - }, - "scripts": { - "test": "tap test/*.js" - }, - "testling": { - "files": "test/*.js", - "browsers": [ - "ie/6..latest", - "ff/5", - "firefox/latest", - "chrome/10", - "chrome/latest", - "safari/5.1", - "safari/latest", - "opera/12" - ] - }, - "version": "0.0.8" -} diff --git a/node_modules/mkdirp/node_modules/minimist/readme.markdown b/node_modules/mkdirp/node_modules/minimist/readme.markdown deleted file mode 100644 index c25635323..000000000 --- a/node_modules/mkdirp/node_modules/minimist/readme.markdown +++ /dev/null @@ -1,73 +0,0 @@ -# minimist - -parse argument options - -This module is the guts of optimist's argument parser without all the -fanciful decoration. - -[![browser support](https://ci.testling.com/substack/minimist.png)](http://ci.testling.com/substack/minimist) - -[![build status](https://secure.travis-ci.org/substack/minimist.png)](http://travis-ci.org/substack/minimist) - -# example - -``` js -var argv = require('minimist')(process.argv.slice(2)); -console.dir(argv); -``` - -``` -$ node example/parse.js -a beep -b boop -{ _: [], a: 'beep', b: 'boop' } -``` - -``` -$ node example/parse.js -x 3 -y 4 -n5 -abc --beep=boop foo bar baz -{ _: [ 'foo', 'bar', 'baz' ], - x: 3, - y: 4, - n: 5, - a: true, - b: true, - c: true, - beep: 'boop' } -``` - -# methods - -``` js -var parseArgs = require('minimist') -``` - -## var argv = parseArgs(args, opts={}) - -Return an argument object `argv` populated with the array arguments from `args`. - -`argv._` contains all the arguments that didn't have an option associated with -them. - -Numeric-looking arguments will be returned as numbers unless `opts.string` or -`opts.boolean` is set for that argument name. - -Any arguments after `'--'` will not be parsed and will end up in `argv._`. - -options can be: - -* `opts.string` - a string or array of strings argument names to always treat as -strings -* `opts.boolean` - a string or array of strings to always treat as booleans -* `opts.alias` - an object mapping string names to strings or arrays of string -argument names to use as aliases -* `opts.default` - an object mapping string argument names to default values - -# install - -With [npm](https://npmjs.org) do: - -``` -npm install minimist -``` - -# license - -MIT diff --git a/node_modules/mkdirp/node_modules/minimist/test/dash.js b/node_modules/mkdirp/node_modules/minimist/test/dash.js deleted file mode 100644 index 8b034b99a..000000000 --- a/node_modules/mkdirp/node_modules/minimist/test/dash.js +++ /dev/null @@ -1,24 +0,0 @@ -var parse = require('../'); -var test = require('tape'); - -test('-', function (t) { - t.plan(5); - t.deepEqual(parse([ '-n', '-' ]), { n: '-', _: [] }); - t.deepEqual(parse([ '-' ]), { _: [ '-' ] }); - t.deepEqual(parse([ '-f-' ]), { f: '-', _: [] }); - t.deepEqual( - parse([ '-b', '-' ], { boolean: 'b' }), - { b: true, _: [ '-' ] } - ); - t.deepEqual( - parse([ '-s', '-' ], { string: 's' }), - { s: '-', _: [] } - ); -}); - -test('-a -- b', function (t) { - t.plan(3); - t.deepEqual(parse([ '-a', '--', 'b' ]), { a: true, _: [ 'b' ] }); - t.deepEqual(parse([ '--a', '--', 'b' ]), { a: true, _: [ 'b' ] }); - t.deepEqual(parse([ '--a', '--', 'b' ]), { a: true, _: [ 'b' ] }); -}); diff --git a/node_modules/mkdirp/node_modules/minimist/test/default_bool.js b/node_modules/mkdirp/node_modules/minimist/test/default_bool.js deleted file mode 100644 index f0041ee40..000000000 --- a/node_modules/mkdirp/node_modules/minimist/test/default_bool.js +++ /dev/null @@ -1,20 +0,0 @@ -var test = require('tape'); -var parse = require('../'); - -test('boolean default true', function (t) { - var argv = parse([], { - boolean: 'sometrue', - default: { sometrue: true } - }); - t.equal(argv.sometrue, true); - t.end(); -}); - -test('boolean default false', function (t) { - var argv = parse([], { - boolean: 'somefalse', - default: { somefalse: false } - }); - t.equal(argv.somefalse, false); - t.end(); -}); diff --git a/node_modules/mkdirp/node_modules/minimist/test/dotted.js b/node_modules/mkdirp/node_modules/minimist/test/dotted.js deleted file mode 100644 index ef0ae349b..000000000 --- a/node_modules/mkdirp/node_modules/minimist/test/dotted.js +++ /dev/null @@ -1,16 +0,0 @@ -var parse = require('../'); -var test = require('tape'); - -test('dotted alias', function (t) { - var argv = parse(['--a.b', '22'], {default: {'a.b': 11}, alias: {'a.b': 'aa.bb'}}); - t.equal(argv.a.b, 22); - t.equal(argv.aa.bb, 22); - t.end(); -}); - -test('dotted default', function (t) { - var argv = parse('', {default: {'a.b': 11}, alias: {'a.b': 'aa.bb'}}); - t.equal(argv.a.b, 11); - t.equal(argv.aa.bb, 11); - t.end(); -}); diff --git a/node_modules/mkdirp/node_modules/minimist/test/long.js b/node_modules/mkdirp/node_modules/minimist/test/long.js deleted file mode 100644 index 5d3a1e09d..000000000 --- a/node_modules/mkdirp/node_modules/minimist/test/long.js +++ /dev/null @@ -1,31 +0,0 @@ -var test = require('tape'); -var parse = require('../'); - -test('long opts', function (t) { - t.deepEqual( - parse([ '--bool' ]), - { bool : true, _ : [] }, - 'long boolean' - ); - t.deepEqual( - parse([ '--pow', 'xixxle' ]), - { pow : 'xixxle', _ : [] }, - 'long capture sp' - ); - t.deepEqual( - parse([ '--pow=xixxle' ]), - { pow : 'xixxle', _ : [] }, - 'long capture eq' - ); - t.deepEqual( - parse([ '--host', 'localhost', '--port', '555' ]), - { host : 'localhost', port : 555, _ : [] }, - 'long captures sp' - ); - t.deepEqual( - parse([ '--host=localhost', '--port=555' ]), - { host : 'localhost', port : 555, _ : [] }, - 'long captures eq' - ); - t.end(); -}); diff --git a/node_modules/mkdirp/node_modules/minimist/test/parse.js b/node_modules/mkdirp/node_modules/minimist/test/parse.js deleted file mode 100644 index 8a9064669..000000000 --- a/node_modules/mkdirp/node_modules/minimist/test/parse.js +++ /dev/null @@ -1,318 +0,0 @@ -var parse = require('../'); -var test = require('tape'); - -test('parse args', function (t) { - t.deepEqual( - parse([ '--no-moo' ]), - { moo : false, _ : [] }, - 'no' - ); - t.deepEqual( - parse([ '-v', 'a', '-v', 'b', '-v', 'c' ]), - { v : ['a','b','c'], _ : [] }, - 'multi' - ); - t.end(); -}); - -test('comprehensive', function (t) { - t.deepEqual( - parse([ - '--name=meowmers', 'bare', '-cats', 'woo', - '-h', 'awesome', '--multi=quux', - '--key', 'value', - '-b', '--bool', '--no-meep', '--multi=baz', - '--', '--not-a-flag', 'eek' - ]), - { - c : true, - a : true, - t : true, - s : 'woo', - h : 'awesome', - b : true, - bool : true, - key : 'value', - multi : [ 'quux', 'baz' ], - meep : false, - name : 'meowmers', - _ : [ 'bare', '--not-a-flag', 'eek' ] - } - ); - t.end(); -}); - -test('nums', function (t) { - var argv = parse([ - '-x', '1234', - '-y', '5.67', - '-z', '1e7', - '-w', '10f', - '--hex', '0xdeadbeef', - '789' - ]); - t.deepEqual(argv, { - x : 1234, - y : 5.67, - z : 1e7, - w : '10f', - hex : 0xdeadbeef, - _ : [ 789 ] - }); - t.deepEqual(typeof argv.x, 'number'); - t.deepEqual(typeof argv.y, 'number'); - t.deepEqual(typeof argv.z, 'number'); - t.deepEqual(typeof argv.w, 'string'); - t.deepEqual(typeof argv.hex, 'number'); - t.deepEqual(typeof argv._[0], 'number'); - t.end(); -}); - -test('flag boolean', function (t) { - var argv = parse([ '-t', 'moo' ], { boolean: 't' }); - t.deepEqual(argv, { t : true, _ : [ 'moo' ] }); - t.deepEqual(typeof argv.t, 'boolean'); - t.end(); -}); - -test('flag boolean value', function (t) { - var argv = parse(['--verbose', 'false', 'moo', '-t', 'true'], { - boolean: [ 't', 'verbose' ], - default: { verbose: true } - }); - - t.deepEqual(argv, { - verbose: false, - t: true, - _: ['moo'] - }); - - t.deepEqual(typeof argv.verbose, 'boolean'); - t.deepEqual(typeof argv.t, 'boolean'); - t.end(); -}); - -test('flag boolean default false', function (t) { - var argv = parse(['moo'], { - boolean: ['t', 'verbose'], - default: { verbose: false, t: false } - }); - - t.deepEqual(argv, { - verbose: false, - t: false, - _: ['moo'] - }); - - t.deepEqual(typeof argv.verbose, 'boolean'); - t.deepEqual(typeof argv.t, 'boolean'); - t.end(); - -}); - -test('boolean groups', function (t) { - var argv = parse([ '-x', '-z', 'one', 'two', 'three' ], { - boolean: ['x','y','z'] - }); - - t.deepEqual(argv, { - x : true, - y : false, - z : true, - _ : [ 'one', 'two', 'three' ] - }); - - t.deepEqual(typeof argv.x, 'boolean'); - t.deepEqual(typeof argv.y, 'boolean'); - t.deepEqual(typeof argv.z, 'boolean'); - t.end(); -}); - -test('newlines in params' , function (t) { - var args = parse([ '-s', "X\nX" ]) - t.deepEqual(args, { _ : [], s : "X\nX" }); - - // reproduce in bash: - // VALUE="new - // line" - // node program.js --s="$VALUE" - args = parse([ "--s=X\nX" ]) - t.deepEqual(args, { _ : [], s : "X\nX" }); - t.end(); -}); - -test('strings' , function (t) { - var s = parse([ '-s', '0001234' ], { string: 's' }).s; - t.equal(s, '0001234'); - t.equal(typeof s, 'string'); - - var x = parse([ '-x', '56' ], { string: 'x' }).x; - t.equal(x, '56'); - t.equal(typeof x, 'string'); - t.end(); -}); - -test('stringArgs', function (t) { - var s = parse([ ' ', ' ' ], { string: '_' })._; - t.same(s.length, 2); - t.same(typeof s[0], 'string'); - t.same(s[0], ' '); - t.same(typeof s[1], 'string'); - t.same(s[1], ' '); - t.end(); -}); - -test('empty strings', function(t) { - var s = parse([ '-s' ], { string: 's' }).s; - t.equal(s, ''); - t.equal(typeof s, 'string'); - - var str = parse([ '--str' ], { string: 'str' }).str; - t.equal(str, ''); - t.equal(typeof str, 'string'); - - var letters = parse([ '-art' ], { - string: [ 'a', 't' ] - }); - - t.equal(letters.a, ''); - t.equal(letters.r, true); - t.equal(letters.t, ''); - - t.end(); -}); - - -test('slashBreak', function (t) { - t.same( - parse([ '-I/foo/bar/baz' ]), - { I : '/foo/bar/baz', _ : [] } - ); - t.same( - parse([ '-xyz/foo/bar/baz' ]), - { x : true, y : true, z : '/foo/bar/baz', _ : [] } - ); - t.end(); -}); - -test('alias', function (t) { - var argv = parse([ '-f', '11', '--zoom', '55' ], { - alias: { z: 'zoom' } - }); - t.equal(argv.zoom, 55); - t.equal(argv.z, argv.zoom); - t.equal(argv.f, 11); - t.end(); -}); - -test('multiAlias', function (t) { - var argv = parse([ '-f', '11', '--zoom', '55' ], { - alias: { z: [ 'zm', 'zoom' ] } - }); - t.equal(argv.zoom, 55); - t.equal(argv.z, argv.zoom); - t.equal(argv.z, argv.zm); - t.equal(argv.f, 11); - t.end(); -}); - -test('nested dotted objects', function (t) { - var argv = parse([ - '--foo.bar', '3', '--foo.baz', '4', - '--foo.quux.quibble', '5', '--foo.quux.o_O', - '--beep.boop' - ]); - - t.same(argv.foo, { - bar : 3, - baz : 4, - quux : { - quibble : 5, - o_O : true - } - }); - t.same(argv.beep, { boop : true }); - t.end(); -}); - -test('boolean and alias with chainable api', function (t) { - var aliased = [ '-h', 'derp' ]; - var regular = [ '--herp', 'derp' ]; - var opts = { - herp: { alias: 'h', boolean: true } - }; - var aliasedArgv = parse(aliased, { - boolean: 'herp', - alias: { h: 'herp' } - }); - var propertyArgv = parse(regular, { - boolean: 'herp', - alias: { h: 'herp' } - }); - var expected = { - herp: true, - h: true, - '_': [ 'derp' ] - }; - - t.same(aliasedArgv, expected); - t.same(propertyArgv, expected); - t.end(); -}); - -test('boolean and alias with options hash', function (t) { - var aliased = [ '-h', 'derp' ]; - var regular = [ '--herp', 'derp' ]; - var opts = { - alias: { 'h': 'herp' }, - boolean: 'herp' - }; - var aliasedArgv = parse(aliased, opts); - var propertyArgv = parse(regular, opts); - var expected = { - herp: true, - h: true, - '_': [ 'derp' ] - }; - t.same(aliasedArgv, expected); - t.same(propertyArgv, expected); - t.end(); -}); - -test('boolean and alias using explicit true', function (t) { - var aliased = [ '-h', 'true' ]; - var regular = [ '--herp', 'true' ]; - var opts = { - alias: { h: 'herp' }, - boolean: 'h' - }; - var aliasedArgv = parse(aliased, opts); - var propertyArgv = parse(regular, opts); - var expected = { - herp: true, - h: true, - '_': [ ] - }; - - t.same(aliasedArgv, expected); - t.same(propertyArgv, expected); - t.end(); -}); - -// regression, see https://github.com/substack/node-optimist/issues/71 -test('boolean and --x=true', function(t) { - var parsed = parse(['--boool', '--other=true'], { - boolean: 'boool' - }); - - t.same(parsed.boool, true); - t.same(parsed.other, 'true'); - - parsed = parse(['--boool', '--other=false'], { - boolean: 'boool' - }); - - t.same(parsed.boool, true); - t.same(parsed.other, 'false'); - t.end(); -}); diff --git a/node_modules/mkdirp/node_modules/minimist/test/parse_modified.js b/node_modules/mkdirp/node_modules/minimist/test/parse_modified.js deleted file mode 100644 index 21851b036..000000000 --- a/node_modules/mkdirp/node_modules/minimist/test/parse_modified.js +++ /dev/null @@ -1,9 +0,0 @@ -var parse = require('../'); -var test = require('tape'); - -test('parse with modifier functions' , function (t) { - t.plan(1); - - var argv = parse([ '-b', '123' ], { boolean: 'b' }); - t.deepEqual(argv, { b: true, _: ['123'] }); -}); diff --git a/node_modules/mkdirp/node_modules/minimist/test/short.js b/node_modules/mkdirp/node_modules/minimist/test/short.js deleted file mode 100644 index d513a1c25..000000000 --- a/node_modules/mkdirp/node_modules/minimist/test/short.js +++ /dev/null @@ -1,67 +0,0 @@ -var parse = require('../'); -var test = require('tape'); - -test('numeric short args', function (t) { - t.plan(2); - t.deepEqual(parse([ '-n123' ]), { n: 123, _: [] }); - t.deepEqual( - parse([ '-123', '456' ]), - { 1: true, 2: true, 3: 456, _: [] } - ); -}); - -test('short', function (t) { - t.deepEqual( - parse([ '-b' ]), - { b : true, _ : [] }, - 'short boolean' - ); - t.deepEqual( - parse([ 'foo', 'bar', 'baz' ]), - { _ : [ 'foo', 'bar', 'baz' ] }, - 'bare' - ); - t.deepEqual( - parse([ '-cats' ]), - { c : true, a : true, t : true, s : true, _ : [] }, - 'group' - ); - t.deepEqual( - parse([ '-cats', 'meow' ]), - { c : true, a : true, t : true, s : 'meow', _ : [] }, - 'short group next' - ); - t.deepEqual( - parse([ '-h', 'localhost' ]), - { h : 'localhost', _ : [] }, - 'short capture' - ); - t.deepEqual( - parse([ '-h', 'localhost', '-p', '555' ]), - { h : 'localhost', p : 555, _ : [] }, - 'short captures' - ); - t.end(); -}); - -test('mixed short bool and capture', function (t) { - t.same( - parse([ '-h', 'localhost', '-fp', '555', 'script.js' ]), - { - f : true, p : 555, h : 'localhost', - _ : [ 'script.js' ] - } - ); - t.end(); -}); - -test('short and long', function (t) { - t.deepEqual( - parse([ '-h', 'localhost', '-fp', '555', 'script.js' ]), - { - f : true, p : 555, h : 'localhost', - _ : [ 'script.js' ] - } - ); - t.end(); -}); diff --git a/node_modules/mkdirp/node_modules/minimist/test/whitespace.js b/node_modules/mkdirp/node_modules/minimist/test/whitespace.js deleted file mode 100644 index 8a52a58ce..000000000 --- a/node_modules/mkdirp/node_modules/minimist/test/whitespace.js +++ /dev/null @@ -1,8 +0,0 @@ -var parse = require('../'); -var test = require('tape'); - -test('whitespace should be whitespace' , function (t) { - t.plan(1); - var x = parse([ '-x', '\t' ]).x; - t.equal(x, '\t'); -}); diff --git a/node_modules/mkdirp/package.json b/node_modules/mkdirp/package.json index c8300d14a..f1c3b83e1 100644 --- a/node_modules/mkdirp/package.json +++ b/node_modules/mkdirp/package.json @@ -1,35 +1,30 @@ { - "_args": [ - [ - "mkdirp@0.5.1", - "/Users/drew.heavner/Documents/Github/sign-android-release" - ] - ], - "_development": true, - "_from": "mkdirp@0.5.1", - "_id": "mkdirp@0.5.1", + "_from": "mkdirp@0.5.5", + "_id": "mkdirp@0.5.5", "_inBundle": false, - "_integrity": "sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM=", + "_integrity": "sha512-NKmAlESf6jMGym1++R0Ra7wvhV+wFW63FaSOFPwRahvea0gMUcGUhVeAg/0BC0wiv9ih5NYPB1Wn1UEI1/L+xQ==", "_location": "/mkdirp", "_phantomChildren": {}, "_requested": { "type": "version", "registry": true, - "raw": "mkdirp@0.5.1", + "raw": "mkdirp@0.5.5", "name": "mkdirp", "escapedName": "mkdirp", - "rawSpec": "0.5.1", + "rawSpec": "0.5.5", "saveSpec": null, - "fetchSpec": "0.5.1" + "fetchSpec": "0.5.5" }, "_requiredBy": [ "/jest-snapshot", "/jest-util", + "/jest/jest-cli/jest-util", "/ts-jest" ], - "_resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz", - "_spec": "0.5.1", - "_where": "/Users/drew.heavner/Documents/Github/sign-android-release", + "_resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.5.tgz", + "_shasum": "d91cefd62d1436ca0f41620e251288d420099def", + "_spec": "mkdirp@0.5.5", + "_where": "/Users/drew.heavner/Documents/Github/sign-android-release/node_modules/jest-util", "author": { "name": "James Halliday", "email": "mail@substack.net", @@ -41,14 +36,20 @@ "bugs": { "url": "https://github.com/substack/node-mkdirp/issues" }, + "bundleDependencies": false, "dependencies": { - "minimist": "0.0.8" + "minimist": "^1.2.5" }, + "deprecated": false, "description": "Recursively mkdir, like `mkdir -p`", "devDependencies": { - "mock-fs": "2 >=2.7.0", - "tap": "1" + "mock-fs": "^3.7.0", + "tap": "^5.4.2" }, + "files": [ + "bin", + "index.js" + ], "homepage": "https://github.com/substack/node-mkdirp#readme", "keywords": [ "mkdir", @@ -57,6 +58,9 @@ "license": "MIT", "main": "index.js", "name": "mkdirp", + "publishConfig": { + "tag": "legacy" + }, "repository": { "type": "git", "url": "git+https://github.com/substack/node-mkdirp.git" @@ -64,5 +68,5 @@ "scripts": { "test": "tap test/*.js" }, - "version": "0.5.1" + "version": "0.5.5" } diff --git a/node_modules/mkdirp/readme.markdown b/node_modules/mkdirp/readme.markdown index 3cc131538..fc314bfbd 100644 --- a/node_modules/mkdirp/readme.markdown +++ b/node_modules/mkdirp/readme.markdown @@ -37,7 +37,7 @@ Create a new directory and any necessary subdirectories at `dir` with octal permission string `opts.mode`. If `opts` is a non-object, it will be treated as the `opts.mode`. -If `opts.mode` isn't specified, it defaults to `0777 & (~process.umask())`. +If `opts.mode` isn't specified, it defaults to `0777`. `cb(err, made)` fires with the error or the first directory `made` that had to be created, if any. @@ -52,7 +52,7 @@ Synchronously create a new directory and any necessary subdirectories at `dir` with octal permission string `opts.mode`. If `opts` is a non-object, it will be treated as the `opts.mode`. -If `opts.mode` isn't specified, it defaults to `0777 & (~process.umask())`. +If `opts.mode` isn't specified, it defaults to `0777`. Returns the first directory that had to be created, if any. diff --git a/node_modules/mkdirp/test/chmod.js b/node_modules/mkdirp/test/chmod.js deleted file mode 100644 index 6a404b932..000000000 --- a/node_modules/mkdirp/test/chmod.js +++ /dev/null @@ -1,41 +0,0 @@ -var mkdirp = require('../').mkdirp; -var path = require('path'); -var fs = require('fs'); -var test = require('tap').test; -var _0777 = parseInt('0777', 8); -var _0755 = parseInt('0755', 8); -var _0744 = parseInt('0744', 8); - -var ps = [ '', 'tmp' ]; - -for (var i = 0; i < 25; i++) { - var dir = Math.floor(Math.random() * Math.pow(16,4)).toString(16); - ps.push(dir); -} - -var file = ps.join('/'); - -test('chmod-pre', function (t) { - var mode = _0744 - mkdirp(file, mode, function (er) { - t.ifError(er, 'should not error'); - fs.stat(file, function (er, stat) { - t.ifError(er, 'should exist'); - t.ok(stat && stat.isDirectory(), 'should be directory'); - t.equal(stat && stat.mode & _0777, mode, 'should be 0744'); - t.end(); - }); - }); -}); - -test('chmod', function (t) { - var mode = _0755 - mkdirp(file, mode, function (er) { - t.ifError(er, 'should not error'); - fs.stat(file, function (er, stat) { - t.ifError(er, 'should exist'); - t.ok(stat && stat.isDirectory(), 'should be directory'); - t.end(); - }); - }); -}); diff --git a/node_modules/mkdirp/test/clobber.js b/node_modules/mkdirp/test/clobber.js deleted file mode 100644 index 2433b9ad5..000000000 --- a/node_modules/mkdirp/test/clobber.js +++ /dev/null @@ -1,38 +0,0 @@ -var mkdirp = require('../').mkdirp; -var path = require('path'); -var fs = require('fs'); -var test = require('tap').test; -var _0755 = parseInt('0755', 8); - -var ps = [ '', 'tmp' ]; - -for (var i = 0; i < 25; i++) { - var dir = Math.floor(Math.random() * Math.pow(16,4)).toString(16); - ps.push(dir); -} - -var file = ps.join('/'); - -// a file in the way -var itw = ps.slice(0, 3).join('/'); - - -test('clobber-pre', function (t) { - console.error("about to write to "+itw) - fs.writeFileSync(itw, 'I AM IN THE WAY, THE TRUTH, AND THE LIGHT.'); - - fs.stat(itw, function (er, stat) { - t.ifError(er) - t.ok(stat && stat.isFile(), 'should be file') - t.end() - }) -}) - -test('clobber', function (t) { - t.plan(2); - mkdirp(file, _0755, function (err) { - t.ok(err); - t.equal(err.code, 'ENOTDIR'); - t.end(); - }); -}); diff --git a/node_modules/mkdirp/test/mkdirp.js b/node_modules/mkdirp/test/mkdirp.js deleted file mode 100644 index eaa8921c7..000000000 --- a/node_modules/mkdirp/test/mkdirp.js +++ /dev/null @@ -1,28 +0,0 @@ -var mkdirp = require('../'); -var path = require('path'); -var fs = require('fs'); -var exists = fs.exists || path.exists; -var test = require('tap').test; -var _0777 = parseInt('0777', 8); -var _0755 = parseInt('0755', 8); - -test('woo', function (t) { - t.plan(5); - var x = Math.floor(Math.random() * Math.pow(16,4)).toString(16); - var y = Math.floor(Math.random() * Math.pow(16,4)).toString(16); - var z = Math.floor(Math.random() * Math.pow(16,4)).toString(16); - - var file = '/tmp/' + [x,y,z].join('/'); - - mkdirp(file, _0755, function (err) { - t.ifError(err); - exists(file, function (ex) { - t.ok(ex, 'file created'); - fs.stat(file, function (err, stat) { - t.ifError(err); - t.equal(stat.mode & _0777, _0755); - t.ok(stat.isDirectory(), 'target not a directory'); - }) - }) - }); -}); diff --git a/node_modules/mkdirp/test/opts_fs.js b/node_modules/mkdirp/test/opts_fs.js deleted file mode 100644 index 97186b62e..000000000 --- a/node_modules/mkdirp/test/opts_fs.js +++ /dev/null @@ -1,29 +0,0 @@ -var mkdirp = require('../'); -var path = require('path'); -var test = require('tap').test; -var mockfs = require('mock-fs'); -var _0777 = parseInt('0777', 8); -var _0755 = parseInt('0755', 8); - -test('opts.fs', function (t) { - t.plan(5); - - var x = Math.floor(Math.random() * Math.pow(16,4)).toString(16); - var y = Math.floor(Math.random() * Math.pow(16,4)).toString(16); - var z = Math.floor(Math.random() * Math.pow(16,4)).toString(16); - - var file = '/beep/boop/' + [x,y,z].join('/'); - var xfs = mockfs.fs(); - - mkdirp(file, { fs: xfs, mode: _0755 }, function (err) { - t.ifError(err); - xfs.exists(file, function (ex) { - t.ok(ex, 'created file'); - xfs.stat(file, function (err, stat) { - t.ifError(err); - t.equal(stat.mode & _0777, _0755); - t.ok(stat.isDirectory(), 'target not a directory'); - }); - }); - }); -}); diff --git a/node_modules/mkdirp/test/opts_fs_sync.js b/node_modules/mkdirp/test/opts_fs_sync.js deleted file mode 100644 index 6c370aa6e..000000000 --- a/node_modules/mkdirp/test/opts_fs_sync.js +++ /dev/null @@ -1,27 +0,0 @@ -var mkdirp = require('../'); -var path = require('path'); -var test = require('tap').test; -var mockfs = require('mock-fs'); -var _0777 = parseInt('0777', 8); -var _0755 = parseInt('0755', 8); - -test('opts.fs sync', function (t) { - t.plan(4); - - var x = Math.floor(Math.random() * Math.pow(16,4)).toString(16); - var y = Math.floor(Math.random() * Math.pow(16,4)).toString(16); - var z = Math.floor(Math.random() * Math.pow(16,4)).toString(16); - - var file = '/beep/boop/' + [x,y,z].join('/'); - var xfs = mockfs.fs(); - - mkdirp.sync(file, { fs: xfs, mode: _0755 }); - xfs.exists(file, function (ex) { - t.ok(ex, 'created file'); - xfs.stat(file, function (err, stat) { - t.ifError(err); - t.equal(stat.mode & _0777, _0755); - t.ok(stat.isDirectory(), 'target not a directory'); - }); - }); -}); diff --git a/node_modules/mkdirp/test/perm.js b/node_modules/mkdirp/test/perm.js deleted file mode 100644 index fbce44b82..000000000 --- a/node_modules/mkdirp/test/perm.js +++ /dev/null @@ -1,32 +0,0 @@ -var mkdirp = require('../'); -var path = require('path'); -var fs = require('fs'); -var exists = fs.exists || path.exists; -var test = require('tap').test; -var _0777 = parseInt('0777', 8); -var _0755 = parseInt('0755', 8); - -test('async perm', function (t) { - t.plan(5); - var file = '/tmp/' + (Math.random() * (1<<30)).toString(16); - - mkdirp(file, _0755, function (err) { - t.ifError(err); - exists(file, function (ex) { - t.ok(ex, 'file created'); - fs.stat(file, function (err, stat) { - t.ifError(err); - t.equal(stat.mode & _0777, _0755); - t.ok(stat.isDirectory(), 'target not a directory'); - }) - }) - }); -}); - -test('async root perm', function (t) { - mkdirp('/tmp', _0755, function (err) { - if (err) t.fail(err); - t.end(); - }); - t.end(); -}); diff --git a/node_modules/mkdirp/test/perm_sync.js b/node_modules/mkdirp/test/perm_sync.js deleted file mode 100644 index 398229fe5..000000000 --- a/node_modules/mkdirp/test/perm_sync.js +++ /dev/null @@ -1,36 +0,0 @@ -var mkdirp = require('../'); -var path = require('path'); -var fs = require('fs'); -var exists = fs.exists || path.exists; -var test = require('tap').test; -var _0777 = parseInt('0777', 8); -var _0755 = parseInt('0755', 8); - -test('sync perm', function (t) { - t.plan(4); - var file = '/tmp/' + (Math.random() * (1<<30)).toString(16) + '.json'; - - mkdirp.sync(file, _0755); - exists(file, function (ex) { - t.ok(ex, 'file created'); - fs.stat(file, function (err, stat) { - t.ifError(err); - t.equal(stat.mode & _0777, _0755); - t.ok(stat.isDirectory(), 'target not a directory'); - }); - }); -}); - -test('sync root perm', function (t) { - t.plan(3); - - var file = '/tmp'; - mkdirp.sync(file, _0755); - exists(file, function (ex) { - t.ok(ex, 'file created'); - fs.stat(file, function (err, stat) { - t.ifError(err); - t.ok(stat.isDirectory(), 'target not a directory'); - }) - }); -}); diff --git a/node_modules/mkdirp/test/race.js b/node_modules/mkdirp/test/race.js deleted file mode 100644 index b0b9e183c..000000000 --- a/node_modules/mkdirp/test/race.js +++ /dev/null @@ -1,37 +0,0 @@ -var mkdirp = require('../').mkdirp; -var path = require('path'); -var fs = require('fs'); -var exists = fs.exists || path.exists; -var test = require('tap').test; -var _0777 = parseInt('0777', 8); -var _0755 = parseInt('0755', 8); - -test('race', function (t) { - t.plan(10); - var ps = [ '', 'tmp' ]; - - for (var i = 0; i < 25; i++) { - var dir = Math.floor(Math.random() * Math.pow(16,4)).toString(16); - ps.push(dir); - } - var file = ps.join('/'); - - var res = 2; - mk(file); - - mk(file); - - function mk (file, cb) { - mkdirp(file, _0755, function (err) { - t.ifError(err); - exists(file, function (ex) { - t.ok(ex, 'file created'); - fs.stat(file, function (err, stat) { - t.ifError(err); - t.equal(stat.mode & _0777, _0755); - t.ok(stat.isDirectory(), 'target not a directory'); - }); - }) - }); - } -}); diff --git a/node_modules/mkdirp/test/rel.js b/node_modules/mkdirp/test/rel.js deleted file mode 100644 index 4ddb34276..000000000 --- a/node_modules/mkdirp/test/rel.js +++ /dev/null @@ -1,32 +0,0 @@ -var mkdirp = require('../'); -var path = require('path'); -var fs = require('fs'); -var exists = fs.exists || path.exists; -var test = require('tap').test; -var _0777 = parseInt('0777', 8); -var _0755 = parseInt('0755', 8); - -test('rel', function (t) { - t.plan(5); - var x = Math.floor(Math.random() * Math.pow(16,4)).toString(16); - var y = Math.floor(Math.random() * Math.pow(16,4)).toString(16); - var z = Math.floor(Math.random() * Math.pow(16,4)).toString(16); - - var cwd = process.cwd(); - process.chdir('/tmp'); - - var file = [x,y,z].join('/'); - - mkdirp(file, _0755, function (err) { - t.ifError(err); - exists(file, function (ex) { - t.ok(ex, 'file created'); - fs.stat(file, function (err, stat) { - t.ifError(err); - process.chdir(cwd); - t.equal(stat.mode & _0777, _0755); - t.ok(stat.isDirectory(), 'target not a directory'); - }) - }) - }); -}); diff --git a/node_modules/mkdirp/test/return.js b/node_modules/mkdirp/test/return.js deleted file mode 100644 index bce68e561..000000000 --- a/node_modules/mkdirp/test/return.js +++ /dev/null @@ -1,25 +0,0 @@ -var mkdirp = require('../'); -var path = require('path'); -var fs = require('fs'); -var test = require('tap').test; - -test('return value', function (t) { - t.plan(4); - var x = Math.floor(Math.random() * Math.pow(16,4)).toString(16); - var y = Math.floor(Math.random() * Math.pow(16,4)).toString(16); - var z = Math.floor(Math.random() * Math.pow(16,4)).toString(16); - - var file = '/tmp/' + [x,y,z].join('/'); - - // should return the first dir created. - // By this point, it would be profoundly surprising if /tmp didn't - // already exist, since every other test makes things in there. - mkdirp(file, function (err, made) { - t.ifError(err); - t.equal(made, '/tmp/' + x); - mkdirp(file, function (err, made) { - t.ifError(err); - t.equal(made, null); - }); - }); -}); diff --git a/node_modules/mkdirp/test/return_sync.js b/node_modules/mkdirp/test/return_sync.js deleted file mode 100644 index 7c222d355..000000000 --- a/node_modules/mkdirp/test/return_sync.js +++ /dev/null @@ -1,24 +0,0 @@ -var mkdirp = require('../'); -var path = require('path'); -var fs = require('fs'); -var test = require('tap').test; - -test('return value', function (t) { - t.plan(2); - var x = Math.floor(Math.random() * Math.pow(16,4)).toString(16); - var y = Math.floor(Math.random() * Math.pow(16,4)).toString(16); - var z = Math.floor(Math.random() * Math.pow(16,4)).toString(16); - - var file = '/tmp/' + [x,y,z].join('/'); - - // should return the first dir created. - // By this point, it would be profoundly surprising if /tmp didn't - // already exist, since every other test makes things in there. - // Note that this will throw on failure, which will fail the test. - var made = mkdirp.sync(file); - t.equal(made, '/tmp/' + x); - - // making the same file again should have no effect. - made = mkdirp.sync(file); - t.equal(made, null); -}); diff --git a/node_modules/mkdirp/test/root.js b/node_modules/mkdirp/test/root.js deleted file mode 100644 index 9e7d079d9..000000000 --- a/node_modules/mkdirp/test/root.js +++ /dev/null @@ -1,19 +0,0 @@ -var mkdirp = require('../'); -var path = require('path'); -var fs = require('fs'); -var test = require('tap').test; -var _0755 = parseInt('0755', 8); - -test('root', function (t) { - // '/' on unix, 'c:/' on windows. - var file = path.resolve('/'); - - mkdirp(file, _0755, function (err) { - if (err) throw err - fs.stat(file, function (er, stat) { - if (er) throw er - t.ok(stat.isDirectory(), 'target is a directory'); - t.end(); - }) - }); -}); diff --git a/node_modules/mkdirp/test/sync.js b/node_modules/mkdirp/test/sync.js deleted file mode 100644 index 8c8dc938c..000000000 --- a/node_modules/mkdirp/test/sync.js +++ /dev/null @@ -1,32 +0,0 @@ -var mkdirp = require('../'); -var path = require('path'); -var fs = require('fs'); -var exists = fs.exists || path.exists; -var test = require('tap').test; -var _0777 = parseInt('0777', 8); -var _0755 = parseInt('0755', 8); - -test('sync', function (t) { - t.plan(4); - var x = Math.floor(Math.random() * Math.pow(16,4)).toString(16); - var y = Math.floor(Math.random() * Math.pow(16,4)).toString(16); - var z = Math.floor(Math.random() * Math.pow(16,4)).toString(16); - - var file = '/tmp/' + [x,y,z].join('/'); - - try { - mkdirp.sync(file, _0755); - } catch (err) { - t.fail(err); - return t.end(); - } - - exists(file, function (ex) { - t.ok(ex, 'file created'); - fs.stat(file, function (err, stat) { - t.ifError(err); - t.equal(stat.mode & _0777, _0755); - t.ok(stat.isDirectory(), 'target not a directory'); - }); - }); -}); diff --git a/node_modules/mkdirp/test/umask.js b/node_modules/mkdirp/test/umask.js deleted file mode 100644 index 2033c63a4..000000000 --- a/node_modules/mkdirp/test/umask.js +++ /dev/null @@ -1,28 +0,0 @@ -var mkdirp = require('../'); -var path = require('path'); -var fs = require('fs'); -var exists = fs.exists || path.exists; -var test = require('tap').test; -var _0777 = parseInt('0777', 8); -var _0755 = parseInt('0755', 8); - -test('implicit mode from umask', function (t) { - t.plan(5); - var x = Math.floor(Math.random() * Math.pow(16,4)).toString(16); - var y = Math.floor(Math.random() * Math.pow(16,4)).toString(16); - var z = Math.floor(Math.random() * Math.pow(16,4)).toString(16); - - var file = '/tmp/' + [x,y,z].join('/'); - - mkdirp(file, function (err) { - t.ifError(err); - exists(file, function (ex) { - t.ok(ex, 'file created'); - fs.stat(file, function (err, stat) { - t.ifError(err); - t.equal(stat.mode & _0777, _0777 & (~process.umask())); - t.ok(stat.isDirectory(), 'target not a directory'); - }); - }) - }); -}); diff --git a/node_modules/mkdirp/test/umask_sync.js b/node_modules/mkdirp/test/umask_sync.js deleted file mode 100644 index 11a761474..000000000 --- a/node_modules/mkdirp/test/umask_sync.js +++ /dev/null @@ -1,32 +0,0 @@ -var mkdirp = require('../'); -var path = require('path'); -var fs = require('fs'); -var exists = fs.exists || path.exists; -var test = require('tap').test; -var _0777 = parseInt('0777', 8); -var _0755 = parseInt('0755', 8); - -test('umask sync modes', function (t) { - t.plan(4); - var x = Math.floor(Math.random() * Math.pow(16,4)).toString(16); - var y = Math.floor(Math.random() * Math.pow(16,4)).toString(16); - var z = Math.floor(Math.random() * Math.pow(16,4)).toString(16); - - var file = '/tmp/' + [x,y,z].join('/'); - - try { - mkdirp.sync(file); - } catch (err) { - t.fail(err); - return t.end(); - } - - exists(file, function (ex) { - t.ok(ex, 'file created'); - fs.stat(file, function (err, stat) { - t.ifError(err); - t.equal(stat.mode & _0777, (_0777 & (~process.umask()))); - t.ok(stat.isDirectory(), 'target not a directory'); - }); - }); -}); diff --git a/node_modules/nan/CHANGELOG.md b/node_modules/nan/CHANGELOG.md index 7cdfbe77d..93d949646 100644 --- a/node_modules/nan/CHANGELOG.md +++ b/node_modules/nan/CHANGELOG.md @@ -1,6 +1,14 @@ # NAN ChangeLog -**Version 2.14.0: current Node 12.2.0, Node 0.12: 0.12.18, Node 0.10: 0.10.48, iojs: 3.3.1** +**Version 2.14.2: current Node 14.13.1, Node 0.12: 0.12.18, Node 0.10: 0.10.48, iojs: 3.3.1** + +### 2.14.2 Oct 13 2020 + + - Bugfix: fix gcc 8 function cast warning (#899) 35f0fab205574b2cbda04e6347c8b2db755e124f + +### 2.14.1 Apr 21 2020 + + - Bugfix: use GetBackingStore() instead of GetContents() (#888) 2c023bd447661a61071da318b0ff4003c3858d39 ### 2.14.0 May 16 2019 diff --git a/node_modules/nan/README.md b/node_modules/nan/README.md index 3389ef529..f671ef142 100644 --- a/node_modules/nan/README.md +++ b/node_modules/nan/README.md @@ -1,9 +1,9 @@ Native Abstractions for Node.js =============================== -**A header file filled with macro and utility goodness for making add-on development for Node.js easier across versions 0.8, 0.10, 0.12, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 and 12.** +**A header file filled with macro and utility goodness for making add-on development for Node.js easier across versions 0.8, 0.10, 0.12, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13 and 14.** -***Current version: 2.14.0*** +***Current version: 2.14.2*** *(See [CHANGELOG.md](https://github.com/nodejs/nan/blob/master/CHANGELOG.md) for complete ChangeLog)* @@ -68,8 +68,7 @@ Also take a look at our comprehensive **[C++ test suite](https://github.com/node Additional to the NAN documentation below, please consult: -* [The V8 Getting Started * Guide](https://github.com/v8/v8/wiki/Getting%20Started%20with%20Embedding) -* [The V8 Embedders * Guide](https://github.com/v8/v8/wiki/Embedder%27s%20Guide) +* [The V8 Getting Started * Guide](https://v8.dev/docs/embed) * [V8 API Documentation](https://v8docs.nodesource.com/) * [Node Add-on Documentation](https://nodejs.org/api/addons.html) @@ -214,12 +213,12 @@ NAN provides a `v8::Script` helpers as the API has changed over the supported ve ### JSON -The _JSON_ object provides the c++ versions of the methods offered by the `JSON` object in javascript. V8 exposes these methods via the `v8::JSON` object. +The _JSON_ object provides the C++ versions of the methods offered by the `JSON` object in javascript. V8 exposes these methods via the `v8::JSON` object. - Nan::JSON.Parse - Nan::JSON.Stringify -Refer to the V8 JSON object in the [V8 documentation](https://v8docs.nodesource.com/node-8.11/da/d6f/classv8_1_1_j_s_o_n.html) for more information about these methods and their arguments. +Refer to the V8 JSON object in the [V8 documentation](https://v8docs.nodesource.com/node-8.16/da/d6f/classv8_1_1_j_s_o_n.html) for more information about these methods and their arguments. ### Errors diff --git a/node_modules/nan/doc/errors.md b/node_modules/nan/doc/errors.md index 8127a5483..843435b2b 100644 --- a/node_modules/nan/doc/errors.md +++ b/node_modules/nan/doc/errors.md @@ -24,7 +24,7 @@ Also consult the V8 Embedders Guide section on [Exceptions](https://developers.g ### Nan::Error() -Create a new Error object using the [v8::Exception](https://v8docs.nodesource.com/node-8.11/da/d6a/classv8_1_1_exception.html) class in a way that is compatible across the supported versions of V8. +Create a new Error object using the [v8::Exception](https://v8docs.nodesource.com/node-8.16/da/d6a/classv8_1_1_exception.html) class in a way that is compatible across the supported versions of V8. Note that an Error object is simply a specialized form of `v8::Value`. @@ -39,7 +39,7 @@ v8::Local Nan::Error(v8::Local msg); ### Nan::RangeError() -Create a new RangeError object using the [v8::Exception](https://v8docs.nodesource.com/node-8.11/da/d6a/classv8_1_1_exception.html) class in a way that is compatible across the supported versions of V8. +Create a new RangeError object using the [v8::Exception](https://v8docs.nodesource.com/node-8.16/da/d6a/classv8_1_1_exception.html) class in a way that is compatible across the supported versions of V8. Note that an RangeError object is simply a specialized form of `v8::Value`. @@ -54,7 +54,7 @@ v8::Local Nan::RangeError(v8::Local msg); ### Nan::ReferenceError() -Create a new ReferenceError object using the [v8::Exception](https://v8docs.nodesource.com/node-8.11/da/d6a/classv8_1_1_exception.html) class in a way that is compatible across the supported versions of V8. +Create a new ReferenceError object using the [v8::Exception](https://v8docs.nodesource.com/node-8.16/da/d6a/classv8_1_1_exception.html) class in a way that is compatible across the supported versions of V8. Note that an ReferenceError object is simply a specialized form of `v8::Value`. @@ -69,7 +69,7 @@ v8::Local Nan::ReferenceError(v8::Local msg); ### Nan::SyntaxError() -Create a new SyntaxError object using the [v8::Exception](https://v8docs.nodesource.com/node-8.11/da/d6a/classv8_1_1_exception.html) class in a way that is compatible across the supported versions of V8. +Create a new SyntaxError object using the [v8::Exception](https://v8docs.nodesource.com/node-8.16/da/d6a/classv8_1_1_exception.html) class in a way that is compatible across the supported versions of V8. Note that an SyntaxError object is simply a specialized form of `v8::Value`. @@ -84,7 +84,7 @@ v8::Local Nan::SyntaxError(v8::Local msg); ### Nan::TypeError() -Create a new TypeError object using the [v8::Exception](https://v8docs.nodesource.com/node-8.11/da/d6a/classv8_1_1_exception.html) class in a way that is compatible across the supported versions of V8. +Create a new TypeError object using the [v8::Exception](https://v8docs.nodesource.com/node-8.16/da/d6a/classv8_1_1_exception.html) class in a way that is compatible across the supported versions of V8. Note that an TypeError object is simply a specialized form of `v8::Value`. @@ -194,7 +194,7 @@ v8::Local Nan::ErrnoException(int errorno, ### Nan::TryCatch -A simple wrapper around [`v8::TryCatch`](https://v8docs.nodesource.com/node-8.11/d4/dc6/classv8_1_1_try_catch.html) compatible with all supported versions of V8. Can be used as a direct replacement in most cases. See also [`Nan::FatalException()`](#api_nan_fatal_exception) for an internal use compatible with `node::FatalException`. +A simple wrapper around [`v8::TryCatch`](https://v8docs.nodesource.com/node-8.16/d4/dc6/classv8_1_1_try_catch.html) compatible with all supported versions of V8. Can be used as a direct replacement in most cases. See also [`Nan::FatalException()`](#api_nan_fatal_exception) for an internal use compatible with `node::FatalException`. Signature: diff --git a/node_modules/nan/doc/json.md b/node_modules/nan/doc/json.md index 4fa78dbab..d14259785 100644 --- a/node_modules/nan/doc/json.md +++ b/node_modules/nan/doc/json.md @@ -5,13 +5,13 @@ The _JSON_ object provides the c++ versions of the methods offered by the `JSON` - Nan::JSON.Parse - Nan::JSON.Stringify -Refer to the V8 JSON object in the [V8 documentation](https://v8docs.nodesource.com/node-8.11/da/d6f/classv8_1_1_j_s_o_n.html) for more information about these methods and their arguments. +Refer to the V8 JSON object in the [V8 documentation](https://v8docs.nodesource.com/node-8.16/da/d6f/classv8_1_1_j_s_o_n.html) for more information about these methods and their arguments. ### Nan::JSON.Parse -A simple wrapper around [`v8::JSON::Parse`](https://v8docs.nodesource.com/node-8.11/da/d6f/classv8_1_1_j_s_o_n.html#a936310d2540fb630ed37d3ee3ffe4504). +A simple wrapper around [`v8::JSON::Parse`](https://v8docs.nodesource.com/node-8.16/da/d6f/classv8_1_1_j_s_o_n.html#a936310d2540fb630ed37d3ee3ffe4504). Definition: @@ -37,7 +37,7 @@ if (!result.IsEmpty()) { ### Nan::JSON.Stringify -A simple wrapper around [`v8::JSON::Stringify`](https://v8docs.nodesource.com/node-8.11/da/d6f/classv8_1_1_j_s_o_n.html#a44b255c3531489ce43f6110209138860). +A simple wrapper around [`v8::JSON::Stringify`](https://v8docs.nodesource.com/node-8.16/da/d6f/classv8_1_1_j_s_o_n.html#a44b255c3531489ce43f6110209138860). Definition: diff --git a/node_modules/nan/doc/maybe_types.md b/node_modules/nan/doc/maybe_types.md index 1a9fabf7b..142851a19 100644 --- a/node_modules/nan/doc/maybe_types.md +++ b/node_modules/nan/doc/maybe_types.md @@ -47,7 +47,7 @@ The `Nan::MaybeLocal` and `Nan::Maybe` types are monads that encapsulate `v8::Lo ### Nan::MaybeLocal -A `Nan::MaybeLocal` is a wrapper around [`v8::Local`](https://v8docs.nodesource.com/node-8.11/de/deb/classv8_1_1_local.html) that enforces a check that determines whether the `v8::Local` is empty before it can be used. +A `Nan::MaybeLocal` is a wrapper around [`v8::Local`](https://v8docs.nodesource.com/node-8.16/de/deb/classv8_1_1_local.html) that enforces a check that determines whether the `v8::Local` is empty before it can be used. If an API method returns a `Nan::MaybeLocal`, the API method can potentially fail either because an exception is thrown, or because an exception is pending, e.g. because a previous API call threw an exception that hasn't been caught yet, or because a `v8::TerminateExecution` exception was thrown. In that case, an empty `Nan::MaybeLocal` is returned. @@ -71,7 +71,7 @@ template class Nan::MaybeLocal { }; ``` -See the documentation for [`v8::MaybeLocal`](https://v8docs.nodesource.com/node-8.11/d8/d7d/classv8_1_1_maybe_local.html) for further details. +See the documentation for [`v8::MaybeLocal`](https://v8docs.nodesource.com/node-8.16/d8/d7d/classv8_1_1_maybe_local.html) for further details. ### Nan::Maybe @@ -99,7 +99,7 @@ template class Nan::Maybe { }; ``` -See the documentation for [`v8::Maybe`](https://v8docs.nodesource.com/node-8.11/d9/d4b/classv8_1_1_maybe.html) for further details. +See the documentation for [`v8::Maybe`](https://v8docs.nodesource.com/node-8.16/d9/d4b/classv8_1_1_maybe.html) for further details. ### Nan::Nothing @@ -122,7 +122,7 @@ template Nan::Maybe Nan::Just(const T &t); ### Nan::Call() -A helper method for calling a synchronous [`v8::Function#Call()`](https://v8docs.nodesource.com/node-8.11/d5/d54/classv8_1_1_function.html#a9c3d0e4e13ddd7721fce238aa5b94a11) in a way compatible across supported versions of V8. +A helper method for calling a synchronous [`v8::Function#Call()`](https://v8docs.nodesource.com/node-8.16/d5/d54/classv8_1_1_function.html#a9c3d0e4e13ddd7721fce238aa5b94a11) in a way compatible across supported versions of V8. For asynchronous callbacks, use Nan::Callback::Call along with an AsyncResource. @@ -139,7 +139,7 @@ Nan::MaybeLocal Nan::Call(const Nan::Callback& callback, int argc, v8 ### Nan::ToDetailString() -A helper method for calling [`v8::Value#ToDetailString()`](https://v8docs.nodesource.com/node-8.11/dc/d0a/classv8_1_1_value.html#a2f9770296dc2c8d274bc8cc0dca243e5) in a way compatible across supported versions of V8. +A helper method for calling [`v8::Value#ToDetailString()`](https://v8docs.nodesource.com/node-8.16/dc/d0a/classv8_1_1_value.html#a2f9770296dc2c8d274bc8cc0dca243e5) in a way compatible across supported versions of V8. Signature: @@ -151,7 +151,7 @@ Nan::MaybeLocal Nan::ToDetailString(v8::Local val); ### Nan::ToArrayIndex() -A helper method for calling [`v8::Value#ToArrayIndex()`](https://v8docs.nodesource.com/node-8.11/dc/d0a/classv8_1_1_value.html#acc5bbef3c805ec458470c0fcd6f13493) in a way compatible across supported versions of V8. +A helper method for calling [`v8::Value#ToArrayIndex()`](https://v8docs.nodesource.com/node-8.16/dc/d0a/classv8_1_1_value.html#acc5bbef3c805ec458470c0fcd6f13493) in a way compatible across supported versions of V8. Signature: @@ -163,7 +163,7 @@ Nan::MaybeLocal Nan::ToArrayIndex(v8::Local val); ### Nan::Equals() -A helper method for calling [`v8::Value#Equals()`](https://v8docs.nodesource.com/node-8.11/dc/d0a/classv8_1_1_value.html#a08fba1d776a59bbf6864b25f9152c64b) in a way compatible across supported versions of V8. +A helper method for calling [`v8::Value#Equals()`](https://v8docs.nodesource.com/node-8.16/dc/d0a/classv8_1_1_value.html#a08fba1d776a59bbf6864b25f9152c64b) in a way compatible across supported versions of V8. Signature: @@ -175,7 +175,7 @@ Nan::Maybe Nan::Equals(v8::Local a, v8::Local(b)); ### Nan::NewInstance() -A helper method for calling [`v8::Function#NewInstance()`](https://v8docs.nodesource.com/node-8.11/d5/d54/classv8_1_1_function.html#ae477558b10c14b76ed00e8dbab44ce5b) and [`v8::ObjectTemplate#NewInstance()`](https://v8docs.nodesource.com/node-8.11/db/d5f/classv8_1_1_object_template.html#ad605a7543cfbc5dab54cdb0883d14ae4) in a way compatible across supported versions of V8. +A helper method for calling [`v8::Function#NewInstance()`](https://v8docs.nodesource.com/node-8.16/d5/d54/classv8_1_1_function.html#ae477558b10c14b76ed00e8dbab44ce5b) and [`v8::ObjectTemplate#NewInstance()`](https://v8docs.nodesource.com/node-8.16/db/d5f/classv8_1_1_object_template.html#ad605a7543cfbc5dab54cdb0883d14ae4) in a way compatible across supported versions of V8. Signature: @@ -189,7 +189,7 @@ Nan::MaybeLocal Nan::NewInstance(v8::Local h); ### Nan::GetFunction() -A helper method for calling [`v8::FunctionTemplate#GetFunction()`](https://v8docs.nodesource.com/node-8.11/d8/d83/classv8_1_1_function_template.html#a56d904662a86eca78da37d9bb0ed3705) in a way compatible across supported versions of V8. +A helper method for calling [`v8::FunctionTemplate#GetFunction()`](https://v8docs.nodesource.com/node-8.16/d8/d83/classv8_1_1_function_template.html#a56d904662a86eca78da37d9bb0ed3705) in a way compatible across supported versions of V8. Signature: @@ -201,7 +201,7 @@ Nan::MaybeLocal Nan::GetFunction(v8::Local t ### Nan::Set() -A helper method for calling [`v8::Object#Set()`](https://v8docs.nodesource.com/node-8.11/db/d85/classv8_1_1_object.html#a67604ea3734f170c66026064ea808f20) in a way compatible across supported versions of V8. +A helper method for calling [`v8::Object#Set()`](https://v8docs.nodesource.com/node-8.16/db/d85/classv8_1_1_object.html#a67604ea3734f170c66026064ea808f20) in a way compatible across supported versions of V8. Signature: @@ -218,7 +218,7 @@ Nan::Maybe Nan::Set(v8::Local obj, ### Nan::DefineOwnProperty() -A helper method for calling [`v8::Object#DefineOwnProperty()`](https://v8docs.nodesource.com/node-8.11/db/d85/classv8_1_1_object.html#a6f76b2ed605cb8f9185b92de0033a820) in a way compatible across supported versions of V8. +A helper method for calling [`v8::Object#DefineOwnProperty()`](https://v8docs.nodesource.com/node-8.16/db/d85/classv8_1_1_object.html#a6f76b2ed605cb8f9185b92de0033a820) in a way compatible across supported versions of V8. Signature: @@ -250,7 +250,7 @@ NAN_DEPRECATED Nan::Maybe Nan::ForceSet(v8::Local obj, ### Nan::Get() -A helper method for calling [`v8::Object#Get()`](https://v8docs.nodesource.com/node-8.11/db/d85/classv8_1_1_object.html#a2565f03e736694f6b1e1cf22a0b4eac2) in a way compatible across supported versions of V8. +A helper method for calling [`v8::Object#Get()`](https://v8docs.nodesource.com/node-8.16/db/d85/classv8_1_1_object.html#a2565f03e736694f6b1e1cf22a0b4eac2) in a way compatible across supported versions of V8. Signature: @@ -264,7 +264,7 @@ Nan::MaybeLocal Nan::Get(v8::Local obj, uint32_t index); ### Nan::GetPropertyAttributes() -A helper method for calling [`v8::Object#GetPropertyAttributes()`](https://v8docs.nodesource.com/node-8.11/db/d85/classv8_1_1_object.html#a9b898894da3d1db2714fd9325a54fe57) in a way compatible across supported versions of V8. +A helper method for calling [`v8::Object#GetPropertyAttributes()`](https://v8docs.nodesource.com/node-8.16/db/d85/classv8_1_1_object.html#a9b898894da3d1db2714fd9325a54fe57) in a way compatible across supported versions of V8. Signature: @@ -278,7 +278,7 @@ Nan::Maybe Nan::GetPropertyAttributes( ### Nan::Has() -A helper method for calling [`v8::Object#Has()`](https://v8docs.nodesource.com/node-8.11/db/d85/classv8_1_1_object.html#ab3c3d89ea7c2f9afd08965bd7299a41d) in a way compatible across supported versions of V8. +A helper method for calling [`v8::Object#Has()`](https://v8docs.nodesource.com/node-8.16/db/d85/classv8_1_1_object.html#ab3c3d89ea7c2f9afd08965bd7299a41d) in a way compatible across supported versions of V8. Signature: @@ -291,7 +291,7 @@ Nan::Maybe Nan::Has(v8::Local obj, uint32_t index); ### Nan::Delete() -A helper method for calling [`v8::Object#Delete()`](https://v8docs.nodesource.com/node-8.11/db/d85/classv8_1_1_object.html#a48e4a19b2cedff867eecc73ddb7d377f) in a way compatible across supported versions of V8. +A helper method for calling [`v8::Object#Delete()`](https://v8docs.nodesource.com/node-8.16/db/d85/classv8_1_1_object.html#a48e4a19b2cedff867eecc73ddb7d377f) in a way compatible across supported versions of V8. Signature: @@ -305,7 +305,7 @@ Nan::Maybe Nan::Delete(v8::Local obj, uint32_t index); ### Nan::GetPropertyNames() -A helper method for calling [`v8::Object#GetPropertyNames()`](https://v8docs.nodesource.com/node-8.11/db/d85/classv8_1_1_object.html#aced885270cfd2c956367b5eedc7fbfe8) in a way compatible across supported versions of V8. +A helper method for calling [`v8::Object#GetPropertyNames()`](https://v8docs.nodesource.com/node-8.16/db/d85/classv8_1_1_object.html#aced885270cfd2c956367b5eedc7fbfe8) in a way compatible across supported versions of V8. Signature: @@ -317,7 +317,7 @@ Nan::MaybeLocal Nan::GetPropertyNames(v8::Local obj); ### Nan::GetOwnPropertyNames() -A helper method for calling [`v8::Object#GetOwnPropertyNames()`](https://v8docs.nodesource.com/node-8.11/db/d85/classv8_1_1_object.html#a79a6e4d66049b9aa648ed4dfdb23e6eb) in a way compatible across supported versions of V8. +A helper method for calling [`v8::Object#GetOwnPropertyNames()`](https://v8docs.nodesource.com/node-8.16/db/d85/classv8_1_1_object.html#a79a6e4d66049b9aa648ed4dfdb23e6eb) in a way compatible across supported versions of V8. Signature: @@ -329,7 +329,7 @@ Nan::MaybeLocal Nan::GetOwnPropertyNames(v8::Local obj); ### Nan::SetPrototype() -A helper method for calling [`v8::Object#SetPrototype()`](https://v8docs.nodesource.com/node-8.11/db/d85/classv8_1_1_object.html#a442706b22fceda6e6d1f632122a9a9f4) in a way compatible across supported versions of V8. +A helper method for calling [`v8::Object#SetPrototype()`](https://v8docs.nodesource.com/node-8.16/db/d85/classv8_1_1_object.html#a442706b22fceda6e6d1f632122a9a9f4) in a way compatible across supported versions of V8. Signature: @@ -342,7 +342,7 @@ Nan::Maybe Nan::SetPrototype(v8::Local obj, ### Nan::ObjectProtoToString() -A helper method for calling [`v8::Object#ObjectProtoToString()`](https://v8docs.nodesource.com/node-8.11/db/d85/classv8_1_1_object.html#ab7a92b4dcf822bef72f6c0ac6fea1f0b) in a way compatible across supported versions of V8. +A helper method for calling [`v8::Object#ObjectProtoToString()`](https://v8docs.nodesource.com/node-8.16/db/d85/classv8_1_1_object.html#ab7a92b4dcf822bef72f6c0ac6fea1f0b) in a way compatible across supported versions of V8. Signature: @@ -354,7 +354,7 @@ Nan::MaybeLocal Nan::ObjectProtoToString(v8::Local obj); ### Nan::HasOwnProperty() -A helper method for calling [`v8::Object#HasOwnProperty()`](https://v8docs.nodesource.com/node-8.11/db/d85/classv8_1_1_object.html#ab7b7245442ca6de1e1c145ea3fd653ff) in a way compatible across supported versions of V8. +A helper method for calling [`v8::Object#HasOwnProperty()`](https://v8docs.nodesource.com/node-8.16/db/d85/classv8_1_1_object.html#ab7b7245442ca6de1e1c145ea3fd653ff) in a way compatible across supported versions of V8. Signature: @@ -367,7 +367,7 @@ Nan::Maybe Nan::HasOwnProperty(v8::Local obj, ### Nan::HasRealNamedProperty() -A helper method for calling [`v8::Object#HasRealNamedProperty()`](https://v8docs.nodesource.com/node-8.11/db/d85/classv8_1_1_object.html#ad8b80a59c9eb3c1e6c3cd6c84571f767) in a way compatible across supported versions of V8. +A helper method for calling [`v8::Object#HasRealNamedProperty()`](https://v8docs.nodesource.com/node-8.16/db/d85/classv8_1_1_object.html#ad8b80a59c9eb3c1e6c3cd6c84571f767) in a way compatible across supported versions of V8. Signature: @@ -380,7 +380,7 @@ Nan::Maybe Nan::HasRealNamedProperty(v8::Local obj, ### Nan::HasRealIndexedProperty() -A helper method for calling [`v8::Object#HasRealIndexedProperty()`](https://v8docs.nodesource.com/node-8.11/db/d85/classv8_1_1_object.html#af94fc1135a5e74a2193fb72c3a1b9855) in a way compatible across supported versions of V8. +A helper method for calling [`v8::Object#HasRealIndexedProperty()`](https://v8docs.nodesource.com/node-8.16/db/d85/classv8_1_1_object.html#af94fc1135a5e74a2193fb72c3a1b9855) in a way compatible across supported versions of V8. Signature: @@ -393,7 +393,7 @@ Nan::Maybe Nan::HasRealIndexedProperty(v8::Local obj, ### Nan::HasRealNamedCallbackProperty() -A helper method for calling [`v8::Object#HasRealNamedCallbackProperty()`](https://v8docs.nodesource.com/node-8.11/db/d85/classv8_1_1_object.html#af743b7ea132b89f84d34d164d0668811) in a way compatible across supported versions of V8. +A helper method for calling [`v8::Object#HasRealNamedCallbackProperty()`](https://v8docs.nodesource.com/node-8.16/db/d85/classv8_1_1_object.html#af743b7ea132b89f84d34d164d0668811) in a way compatible across supported versions of V8. Signature: @@ -407,7 +407,7 @@ Nan::Maybe Nan::HasRealNamedCallbackProperty( ### Nan::GetRealNamedPropertyInPrototypeChain() -A helper method for calling [`v8::Object#GetRealNamedPropertyInPrototypeChain()`](https://v8docs.nodesource.com/node-8.11/db/d85/classv8_1_1_object.html#a8700b1862e6b4783716964ba4d5e6172) in a way compatible across supported versions of V8. +A helper method for calling [`v8::Object#GetRealNamedPropertyInPrototypeChain()`](https://v8docs.nodesource.com/node-8.16/db/d85/classv8_1_1_object.html#a8700b1862e6b4783716964ba4d5e6172) in a way compatible across supported versions of V8. Signature: @@ -421,7 +421,7 @@ Nan::MaybeLocal Nan::GetRealNamedPropertyInPrototypeChain( ### Nan::GetRealNamedProperty() -A helper method for calling [`v8::Object#GetRealNamedProperty()`](https://v8docs.nodesource.com/node-8.11/db/d85/classv8_1_1_object.html#a84471a824576a5994fdd0ffcbf99ccc0) in a way compatible across supported versions of V8. +A helper method for calling [`v8::Object#GetRealNamedProperty()`](https://v8docs.nodesource.com/node-8.16/db/d85/classv8_1_1_object.html#a84471a824576a5994fdd0ffcbf99ccc0) in a way compatible across supported versions of V8. Signature: @@ -434,7 +434,7 @@ Nan::MaybeLocal Nan::GetRealNamedProperty(v8::Local obj, ### Nan::CallAsFunction() -A helper method for calling [`v8::Object#CallAsFunction()`](https://v8docs.nodesource.com/node-8.11/db/d85/classv8_1_1_object.html#ad3ffc36f3dfc3592ce2a96bc047ee2cd) in a way compatible across supported versions of V8. +A helper method for calling [`v8::Object#CallAsFunction()`](https://v8docs.nodesource.com/node-8.16/db/d85/classv8_1_1_object.html#ad3ffc36f3dfc3592ce2a96bc047ee2cd) in a way compatible across supported versions of V8. Signature: @@ -449,7 +449,7 @@ Nan::MaybeLocal Nan::CallAsFunction(v8::Local obj, ### Nan::CallAsConstructor() -A helper method for calling [`v8::Object#CallAsConstructor()`](https://v8docs.nodesource.com/node-8.11/db/d85/classv8_1_1_object.html#a50d571de50d0b0dfb28795619d07a01b) in a way compatible across supported versions of V8. +A helper method for calling [`v8::Object#CallAsConstructor()`](https://v8docs.nodesource.com/node-8.16/db/d85/classv8_1_1_object.html#a50d571de50d0b0dfb28795619d07a01b) in a way compatible across supported versions of V8. Signature: @@ -463,7 +463,7 @@ Nan::MaybeLocal Nan::CallAsConstructor(v8::Local obj, ### Nan::GetSourceLine() -A helper method for calling [`v8::Message#GetSourceLine()`](https://v8docs.nodesource.com/node-8.11/d9/d28/classv8_1_1_message.html#a849f7a6c41549d83d8159825efccd23a) in a way compatible across supported versions of V8. +A helper method for calling [`v8::Message#GetSourceLine()`](https://v8docs.nodesource.com/node-8.16/d9/d28/classv8_1_1_message.html#a849f7a6c41549d83d8159825efccd23a) in a way compatible across supported versions of V8. Signature: @@ -475,7 +475,7 @@ Nan::MaybeLocal Nan::GetSourceLine(v8::Local msg); ### Nan::GetLineNumber() -A helper method for calling [`v8::Message#GetLineNumber()`](https://v8docs.nodesource.com/node-8.11/d9/d28/classv8_1_1_message.html#adbe46c10a88a6565f2732a2d2adf99b9) in a way compatible across supported versions of V8. +A helper method for calling [`v8::Message#GetLineNumber()`](https://v8docs.nodesource.com/node-8.16/d9/d28/classv8_1_1_message.html#adbe46c10a88a6565f2732a2d2adf99b9) in a way compatible across supported versions of V8. Signature: @@ -487,7 +487,7 @@ Nan::Maybe Nan::GetLineNumber(v8::Local msg); ### Nan::GetStartColumn() -A helper method for calling [`v8::Message#GetStartColumn()`](https://v8docs.nodesource.com/node-8.11/d9/d28/classv8_1_1_message.html#a60ede616ba3822d712e44c7a74487ba6) in a way compatible across supported versions of V8. +A helper method for calling [`v8::Message#GetStartColumn()`](https://v8docs.nodesource.com/node-8.16/d9/d28/classv8_1_1_message.html#a60ede616ba3822d712e44c7a74487ba6) in a way compatible across supported versions of V8. Signature: @@ -499,7 +499,7 @@ Nan::Maybe Nan::GetStartColumn(v8::Local msg); ### Nan::GetEndColumn() -A helper method for calling [`v8::Message#GetEndColumn()`](https://v8docs.nodesource.com/node-8.11/d9/d28/classv8_1_1_message.html#aaa004cf19e529da980bc19fcb76d93be) in a way compatible across supported versions of V8. +A helper method for calling [`v8::Message#GetEndColumn()`](https://v8docs.nodesource.com/node-8.16/d9/d28/classv8_1_1_message.html#aaa004cf19e529da980bc19fcb76d93be) in a way compatible across supported versions of V8. Signature: @@ -522,7 +522,7 @@ Nan::MaybeLocal Nan::CloneElementAt(v8::Local array, uint ### Nan::HasPrivate() -A helper method for calling [`v8::Object#HasPrivate()`](https://v8docs.nodesource.com/node-8.11/db/d85/classv8_1_1_object.html#af68a0b98066cfdeb8f943e98a40ba08d) in a way compatible across supported versions of V8. +A helper method for calling [`v8::Object#HasPrivate()`](https://v8docs.nodesource.com/node-8.16/db/d85/classv8_1_1_object.html#af68a0b98066cfdeb8f943e98a40ba08d) in a way compatible across supported versions of V8. Signature: @@ -533,7 +533,7 @@ Nan::Maybe Nan::HasPrivate(v8::Local object, v8::Local ### Nan::GetPrivate() -A helper method for calling [`v8::Object#GetPrivate()`](https://v8docs.nodesource.com/node-8.11/db/d85/classv8_1_1_object.html#a169f2da506acbec34deadd9149a1925a) in a way compatible across supported versions of V8. +A helper method for calling [`v8::Object#GetPrivate()`](https://v8docs.nodesource.com/node-8.16/db/d85/classv8_1_1_object.html#a169f2da506acbec34deadd9149a1925a) in a way compatible across supported versions of V8. Signature: @@ -544,7 +544,7 @@ Nan::MaybeLocal Nan::GetPrivate(v8::Local object, v8::Loc ### Nan::SetPrivate() -A helper method for calling [`v8::Object#SetPrivate()`](https://v8docs.nodesource.com/node-8.11/db/d85/classv8_1_1_object.html#ace1769b0f3b86bfe9fda1010916360ee) in a way compatible across supported versions of V8. +A helper method for calling [`v8::Object#SetPrivate()`](https://v8docs.nodesource.com/node-8.16/db/d85/classv8_1_1_object.html#ace1769b0f3b86bfe9fda1010916360ee) in a way compatible across supported versions of V8. Signature: @@ -555,7 +555,7 @@ Nan::Maybe Nan::SetPrivate(v8::Local object, v8::Local ### Nan::DeletePrivate() -A helper method for calling [`v8::Object#DeletePrivate()`](https://v8docs.nodesource.com/node-8.11/db/d85/classv8_1_1_object.html#a138bb32a304f3982be02ad499693b8fd) in a way compatible across supported versions of V8. +A helper method for calling [`v8::Object#DeletePrivate()`](https://v8docs.nodesource.com/node-8.16/db/d85/classv8_1_1_object.html#a138bb32a304f3982be02ad499693b8fd) in a way compatible across supported versions of V8. Signature: diff --git a/node_modules/nan/doc/methods.md b/node_modules/nan/doc/methods.md index b2b26c38a..9642d027c 100644 --- a/node_modules/nan/doc/methods.md +++ b/node_modules/nan/doc/methods.md @@ -37,7 +37,7 @@ In order to expose functionality to JavaScript via a template, you must provide ### Nan::FunctionCallbackInfo -`Nan::FunctionCallbackInfo` should be used in place of [`v8::FunctionCallbackInfo`](https://v8docs.nodesource.com/node-8.11/dd/d0d/classv8_1_1_function_callback_info.html), even with older versions of Node where `v8::FunctionCallbackInfo` does not exist. +`Nan::FunctionCallbackInfo` should be used in place of [`v8::FunctionCallbackInfo`](https://v8docs.nodesource.com/node-8.16/dd/d0d/classv8_1_1_function_callback_info.html), even with older versions of Node where `v8::FunctionCallbackInfo` does not exist. Definition: @@ -56,14 +56,14 @@ template class FunctionCallbackInfo { }; ``` -See the [`v8::FunctionCallbackInfo`](https://v8docs.nodesource.com/node-8.11/dd/d0d/classv8_1_1_function_callback_info.html) documentation for usage details on these. See [`Nan::ReturnValue`](#api_nan_return_value) for further information on how to set a return value from methods. +See the [`v8::FunctionCallbackInfo`](https://v8docs.nodesource.com/node-8.16/dd/d0d/classv8_1_1_function_callback_info.html) documentation for usage details on these. See [`Nan::ReturnValue`](#api_nan_return_value) for further information on how to set a return value from methods. **Note:** `FunctionCallbackInfo::Callee` is removed in Node.js after `10.0.0` because it is was deprecated in V8. Consider using `info.Data()` to pass any information you need. ### Nan::PropertyCallbackInfo -`Nan::PropertyCallbackInfo` should be used in place of [`v8::PropertyCallbackInfo`](https://v8docs.nodesource.com/node-8.11/d7/dc5/classv8_1_1_property_callback_info.html), even with older versions of Node where `v8::PropertyCallbackInfo` does not exist. +`Nan::PropertyCallbackInfo` should be used in place of [`v8::PropertyCallbackInfo`](https://v8docs.nodesource.com/node-8.16/d7/dc5/classv8_1_1_property_callback_info.html), even with older versions of Node where `v8::PropertyCallbackInfo` does not exist. Definition: @@ -78,12 +78,12 @@ template class PropertyCallbackInfo : public PropertyCallbackInfoBas }; ``` -See the [`v8::PropertyCallbackInfo`](https://v8docs.nodesource.com/node-8.11/d7/dc5/classv8_1_1_property_callback_info.html) documentation for usage details on these. See [`Nan::ReturnValue`](#api_nan_return_value) for further information on how to set a return value from property accessor methods. +See the [`v8::PropertyCallbackInfo`](https://v8docs.nodesource.com/node-8.16/d7/dc5/classv8_1_1_property_callback_info.html) documentation for usage details on these. See [`Nan::ReturnValue`](#api_nan_return_value) for further information on how to set a return value from property accessor methods. ### Nan::ReturnValue -`Nan::ReturnValue` is used in place of [`v8::ReturnValue`](https://v8docs.nodesource.com/node-8.11/da/da7/classv8_1_1_return_value.html) on both [`Nan::FunctionCallbackInfo`](#api_nan_function_callback_info) and [`Nan::PropertyCallbackInfo`](#api_nan_property_callback_info) as the return type of `GetReturnValue()`. +`Nan::ReturnValue` is used in place of [`v8::ReturnValue`](https://v8docs.nodesource.com/node-8.16/da/da7/classv8_1_1_return_value.html) on both [`Nan::FunctionCallbackInfo`](#api_nan_function_callback_info) and [`Nan::PropertyCallbackInfo`](#api_nan_property_callback_info) as the return type of `GetReturnValue()`. Example usage: @@ -118,7 +118,7 @@ template class ReturnValue { }; ``` -See the documentation on [`v8::ReturnValue`](https://v8docs.nodesource.com/node-8.11/da/da7/classv8_1_1_return_value.html) for further information on this. +See the documentation on [`v8::ReturnValue`](https://v8docs.nodesource.com/node-8.16/da/da7/classv8_1_1_return_value.html) for further information on this. ### Method declaration @@ -478,10 +478,12 @@ Signature: ```c++ void Nan::SetMethod(v8::Local recv, const char *name, - Nan::FunctionCallback callback) + Nan::FunctionCallback callback, + v8::Local data = v8::Local()) void Nan::SetMethod(v8::Local templ, const char *name, - Nan::FunctionCallback callback) + Nan::FunctionCallback callback, + v8::Local data = v8::Local()) ``` @@ -494,7 +496,8 @@ Signature: ```c++ void Nan::SetPrototypeMethod(v8::Local recv, const char* name, - Nan::FunctionCallback callback) + Nan::FunctionCallback callback, + v8::Local data = v8::Local()) ``` @@ -522,7 +525,7 @@ bool SetAccessor(v8::Local obj, v8::PropertyAttribute attribute = v8::None) ``` -See the V8 [`ObjectTemplate#SetAccessor()`](https://v8docs.nodesource.com/node-8.11/db/d5f/classv8_1_1_object_template.html#aca0ed196f8a9adb1f68b1aadb6c9cd77) and [`Object#SetAccessor()`](https://v8docs.nodesource.com/node-8.11/db/d85/classv8_1_1_object.html#ae91b3b56b357f285288c89fbddc46d1b) for further information about how to use `Nan::SetAccessor()`. +See the V8 [`ObjectTemplate#SetAccessor()`](https://v8docs.nodesource.com/node-8.16/db/d5f/classv8_1_1_object_template.html#aca0ed196f8a9adb1f68b1aadb6c9cd77) and [`Object#SetAccessor()`](https://v8docs.nodesource.com/node-8.16/db/d85/classv8_1_1_object.html#ae91b3b56b357f285288c89fbddc46d1b) for further information about how to use `Nan::SetAccessor()`. ### Nan::SetNamedPropertyHandler() @@ -547,7 +550,7 @@ void SetNamedPropertyHandler(v8::Local tpl, v8::Local data = v8::Local()) ``` -See the V8 [`ObjectTemplate#SetNamedPropertyHandler()`](https://v8docs.nodesource.com/node-8.11/db/d5f/classv8_1_1_object_template.html#a33b3ebd7de641f6cc6414b7de01fc1c7) for further information about how to use `Nan::SetNamedPropertyHandler()`. +See the V8 [`ObjectTemplate#SetNamedPropertyHandler()`](https://v8docs.nodesource.com/node-8.16/db/d5f/classv8_1_1_object_template.html#a33b3ebd7de641f6cc6414b7de01fc1c7) for further information about how to use `Nan::SetNamedPropertyHandler()`. ### Nan::SetIndexedPropertyHandler() @@ -572,7 +575,7 @@ void SetIndexedPropertyHandler(v8::Local tpl, v8::Local data = v8::Local()) ``` -See the V8 [`ObjectTemplate#SetIndexedPropertyHandler()`](https://v8docs.nodesource.com/node-8.11/db/d5f/classv8_1_1_object_template.html#ac89f06d634add0e890452033f7d17ff1) for further information about how to use `Nan::SetIndexedPropertyHandler()`. +See the V8 [`ObjectTemplate#SetIndexedPropertyHandler()`](https://v8docs.nodesource.com/node-8.16/db/d5f/classv8_1_1_object_template.html#ac89f06d634add0e890452033f7d17ff1) for further information about how to use `Nan::SetIndexedPropertyHandler()`. ### Nan::SetTemplate() @@ -591,7 +594,7 @@ void Nan::SetTemplate(v8::Local templ, v8::PropertyAttribute attributes) ``` -Calls the `Template`'s [`Set()`](https://v8docs.nodesource.com/node-8.11/db/df7/classv8_1_1_template.html#ae3fbaff137557aa6a0233bc7e52214ac). +Calls the `Template`'s [`Set()`](https://v8docs.nodesource.com/node-8.16/db/df7/classv8_1_1_template.html#ae3fbaff137557aa6a0233bc7e52214ac). ### Nan::SetPrototypeTemplate() @@ -610,7 +613,7 @@ void Nan::SetPrototypeTemplate(v8::Local templ, v8::PropertyAttribute attributes) ``` -Calls the `FunctionTemplate`'s _PrototypeTemplate's_ [`Set()`](https://v8docs.nodesource.com/node-8.11/db/df7/classv8_1_1_template.html#a2db6a56597bf23c59659c0659e564ddf). +Calls the `FunctionTemplate`'s _PrototypeTemplate's_ [`Set()`](https://v8docs.nodesource.com/node-8.16/db/df7/classv8_1_1_template.html#a2db6a56597bf23c59659c0659e564ddf). ### Nan::SetInstanceTemplate() @@ -629,7 +632,7 @@ void Nan::SetInstanceTemplate(v8::Local templ, v8::PropertyAttribute attributes) ``` -Calls the `FunctionTemplate`'s _InstanceTemplate's_ [`Set()`](https://v8docs.nodesource.com/node-8.11/db/df7/classv8_1_1_template.html#a2db6a56597bf23c59659c0659e564ddf). +Calls the `FunctionTemplate`'s _InstanceTemplate's_ [`Set()`](https://v8docs.nodesource.com/node-8.16/db/df7/classv8_1_1_template.html#a2db6a56597bf23c59659c0659e564ddf). ### Nan::SetCallHandler() @@ -643,7 +646,7 @@ Signature: void Nan::SetCallHandler(v8::Local templ, Nan::FunctionCallback callback, v8::Local data = v8::Local()) ``` -Calls the `FunctionTemplate`'s [`SetCallHandler()`](https://v8docs.nodesource.com/node-8.11/d8/d83/classv8_1_1_function_template.html#ab7574b298db3c27fbc2ed465c08ea2f8). +Calls the `FunctionTemplate`'s [`SetCallHandler()`](https://v8docs.nodesource.com/node-8.16/d8/d83/classv8_1_1_function_template.html#ab7574b298db3c27fbc2ed465c08ea2f8). ### Nan::SetCallAsFunctionHandler() @@ -657,5 +660,5 @@ Signature: void Nan::SetCallAsFunctionHandler(v8::Local templ, Nan::FunctionCallback callback, v8::Local data = v8::Local()) ``` -Calls the `ObjectTemplate`'s [`SetCallAsFunctionHandler()`](https://v8docs.nodesource.com/node-8.11/db/d5f/classv8_1_1_object_template.html#a5e9612fc80bf6db8f2da199b9b0bd04e). +Calls the `ObjectTemplate`'s [`SetCallAsFunctionHandler()`](https://v8docs.nodesource.com/node-8.16/db/d5f/classv8_1_1_object_template.html#a5e9612fc80bf6db8f2da199b9b0bd04e). diff --git a/node_modules/nan/doc/new.md b/node_modules/nan/doc/new.md index 359df4358..0f28a0e92 100644 --- a/node_modules/nan/doc/new.md +++ b/node_modules/nan/doc/new.md @@ -15,7 +15,7 @@ NAN provides a `Nan::New()` helper for the creation of new JavaScript objects in `Nan::New()` should be used to instantiate new JavaScript objects. -Refer to the specific V8 type in the [V8 documentation](https://v8docs.nodesource.com/node-8.11/d1/d83/classv8_1_1_data.html) for information on the types of arguments required for instantiation. +Refer to the specific V8 type in the [V8 documentation](https://v8docs.nodesource.com/node-8.16/d1/d83/classv8_1_1_data.html) for information on the types of arguments required for instantiation. Signatures: @@ -75,7 +75,7 @@ v8::Local Nan::New(Nan::ExternalOneByteStringResource * value); v8::Local Nan::New(v8::Local pattern, v8::RegExp::Flags flags); ``` -Note that `Nan::ExternalOneByteStringResource` maps to [`v8::String::ExternalOneByteStringResource`](https://v8docs.nodesource.com/node-8.11/d9/db3/classv8_1_1_string_1_1_external_one_byte_string_resource.html), and `v8::String::ExternalAsciiStringResource` in older versions of V8. +Note that `Nan::ExternalOneByteStringResource` maps to [`v8::String::ExternalOneByteStringResource`](https://v8docs.nodesource.com/node-8.16/d9/db3/classv8_1_1_string_1_1_external_one_byte_string_resource.html), and `v8::String::ExternalAsciiStringResource` in older versions of V8. @@ -125,7 +125,7 @@ v8::Local Nan::False() ### Nan::EmptyString() -Call [`v8::String::Empty`](https://v8docs.nodesource.com/node-8.11/d2/db3/classv8_1_1_string.html#a7c1bc8886115d7ee46f1d571dd6ebc6d) to reference the empty string in a way that is compatible across all supported versions of V8. +Call [`v8::String::Empty`](https://v8docs.nodesource.com/node-8.16/d2/db3/classv8_1_1_string.html#a7c1bc8886115d7ee46f1d571dd6ebc6d) to reference the empty string in a way that is compatible across all supported versions of V8. Signature: @@ -137,7 +137,7 @@ v8::Local Nan::EmptyString() ### Nan::NewOneByteString() -An implementation of [`v8::String::NewFromOneByte()`](https://v8docs.nodesource.com/node-8.11/d2/db3/classv8_1_1_string.html#a5264d50b96d2c896ce525a734dc10f09) provided for consistent availability and API across supported versions of V8. Allocates a new string from Latin-1 data. +An implementation of [`v8::String::NewFromOneByte()`](https://v8docs.nodesource.com/node-8.16/d2/db3/classv8_1_1_string.html#a5264d50b96d2c896ce525a734dc10f09) provided for consistent availability and API across supported versions of V8. Allocates a new string from Latin-1 data. Signature: diff --git a/node_modules/nan/doc/object_wrappers.md b/node_modules/nan/doc/object_wrappers.md index 08dd6b552..07d8c058a 100644 --- a/node_modules/nan/doc/object_wrappers.md +++ b/node_modules/nan/doc/object_wrappers.md @@ -42,7 +42,7 @@ class ObjectWrap { * attached to detached state it will be freed. Be careful not to access * the object after making this call as it might be gone! * (A "weak reference" means an object that only has a - * persistant handle.) + * persistent handle.) * * DO NOT CALL THIS FROM DESTRUCTOR */ diff --git a/node_modules/nan/doc/persistent.md b/node_modules/nan/doc/persistent.md index bec9c3f39..2e13f6bb0 100644 --- a/node_modules/nan/doc/persistent.md +++ b/node_modules/nan/doc/persistent.md @@ -94,7 +94,7 @@ template class PersistentBase { }; ``` -See the V8 documentation for [`PersistentBase`](https://v8docs.nodesource.com/node-8.11/d4/dca/classv8_1_1_persistent_base.html) for further information. +See the V8 documentation for [`PersistentBase`](https://v8docs.nodesource.com/node-8.16/d4/dca/classv8_1_1_persistent_base.html) for further information. **Tip:** To get a `v8::Local` reference to the original object back from a `PersistentBase` or `Persistent` object: @@ -126,7 +126,7 @@ template class NonCopyablePersistentTraits { }; ``` -See the V8 documentation for [`NonCopyablePersistentTraits`](https://v8docs.nodesource.com/node-8.11/de/d73/classv8_1_1_non_copyable_persistent_traits.html) for further information. +See the V8 documentation for [`NonCopyablePersistentTraits`](https://v8docs.nodesource.com/node-8.16/de/d73/classv8_1_1_non_copyable_persistent_traits.html) for further information. ### Nan::CopyablePersistentTraits & v8::CopyablePersistentTraits @@ -151,7 +151,7 @@ class CopyablePersistentTraits { }; ``` -See the V8 documentation for [`CopyablePersistentTraits`](https://v8docs.nodesource.com/node-8.11/da/d5c/structv8_1_1_copyable_persistent_traits.html) for further information. +See the V8 documentation for [`CopyablePersistentTraits`](https://v8docs.nodesource.com/node-8.16/da/d5c/structv8_1_1_copyable_persistent_traits.html) for further information. ### Nan::Persistent @@ -204,7 +204,7 @@ template class Persistent : public PersistentBase { }; ``` -See the V8 documentation for [`Persistent`](https://v8docs.nodesource.com/node-8.11/d2/d78/classv8_1_1_persistent.html) for further information. +See the V8 documentation for [`Persistent`](https://v8docs.nodesource.com/node-8.16/d2/d78/classv8_1_1_persistent.html) for further information. ### Nan::Global @@ -238,7 +238,7 @@ template class Global : public PersistentBase { }; ``` -See the V8 documentation for [`Global`](https://v8docs.nodesource.com/node-8.11/d5/d40/classv8_1_1_global.html) for further information. +See the V8 documentation for [`Global`](https://v8docs.nodesource.com/node-8.16/d5/d40/classv8_1_1_global.html) for further information. ### Nan::WeakCallbackInfo @@ -279,7 +279,7 @@ int *data = new int(0); obj.SetWeak(data, callback, WeakCallbackType::kParameter); ``` -See the V8 documentation for [`WeakCallbackInfo`](https://v8docs.nodesource.com/node-8.11/d8/d06/classv8_1_1_weak_callback_info.html) for further information. +See the V8 documentation for [`WeakCallbackInfo`](https://v8docs.nodesource.com/node-8.16/d8/d06/classv8_1_1_weak_callback_info.html) for further information. ### Nan::WeakCallbackType diff --git a/node_modules/nan/doc/scopes.md b/node_modules/nan/doc/scopes.md index 27ab86309..84000eebf 100644 --- a/node_modules/nan/doc/scopes.md +++ b/node_modules/nan/doc/scopes.md @@ -14,7 +14,7 @@ Also see the V8 Embedders Guide section on [Handles and Garbage Collection](http ### Nan::HandleScope -A simple wrapper around [`v8::HandleScope`](https://v8docs.nodesource.com/node-8.11/d3/d95/classv8_1_1_handle_scope.html). +A simple wrapper around [`v8::HandleScope`](https://v8docs.nodesource.com/node-8.16/d3/d95/classv8_1_1_handle_scope.html). Definition: diff --git a/node_modules/nan/doc/script.md b/node_modules/nan/doc/script.md index 945398f04..213320adb 100644 --- a/node_modules/nan/doc/script.md +++ b/node_modules/nan/doc/script.md @@ -9,7 +9,7 @@ NAN provides a `v8::Script` helpers as the API has changed over the supported ve ### Nan::CompileScript() -A wrapper around [`v8::ScriptCompiler::Compile()`](https://v8docs.nodesource.com/node-8.11/da/da5/classv8_1_1_script_compiler.html#a93f5072a0db55d881b969e9fc98e564b). +A wrapper around [`v8::ScriptCompiler::Compile()`](https://v8docs.nodesource.com/node-8.16/da/da5/classv8_1_1_script_compiler.html#a93f5072a0db55d881b969e9fc98e564b). Note that `Nan::BoundScript` is an alias for `v8::Script`. diff --git a/node_modules/nan/doc/v8_internals.md b/node_modules/nan/doc/v8_internals.md index 88bd2deb0..08dd6d044 100644 --- a/node_modules/nan/doc/v8_internals.md +++ b/node_modules/nan/doc/v8_internals.md @@ -48,7 +48,7 @@ Signature: void Nan::AddGCEpilogueCallback(v8::Isolate::GCEpilogueCallback callback, v8::GCType gc_type_filter = v8::kGCTypeAll) ``` -Calls V8's [`AddGCEpilogueCallback()`](https://v8docs.nodesource.com/node-8.11/d5/dda/classv8_1_1_isolate.html#a580f976e4290cead62c2fc4dd396be3e). +Calls V8's [`AddGCEpilogueCallback()`](https://v8docs.nodesource.com/node-8.16/d5/dda/classv8_1_1_isolate.html#a580f976e4290cead62c2fc4dd396be3e). ### Nan::RemoveGCEpilogueCallback() @@ -59,7 +59,7 @@ Signature: void Nan::RemoveGCEpilogueCallback(v8::Isolate::GCEpilogueCallback callback) ``` -Calls V8's [`RemoveGCEpilogueCallback()`](https://v8docs.nodesource.com/node-8.11/d5/dda/classv8_1_1_isolate.html#adca9294555a3908e9f23c7bb0f0f284c). +Calls V8's [`RemoveGCEpilogueCallback()`](https://v8docs.nodesource.com/node-8.16/d5/dda/classv8_1_1_isolate.html#adca9294555a3908e9f23c7bb0f0f284c). ### Nan::AddGCPrologueCallback() @@ -70,7 +70,7 @@ Signature: void Nan::AddGCPrologueCallback(v8::Isolate::GCPrologueCallback, v8::GCType gc_type_filter callback) ``` -Calls V8's [`AddGCPrologueCallback()`](https://v8docs.nodesource.com/node-8.11/d5/dda/classv8_1_1_isolate.html#a6dbef303603ebdb03da6998794ea05b8). +Calls V8's [`AddGCPrologueCallback()`](https://v8docs.nodesource.com/node-8.16/d5/dda/classv8_1_1_isolate.html#a6dbef303603ebdb03da6998794ea05b8). ### Nan::RemoveGCPrologueCallback() @@ -81,7 +81,7 @@ Signature: void Nan::RemoveGCPrologueCallback(v8::Isolate::GCPrologueCallback callback) ``` -Calls V8's [`RemoveGCPrologueCallback()`](https://v8docs.nodesource.com/node-8.11/d5/dda/classv8_1_1_isolate.html#a5f72c7cda21415ce062bbe5c58abe09e). +Calls V8's [`RemoveGCPrologueCallback()`](https://v8docs.nodesource.com/node-8.16/d5/dda/classv8_1_1_isolate.html#a5f72c7cda21415ce062bbe5c58abe09e). ### Nan::GetHeapStatistics() @@ -92,7 +92,7 @@ Signature: void Nan::GetHeapStatistics(v8::HeapStatistics *heap_statistics) ``` -Calls V8's [`GetHeapStatistics()`](https://v8docs.nodesource.com/node-8.11/d5/dda/classv8_1_1_isolate.html#a5593ac74687b713095c38987e5950b34). +Calls V8's [`GetHeapStatistics()`](https://v8docs.nodesource.com/node-8.16/d5/dda/classv8_1_1_isolate.html#a5593ac74687b713095c38987e5950b34). ### Nan::SetCounterFunction() @@ -103,7 +103,7 @@ Signature: void Nan::SetCounterFunction(v8::CounterLookupCallback cb) ``` -Calls V8's [`SetCounterFunction()`](https://v8docs.nodesource.com/node-8.11/d5/dda/classv8_1_1_isolate.html#a045d7754e62fa0ec72ae6c259b29af94). +Calls V8's [`SetCounterFunction()`](https://v8docs.nodesource.com/node-8.16/d5/dda/classv8_1_1_isolate.html#a045d7754e62fa0ec72ae6c259b29af94). ### Nan::SetCreateHistogramFunction() @@ -114,7 +114,7 @@ Signature: void Nan::SetCreateHistogramFunction(v8::CreateHistogramCallback cb) ``` -Calls V8's [`SetCreateHistogramFunction()`](https://v8docs.nodesource.com/node-8.11/d5/dda/classv8_1_1_isolate.html#a542d67e85089cb3f92aadf032f99e732). +Calls V8's [`SetCreateHistogramFunction()`](https://v8docs.nodesource.com/node-8.16/d5/dda/classv8_1_1_isolate.html#a542d67e85089cb3f92aadf032f99e732). ### Nan::SetAddHistogramSampleFunction() @@ -125,7 +125,7 @@ Signature: void Nan::SetAddHistogramSampleFunction(v8::AddHistogramSampleCallback cb) ``` -Calls V8's [`SetAddHistogramSampleFunction()`](https://v8docs.nodesource.com/node-8.11/d5/dda/classv8_1_1_isolate.html#aeb420b690bc2c216882d6fdd00ddd3ea). +Calls V8's [`SetAddHistogramSampleFunction()`](https://v8docs.nodesource.com/node-8.16/d5/dda/classv8_1_1_isolate.html#aeb420b690bc2c216882d6fdd00ddd3ea). ### Nan::IdleNotification() @@ -136,7 +136,7 @@ Signature: bool Nan::IdleNotification(int idle_time_in_ms) ``` -Calls V8's [`IdleNotification()` or `IdleNotificationDeadline()`](https://v8docs.nodesource.com/node-8.11/d5/dda/classv8_1_1_isolate.html#ad6a2a02657f5425ad460060652a5a118) depending on V8 version. +Calls V8's [`IdleNotification()` or `IdleNotificationDeadline()`](https://v8docs.nodesource.com/node-8.16/d5/dda/classv8_1_1_isolate.html#ad6a2a02657f5425ad460060652a5a118) depending on V8 version. ### Nan::LowMemoryNotification() @@ -147,7 +147,7 @@ Signature: void Nan::LowMemoryNotification() ``` -Calls V8's [`LowMemoryNotification()`](https://v8docs.nodesource.com/node-8.11/d5/dda/classv8_1_1_isolate.html#a24647f61d6b41f69668094bdcd6ea91f). +Calls V8's [`LowMemoryNotification()`](https://v8docs.nodesource.com/node-8.16/d5/dda/classv8_1_1_isolate.html#a24647f61d6b41f69668094bdcd6ea91f). ### Nan::ContextDisposedNotification() @@ -158,7 +158,7 @@ Signature: void Nan::ContextDisposedNotification() ``` -Calls V8's [`ContextDisposedNotification()`](https://v8docs.nodesource.com/node-8.11/d5/dda/classv8_1_1_isolate.html#ad7f5dc559866343fe6cd8db1f134d48b). +Calls V8's [`ContextDisposedNotification()`](https://v8docs.nodesource.com/node-8.16/d5/dda/classv8_1_1_isolate.html#ad7f5dc559866343fe6cd8db1f134d48b). ### Nan::GetInternalFieldPointer() @@ -171,7 +171,7 @@ Signature: void* Nan::GetInternalFieldPointer(v8::Local object, int index) ``` -Calls the Object's [`GetAlignedPointerFromInternalField()` or `GetPointerFromInternalField()`](https://v8docs.nodesource.com/node-8.11/db/d85/classv8_1_1_object.html#a580ea84afb26c005d6762eeb9e3c308f) depending on the version of V8. +Calls the Object's [`GetAlignedPointerFromInternalField()` or `GetPointerFromInternalField()`](https://v8docs.nodesource.com/node-8.16/db/d85/classv8_1_1_object.html#a580ea84afb26c005d6762eeb9e3c308f) depending on the version of V8. ### Nan::SetInternalFieldPointer() @@ -184,7 +184,7 @@ Signature: void Nan::SetInternalFieldPointer(v8::Local object, int index, void* value) ``` -Calls the Object's [`SetAlignedPointerInInternalField()` or `SetPointerInInternalField()`](https://v8docs.nodesource.com/node-8.11/db/d85/classv8_1_1_object.html#ab3c57184263cf29963ef0017bec82281) depending on the version of V8. +Calls the Object's [`SetAlignedPointerInInternalField()` or `SetPointerInInternalField()`](https://v8docs.nodesource.com/node-8.16/db/d85/classv8_1_1_object.html#ab3c57184263cf29963ef0017bec82281) depending on the version of V8. ### Nan::AdjustExternalMemory() @@ -195,5 +195,5 @@ Signature: int Nan::AdjustExternalMemory(int bytesChange) ``` -Calls V8's [`AdjustAmountOfExternalAllocatedMemory()`](https://v8docs.nodesource.com/node-8.11/d5/dda/classv8_1_1_isolate.html#ae1a59cac60409d3922582c4af675473e). +Calls V8's [`AdjustAmountOfExternalAllocatedMemory()`](https://v8docs.nodesource.com/node-8.16/d5/dda/classv8_1_1_isolate.html#ae1a59cac60409d3922582c4af675473e). diff --git a/node_modules/nan/doc/v8_misc.md b/node_modules/nan/doc/v8_misc.md index 8e2db20d0..1bd46d358 100644 --- a/node_modules/nan/doc/v8_misc.md +++ b/node_modules/nan/doc/v8_misc.md @@ -12,7 +12,7 @@ Converts an object to a UTF-8-encoded character array. If conversion to a string fails (e.g. due to an exception in the toString() method of the object) then the length() method returns 0 and the * operator returns NULL. The underlying memory used for this object is managed by the object. -An implementation of [`v8::String::Utf8Value`](https://v8docs.nodesource.com/node-8.11/d4/d1b/classv8_1_1_string_1_1_utf8_value.html) that is consistent across all supported versions of V8. +An implementation of [`v8::String::Utf8Value`](https://v8docs.nodesource.com/node-8.16/d4/d1b/classv8_1_1_string_1_1_utf8_value.html) that is consistent across all supported versions of V8. Definition: @@ -31,7 +31,7 @@ class Nan::Utf8String { ### Nan::GetCurrentContext() -A call to [`v8::Isolate::GetCurrent()->GetCurrentContext()`](https://v8docs.nodesource.com/node-8.11/d5/dda/classv8_1_1_isolate.html#a81c7a1ed7001ae2a65e89107f75fd053) that works across all supported versions of V8. +A call to [`v8::Isolate::GetCurrent()->GetCurrentContext()`](https://v8docs.nodesource.com/node-8.16/d5/dda/classv8_1_1_isolate.html#a81c7a1ed7001ae2a65e89107f75fd053) that works across all supported versions of V8. Signature: @@ -42,7 +42,7 @@ v8::Local Nan::GetCurrentContext() ### Nan::SetIsolateData() -A helper to provide a consistent API to [`v8::Isolate#SetData()`](https://v8docs.nodesource.com/node-8.11/d5/dda/classv8_1_1_isolate.html#a7acadfe7965997e9c386a05f098fbe36). +A helper to provide a consistent API to [`v8::Isolate#SetData()`](https://v8docs.nodesource.com/node-8.16/d5/dda/classv8_1_1_isolate.html#a7acadfe7965997e9c386a05f098fbe36). Signature: @@ -54,7 +54,7 @@ void Nan::SetIsolateData(v8::Isolate *isolate, T *data) ### Nan::GetIsolateData() -A helper to provide a consistent API to [`v8::Isolate#GetData()`](https://v8docs.nodesource.com/node-8.11/d5/dda/classv8_1_1_isolate.html#aabd223436bc1100a787dadaa024c6257). +A helper to provide a consistent API to [`v8::Isolate#GetData()`](https://v8docs.nodesource.com/node-8.16/d5/dda/classv8_1_1_isolate.html#aabd223436bc1100a787dadaa024c6257). Signature: diff --git a/node_modules/nan/nan.h b/node_modules/nan/nan.h index 514115d98..59cd9b669 100644 --- a/node_modules/nan/nan.h +++ b/node_modules/nan/nan.h @@ -13,7 +13,7 @@ * * MIT License * - * Version 2.14.0: current Node 12.2.0, Node 12: 0.12.18, Node 10: 0.10.48, iojs: 3.3.1 + * Version 2.14.2: current Node 14.13.1, Node 0.12: 0.12.18, Node 0.10: 0.10.48, iojs: 3.3.1 * * See https://github.com/nodejs/nan for the latest update to this file **********************************************************************************/ @@ -39,6 +39,8 @@ #define NODE_10_0_MODULE_VERSION 64 #define NODE_11_0_MODULE_VERSION 67 #define NODE_12_0_MODULE_VERSION 72 +#define NODE_13_0_MODULE_VERSION 79 +#define NODE_14_0_MODULE_VERSION 83 #ifdef _MSC_VER # define NAN_HAS_CPLUSPLUS_11 (_MSC_VER >= 1800) @@ -2141,10 +2143,7 @@ class AsyncProgressWorkerBase : public AsyncBareProgressWorker { private: void SendProgress_(const T *data, size_t count) { T *new_data = new T[count]; - { - T *it = new_data; - std::copy(data, data + count, it); - } + std::copy(data, data + count, new_data); uv_mutex_lock(&this->async_lock); T *old_data = asyncdata_; @@ -2263,10 +2262,7 @@ class AsyncProgressQueueWorker : public AsyncBareProgressQueueWorker { private: void SendProgress_(const T *data, size_t count) { T *new_data = new T[count]; - { - T *it = new_data; - std::copy(data, data + count, it); - } + std::copy(data, data + count, new_data); uv_mutex_lock(&async_lock); asyncdata_.push(std::pair(new_data, count)); @@ -2284,18 +2280,25 @@ inline void AsyncExecute (uv_work_t* req) { worker->Execute(); } -inline void AsyncExecuteComplete (uv_work_t* req) { +/* uv_after_work_cb has 1 argument before node-v0.9.4 and + * 2 arguments since node-v0.9.4 + * https://github.com/libuv/libuv/commit/92fb84b751e18f032c02609467f44bfe927b80c5 + */ +inline void AsyncExecuteComplete(uv_work_t *req) { AsyncWorker* worker = static_cast(req->data); worker->WorkComplete(); worker->Destroy(); } +inline void AsyncExecuteComplete (uv_work_t* req, int status) { + AsyncExecuteComplete(req); +} inline void AsyncQueueWorker (AsyncWorker* worker) { uv_queue_work( GetCurrentEventLoop() , &worker->request , AsyncExecute - , reinterpret_cast(AsyncExecuteComplete) + , AsyncExecuteComplete ); } @@ -2474,9 +2477,10 @@ template class HandleType> inline void SetMethod( HandleType recv , const char *name - , FunctionCallback callback) { + , FunctionCallback callback + , v8::Local data = v8::Local()) { HandleScope scope; - v8::Local t = New(callback); + v8::Local t = New(callback, data); v8::Local fn_name = New(name).ToLocalChecked(); t->SetClassName(fn_name); // Note(@agnat): Pass an empty T* as discriminator. See note on @@ -2486,11 +2490,13 @@ inline void SetMethod( inline void SetPrototypeMethod( v8::Local recv - , const char* name, FunctionCallback callback) { + , const char* name + , FunctionCallback callback + , v8::Local data = v8::Local()) { HandleScope scope; v8::Local t = New( callback - , v8::Local() + , data , New(recv)); v8::Local fn_name = New(name).ToLocalChecked(); recv->PrototypeTemplate()->Set(fn_name, t); @@ -2812,7 +2818,7 @@ struct Tap { t_.Reset(To(t).ToLocalChecked()); } - ~Tap() { t_.Reset(); } // not sure if neccessary + ~Tap() { t_.Reset(); } // not sure if necessary inline void plan(int i) { HandleScope scope; diff --git a/node_modules/nan/nan_object_wrap.h b/node_modules/nan/nan_object_wrap.h index 386affaa9..78712f9c6 100644 --- a/node_modules/nan/nan_object_wrap.h +++ b/node_modules/nan/nan_object_wrap.h @@ -100,7 +100,7 @@ class ObjectWrap { * attached to detached state it will be freed. Be careful not to access * the object after making this call as it might be gone! * (A "weak reference" means an object that only has a - * persistant handle.) + * persistent handle.) * * DO NOT CALL THIS FROM DESTRUCTOR */ diff --git a/node_modules/nan/nan_typedarray_contents.h b/node_modules/nan/nan_typedarray_contents.h index d28ae323e..c6ac8a418 100644 --- a/node_modules/nan/nan_typedarray_contents.h +++ b/node_modules/nan/nan_typedarray_contents.h @@ -31,7 +31,13 @@ class TypedArrayContents { v8::Local buffer = array->Buffer(); length = byte_length / sizeof(T); - data = static_cast(buffer->GetContents().Data()) + byte_offset; +// Actually it's 7.9 here but this would lead to ABI issues with Node.js 13 +// using 7.8 till 13.2.0. +#if (V8_MAJOR_VERSION >= 8) + data = static_cast(buffer->GetBackingStore()->Data()) + byte_offset; +#else + data = static_cast(buffer->GetContents().Data()) + byte_offset; +#endif } #else diff --git a/node_modules/nan/package.json b/node_modules/nan/package.json index 6fd922d74..0b87c0546 100644 --- a/node_modules/nan/package.json +++ b/node_modules/nan/package.json @@ -1,37 +1,31 @@ { - "_args": [ - [ - "nan@2.14.0", - "/Users/drew.heavner/Documents/Github/sign-android-release" - ] - ], - "_development": true, - "_from": "nan@2.14.0", - "_id": "nan@2.14.0", + "_from": "nan@^2.12.1", + "_id": "nan@2.14.2", "_inBundle": false, - "_integrity": "sha512-INOFj37C7k3AfaNTtX8RhsTw7qRy7eLET14cROi9+5HAVbbHuIWUHEauBv5qT4Av2tWasiTY1Jw6puUNqRJXQg==", + "_integrity": "sha512-M2ufzIiINKCuDfBSAUr1vWQ+vuVcA9kqx8JJUsbQi6yf1uGRyb7HfpdfUr5qLXf3B/t8dPvcjhKMmlfnP47EzQ==", "_location": "/nan", - "_optional": true, "_phantomChildren": {}, "_requested": { - "type": "version", + "type": "range", "registry": true, - "raw": "nan@2.14.0", + "raw": "nan@^2.12.1", "name": "nan", "escapedName": "nan", - "rawSpec": "2.14.0", + "rawSpec": "^2.12.1", "saveSpec": null, - "fetchSpec": "2.14.0" + "fetchSpec": "^2.12.1" }, "_requiredBy": [ "/fsevents" ], - "_resolved": "https://registry.npmjs.org/nan/-/nan-2.14.0.tgz", - "_spec": "2.14.0", - "_where": "/Users/drew.heavner/Documents/Github/sign-android-release", + "_resolved": "https://registry.npmjs.org/nan/-/nan-2.14.2.tgz", + "_shasum": "f5376400695168f4cc694ac9393d0c9585eeea19", + "_spec": "nan@^2.12.1", + "_where": "/Users/drew.heavner/Documents/Github/sign-android-release/node_modules/fsevents", "bugs": { "url": "https://github.com/nodejs/nan/issues" }, + "bundleDependencies": false, "contributors": [ { "name": "Rod Vagg", @@ -74,7 +68,8 @@ "url": "https://github.com/mkrufky" } ], - "description": "Native Abstractions for Node.js: C++ header for Node 0.8 -> 11 compatibility", + "deprecated": false, + "description": "Native Abstractions for Node.js: C++ header for Node 0.8 -> 14 compatibility", "devDependencies": { "bindings": "~1.2.1", "commander": "^2.8.1", @@ -99,5 +94,5 @@ "test": "tap --gc --stderr test/js/*-test.js", "test:worker": "node --experimental-worker test/tap-as-worker.js --gc --stderr test/js/*-test.js" }, - "version": "2.14.0" + "version": "2.14.2" } diff --git a/node_modules/nan/tools/1to2.js b/node_modules/nan/tools/1to2.js index 337f8bf2c..6af25058a 100755 --- a/node_modules/nan/tools/1to2.js +++ b/node_modules/nan/tools/1to2.js @@ -264,7 +264,7 @@ function replace() { default: } - /* Value converstion */ + /* Value conversion */ switch (arguments[groups[6][0]]) { case 'Boolean': case 'Int32': diff --git a/node_modules/neo-async/LICENSE b/node_modules/neo-async/LICENSE deleted file mode 100644 index 4ec13d1f4..000000000 --- a/node_modules/neo-async/LICENSE +++ /dev/null @@ -1,22 +0,0 @@ -MIT License - -Copyright (c) 2014-2018 Suguru Motegi -Based on Async.js, Copyright Caolan McMahon - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/node_modules/neo-async/README.md b/node_modules/neo-async/README.md deleted file mode 100644 index 18385a0cd..000000000 --- a/node_modules/neo-async/README.md +++ /dev/null @@ -1,268 +0,0 @@ -

Neo-Async

- -

- -

- -

- npm - Travis Status - Coverage Status - download - Code Quality: Javascript - Total Alerts -

- -Neo-Async is thought to be used as a drop-in replacement for [Async](https://github.com/caolan/async), it almost fully covers its functionality and runs [faster](#benchmark). - -Benchmark is [here](#benchmark)! - -Bluebird's benchmark is [here](https://github.com/suguru03/bluebird/tree/aigle/benchmark)! - -## Code Coverage -![coverage](https://raw.githubusercontent.com/wiki/suguru03/neo-async/images/coverage.png) - -## Installation - -### In a browser -```html - -``` - -### In an AMD loader -```js -require(['async'], function(async) {}); -``` - -### Promise and async/await - -I recommend to use [`Aigle`](https://github.com/suguru03/aigle). - -It is optimized for Promise handling and has almost the same functionality as `neo-async`. - -### Node.js - -#### standard - -```bash -$ npm install neo-async -``` -```js -var async = require('neo-async'); -``` - -#### replacement -```bash -$ npm install neo-async -$ ln -s ./node_modules/neo-async ./node_modules/async -``` -```js -var async = require('async'); -``` - -### Bower - -```bash -bower install neo-async -``` - -## Feature - -[JSDoc](http://suguru03.github.io/neo-async/doc/async.html) - -\* not in Async - -### Collections - -- [`each`](http://suguru03.github.io/neo-async/doc/async.each.html) -- [`eachSeries`](http://suguru03.github.io/neo-async/doc/async.eachSeries.html) -- [`eachLimit`](http://suguru03.github.io/neo-async/doc/async.eachLimit.html) -- [`forEach`](http://suguru03.github.io/neo-async/doc/async.each.html) -> [`each`](http://suguru03.github.io/neo-async/doc/async.each.html) -- [`forEachSeries`](http://suguru03.github.io/neo-async/doc/async.eachSeries.html) -> [`eachSeries`](http://suguru03.github.io/neo-async/doc/async.eachSeries.html) -- [`forEachLimit`](http://suguru03.github.io/neo-async/doc/async.eachLimit.html) -> [`eachLimit`](http://suguru03.github.io/neo-async/doc/async.eachLimit.html) -- [`eachOf`](http://suguru03.github.io/neo-async/doc/async.each.html) -> [`each`](http://suguru03.github.io/neo-async/doc/async.each.html) -- [`eachOfSeries`](http://suguru03.github.io/neo-async/doc/async.eachSeries.html) -> [`eachSeries`](http://suguru03.github.io/neo-async/doc/async.eachSeries.html) -- [`eachOfLimit`](http://suguru03.github.io/neo-async/doc/async.eachLimit.html) -> [`eachLimit`](http://suguru03.github.io/neo-async/doc/async.eachLimit.html) -- [`forEachOf`](http://suguru03.github.io/neo-async/doc/async.each.html) -> [`each`](http://suguru03.github.io/neo-async/doc/async.each.html) -- [`forEachOfSeries`](http://suguru03.github.io/neo-async/doc/async.eachSeries.html) -> [`eachSeries`](http://suguru03.github.io/neo-async/doc/async.eachSeries.html) -- [`eachOfLimit`](http://suguru03.github.io/neo-async/doc/async.eachLimit.html) -> [`forEachLimit`](http://suguru03.github.io/neo-async/doc/async.eachLimit.html) -- [`map`](http://suguru03.github.io/neo-async/doc/async.map.html) -- [`mapSeries`](http://suguru03.github.io/neo-async/doc/async.mapSeries.html) -- [`mapLimit`](http://suguru03.github.io/neo-async/doc/async.mapLimit.html) -- [`mapValues`](http://suguru03.github.io/neo-async/doc/async.mapValues.html) -- [`mapValuesSeries`](http://suguru03.github.io/neo-async/doc/async.mapValuesSeries.html) -- [`mapValuesLimit`](http://suguru03.github.io/neo-async/doc/async.mapValuesLimit.html) -- [`filter`](http://suguru03.github.io/neo-async/doc/async.filter.html) -- [`filterSeries`](http://suguru03.github.io/neo-async/doc/async.filterSeries.html) -- [`filterLimit`](http://suguru03.github.io/neo-async/doc/async.filterLimit.html) -- [`select`](http://suguru03.github.io/neo-async/doc/async.filter.html) -> [`filter`](http://suguru03.github.io/neo-async/doc/async.filter.html) -- [`selectSeries`](http://suguru03.github.io/neo-async/doc/async.filterSeries.html) -> [`filterSeries`](http://suguru03.github.io/neo-async/doc/async.filterSeries.html) -- [`selectLimit`](http://suguru03.github.io/neo-async/doc/async.filterLimit.html) -> [`filterLimit`](http://suguru03.github.io/neo-async/doc/async.filterLimit.html) -- [`reject`](http://suguru03.github.io/neo-async/doc/async.reject.html) -- [`rejectSeries`](http://suguru03.github.io/neo-async/doc/async.rejectSeries.html) -- [`rejectLimit`](http://suguru03.github.io/neo-async/doc/async.rejectLimit.html) -- [`detect`](http://suguru03.github.io/neo-async/doc/async.detect.html) -- [`detectSeries`](http://suguru03.github.io/neo-async/doc/async.detectSeries.html) -- [`detectLimit`](http://suguru03.github.io/neo-async/doc/async.detectLimit.html) -- [`find`](http://suguru03.github.io/neo-async/doc/async.detect.html) -> [`detect`](http://suguru03.github.io/neo-async/doc/async.detect.html) -- [`findSeries`](http://suguru03.github.io/neo-async/doc/async.detectSeries.html) -> [`detectSeries`](http://suguru03.github.io/neo-async/doc/async.detectSeries.html) -- [`findLimit`](http://suguru03.github.io/neo-async/doc/async.detectLimit.html) -> [`detectLimit`](http://suguru03.github.io/neo-async/doc/async.detectLimit.html) -- [`pick`](http://suguru03.github.io/neo-async/doc/async.pick.html) * -- [`pickSeries`](http://suguru03.github.io/neo-async/doc/async.pickSeries.html) * -- [`pickLimit`](http://suguru03.github.io/neo-async/doc/async.pickLimit.html) * -- [`omit`](http://suguru03.github.io/neo-async/doc/async.omit.html) * -- [`omitSeries`](http://suguru03.github.io/neo-async/doc/async.omitSeries.html) * -- [`omitLimit`](http://suguru03.github.io/neo-async/doc/async.omitLimit.html) * -- [`reduce`](http://suguru03.github.io/neo-async/doc/async.reduce.html) -- [`inject`](http://suguru03.github.io/neo-async/doc/async.reduce.html) -> [`reduce`](http://suguru03.github.io/neo-async/doc/async.reduce.html) -- [`foldl`](http://suguru03.github.io/neo-async/doc/async.reduce.html) -> [`reduce`](http://suguru03.github.io/neo-async/doc/async.reduce.html) -- [`reduceRight`](http://suguru03.github.io/neo-async/doc/async.reduceRight.html) -- [`foldr`](http://suguru03.github.io/neo-async/doc/async.reduceRight.html) -> [`reduceRight`](http://suguru03.github.io/neo-async/doc/async.reduceRight.html) -- [`transform`](http://suguru03.github.io/neo-async/doc/async.transform.html) -- [`transformSeries`](http://suguru03.github.io/neo-async/doc/async.transformSeries.html) * -- [`transformLimit`](http://suguru03.github.io/neo-async/doc/async.transformLimit.html) * -- [`sortBy`](http://suguru03.github.io/neo-async/doc/async.sortBy.html) -- [`sortBySeries`](http://suguru03.github.io/neo-async/doc/async.sortBySeries.html) * -- [`sortByLimit`](http://suguru03.github.io/neo-async/doc/async.sortByLimit.html) * -- [`some`](http://suguru03.github.io/neo-async/doc/async.some.html) -- [`someSeries`](http://suguru03.github.io/neo-async/doc/async.someSeries.html) -- [`someLimit`](http://suguru03.github.io/neo-async/doc/async.someLimit.html) -- [`any`](http://suguru03.github.io/neo-async/doc/async.some.html) -> [`some`](http://suguru03.github.io/neo-async/doc/async.some.html) -- [`anySeries`](http://suguru03.github.io/neo-async/doc/async.someSeries.html) -> [`someSeries`](http://suguru03.github.io/neo-async/doc/async.someSeries.html) -- [`anyLimit`](http://suguru03.github.io/neo-async/doc/async.someLimit.html) -> [`someLimit`](http://suguru03.github.io/neo-async/doc/async.someLimit.html) -- [`every`](http://suguru03.github.io/neo-async/doc/async.every.html) -- [`everySeries`](http://suguru03.github.io/neo-async/doc/async.everySeries.html) -- [`everyLimit`](http://suguru03.github.io/neo-async/doc/async.everyLimit.html) -- [`all`](http://suguru03.github.io/neo-async/doc/async.every.html) -> [`every`](http://suguru03.github.io/neo-async/doc/async.every.html) -- [`allSeries`](http://suguru03.github.io/neo-async/doc/async.everySeries.html) -> [`every`](http://suguru03.github.io/neo-async/doc/async.everySeries.html) -- [`allLimit`](http://suguru03.github.io/neo-async/doc/async.everyLimit.html) -> [`every`](http://suguru03.github.io/neo-async/doc/async.everyLimit.html) -- [`concat`](http://suguru03.github.io/neo-async/doc/async.concat.html) -- [`concatSeries`](http://suguru03.github.io/neo-async/doc/async.concatSeries.html) -- [`concatLimit`](http://suguru03.github.io/neo-async/doc/async.concatLimit.html) * - -### Control Flow - -- [`parallel`](http://suguru03.github.io/neo-async/doc/async.parallel.html) -- [`series`](http://suguru03.github.io/neo-async/doc/async.series.html) -- [`parallelLimit`](http://suguru03.github.io/neo-async/doc/async.series.html) -- [`tryEach`](http://suguru03.github.io/neo-async/doc/async.tryEach.html) -- [`waterfall`](http://suguru03.github.io/neo-async/doc/async.waterfall.html) -- [`angelFall`](http://suguru03.github.io/neo-async/doc/async.angelFall.html) * -- [`angelfall`](http://suguru03.github.io/neo-async/doc/async.angelFall.html) -> [`angelFall`](http://suguru03.github.io/neo-async/doc/async.angelFall.html) * -- [`whilst`](#whilst) -- [`doWhilst`](#doWhilst) -- [`until`](#until) -- [`doUntil`](#doUntil) -- [`during`](#during) -- [`doDuring`](#doDuring) -- [`forever`](#forever) -- [`compose`](#compose) -- [`seq`](#seq) -- [`applyEach`](#applyEach) -- [`applyEachSeries`](#applyEachSeries) -- [`queue`](#queue) -- [`priorityQueue`](#priorityQueue) -- [`cargo`](#cargo) -- [`auto`](#auto) -- [`autoInject`](#autoInject) -- [`retry`](#retry) -- [`retryable`](#retryable) -- [`iterator`](#iterator) -- [`times`](http://suguru03.github.io/neo-async/doc/async.times.html) -- [`timesSeries`](http://suguru03.github.io/neo-async/doc/async.timesSeries.html) -- [`timesLimit`](http://suguru03.github.io/neo-async/doc/async.timesLimit.html) -- [`race`](#race) - -### Utils -- [`apply`](#apply) -- [`setImmediate`](#setImmediate) -- [`nextTick`](#nextTick) -- [`memoize`](#memoize) -- [`unmemoize`](#unmemoize) -- [`ensureAsync`](#ensureAsync) -- [`constant`](#constant) -- [`asyncify`](#asyncify) -- [`wrapSync`](#asyncify) -> [`asyncify`](#asyncify) -- [`log`](#log) -- [`dir`](#dir) -- [`timeout`](http://suguru03.github.io/neo-async/doc/async.timeout.html) -- [`reflect`](#reflect) -- [`reflectAll`](#reflectAll) -- [`createLogger`](#createLogger) - -## Mode -- [`safe`](#safe) * -- [`fast`](#fast) * - -## Benchmark - -[Benchmark: Async vs Neo-Async](http://suguru03.hatenablog.com/entry/2016/06/10/135559) - -### How to check - -```bash -$ node perf -``` - -### Environment - -* Darwin 17.3.0 x64 -* Node.js v8.9.4 -* async v2.6.0 -* neo-async v2.5.0 -* benchmark v2.1.4 - -### Result - -The value is the ratio (Neo-Async/Async) of the average speed. - -#### Collections -|function|benchmark| -|---|--:| -|each/forEach|2.43| -|eachSeries/forEachSeries|1.75| -|eachLimit/forEachLimit|1.68| -|eachOf|3.29| -|eachOfSeries|1.50| -|eachOfLimit|1.59| -|map|3.95| -|mapSeries|1.81| -|mapLimit|1.27| -|mapValues|2.73| -|mapValuesSeries|1.59| -|mapValuesLimit|1.23| -|filter|3.00| -|filterSeries|1.74| -|filterLimit|1.17| -|reject|4.59| -|rejectSeries|2.31| -|rejectLimit|1.58| -|detect|4.30| -|detectSeries|1.86| -|detectLimit|1.32| -|reduce|1.82| -|transform|2.46| -|sortBy|4.08| -|some|2.19| -|someSeries|1.83| -|someLimit|1.32| -|every|2.09| -|everySeries|1.84| -|everyLimit|1.35| -|concat|3.79| -|concatSeries|4.45| - -#### Control Flow -|funciton|benchmark| -|---|--:| -|parallel|2.93| -|series|1.96| -|waterfall|1.29| -|whilst|1.00| -|doWhilst|1.12| -|until|1.12| -|doUntil|1.12| -|during|1.18| -|doDuring|2.42| -|times|4.25| -|auto|1.97| diff --git a/node_modules/neo-async/all.js b/node_modules/neo-async/all.js deleted file mode 100644 index dad54e7fe..000000000 --- a/node_modules/neo-async/all.js +++ /dev/null @@ -1,3 +0,0 @@ -'use strict'; - -module.exports = require('./async').all; diff --git a/node_modules/neo-async/allLimit.js b/node_modules/neo-async/allLimit.js deleted file mode 100644 index d9d7aaa16..000000000 --- a/node_modules/neo-async/allLimit.js +++ /dev/null @@ -1,3 +0,0 @@ -'use strict'; - -module.exports = require('./async').allLimit; diff --git a/node_modules/neo-async/allSeries.js b/node_modules/neo-async/allSeries.js deleted file mode 100644 index 2a7a8ba88..000000000 --- a/node_modules/neo-async/allSeries.js +++ /dev/null @@ -1,3 +0,0 @@ -'use strict'; - -module.exports = require('./async').allSeries; diff --git a/node_modules/neo-async/angelFall.js b/node_modules/neo-async/angelFall.js deleted file mode 100644 index 476c23ecc..000000000 --- a/node_modules/neo-async/angelFall.js +++ /dev/null @@ -1,3 +0,0 @@ -'use strict'; - -module.exports = require('./async').angelfall; diff --git a/node_modules/neo-async/any.js b/node_modules/neo-async/any.js deleted file mode 100644 index d6b07bb54..000000000 --- a/node_modules/neo-async/any.js +++ /dev/null @@ -1,3 +0,0 @@ -'use strict'; - -module.exports = require('./async').any; diff --git a/node_modules/neo-async/anyLimit.js b/node_modules/neo-async/anyLimit.js deleted file mode 100644 index 34114f888..000000000 --- a/node_modules/neo-async/anyLimit.js +++ /dev/null @@ -1,3 +0,0 @@ -'use strict'; - -module.exports = require('./async').anyLimit; diff --git a/node_modules/neo-async/anySeries.js b/node_modules/neo-async/anySeries.js deleted file mode 100644 index bb3781fd5..000000000 --- a/node_modules/neo-async/anySeries.js +++ /dev/null @@ -1,3 +0,0 @@ -'use strict'; - -module.exports = require('./async').anySeries; diff --git a/node_modules/neo-async/apply.js b/node_modules/neo-async/apply.js deleted file mode 100644 index 41135e218..000000000 --- a/node_modules/neo-async/apply.js +++ /dev/null @@ -1,3 +0,0 @@ -'use strict'; - -module.exports = require('./async').apply; diff --git a/node_modules/neo-async/applyEach.js b/node_modules/neo-async/applyEach.js deleted file mode 100644 index 292bd1c06..000000000 --- a/node_modules/neo-async/applyEach.js +++ /dev/null @@ -1,3 +0,0 @@ -'use strict'; - -module.exports = require('./async').applyEach; diff --git a/node_modules/neo-async/applyEachSeries.js b/node_modules/neo-async/applyEachSeries.js deleted file mode 100644 index 0aece7cd3..000000000 --- a/node_modules/neo-async/applyEachSeries.js +++ /dev/null @@ -1,3 +0,0 @@ -'use strict'; - -module.exports = require('./async').applyEachSeries; diff --git a/node_modules/neo-async/async.js b/node_modules/neo-async/async.js deleted file mode 100644 index 45d86761d..000000000 --- a/node_modules/neo-async/async.js +++ /dev/null @@ -1,9182 +0,0 @@ -(function(global, factory) { - /*jshint -W030 */ - 'use strict'; - typeof exports === 'object' && typeof module !== 'undefined' - ? factory(exports) - : typeof define === 'function' && define.amd - ? define(['exports'], factory) - : global.async - ? factory((global.neo_async = global.neo_async || {})) - : factory((global.async = global.async || {})); -})(this, function(exports) { - 'use strict'; - - var noop = function noop() {}; - var throwError = function throwError() { - throw new Error('Callback was already called.'); - }; - - var DEFAULT_TIMES = 5; - var DEFAULT_INTERVAL = 0; - - var obj = 'object'; - var func = 'function'; - var isArray = Array.isArray; - var nativeKeys = Object.keys; - var nativePush = Array.prototype.push; - var iteratorSymbol = typeof Symbol === func && Symbol.iterator; - - var nextTick, asyncNextTick, asyncSetImmediate; - createImmediate(); - - /** - * @memberof async - * @namespace each - * @param {Array|Object} collection - * @param {Function} iterator - * @param {Function} callback - * @example - * - * // array - * var order = []; - * var array = [1, 3, 2]; - * var iterator = function(num, done) { - * setTimeout(function() { - * order.push(num); - * done(); - * }, num * 10); - * }; - * async.each(array, iterator, function(err, res) { - * console.log(res); // undefined - * console.log(order); // [1, 2, 3] - * }); - * - * @example - * - * // array with index - * var order = []; - * var array = [1, 3, 2]; - * var iterator = function(num, index, done) { - * setTimeout(function() { - * order.push([num, index]); - * done(); - * }, num * 10); - * }; - * async.each(array, iterator, function(err, res) { - * console.log(res); // undefined - * console.log(order); // [[1, 0], [2, 2], [3, 1]] - * }); - * - * @example - * - * // object - * var order = []; - * var object = { a: 1, b: 3, c: 2 }; - * var iterator = function(num, done) { - * setTimeout(function() { - * order.push(num); - * done(); - * }, num * 10); - * }; - * async.each(object, iterator, function(err, res) { - * console.log(res); // undefined - * console.log(order); // [1, 2, 3] - * }); - * - * @example - * - * // object with key - * var order = []; - * var object = { a: 1, b: 3, c: 2 }; - * var iterator = function(num, key, done) { - * setTimeout(function() { - * order.push([num, key]); - * done(); - * }, num * 10); - * }; - * async.each(object, iterator, function(err, res) { - * console.log(res); // undefined - * console.log(order); // [[1, 'a'], [2, 'c'], [3, 'b']] - * }); - * - * @example - * - * // break - * var order = []; - * var array = [1, 3, 2]; - * var iterator = function(num, done) { - * setTimeout(function() { - * order.push(num); - * done(null, num !== 2); - * }, num * 10); - * }; - * async.each(array, iterator, function(err, res) { - * console.log(res); // undefined - * console.log(order); // [1, 2] - * }); - * - */ - var each = createEach(arrayEach, baseEach, symbolEach); - - /** - * @memberof async - * @namespace map - * @param {Array|Object} collection - * @param {Function} iterator - * @param {Function} callback - * @example - * - * // array - * var order = []; - * var array = [1, 3, 2]; - * var iterator = function(num, done) { - * setTimeout(function() { - * order.push(num); - * done(null, num); - * }, num * 10); - * }; - * async.map(array, iterator, function(err, res) { - * console.log(res); // [1, 3, 2]; - * console.log(order); // [1, 2, 3] - * }); - * - * @example - * - * // array with index - * var order = []; - * var array = [1, 3, 2]; - * var iterator = function(num, index, done) { - * setTimeout(function() { - * order.push([num, index]); - * done(null, num); - * }, num * 10); - * }; - * async.map(array, iterator, function(err, res) { - * console.log(res); // [1, 3, 2] - * console.log(order); // [[1, 0], [2, 2], [3, 1]] - * }); - * - * @example - * - * // object - * var order = []; - * var object = { a: 1, b: 3, c: 2 }; - * var iterator = function(num, done) { - * setTimeout(function() { - * order.push(num); - * done(null, num); - * }, num * 10); - * }; - * async.map(object, iterator, function(err, res) { - * console.log(res); // [1, 3, 2] - * console.log(order); // [1, 2, 3] - * }); - * - * @example - * - * // object with key - * var order = []; - * var object = { a: 1, b: 3, c: 2 }; - * var iterator = function(num, key, done) { - * setTimeout(function() { - * order.push([num, key]); - * done(null, num); - * }, num * 10); - * }; - * async.map(object, iterator, function(err, res) { - * console.log(res); // [1, 3, 2] - * console.log(order); // [[1, 'a'], [2, 'c'], [3, 'b']] - * }); - * - */ - var map = createMap(arrayEachIndex, baseEachIndex, symbolEachIndex, true); - - /** - * @memberof async - * @namespace mapValues - * @param {Array|Object} collection - * @param {Function} iterator - * @param {Function} callback - * @example - * - * // array - * var order = []; - * var array = [1, 3, 2]; - * var iterator = function(num, done) { - * setTimeout(function() { - * order.push(num); - * done(null, num); - * }, num * 10); - * }; - * async.mapValues(array, iterator, function(err, res) { - * console.log(res); // { '0': 1, '1': 3, '2': 2 } - * console.log(order); // [1, 2, 3] - * }); - * - * @example - * - * // array with index - * var order = []; - * var array = [1, 3, 2]; - * var iterator = function(num, index, done) { - * setTimeout(function() { - * order.push([num, index]); - * done(null, num); - * }, num * 10); - * }; - * async.mapValues(array, iterator, function(err, res) { - * console.log(res); // { '0': 1, '1': 3, '2': 2 } - * console.log(order); // [[1, 0], [2, 2], [3, 1]] - * }); - * - * @example - * - * // object - * var order = []; - * var object = { a: 1, b: 3, c: 2 }; - * var iterator = function(num, done) { - * setTimeout(function() { - * order.push(num); - * done(null, num); - * }, num * 10); - * }; - * async.mapValues(object, iterator, function(err, res) { - * console.log(res); // { a: 1, b: 3, c: 2 } - * console.log(order); // [1, 2, 3] - * }); - * - * @example - * - * // object with key - * var order = []; - * var object = { a: 1, b: 3, c: 2 }; - * var iterator = function(num, key, done) { - * setTimeout(function() { - * order.push([num, key]); - * done(null, num); - * }, num * 10); - * }; - * async.mapValues(object, iterator, function(err, res) { - * console.log(res); // { a: 1, b: 3, c: 2 } - * console.log(order); // [[1, 'a'], [2, 'c'], [3, 'b']] - * }); - * - */ - var mapValues = createMap(arrayEachIndex, baseEachKey, symbolEachKey, false); - - /** - * @memberof async - * @namespace filter - * @param {Array|Object} collection - * @param {Function} iterator - * @param {Function} callback - * @example - * - * // array - * var order = []; - * var array = [1, 3, 2]; - * var iterator = function(num, done) { - * setTimeout(function() { - * order.push(num); - * done(null, num % 2); - * }, num * 10); - * }; - * async.filter(array, iterator, function(err, res) { - * console.log(res); // [1, 3]; - * console.log(order); // [1, 2, 3] - * }); - * - * @example - * - * // array with index - * var order = []; - * var array = [1, 3, 2]; - * var iterator = function(num, index, done) { - * setTimeout(function() { - * order.push([num, index]); - * done(null, num % 2); - * }, num * 10); - * }; - * async.filter(array, iterator, function(err, res) { - * console.log(res); // [1, 3]; - * console.log(order); // [[1, 0], [2, 2], [3, 1]] - * }); - * - * @example - * - * // object - * var order = []; - * var object = { a: 1, b: 3, c: 2 }; - * var iterator = function(num, done) { - * setTimeout(function() { - * order.push(num); - * done(null, num % 2); - * }, num * 10); - * }; - * async.filter(object, iterator, function(err, res) { - * console.log(res); // [1, 3]; - * console.log(order); // [1, 2, 3] - * }); - * - * @example - * - * // object with key - * var order = []; - * var object = { a: 1, b: 3, c: 2 }; - * var iterator = function(num, key, done) { - * setTimeout(function() { - * order.push([num, key]); - * done(null, num % 2); - * }, num * 10); - * }; - * async.filter(object, iterator, function(err, res) { - * console.log(res); // [1, 3]; - * console.log(order); // [[1, 'a'], [2, 'c'], [3, 'b']] - * }); - * - */ - var filter = createFilter(arrayEachIndexValue, baseEachIndexValue, symbolEachIndexValue, true); - - /** - * @memberof async - * @namespace filterSeries - * @param {Array|Object} collection - * @param {Function} iterator - * @param {Function} callback - * @example - * - * // array - * var order = []; - * var array = [1, 3, 2]; - * var iterator = function(num, done) { - * setTimeout(function() { - * order.push(num); - * done(null, num % 2); - * }, num * 10); - * }; - * async.filterSeries(array, iterator, function(err, res) { - * console.log(res); // [1, 3]; - * console.log(order); // [1, 3, 2] - * }); - * - * @example - * - * // array with index - * var order = []; - * var array = [1, 3, 2]; - * var iterator = function(num, index, done) { - * setTimeout(function() { - * order.push([num, index]); - * done(null, num % 2); - * }, num * 10); - * }; - * async.filterSeries(array, iterator, function(err, res) { - * console.log(res); // [1, 3] - * console.log(order); // [[1, 0], [3, 1], [2, 2]] - * }); - * - * @example - * - * // object - * var order = []; - * var object = { a: 1, b: 3, c: 2 }; - * var iterator = function(num, done) { - * setTimeout(function() { - * order.push(num); - * done(null, num % 2); - * }, num * 10); - * }; - * async.filterSeries(object, iterator, function(err, res) { - * console.log(res); // [1, 3] - * console.log(order); // [1, 3, 2] - * }); - * - * @example - * - * // object with key - * var order = []; - * var object = { a: 1, b: 3, c: 2 }; - * var iterator = function(num, key, done) { - * setTimeout(function() { - * order.push([num, key]); - * done(null, num % 2); - * }, num * 10); - * }; - * async.filterSeries(object, iterator, function(err, res) { - * console.log(res); // [1, 3] - * console.log(order); // [[1, 'a'], [3, 'b'], [2, 'c']] - * }); - * - */ - var filterSeries = createFilterSeries(true); - - /** - * @memberof async - * @namespace filterLimit - * @param {Array|Object} collection - * @param {number} limit - limit >= 1 - * @param {Function} iterator - * @param {Function} callback - * @example - * - * // array - * var order = []; - * var array = [1, 5, 3, 4, 2]; - * var iterator = function(num, done) { - * setTimeout(function() { - * order.push(num); - * done(null, num % 2); - * }, num * 10); - * }; - * async.filterLimit(array, 2, iterator, function(err, res) { - * console.log(res); // [1, 5, 3] - * console.log(order); // [1, 3, 5, 2, 4] - * }); - * - * @example - * - * // array with index - * var order = []; - * var array = [1, 5, 3, 4, 2]; - * var iterator = function(num, index, done) { - * setTimeout(function() { - * order.push([num, index]); - * done(null, num % 2); - * }, num * 10); - * }; - * async.filterLimit(array, 2, iterator, function(err, res) { - * console.log(res); // [1, 5, 3] - * console.log(order); // [[1, 0], [3, 2], [5, 1], [2, 4], [4, 3]] - * }); - * - * @example - * - * // object - * var order = []; - * var object = { a: 1, b: 5, c: 3, d: 4, e: 2 }; - * var iterator = function(num, done) { - * setTimeout(function() { - * order.push(num); - * done(null, num % 2); - * }, num * 10); - * }; - * async.filterLimit(object, 2, iterator, function(err, res) { - * console.log(res); // [1, 5, 3] - * console.log(order); // [1, 3, 5, 2, 4] - * }); - * - * @example - * - * // object with key - * var order = []; - * var object = { a: 1, b: 5, c: 3, d: 4, e: 2 }; - * var iterator = function(num, key, done) { - * setTimeout(function() { - * order.push([num, key]); - * done(null, num % 2); - * }, num * 10); - * }; - * async.filterLimit(object, 2, iterator, function(err, res) { - * console.log(res); // [1, 5, 3] - * console.log(order); // [[1, 'a'], [3, 'c'], [5, 'b'], [2, 'e'], [4, 'd']] - * }); - * - */ - var filterLimit = createFilterLimit(true); - - /** - * @memberof async - * @namespace reject - * @param {Array|Object} collection - * @param {Function} iterator - * @param {Function} callback - * @example - * - * // array - * var order = []; - * var array = [1, 3, 2]; - * var iterator = function(num, done) { - * setTimeout(function() { - * order.push(num); - * done(null, num % 2); - * }, num * 10); - * }; - * async.reject(array, iterator, function(err, res) { - * console.log(res); // [2]; - * console.log(order); // [1, 2, 3] - * }); - * - * @example - * - * // array with index - * var order = []; - * var array = [1, 3, 2]; - * var iterator = function(num, index, done) { - * setTimeout(function() { - * order.push([num, index]); - * done(null, num % 2); - * }, num * 10); - * }; - * async.reject(array, iterator, function(err, res) { - * console.log(res); // [2]; - * console.log(order); // [[1, 0], [2, 2], [3, 1]] - * }); - * - * @example - * - * // object - * var order = []; - * var object = { a: 1, b: 3, c: 2 }; - * var iterator = function(num, done) { - * setTimeout(function() { - * order.push(num); - * done(null, num % 2); - * }, num * 10); - * }; - * async.reject(object, iterator, function(err, res) { - * console.log(res); // [2]; - * console.log(order); // [1, 2, 3] - * }); - * - * @example - * - * // object with key - * var order = []; - * var object = { a: 1, b: 3, c: 2 }; - * var iterator = function(num, key, done) { - * setTimeout(function() { - * order.push([num, key]); - * done(null, num % 2); - * }, num * 10); - * }; - * async.reject(object, iterator, function(err, res) { - * console.log(res); // [2]; - * console.log(order); // [[1, 'a'], [2, 'c'], [3, 'b']] - * }); - * - */ - var reject = createFilter(arrayEachIndexValue, baseEachIndexValue, symbolEachIndexValue, false); - - /** - * @memberof async - * @namespace rejectSeries - * @param {Array|Object} collection - * @param {Function} iterator - * @param {Function} callback - * @example - * - * // array - * var order = []; - * var array = [1, 3, 2]; - * var iterator = function(num, done) { - * setTimeout(function() { - * order.push(num); - * done(null, num % 2); - * }, num * 10); - * }; - * async.rejectSeries(array, iterator, function(err, res) { - * console.log(res); // [2]; - * console.log(order); // [1, 3, 2] - * }); - * - * @example - * - * // object - * var order = []; - * var object = { a: 1, b: 3, c: 2 }; - * var iterator = function(num, done) { - * setTimeout(function() { - * order.push(num); - * done(null, num % 2); - * }, num * 10); - * }; - * async.rejectSeries(object, iterator, function(err, res) { - * console.log(res); // [2]; - * console.log(order); // [1, 3, 2] - * }); - * - * @example - * - * // object with key - * var order = []; - * var object = { a: 1, b: 3, c: 2 }; - * var iterator = function(num, key, done) { - * setTimeout(function() { - * order.push([num, key]); - * done(null, num % 2); - * }, num * 10); - * }; - * async.rejectSeries(object, iterator, function(err, res) { - * console.log(res); // [2]; - * console.log(order); // [[1, 'a'], [3, 'b'], [2, 'c']] - * }); - * - */ - var rejectSeries = createFilterSeries(false); - - /** - * @memberof async - * @namespace rejectLimit - * @param {Array|Object} collection - * @param {number} limit - limit >= 1 - * @param {Function} iterator - * @param {Function} callback - * @example - * - * // array - * var order = []; - * var array = [1, 5, 3, 4, 2]; - * var iterator = function(num, done) { - * setTimeout(function() { - * order.push(num); - * done(null, num % 2); - * }, num * 10); - * }; - * async.rejectLimit(array, 2, iterator, function(err, res) { - * console.log(res); // [4, 2] - * console.log(order); // [1, 3, 5, 2, 4] - * }); - * - * @example - * - * // array with index - * var order = []; - * var array = [1, 5, 3, 4, 2]; - * var iterator = function(num, index, done) { - * setTimeout(function() { - * order.push([num, index]); - * done(null, num % 2); - * }, num * 10); - * }; - * async.rejectLimit(array, 2, iterator, function(err, res) { - * console.log(res); // [4, 2] - * console.log(order); // [[1, 0], [3, 2], [5, 1], [2, 4], [4, 3]] - * }); - * - * @example - * - * // object - * var order = []; - * var object = { a: 1, b: 5, c: 3, d: 4, e: 2 }; - * var iterator = function(num, done) { - * setTimeout(function() { - * order.push(num); - * done(null, num % 2); - * }, num * 10); - * }; - * async.rejectLimit(object, 2, iterator, function(err, res) { - * console.log(res); // [4, 2] - * console.log(order); // [1, 3, 5, 2, 4] - * }); - * - * @example - * - * // object with key - * var order = []; - * var object = { a: 1, b: 5, c: 3, d: 4, e: 2 }; - * var iterator = function(num, key, done) { - * setTimeout(function() { - * order.push([num, key]); - * done(null, num % 2); - * }, num * 10); - * }; - * async.rejectLimit(object, 2, iterator, function(err, res) { - * console.log(res); // [4, 2] - * console.log(order); // [[1, 'a'], [3, 'c'], [5, 'b'], [2, 'e'], [4, 'd']] - * }); - * - */ - var rejectLimit = createFilterLimit(false); - - /** - * @memberof async - * @namespace detect - * @param {Array|Object} collection - * @param {Function} iterator - * @param {Function} callback - * @example - * - * // array - * var order = []; - * var array = [1, 3, 2]; - * var iterator = function(num, done) { - * setTimeout(function() { - * order.push(num); - * done(null, num % 2); - * }, num * 10); - * }; - * async.detect(array, iterator, function(err, res) { - * console.log(res); // 1 - * console.log(order); // [1] - * }); - * - * @example - * - * // array with index - * var order = []; - * var array = [1, 3, 2]; - * var iterator = function(num, index, done) { - * setTimeout(function() { - * order.push([num, index]); - * done(null, num % 2); - * }, num * 10); - * }; - * async.detect(array, iterator, function(err, res) { - * console.log(res); // 1 - * console.log(order); // [[1, 0]] - * }); - * - * @example - * - * // object - * var order = []; - * var object = { a: 1, b: 3, c: 2 }; - * var iterator = function(num, done) { - * setTimeout(function() { - * order.push(num); - * done(null, num % 2); - * }, num * 10); - * }; - * async.detect(object, iterator, function(err, res) { - * console.log(res); // 1 - * console.log(order); // [1] - * }); - * - * @example - * - * // object with key - * var order = []; - * var object = { a: 1, b: 3, c: 2 }; - * var iterator = function(num, key, done) { - * setTimeout(function() { - * order.push([num, key]); - * done(null, num % 2); - * }, num * 10); - * }; - * async.detect(object, iterator, function(err, res) { - * console.log(res); // 1 - * console.log(order); // [[1, 'a']] - * }); - * - */ - var detect = createDetect(arrayEachValue, baseEachValue, symbolEachValue, true); - - /** - * @memberof async - * @namespace detectSeries - * @param {Array|Object} collection - * @param {Function} iterator - * @param {Function} callback - * @example - * - * // array - * var order = []; - * var array = [1, 3, 2]; - * var iterator = function(num, done) { - * setTimeout(function() { - * order.push(num); - * done(null, num % 2); - * }, num * 10); - * }; - * async.detectSeries(array, iterator, function(err, res) { - * console.log(res); // 1 - * console.log(order); // [1] - * }); - * - * @example - * - * // array with index - * var order = []; - * var array = [1, 3, 2]; - * var iterator = function(num, index, done) { - * setTimeout(function() { - * order.push([num, index]); - * done(null, num % 2); - * }, num * 10); - * }; - * async.detectSeries(array, iterator, function(err, res) { - * console.log(res); // 1 - * console.log(order); // [[1, 0]] - * }); - * - * @example - * - * // object - * var order = []; - * var object = { a: 1, b: 3, c: 2 }; - * var iterator = function(num, done) { - * setTimeout(function() { - * order.push(num); - * done(null, num % 2); - * }, num * 10); - * }; - * async.detectSeries(object, iterator, function(err, res) { - * console.log(res); // 1 - * console.log(order); // [1] - * }); - * - * @example - * - * // object with key - * var order = []; - * var object = { a: 1, b: 3, c: 2 }; - * var iterator = function(num, key, done) { - * setTimeout(function() { - * order.push([num, key]); - * done(null, num % 2); - * }, num * 10); - * }; - * async.detectSeries(object, iterator, function(err, res) { - * console.log(res); // 1 - * console.log(order); // [[1, 'a']] - * }); - * - */ - var detectSeries = createDetectSeries(true); - - /** - * @memberof async - * @namespace detectLimit - * @param {Array|Object} collection - * @param {number} limit - limit >= 1 - * @param {Function} iterator - * @param {Function} callback - * @example - * - * // array - * var order = []; - * var array = [1, 5, 3, 4, 2]; - * var iterator = function(num, done) { - * setTimeout(function() { - * order.push(num); - * done(null, num % 2); - * }, num * 10); - * }; - * async.detectLimit(array, 2, iterator, function(err, res) { - * console.log(res); // 1 - * console.log(order); // [1] - * }); - * - * @example - * - * // array with index - * var order = []; - * var array = [1, 5, 3, 4, 2]; - * var iterator = function(num, index, done) { - * setTimeout(function() { - * order.push([num, index]); - * done(null, num % 2); - * }, num * 10); - * }; - * async.detectLimit(array, 2, iterator, function(err, res) { - * console.log(res); // 1 - * console.log(order); // [[1, 0]] - * }); - * - * @example - * - * // object - * var order = []; - * var object = { a: 1, b: 5, c: 3, d: 4, e: 2 }; - * var iterator = function(num, done) { - * setTimeout(function() { - * order.push(num); - * done(null, num % 2); - * }, num * 10); - * }; - * async.detectLimit(object, 2, iterator, function(err, res) { - * console.log(res); // 1 - * console.log(order); // [1] - * }); - * - * @example - * - * // object with key - * var order = []; - * var object = { a: 1, b: 5, c: 3, d: 4, e: 2 }; - * var iterator = function(num, key, done) { - * setTimeout(function() { - * order.push([num, key]); - * done(null, num % 2); - * }, num * 10); - * }; - * async.detectLimit(object, 2, iterator, function(err, res) { - * console.log(res); // 1 - * console.log(order); // [[1, 'a']] - * }); - * - */ - var detectLimit = createDetectLimit(true); - - /** - * @memberof async - * @namespace every - * @param {Array|Object} collection - * @param {Function} iterator - * @param {Function} callback - * @example - * - * // array - * var order = []; - * var array = [1, 3, 2]; - * var iterator = function(num, done) { - * setTimeout(function() { - * order.push(num); - * done(null, num % 2); - * }, num * 10); - * }; - * async.every(array, iterator, function(err, res) { - * console.log(res); // false - * console.log(order); // [1, 2] - * }); - * - * @example - * - * // array with index - * var order = []; - * var array = [1, 3, 2]; - * var iterator = function(num, index, done) { - * setTimeout(function() { - * order.push([num, index]); - * done(null, num % 2); - * }, num * 10); - * }; - * async.every(array, iterator, function(err, res) { - * console.log(res); // false - * console.log(order); // [[1, 0], [2, 2]] - * }); - * - * @example - * - * // object - * var order = []; - * var object = { a: 1, b: 3, c: 2 }; - * var iterator = function(num, done) { - * setTimeout(function() { - * order.push(num); - * done(null, num % 2); - * }, num * 10); - * }; - * async.every(object, iterator, function(err, res) { - * console.log(res); // false - * console.log(order); // [1, 2] - * }); - * - * @example - * - * // object with key - * var order = []; - * var object = { a: 1, b: 3, c: 2 }; - * var iterator = function(num, key, done) { - * setTimeout(function() { - * order.push([num, key]); - * done(null, num % 2); - * }, num * 10); - * }; - * async.every(object, iterator, function(err, res) { - * console.log(res); // false - * console.log(order); // [[1, 'a'], [2, 'c']] - * }); - * - */ - var every = createEvery(arrayEachValue, baseEachValue, symbolEachValue); - - /** - * @memberof async - * @namespace everySeries - * @param {Array|Object} collection - * @param {Function} iterator - * @param {Function} callback - * @example - * - * // array - * var order = []; - * var array = [1, 3, 2]; - * var iterator = function(num, done) { - * setTimeout(function() { - * order.push(num); - * done(null, num % 2); - * }, num * 10); - * }; - * async.everySeries(array, iterator, function(err, res) { - * console.log(res); // false - * console.log(order); // [1, 3, 2] - * }); - * - * @example - * - * // array with index - * var order = []; - * var array = [1, 3, 2]; - * var iterator = function(num, index, done) { - * setTimeout(function() { - * order.push([num, index]); - * done(null, num % 2); - * }, num * 10); - * }; - * async.everySeries(array, iterator, function(err, res) { - * console.log(res); // false - * console.log(order); // [[1, 0], [3, 1], [2, 2]] - * }); - * - * @example - * - * // object - * var order = []; - * var object = { a: 1, b: 3, c: 2 }; - * var iterator = function(num, done) { - * setTimeout(function() { - * order.push(num); - * done(null, num % 2); - * }, num * 10); - * }; - * async.everySeries(object, iterator, function(err, res) { - * console.log(res); // false - * console.log(order); // [1, 3, 2] - * }); - * - * @example - * - * // object with key - * var order = []; - * var object = { a: 1, b: 3, c: 2 }; - * var iterator = function(num, key, done) { - * setTimeout(function() { - * order.push([num, key]); - * done(null, num % 2); - * }, num * 10); - * }; - * async.everySeries(object, iterator, function(err, res) { - * console.log(res); // false - * console.log(order); // [[1, 'a'], [3, 'b'] [2, 'c']] - * }); - * - */ - var everySeries = createEverySeries(); - - /** - * @memberof async - * @namespace everyLimit - * @param {Array|Object} collection - * @param {number} limit - limit >= 1 - * @param {Function} iterator - * @param {Function} callback - * @example - * - * // array - * var order = []; - * var array = [1, 5, 3, 4, 2]; - * var iterator = function(num, done) { - * setTimeout(function() { - * order.push(num); - * done(null, num % 2); - * }, num * 10); - * }; - * async.everyLimit(array, 2, iterator, function(err, res) { - * console.log(res); // false - * console.log(order); // [1, 3, 5, 2] - * }); - * - * @example - * - * // array with index - * var order = []; - * var array = [1, 5, 3, 4, 2]; - * var iterator = function(num, index, done) { - * setTimeout(function() { - * order.push([num, index]); - * done(null, num % 2); - * }, num * 10); - * }; - * async.everyLimit(array, 2, iterator, function(err, res) { - * console.log(res); // false - * console.log(order); // [[1, 0], [3, 2], [5, 1], [2, 4]] - * }); - * - * @example - * - * // object - * var order = []; - * var object = { a: 1, b: 5, c: 3, d: 4, e: 2 }; - * var iterator = function(num, done) { - * setTimeout(function() { - * order.push(num); - * done(null, num % 2); - * }, num * 10); - * }; - * async.everyLimit(object, 2, iterator, function(err, res) { - * console.log(res); // false - * console.log(order); // [1, 3, 5, 2] - * }); - * - * @example - * - * // object with key - * var order = []; - * var object = { a: 1, b: 5, c: 3, d: 4, e: 2 }; - * var iterator = function(num, key, done) { - * setTimeout(function() { - * order.push([num, key]); - * done(null, num % 2); - * }, num * 10); - * }; - * async.everyLimit(object, 2, iterator, function(err, res) { - * console.log(res); // false - * console.log(order); // [[1, 'a'], [3, 'c'], [5, 'b'], [2, 'e']] - * }); - * - */ - var everyLimit = createEveryLimit(); - - /** - * @memberof async - * @namespace pick - * @param {Array|Object} collection - * @param {Function} iterator - * @param {Function} callback - * @example - * - * // array - * var order = []; - * var array = [1, 3, 2, 4]; - * var iterator = function(num, done) { - * setTimeout(function() { - * order.push(num); - * done(null, num % 2); - * }, num * 10); - * }; - * async.pick(array, iterator, function(err, res) { - * console.log(res); // { '0': 1, '1': 3 } - * console.log(order); // [1, 2, 3, 4] - * }); - * - * @example - * - * // array with index - * var order = []; - * var array = [1, 3, 2, 4]; - * var iterator = function(num, index, done) { - * setTimeout(function() { - * order.push([num, index]); - * done(null, num % 2); - * }, num * 10); - * }; - * async.pick(array, iterator, function(err, res) { - * console.log(res); // { '0': 1, '1': 3 } - * console.log(order); // [[0, 1], [2, 2], [3, 1], [4, 3]] - * }); - * - * @example - * - * // object - * var order = []; - * var object = { a: 1, b: 3, c: 2, d: 4 }; - * var iterator = function(num, done) { - * setTimeout(function() { - * order.push(num); - * done(null, num % 2); - * }, num * 10); - * }; - * async.pick(object, iterator, function(err, res) { - * console.log(res); // { a: 1, b: 3 } - * console.log(order); // [1, 2, 3, 4] - * }); - * - * @example - * - * // object with key - * var order = []; - * var object = { a: 1, b: 3, c: 2, d: 4 }; - * var iterator = function(num, key, done) { - * setTimeout(function() { - * order.push([num, key]); - * done(null, num % 2); - * }, num * 10); - * }; - * async.pick(object, iterator, function(err, res) { - * console.log(res); // { a: 1, b: 3 } - * console.log(order); // [[1, 'a'], [2, 'c'], [3, 'b'], [4, 'd']] - * }); - * - */ - var pick = createPick(arrayEachIndexValue, baseEachKeyValue, symbolEachKeyValue, true); - - /** - * @memberof async - * @namespace pickSeries - * @param {Array|Object} collection - * @param {Function} iterator - * @param {Function} callback - * @example - * - * // array - * var order = []; - * var array = [1, 3, 2, 4]; - * var iterator = function(num, done) { - * setTimeout(function() { - * order.push(num); - * done(null, num % 2); - * }, num * 10); - * }; - * async.pickSeries(array, iterator, function(err, res) { - * console.log(res); // { '0': 1, '1': 3 } - * console.log(order); // [1, 3, 2, 4] - * }); - * - * @example - * - * // array with index - * var order = []; - * var array = [1, 3, 2, 4]; - * var iterator = function(num, index, done) { - * setTimeout(function() { - * order.push([num, index]); - * done(null, num % 2); - * }, num * 10); - * }; - * async.pickSeries(array, iterator, function(err, res) { - * console.log(res); // { '0': 1, '1': 3 } - * console.log(order); // [[0, 1], [3, 1], [2, 2], [4, 3]] - * }); - * - * @example - * - * // object - * var order = []; - * var object = { a: 1, b: 3, c: 2, d: 4 }; - * var iterator = function(num, done) { - * setTimeout(function() { - * order.push(num); - * done(null, num % 2); - * }, num * 10); - * }; - * async.pickSeries(object, iterator, function(err, res) { - * console.log(res); // { a: 1, b: 3 } - * console.log(order); // [1, 3, 2, 4] - * }); - * - * @example - * - * // object with key - * var order = []; - * var object = { a: 1, b: 3, c: 2, d: 4 }; - * var iterator = function(num, key, done) { - * setTimeout(function() { - * order.push([num, key]); - * done(null, num % 2); - * }, num * 10); - * }; - * async.pickSeries(object, iterator, function(err, res) { - * console.log(res); // { a: 1, b: 3 } - * console.log(order); // [[1, 'a'], [3, 'b'], [2, 'c'], [4, 'd']] - * }); - * - */ - var pickSeries = createPickSeries(true); - - /** - * @memberof async - * @namespace pickLimit - * @param {Array|Object} collection - * @param {number} limit - limit >= 1 - * @param {Function} iterator - * @param {Function} callback - * @example - * - * // array - * var order = []; - * var array = [1, 5, 3, 4, 2]; - * var iterator = function(num, done) { - * setTimeout(function() { - * order.push(num); - * done(null, num % 2); - * }, num * 10); - * }; - * async.pickLimit(array, 2, iterator, function(err, res) { - * console.log(res); // { '0': 1, '1': 5, '2': 3 } - * console.log(order); // [1, 3, 5, 2, 4] - * }); - * - * @example - * - * // array with index - * var order = []; - * var array = [1, 5, 3, 4, 2]; - * var iterator = function(num, index, done) { - * setTimeout(function() { - * order.push([num, index]); - * done(null, num % 2); - * }, num * 10); - * }; - * async.pickLimit(array, 2, iterator, function(err, res) { - * console.log(res); // { '0': 1, '1': 5, '2': 3 } - * console.log(order); // [[1, 0], [3, 2], [5, 1], [2, 4], [4, 3]] - * }); - * - * @example - * - * // object - * var order = []; - * var object = { a: 1, b: 5, c: 3, d: 4, e: 2 }; - * var iterator = function(num, done) { - * setTimeout(function() { - * order.push(num); - * done(null, num % 2); - * }, num * 10); - * }; - * async.pickLimit(object, 2, iterator, function(err, res) { - * console.log(res); // { a: 1, b: 5, c: 3 } - * console.log(order); // [1, 3, 5, 2, 4] - * }); - * - * @example - * - * // object with key - * var order = []; - * var object = { a: 1, b: 5, c: 3, d: 4, e: 2 }; - * var iterator = function(num, key, done) { - * setTimeout(function() { - * order.push([num, key]); - * done(null, num % 2); - * }, num * 10); - * }; - * async.pickLimit(object, 2, iterator, function(err, res) { - * console.log(res); // { a: 1, b: 5, c: 3 } - * console.log(order); // [[1, 'a'], [3, 'c'], [5, 'b'], [2, 'e'], [4, 'd']] - * }); - * - */ - var pickLimit = createPickLimit(true); - - /** - * @memberof async - * @namespace omit - * @param {Array|Object} collection - * @param {Function} iterator - * @param {Function} callback - * @example - * - * // array - * var order = []; - * var array = [1, 3, 2, 4]; - * var iterator = function(num, done) { - * setTimeout(function() { - * order.push(num); - * done(null, num % 2); - * }, num * 10); - * }; - * async.omit(array, iterator, function(err, res) { - * console.log(res); // { '2': 2, '3': 4 } - * console.log(order); // [1, 2, 3, 4] - * }); - * - * @example - * - * // array with index - * var order = []; - * var array = [1, 3, 2, 4]; - * var iterator = function(num, index, done) { - * setTimeout(function() { - * order.push([num, index]); - * done(null, num % 2); - * }, num * 10); - * }; - * async.omit(array, iterator, function(err, res) { - * console.log(res); // { '2': 2, '3': 4 } - * console.log(order); // [[0, 1], [2, 2], [3, 1], [4, 3]] - * }); - * - * @example - * - * // object - * var order = []; - * var object = { a: 1, b: 3, c: 2, d: 4 }; - * var iterator = function(num, done) { - * setTimeout(function() { - * order.push(num); - * done(null, num % 2); - * }, num * 10); - * }; - * async.omit(object, iterator, function(err, res) { - * console.log(res); // { c: 2, d: 4 } - * console.log(order); // [1, 2, 3, 4] - * }); - * - * @example - * - * // object with key - * var order = []; - * var object = { a: 1, b: 3, c: 2, d: 4 }; - * var iterator = function(num, key, done) { - * setTimeout(function() { - * order.push([num, key]); - * done(null, num % 2); - * }, num * 10); - * }; - * async.omit(object, iterator, function(err, res) { - * console.log(res); // { c: 2, d: 4 } - * console.log(order); // [[1, 'a'], [2, 'c'], [3, 'b'], [4, 'd']] - * }); - * - */ - var omit = createPick(arrayEachIndexValue, baseEachKeyValue, symbolEachKeyValue, false); - - /** - * @memberof async - * @namespace omitSeries - * @param {Array|Object} collection - * @param {Function} iterator - * @param {Function} callback - * @example - * - * // array - * var order = []; - * var array = [1, 3, 2, 4]; - * var iterator = function(num, done) { - * setTimeout(function() { - * order.push(num); - * done(null, num % 2); - * }, num * 10); - * }; - * async.omitSeries(array, iterator, function(err, res) { - * console.log(res); // { '2': 2, '3': 4 } - * console.log(order); // [1, 3, 2, 4] - * }); - * - * @example - * - * // array with index - * var order = []; - * var array = [1, 3, 2, 4]; - * var iterator = function(num, index, done) { - * setTimeout(function() { - * order.push([num, index]); - * done(null, num % 2); - * }, num * 10); - * }; - * async.omitSeries(array, iterator, function(err, res) { - * console.log(res); // { '2': 2, '3': 4 } - * console.log(order); // [[0, 1], [3, 1], [2, 2], [4, 3]] - * }); - * - * @example - * - * // object - * var order = []; - * var object = { a: 1, b: 3, c: 2, d: 4 }; - * var iterator = function(num, done) { - * setTimeout(function() { - * order.push(num); - * done(null, num % 2); - * }, num * 10); - * }; - * async.omitSeries(object, iterator, function(err, res) { - * console.log(res); // { c: 2, d: 4 } - * console.log(order); // [1, 3, 2, 4] - * }); - * - * @example - * - * // object with key - * var order = []; - * var object = { a: 1, b: 3, c: 2, d: 4 }; - * var iterator = function(num, key, done) { - * setTimeout(function() { - * order.push([num, key]); - * done(null, num % 2); - * }, num * 10); - * }; - * async.omitSeries(object, iterator, function(err, res) { - * console.log(res); // { c: 2, d: 4 } - * console.log(order); // [[1, 'a'], [3, 'b'], [2, 'c'], [4, 'd']] - * }); - * - */ - var omitSeries = createPickSeries(false); - - /** - * @memberof async - * @namespace omitLimit - * @param {Array|Object} collection - * @param {number} limit - limit >= 1 - * @param {Function} iterator - * @param {Function} callback - * @example - * - * // array - * var order = []; - * var array = [1, 5, 3, 4, 2]; - * var iterator = function(num, done) { - * setTimeout(function() { - * order.push(num); - * done(null, num % 2); - * }, num * 10); - * }; - * async.omitLimit(array, 2, iterator, function(err, res) { - * console.log(res); // { '3': 4, '4': 2 } - * console.log(order); // [1, 3, 5, 2, 4] - * }); - * - * @example - * - * // array with index - * var order = []; - * var array = [1, 5, 3, 4, 2]; - * var iterator = function(num, index, done) { - * setTimeout(function() { - * order.push([num, index]); - * done(null, num % 2); - * }, num * 10); - * }; - * async.omitLimit(array, 2, iterator, function(err, res) { - * console.log(res); // { '3': 4, '4': 2 } - * console.log(order); // [[1, 0], [3, 2], [5, 1], [2, 4], [4, 3]] - * }); - * - * @example - * - * // object - * var order = []; - * var object = { a: 1, b: 5, c: 3, d: 4, e: 2 }; - * var iterator = function(num, done) { - * setTimeout(function() { - * order.push(num); - * done(null, num % 2); - * }, num * 10); - * }; - * async.omitLimit(object, 2, iterator, function(err, res) { - * console.log(res); // { d: 4, e: 2 } - * console.log(order); // [1, 3, 5, 2, 4] - * }); - * - * @example - * - * // object with key - * var order = []; - * var object = { a: 1, b: 5, c: 3, d: 4, e: 2 }; - * var iterator = function(num, key, done) { - * setTimeout(function() { - * order.push([num, key]); - * done(null, num % 2); - * }, num * 10); - * }; - * async.omitLimit(object, 2, iterator, function(err, res) { - * console.log(res); // { d: 4, e: 2 } - * console.log(order); // [[1, 'a'], [3, 'c'], [5, 'b'], [2, 'e'], [4, 'd']] - * }); - * - */ - var omitLimit = createPickLimit(false); - - /** - * @memberof async - * @namespace transform - * @param {Array|Object} collection - * @param {Array|Object|Function} [accumulator] - * @param {Function} [iterator] - * @param {Function} [callback] - * @example - * - * // array - * var order = []; - * var collection = [1, 3, 2, 4]; - * var iterator = function(result, num, done) { - * setTimeout(function() { - * order.push(num); - * result.push(num) - * done(); - * }, num * 10); - * }; - * async.transform(collection, iterator, function(err, res) { - * console.log(res); // [1, 2, 3, 4] - * console.log(order); // [1, 2, 3, 4] - * }); - * - * @example - * - * // array with index and accumulator - * var order = []; - * var collection = [1, 3, 2, 4]; - * var iterator = function(result, num, index, done) { - * setTimeout(function() { - * order.push([num, index]); - * result[index] = num; - * done(); - * }, num * 10); - * }; - * async.transform(collection, {}, iterator, function(err, res) { - * console.log(res); // { '0': 1, '1': 3, '2': 2, '3': 4 } - * console.log(order); // [[1, 0], [2, 2], [3, 1], [4, 3]] - * }); - * - * @example - * - * // object with accumulator - * var order = []; - * var object = { a: 1, b: 3, c: 2, d: 4 }; - * var iterator = function(result, num, done) { - * setTimeout(function() { - * order.push(num); - * result.push(num); - * done(); - * }, num * 10); - * }; - * async.transform(collection, [], iterator, function(err, res) { - * console.log(res); // [1, 2, 3, 4] - * console.log(order); // [1, 2, 3, 4] - * }); - * - * @example - * - * // object with key - * var order = []; - * var object = { a: 1, b: 3, c: 2, d: 4 }; - * var iterator = function(result, num, key, done) { - * setTimeout(function() { - * order.push([num, key]); - * result[key] = num; - * done(); - * }, num * 10); - * }; - * async.transform(collection, iterator, function(err, res) { - * console.log(res); // { a: 1, b: 3, c: 2, d: 4 } - * console.log(order); // [[1, 'a'], [2, 'c'], [3, 'b'], [4, 'd']] - * }); - * - */ - var transform = createTransform(arrayEachResult, baseEachResult, symbolEachResult); - - /** - * @memberof async - * @namespace sortBy - * @param {Array|Object} collection - * @param {Function} iterator - * @param {Function} callback - * @example - * - * // array - * var order = []; - * var array = [1, 3, 2]; - * var iterator = function(num, done) { - * setTimeout(function() { - * order.push(num); - * done(null, num); - * }, num * 10); - * }; - * async.sortBy(array, iterator, function(err, res) { - * console.log(res); // [1, 2, 3]; - * console.log(order); // [1, 2, 3] - * }); - * - * @example - * - * // array with index - * var order = []; - * var array = [1, 3, 2]; - * var iterator = function(num, index, done) { - * setTimeout(function() { - * order.push([num, index]); - * done(null, num); - * }, num * 10); - * }; - * async.sortBy(array, iterator, function(err, res) { - * console.log(res); // [1, 2, 3] - * console.log(order); // [[1, 0], [2, 2], [3, 1]] - * }); - * - * @example - * - * // object - * var order = []; - * var object = { a: 1, b: 3, c: 2 }; - * var iterator = function(num, done) { - * setTimeout(function() { - * order.push(num); - * done(null, num); - * }, num * 10); - * }; - * async.sortBy(object, iterator, function(err, res) { - * console.log(res); // [1, 2, 3] - * console.log(order); // [1, 2, 3] - * }); - * - * @example - * - * // object with key - * var order = []; - * var object = { a: 1, b: 3, c: 2 }; - * var iterator = function(num, key, done) { - * setTimeout(function() { - * order.push([num, key]); - * done(null, num); - * }, num * 10); - * }; - * async.sortBy(object, iterator, function(err, res) { - * console.log(res); // [1, 2, 3] - * console.log(order); // [[1, 'a'], [2, 'c'], [3, 'b']] - * }); - * - */ - var sortBy = createSortBy(arrayEachIndexValue, baseEachIndexValue, symbolEachIndexValue); - - /** - * @memberof async - * @namespace concat - * @param {Array|Object} collection - * @param {Function} iterator - * @param {Function} callback - * @example - * - * // array - * var order = []; - * var array = [1, 3, 2]; - * var iterator = function(num, done) { - * setTimeout(function() { - * order.push(num); - * done(null, [num]); - * }, num * 10); - * }; - * async.concat(array, iterator, function(err, res) { - * console.log(res); // [1, 2, 3]; - * console.log(order); // [1, 2, 3] - * }); - * - * @example - * - * // array with index - * var order = []; - * var array = [1, 3, 2]; - * var iterator = function(num, index, done) { - * setTimeout(function() { - * order.push([num, index]); - * done(null, [num]); - * }, num * 10); - * }; - * async.concat(array, iterator, function(err, res) { - * console.log(res); // [1, 2, 3] - * console.log(order); // [[1, 0], [2, 2], [3, 1]] - * }); - * - * @example - * - * // object - * var order = []; - * var object = { a: 1, b: 3, c: 2 }; - * var iterator = function(num, done) { - * setTimeout(function() { - * order.push(num); - * done(null, [num]); - * }, num * 10); - * }; - * async.concat(object, iterator, function(err, res) { - * console.log(res); // [1, 2, 3] - * console.log(order); // [1, 2, 3] - * }); - * - * @example - * - * // object with key - * var order = []; - * var object = { a: 1, b: 3, c: 2 }; - * var iterator = function(num, key, done) { - * setTimeout(function() { - * order.push([num, key]); - * done(null, [num]); - * }, num * 10); - * }; - * async.concat(object, iterator, function(err, res) { - * console.log(res); // [1, 2, 3] - * console.log(order); // [[1, 'a'], [2, 'c'], [3, 'b']] - * }); - * - */ - var concat = createConcat(arrayEachIndex, baseEachIndex, symbolEachIndex); - - /** - * @memberof async - * @namespace groupBy - * @param {Array|Object} collection - * @param {Function} iterator - * @param {Function} callback - * @example - * - * // array - * var order = []; - * var array = [4.2, 6.4, 6.1]; - * var iterator = function(num, done) { - * setTimeout(function() { - * order.push(num); - * done(null, Math.floor(num)); - * }, num * 10); - * }; - * async.groupBy(array, iterator, function(err, res) { - * console.log(res); // { '4': [4.2], '6': [6.1, 6.4] } - * console.log(order); // [4.2, 6.1, 6.4] - * }); - * - * @example - * - * // array with index - * var order = []; - * var array = [4.2, 6.4, 6.1]; - * var iterator = function(num, index, done) { - * setTimeout(function() { - * order.push([num, index]); - * done(null, Math.floor(num)); - * }, num * 10); - * }; - * async.groupBy(array, iterator, function(err, res) { - * console.log(res); // { '4': [4.2], '6': [6.1, 6.4] } - * console.log(order); // [[4.2, 0], [6.1, 2], [6.4, 1]] - * }); - * - * @example - * - * // object - * var order = []; - * var object = { a: 4.2, b: 6.4, c: 6.1 }; - * var iterator = function(num, done) { - * setTimeout(function() { - * order.push(num); - * done(null, Math.floor(num)); - * }, num * 10); - * }; - * async.groupBy(object, iterator, function(err, res) { - * console.log(res); // { '4': [4.2], '6': [6.1, 6.4] } - * console.log(order); // [4.2, 6.1, 6.4] - * }); - * - * @example - * - * // object with key - * var order = []; - * var object = { a: 4.2, b: 6.4, c: 6.1 }; - * var iterator = function(num, key, done) { - * setTimeout(function() { - * order.push([num, key]); - * done(null, Math.floor(num)); - * }, num * 10); - * }; - * async.groupBy(object, iterator, function(err, res) { - * console.log(res); // { '4': [4.2], '6': [6.1, 6.4] } - * console.log(order); // [[4.2, 'a'], [6.1, 'c'], [6.4, 'b']] - * }); - * - */ - var groupBy = createGroupBy(arrayEachValue, baseEachValue, symbolEachValue); - - /** - * @memberof async - * @namespace parallel - * @param {Array|Object} tasks - functions - * @param {Function} callback - * @example - * - * var order = []; - * var tasks = [ - * function(done) { - * setTimeout(function() { - * order.push(1); - * done(null, 1); - * }, 10); - * }, - * function(done) { - * setTimeout(function() { - * order.push(2); - * done(null, 2); - * }, 30); - * }, - * function(done) { - * setTimeout(function() { - * order.push(3); - * done(null, 3); - * }, 40); - * }, - * function(done) { - * setTimeout(function() { - * order.push(4); - * done(null, 4); - * }, 20); - * } - * ]; - * async.parallel(tasks, function(err, res) { - * console.log(res); // [1, 2, 3, 4]; - * console.log(order); // [1, 4, 2, 3] - * }); - * - * @example - * - * var order = []; - * var tasks = { - * 'a': function(done) { - * setTimeout(function() { - * order.push(1); - * done(null, 1); - * }, 10); - * }, - * 'b': function(done) { - * setTimeout(function() { - * order.push(2); - * done(null, 2); - * }, 30); - * }, - * 'c': function(done) { - * setTimeout(function() { - * order.push(3); - * done(null, 3); - * }, 40); - * }, - * 'd': function(done) { - * setTimeout(function() { - * order.push(4); - * done(null, 4); - * }, 20); - * } - * }; - * async.parallel(tasks, function(err, res) { - * console.log(res); // { a: 1, b: 2, c: 3, d:4 } - * console.log(order); // [1, 4, 2, 3] - * }); - * - */ - var parallel = createParallel(arrayEachFunc, baseEachFunc); - - /** - * @memberof async - * @namespace applyEach - */ - var applyEach = createApplyEach(map); - - /** - * @memberof async - * @namespace applyEachSeries - */ - var applyEachSeries = createApplyEach(mapSeries); - - /** - * @memberof async - * @namespace log - */ - var log = createLogger('log'); - - /** - * @memberof async - * @namespace dir - */ - var dir = createLogger('dir'); - - /** - * @version 2.6.1 - * @namespace async - */ - var index = { - VERSION: '2.6.1', - - // Collections - each: each, - eachSeries: eachSeries, - eachLimit: eachLimit, - forEach: each, - forEachSeries: eachSeries, - forEachLimit: eachLimit, - eachOf: each, - eachOfSeries: eachSeries, - eachOfLimit: eachLimit, - forEachOf: each, - forEachOfSeries: eachSeries, - forEachOfLimit: eachLimit, - map: map, - mapSeries: mapSeries, - mapLimit: mapLimit, - mapValues: mapValues, - mapValuesSeries: mapValuesSeries, - mapValuesLimit: mapValuesLimit, - filter: filter, - filterSeries: filterSeries, - filterLimit: filterLimit, - select: filter, - selectSeries: filterSeries, - selectLimit: filterLimit, - reject: reject, - rejectSeries: rejectSeries, - rejectLimit: rejectLimit, - detect: detect, - detectSeries: detectSeries, - detectLimit: detectLimit, - find: detect, - findSeries: detectSeries, - findLimit: detectLimit, - pick: pick, - pickSeries: pickSeries, - pickLimit: pickLimit, - omit: omit, - omitSeries: omitSeries, - omitLimit: omitLimit, - reduce: reduce, - inject: reduce, - foldl: reduce, - reduceRight: reduceRight, - foldr: reduceRight, - transform: transform, - transformSeries: transformSeries, - transformLimit: transformLimit, - sortBy: sortBy, - sortBySeries: sortBySeries, - sortByLimit: sortByLimit, - some: some, - someSeries: someSeries, - someLimit: someLimit, - any: some, - anySeries: someSeries, - anyLimit: someLimit, - every: every, - everySeries: everySeries, - everyLimit: everyLimit, - all: every, - allSeries: everySeries, - allLimit: everyLimit, - concat: concat, - concatSeries: concatSeries, - concatLimit: concatLimit, - groupBy: groupBy, - groupBySeries: groupBySeries, - groupByLimit: groupByLimit, - - // Control Flow - parallel: parallel, - series: series, - parallelLimit: parallelLimit, - tryEach: tryEach, - waterfall: waterfall, - angelFall: angelFall, - angelfall: angelFall, - whilst: whilst, - doWhilst: doWhilst, - until: until, - doUntil: doUntil, - during: during, - doDuring: doDuring, - forever: forever, - compose: compose, - seq: seq, - applyEach: applyEach, - applyEachSeries: applyEachSeries, - queue: queue, - priorityQueue: priorityQueue, - cargo: cargo, - auto: auto, - autoInject: autoInject, - retry: retry, - retryable: retryable, - iterator: iterator, - times: times, - timesSeries: timesSeries, - timesLimit: timesLimit, - race: race, - - // Utils - apply: apply, - nextTick: asyncNextTick, - setImmediate: asyncSetImmediate, - memoize: memoize, - unmemoize: unmemoize, - ensureAsync: ensureAsync, - constant: constant, - asyncify: asyncify, - wrapSync: asyncify, - log: log, - dir: dir, - reflect: reflect, - reflectAll: reflectAll, - timeout: timeout, - createLogger: createLogger, - - // Mode - safe: safe, - fast: fast - }; - - exports['default'] = index; - baseEachSync( - index, - function(func, key) { - exports[key] = func; - }, - nativeKeys(index) - ); - - /** - * @private - */ - function createImmediate(safeMode) { - var delay = function delay(fn) { - var args = slice(arguments, 1); - setTimeout(function() { - fn.apply(null, args); - }); - }; - asyncSetImmediate = typeof setImmediate === func ? setImmediate : delay; - if (typeof process === obj && typeof process.nextTick === func) { - nextTick = /^v0.10/.test(process.version) ? asyncSetImmediate : process.nextTick; - asyncNextTick = /^v0/.test(process.version) ? asyncSetImmediate : process.nextTick; - } else { - asyncNextTick = nextTick = asyncSetImmediate; - } - if (safeMode === false) { - nextTick = function(cb) { - cb(); - }; - } - } - - /* sync functions based on lodash */ - - /** - * Converts `arguments` to an array. - * - * @private - * @param {Array} array = The array to slice. - */ - function createArray(array) { - var index = -1; - var size = array.length; - var result = Array(size); - - while (++index < size) { - result[index] = array[index]; - } - return result; - } - - /** - * Create an array from `start` - * - * @private - * @param {Array} array - The array to slice. - * @param {number} start - The start position. - */ - function slice(array, start) { - var end = array.length; - var index = -1; - var size = end - start; - if (size <= 0) { - return []; - } - var result = Array(size); - - while (++index < size) { - result[index] = array[index + start]; - } - return result; - } - - /** - * @private - * @param {Object} object - */ - function objectClone(object) { - var keys = nativeKeys(object); - var size = keys.length; - var index = -1; - var result = {}; - - while (++index < size) { - var key = keys[index]; - result[key] = object[key]; - } - return result; - } - - /** - * Create an array with all falsey values removed. - * - * @private - * @param {Array} array - The array to compact. - */ - function compact(array) { - var index = -1; - var size = array.length; - var result = []; - - while (++index < size) { - var value = array[index]; - if (value) { - result[result.length] = value; - } - } - return result; - } - - /** - * Create an array of reverse sequence. - * - * @private - * @param {Array} array - The array to reverse. - */ - function reverse(array) { - var index = -1; - var size = array.length; - var result = Array(size); - var resIndex = size; - - while (++index < size) { - result[--resIndex] = array[index]; - } - return result; - } - - /** - * Checks if key exists in object property. - * - * @private - * @param {Object} object - The object to inspect. - * @param {string} key - The key to check. - */ - function has(object, key) { - return object.hasOwnProperty(key); - } - - /** - * Check if target exists in array. - * @private - * @param {Array} array - * @param {*} target - */ - function notInclude(array, target) { - var index = -1; - var size = array.length; - - while (++index < size) { - if (array[index] === target) { - return false; - } - } - return true; - } - - /** - * @private - * @param {Array} array - The array to iterate over. - * @param {Function} iterator - The function invoked per iteration. - */ - function arrayEachSync(array, iterator) { - var index = -1; - var size = array.length; - - while (++index < size) { - iterator(array[index], index); - } - return array; - } - - /** - * @private - * @param {Object} object - The object to iterate over. - * @param {Function} iterator - The function invoked per iteration. - * @param {Array} keys - */ - function baseEachSync(object, iterator, keys) { - var index = -1; - var size = keys.length; - - while (++index < size) { - var key = keys[index]; - iterator(object[key], key); - } - return object; - } - - /** - * @private - * @param {number} n - * @param {Function} iterator - */ - function timesSync(n, iterator) { - var index = -1; - while (++index < n) { - iterator(index); - } - } - - /** - * @private - * @param {Array} array - * @param {number[]} criteria - */ - function sortByCriteria(array, criteria) { - var l = array.length; - var indices = Array(l); - var i; - for (i = 0; i < l; i++) { - indices[i] = i; - } - quickSort(criteria, 0, l - 1, indices); - var result = Array(l); - for (var n = 0; n < l; n++) { - i = indices[n]; - result[n] = i === undefined ? array[n] : array[i]; - } - return result; - } - - function partition(array, i, j, mid, indices) { - var l = i; - var r = j; - while (l <= r) { - i = l; - while (l < r && array[l] < mid) { - l++; - } - while (r >= i && array[r] >= mid) { - r--; - } - if (l > r) { - break; - } - swap(array, indices, l++, r--); - } - return l; - } - - function swap(array, indices, l, r) { - var n = array[l]; - array[l] = array[r]; - array[r] = n; - var i = indices[l]; - indices[l] = indices[r]; - indices[r] = i; - } - - function quickSort(array, i, j, indices) { - if (i === j) { - return; - } - var k = i; - while (++k <= j && array[i] === array[k]) { - var l = k - 1; - if (indices[l] > indices[k]) { - var index = indices[l]; - indices[l] = indices[k]; - indices[k] = index; - } - } - if (k > j) { - return; - } - var p = array[i] > array[k] ? i : k; - k = partition(array, i, j, array[p], indices); - quickSort(array, i, k - 1, indices); - quickSort(array, k, j, indices); - } - - /** - * @Private - */ - function makeConcatResult(array) { - var result = []; - arrayEachSync(array, function(value) { - if (value === noop) { - return; - } - if (isArray(value)) { - nativePush.apply(result, value); - } else { - result.push(value); - } - }); - return result; - } - - /* async functions */ - - /** - * @private - */ - function arrayEach(array, iterator, callback) { - var index = -1; - var size = array.length; - - if (iterator.length === 3) { - while (++index < size) { - iterator(array[index], index, onlyOnce(callback)); - } - } else { - while (++index < size) { - iterator(array[index], onlyOnce(callback)); - } - } - } - - /** - * @private - */ - function baseEach(object, iterator, callback, keys) { - var key; - var index = -1; - var size = keys.length; - - if (iterator.length === 3) { - while (++index < size) { - key = keys[index]; - iterator(object[key], key, onlyOnce(callback)); - } - } else { - while (++index < size) { - iterator(object[keys[index]], onlyOnce(callback)); - } - } - } - - /** - * @private - */ - function symbolEach(collection, iterator, callback) { - var iter = collection[iteratorSymbol](); - var index = 0; - var item; - if (iterator.length === 3) { - while ((item = iter.next()).done === false) { - iterator(item.value, index++, onlyOnce(callback)); - } - } else { - while ((item = iter.next()).done === false) { - index++; - iterator(item.value, onlyOnce(callback)); - } - } - return index; - } - - /** - * @private - */ - function arrayEachResult(array, result, iterator, callback) { - var index = -1; - var size = array.length; - - if (iterator.length === 4) { - while (++index < size) { - iterator(result, array[index], index, onlyOnce(callback)); - } - } else { - while (++index < size) { - iterator(result, array[index], onlyOnce(callback)); - } - } - } - - /** - * @private - */ - function baseEachResult(object, result, iterator, callback, keys) { - var key; - var index = -1; - var size = keys.length; - - if (iterator.length === 4) { - while (++index < size) { - key = keys[index]; - iterator(result, object[key], key, onlyOnce(callback)); - } - } else { - while (++index < size) { - iterator(result, object[keys[index]], onlyOnce(callback)); - } - } - } - - /** - * @private - */ - function symbolEachResult(collection, result, iterator, callback) { - var item; - var index = 0; - var iter = collection[iteratorSymbol](); - - if (iterator.length === 4) { - while ((item = iter.next()).done === false) { - iterator(result, item.value, index++, onlyOnce(callback)); - } - } else { - while ((item = iter.next()).done === false) { - index++; - iterator(result, item.value, onlyOnce(callback)); - } - } - return index; - } - - /** - * @private - */ - function arrayEachFunc(array, createCallback) { - var index = -1; - var size = array.length; - - while (++index < size) { - array[index](createCallback(index)); - } - } - - /** - * @private - */ - function baseEachFunc(object, createCallback, keys) { - var key; - var index = -1; - var size = keys.length; - - while (++index < size) { - key = keys[index]; - object[key](createCallback(key)); - } - } - - /** - * @private - */ - function arrayEachIndex(array, iterator, createCallback) { - var index = -1; - var size = array.length; - - if (iterator.length === 3) { - while (++index < size) { - iterator(array[index], index, createCallback(index)); - } - } else { - while (++index < size) { - iterator(array[index], createCallback(index)); - } - } - } - - /** - * @private - */ - function baseEachIndex(object, iterator, createCallback, keys) { - var key; - var index = -1; - var size = keys.length; - - if (iterator.length === 3) { - while (++index < size) { - key = keys[index]; - iterator(object[key], key, createCallback(index)); - } - } else { - while (++index < size) { - iterator(object[keys[index]], createCallback(index)); - } - } - } - - /** - * @private - */ - function symbolEachIndex(collection, iterator, createCallback) { - var item; - var index = 0; - var iter = collection[iteratorSymbol](); - - if (iterator.length === 3) { - while ((item = iter.next()).done === false) { - iterator(item.value, index, createCallback(index++)); - } - } else { - while ((item = iter.next()).done === false) { - iterator(item.value, createCallback(index++)); - } - } - return index; - } - - /** - * @private - */ - function baseEachKey(object, iterator, createCallback, keys) { - var key; - var index = -1; - var size = keys.length; - - if (iterator.length === 3) { - while (++index < size) { - key = keys[index]; - iterator(object[key], key, createCallback(key)); - } - } else { - while (++index < size) { - key = keys[index]; - iterator(object[key], createCallback(key)); - } - } - } - - /** - * @private - */ - function symbolEachKey(collection, iterator, createCallback) { - var item; - var index = 0; - var iter = collection[iteratorSymbol](); - - if (iterator.length === 3) { - while ((item = iter.next()).done === false) { - iterator(item.value, index, createCallback(index++)); - } - } else { - while ((item = iter.next()).done === false) { - iterator(item.value, createCallback(index++)); - } - } - return index; - } - - /** - * @private - */ - function arrayEachValue(array, iterator, createCallback) { - var value; - var index = -1; - var size = array.length; - - if (iterator.length === 3) { - while (++index < size) { - value = array[index]; - iterator(value, index, createCallback(value)); - } - } else { - while (++index < size) { - value = array[index]; - iterator(value, createCallback(value)); - } - } - } - - /** - * @private - */ - function baseEachValue(object, iterator, createCallback, keys) { - var key, value; - var index = -1; - var size = keys.length; - - if (iterator.length === 3) { - while (++index < size) { - key = keys[index]; - value = object[key]; - iterator(value, key, createCallback(value)); - } - } else { - while (++index < size) { - value = object[keys[index]]; - iterator(value, createCallback(value)); - } - } - } - - /** - * @private - */ - function symbolEachValue(collection, iterator, createCallback) { - var value, item; - var index = 0; - var iter = collection[iteratorSymbol](); - - if (iterator.length === 3) { - while ((item = iter.next()).done === false) { - value = item.value; - iterator(value, index++, createCallback(value)); - } - } else { - while ((item = iter.next()).done === false) { - index++; - value = item.value; - iterator(value, createCallback(value)); - } - } - return index; - } - - /** - * @private - */ - function arrayEachIndexValue(array, iterator, createCallback) { - var value; - var index = -1; - var size = array.length; - - if (iterator.length === 3) { - while (++index < size) { - value = array[index]; - iterator(value, index, createCallback(index, value)); - } - } else { - while (++index < size) { - value = array[index]; - iterator(value, createCallback(index, value)); - } - } - } - - /** - * @private - */ - function baseEachIndexValue(object, iterator, createCallback, keys) { - var key, value; - var index = -1; - var size = keys.length; - - if (iterator.length === 3) { - while (++index < size) { - key = keys[index]; - value = object[key]; - iterator(value, key, createCallback(index, value)); - } - } else { - while (++index < size) { - value = object[keys[index]]; - iterator(value, createCallback(index, value)); - } - } - } - - /** - * @private - */ - function symbolEachIndexValue(collection, iterator, createCallback) { - var value, item; - var index = 0; - var iter = collection[iteratorSymbol](); - - if (iterator.length === 3) { - while ((item = iter.next()).done === false) { - value = item.value; - iterator(value, index, createCallback(index++, value)); - } - } else { - while ((item = iter.next()).done === false) { - value = item.value; - iterator(value, createCallback(index++, value)); - } - } - return index; - } - - /** - * @private - */ - function baseEachKeyValue(object, iterator, createCallback, keys) { - var key, value; - var index = -1; - var size = keys.length; - - if (iterator.length === 3) { - while (++index < size) { - key = keys[index]; - value = object[key]; - iterator(value, key, createCallback(key, value)); - } - } else { - while (++index < size) { - key = keys[index]; - value = object[key]; - iterator(value, createCallback(key, value)); - } - } - } - - /** - * @private - */ - function symbolEachKeyValue(collection, iterator, createCallback) { - var value, item; - var index = 0; - var iter = collection[iteratorSymbol](); - - if (iterator.length === 3) { - while ((item = iter.next()).done === false) { - value = item.value; - iterator(value, index, createCallback(index++, value)); - } - } else { - while ((item = iter.next()).done === false) { - value = item.value; - iterator(value, createCallback(index++, value)); - } - } - return index; - } - - /** - * @private - * @param {Function} func - */ - function onlyOnce(func) { - return function(err, res) { - var fn = func; - func = throwError; - fn(err, res); - }; - } - - /** - * @private - * @param {Function} func - */ - function once(func) { - return function(err, res) { - var fn = func; - func = noop; - fn(err, res); - }; - } - - /** - * @private - * @param {Function} arrayEach - * @param {Function} baseEach - */ - function createEach(arrayEach, baseEach, symbolEach) { - return function each(collection, iterator, callback) { - callback = once(callback || noop); - var size, keys; - var completed = 0; - if (isArray(collection)) { - size = collection.length; - arrayEach(collection, iterator, done); - } else if (!collection) { - } else if (iteratorSymbol && collection[iteratorSymbol]) { - size = symbolEach(collection, iterator, done); - size && size === completed && callback(null); - } else if (typeof collection === obj) { - keys = nativeKeys(collection); - size = keys.length; - baseEach(collection, iterator, done, keys); - } - if (!size) { - callback(null); - } - - function done(err, bool) { - if (err) { - callback = once(callback); - callback(err); - } else if (++completed === size) { - callback(null); - } else if (bool === false) { - callback = once(callback); - callback(null); - } - } - }; - } - - /** - * @private - * @param {Function} arrayEach - * @param {Function} baseEach - * @param {Function} symbolEach - */ - function createMap(arrayEach, baseEach, symbolEach, useArray) { - var init, clone; - if (useArray) { - init = Array; - clone = createArray; - } else { - init = function() { - return {}; - }; - clone = objectClone; - } - - return function(collection, iterator, callback) { - callback = callback || noop; - var size, keys, result; - var completed = 0; - - if (isArray(collection)) { - size = collection.length; - result = init(size); - arrayEach(collection, iterator, createCallback); - } else if (!collection) { - } else if (iteratorSymbol && collection[iteratorSymbol]) { - // TODO: size could be changed - result = init(0); - size = symbolEach(collection, iterator, createCallback); - size && size === completed && callback(null, result); - } else if (typeof collection === obj) { - keys = nativeKeys(collection); - size = keys.length; - result = init(size); - baseEach(collection, iterator, createCallback, keys); - } - if (!size) { - callback(null, init()); - } - - function createCallback(key) { - return function done(err, res) { - if (key === null) { - throwError(); - } - if (err) { - key = null; - callback = once(callback); - callback(err, clone(result)); - return; - } - result[key] = res; - key = null; - if (++completed === size) { - callback(null, result); - } - }; - } - }; - } - - /** - * @private - * @param {Function} arrayEach - * @param {Function} baseEach - * @param {Function} symbolEach - * @param {boolean} bool - */ - function createFilter(arrayEach, baseEach, symbolEach, bool) { - return function(collection, iterator, callback) { - callback = callback || noop; - var size, keys, result; - var completed = 0; - - if (isArray(collection)) { - size = collection.length; - result = Array(size); - arrayEach(collection, iterator, createCallback); - } else if (!collection) { - } else if (iteratorSymbol && collection[iteratorSymbol]) { - result = []; - size = symbolEach(collection, iterator, createCallback); - size && size === completed && callback(null, compact(result)); - } else if (typeof collection === obj) { - keys = nativeKeys(collection); - size = keys.length; - result = Array(size); - baseEach(collection, iterator, createCallback, keys); - } - if (!size) { - return callback(null, []); - } - - function createCallback(index, value) { - return function done(err, res) { - if (index === null) { - throwError(); - } - if (err) { - index = null; - callback = once(callback); - callback(err); - return; - } - if (!!res === bool) { - result[index] = value; - } - index = null; - if (++completed === size) { - callback(null, compact(result)); - } - }; - } - }; - } - - /** - * @private - * @param {boolean} bool - */ - function createFilterSeries(bool) { - return function(collection, iterator, callback) { - callback = onlyOnce(callback || noop); - var size, key, value, keys, iter, item, iterate; - var sync = false; - var completed = 0; - var result = []; - - if (isArray(collection)) { - size = collection.length; - iterate = iterator.length === 3 ? arrayIteratorWithIndex : arrayIterator; - } else if (!collection) { - } else if (iteratorSymbol && collection[iteratorSymbol]) { - size = Infinity; - iter = collection[iteratorSymbol](); - iterate = iterator.length === 3 ? symbolIteratorWithKey : symbolIterator; - } else if (typeof collection === obj) { - keys = nativeKeys(collection); - size = keys.length; - iterate = iterator.length === 3 ? objectIteratorWithKey : objectIterator; - } - if (!size) { - return callback(null, []); - } - iterate(); - - function arrayIterator() { - value = collection[completed]; - iterator(value, done); - } - - function arrayIteratorWithIndex() { - value = collection[completed]; - iterator(value, completed, done); - } - - function symbolIterator() { - item = iter.next(); - value = item.value; - item.done ? callback(null, result) : iterator(value, done); - } - - function symbolIteratorWithKey() { - item = iter.next(); - value = item.value; - item.done ? callback(null, result) : iterator(value, completed, done); - } - - function objectIterator() { - key = keys[completed]; - value = collection[key]; - iterator(value, done); - } - - function objectIteratorWithKey() { - key = keys[completed]; - value = collection[key]; - iterator(value, key, done); - } - - function done(err, res) { - if (err) { - callback(err); - return; - } - if (!!res === bool) { - result[result.length] = value; - } - if (++completed === size) { - iterate = throwError; - callback(null, result); - } else if (sync) { - nextTick(iterate); - } else { - sync = true; - iterate(); - } - sync = false; - } - }; - } - - /** - * @private - * @param {boolean} bool - */ - function createFilterLimit(bool) { - return function(collection, limit, iterator, callback) { - callback = callback || noop; - var size, index, key, value, keys, iter, item, iterate, result; - var sync = false; - var started = 0; - var completed = 0; - - if (isArray(collection)) { - size = collection.length; - iterate = iterator.length === 3 ? arrayIteratorWithIndex : arrayIterator; - } else if (!collection) { - } else if (iteratorSymbol && collection[iteratorSymbol]) { - size = Infinity; - result = []; - iter = collection[iteratorSymbol](); - iterate = iterator.length === 3 ? symbolIteratorWithKey : symbolIterator; - } else if (typeof collection === obj) { - keys = nativeKeys(collection); - size = keys.length; - iterate = iterator.length === 3 ? objectIteratorWithKey : objectIterator; - } - if (!size || isNaN(limit) || limit < 1) { - return callback(null, []); - } - result = result || Array(size); - timesSync(limit > size ? size : limit, iterate); - - function arrayIterator() { - index = started++; - if (index < size) { - value = collection[index]; - iterator(value, createCallback(value, index)); - } - } - - function arrayIteratorWithIndex() { - index = started++; - if (index < size) { - value = collection[index]; - iterator(value, index, createCallback(value, index)); - } - } - - function symbolIterator() { - item = iter.next(); - if (item.done === false) { - value = item.value; - iterator(value, createCallback(value, started++)); - } else if (completed === started && iterator !== noop) { - iterator = noop; - callback(null, compact(result)); - } - } - - function symbolIteratorWithKey() { - item = iter.next(); - if (item.done === false) { - value = item.value; - iterator(value, started, createCallback(value, started++)); - } else if (completed === started && iterator !== noop) { - iterator = noop; - callback(null, compact(result)); - } - } - - function objectIterator() { - index = started++; - if (index < size) { - value = collection[keys[index]]; - iterator(value, createCallback(value, index)); - } - } - - function objectIteratorWithKey() { - index = started++; - if (index < size) { - key = keys[index]; - value = collection[key]; - iterator(value, key, createCallback(value, index)); - } - } - - function createCallback(value, index) { - return function(err, res) { - if (index === null) { - throwError(); - } - if (err) { - index = null; - iterate = noop; - callback = once(callback); - callback(err); - return; - } - if (!!res === bool) { - result[index] = value; - } - index = null; - if (++completed === size) { - callback = onlyOnce(callback); - callback(null, compact(result)); - } else if (sync) { - nextTick(iterate); - } else { - sync = true; - iterate(); - } - sync = false; - }; - } - }; - } - - /** - * @memberof async - * @namespace eachSeries - * @param {Array|Object} collection - * @param {Function} iterator - * @param {Function} callback - * @example - * - * // array - * var order = []; - * var array = [1, 3, 2]; - * var iterator = function(num, done) { - * setTimeout(function() { - * order.push(num); - * done(); - * }, num * 10); - * }; - * async.eachSeries(array, iterator, function(err, res) { - * console.log(res); // undefined - * console.log(order); // [1, 3, 2] - * }); - * - * @example - * - * // array with index - * var order = []; - * var array = [1, 3, 2]; - * var iterator = function(num, index, done) { - * setTimeout(function() { - * order.push([num, index]); - * done(); - * }, num * 10); - * }; - * async.eachSeries(array, iterator, function(err, res) { - * console.log(res); // undefined - * console.log(order); // [[1, 0], [3, 1], [2, 2]] - * }); - * - * @example - * - * // object - * var order = []; - * var object = { a: 1, b: 3, c: 2 }; - * var iterator = function(num, done) { - * setTimeout(function() { - * order.push(num); - * done(); - * }, num * 10); - * }; - * async.eachSeries(object, iterator, function(err, res) { - * console.log(res); // undefined - * console.log(order); // [1, 3, 2] - * }); - * - * @example - * - * // object with key - * var order = []; - * var object = { a: 1, b: 3, c: 2 }; - * var iterator = function(num, key, done) { - * setTimeout(function() { - * order.push([num, key]); - * done(); - * }, num * 10); - * }; - * async.eachSeries(object, iterator, function(err, res) { - * console.log(res); // undefined - * console.log(order); // [[1, 'a'], [3, 'b'], [2, 'b']] - * }); - * - * @example - * - * // break - * var order = []; - * var array = [1, 3, 2]; - * var iterator = function(num, done) { - * setTimeout(function() { - * order.push(num); - * done(null, num !== 3); - * }, num * 10); - * }; - * async.eachSeries(array, iterator, function(err, res) { - * console.log(res); // undefined - * console.log(order); // [1, 3] - * }); - */ - function eachSeries(collection, iterator, callback) { - callback = onlyOnce(callback || noop); - var size, key, keys, iter, item, iterate; - var sync = false; - var completed = 0; - - if (isArray(collection)) { - size = collection.length; - iterate = iterator.length === 3 ? arrayIteratorWithIndex : arrayIterator; - } else if (!collection) { - } else if (iteratorSymbol && collection[iteratorSymbol]) { - size = Infinity; - iter = collection[iteratorSymbol](); - iterate = iterator.length === 3 ? symbolIteratorWithKey : symbolIterator; - } else if (typeof collection === obj) { - keys = nativeKeys(collection); - size = keys.length; - iterate = iterator.length === 3 ? objectIteratorWithKey : objectIterator; - } - if (!size) { - return callback(null); - } - iterate(); - - function arrayIterator() { - iterator(collection[completed], done); - } - - function arrayIteratorWithIndex() { - iterator(collection[completed], completed, done); - } - - function symbolIterator() { - item = iter.next(); - item.done ? callback(null) : iterator(item.value, done); - } - - function symbolIteratorWithKey() { - item = iter.next(); - item.done ? callback(null) : iterator(item.value, completed, done); - } - - function objectIterator() { - iterator(collection[keys[completed]], done); - } - - function objectIteratorWithKey() { - key = keys[completed]; - iterator(collection[key], key, done); - } - - function done(err, bool) { - if (err) { - callback(err); - } else if (++completed === size || bool === false) { - iterate = throwError; - callback(null); - } else if (sync) { - nextTick(iterate); - } else { - sync = true; - iterate(); - } - sync = false; - } - } - - /** - * @memberof async - * @namespace eachLimit - * @param {Array|Object} collection - * @param {number} limit - limit >= 1 - * @param {Function} iterator - * @param {Function} callback - * @example - * - * // array - * var order = []; - * var array = [1, 5, 3, 4, 2]; - * var iterator = function(num, done) { - * setTimeout(function() { - * order.push(num); - * done(); - * }, num * 10); - * }; - * async.eachLimit(array, 2, iterator, function(err, res) { - * console.log(res); // undefined - * console.log(order); // [1, 3, 5, 2, 4] - * }); - * - * @example - * - * // array with index - * var order = []; - * var array = [1, 5, 3, 4, 2]; - * var iterator = function(num, index, done) { - * setTimeout(function() { - * order.push([num, index]); - * done(); - * }, num * 10); - * }; - * async.eachLimit(array, 2, iterator, function(err, res) { - * console.log(res); // undefined - * console.log(order); // [[1, 0], [3, 2], [5, 1], [2, 4], [4, 3]] - * }); - * - * @example - * - * // object - * var order = []; - * var object = { a: 1, b: 5, c: 3, d: 4, e: 2 }; - * var iterator = function(num, done) { - * setTimeout(function() { - * order.push(num); - * done(); - * }, num * 10); - * }; - * async.eachLimit(object, 2, iterator, function(err, res) { - * console.log(res); // undefined - * console.log(order); // [1, 3, 5, 2, 4] - * }); - * - * @example - * - * // object with key - * var order = []; - * var object = { a: 1, b: 5, c: 3, d: 4, e: 2 }; - * var iterator = function(num, key, done) { - * setTimeout(function() { - * order.push([num, key]); - * done(); - * }, num * 10); - * }; - * async.eachLimit(object, 2, iterator, function(err, res) { - * console.log(res); // undefined - * console.log(order); // [[1, 'a'], [3, 'c'], [5, 'b'], [2, 'e'], [4, 'd']] - * }); - * - * @example - * - * // break - * var order = []; - * var array = [1, 5, 3, 4, 2]; - * var iterator = function(num, done) { - * setTimeout(function() { - * order.push(num); - * done(null, num !== 5); - * }, num * 10); - * }; - * async.eachLimit(array, 2, iterator, function(err, res) { - * console.log(res); // undefined - * console.log(order); // [1, 3, 5] - * }); - * - */ - function eachLimit(collection, limit, iterator, callback) { - callback = callback || noop; - var size, index, key, keys, iter, item, iterate; - var sync = false; - var started = 0; - var completed = 0; - - if (isArray(collection)) { - size = collection.length; - iterate = iterator.length === 3 ? arrayIteratorWithIndex : arrayIterator; - } else if (!collection) { - } else if (iteratorSymbol && collection[iteratorSymbol]) { - size = Infinity; - iter = collection[iteratorSymbol](); - iterate = iterator.length === 3 ? symbolIteratorWithKey : symbolIterator; - } else if (typeof collection === obj) { - keys = nativeKeys(collection); - size = keys.length; - iterate = iterator.length === 3 ? objectIteratorWithKey : objectIterator; - } else { - return callback(null); - } - if (!size || isNaN(limit) || limit < 1) { - return callback(null); - } - timesSync(limit > size ? size : limit, iterate); - - function arrayIterator() { - if (started < size) { - iterator(collection[started++], done); - } - } - - function arrayIteratorWithIndex() { - index = started++; - if (index < size) { - iterator(collection[index], index, done); - } - } - - function symbolIterator() { - item = iter.next(); - if (item.done === false) { - started++; - iterator(item.value, done); - } else if (completed === started && iterator !== noop) { - iterator = noop; - callback(null); - } - } - - function symbolIteratorWithKey() { - item = iter.next(); - if (item.done === false) { - iterator(item.value, started++, done); - } else if (completed === started && iterator !== noop) { - iterator = noop; - callback(null); - } - } - - function objectIterator() { - if (started < size) { - iterator(collection[keys[started++]], done); - } - } - - function objectIteratorWithKey() { - index = started++; - if (index < size) { - key = keys[index]; - iterator(collection[key], key, done); - } - } - - function done(err, bool) { - if (err || bool === false) { - iterate = noop; - callback = once(callback); - callback(err); - } else if (++completed === size) { - iterator = noop; - iterate = throwError; - callback = onlyOnce(callback); - callback(null); - } else if (sync) { - nextTick(iterate); - } else { - sync = true; - iterate(); - } - sync = false; - } - } - - /** - * @memberof async - * @namespace mapSeries - * @param {Array|Object} collection - * @param {Function} iterator - * @param {Function} callback - * @example - * - * // array - * var order = []; - * var array = [1, 3, 2]; - * var iterator = function(num, done) { - * setTimeout(function() { - * order.push(num); - * done(null, num); - * }, num * 10); - * }; - * async.mapSeries(array, iterator, function(err, res) { - * console.log(res); // [1, 3, 2]; - * console.log(order); // [1, 3, 2] - * }); - * - * @example - * - * // array with index - * var order = []; - * var array = [1, 3, 2]; - * var iterator = function(num, index, done) { - * setTimeout(function() { - * order.push([num, index]); - * done(null, num); - * }, num * 10); - * }; - * async.mapSeries(array, iterator, function(err, res) { - * console.log(res); // [1, 3, 2] - * console.log(order); // [[1, 0], [3, 1], [2, 2]] - * }); - * - * @example - * - * // object - * var order = []; - * var object = { a: 1, b: 3, c: 2 }; - * var iterator = function(num, done) { - * setTimeout(function() { - * order.push(num); - * done(null, num); - * }, num * 10); - * }; - * async.mapSeries(object, iterator, function(err, res) { - * console.log(res); // [1, 3, 2] - * console.log(order); // [1, 3, 2] - * }); - * - * @example - * - * // object with key - * var order = []; - * var object = { a: 1, b: 3, c: 2 }; - * var iterator = function(num, key, done) { - * setTimeout(function() { - * order.push([num, key]); - * done(null, num); - * }, num * 10); - * }; - * async.mapSeries(object, iterator, function(err, res) { - * console.log(res); // [1, 3, 2] - * console.log(order); // [[1, 'a'], [3, 'b'], [2, 'c']] - * }); - * - */ - function mapSeries(collection, iterator, callback) { - callback = callback || noop; - var size, key, keys, iter, item, result, iterate; - var sync = false; - var completed = 0; - - if (isArray(collection)) { - size = collection.length; - iterate = iterator.length === 3 ? arrayIteratorWithIndex : arrayIterator; - } else if (!collection) { - } else if (iteratorSymbol && collection[iteratorSymbol]) { - size = Infinity; - result = []; - iter = collection[iteratorSymbol](); - iterate = iterator.length === 3 ? symbolIteratorWithKey : symbolIterator; - } else if (typeof collection === obj) { - keys = nativeKeys(collection); - size = keys.length; - iterate = iterator.length === 3 ? objectIteratorWithKey : objectIterator; - } - if (!size) { - return callback(null, []); - } - result = result || Array(size); - iterate(); - - function arrayIterator() { - iterator(collection[completed], done); - } - - function arrayIteratorWithIndex() { - iterator(collection[completed], completed, done); - } - - function symbolIterator() { - item = iter.next(); - item.done ? callback(null, result) : iterator(item.value, done); - } - - function symbolIteratorWithKey() { - item = iter.next(); - item.done ? callback(null, result) : iterator(item.value, completed, done); - } - - function objectIterator() { - iterator(collection[keys[completed]], done); - } - - function objectIteratorWithKey() { - key = keys[completed]; - iterator(collection[key], key, done); - } - - function done(err, res) { - if (err) { - iterate = throwError; - callback = onlyOnce(callback); - callback(err, createArray(result)); - return; - } - result[completed] = res; - if (++completed === size) { - iterate = throwError; - callback(null, result); - callback = throwError; - } else if (sync) { - nextTick(iterate); - } else { - sync = true; - iterate(); - } - sync = false; - } - } - - /** - * @memberof async - * @namespace mapLimit - * @param {Array|Object} collection - * @param {number} limit - limit >= 1 - * @param {Function} iterator - * @param {Function} callback - * @example - * - * // array - * var order = []; - * var array = [1, 5, 3, 4, 2]; - * var iterator = function(num, done) { - * setTimeout(function() { - * order.push(num); - * done(null, num); - * }, num * 10); - * }; - * async.mapLimit(array, 2, iterator, function(err, res) { - * console.log(res); // [1, 5, 3, 4, 2] - * console.log(order); // [1, 3, 5, 2, 4] - * }); - * - * @example - * - * // array with index - * var order = []; - * var array = [1, 5, 3, 4, 2]; - * var iterator = function(num, index, done) { - * setTimeout(function() { - * order.push([num, index]); - * done(null, num); - * }, num * 10); - * }; - * async.mapLimit(array, 2, iterator, function(err, res) { - * console.log(res); // [1, 5, 3, 4, 2] - * console.log(order); // [[1, 0], [3, 2], [5, 1], [2, 4], [4, 3]] - * }); - * - * @example - * - * // object - * var order = []; - * var object = { a: 1, b: 5, c: 3, d: 4, e: 2 }; - * var iterator = function(num, done) { - * setTimeout(function() { - * order.push(num); - * done(null, num); - * }, num * 10); - * }; - * async.mapLimit(object, 2, iterator, function(err, res) { - * console.log(res); // [1, 5, 3, 4, 2] - * console.log(order); // [1, 3, 5, 2, 4] - * }); - * - * @example - * - * // object with key - * var order = []; - * var object = { a: 1, b: 5, c: 3, d: 4, e: 2 }; - * var iterator = function(num, key, done) { - * setTimeout(function() { - * order.push([num, key]); - * done(null, num); - * }, num * 10); - * }; - * async.mapLimit(object, 2, iterator, function(err, res) { - * console.log(res); // [1, 5, 3, 4, 2] - * console.log(order); // [[1, 'a'], [3, 'c'], [5, 'b'], [2, 'e'], [4, 'd']] - * }); - * - */ - function mapLimit(collection, limit, iterator, callback) { - callback = callback || noop; - var size, index, key, keys, iter, item, result, iterate; - var sync = false; - var started = 0; - var completed = 0; - - if (isArray(collection)) { - size = collection.length; - iterate = iterator.length === 3 ? arrayIteratorWithIndex : arrayIterator; - } else if (!collection) { - } else if (iteratorSymbol && collection[iteratorSymbol]) { - size = Infinity; - result = []; - iter = collection[iteratorSymbol](); - iterate = iterator.length === 3 ? symbolIteratorWithKey : symbolIterator; - } else if (typeof collection === obj) { - keys = nativeKeys(collection); - size = keys.length; - iterate = iterator.length === 3 ? objectIteratorWithKey : objectIterator; - } - if (!size || isNaN(limit) || limit < 1) { - return callback(null, []); - } - result = result || Array(size); - timesSync(limit > size ? size : limit, iterate); - - function arrayIterator() { - index = started++; - if (index < size) { - iterator(collection[index], createCallback(index)); - } - } - - function arrayIteratorWithIndex() { - index = started++; - if (index < size) { - iterator(collection[index], index, createCallback(index)); - } - } - - function symbolIterator() { - item = iter.next(); - if (item.done === false) { - iterator(item.value, createCallback(started++)); - } else if (completed === started && iterator !== noop) { - iterator = noop; - callback(null, result); - } - } - - function symbolIteratorWithKey() { - item = iter.next(); - if (item.done === false) { - iterator(item.value, started, createCallback(started++)); - } else if (completed === started && iterator !== noop) { - iterator = noop; - callback(null, result); - } - } - - function objectIterator() { - index = started++; - if (index < size) { - iterator(collection[keys[index]], createCallback(index)); - } - } - - function objectIteratorWithKey() { - index = started++; - if (index < size) { - key = keys[index]; - iterator(collection[key], key, createCallback(index)); - } - } - - function createCallback(index) { - return function(err, res) { - if (index === null) { - throwError(); - } - if (err) { - index = null; - iterate = noop; - callback = once(callback); - callback(err, createArray(result)); - return; - } - result[index] = res; - index = null; - if (++completed === size) { - iterate = throwError; - callback(null, result); - callback = throwError; - } else if (sync) { - nextTick(iterate); - } else { - sync = true; - iterate(); - } - sync = false; - }; - } - } - - /** - * @memberof async - * @namespace mapValuesSeries - * @param {Array|Object} collection - * @param {Function} iterator - * @param {Function} callback - * @example - * - * // array - * var order = []; - * var array = [1, 3, 2]; - * var iterator = function(num, done) { - * setTimeout(function() { - * order.push(num); - * done(null, num); - * }, num * 10); - * }; - * async.mapValuesSeries(array, iterator, function(err, res) { - * console.log(res); // { '0': 1, '1': 3, '2': 2 } - * console.log(order); // [1, 3, 2] - * }); - * - * @example - * - * // array with index - * var order = []; - * var array = [1, 3, 2]; - * var iterator = function(num, index, done) { - * setTimeout(function() { - * order.push([num, index]); - * done(null, num); - * }, num * 10); - * }; - * async.mapValuesSeries(array, iterator, function(err, res) { - * console.log(res); // { '0': 1, '1': 3, '2': 2 } - * console.log(order); // [[1, 0], [3, 1], [2, 2]] - * }); - * - * @example - * - * // object - * var order = []; - * var object = { a: 1, b: 3, c: 2 }; - * var iterator = function(num, done) { - * setTimeout(function() { - * order.push(num); - * done(null, num); - * }, num * 10); - * }; - * async.mapValuesSeries(object, iterator, function(err, res) { - * console.log(res); // { a: 1, b: 3, c: 2 } - * console.log(order); // [1, 3, 2] - * }); - * - * @example - * - * // object with key - * var order = []; - * var object = { a: 1, b: 3, c: 2 }; - * var iterator = function(num, key, done) { - * setTimeout(function() { - * order.push([num, key]); - * done(null, num); - * }, num * 10); - * }; - * async.mapValuesSeries(object, iterator, function(err, res) { - * console.log(res); // { a: 1, b: 3, c: 2 } - * console.log(order); // [[1, 'a'], [3, 'b'], [2, 'c']] - * }); - * - */ - function mapValuesSeries(collection, iterator, callback) { - callback = callback || noop; - var size, key, keys, iter, item, iterate; - var sync = false; - var result = {}; - var completed = 0; - - if (isArray(collection)) { - size = collection.length; - iterate = iterator.length === 3 ? arrayIteratorWithIndex : arrayIterator; - } else if (!collection) { - } else if (iteratorSymbol && collection[iteratorSymbol]) { - size = Infinity; - iter = collection[iteratorSymbol](); - iterate = iterator.length === 3 ? symbolIteratorWithKey : symbolIterator; - } else if (typeof collection === obj) { - keys = nativeKeys(collection); - size = keys.length; - iterate = iterator.length === 3 ? objectIteratorWithKey : objectIterator; - } - if (!size) { - return callback(null, result); - } - iterate(); - - function arrayIterator() { - key = completed; - iterator(collection[completed], done); - } - - function arrayIteratorWithIndex() { - key = completed; - iterator(collection[completed], completed, done); - } - - function symbolIterator() { - key = completed; - item = iter.next(); - item.done ? callback(null, result) : iterator(item.value, done); - } - - function symbolIteratorWithKey() { - key = completed; - item = iter.next(); - item.done ? callback(null, result) : iterator(item.value, completed, done); - } - - function objectIterator() { - key = keys[completed]; - iterator(collection[key], done); - } - - function objectIteratorWithKey() { - key = keys[completed]; - iterator(collection[key], key, done); - } - - function done(err, res) { - if (err) { - iterate = throwError; - callback = onlyOnce(callback); - callback(err, objectClone(result)); - return; - } - result[key] = res; - if (++completed === size) { - iterate = throwError; - callback(null, result); - callback = throwError; - } else if (sync) { - nextTick(iterate); - } else { - sync = true; - iterate(); - } - sync = false; - } - } - - /** - * @memberof async - * @namespace mapValuesLimit - * @param {Array|Object} collection - * @param {number} limit - limit >= 1 - * @param {Function} iterator - * @param {Function} callback - * @example - * - * // array - * var order = []; - * var array = [1, 5, 3, 4, 2]; - * var iterator = function(num, done) { - * setTimeout(function() { - * order.push(num); - * done(null, num); - * }, num * 10); - * }; - * async.mapValuesLimit(array, 2, iterator, function(err, res) { - * console.log(res); // { '0': 1, '1': 5, '2': 3, '3': 4, '4': 2 } - * console.log(order); // [1, 3, 5, 2, 4] - * }); - * - * @example - * - * // array with index - * var order = []; - * var array = [1, 5, 3, 4, 2]; - * var iterator = function(num, index, done) { - * setTimeout(function() { - * order.push([num, index]); - * done(null, num); - * }, num * 10); - * }; - * async.mapValuesLimit(array, 2, iterator, function(err, res) { - * console.log(res); // { '0': 1, '1': 5, '2': 3, '3': 4, '4': 2 } - * console.log(order); // [[1, 0], [3, 2], [5, 1], [2, 4], [4, 3]] - * }); - * - * @example - * - * // object - * var order = []; - * var object = { a: 1, b: 5, c: 3, d: 4, e: 2 }; - * var iterator = function(num, done) { - * setTimeout(function() { - * order.push(num); - * done(null, num); - * }, num * 10); - * }; - * async.mapValuesLimit(object, 2, iterator, function(err, res) { - * console.log(res); // { a: 1, b: 5, c: 3, d: 4, e: 2 } - * console.log(order); // [1, 3, 5, 2, 4] - * }); - * - * @example - * - * // object with key - * var order = []; - * var object = { a: 1, b: 5, c: 3, d: 4, e: 2 }; - * var iterator = function(num, key, done) { - * setTimeout(function() { - * order.push([num, key]); - * done(null, num); - * }, num * 10); - * }; - * async.mapValuesLimit(object, 2, iterator, function(err, res) { - * console.log(res); // { a: 1, b: 5, c: 3, d: 4, e: 2 } - * console.log(order); // [[1, 'a'], [3, 'c'], [5, 'b'], [2, 'e'], [4, 'd']] - * }); - * - */ - function mapValuesLimit(collection, limit, iterator, callback) { - callback = callback || noop; - var size, index, key, keys, iter, item, iterate; - var sync = false; - var result = {}; - var started = 0; - var completed = 0; - - if (isArray(collection)) { - size = collection.length; - iterate = iterator.length === 3 ? arrayIteratorWithIndex : arrayIterator; - } else if (!collection) { - } else if (iteratorSymbol && collection[iteratorSymbol]) { - size = Infinity; - iter = collection[iteratorSymbol](); - iterate = iterator.length === 3 ? symbolIteratorWithKey : symbolIterator; - } else if (typeof collection === obj) { - keys = nativeKeys(collection); - size = keys.length; - iterate = iterator.length === 3 ? objectIteratorWithKey : objectIterator; - } - if (!size || isNaN(limit) || limit < 1) { - return callback(null, result); - } - timesSync(limit > size ? size : limit, iterate); - - function arrayIterator() { - index = started++; - if (index < size) { - iterator(collection[index], createCallback(index)); - } - } - - function arrayIteratorWithIndex() { - index = started++; - if (index < size) { - iterator(collection[index], index, createCallback(index)); - } - } - - function symbolIterator() { - item = iter.next(); - if (item.done === false) { - iterator(item.value, createCallback(started++)); - } else if (completed === started && iterator !== noop) { - iterator = noop; - callback(null, result); - } - } - - function symbolIteratorWithKey() { - item = iter.next(); - if (item.done === false) { - iterator(item.value, started, createCallback(started++)); - } else if (completed === started && iterator !== noop) { - iterator = noop; - callback(null, result); - } - } - - function objectIterator() { - index = started++; - if (index < size) { - key = keys[index]; - iterator(collection[key], createCallback(key)); - } - } - - function objectIteratorWithKey() { - index = started++; - if (index < size) { - key = keys[index]; - iterator(collection[key], key, createCallback(key)); - } - } - - function createCallback(key) { - return function(err, res) { - if (key === null) { - throwError(); - } - if (err) { - key = null; - iterate = noop; - callback = once(callback); - callback(err, objectClone(result)); - return; - } - result[key] = res; - key = null; - if (++completed === size) { - callback(null, result); - } else if (sync) { - nextTick(iterate); - } else { - sync = true; - iterate(); - } - sync = false; - }; - } - } - - /** - * @private - * @param {Function} arrayEach - * @param {Function} baseEach - * @param {Function} symbolEach - * @param {boolean} bool - */ - function createDetect(arrayEach, baseEach, symbolEach, bool) { - return function(collection, iterator, callback) { - callback = callback || noop; - var size, keys; - var completed = 0; - - if (isArray(collection)) { - size = collection.length; - arrayEach(collection, iterator, createCallback); - } else if (!collection) { - } else if (iteratorSymbol && collection[iteratorSymbol]) { - size = symbolEach(collection, iterator, createCallback); - size && size === completed && callback(null); - } else if (typeof collection === obj) { - keys = nativeKeys(collection); - size = keys.length; - baseEach(collection, iterator, createCallback, keys); - } - if (!size) { - callback(null); - } - - function createCallback(value) { - var called = false; - return function done(err, res) { - if (called) { - throwError(); - } - called = true; - if (err) { - callback = once(callback); - callback(err); - } else if (!!res === bool) { - callback = once(callback); - callback(null, value); - } else if (++completed === size) { - callback(null); - } - }; - } - }; - } - - /** - * @private - * @param {boolean} bool - */ - function createDetectSeries(bool) { - return function(collection, iterator, callback) { - callback = onlyOnce(callback || noop); - var size, key, value, keys, iter, item, iterate; - var sync = false; - var completed = 0; - - if (isArray(collection)) { - size = collection.length; - iterate = iterator.length === 3 ? arrayIteratorWithIndex : arrayIterator; - } else if (!collection) { - } else if (iteratorSymbol && collection[iteratorSymbol]) { - size = Infinity; - iter = collection[iteratorSymbol](); - iterate = iterator.length === 3 ? symbolIteratorWithKey : symbolIterator; - } else if (typeof collection === obj) { - keys = nativeKeys(collection); - size = keys.length; - iterate = iterator.length === 3 ? objectIteratorWithKey : objectIterator; - } - if (!size) { - return callback(null); - } - iterate(); - - function arrayIterator() { - value = collection[completed]; - iterator(value, done); - } - - function arrayIteratorWithIndex() { - value = collection[completed]; - iterator(value, completed, done); - } - - function symbolIterator() { - item = iter.next(); - value = item.value; - item.done ? callback(null) : iterator(value, done); - } - - function symbolIteratorWithKey() { - item = iter.next(); - value = item.value; - item.done ? callback(null) : iterator(value, completed, done); - } - - function objectIterator() { - value = collection[keys[completed]]; - iterator(value, done); - } - - function objectIteratorWithKey() { - key = keys[completed]; - value = collection[key]; - iterator(value, key, done); - } - - function done(err, res) { - if (err) { - callback(err); - } else if (!!res === bool) { - iterate = throwError; - callback(null, value); - } else if (++completed === size) { - iterate = throwError; - callback(null); - } else if (sync) { - nextTick(iterate); - } else { - sync = true; - iterate(); - } - sync = false; - } - }; - } - - /** - * @private - * @param {boolean} bool - */ - function createDetectLimit(bool) { - return function(collection, limit, iterator, callback) { - callback = callback || noop; - var size, index, key, value, keys, iter, item, iterate; - var sync = false; - var started = 0; - var completed = 0; - - if (isArray(collection)) { - size = collection.length; - iterate = iterator.length === 3 ? arrayIteratorWithIndex : arrayIterator; - } else if (!collection) { - } else if (iteratorSymbol && collection[iteratorSymbol]) { - size = Infinity; - iter = collection[iteratorSymbol](); - iterate = iterator.length === 3 ? symbolIteratorWithKey : symbolIterator; - } else if (typeof collection === obj) { - keys = nativeKeys(collection); - size = keys.length; - iterate = iterator.length === 3 ? objectIteratorWithKey : objectIterator; - } - if (!size || isNaN(limit) || limit < 1) { - return callback(null); - } - timesSync(limit > size ? size : limit, iterate); - - function arrayIterator() { - index = started++; - if (index < size) { - value = collection[index]; - iterator(value, createCallback(value)); - } - } - - function arrayIteratorWithIndex() { - index = started++; - if (index < size) { - value = collection[index]; - iterator(value, index, createCallback(value)); - } - } - - function symbolIterator() { - item = iter.next(); - if (item.done === false) { - started++; - value = item.value; - iterator(value, createCallback(value)); - } else if (completed === started && iterator !== noop) { - iterator = noop; - callback(null); - } - } - - function symbolIteratorWithKey() { - item = iter.next(); - if (item.done === false) { - value = item.value; - iterator(value, started++, createCallback(value)); - } else if (completed === started && iterator !== noop) { - iterator = noop; - callback(null); - } - } - - function objectIterator() { - index = started++; - if (index < size) { - value = collection[keys[index]]; - iterator(value, createCallback(value)); - } - } - - function objectIteratorWithKey() { - if (started < size) { - key = keys[started++]; - value = collection[key]; - iterator(value, key, createCallback(value)); - } - } - - function createCallback(value) { - var called = false; - return function(err, res) { - if (called) { - throwError(); - } - called = true; - if (err) { - iterate = noop; - callback = once(callback); - callback(err); - } else if (!!res === bool) { - iterate = noop; - callback = once(callback); - callback(null, value); - } else if (++completed === size) { - callback(null); - } else if (sync) { - nextTick(iterate); - } else { - sync = true; - iterate(); - } - sync = false; - }; - } - }; - } - - /** - * @private - * @param {Function} arrayEach - * @param {Function} baseEach - * @param {Function} symbolEach - * @param {boolean} bool - */ - function createPick(arrayEach, baseEach, symbolEach, bool) { - return function(collection, iterator, callback) { - callback = callback || noop; - var size, keys; - var completed = 0; - var result = {}; - - if (isArray(collection)) { - size = collection.length; - arrayEach(collection, iterator, createCallback); - } else if (!collection) { - } else if (iteratorSymbol && collection[iteratorSymbol]) { - size = symbolEach(collection, iterator, createCallback); - size && size === completed && callback(null, result); - } else if (typeof collection === obj) { - keys = nativeKeys(collection); - size = keys.length; - baseEach(collection, iterator, createCallback, keys); - } - if (!size) { - return callback(null, {}); - } - - function createCallback(key, value) { - return function done(err, res) { - if (key === null) { - throwError(); - } - if (err) { - key = null; - callback = once(callback); - callback(err, objectClone(result)); - return; - } - if (!!res === bool) { - result[key] = value; - } - key = null; - if (++completed === size) { - callback(null, result); - } - }; - } - }; - } - - /** - * @private - * @param {boolean} bool - */ - function createPickSeries(bool) { - return function(collection, iterator, callback) { - callback = onlyOnce(callback || noop); - var size, key, value, keys, iter, item, iterate; - var sync = false; - var result = {}; - var completed = 0; - - if (isArray(collection)) { - size = collection.length; - iterate = iterator.length === 3 ? arrayIteratorWithIndex : arrayIterator; - } else if (!collection) { - } else if (iteratorSymbol && collection[iteratorSymbol]) { - size = Infinity; - iter = collection[iteratorSymbol](); - iterate = iterator.length === 3 ? symbolIteratorWithKey : symbolIterator; - } else if (typeof collection === obj) { - keys = nativeKeys(collection); - size = keys.length; - iterate = iterator.length === 3 ? objectIteratorWithKey : objectIterator; - } - if (!size) { - return callback(null, {}); - } - iterate(); - - function arrayIterator() { - key = completed; - value = collection[completed]; - iterator(value, done); - } - - function arrayIteratorWithIndex() { - key = completed; - value = collection[completed]; - iterator(value, completed, done); - } - - function symbolIterator() { - key = completed; - item = iter.next(); - value = item.value; - item.done ? callback(null, result) : iterator(value, done); - } - - function symbolIteratorWithKey() { - key = completed; - item = iter.next(); - value = item.value; - item.done ? callback(null, result) : iterator(value, key, done); - } - - function objectIterator() { - key = keys[completed]; - value = collection[key]; - iterator(value, done); - } - - function objectIteratorWithKey() { - key = keys[completed]; - value = collection[key]; - iterator(value, key, done); - } - - function done(err, res) { - if (err) { - callback(err, result); - return; - } - if (!!res === bool) { - result[key] = value; - } - if (++completed === size) { - iterate = throwError; - callback(null, result); - } else if (sync) { - nextTick(iterate); - } else { - sync = true; - iterate(); - } - sync = false; - } - }; - } - - /** - * @private - * @param {boolean} bool - */ - function createPickLimit(bool) { - return function(collection, limit, iterator, callback) { - callback = callback || noop; - var size, index, key, value, keys, iter, item, iterate; - var sync = false; - var result = {}; - var started = 0; - var completed = 0; - - if (isArray(collection)) { - size = collection.length; - iterate = iterator.length === 3 ? arrayIteratorWithIndex : arrayIterator; - } else if (!collection) { - } else if (iteratorSymbol && collection[iteratorSymbol]) { - size = Infinity; - iter = collection[iteratorSymbol](); - iterate = iterator.length === 3 ? symbolIteratorWithKey : symbolIterator; - } else if (typeof collection === obj) { - keys = nativeKeys(collection); - size = keys.length; - iterate = iterator.length === 3 ? objectIteratorWithKey : objectIterator; - } - if (!size || isNaN(limit) || limit < 1) { - return callback(null, {}); - } - timesSync(limit > size ? size : limit, iterate); - - function arrayIterator() { - index = started++; - if (index < size) { - value = collection[index]; - iterator(value, createCallback(value, index)); - } - } - - function arrayIteratorWithIndex() { - index = started++; - if (index < size) { - value = collection[index]; - iterator(value, index, createCallback(value, index)); - } - } - - function symbolIterator() { - item = iter.next(); - if (item.done === false) { - value = item.value; - iterator(value, createCallback(value, started++)); - } else if (completed === started && iterator !== noop) { - iterator = noop; - callback(null, result); - } - } - - function symbolIteratorWithKey() { - item = iter.next(); - if (item.done === false) { - value = item.value; - iterator(value, started, createCallback(value, started++)); - } else if (completed === started && iterator !== noop) { - iterator = noop; - callback(null, result); - } - } - - function objectIterator() { - if (started < size) { - key = keys[started++]; - value = collection[key]; - iterator(value, createCallback(value, key)); - } - } - - function objectIteratorWithKey() { - if (started < size) { - key = keys[started++]; - value = collection[key]; - iterator(value, key, createCallback(value, key)); - } - } - - function createCallback(value, key) { - return function(err, res) { - if (key === null) { - throwError(); - } - if (err) { - key = null; - iterate = noop; - callback = once(callback); - callback(err, objectClone(result)); - return; - } - if (!!res === bool) { - result[key] = value; - } - key = null; - if (++completed === size) { - iterate = throwError; - callback = onlyOnce(callback); - callback(null, result); - } else if (sync) { - nextTick(iterate); - } else { - sync = true; - iterate(); - } - sync = false; - }; - } - }; - } - - /** - * @memberof async - * @namespace reduce - * @param {Array|Object} collection - * @param {*} result - * @param {Function} iterator - * @param {Function} callback - * @example - * - * // array - * var order = []; - * var collection = [1, 3, 2, 4]; - * var iterator = function(result, num, done) { - * setTimeout(function() { - * order.push(num); - * done(null, result + num); - * }, num * 10); - * }; - * async.reduce(collection, 0, iterator, function(err, res) { - * console.log(res); // 10 - * console.log(order); // [1, 3, 2, 4] - * }); - * - * @example - * - * // array with index - * var order = []; - * var collection = [1, 3, 2, 4]; - * var iterator = function(result, num, index, done) { - * setTimeout(function() { - * order.push([num, index]); - * done(null, result + num); - * }, num * 10); - * }; - * async.reduce(collection, '', iterator, function(err, res) { - * console.log(res); // '1324' - * console.log(order); // [[1, 0], [3, 1], [2, 2], [4, 3]] - * }); - * - * @example - * - * // object - * var order = []; - * var object = { a: 1, b: 3, c: 2, d: 4 }; - * var iterator = function(result, num, done) { - * setTimeout(function() { - * order.push(num); - * done(null, result + num); - * }, num * 10); - * }; - * async.reduce(collection, '', iterator, function(err, res) { - * console.log(res); // '1324' - * console.log(order); // [1, 3, 2, 4] - * }); - * - * @example - * - * // object with key - * var order = []; - * var object = { a: 1, b: 3, c: 2, d: 4 }; - * var iterator = function(result, num, key, done) { - * setTimeout(function() { - * order.push([num, key]); - * done(null, result + num); - * }, num * 10); - * }; - * async.reduce(collection, 0, iterator, function(err, res) { - * console.log(res); // 10 - * console.log(order); // [[1, 'a'], [3, 'b'], [2, 'b'], [4, 'd']] - * }); - * - */ - function reduce(collection, result, iterator, callback) { - callback = onlyOnce(callback || noop); - var size, key, keys, iter, item, iterate; - var sync = false; - var completed = 0; - - if (isArray(collection)) { - size = collection.length; - iterate = iterator.length === 4 ? arrayIteratorWithIndex : arrayIterator; - } else if (!collection) { - } else if (iteratorSymbol && collection[iteratorSymbol]) { - size = Infinity; - iter = collection[iteratorSymbol](); - iterate = iterator.length === 4 ? symbolIteratorWithKey : symbolIterator; - } else if (typeof collection === obj) { - keys = nativeKeys(collection); - size = keys.length; - iterate = iterator.length === 4 ? objectIteratorWithKey : objectIterator; - } - if (!size) { - return callback(null, result); - } - iterate(result); - - function arrayIterator(result) { - iterator(result, collection[completed], done); - } - - function arrayIteratorWithIndex(result) { - iterator(result, collection[completed], completed, done); - } - - function symbolIterator(result) { - item = iter.next(); - item.done ? callback(null, result) : iterator(result, item.value, done); - } - - function symbolIteratorWithKey(result) { - item = iter.next(); - item.done ? callback(null, result) : iterator(result, item.value, completed, done); - } - - function objectIterator(result) { - iterator(result, collection[keys[completed]], done); - } - - function objectIteratorWithKey(result) { - key = keys[completed]; - iterator(result, collection[key], key, done); - } - - function done(err, result) { - if (err) { - callback(err, result); - } else if (++completed === size) { - iterator = throwError; - callback(null, result); - } else if (sync) { - nextTick(function() { - iterate(result); - }); - } else { - sync = true; - iterate(result); - } - sync = false; - } - } - - /** - * @memberof async - * @namespace reduceRight - * @param {Array|Object} collection - * @param {*} result - * @param {Function} iterator - * @param {Function} callback - * @example - * - * // array - * var order = []; - * var collection = [1, 3, 2, 4]; - * var iterator = function(result, num, done) { - * setTimeout(function() { - * order.push(num); - * done(null, result + num); - * }, num * 10); - * }; - * async.reduceRight(collection, 0, iterator, function(err, res) { - * console.log(res); // 10 - * console.log(order); // [4, 2, 3, 1] - * }); - * - * @example - * - * // array with index - * var order = []; - * var collection = [1, 3, 2, 4]; - * var iterator = function(result, num, index, done) { - * setTimeout(function() { - * order.push([num, index]); - * done(null, result + num); - * }, num * 10); - * }; - * async.reduceRight(collection, '', iterator, function(err, res) { - * console.log(res); // '4231' - * console.log(order); // [[4, 3], [2, 2], [3, 1], [1, 0]] - * }); - * - * @example - * - * // object - * var order = []; - * var object = { a: 1, b: 3, c: 2, d: 4 }; - * var iterator = function(result, num, done) { - * setTimeout(function() { - * order.push(num); - * done(null, result + num); - * }, num * 10); - * }; - * async.reduceRight(collection, '', iterator, function(err, res) { - * console.log(res); // '4231' - * console.log(order); // [4, 2, 3, 1] - * }); - * - * @example - * - * // object with key - * var order = []; - * var object = { a: 1, b: 3, c: 2, d: 4 }; - * var iterator = function(result, num, key, done) { - * setTimeout(function() { - * order.push([num, key]); - * done(null, result + num); - * }, num * 10); - * }; - * async.reduceRight(collection, 0, iterator, function(err, res) { - * console.log(res); // 10 - * console.log(order); // [[4, 3], [2, 2], [3, 1], [1, 0]] - * }); - * - */ - function reduceRight(collection, result, iterator, callback) { - callback = onlyOnce(callback || noop); - var resIndex, index, key, keys, iter, item, col, iterate; - var sync = false; - - if (isArray(collection)) { - resIndex = collection.length; - iterate = iterator.length === 4 ? arrayIteratorWithIndex : arrayIterator; - } else if (!collection) { - } else if (iteratorSymbol && collection[iteratorSymbol]) { - col = []; - iter = collection[iteratorSymbol](); - index = -1; - while ((item = iter.next()).done === false) { - col[++index] = item.value; - } - collection = col; - resIndex = col.length; - iterate = iterator.length === 4 ? arrayIteratorWithIndex : arrayIterator; - } else if (typeof collection === obj) { - keys = nativeKeys(collection); - resIndex = keys.length; - iterate = iterator.length === 4 ? objectIteratorWithKey : objectIterator; - } - if (!resIndex) { - return callback(null, result); - } - iterate(result); - - function arrayIterator(result) { - iterator(result, collection[--resIndex], done); - } - - function arrayIteratorWithIndex(result) { - iterator(result, collection[--resIndex], resIndex, done); - } - - function objectIterator(result) { - iterator(result, collection[keys[--resIndex]], done); - } - - function objectIteratorWithKey(result) { - key = keys[--resIndex]; - iterator(result, collection[key], key, done); - } - - function done(err, result) { - if (err) { - callback(err, result); - } else if (resIndex === 0) { - iterate = throwError; - callback(null, result); - } else if (sync) { - nextTick(function() { - iterate(result); - }); - } else { - sync = true; - iterate(result); - } - sync = false; - } - } - - /** - * @private - * @param {Function} arrayEach - * @param {Function} baseEach - * @param {Function} symbolEach - */ - function createTransform(arrayEach, baseEach, symbolEach) { - return function transform(collection, accumulator, iterator, callback) { - if (arguments.length === 3) { - callback = iterator; - iterator = accumulator; - accumulator = undefined; - } - callback = callback || noop; - var size, keys, result; - var completed = 0; - - if (isArray(collection)) { - size = collection.length; - result = accumulator !== undefined ? accumulator : []; - arrayEach(collection, result, iterator, done); - } else if (!collection) { - } else if (iteratorSymbol && collection[iteratorSymbol]) { - result = accumulator !== undefined ? accumulator : {}; - size = symbolEach(collection, result, iterator, done); - size && size === completed && callback(null, result); - } else if (typeof collection === obj) { - keys = nativeKeys(collection); - size = keys.length; - result = accumulator !== undefined ? accumulator : {}; - baseEach(collection, result, iterator, done, keys); - } - if (!size) { - callback(null, accumulator !== undefined ? accumulator : result || {}); - } - - function done(err, bool) { - if (err) { - callback = once(callback); - callback(err, isArray(result) ? createArray(result) : objectClone(result)); - } else if (++completed === size) { - callback(null, result); - } else if (bool === false) { - callback = once(callback); - callback(null, isArray(result) ? createArray(result) : objectClone(result)); - } - } - }; - } - - /** - * @memberof async - * @namespace transformSeries - * @param {Array|Object} collection - * @param {Array|Object|Function} [accumulator] - * @param {Function} [iterator] - * @param {Function} [callback] - * @example - * - * // array - * var order = []; - * var collection = [1, 3, 2, 4]; - * var iterator = function(result, num, done) { - * setTimeout(function() { - * order.push(num); - * result.push(num) - * done(); - * }, num * 10); - * }; - * async.transformSeries(collection, iterator, function(err, res) { - * console.log(res); // [1, 3, 2, 4] - * console.log(order); // [1, 3, 2, 4] - * }); - * - * @example - * - * // array with index and accumulator - * var order = []; - * var collection = [1, 3, 2, 4]; - * var iterator = function(result, num, index, done) { - * setTimeout(function() { - * order.push([num, index]); - * result[index] = num; - * done(); - * }, num * 10); - * }; - * async.transformSeries(collection, {}, iterator, function(err, res) { - * console.log(res); // { '0': 1, '1': 3, '2': 2, '3': 4 } - * console.log(order); // [[1, 0], [3, 1], [2, 2], [4, 3]] - * }); - * - * @example - * - * // object with accumulator - * var order = []; - * var object = { a: 1, b: 3, c: 2, d: 4 }; - * var iterator = function(result, num, done) { - * setTimeout(function() { - * order.push(num); - * result.push(num); - * done(); - * }, num * 10); - * }; - * async.transformSeries(collection, [], iterator, function(err, res) { - * console.log(res); // [1, 3, 2, 4] - * console.log(order); // [1, 3, 2, 4] - * }); - * - * @example - * - * // object with key - * var order = []; - * var object = { a: 1, b: 3, c: 2, d: 4 }; - * var iterator = function(result, num, key, done) { - * setTimeout(function() { - * order.push([num, key]); - * result[key] = num; - * done(); - * }, num * 10); - * }; - * async.transformSeries(collection, iterator, function(err, res) { - * console.log(res); // { a: 1, b: 3, c: 2, d: 4 } - * console.log(order); // [[1, 'a'], [3, 'b'], [2, 'b'], [4, 'd']] - * }); - * - */ - function transformSeries(collection, accumulator, iterator, callback) { - if (arguments.length === 3) { - callback = iterator; - iterator = accumulator; - accumulator = undefined; - } - callback = onlyOnce(callback || noop); - var size, key, keys, iter, item, iterate, result; - var sync = false; - var completed = 0; - - if (isArray(collection)) { - size = collection.length; - result = accumulator !== undefined ? accumulator : []; - iterate = iterator.length === 4 ? arrayIteratorWithIndex : arrayIterator; - } else if (!collection) { - } else if (iteratorSymbol && collection[iteratorSymbol]) { - size = Infinity; - iter = collection[iteratorSymbol](); - result = accumulator !== undefined ? accumulator : {}; - iterate = iterator.length === 4 ? symbolIteratorWithKey : symbolIterator; - } else if (typeof collection === obj) { - keys = nativeKeys(collection); - size = keys.length; - result = accumulator !== undefined ? accumulator : {}; - iterate = iterator.length === 4 ? objectIteratorWithKey : objectIterator; - } - if (!size) { - return callback(null, accumulator !== undefined ? accumulator : result || {}); - } - iterate(); - - function arrayIterator() { - iterator(result, collection[completed], done); - } - - function arrayIteratorWithIndex() { - iterator(result, collection[completed], completed, done); - } - - function symbolIterator() { - item = iter.next(); - item.done ? callback(null, result) : iterator(result, item.value, done); - } - - function symbolIteratorWithKey() { - item = iter.next(); - item.done ? callback(null, result) : iterator(result, item.value, completed, done); - } - - function objectIterator() { - iterator(result, collection[keys[completed]], done); - } - - function objectIteratorWithKey() { - key = keys[completed]; - iterator(result, collection[key], key, done); - } - - function done(err, bool) { - if (err) { - callback(err, result); - } else if (++completed === size || bool === false) { - iterate = throwError; - callback(null, result); - } else if (sync) { - nextTick(iterate); - } else { - sync = true; - iterate(); - } - sync = false; - } - } - - /** - * @memberof async - * @namespace transformLimit - * @param {Array|Object} collection - * @param {number} limit - limit >= 1 - * @param {Array|Object|Function} [accumulator] - * @param {Function} [iterator] - * @param {Function} [callback] - * @example - * - * // array - * var order = []; - * var array = [1, 5, 3, 4, 2]; - * var iterator = function(result, num, done) { - * setTimeout(function() { - * order.push(num); - * result.push(num); - * done(); - * }, num * 10); - * }; - * async.transformLimit(array, 2, iterator, function(err, res) { - * console.log(res); // [1, 3, 5, 2, 4] - * console.log(order); // [1, 3, 5, 2, 4] - * }); - * - * @example - * - * // array with index and accumulator - * var order = []; - * var array = [1, 5, 3, 4, 2]; - * var iterator = function(result, num, index, done) { - * setTimeout(function() { - * order.push([num, index]); - * result[index] = key; - * done(); - * }, num * 10); - * }; - * async.transformLimit(array, 2, {}, iterator, function(err, res) { - * console.log(res); // { '0': 1, '1': 5, '2': 3, '3': 4, '4': 2 } - * console.log(order); // [[1, 0], [3, 2], [5, 1], [2, 4], [4, 3]] - * }); - * - * @example - * - * // object with accumulator - * var order = []; - * var object = { a: 1, b: 5, c: 3, d: 4, e: 2 }; - * var iterator = function(result, num, done) { - * setTimeout(function() { - * order.push(num); - * result.push(num); - * done(); - * }, num * 10); - * }; - * async.transformLimit(object, 2, [], iterator, function(err, res) { - * console.log(res); // [1, 3, 5, 2, 4] - * console.log(order); // [1, 3, 5, 2, 4] - * }); - * - * @example - * - * // object with key - * var order = []; - * var object = { a: 1, b: 5, c: 3, d: 4, e: 2 }; - * var iterator = function(result, num, key, done) { - * setTimeout(function() { - * order.push([num, key]); - * result[key] = num; - * done(); - * }, num * 10); - * }; - * async.transformLimit(object, 2, iterator, function(err, res) { - * console.log(res); // { a: 1, b: 5, c: 3, d: 4, e: 2 }; - * console.log(order); // [[1, 'a'], [3, 'c'], [5, 'b'], [2, 'e'], [4, 'd']] - * }); - * - */ - function transformLimit(collection, limit, accumulator, iterator, callback) { - if (arguments.length === 4) { - callback = iterator; - iterator = accumulator; - accumulator = undefined; - } - callback = callback || noop; - var size, index, key, keys, iter, item, iterate, result; - var sync = false; - var started = 0; - var completed = 0; - - if (isArray(collection)) { - size = collection.length; - result = accumulator !== undefined ? accumulator : []; - iterate = iterator.length === 4 ? arrayIteratorWithIndex : arrayIterator; - } else if (!collection) { - } else if (iteratorSymbol && collection[iteratorSymbol]) { - size = Infinity; - iter = collection[iteratorSymbol](); - result = accumulator !== undefined ? accumulator : {}; - iterate = iterator.length === 4 ? symbolIteratorWithKey : symbolIterator; - } else if (typeof collection === obj) { - keys = nativeKeys(collection); - size = keys.length; - result = accumulator !== undefined ? accumulator : {}; - iterate = iterator.length === 4 ? objectIteratorWithKey : objectIterator; - } - if (!size || isNaN(limit) || limit < 1) { - return callback(null, accumulator !== undefined ? accumulator : result || {}); - } - timesSync(limit > size ? size : limit, iterate); - - function arrayIterator() { - index = started++; - if (index < size) { - iterator(result, collection[index], onlyOnce(done)); - } - } - - function arrayIteratorWithIndex() { - index = started++; - if (index < size) { - iterator(result, collection[index], index, onlyOnce(done)); - } - } - - function symbolIterator() { - item = iter.next(); - if (item.done === false) { - started++; - iterator(result, item.value, onlyOnce(done)); - } else if (completed === started && iterator !== noop) { - iterator = noop; - callback(null, result); - } - } - - function symbolIteratorWithKey() { - item = iter.next(); - if (item.done === false) { - iterator(result, item.value, started++, onlyOnce(done)); - } else if (completed === started && iterator !== noop) { - iterator = noop; - callback(null, result); - } - } - - function objectIterator() { - index = started++; - if (index < size) { - iterator(result, collection[keys[index]], onlyOnce(done)); - } - } - - function objectIteratorWithKey() { - index = started++; - if (index < size) { - key = keys[index]; - iterator(result, collection[key], key, onlyOnce(done)); - } - } - - function done(err, bool) { - if (err || bool === false) { - iterate = noop; - callback(err || null, isArray(result) ? createArray(result) : objectClone(result)); - callback = noop; - } else if (++completed === size) { - iterator = noop; - callback(null, result); - } else if (sync) { - nextTick(iterate); - } else { - sync = true; - iterate(); - } - sync = false; - } - } - - /** - * @private - * @param {function} arrayEach - * @param {function} baseEach - * @param {function} symbolEach - */ - function createSortBy(arrayEach, baseEach, symbolEach) { - return function sortBy(collection, iterator, callback) { - callback = callback || noop; - var size, array, criteria; - var completed = 0; - - if (isArray(collection)) { - size = collection.length; - array = Array(size); - criteria = Array(size); - arrayEach(collection, iterator, createCallback); - } else if (!collection) { - } else if (iteratorSymbol && collection[iteratorSymbol]) { - array = []; - criteria = []; - size = symbolEach(collection, iterator, createCallback); - size && size === completed && callback(null, sortByCriteria(array, criteria)); - } else if (typeof collection === obj) { - var keys = nativeKeys(collection); - size = keys.length; - array = Array(size); - criteria = Array(size); - baseEach(collection, iterator, createCallback, keys); - } - if (!size) { - callback(null, []); - } - - function createCallback(index, value) { - var called = false; - array[index] = value; - return function done(err, criterion) { - if (called) { - throwError(); - } - called = true; - criteria[index] = criterion; - if (err) { - callback = once(callback); - callback(err); - } else if (++completed === size) { - callback(null, sortByCriteria(array, criteria)); - } - }; - } - }; - } - - /** - * @memberof async - * @namespace sortBySeries - * @param {Array|Object} collection - * @param {Function} iterator - * @param {Function} callback - * @example - * - * // array - * var order = []; - * var array = [1, 3, 2]; - * var iterator = function(num, done) { - * setTimeout(function() { - * order.push(num); - * done(null, num); - * }, num * 10); - * }; - * async.sortBySeries(array, iterator, function(err, res) { - * console.log(res); // [1, 2, 3]; - * console.log(order); // [1, 3, 2] - * }); - * - * @example - * - * // array with index - * var order = []; - * var array = [1, 3, 2]; - * var iterator = function(num, index, done) { - * setTimeout(function() { - * order.push([num, index]); - * done(null, num); - * }, num * 10); - * }; - * async.sortBySeries(array, iterator, function(err, res) { - * console.log(res); // [1, 2, 3] - * console.log(order); // [[1, 0], [3, 1], [2, 2]] - * }); - * - * @example - * - * // object - * var order = []; - * var object = { a: 1, b: 3, c: 2 }; - * var iterator = function(num, done) { - * setTimeout(function() { - * order.push(num); - * done(null, num); - * }, num * 10); - * }; - * async.sortBySeries(object, iterator, function(err, res) { - * console.log(res); // [1, 2, 3] - * console.log(order); // [1, 3, 2] - * }); - * - * @example - * - * // object with key - * var order = []; - * var object = { a: 1, b: 3, c: 2 }; - * var iterator = function(num, key, done) { - * setTimeout(function() { - * order.push([num, key]); - * done(null, num); - * }, num * 10); - * }; - * async.sortBySeries(object, iterator, function(err, res) { - * console.log(res); // [1, 2, 3] - * console.log(order); // [[1, 'a'], [3, 'b'], [2, 'c']] - * }); - * - */ - function sortBySeries(collection, iterator, callback) { - callback = onlyOnce(callback || noop); - var size, key, value, keys, iter, item, array, criteria, iterate; - var sync = false; - var completed = 0; - - if (isArray(collection)) { - size = collection.length; - array = collection; - criteria = Array(size); - iterate = iterator.length === 3 ? arrayIteratorWithIndex : arrayIterator; - } else if (!collection) { - } else if (iteratorSymbol && collection[iteratorSymbol]) { - size = Infinity; - array = []; - criteria = []; - iter = collection[iteratorSymbol](); - iterate = iterator.length === 3 ? symbolIteratorWithKey : symbolIterator; - } else if (typeof collection === obj) { - keys = nativeKeys(collection); - size = keys.length; - array = Array(size); - criteria = Array(size); - iterate = iterator.length === 3 ? objectIteratorWithKey : objectIterator; - } - if (!size) { - return callback(null, []); - } - iterate(); - - function arrayIterator() { - value = collection[completed]; - iterator(value, done); - } - - function arrayIteratorWithIndex() { - value = collection[completed]; - iterator(value, completed, done); - } - - function symbolIterator() { - item = iter.next(); - if (item.done) { - return callback(null, sortByCriteria(array, criteria)); - } - value = item.value; - array[completed] = value; - iterator(value, done); - } - - function symbolIteratorWithKey() { - item = iter.next(); - if (item.done) { - return callback(null, sortByCriteria(array, criteria)); - } - value = item.value; - array[completed] = value; - iterator(value, completed, done); - } - - function objectIterator() { - value = collection[keys[completed]]; - array[completed] = value; - iterator(value, done); - } - - function objectIteratorWithKey() { - key = keys[completed]; - value = collection[key]; - array[completed] = value; - iterator(value, key, done); - } - - function done(err, criterion) { - criteria[completed] = criterion; - if (err) { - callback(err); - } else if (++completed === size) { - iterate = throwError; - callback(null, sortByCriteria(array, criteria)); - } else if (sync) { - nextTick(iterate); - } else { - sync = true; - iterate(); - } - sync = false; - } - } - - /** - * @memberof async - * @namespace sortByLimit - * @param {Array|Object} collection - * @param {number} limit - limit >= 1 - * @param {Function} iterator - * @param {Function} callback - * @example - * - * // array - * var order = []; - * var array = [1, 5, 3, 4, 2]; - * var iterator = function(num, done) { - * setTimeout(function() { - * order.push(num); - * done(null, num); - * }, num * 10); - * }; - * async.sortByLimit(array, 2, iterator, function(err, res) { - * console.log(res); // [1, 2, 3, 4, 5] - * console.log(order); // [1, 3, 5, 2, 4] - * }); - * - * @example - * - * // array with index - * var order = []; - * var array = [1, 5, 3, 4, 2]; - * var iterator = function(num, index, done) { - * setTimeout(function() { - * order.push([num, index]); - * done(null, num); - * }, num * 10); - * }; - * async.sortByLimit(array, 2, iterator, function(err, res) { - * console.log(res); // [1, 2, 3, 4, 5] - * console.log(order); // [[1, 0], [3, 2], [5, 1], [2, 4], [4, 3]] - * }); - * - * @example - * - * // object - * var order = []; - * var object = { a: 1, b: 5, c: 3, d: 4, e: 2 }; - * var iterator = function(num, done) { - * setTimeout(function() { - * order.push(num); - * done(null, num); - * }, num * 10); - * }; - * async.sortByLimit(object, 2, iterator, function(err, res) { - * console.log(res); // [1, 2, 3, 4, 5] - * console.log(order); // [1, 3, 5, 2, 4] - * }); - * - * @example - * - * // object with key - * var order = []; - * var object = { a: 1, b: 5, c: 3, d: 4, e: 2 }; - * var iterator = function(num, key, done) { - * setTimeout(function() { - * order.push([num, key]); - * done(null, num); - * }, num * 10); - * }; - * async.sortByLimit(object, 2, iterator, function(err, res) { - * console.log(res); // [1, 2, 3, 4, 5] - * console.log(order); // [[1, 'a'], [3, 'c'], [5, 'b'], [2, 'e'], [4, 'd']] - * }); - * - */ - function sortByLimit(collection, limit, iterator, callback) { - callback = callback || noop; - var size, index, key, value, array, keys, iter, item, criteria, iterate; - var sync = false; - var started = 0; - var completed = 0; - - if (isArray(collection)) { - size = collection.length; - array = collection; - iterate = iterator.length === 3 ? arrayIteratorWithIndex : arrayIterator; - } else if (!collection) { - } else if (iteratorSymbol && collection[iteratorSymbol]) { - size = Infinity; - iter = collection[iteratorSymbol](); - array = []; - criteria = []; - iterate = iterator.length === 3 ? symbolIteratorWithKey : symbolIterator; - } else if (typeof collection === obj) { - keys = nativeKeys(collection); - size = keys.length; - array = Array(size); - iterate = iterator.length === 3 ? objectIteratorWithKey : objectIterator; - } - if (!size || isNaN(limit) || limit < 1) { - return callback(null, []); - } - criteria = criteria || Array(size); - timesSync(limit > size ? size : limit, iterate); - - function arrayIterator() { - if (started < size) { - value = collection[started]; - iterator(value, createCallback(value, started++)); - } - } - - function arrayIteratorWithIndex() { - index = started++; - if (index < size) { - value = collection[index]; - iterator(value, index, createCallback(value, index)); - } - } - - function symbolIterator() { - item = iter.next(); - if (item.done === false) { - value = item.value; - array[started] = value; - iterator(value, createCallback(value, started++)); - } else if (completed === started && iterator !== noop) { - iterator = noop; - callback(null, sortByCriteria(array, criteria)); - } - } - - function symbolIteratorWithKey() { - item = iter.next(); - if (item.done === false) { - value = item.value; - array[started] = value; - iterator(value, started, createCallback(value, started++)); - } else if (completed === started && iterator !== noop) { - iterator = noop; - callback(null, sortByCriteria(array, criteria)); - } - } - - function objectIterator() { - if (started < size) { - value = collection[keys[started]]; - array[started] = value; - iterator(value, createCallback(value, started++)); - } - } - - function objectIteratorWithKey() { - if (started < size) { - key = keys[started]; - value = collection[key]; - array[started] = value; - iterator(value, key, createCallback(value, started++)); - } - } - - function createCallback(value, index) { - var called = false; - return function(err, criterion) { - if (called) { - throwError(); - } - called = true; - criteria[index] = criterion; - if (err) { - iterate = noop; - callback(err); - callback = noop; - } else if (++completed === size) { - callback(null, sortByCriteria(array, criteria)); - } else if (sync) { - nextTick(iterate); - } else { - sync = true; - iterate(); - } - sync = false; - }; - } - } - - /** - * @memberof async - * @namespace some - * @param {Array|Object} collection - * @param {Function} iterator - * @param {Function} callback - * @example - * - * // array - * var order = []; - * var array = [1, 3, 2]; - * var iterator = function(num, done) { - * setTimeout(function() { - * order.push(num); - * done(null, num % 2); - * }, num * 10); - * }; - * async.some(array, iterator, function(err, res) { - * console.log(res); // true - * console.log(order); // [1] - * }); - * - * @example - * - * // array with index - * var order = []; - * var array = [1, 3, 2]; - * var iterator = function(num, index, done) { - * setTimeout(function() { - * order.push([num, index]); - * done(null, num % 2); - * }, num * 10); - * }; - * async.some(array, iterator, function(err, res) { - * console.log(res); // true - * console.log(order); // [[1, 0]] - * }); - * - * @example - * - * // object - * var order = []; - * var object = { a: 1, b: 3, c: 2 }; - * var iterator = function(num, done) { - * setTimeout(function() { - * order.push(num); - * done(null, num % 2); - * }, num * 10); - * }; - * async.some(object, iterator, function(err, res) { - * console.log(res); // true - * console.log(order); // [1] - * }); - * - * @example - * - * // object with key - * var order = []; - * var object = { a: 1, b: 3, c: 2 }; - * var iterator = function(num, key, done) { - * setTimeout(function() { - * order.push([num, key]); - * done(null, num % 2); - * }, num * 10); - * }; - * async.some(object, iterator, function(err, res) { - * console.log(res); // true - * console.log(order); // [[1, 'a']] - * }); - * - */ - function some(collection, iterator, callback) { - callback = callback || noop; - detect(collection, iterator, done); - - function done(err, res) { - if (err) { - return callback(err); - } - callback(null, !!res); - } - } - - /** - * @memberof async - * @namespace someSeries - * @param {Array|Object} collection - * @param {Function} iterator - * @param {Function} callback - * @example - * - * // array - * var order = []; - * var array = [1, 3, 2]; - * var iterator = function(num, done) { - * setTimeout(function() { - * order.push(num); - * done(null, num % 2); - * }, num * 10); - * }; - * async.someSeries(array, iterator, function(err, res) { - * console.log(res); // true - * console.log(order); // [1] - * }); - * - * @example - * - * // array with index - * var order = []; - * var array = [1, 3, 2]; - * var iterator = function(num, index, done) { - * setTimeout(function() { - * order.push([num, index]); - * done(null, num % 2); - * }, num * 10); - * }; - * async.someSeries(array, iterator, function(err, res) { - * console.log(res); // true - * console.log(order); // [[1, 0]] - * }); - * - * @example - * - * // object - * var order = []; - * var object = { a: 1, b: 3, c: 2 }; - * var iterator = function(num, done) { - * setTimeout(function() { - * order.push(num); - * done(null, num % 2); - * }, num * 10); - * }; - * async.someSeries(object, iterator, function(err, res) { - * console.log(res); // true - * console.log(order); // [1] - * }); - * - * @example - * - * // object with key - * var order = []; - * var object = { a: 1, b: 3, c: 2 }; - * var iterator = function(num, key, done) { - * setTimeout(function() { - * order.push([num, key]); - * done(null, num % 2); - * }, num * 10); - * }; - * async.someSeries(object, iterator, function(err, res) { - * console.log(res); // true - * console.log(order); // [[1, 'a']] - * }); - * - */ - function someSeries(collection, iterator, callback) { - callback = callback || noop; - detectSeries(collection, iterator, done); - - function done(err, res) { - if (err) { - return callback(err); - } - callback(null, !!res); - } - } - - /** - * @memberof async - * @namespace someLimit - * @param {Array|Object} collection - * @param {number} limit - limit >= 1 - * @param {Function} iterator - * @param {Function} callback - * @example - * - * // array - * var order = []; - * var array = [1, 5, 3, 4, 2]; - * var iterator = function(num, done) { - * setTimeout(function() { - * order.push(num); - * done(null, num % 2); - * }, num * 10); - * }; - * async.someLimit(array, 2, iterator, function(err, res) { - * console.log(res); // true - * console.log(order); // [1] - * }); - * - * @example - * - * // array with index - * var order = []; - * var array = [1, 5, 3, 4, 2]; - * var iterator = function(num, index, done) { - * setTimeout(function() { - * order.push([num, index]); - * done(null, num % 2); - * }, num * 10); - * }; - * async.someLimit(array, 2, iterator, function(err, res) { - * console.log(res); // true - * console.log(order); // [[1, 0]] - * }); - * - * @example - * - * // object - * var order = []; - * var object = { a: 1, b: 5, c: 3, d: 4, e: 2 }; - * var iterator = function(num, done) { - * setTimeout(function() { - * order.push(num); - * done(null, num % 2); - * }, num * 10); - * }; - * async.someLimit(object, 2, iterator, function(err, res) { - * console.log(res); // true - * console.log(order); // [1] - * }); - * - * @example - * - * // object with key - * var order = []; - * var object = { a: 1, b: 5, c: 3, d: 4, e: 2 }; - * var iterator = function(num, key, done) { - * setTimeout(function() { - * order.push([num, key]); - * done(null, num % 2); - * }, num * 10); - * }; - * async.someLimit(object, 2, iterator, function(err, res) { - * console.log(res); // true - * console.log(order); // [[1, 'a']] - * }); - * - */ - function someLimit(collection, limit, iterator, callback) { - callback = callback || noop; - detectLimit(collection, limit, iterator, done); - - function done(err, res) { - if (err) { - return callback(err); - } - callback(null, !!res); - } - } - - /** - * @private - * @param {Function} arrayEach - * @param {Function} baseEach - * @param {Function} symbolEach - */ - function createEvery(arrayEach, baseEach, symbolEach) { - var deny = createDetect(arrayEach, baseEach, symbolEach, false); - - return function every(collection, iterator, callback) { - callback = callback || noop; - deny(collection, iterator, done); - - function done(err, res) { - if (err) { - return callback(err); - } - callback(null, !res); - } - }; - } - - /** - * @private - */ - function createEverySeries() { - var denySeries = createDetectSeries(false); - - return function everySeries(collection, iterator, callback) { - callback = callback || noop; - denySeries(collection, iterator, done); - - function done(err, res) { - if (err) { - return callback(err); - } - callback(null, !res); - } - }; - } - - /** - * @private - */ - function createEveryLimit() { - var denyLimit = createDetectLimit(false); - - return function everyLimit(collection, limit, iterator, callback) { - callback = callback || noop; - denyLimit(collection, limit, iterator, done); - - function done(err, res) { - if (err) { - return callback(err); - } - callback(null, !res); - } - }; - } - - /** - * @private - * @param {Function} arrayEach - * @param {Function} baseEach - * @param {Function} symbolEach - */ - function createConcat(arrayEach, baseEach, symbolEach) { - return function concat(collection, iterator, callback) { - callback = callback || noop; - var size, result; - var completed = 0; - - if (isArray(collection)) { - size = collection.length; - result = Array(size); - arrayEach(collection, iterator, createCallback); - } else if (!collection) { - } else if (iteratorSymbol && collection[iteratorSymbol]) { - result = []; - size = symbolEach(collection, iterator, createCallback); - size && size === completed && callback(null, result); - } else if (typeof collection === obj) { - var keys = nativeKeys(collection); - size = keys.length; - result = Array(size); - baseEach(collection, iterator, createCallback, keys); - } - if (!size) { - callback(null, []); - } - - function createCallback(index) { - return function done(err, res) { - if (index === null) { - throwError(); - } - if (err) { - index = null; - callback = once(callback); - arrayEachSync(result, function(array, index) { - if (array === undefined) { - result[index] = noop; - } - }); - callback(err, makeConcatResult(result)); - return; - } - switch (arguments.length) { - case 0: - case 1: - result[index] = noop; - break; - case 2: - result[index] = res; - break; - default: - result[index] = slice(arguments, 1); - break; - } - index = null; - if (++completed === size) { - callback(null, makeConcatResult(result)); - } - }; - } - }; - } - - /** - * @memberof async - * @namespace concatSeries - * @param {Array|Object} collection - * @param {Function} iterator - * @param {Function} callback - * @example - * - * // array - * var order = []; - * var array = [1, 3, 2]; - * var iterator = function(num, done) { - * setTimeout(function() { - * order.push(num); - * done(null, [num]); - * }, num * 10); - * }; - * async.concatSeries(array, iterator, function(err, res) { - * console.log(res); // [1, 3, 2]; - * console.log(order); // [1, 3, 2] - * }); - * - * @example - * - * // array with index - * var order = []; - * var array = [1, 3, 2]; - * var iterator = function(num, index, done) { - * setTimeout(function() { - * order.push([num, index]); - * done(null, [num]); - * }, num * 10); - * }; - * async.concatSeries(array, iterator, function(err, res) { - * console.log(res); // [1, 3, 2] - * console.log(order); // [[1, 0], [3, 1], [2, 2]] - * }); - * - * @example - * - * // object - * var order = []; - * var object = { a: 1, b: 3, c: 2 }; - * var iterator = function(num, done) { - * setTimeout(function() { - * order.push(num); - * done(null, [num]); - * }, num * 10); - * }; - * async.concatSeries(object, iterator, function(err, res) { - * console.log(res); // [1, 3, 2] - * console.log(order); // [1, 3, 2] - * }); - * - * @example - * - * // object with key - * var order = []; - * var object = { a: 1, b: 3, c: 2 }; - * var iterator = function(num, key, done) { - * setTimeout(function() { - * order.push([num, key]); - * done(null, [num]); - * }, num * 10); - * }; - * async.concatSeries(object, iterator, function(err, res) { - * console.log(res); // [1, 3, 2] - * console.log(order); // [[1, 'a'], [3, 'b'], [2, 'c']] - * }); - * - */ - function concatSeries(collection, iterator, callback) { - callback = onlyOnce(callback || noop); - var size, key, keys, iter, item, iterate; - var sync = false; - var result = []; - var completed = 0; - - if (isArray(collection)) { - size = collection.length; - iterate = iterator.length === 3 ? arrayIteratorWithIndex : arrayIterator; - } else if (!collection) { - } else if (iteratorSymbol && collection[iteratorSymbol]) { - size = Infinity; - iter = collection[iteratorSymbol](); - iterate = iterator.length === 3 ? symbolIteratorWithKey : symbolIterator; - } else if (typeof collection === obj) { - keys = nativeKeys(collection); - size = keys.length; - iterate = iterator.length === 3 ? objectIteratorWithKey : objectIterator; - } - if (!size) { - return callback(null, result); - } - iterate(); - - function arrayIterator() { - iterator(collection[completed], done); - } - - function arrayIteratorWithIndex() { - iterator(collection[completed], completed, done); - } - - function symbolIterator() { - item = iter.next(); - item.done ? callback(null, result) : iterator(item.value, done); - } - - function symbolIteratorWithKey() { - item = iter.next(); - item.done ? callback(null, result) : iterator(item.value, completed, done); - } - - function objectIterator() { - iterator(collection[keys[completed]], done); - } - - function objectIteratorWithKey() { - key = keys[completed]; - iterator(collection[key], key, done); - } - - function done(err, array) { - if (isArray(array)) { - nativePush.apply(result, array); - } else if (arguments.length >= 2) { - nativePush.apply(result, slice(arguments, 1)); - } - if (err) { - callback(err, result); - } else if (++completed === size) { - iterate = throwError; - callback(null, result); - } else if (sync) { - nextTick(iterate); - } else { - sync = true; - iterate(); - } - sync = false; - } - } - - /** - * @memberof async - * @namespace concatLimit - * @param {Array|Object} collection - * @param {number} limit - limit >= 1 - * @param {Function} iterator - * @param {Function} callback - * @example - * - * // array - * var order = []; - * var array = [1, 5, 3, 4, 2]; - * var iterator = function(num, done) { - * setTimeout(function() { - * order.push(num); - * done(null, [num]); - * }, num * 10); - * }; - * async.concatLimit(array, 2, iterator, function(err, res) { - * console.log(res); // [1, 3, 5, 2, 4] - * console.log(order); // [1, 3, 5, 2, 4] - * }); - * - * @example - * - * // array with index - * var order = []; - * var array = [1, 5, 3, 4, 2]; - * var iterator = function(num, index, done) { - * setTimeout(function() { - * order.push([num, index]); - * done(null, [num]); - * }, num * 10); - * }; - * async.cocnatLimit(array, 2, iterator, function(err, res) { - * console.log(res); // [1, 3, 5, 2, 4] - * console.log(order); // [[1, 0], [3, 2], [5, 1], [2, 4], [4, 3]] - * }); - * - * @example - * - * // object - * var order = []; - * var object = { a: 1, b: 5, c: 3, d: 4, e: 2 }; - * var iterator = function(num, done) { - * setTimeout(function() { - * order.push(num); - * done(null, [num]); - * }, num * 10); - * }; - * async.concatLimit(object, 2, iterator, function(err, res) { - * console.log(res); // [1, 3, 5, 2, 4] - * console.log(order); // [1, 3, 5, 2, 4] - * }); - * - * @example - * - * // object with key - * var order = []; - * var object = { a: 1, b: 5, c: 3, d: 4, e: 2 }; - * var iterator = function(num, key, done) { - * setTimeout(function() { - * order.push([num, key]); - * done(null, num); - * }, num * 10); - * }; - * async.cocnatLimit(object, 2, iterator, function(err, res) { - * console.log(res); // [1, 3, 5, 2, 4] - * console.log(order); // [[1, 'a'], [3, 'c'], [5, 'b'], [2, 'e'], [4, 'd']] - * }); - * - */ - function concatLimit(collection, limit, iterator, callback) { - callback = callback || noop; - var size, key, iter, item, iterate, result; - var sync = false; - var started = 0; - var completed = 0; - - if (isArray(collection)) { - size = collection.length; - iterate = iterator.length === 3 ? arrayIteratorWithIndex : arrayIterator; - } else if (!collection) { - } else if (iteratorSymbol && collection[iteratorSymbol]) { - size = Infinity; - result = []; - iter = collection[iteratorSymbol](); - iterate = iterator.length === 3 ? symbolIteratorWithKey : symbolIterator; - } else if (typeof collection === obj) { - var keys = nativeKeys(collection); - size = keys.length; - iterate = iterator.length === 3 ? objectIteratorWithKey : objectIterator; - } - if (!size || isNaN(limit) || limit < 1) { - return callback(null, []); - } - result = result || Array(size); - timesSync(limit > size ? size : limit, iterate); - - function arrayIterator() { - if (started < size) { - iterator(collection[started], createCallback(started++)); - } - } - - function arrayIteratorWithIndex() { - if (started < size) { - iterator(collection[started], started, createCallback(started++)); - } - } - - function symbolIterator() { - item = iter.next(); - if (item.done === false) { - iterator(item.value, createCallback(started++)); - } else if (completed === started && iterator !== noop) { - iterator = noop; - callback(null, makeConcatResult(result)); - } - } - - function symbolIteratorWithKey() { - item = iter.next(); - if (item.done === false) { - iterator(item.value, started, createCallback(started++)); - } else if (completed === started && iterator !== noop) { - iterator = noop; - callback(null, makeConcatResult(result)); - } - } - - function objectIterator() { - if (started < size) { - iterator(collection[keys[started]], createCallback(started++)); - } - } - - function objectIteratorWithKey() { - if (started < size) { - key = keys[started]; - iterator(collection[key], key, createCallback(started++)); - } - } - - function createCallback(index) { - return function(err, res) { - if (index === null) { - throwError(); - } - if (err) { - index = null; - iterate = noop; - callback = once(callback); - arrayEachSync(result, function(array, index) { - if (array === undefined) { - result[index] = noop; - } - }); - callback(err, makeConcatResult(result)); - return; - } - switch (arguments.length) { - case 0: - case 1: - result[index] = noop; - break; - case 2: - result[index] = res; - break; - default: - result[index] = slice(arguments, 1); - break; - } - index = null; - if (++completed === size) { - iterate = throwError; - callback(null, makeConcatResult(result)); - callback = throwError; - } else if (sync) { - nextTick(iterate); - } else { - sync = true; - iterate(); - } - sync = false; - }; - } - } - - /** - * @private - * @param {Function} arrayEach - * @param {Function} baseEach - * @param {Function} symbolEach - */ - function createGroupBy(arrayEach, baseEach, symbolEach) { - return function groupBy(collection, iterator, callback) { - callback = callback || noop; - var size; - var completed = 0; - var result = {}; - - if (isArray(collection)) { - size = collection.length; - arrayEach(collection, iterator, createCallback); - } else if (!collection) { - } else if (iteratorSymbol && collection[iteratorSymbol]) { - size = symbolEach(collection, iterator, createCallback); - size && size === completed && callback(null, result); - } else if (typeof collection === obj) { - var keys = nativeKeys(collection); - size = keys.length; - baseEach(collection, iterator, createCallback, keys); - } - if (!size) { - callback(null, {}); - } - - function createCallback(value) { - var called = false; - return function done(err, key) { - if (called) { - throwError(); - } - called = true; - if (err) { - callback = once(callback); - callback(err, objectClone(result)); - return; - } - var array = result[key]; - if (!array) { - result[key] = [value]; - } else { - array.push(value); - } - if (++completed === size) { - callback(null, result); - } - }; - } - }; - } - - /** - * @memberof async - * @namespace groupBySeries - * @param {Array|Object} collection - * @param {Function} iterator - * @param {Function} callback - * @example - * - * // array - * var order = []; - * var array = [4.2, 6.4, 6.1]; - * var iterator = function(num, done) { - * setTimeout(function() { - * order.push(num); - * done(null, Math.floor(num)); - * }, num * 10); - * }; - * async.groupBySeries(array, iterator, function(err, res) { - * console.log(res); // { '4': [4.2], '6': [6.4, 6.1] } - * console.log(order); // [4.2, 6.4, 6.1] - * }); - * - * @example - * - * // array with index - * var order = []; - * var array = [4.2, 6.4, 6.1]; - * var iterator = function(num, index, done) { - * setTimeout(function() { - * order.push([num, index]); - * done(null, Math.floor(num)); - * }, num * 10); - * }; - * async.groupBySeries(array, iterator, function(err, res) { - * console.log(res); // { '4': [4.2], '6': [6.4, 6.1] } - * console.log(order); // [[4.2, 0], [6.4, 1], [6.1, 2]] - * }); - * - * @example - * - * // object - * var order = []; - * var object = { a: 4.2, b: 6.4, c: 6.1 }; - * var iterator = function(num, done) { - * setTimeout(function() { - * order.push(num); - * done(null, Math.floor(num)); - * }, num * 10); - * }; - * async.groupBySeries(object, iterator, function(err, res) { - * console.log(res); // { '4': [4.2], '6': [6.4, 6.1] } - * console.log(order); // [4.2, 6.4, 6.1] - * }); - * - * @example - * - * // object with key - * var order = []; - * var object = { a: 4.2, b: 6.4, c: 6.1 }; - * var iterator = function(num, key, done) { - * setTimeout(function() { - * order.push([num, key]); - * done(null, Math.floor(num)); - * }, num * 10); - * }; - * async.groupBySeries(object, iterator, function(err, res) { - * console.log(res); // { '4': [4.2], '6': [6.4, 6.1] } - * console.log(order); // [[4.2, 'a'], [6.4, 'b'], [6.1, 'c']] - * }); - * - */ - function groupBySeries(collection, iterator, callback) { - callback = onlyOnce(callback || noop); - var size, key, value, keys, iter, item, iterate; - var sync = false; - var completed = 0; - var result = {}; - - if (isArray(collection)) { - size = collection.length; - iterate = iterator.length === 3 ? arrayIteratorWithIndex : arrayIterator; - } else if (!collection) { - } else if (iteratorSymbol && collection[iteratorSymbol]) { - size = Infinity; - iter = collection[iteratorSymbol](); - iterate = iterator.length === 3 ? symbolIteratorWithKey : symbolIterator; - } else if (typeof collection === obj) { - keys = nativeKeys(collection); - size = keys.length; - iterate = iterator.length === 3 ? objectIteratorWithKey : objectIterator; - } - if (!size) { - return callback(null, result); - } - iterate(); - - function arrayIterator() { - value = collection[completed]; - iterator(value, done); - } - - function arrayIteratorWithIndex() { - value = collection[completed]; - iterator(value, completed, done); - } - - function symbolIterator() { - item = iter.next(); - value = item.value; - item.done ? callback(null, result) : iterator(value, done); - } - - function symbolIteratorWithKey() { - item = iter.next(); - value = item.value; - item.done ? callback(null, result) : iterator(value, completed, done); - } - - function objectIterator() { - value = collection[keys[completed]]; - iterator(value, done); - } - - function objectIteratorWithKey() { - key = keys[completed]; - value = collection[key]; - iterator(value, key, done); - } - - function done(err, key) { - if (err) { - iterate = throwError; - callback = onlyOnce(callback); - callback(err, objectClone(result)); - return; - } - var array = result[key]; - if (!array) { - result[key] = [value]; - } else { - array.push(value); - } - if (++completed === size) { - iterate = throwError; - callback(null, result); - } else if (sync) { - nextTick(iterate); - } else { - sync = true; - iterate(); - } - sync = false; - } - } - - /** - * @memberof async - * @namespace groupByLimit - * @param {Array|Object} collection - * @param {Function} iterator - * @param {Function} callback - * @example - * - * // array - * var order = []; - * var array = [1.1, 5.9, 3.2, 3.9, 2.1]; - * var iterator = function(num, done) { - * setTimeout(function() { - * order.push(num); - * done(null, Math.floor(num)); - * }, num * 10); - * }; - * async.groupByLimit(array, 2, iterator, function(err, res) { - * console.log(res); // { '1': [1.1], '3': [3.2, 3.9], '5': [5.9], '2': [2.1] } - * console.log(order); // [1.1, 3.2, 5.9, 2.1, 3.9] - * }); - * - * @example - * - * // array with index - * var order = []; - * var array = [1.1, 5.9, 3.2, 3.9, 2.1]; - * var iterator = function(num, index, done) { - * setTimeout(function() { - * order.push([num, index]); - * done(null, Math.floor(num)); - * }, num * 10); - * }; - * async.groupByLimit(array, 2, iterator, function(err, res) { - * console.log(res); // { '1': [1.1], '3': [3.2, 3.9], '5': [5.9], '2': [2.1] } - * console.log(order); // [[1.1, 0], [3.2, 2], [5.9, 1], [2.1, 4], [3.9, 3]] - * }); - * - * @example - * - * // object - * var order = []; - * var object = { a: 1.1, b: 5.9, c: 3.2, d: 3.9, e: 2.1 } - * var iterator = function(num, done) { - * setTimeout(function() { - * order.push(num); - * done(null, Math.floor(num)); - * }, num * 10); - * }; - * async.groupByLimit(object, 2, iterator, function(err, res) { - * console.log(res); // { '1': [1.1], '3': [3.2, 3.9], '5': [5.9], '2': [2.1] } - * console.log(order); // [1.1, 3.2, 5.9, 2.1, 3.9] - * }); - * - * @example - * - * // object with key - * var order = []; - * var object = { a: 1.1, b: 5.9, c: 3.2, d: 3.9, e: 2.1 } - * var iterator = function(num, key, done) { - * setTimeout(function() { - * order.push([num, key]); - * done(null, Math.floor(num)); - * }, num * 10); - * }; - * async.groupByLimit(object, 2, iterator, function(err, res) { - * console.log(res); // { '1': [1.1], '3': [3.2, 3.9], '5': [5.9], '2': [2.1] } - * console.log(order); // [[1.1, 'a'], [3.2, 'c'], [5.9, 'b'], [2.1, 'e'], [3.9, 'd']] - * }); - * - */ - function groupByLimit(collection, limit, iterator, callback) { - callback = callback || noop; - var size, index, key, value, keys, iter, item, iterate; - var sync = false; - var started = 0; - var completed = 0; - var result = {}; - - if (isArray(collection)) { - size = collection.length; - iterate = iterator.length === 3 ? arrayIteratorWithIndex : arrayIterator; - } else if (!collection) { - } else if (iteratorSymbol && collection[iteratorSymbol]) { - size = Infinity; - iter = collection[iteratorSymbol](); - iterate = iterator.length === 3 ? symbolIteratorWithKey : symbolIterator; - } else if (typeof collection === obj) { - keys = nativeKeys(collection); - size = keys.length; - iterate = iterator.length === 3 ? objectIteratorWithKey : objectIterator; - } - if (!size || isNaN(limit) || limit < 1) { - return callback(null, result); - } - timesSync(limit > size ? size : limit, iterate); - - function arrayIterator() { - if (started < size) { - value = collection[started++]; - iterator(value, createCallback(value)); - } - } - - function arrayIteratorWithIndex() { - index = started++; - if (index < size) { - value = collection[index]; - iterator(value, index, createCallback(value)); - } - } - - function symbolIterator() { - item = iter.next(); - if (item.done === false) { - started++; - value = item.value; - iterator(value, createCallback(value)); - } else if (completed === started && iterator !== noop) { - iterator = noop; - callback(null, result); - } - } - - function symbolIteratorWithKey() { - item = iter.next(); - if (item.done === false) { - value = item.value; - iterator(value, started++, createCallback(value)); - } else if (completed === started && iterator !== noop) { - iterator = noop; - callback(null, result); - } - } - - function objectIterator() { - if (started < size) { - value = collection[keys[started++]]; - iterator(value, createCallback(value)); - } - } - - function objectIteratorWithKey() { - if (started < size) { - key = keys[started++]; - value = collection[key]; - iterator(value, key, createCallback(value)); - } - } - - function createCallback(value) { - var called = false; - return function(err, key) { - if (called) { - throwError(); - } - called = true; - if (err) { - iterate = noop; - callback = once(callback); - callback(err, objectClone(result)); - return; - } - var array = result[key]; - if (!array) { - result[key] = [value]; - } else { - array.push(value); - } - if (++completed === size) { - callback(null, result); - } else if (sync) { - nextTick(iterate); - } else { - sync = true; - iterate(); - } - sync = false; - }; - } - } - - /** - * @private - * @param {Function} arrayEach - * @param {Function} baseEach - */ - function createParallel(arrayEach, baseEach) { - return function parallel(tasks, callback) { - callback = callback || noop; - var size, keys, result; - var completed = 0; - - if (isArray(tasks)) { - size = tasks.length; - result = Array(size); - arrayEach(tasks, createCallback); - } else if (tasks && typeof tasks === obj) { - keys = nativeKeys(tasks); - size = keys.length; - result = {}; - baseEach(tasks, createCallback, keys); - } - if (!size) { - callback(null, result); - } - - function createCallback(key) { - return function(err, res) { - if (key === null) { - throwError(); - } - if (err) { - key = null; - callback = once(callback); - callback(err, result); - return; - } - result[key] = arguments.length <= 2 ? res : slice(arguments, 1); - key = null; - if (++completed === size) { - callback(null, result); - } - }; - } - }; - } - - /** - * @memberof async - * @namespace series - * @param {Array|Object} tasks - functions - * @param {Function} callback - * @example - * - * var order = []; - * var tasks = [ - * function(done) { - * setTimeout(function() { - * order.push(1); - * done(null, 1); - * }, 10); - * }, - * function(done) { - * setTimeout(function() { - * order.push(2); - * done(null, 2); - * }, 30); - * }, - * function(done) { - * setTimeout(function() { - * order.push(3); - * done(null, 3); - * }, 40); - * }, - * function(done) { - * setTimeout(function() { - * order.push(4); - * done(null, 4); - * }, 20); - * } - * ]; - * async.series(tasks, function(err, res) { - * console.log(res); // [1, 2, 3, 4]; - * console.log(order); // [1, 2, 3, 4] - * }); - * - * @example - * - * var order = []; - * var tasks = { - * 'a': function(done) { - * setTimeout(function() { - * order.push(1); - * done(null, 1); - * }, 10); - * }, - * 'b': function(done) { - * setTimeout(function() { - * order.push(2); - * done(null, 2); - * }, 30); - * }, - * 'c': function(done) { - * setTimeout(function() { - * order.push(3); - * done(null, 3); - * }, 40); - * }, - * 'd': function(done) { - * setTimeout(function() { - * order.push(4); - * done(null, 4); - * }, 20); - * } - * }; - * async.series(tasks, function(err, res) { - * console.log(res); // { a: 1, b: 2, c: 3, d:4 } - * console.log(order); // [1, 4, 2, 3] - * }); - * - */ - function series(tasks, callback) { - callback = callback || noop; - var size, key, keys, result, iterate; - var sync = false; - var completed = 0; - - if (isArray(tasks)) { - size = tasks.length; - result = Array(size); - iterate = arrayIterator; - } else if (tasks && typeof tasks === obj) { - keys = nativeKeys(tasks); - size = keys.length; - result = {}; - iterate = objectIterator; - } else { - return callback(null); - } - if (!size) { - return callback(null, result); - } - iterate(); - - function arrayIterator() { - key = completed; - tasks[completed](done); - } - - function objectIterator() { - key = keys[completed]; - tasks[key](done); - } - - function done(err, res) { - if (err) { - iterate = throwError; - callback = onlyOnce(callback); - callback(err, result); - return; - } - result[key] = arguments.length <= 2 ? res : slice(arguments, 1); - if (++completed === size) { - iterate = throwError; - callback(null, result); - } else if (sync) { - nextTick(iterate); - } else { - sync = true; - iterate(); - } - sync = false; - } - } - - /** - * @memberof async - * @namespace parallelLimit - * @param {Array|Object} tasks - functions - * @param {number} limit - limit >= 1 - * @param {Function} callback - * @example - * - * var order = []; - * var tasks = [ - * function(done) { - * setTimeout(function() { - * order.push(1); - * done(null, 1); - * }, 10); - * }, - * function(done) { - * setTimeout(function() { - * order.push(2); - * done(null, 2); - * }, 50); - * }, - * function(done) { - * setTimeout(function() { - * order.push(3); - * done(null, 3); - * }, 30); - * }, - * function(done) { - * setTimeout(function() { - * order.push(4); - * done(null, 4); - * }, 40); - * } - * ]; - * async.parallelLimit(tasks, 2, function(err, res) { - * console.log(res); // [1, 2, 3, 4]; - * console.log(order); // [1, 3, 2, 4] - * }); - * - * @example - * - * var order = []; - * var tasks = { - * 'a': function(done) { - * setTimeout(function() { - * order.push(1); - * done(null, 1); - * }, 10); - * }, - * 'b': function(done) { - * setTimeout(function() { - * order.push(2); - * done(null, 2); - * }, 50); - * }, - * 'c': function(done) { - * setTimeout(function() { - * order.push(3); - * done(null, 3); - * }, 20); - * }, - * 'd': function(done) { - * setTimeout(function() { - * order.push(4); - * done(null, 4); - * }, 40); - * } - * }; - * async.parallelLimit(tasks, 2, function(err, res) { - * console.log(res); // { a: 1, b: 2, c: 3, d:4 } - * console.log(order); // [1, 3, 2, 4] - * }); - * - */ - function parallelLimit(tasks, limit, callback) { - callback = callback || noop; - var size, index, key, keys, result, iterate; - var sync = false; - var started = 0; - var completed = 0; - - if (isArray(tasks)) { - size = tasks.length; - result = Array(size); - iterate = arrayIterator; - } else if (tasks && typeof tasks === obj) { - keys = nativeKeys(tasks); - size = keys.length; - result = {}; - iterate = objectIterator; - } - if (!size || isNaN(limit) || limit < 1) { - return callback(null, result); - } - timesSync(limit > size ? size : limit, iterate); - - function arrayIterator() { - index = started++; - if (index < size) { - tasks[index](createCallback(index)); - } - } - - function objectIterator() { - if (started < size) { - key = keys[started++]; - tasks[key](createCallback(key)); - } - } - - function createCallback(key) { - return function(err, res) { - if (key === null) { - throwError(); - } - if (err) { - key = null; - iterate = noop; - callback = once(callback); - callback(err, result); - return; - } - result[key] = arguments.length <= 2 ? res : slice(arguments, 1); - key = null; - if (++completed === size) { - callback(null, result); - } else if (sync) { - nextTick(iterate); - } else { - sync = true; - iterate(); - } - sync = false; - }; - } - } - - /** - * @memberof async - * @namespace tryEach - * @param {Array|Object} tasks - functions - * @param {Function} callback - * @example - * - * var tasks = [ - * function(done) { - * setTimeout(function() { - * done(new Error('error')); - * }, 10); - * }, - * function(done) { - * setTimeout(function() { - * done(null, 2); - * }, 10); - * } - * ]; - * async.tryEach(tasks, function(err, res) { - * console.log(res); // 2 - * }); - * - * @example - * - * var tasks = [ - * function(done) { - * setTimeout(function() { - * done(new Error('error1')); - * }, 10); - * }, - * function(done) { - * setTimeout(function() { - * done(new Error('error2'); - * }, 10); - * } - * ]; - * async.tryEach(tasks, function(err, res) { - * console.log(err); // error2 - * console.log(res); // undefined - * }); - * - */ - function tryEach(tasks, callback) { - callback = callback || noop; - var size, keys, iterate; - var sync = false; - var completed = 0; - - if (isArray(tasks)) { - size = tasks.length; - iterate = arrayIterator; - } else if (tasks && typeof tasks === obj) { - keys = nativeKeys(tasks); - size = keys.length; - iterate = objectIterator; - } - if (!size) { - return callback(null); - } - iterate(); - - function arrayIterator() { - tasks[completed](done); - } - - function objectIterator() { - tasks[keys[completed]](done); - } - - function done(err, res) { - if (!err) { - if (arguments.length <= 2) { - callback(null, res); - } else { - callback(null, slice(arguments, 1)); - } - } else if (++completed === size) { - callback(err); - } else { - sync = true; - iterate(); - } - sync = false; - } - } - - /** - * check for waterfall tasks - * @private - * @param {Array} tasks - * @param {Function} callback - * @return {boolean} - */ - function checkWaterfallTasks(tasks, callback) { - if (!isArray(tasks)) { - callback(new Error('First argument to waterfall must be an array of functions')); - return false; - } - if (tasks.length === 0) { - callback(null); - return false; - } - return true; - } - - /** - * check for waterfall tasks - * @private - * @param {function} func - * @param {Array|Object} args - arguments - * @return {function} next - */ - function waterfallIterator(func, args, next) { - switch (args.length) { - case 0: - case 1: - return func(next); - case 2: - return func(args[1], next); - case 3: - return func(args[1], args[2], next); - case 4: - return func(args[1], args[2], args[3], next); - case 5: - return func(args[1], args[2], args[3], args[4], next); - case 6: - return func(args[1], args[2], args[3], args[4], args[5], next); - default: - args = slice(args, 1); - args.push(next); - return func.apply(null, args); - } - } - - /** - * @memberof async - * @namespace waterfall - * @param {Array} tasks - functions - * @param {Function} callback - * @example - * - * var order = []; - * var tasks = [ - * function(next) { - * setTimeout(function() { - * order.push(1); - * next(null, 1); - * }, 10); - * }, - * function(arg1, next) { - * setTimeout(function() { - * order.push(2); - * next(null, 1, 2); - * }, 30); - * }, - * function(arg1, arg2, next) { - * setTimeout(function() { - * order.push(3); - * next(null, 3); - * }, 20); - * }, - * function(arg1, next) { - * setTimeout(function() { - * order.push(4); - * next(null, 1, 2, 3, 4); - * }, 40); - * } - * ]; - * async.waterfall(tasks, function(err, arg1, arg2, arg3, arg4) { - * console.log(arg1, arg2, arg3, arg4); // 1 2 3 4 - * }); - * - */ - function waterfall(tasks, callback) { - callback = callback || noop; - if (!checkWaterfallTasks(tasks, callback)) { - return; - } - var func, args, done, sync; - var completed = 0; - var size = tasks.length; - waterfallIterator(tasks[0], [], createCallback(0)); - - function iterate() { - waterfallIterator(func, args, createCallback(func)); - } - - function createCallback(index) { - return function next(err, res) { - if (index === undefined) { - callback = noop; - throwError(); - } - index = undefined; - if (err) { - done = callback; - callback = throwError; - done(err); - return; - } - if (++completed === size) { - done = callback; - callback = throwError; - if (arguments.length <= 2) { - done(err, res); - } else { - done.apply(null, createArray(arguments)); - } - return; - } - if (sync) { - args = arguments; - func = tasks[completed] || throwError; - nextTick(iterate); - } else { - sync = true; - waterfallIterator(tasks[completed] || throwError, arguments, createCallback(completed)); - } - sync = false; - }; - } - } - - /** - * `angelFall` is like `waterfall` and inject callback to last argument of next task. - * - * @memberof async - * @namespace angelFall - * @param {Array} tasks - functions - * @param {Function} callback - * @example - * - * var order = []; - * var tasks = [ - * function(next) { - * setTimeout(function() { - * order.push(1); - * next(null, 1); - * }, 10); - * }, - * function(arg1, empty, next) { - * setTimeout(function() { - * order.push(2); - * next(null, 1, 2); - * }, 30); - * }, - * function(next) { - * setTimeout(function() { - * order.push(3); - * next(null, 3); - * }, 20); - * }, - * function(arg1, empty1, empty2, empty3, next) { - * setTimeout(function() { - * order.push(4); - * next(null, 1, 2, 3, 4); - * }, 40); - * } - * ]; - * async.angelFall(tasks, function(err, arg1, arg2, arg3, arg4) { - * console.log(arg1, arg2, arg3, arg4); // 1 2 3 4 - * }); - * - */ - function angelFall(tasks, callback) { - callback = callback || noop; - if (!checkWaterfallTasks(tasks, callback)) { - return; - } - var completed = 0; - var sync = false; - var size = tasks.length; - var func = tasks[completed]; - var args = []; - var iterate = function() { - switch (func.length) { - case 0: - try { - next(null, func()); - } catch (e) { - next(e); - } - return; - case 1: - return func(next); - case 2: - return func(args[1], next); - case 3: - return func(args[1], args[2], next); - case 4: - return func(args[1], args[2], args[3], next); - case 5: - return func(args[1], args[2], args[3], args[4], next); - default: - args = slice(args, 1); - args[func.length - 1] = next; - return func.apply(null, args); - } - }; - iterate(); - - function next(err, res) { - if (err) { - iterate = throwError; - callback = onlyOnce(callback); - callback(err); - return; - } - if (++completed === size) { - iterate = throwError; - var done = callback; - callback = throwError; - if (arguments.length === 2) { - done(err, res); - } else { - done.apply(null, createArray(arguments)); - } - return; - } - func = tasks[completed]; - args = arguments; - if (sync) { - nextTick(iterate); - } else { - sync = true; - iterate(); - } - sync = false; - } - } - - /** - * @memberof async - * @namespace whilst - * @param {Function} test - * @param {Function} iterator - * @param {Function} callback - */ - function whilst(test, iterator, callback) { - callback = callback || noop; - var sync = false; - if (test()) { - iterate(); - } else { - callback(null); - } - - function iterate() { - if (sync) { - nextTick(next); - } else { - sync = true; - iterator(done); - } - sync = false; - } - - function next() { - iterator(done); - } - - function done(err, arg) { - if (err) { - return callback(err); - } - if (arguments.length <= 2) { - if (test(arg)) { - iterate(); - } else { - callback(null, arg); - } - return; - } - arg = slice(arguments, 1); - if (test.apply(null, arg)) { - iterate(); - } else { - callback.apply(null, [null].concat(arg)); - } - } - } - - /** - * @memberof async - * @namespace doWhilst - * @param {Function} iterator - * @param {Function} test - * @param {Function} callback - */ - function doWhilst(iterator, test, callback) { - callback = callback || noop; - var sync = false; - next(); - - function iterate() { - if (sync) { - nextTick(next); - } else { - sync = true; - iterator(done); - } - sync = false; - } - - function next() { - iterator(done); - } - - function done(err, arg) { - if (err) { - return callback(err); - } - if (arguments.length <= 2) { - if (test(arg)) { - iterate(); - } else { - callback(null, arg); - } - return; - } - arg = slice(arguments, 1); - if (test.apply(null, arg)) { - iterate(); - } else { - callback.apply(null, [null].concat(arg)); - } - } - } - - /** - * @memberof async - * @namespace until - * @param {Function} test - * @param {Function} iterator - * @param {Function} callback - */ - function until(test, iterator, callback) { - callback = callback || noop; - var sync = false; - if (!test()) { - iterate(); - } else { - callback(null); - } - - function iterate() { - if (sync) { - nextTick(next); - } else { - sync = true; - iterator(done); - } - sync = false; - } - - function next() { - iterator(done); - } - - function done(err, arg) { - if (err) { - return callback(err); - } - if (arguments.length <= 2) { - if (!test(arg)) { - iterate(); - } else { - callback(null, arg); - } - return; - } - arg = slice(arguments, 1); - if (!test.apply(null, arg)) { - iterate(); - } else { - callback.apply(null, [null].concat(arg)); - } - } - } - - /** - * @memberof async - * @namespace doUntil - * @param {Function} iterator - * @param {Function} test - * @param {Function} callback - */ - function doUntil(iterator, test, callback) { - callback = callback || noop; - var sync = false; - next(); - - function iterate() { - if (sync) { - nextTick(next); - } else { - sync = true; - iterator(done); - } - sync = false; - } - - function next() { - iterator(done); - } - - function done(err, arg) { - if (err) { - return callback(err); - } - if (arguments.length <= 2) { - if (!test(arg)) { - iterate(); - } else { - callback(null, arg); - } - return; - } - arg = slice(arguments, 1); - if (!test.apply(null, arg)) { - iterate(); - } else { - callback.apply(null, [null].concat(arg)); - } - } - } - - /** - * @memberof async - * @namespace during - * @param {Function} test - * @param {Function} iterator - * @param {Function} callback - */ - function during(test, iterator, callback) { - callback = callback || noop; - _test(); - - function _test() { - test(iterate); - } - - function iterate(err, truth) { - if (err) { - return callback(err); - } - if (truth) { - iterator(done); - } else { - callback(null); - } - } - - function done(err) { - if (err) { - return callback(err); - } - _test(); - } - } - - /** - * @memberof async - * @namespace doDuring - * @param {Function} test - * @param {Function} iterator - * @param {Function} callback - */ - function doDuring(iterator, test, callback) { - callback = callback || noop; - iterate(null, true); - - function iterate(err, truth) { - if (err) { - return callback(err); - } - if (truth) { - iterator(done); - } else { - callback(null); - } - } - - function done(err, res) { - if (err) { - return callback(err); - } - switch (arguments.length) { - case 0: - case 1: - test(iterate); - break; - case 2: - test(res, iterate); - break; - default: - var args = slice(arguments, 1); - args.push(iterate); - test.apply(null, args); - break; - } - } - } - - /** - * @memberof async - * @namespace forever - */ - function forever(iterator, callback) { - var sync = false; - iterate(); - - function iterate() { - iterator(next); - } - - function next(err) { - if (err) { - if (callback) { - return callback(err); - } - throw err; - } - if (sync) { - nextTick(iterate); - } else { - sync = true; - iterate(); - } - sync = false; - } - } - - /** - * @memberof async - * @namespace compose - */ - function compose() { - return seq.apply(null, reverse(arguments)); - } - - /** - * @memberof async - * @namespace seq - */ - function seq(/* functions... */) { - var fns = createArray(arguments); - - return function() { - var self = this; - var args = createArray(arguments); - var callback = args[args.length - 1]; - if (typeof callback === func) { - args.pop(); - } else { - callback = noop; - } - reduce(fns, args, iterator, done); - - function iterator(newargs, fn, callback) { - var func = function(err) { - var nextargs = slice(arguments, 1); - callback(err, nextargs); - }; - newargs.push(func); - fn.apply(self, newargs); - } - - function done(err, res) { - res = isArray(res) ? res : [res]; - res.unshift(err); - callback.apply(self, res); - } - }; - } - - function createApplyEach(func) { - return function applyEach(fns /* arguments */) { - var go = function() { - var self = this; - var args = createArray(arguments); - var callback = args.pop() || noop; - return func(fns, iterator, callback); - - function iterator(fn, done) { - fn.apply(self, args.concat([done])); - } - }; - if (arguments.length > 1) { - var args = slice(arguments, 1); - return go.apply(this, args); - } else { - return go; - } - }; - } - - /** - * @see https://github.com/caolan/async/blob/master/lib/internal/DoublyLinkedList.js - */ - function DLL() { - this.head = null; - this.tail = null; - this.length = 0; - } - - DLL.prototype._removeLink = function(node) { - var prev = node.prev; - var next = node.next; - if (prev) { - prev.next = next; - } else { - this.head = next; - } - if (next) { - next.prev = prev; - } else { - this.tail = prev; - } - node.prev = null; - node.next = null; - this.length--; - return node; - }; - - DLL.prototype.empty = DLL; - - DLL.prototype._setInitial = function(node) { - this.length = 1; - this.head = this.tail = node; - }; - - DLL.prototype.insertBefore = function(node, newNode) { - newNode.prev = node.prev; - newNode.next = node; - if (node.prev) { - node.prev.next = newNode; - } else { - this.head = newNode; - } - node.prev = newNode; - this.length++; - }; - - DLL.prototype.unshift = function(node) { - if (this.head) { - this.insertBefore(this.head, node); - } else { - this._setInitial(node); - } - }; - - DLL.prototype.push = function(node) { - var tail = this.tail; - if (tail) { - node.prev = tail; - node.next = tail.next; - this.tail = node; - tail.next = node; - this.length++; - } else { - this._setInitial(node); - } - }; - - DLL.prototype.shift = function() { - return this.head && this._removeLink(this.head); - }; - - DLL.prototype.splice = function(end) { - var task; - var tasks = []; - while (end-- && (task = this.shift())) { - tasks.push(task); - } - return tasks; - }; - - DLL.prototype.remove = function(test) { - var node = this.head; - while (node) { - if (test(node)) { - this._removeLink(node); - } - node = node.next; - } - return this; - }; - - /** - * @private - */ - function baseQueue(isQueue, worker, concurrency, payload) { - if (concurrency === undefined) { - concurrency = 1; - } else if (isNaN(concurrency) || concurrency < 1) { - throw new Error('Concurrency must not be zero'); - } - - var workers = 0; - var workersList = []; - var _callback, _unshift; - - var q = { - _tasks: new DLL(), - concurrency: concurrency, - payload: payload, - saturated: noop, - unsaturated: noop, - buffer: concurrency / 4, - empty: noop, - drain: noop, - error: noop, - started: false, - paused: false, - push: push, - kill: kill, - unshift: unshift, - remove: remove, - process: isQueue ? runQueue : runCargo, - length: getLength, - running: running, - workersList: getWorkersList, - idle: idle, - pause: pause, - resume: resume, - _worker: worker - }; - return q; - - function push(tasks, callback) { - _insert(tasks, callback); - } - - function unshift(tasks, callback) { - _insert(tasks, callback, true); - } - - function _exec(task) { - var item = { - data: task, - callback: _callback - }; - if (_unshift) { - q._tasks.unshift(item); - } else { - q._tasks.push(item); - } - nextTick(q.process); - } - - function _insert(tasks, callback, unshift) { - if (callback == null) { - callback = noop; - } else if (typeof callback !== 'function') { - throw new Error('task callback must be a function'); - } - q.started = true; - var _tasks = isArray(tasks) ? tasks : [tasks]; - - if (tasks === undefined || !_tasks.length) { - if (q.idle()) { - nextTick(q.drain); - } - return; - } - - _unshift = unshift; - _callback = callback; - arrayEachSync(_tasks, _exec); - } - - function kill() { - q.drain = noop; - q._tasks.empty(); - } - - function _next(q, tasks) { - var called = false; - return function done(err, res) { - if (called) { - throwError(); - } - called = true; - - workers--; - var task; - var index = -1; - var size = workersList.length; - var taskIndex = -1; - var taskSize = tasks.length; - var useApply = arguments.length > 2; - var args = useApply && createArray(arguments); - while (++taskIndex < taskSize) { - task = tasks[taskIndex]; - while (++index < size) { - if (workersList[index] === task) { - if (index === 0) { - workersList.shift(); - } else { - workersList.splice(index, 1); - } - index = size; - size--; - } - } - index = -1; - if (useApply) { - task.callback.apply(task, args); - } else { - task.callback(err, res); - } - if (err) { - q.error(err, task.data); - } - } - - if (workers <= q.concurrency - q.buffer) { - q.unsaturated(); - } - - if (q._tasks.length + workers === 0) { - q.drain(); - } - q.process(); - }; - } - - function runQueue() { - while (!q.paused && workers < q.concurrency && q._tasks.length) { - var task = q._tasks.shift(); - workers++; - workersList.push(task); - if (q._tasks.length === 0) { - q.empty(); - } - if (workers === q.concurrency) { - q.saturated(); - } - var done = _next(q, [task]); - worker(task.data, done); - } - } - - function runCargo() { - while (!q.paused && workers < q.concurrency && q._tasks.length) { - var tasks = q._tasks.splice(q.payload || q._tasks.length); - var index = -1; - var size = tasks.length; - var data = Array(size); - while (++index < size) { - data[index] = tasks[index].data; - } - workers++; - nativePush.apply(workersList, tasks); - if (q._tasks.length === 0) { - q.empty(); - } - if (workers === q.concurrency) { - q.saturated(); - } - var done = _next(q, tasks); - worker(data, done); - } - } - - function getLength() { - return q._tasks.length; - } - - function running() { - return workers; - } - - function getWorkersList() { - return workersList; - } - - function idle() { - return q.length() + workers === 0; - } - - function pause() { - q.paused = true; - } - - function _resume() { - nextTick(q.process); - } - - function resume() { - if (q.paused === false) { - return; - } - q.paused = false; - var count = q.concurrency < q._tasks.length ? q.concurrency : q._tasks.length; - timesSync(count, _resume); - } - - /** - * @param {Function} test - */ - function remove(test) { - q._tasks.remove(test); - } - } - - /** - * @memberof async - * @namespace queue - */ - function queue(worker, concurrency) { - return baseQueue(true, worker, concurrency); - } - - /** - * @memberof async - * @namespace priorityQueue - */ - function priorityQueue(worker, concurrency) { - var q = baseQueue(true, worker, concurrency); - q.push = push; - delete q.unshift; - return q; - - function push(tasks, priority, callback) { - q.started = true; - priority = priority || 0; - var _tasks = isArray(tasks) ? tasks : [tasks]; - var taskSize = _tasks.length; - - if (tasks === undefined || taskSize === 0) { - if (q.idle()) { - nextTick(q.drain); - } - return; - } - - callback = typeof callback === func ? callback : noop; - var nextNode = q._tasks.head; - while (nextNode && priority >= nextNode.priority) { - nextNode = nextNode.next; - } - while (taskSize--) { - var item = { - data: _tasks[taskSize], - priority: priority, - callback: callback - }; - if (nextNode) { - q._tasks.insertBefore(nextNode, item); - } else { - q._tasks.push(item); - } - nextTick(q.process); - } - } - } - - /** - * @memberof async - * @namespace cargo - */ - function cargo(worker, payload) { - return baseQueue(false, worker, 1, payload); - } - - /** - * @memberof async - * @namespace auto - * @param {Object} tasks - * @param {number} [concurrency] - * @param {Function} [callback] - */ - function auto(tasks, concurrency, callback) { - if (typeof concurrency === func) { - callback = concurrency; - concurrency = null; - } - var keys = nativeKeys(tasks); - var rest = keys.length; - var results = {}; - if (rest === 0) { - return callback(null, results); - } - var runningTasks = 0; - var readyTasks = []; - var listeners = Object.create(null); - callback = onlyOnce(callback || noop); - concurrency = concurrency || rest; - - baseEachSync(tasks, iterator, keys); - proceedQueue(); - - function iterator(task, key) { - // no dependencies - var _task, _taskSize; - if (!isArray(task)) { - _task = task; - _taskSize = 0; - readyTasks.push([_task, _taskSize, done]); - return; - } - var dependencySize = task.length - 1; - _task = task[dependencySize]; - _taskSize = dependencySize; - if (dependencySize === 0) { - readyTasks.push([_task, _taskSize, done]); - return; - } - // dependencies - var index = -1; - while (++index < dependencySize) { - var dependencyName = task[index]; - if (notInclude(keys, dependencyName)) { - var msg = - 'async.auto task `' + - key + - '` has non-existent dependency `' + - dependencyName + - '` in ' + - task.join(', '); - throw new Error(msg); - } - var taskListeners = listeners[dependencyName]; - if (!taskListeners) { - taskListeners = listeners[dependencyName] = []; - } - taskListeners.push(taskListener); - } - - function done(err, arg) { - if (key === null) { - throwError(); - } - arg = arguments.length <= 2 ? arg : slice(arguments, 1); - if (err) { - rest = 0; - runningTasks = 0; - readyTasks.length = 0; - var safeResults = objectClone(results); - safeResults[key] = arg; - key = null; - var _callback = callback; - callback = noop; - _callback(err, safeResults); - return; - } - runningTasks--; - rest--; - results[key] = arg; - taskComplete(key); - key = null; - } - - function taskListener() { - if (--dependencySize === 0) { - readyTasks.push([_task, _taskSize, done]); - } - } - } - - function proceedQueue() { - if (readyTasks.length === 0 && runningTasks === 0) { - if (rest !== 0) { - throw new Error('async.auto task has cyclic dependencies'); - } - return callback(null, results); - } - while (readyTasks.length && runningTasks < concurrency && callback !== noop) { - runningTasks++; - var array = readyTasks.shift(); - if (array[1] === 0) { - array[0](array[2]); - } else { - array[0](results, array[2]); - } - } - } - - function taskComplete(key) { - var taskListeners = listeners[key] || []; - arrayEachSync(taskListeners, function(task) { - task(); - }); - proceedQueue(); - } - } - - var FN_ARGS = /^(function)?\s*[^\(]*\(\s*([^\)]*)\)/m; - var FN_ARG_SPLIT = /,/; - var FN_ARG = /(=.+)?(\s*)$/; - var STRIP_COMMENTS = /((\/\/.*$)|(\/\*[\s\S]*?\*\/))/gm; - - /** - * parse function arguments for `autoInject` - * - * @private - */ - function parseParams(func) { - func = func.toString().replace(STRIP_COMMENTS, ''); - func = func.match(FN_ARGS)[2].replace(' ', ''); - func = func ? func.split(FN_ARG_SPLIT) : []; - func = func.map(function(arg) { - return arg.replace(FN_ARG, '').trim(); - }); - return func; - } - - /** - * @memberof async - * @namespace autoInject - * @param {Object} tasks - * @param {number} [concurrency] - * @param {Function} [callback] - */ - function autoInject(tasks, concurrency, callback) { - var newTasks = {}; - baseEachSync(tasks, iterator, nativeKeys(tasks)); - auto(newTasks, concurrency, callback); - - function iterator(task, key) { - var params; - var taskLength = task.length; - - if (isArray(task)) { - if (taskLength === 0) { - throw new Error('autoInject task functions require explicit parameters.'); - } - params = createArray(task); - taskLength = params.length - 1; - task = params[taskLength]; - if (taskLength === 0) { - newTasks[key] = task; - return; - } - } else if (taskLength === 1) { - newTasks[key] = task; - return; - } else { - params = parseParams(task); - if (taskLength === 0 && params.length === 0) { - throw new Error('autoInject task functions require explicit parameters.'); - } - taskLength = params.length - 1; - } - params[taskLength] = newTask; - newTasks[key] = params; - - function newTask(results, done) { - switch (taskLength) { - case 1: - task(results[params[0]], done); - break; - case 2: - task(results[params[0]], results[params[1]], done); - break; - case 3: - task(results[params[0]], results[params[1]], results[params[2]], done); - break; - default: - var i = -1; - while (++i < taskLength) { - params[i] = results[params[i]]; - } - params[i] = done; - task.apply(null, params); - break; - } - } - } - } - - /** - * @memberof async - * @namespace retry - * @param {integer|Object|Function} opts - * @param {Function} [task] - * @param {Function} [callback] - */ - function retry(opts, task, callback) { - var times, intervalFunc, errorFilter; - var count = 0; - if (arguments.length < 3 && typeof opts === func) { - callback = task || noop; - task = opts; - opts = null; - times = DEFAULT_TIMES; - } else { - callback = callback || noop; - switch (typeof opts) { - case 'object': - if (typeof opts.errorFilter === func) { - errorFilter = opts.errorFilter; - } - var interval = opts.interval; - switch (typeof interval) { - case func: - intervalFunc = interval; - break; - case 'string': - case 'number': - interval = +interval; - intervalFunc = interval - ? function() { - return interval; - } - : function() { - return DEFAULT_INTERVAL; - }; - break; - } - times = +opts.times || DEFAULT_TIMES; - break; - case 'number': - times = opts || DEFAULT_TIMES; - break; - case 'string': - times = +opts || DEFAULT_TIMES; - break; - default: - throw new Error('Invalid arguments for async.retry'); - } - } - if (typeof task !== 'function') { - throw new Error('Invalid arguments for async.retry'); - } - - if (intervalFunc) { - task(intervalCallback); - } else { - task(simpleCallback); - } - - function simpleIterator() { - task(simpleCallback); - } - - function simpleCallback(err, res) { - if (++count === times || !err || (errorFilter && !errorFilter(err))) { - if (arguments.length <= 2) { - return callback(err, res); - } - var args = createArray(arguments); - return callback.apply(null, args); - } - simpleIterator(); - } - - function intervalIterator() { - task(intervalCallback); - } - - function intervalCallback(err, res) { - if (++count === times || !err || (errorFilter && !errorFilter(err))) { - if (arguments.length <= 2) { - return callback(err, res); - } - var args = createArray(arguments); - return callback.apply(null, args); - } - setTimeout(intervalIterator, intervalFunc(count)); - } - } - - function retryable(opts, task) { - if (!task) { - task = opts; - opts = null; - } - return done; - - function done() { - var taskFn; - var args = createArray(arguments); - var lastIndex = args.length - 1; - var callback = args[lastIndex]; - switch (task.length) { - case 1: - taskFn = task1; - break; - case 2: - taskFn = task2; - break; - case 3: - taskFn = task3; - break; - default: - taskFn = task4; - } - if (opts) { - retry(opts, taskFn, callback); - } else { - retry(taskFn, callback); - } - - function task1(done) { - task(done); - } - - function task2(done) { - task(args[0], done); - } - - function task3(done) { - task(args[0], args[1], done); - } - - function task4(callback) { - args[lastIndex] = callback; - task.apply(null, args); - } - } - } - - /** - * @memberof async - * @namespace iterator - */ - function iterator(tasks) { - var size = 0; - var keys = []; - if (isArray(tasks)) { - size = tasks.length; - } else { - keys = nativeKeys(tasks); - size = keys.length; - } - return makeCallback(0); - - function makeCallback(index) { - var fn = function() { - if (size) { - var key = keys[index] || index; - tasks[key].apply(null, createArray(arguments)); - } - return fn.next(); - }; - fn.next = function() { - return index < size - 1 ? makeCallback(index + 1) : null; - }; - return fn; - } - } - - /** - * @memberof async - * @namespace apply - */ - function apply(func) { - switch (arguments.length) { - case 0: - case 1: - return func; - case 2: - return func.bind(null, arguments[1]); - case 3: - return func.bind(null, arguments[1], arguments[2]); - case 4: - return func.bind(null, arguments[1], arguments[2], arguments[3]); - case 5: - return func.bind(null, arguments[1], arguments[2], arguments[3], arguments[4]); - default: - var size = arguments.length; - var index = 0; - var args = Array(size); - args[index] = null; - while (++index < size) { - args[index] = arguments[index]; - } - return func.bind.apply(func, args); - } - } - - /** - * @memberof async - * @namespace timeout - * @param {Function} func - * @param {number} millisec - * @param {*} info - */ - function timeout(func, millisec, info) { - var callback, timer; - return wrappedFunc; - - function wrappedFunc() { - timer = setTimeout(timeoutCallback, millisec); - var args = createArray(arguments); - var lastIndex = args.length - 1; - callback = args[lastIndex]; - args[lastIndex] = injectedCallback; - simpleApply(func, args); - } - - function timeoutCallback() { - var name = func.name || 'anonymous'; - var err = new Error('Callback function "' + name + '" timed out.'); - err.code = 'ETIMEDOUT'; - if (info) { - err.info = info; - } - timer = null; - callback(err); - } - - function injectedCallback() { - if (timer !== null) { - simpleApply(callback, createArray(arguments)); - clearTimeout(timer); - } - } - - function simpleApply(func, args) { - switch (args.length) { - case 0: - func(); - break; - case 1: - func(args[0]); - break; - case 2: - func(args[0], args[1]); - break; - default: - func.apply(null, args); - break; - } - } - } - - /** - * @memberof async - * @namespace times - * @param {number} n - n >= 1 - * @param {Function} iterator - * @param {Function} callback - * @example - * - * var iterator = function(n, done) { - * done(null, n); - * }; - * async.times(4, iterator, function(err, res) { - * console.log(res); // [0, 1, 2, 3]; - * }); - * - */ - function times(n, iterator, callback) { - callback = callback || noop; - n = +n; - if (isNaN(n) || n < 1) { - return callback(null, []); - } - var result = Array(n); - timesSync(n, iterate); - - function iterate(num) { - iterator(num, createCallback(num)); - } - - function createCallback(index) { - return function(err, res) { - if (index === null) { - throwError(); - } - result[index] = res; - index = null; - if (err) { - callback(err); - callback = noop; - } else if (--n === 0) { - callback(null, result); - } - }; - } - } - - /** - * @memberof async - * @namespace timesSeries - * @param {number} n - n >= 1 - * @param {Function} iterator - * @param {Function} callback - * @example - * - * var iterator = function(n, done) { - * done(null, n); - * }; - * async.timesSeries(4, iterator, function(err, res) { - * console.log(res); // [0, 1, 2, 3]; - * }); - * - */ - function timesSeries(n, iterator, callback) { - callback = callback || noop; - n = +n; - if (isNaN(n) || n < 1) { - return callback(null, []); - } - var result = Array(n); - var sync = false; - var completed = 0; - iterate(); - - function iterate() { - iterator(completed, done); - } - - function done(err, res) { - result[completed] = res; - if (err) { - callback(err); - callback = throwError; - } else if (++completed >= n) { - callback(null, result); - callback = throwError; - } else if (sync) { - nextTick(iterate); - } else { - sync = true; - iterate(); - } - sync = false; - } - } - - /** - * @memberof async - * @namespace timesLimit - * @param {number} n - n >= 1 - * @param {number} limit - n >= 1 - * @param {Function} iterator - * @param {Function} callback - * @example - * - * var iterator = function(n, done) { - * done(null, n); - * }; - * async.timesLimit(4, 2, iterator, function(err, res) { - * console.log(res); // [0, 1, 2, 3]; - * }); - * - */ - function timesLimit(n, limit, iterator, callback) { - callback = callback || noop; - n = +n; - if (isNaN(n) || n < 1 || isNaN(limit) || limit < 1) { - return callback(null, []); - } - var result = Array(n); - var sync = false; - var started = 0; - var completed = 0; - timesSync(limit > n ? n : limit, iterate); - - function iterate() { - var index = started++; - if (index < n) { - iterator(index, createCallback(index)); - } - } - - function createCallback(index) { - return function(err, res) { - if (index === null) { - throwError(); - } - result[index] = res; - index = null; - if (err) { - callback(err); - callback = noop; - } else if (++completed >= n) { - callback(null, result); - callback = throwError; - } else if (sync) { - nextTick(iterate); - } else { - sync = true; - iterate(); - } - sync = false; - }; - } - } - - /** - * @memberof async - * @namespace race - * @param {Array|Object} tasks - functions - * @param {Function} callback - * @example - * - * // array - * var called = 0; - * var tasks = [ - * function(done) { - * setTimeout(function() { - * called++; - * done(null, '1'); - * }, 30); - * }, - * function(done) { - * setTimeout(function() { - * called++; - * done(null, '2'); - * }, 20); - * }, - * function(done) { - * setTimeout(function() { - * called++; - * done(null, '3'); - * }, 10); - * } - * ]; - * async.race(tasks, function(err, res) { - * console.log(res); // '3' - * console.log(called); // 1 - * setTimeout(function() { - * console.log(called); // 3 - * }, 50); - * }); - * - * @example - * - * // object - * var called = 0; - * var tasks = { - * 'test1': function(done) { - * setTimeout(function() { - * called++; - * done(null, '1'); - * }, 30); - * }, - * 'test2': function(done) { - * setTimeout(function() { - * called++; - * done(null, '2'); - * }, 20); - * }, - * 'test3': function(done) { - * setTimeout(function() { - * called++; - * done(null, '3'); - * }, 10); - * } - * }; - * async.race(tasks, function(err, res) { - * console.log(res); // '3' - * console.log(called); // 1 - * setTimeout(function() { - * console.log(called); // 3 - * done(); - * }, 50); - * }); - * - */ - function race(tasks, callback) { - callback = once(callback || noop); - var size, keys; - var index = -1; - if (isArray(tasks)) { - size = tasks.length; - while (++index < size) { - tasks[index](callback); - } - } else if (tasks && typeof tasks === obj) { - keys = nativeKeys(tasks); - size = keys.length; - while (++index < size) { - tasks[keys[index]](callback); - } - } else { - return callback(new TypeError('First argument to race must be a collection of functions')); - } - if (!size) { - callback(null); - } - } - - /** - * @memberof async - * @namespace memoize - */ - function memoize(fn, hasher) { - hasher = - hasher || - function(hash) { - return hash; - }; - - var memo = {}; - var queues = {}; - var memoized = function() { - var args = createArray(arguments); - var callback = args.pop(); - var key = hasher.apply(null, args); - if (has(memo, key)) { - nextTick(function() { - callback.apply(null, memo[key]); - }); - return; - } - if (has(queues, key)) { - return queues[key].push(callback); - } - - queues[key] = [callback]; - args.push(done); - fn.apply(null, args); - - function done(err) { - var args = createArray(arguments); - if (!err) { - memo[key] = args; - } - var q = queues[key]; - delete queues[key]; - - var i = -1; - var size = q.length; - while (++i < size) { - q[i].apply(null, args); - } - } - }; - memoized.memo = memo; - memoized.unmemoized = fn; - return memoized; - } - - /** - * @memberof async - * @namespace unmemoize - */ - function unmemoize(fn) { - return function() { - return (fn.unmemoized || fn).apply(null, arguments); - }; - } - - /** - * @memberof async - * @namespace ensureAsync - */ - function ensureAsync(fn) { - return function(/* ...args, callback */) { - var args = createArray(arguments); - var lastIndex = args.length - 1; - var callback = args[lastIndex]; - var sync = true; - args[lastIndex] = done; - fn.apply(this, args); - sync = false; - - function done() { - var innerArgs = createArray(arguments); - if (sync) { - nextTick(function() { - callback.apply(null, innerArgs); - }); - } else { - callback.apply(null, innerArgs); - } - } - }; - } - - /** - * @memberof async - * @namespace constant - */ - function constant(/* values... */) { - var args = [null].concat(createArray(arguments)); - return function(callback) { - callback = arguments[arguments.length - 1]; - callback.apply(this, args); - }; - } - - function asyncify(fn) { - return function(/* args..., callback */) { - var args = createArray(arguments); - var callback = args.pop(); - var result; - try { - result = fn.apply(this, args); - } catch (e) { - return callback(e); - } - if (result && typeof result.then === func) { - result.then( - function(value) { - invokeCallback(callback, null, value); - }, - function(err) { - invokeCallback(callback, err && err.message ? err : new Error(err)); - } - ); - } else { - callback(null, result); - } - }; - } - - function invokeCallback(callback, err, value) { - try { - callback(err, value); - } catch (e) { - nextTick(rethrow, e); - } - } - - function rethrow(error) { - throw error; - } - - /** - * @memberof async - * @namespace reflect - * @param {Function} func - * @return {Function} - */ - function reflect(func) { - return function(/* args..., callback */) { - var callback; - switch (arguments.length) { - case 1: - callback = arguments[0]; - return func(done); - case 2: - callback = arguments[1]; - return func(arguments[0], done); - default: - var args = createArray(arguments); - var lastIndex = args.length - 1; - callback = args[lastIndex]; - args[lastIndex] = done; - func.apply(this, args); - } - - function done(err, res) { - if (err) { - return callback(null, { - error: err - }); - } - if (arguments.length > 2) { - res = slice(arguments, 1); - } - callback(null, { - value: res - }); - } - }; - } - - /** - * @memberof async - * @namespace reflectAll - * @param {Array[]|Object} tasks - * @return {Function} - */ - function reflectAll(tasks) { - var newTasks, keys; - if (isArray(tasks)) { - newTasks = Array(tasks.length); - arrayEachSync(tasks, iterate); - } else if (tasks && typeof tasks === obj) { - keys = nativeKeys(tasks); - newTasks = {}; - baseEachSync(tasks, iterate, keys); - } - return newTasks; - - function iterate(func, key) { - newTasks[key] = reflect(func); - } - } - - /** - * @memberof async - * @namespace createLogger - */ - function createLogger(name) { - return function(fn) { - var args = slice(arguments, 1); - args.push(done); - fn.apply(null, args); - }; - - function done(err) { - if (typeof console === obj) { - if (err) { - if (console.error) { - console.error(err); - } - return; - } - if (console[name]) { - var args = slice(arguments, 1); - arrayEachSync(args, function(arg) { - console[name](arg); - }); - } - } - } - } - - /** - * @memberof async - * @namespace safe - */ - function safe() { - createImmediate(); - return exports; - } - - /** - * @memberof async - * @namespace fast - */ - function fast() { - createImmediate(false); - return exports; - } -}); diff --git a/node_modules/neo-async/async.min.js b/node_modules/neo-async/async.min.js deleted file mode 100644 index ee74f08ef..000000000 --- a/node_modules/neo-async/async.min.js +++ /dev/null @@ -1,80 +0,0 @@ -(function(N,O){"object"===typeof exports&&"undefined"!==typeof module?O(exports):"function"===typeof define&&define.amd?define(["exports"],O):N.async?O(N.neo_async=N.neo_async||{}):O(N.async=N.async||{})})(this,function(N){function O(a){var c=function(a){var d=J(arguments,1);setTimeout(function(){a.apply(null,d)})};T="function"===typeof setImmediate?setImmediate:c;"object"===typeof process&&"function"===typeof process.nextTick?(D=/^v0.10/.test(process.version)?T:process.nextTick,ba=/^v0/.test(process.version)? -T:process.nextTick):ba=D=T;!1===a&&(D=function(a){a()})}function H(a){for(var c=-1,b=a.length,d=Array(b);++c=d)return[];for(var e=Array(d);++bd[e]){var g=d[f]; -d[f]=d[e];d[e]=g}}if(!(e>b)){for(var l,e=a[a[c]>a[e]?c:e],f=c,g=b;f<=g;){for(l=f;f=l&&a[g]>=e;)g--;if(f>g)break;var q=a;l=d;var s=f++,h=g--,k=q[s];q[s]=q[h];q[h]=k;q=l[s];l[s]=l[h];l[h]=q}e=f;ca(a,c,e-1,d);ca(a,e,b,d)}}}function S(a){var c=[];Q(a,function(a){a!==w&&(C(a)?X.apply(c,a):c.push(a))});return c}function da(a,c,b){var d=-1,e=a.length;if(3===c.length)for(;++db)return e(null,[]);y=y||Array(m);K(b>m?m:b,x)}}function Y(a,c,b){function d(){c(a[v],s)}function e(){c(a[v],v,s)}function f(){n=r.next();n.done?b(null):c(n.value,s)}function g(){n=r.next();n.done?b(null):c(n.value,v,s)}function l(){c(a[m[v]],s)}function q(){k=m[v];c(a[k],k,s)}function s(a,d){a?b(a):++v===h||!1===d?(p=A,b(null)):u?D(p): -(u=!0,p());u=!1}b=E(b||w);var h,k,m,r,n,p,u=!1,v=0;C(a)?(h=a.length,p=3===c.length?e:d):a&&(z&&a[z]?(h=Infinity,r=a[z](),p=3===c.length?g:f):"object"===typeof a&&(m=F(a),h=m.length,p=3===c.length?q:l));if(!h)return b(null);p()}function Z(a,c,b,d){function e(){xc)return d(null);K(c>k?k:c,v)}function za(a,c,b){function d(){c(a[t],s)}function e(){c(a[t],t,s)}function f(){n=r.next(); -n.done?b(null,p):c(n.value,s)}function g(){n=r.next();n.done?b(null,p):c(n.value,t,s)}function l(){c(a[m[t]],s)}function q(){k=m[t];c(a[k],k,s)}function s(a,d){a?(u=A,b=E(b),b(a,H(p))):(p[t]=d,++t===h?(u=A,b(null,p),b=A):v?D(u):(v=!0,u()),v=!1)}b=b||w;var h,k,m,r,n,p,u,v=!1,t=0;C(a)?(h=a.length,u=3===c.length?e:d):a&&(z&&a[z]?(h=Infinity,p=[],r=a[z](),u=3===c.length?g:f):"object"===typeof a&&(m=F(a),h=m.length,u=3===c.length?q:l));if(!h)return b(null,[]);p=p||Array(h);u()}function Aa(a,c,b,d){return function(e, -f,g){function l(a){var b=!1;return function(c,e){b&&A();b=!0;c?(g=I(g),g(c)):!!e===d?(g=I(g),g(null,a)):++h===q&&g(null)}}g=g||w;var q,s,h=0;C(e)?(q=e.length,a(e,f,l)):e&&(z&&e[z]?(q=b(e,f,l))&&q===h&&g(null):"object"===typeof e&&(s=F(e),q=s.length,c(e,f,l,s)));q||g(null)}}function Ba(a){return function(c,b,d){function e(){r=c[x];b(r,h)}function f(){r=c[x];b(r,x,h)}function g(){u=p.next();r=u.value;u.done?d(null):b(r,h)}function l(){u=p.next();r=u.value;u.done?d(null):b(r,x,h)}function q(){r=c[n[x]]; -b(r,h)}function s(){m=n[x];r=c[m];b(r,m,h)}function h(b,c){b?d(b):!!c===a?(v=A,d(null,r)):++x===k?(v=A,d(null)):t?D(v):(t=!0,v());t=!1}d=E(d||w);var k,m,r,n,p,u,v,t=!1,x=0;C(c)?(k=c.length,v=3===b.length?f:e):c&&(z&&c[z]?(k=Infinity,p=c[z](),v=3===b.length?l:g):"object"===typeof c&&(n=F(c),k=n.length,v=3===b.length?s:q));if(!k)return d(null);v()}}function Ca(a){return function(c,b,d,e){function f(){r=G++;rb)return e(null);K(b>m?m:b,x)}}function Da(a,c,b,d){return function(e,f,g){function l(a,b){return function(c,e){null===a&&A();c?(a=null,g=I(g),g(c,L(k))):(!!e===d&&(k[a]=b),a=null,++h===q&&g(null,k))}}g=g||w;var q,s,h=0,k={};C(e)?(q=e.length,a(e,f,l)):e&&(z&&e[z]?(q=b(e,f,l))&&q===h&&g(null,k):"object"===typeof e&&(s=F(e),q=s.length,c(e,f,l,s)));if(!q)return g(null,{})}}function Ea(a){return function(c, -b,d){function e(){m=y;r=c[y];b(r,h)}function f(){m=y;r=c[y];b(r,y,h)}function g(){m=y;u=p.next();r=u.value;u.done?d(null,x):b(r,h)}function l(){m=y;u=p.next();r=u.value;u.done?d(null,x):b(r,m,h)}function q(){m=n[y];r=c[m];b(r,h)}function s(){m=n[y];r=c[m];b(r,m,h)}function h(b,c){b?d(b,x):(!!c===a&&(x[m]=r),++y===k?(v=A,d(null,x)):t?D(v):(t=!0,v()),t=!1)}d=E(d||w);var k,m,r,n,p,u,v,t=!1,x={},y=0;C(c)?(k=c.length,v=3===b.length?f:e):c&&(z&&c[z]?(k=Infinity,p=c[z](),v=3===b.length?l:g):"object"===typeof c&& -(n=F(c),k=n.length,v=3===b.length?s:q));if(!k)return d(null,{});v()}}function Fa(a){return function(c,b,d,e){function f(){r=B++;rb)return e(null,{});K(b>m?m:b,x)}}function $(a,c,b,d){function e(d){b(d,a[t],h)}function f(d){b(d,a[t],t,h)}function g(a){p=n.next();p.done?d(null,a):b(a,p.value, -h)}function l(a){p=n.next();p.done?d(null,a):b(a,p.value,t,h)}function q(d){b(d,a[r[t]],h)}function s(d){m=r[t];b(d,a[m],m,h)}function h(a,c){a?d(a,c):++t===k?(b=A,d(null,c)):v?D(function(){u(c)}):(v=!0,u(c));v=!1}d=E(d||w);var k,m,r,n,p,u,v=!1,t=0;C(a)?(k=a.length,u=4===b.length?f:e):a&&(z&&a[z]?(k=Infinity,n=a[z](),u=4===b.length?l:g):"object"===typeof a&&(r=F(a),k=r.length,u=4===b.length?s:q));if(!k)return d(null,c);u(c)}function Ga(a,c,b,d){function e(d){b(d,a[--s],q)}function f(d){b(d,a[--s], -s,q)}function g(d){b(d,a[m[--s]],q)}function l(d){k=m[--s];b(d,a[k],k,q)}function q(a,b){a?d(a,b):0===s?(u=A,d(null,b)):v?D(function(){u(b)}):(v=!0,u(b));v=!1}d=E(d||w);var s,h,k,m,r,n,p,u,v=!1;if(C(a))s=a.length,u=4===b.length?f:e;else if(a)if(z&&a[z]){p=[];r=a[z]();for(h=-1;!1===(n=r.next()).done;)p[++h]=n.value;a=p;s=p.length;u=4===b.length?f:e}else"object"===typeof a&&(m=F(a),s=m.length,u=4===b.length?l:g);if(!s)return d(null,c);u(c)}function Ha(a,c,b){b=b||w;ja(a,c,function(a,c){if(a)return b(a); -b(null,!!c)})}function Ia(a,c,b){b=b||w;ka(a,c,function(a,c){if(a)return b(a);b(null,!!c)})}function Ja(a,c,b,d){d=d||w;la(a,c,b,function(a,b){if(a)return d(a);d(null,!!b)})}function Ka(a,c){return C(a)?0===a.length?(c(null),!1):!0:(c(Error("First argument to waterfall must be an array of functions")),!1)}function ma(a,c,b){switch(c.length){case 0:case 1:return a(b);case 2:return a(c[1],b);case 3:return a(c[1],c[2],b);case 4:return a(c[1],c[2],c[3],b);case 5:return a(c[1],c[2],c[3],c[4],b);case 6:return a(c[1], -c[2],c[3],c[4],c[5],b);default:return c=J(c,1),c.push(b),a.apply(null,c)}}function La(a,c){function b(b,h){if(b)q=A,c=E(c),c(b);else if(++d===f){q=A;var k=c;c=A;2===arguments.length?k(b,h):k.apply(null,H(arguments))}else g=a[d],l=arguments,e?D(q):(e=!0,q()),e=!1}c=c||w;if(Ka(a,c)){var d=0,e=!1,f=a.length,g=a[d],l=[],q=function(){switch(g.length){case 0:try{b(null,g())}catch(a){b(a)}break;case 1:return g(b);case 2:return g(l[1],b);case 3:return g(l[1],l[2],b);case 4:return g(l[1],l[2],l[3],b);case 5:return g(l[1], -l[2],l[3],l[4],b);default:return l=J(l,1),l[g.length-1]=b,g.apply(null,l)}};q()}}function Ma(){var a=H(arguments);return function(){var c=this,b=H(arguments),d=b[b.length-1];"function"===typeof d?b.pop():d=w;$(a,b,function(a,b,d){a.push(function(a){var b=J(arguments,1);d(a,b)});b.apply(c,a)},function(a,b){b=C(b)?b:[b];b.unshift(a);d.apply(c,b)})}}function Na(a){return function(c){var b=function(){var b=this,d=H(arguments),g=d.pop()||w;return a(c,function(a,c){a.apply(b,d.concat([c]))},g)};if(1b)throw Error("Concurrency must not be zero");var h=0,k=[],m,r,n={_tasks:new M,concurrency:b,payload:d,saturated:w,unsaturated:w,buffer:b/4,empty:w,drain:w,error:w,started:!1,paused:!1,push:function(a, -b){f(a,b)},kill:function(){n.drain=w;n._tasks.empty()},unshift:function(a,b){f(a,b,!0)},remove:function(a){n._tasks.remove(a)},process:a?l:q,length:function(){return n._tasks.length},running:function(){return h},workersList:function(){return k},idle:function(){return 0===n.length()+h},pause:function(){n.paused=!0},resume:function(){!1!==n.paused&&(n.paused=!1,K(n.concurrency=arguments.length?f:J(arguments,1);if(a){q=g=0;s.length=0;var k=L(l);k[d]=f;d=null;var h= -b;b=w;h(a,k)}else q--,g--,l[d]=f,e(d),d=null}function n(){0===--v&&s.push([p,u,c])}var p,u;if(C(a)){var v=a.length-1;p=a[v];u=v;if(0===v)s.push([p,u,c]);else for(var t=-1;++t=arguments.length)return b(a,e);var f=H(arguments);return b.apply(null,f)}c(d)}function e(){c(f)}function f(a,d){if(++s===g||!a||q&&!q(a)){if(2>=arguments.length)return b(a,d);var c=H(arguments);return b.apply(null,c)}setTimeout(e,l(s))}var g,l,q,s=0;if(3>arguments.length&&"function"===typeof a)b=c||w,c=a,a=null,g=5;else switch(b=b||w,typeof a){case "object":"function"===typeof a.errorFilter&&(q=a.errorFilter);var h=a.interval; -switch(typeof h){case "function":l=h;break;case "string":case "number":l=(h=+h)?function(){return h}:function(){return 0}}g=+a.times||5;break;case "number":g=a||5;break;case "string":g=+a||5;break;default:throw Error("Invalid arguments for async.retry");}if("function"!==typeof c)throw Error("Invalid arguments for async.retry");l?c(f):c(d)}function Pa(a){return function(){var c=H(arguments),b=c.pop(),d;try{d=a.apply(this,c)}catch(e){return b(e)}d&&"function"===typeof d.then?d.then(function(a){try{b(null, -a)}catch(d){D(Qa,d)}},function(a){a=a&&a.message?a:Error(a);try{b(a,void 0)}catch(d){D(Qa,d)}}):b(null,d)}}function Qa(a){throw a;}function Ra(a){return function(){function c(a,d){if(a)return b(null,{error:a});2=arguments.length?c:J(arguments,1),a=null,++q===f&&d(null,l))}}d=d||w;var f,g,l,q=0;C(b)?(f=b.length,l=Array(f),a(b,e)):b&&"object"===typeof b&&(g=F(b),f=g.length,l={},c(b,e,g));f||d(null,l)}}(function(a,c){for(var b=-1,d=a.length;++bc)return d(null,[]);v=v||Array(k);K(c>k?k:c,t)},mapValues:fb,mapValuesSeries:function(a,c,b){function d(){k=t;c(a[t], -s)}function e(){k=t;c(a[t],t,s)}function f(){k=t;n=r.next();n.done?b(null,v):c(n.value,s)}function g(){k=t;n=r.next();n.done?b(null,v):c(n.value,t,s)}function l(){k=m[t];c(a[k],s)}function q(){k=m[t];c(a[k],k,s)}function s(a,d){a?(p=A,b=E(b),b(a,L(v))):(v[k]=d,++t===h?(p=A,b(null,v),b=A):u?D(p):(u=!0,p()),u=!1)}b=b||w;var h,k,m,r,n,p,u=!1,v={},t=0;C(a)?(h=a.length,p=3===c.length?e:d):a&&(z&&a[z]?(h=Infinity,r=a[z](),p=3===c.length?g:f):"object"===typeof a&&(m=F(a),h=m.length,p=3===c.length?q:l)); -if(!h)return b(null,v);p()},mapValuesLimit:function(a,c,b,d){function e(){m=y++;mc)return d(null,x);K(c>k?k:c,v)},filter:Ta,filterSeries:Ua,filterLimit:Va,select:Ta,selectSeries:Ua,selectLimit:Va,reject:gb,rejectSeries:hb,rejectLimit:ib,detect:ja,detectSeries:ka,detectLimit:la,find:ja,findSeries:ka,findLimit:la,pick:jb,pickSeries:kb, -pickLimit:lb,omit:mb,omitSeries:nb,omitLimit:ob,reduce:$,inject:$,foldl:$,reduceRight:Ga,foldr:Ga,transform:pb,transformSeries:function(a,c,b,d){function e(){b(v,a[x],h)}function f(){b(v,a[x],x,h)}function g(){p=n.next();p.done?d(null,v):b(v,p.value,h)}function l(){p=n.next();p.done?d(null,v):b(v,p.value,x,h)}function q(){b(v,a[r[x]],h)}function s(){m=r[x];b(v,a[m],m,h)}function h(a,b){a?d(a,v):++x===k||!1===b?(u=A,d(null,v)):t?D(u):(t=!0,u());t=!1}3===arguments.length&&(d=b,b=c,c=void 0);d=E(d|| -w);var k,m,r,n,p,u,v,t=!1,x=0;C(a)?(k=a.length,v=void 0!==c?c:[],u=4===b.length?f:e):a&&(z&&a[z]?(k=Infinity,n=a[z](),v=void 0!==c?c:{},u=4===b.length?l:g):"object"===typeof a&&(r=F(a),k=r.length,v=void 0!==c?c:{},u=4===b.length?s:q));if(!k)return d(null,void 0!==c?c:v||{});u()},transformLimit:function(a,c,b,d,e){function f(){r=A++;rc)return e(null,void 0!==b?b:x||{});K(c>m?m:c,t)},sortBy:qb,sortBySeries:function(a,c,b){function d(){m=a[y];c(m,s)}function e(){m=a[y];c(m,y,s)}function f(){p=n.next();if(p.done)return b(null,P(u,v));m=p.value;u[y]=m;c(m,s)}function g(){p=n.next();if(p.done)return b(null,P(u,v));m=p.value;u[y]=m;c(m,y,s)}function l(){m=a[r[y]];u[y]=m;c(m,s)}function q(){k=r[y];m=a[k];u[y]=m;c(m,k,s)}function s(a,d){v[y]=d;a?b(a):++y===h?(t=A,b(null, -P(u,v))):x?D(t):(x=!0,t());x=!1}b=E(b||w);var h,k,m,r,n,p,u,v,t,x=!1,y=0;C(a)?(h=a.length,u=a,v=Array(h),t=3===c.length?e:d):a&&(z&&a[z]?(h=Infinity,u=[],v=[],n=a[z](),t=3===c.length?g:f):"object"===typeof a&&(r=F(a),h=r.length,u=Array(h),v=Array(h),t=3===c.length?q:l));if(!h)return b(null,[]);t()},sortByLimit:function(a,c,b,d){function e(){Bc)return d(null,[]);x=x||Array(k);K(c>k?k:c,y)},some:Ha,someSeries:Ia,someLimit:Ja,any:Ha,anySeries:Ia,anyLimit:Ja,every:Wa,everySeries:Xa,everyLimit:Ya,all:Wa,allSeries:Xa,allLimit:Ya,concat:rb,concatSeries:function(a,c,b){function d(){c(a[t],s)}function e(){c(a[t],t,s)}function f(){n=r.next();n.done?b(null,v):c(n.value,s)}function g(){n=r.next();n.done?b(null,v):c(n.value,t,s)}function l(){c(a[m[t]], -s)}function q(){k=m[t];c(a[k],k,s)}function s(a,d){C(d)?X.apply(v,d):2<=arguments.length&&X.apply(v,J(arguments,1));a?b(a,v):++t===h?(p=A,b(null,v)):u?D(p):(u=!0,p());u=!1}b=E(b||w);var h,k,m,r,n,p,u=!1,v=[],t=0;C(a)?(h=a.length,p=3===c.length?e:d):a&&(z&&a[z]?(h=Infinity,r=a[z](),p=3===c.length?g:f):"object"===typeof a&&(m=F(a),h=m.length,p=3===c.length?q:l));if(!h)return b(null,v);p()},concatLimit:function(a,c,b,d){function e(){tc)return d(null,[]);u=u||Array(k);K(c>k?k:c,p)},groupBy:sb,groupBySeries:function(a,c,b){function d(){m=a[t];c(m,s)}function e(){m=a[t];c(m,t,s)}function f(){p=n.next();m=p.value;p.done?b(null,x):c(m,s)}function g(){p=n.next();m=p.value;p.done? -b(null,x):c(m,t,s)}function l(){m=a[r[t]];c(m,s)}function q(){k=r[t];m=a[k];c(m,k,s)}function s(a,d){if(a)u=A,b=E(b),b(a,L(x));else{var c=x[d];c?c.push(m):x[d]=[m];++t===h?(u=A,b(null,x)):v?D(u):(v=!0,u());v=!1}}b=E(b||w);var h,k,m,r,n,p,u,v=!1,t=0,x={};C(a)?(h=a.length,u=3===c.length?e:d):a&&(z&&a[z]?(h=Infinity,n=a[z](),u=3===c.length?g:f):"object"===typeof a&&(r=F(a),h=r.length,u=3===c.length?q:l));if(!h)return b(null,x);u()},groupByLimit:function(a,c,b,d){function e(){yc)return d(null,B);K(c>k?k:c,t)},parallel:tb,series:function(a,c){function b(){g=k;a[k](e)}function d(){g=l[k];a[g](e)}function e(a,b){a?(s=A,c=E(c),c(a,q)):(q[g]=2>=arguments.length?b:J(arguments,1),++k===f?(s=A,c(null,q)):h?D(s):(h=!0,s()),h=!1)}c=c||w;var f,g,l,q,s,h=!1,k=0;if(C(a))f=a.length,q=Array(f), -s=b;else if(a&&"object"===typeof a)l=F(a),f=l.length,q={},s=d;else return c(null);if(!f)return c(null,q);s()},parallelLimit:function(a,c,b){function d(){l=r++;if(l=arguments.length?c:J(arguments,1),a=null,++n===g?b(null,h):m?D(k):(m=!0,k()),m=!1)}}b=b||w;var g,l,q,s,h,k,m=!1,r=0,n=0;C(a)?(g=a.length,h=Array(g),k=d):a&&"object"===typeof a&&(s=F(a),g=s.length,h= -{},k=e);if(!g||isNaN(c)||1>c)return b(null,h);K(c>g?g:c,k)},tryEach:function(a,c){function b(){a[q](e)}function d(){a[g[q]](e)}function e(a,b){a?++q===f?c(a):l():2>=arguments.length?c(null,b):c(null,J(arguments,1))}c=c||w;var f,g,l,q=0;C(a)?(f=a.length,l=b):a&&"object"===typeof a&&(g=F(a),f=g.length,l=d);if(!f)return c(null);l()},waterfall:function(a,c){function b(){ma(e,f,d(e))}function d(h){return function(k,m){void 0===h&&(c=w,A());h=void 0;k?(g=c,c=A,g(k)):++q===s?(g=c,c=A,2>=arguments.length? -g(k,m):g.apply(null,H(arguments))):(l?(f=arguments,e=a[q]||A,D(b)):(l=!0,ma(a[q]||A,arguments,d(q))),l=!1)}}c=c||w;if(Ka(a,c)){var e,f,g,l,q=0,s=a.length;ma(a[0],[],d(0))}},angelFall:La,angelfall:La,whilst:function(a,c,b){function d(){g?D(e):(g=!0,c(f));g=!1}function e(){c(f)}function f(c,e){if(c)return b(c);2>=arguments.length?a(e)?d():b(null,e):(e=J(arguments,1),a.apply(null,e)?d():b.apply(null,[null].concat(e)))}b=b||w;var g=!1;a()?d():b(null)},doWhilst:function(a,c,b){function d(){g?D(e):(g=!0, -a(f));g=!1}function e(){a(f)}function f(a,e){if(a)return b(a);2>=arguments.length?c(e)?d():b(null,e):(e=J(arguments,1),c.apply(null,e)?d():b.apply(null,[null].concat(e)))}b=b||w;var g=!1;e()},until:function(a,c,b){function d(){g?D(e):(g=!0,c(f));g=!1}function e(){c(f)}function f(c,e){if(c)return b(c);2>=arguments.length?a(e)?b(null,e):d():(e=J(arguments,1),a.apply(null,e)?b.apply(null,[null].concat(e)):d())}b=b||w;var g=!1;a()?b(null):d()},doUntil:function(a,c,b){function d(){g?D(e):(g=!0,a(f));g= -!1}function e(){a(f)}function f(a,e){if(a)return b(a);2>=arguments.length?c(e)?b(null,e):d():(e=J(arguments,1),c.apply(null,e)?b.apply(null,[null].concat(e)):d())}b=b||w;var g=!1;e()},during:function(a,c,b){function d(a,d){if(a)return b(a);d?c(e):b(null)}function e(c){if(c)return b(c);a(d)}b=b||w;a(d)},doDuring:function(a,c,b){function d(d,c){if(d)return b(d);c?a(e):b(null)}function e(a,e){if(a)return b(a);switch(arguments.length){case 0:case 1:c(d);break;case 2:c(e,d);break;default:var l=J(arguments, -1);l.push(d);c.apply(null,l)}}b=b||w;d(null,!0)},forever:function(a,c){function b(){a(d)}function d(a){if(a){if(c)return c(a);throw a;}e?D(b):(e=!0,b());e=!1}var e=!1;b()},compose:function(){return Ma.apply(null,Za(arguments))},seq:Ma,applyEach:ub,applyEachSeries:vb,queue:function(a,c){return na(!0,a,c)},priorityQueue:function(a,c){var b=na(!0,a,c);b.push=function(a,c,f){b.started=!0;c=c||0;var g=C(a)?a:[a],l=g.length;if(void 0===a||0===l)b.idle()&&D(b.drain);else{f="function"===typeof f?f:w;for(a= -b._tasks.head;a&&c>=a.priority;)a=a.next;for(;l--;){var q={data:g[l],priority:c,callback:f};a?b._tasks.insertBefore(a,q):b._tasks.push(q);D(b.process)}}};delete b.unshift;return b},cargo:function(a,c){return na(!1,a,1,c)},auto:Oa,autoInject:function(a,c,b){var d={};W(a,function(a,b){var c,l=a.length;if(C(a)){if(0===l)throw Error("autoInject task functions require explicit parameters.");c=H(a);l=c.length-1;a=c[l];if(0===l){d[b]=a;return}}else{if(1===l){d[b]=a;return}c=ab(a);if(0===l&&0===c.length)throw Error("autoInject task functions require explicit parameters."); -l=c.length-1}c[l]=function(b,d){switch(l){case 1:a(b[c[0]],d);break;case 2:a(b[c[0]],b[c[1]],d);break;case 3:a(b[c[0]],b[c[1]],b[c[2]],d);break;default:for(var f=-1;++fa)return b(null,[]);var e=Array(a);K(a,function(a){c(a,d(a))})},timesSeries:function(a,c,b){function d(){c(l, -e)}function e(c,e){f[l]=e;c?(b(c),b=A):++l>=a?(b(null,f),b=A):g?D(d):(g=!0,d());g=!1}b=b||w;a=+a;if(isNaN(a)||1>a)return b(null,[]);var f=Array(a),g=!1,l=0;d()},timesLimit:function(a,c,b,d){function e(){var c=q++;c=a?(d(null,g),d=A):l?D(e):(l=!0,e());l=!1}}d=d||w;a=+a;if(isNaN(a)||1>a||isNaN(c)||1>c)return d(null,[]);var g=Array(a),l=!1,q=0,s=0;K(c>a?a:c,e)},race:function(a,c){c=I(c||w);var b,d,e=-1;if(C(a))for(b= -a.length;++e=2.5.0 || 5.0.0 - 7.2.3') // true -semver.gt('1.2.3', '9.8.7') // false -semver.lt('1.2.3', '9.8.7') // true -semver.minVersion('>=1.0.0') // '1.0.0' -semver.valid(semver.coerce('v2')) // '2.0.0' -semver.valid(semver.coerce('42.6.7.9.3-alpha')) // '42.6.7' -``` - -As a command-line utility: - -``` -$ semver -h - -A JavaScript implementation of the https://semver.org/ specification -Copyright Isaac Z. Schlueter - -Usage: semver [options] [ [...]] -Prints valid versions sorted by SemVer precedence - -Options: --r --range - Print versions that match the specified range. - --i --increment [] - Increment a version by the specified level. Level can - be one of: major, minor, patch, premajor, preminor, - prepatch, or prerelease. Default level is 'patch'. - Only one version may be specified. - ---preid - Identifier to be used to prefix premajor, preminor, - prepatch or prerelease version increments. - --l --loose - Interpret versions and ranges loosely - --p --include-prerelease - Always include prerelease versions in range matching - --c --coerce - Coerce a string into SemVer if possible - (does not imply --loose) - -Program exits successfully if any valid version satisfies -all supplied ranges, and prints all satisfying versions. - -If no satisfying versions are found, then exits failure. - -Versions are printed in ascending order, so supplying -multiple versions to the utility will just sort them. -``` - -## Versions - -A "version" is described by the `v2.0.0` specification found at -. - -A leading `"="` or `"v"` character is stripped off and ignored. - -## Ranges - -A `version range` is a set of `comparators` which specify versions -that satisfy the range. - -A `comparator` is composed of an `operator` and a `version`. The set -of primitive `operators` is: - -* `<` Less than -* `<=` Less than or equal to -* `>` Greater than -* `>=` Greater than or equal to -* `=` Equal. If no operator is specified, then equality is assumed, - so this operator is optional, but MAY be included. - -For example, the comparator `>=1.2.7` would match the versions -`1.2.7`, `1.2.8`, `2.5.3`, and `1.3.9`, but not the versions `1.2.6` -or `1.1.0`. - -Comparators can be joined by whitespace to form a `comparator set`, -which is satisfied by the **intersection** of all of the comparators -it includes. - -A range is composed of one or more comparator sets, joined by `||`. A -version matches a range if and only if every comparator in at least -one of the `||`-separated comparator sets is satisfied by the version. - -For example, the range `>=1.2.7 <1.3.0` would match the versions -`1.2.7`, `1.2.8`, and `1.2.99`, but not the versions `1.2.6`, `1.3.0`, -or `1.1.0`. - -The range `1.2.7 || >=1.2.9 <2.0.0` would match the versions `1.2.7`, -`1.2.9`, and `1.4.6`, but not the versions `1.2.8` or `2.0.0`. - -### Prerelease Tags - -If a version has a prerelease tag (for example, `1.2.3-alpha.3`) then -it will only be allowed to satisfy comparator sets if at least one -comparator with the same `[major, minor, patch]` tuple also has a -prerelease tag. - -For example, the range `>1.2.3-alpha.3` would be allowed to match the -version `1.2.3-alpha.7`, but it would *not* be satisfied by -`3.4.5-alpha.9`, even though `3.4.5-alpha.9` is technically "greater -than" `1.2.3-alpha.3` according to the SemVer sort rules. The version -range only accepts prerelease tags on the `1.2.3` version. The -version `3.4.5` *would* satisfy the range, because it does not have a -prerelease flag, and `3.4.5` is greater than `1.2.3-alpha.7`. - -The purpose for this behavior is twofold. First, prerelease versions -frequently are updated very quickly, and contain many breaking changes -that are (by the author's design) not yet fit for public consumption. -Therefore, by default, they are excluded from range matching -semantics. - -Second, a user who has opted into using a prerelease version has -clearly indicated the intent to use *that specific* set of -alpha/beta/rc versions. By including a prerelease tag in the range, -the user is indicating that they are aware of the risk. However, it -is still not appropriate to assume that they have opted into taking a -similar risk on the *next* set of prerelease versions. - -Note that this behavior can be suppressed (treating all prerelease -versions as if they were normal versions, for the purpose of range -matching) by setting the `includePrerelease` flag on the options -object to any -[functions](https://github.com/npm/node-semver#functions) that do -range matching. - -#### Prerelease Identifiers - -The method `.inc` takes an additional `identifier` string argument that -will append the value of the string as a prerelease identifier: - -```javascript -semver.inc('1.2.3', 'prerelease', 'beta') -// '1.2.4-beta.0' -``` - -command-line example: - -```bash -$ semver 1.2.3 -i prerelease --preid beta -1.2.4-beta.0 -``` - -Which then can be used to increment further: - -```bash -$ semver 1.2.4-beta.0 -i prerelease -1.2.4-beta.1 -``` - -### Advanced Range Syntax - -Advanced range syntax desugars to primitive comparators in -deterministic ways. - -Advanced ranges may be combined in the same way as primitive -comparators using white space or `||`. - -#### Hyphen Ranges `X.Y.Z - A.B.C` - -Specifies an inclusive set. - -* `1.2.3 - 2.3.4` := `>=1.2.3 <=2.3.4` - -If a partial version is provided as the first version in the inclusive -range, then the missing pieces are replaced with zeroes. - -* `1.2 - 2.3.4` := `>=1.2.0 <=2.3.4` - -If a partial version is provided as the second version in the -inclusive range, then all versions that start with the supplied parts -of the tuple are accepted, but nothing that would be greater than the -provided tuple parts. - -* `1.2.3 - 2.3` := `>=1.2.3 <2.4.0` -* `1.2.3 - 2` := `>=1.2.3 <3.0.0` - -#### X-Ranges `1.2.x` `1.X` `1.2.*` `*` - -Any of `X`, `x`, or `*` may be used to "stand in" for one of the -numeric values in the `[major, minor, patch]` tuple. - -* `*` := `>=0.0.0` (Any version satisfies) -* `1.x` := `>=1.0.0 <2.0.0` (Matching major version) -* `1.2.x` := `>=1.2.0 <1.3.0` (Matching major and minor versions) - -A partial version range is treated as an X-Range, so the special -character is in fact optional. - -* `""` (empty string) := `*` := `>=0.0.0` -* `1` := `1.x.x` := `>=1.0.0 <2.0.0` -* `1.2` := `1.2.x` := `>=1.2.0 <1.3.0` - -#### Tilde Ranges `~1.2.3` `~1.2` `~1` - -Allows patch-level changes if a minor version is specified on the -comparator. Allows minor-level changes if not. - -* `~1.2.3` := `>=1.2.3 <1.(2+1).0` := `>=1.2.3 <1.3.0` -* `~1.2` := `>=1.2.0 <1.(2+1).0` := `>=1.2.0 <1.3.0` (Same as `1.2.x`) -* `~1` := `>=1.0.0 <(1+1).0.0` := `>=1.0.0 <2.0.0` (Same as `1.x`) -* `~0.2.3` := `>=0.2.3 <0.(2+1).0` := `>=0.2.3 <0.3.0` -* `~0.2` := `>=0.2.0 <0.(2+1).0` := `>=0.2.0 <0.3.0` (Same as `0.2.x`) -* `~0` := `>=0.0.0 <(0+1).0.0` := `>=0.0.0 <1.0.0` (Same as `0.x`) -* `~1.2.3-beta.2` := `>=1.2.3-beta.2 <1.3.0` Note that prereleases in - the `1.2.3` version will be allowed, if they are greater than or - equal to `beta.2`. So, `1.2.3-beta.4` would be allowed, but - `1.2.4-beta.2` would not, because it is a prerelease of a - different `[major, minor, patch]` tuple. - -#### Caret Ranges `^1.2.3` `^0.2.5` `^0.0.4` - -Allows changes that do not modify the left-most non-zero digit in the -`[major, minor, patch]` tuple. In other words, this allows patch and -minor updates for versions `1.0.0` and above, patch updates for -versions `0.X >=0.1.0`, and *no* updates for versions `0.0.X`. - -Many authors treat a `0.x` version as if the `x` were the major -"breaking-change" indicator. - -Caret ranges are ideal when an author may make breaking changes -between `0.2.4` and `0.3.0` releases, which is a common practice. -However, it presumes that there will *not* be breaking changes between -`0.2.4` and `0.2.5`. It allows for changes that are presumed to be -additive (but non-breaking), according to commonly observed practices. - -* `^1.2.3` := `>=1.2.3 <2.0.0` -* `^0.2.3` := `>=0.2.3 <0.3.0` -* `^0.0.3` := `>=0.0.3 <0.0.4` -* `^1.2.3-beta.2` := `>=1.2.3-beta.2 <2.0.0` Note that prereleases in - the `1.2.3` version will be allowed, if they are greater than or - equal to `beta.2`. So, `1.2.3-beta.4` would be allowed, but - `1.2.4-beta.2` would not, because it is a prerelease of a - different `[major, minor, patch]` tuple. -* `^0.0.3-beta` := `>=0.0.3-beta <0.0.4` Note that prereleases in the - `0.0.3` version *only* will be allowed, if they are greater than or - equal to `beta`. So, `0.0.3-pr.2` would be allowed. - -When parsing caret ranges, a missing `patch` value desugars to the -number `0`, but will allow flexibility within that value, even if the -major and minor versions are both `0`. - -* `^1.2.x` := `>=1.2.0 <2.0.0` -* `^0.0.x` := `>=0.0.0 <0.1.0` -* `^0.0` := `>=0.0.0 <0.1.0` - -A missing `minor` and `patch` values will desugar to zero, but also -allow flexibility within those values, even if the major version is -zero. - -* `^1.x` := `>=1.0.0 <2.0.0` -* `^0.x` := `>=0.0.0 <1.0.0` - -### Range Grammar - -Putting all this together, here is a Backus-Naur grammar for ranges, -for the benefit of parser authors: - -```bnf -range-set ::= range ( logical-or range ) * -logical-or ::= ( ' ' ) * '||' ( ' ' ) * -range ::= hyphen | simple ( ' ' simple ) * | '' -hyphen ::= partial ' - ' partial -simple ::= primitive | partial | tilde | caret -primitive ::= ( '<' | '>' | '>=' | '<=' | '=' ) partial -partial ::= xr ( '.' xr ( '.' xr qualifier ? )? )? -xr ::= 'x' | 'X' | '*' | nr -nr ::= '0' | ['1'-'9'] ( ['0'-'9'] ) * -tilde ::= '~' partial -caret ::= '^' partial -qualifier ::= ( '-' pre )? ( '+' build )? -pre ::= parts -build ::= parts -parts ::= part ( '.' part ) * -part ::= nr | [-0-9A-Za-z]+ -``` - -## Functions - -All methods and classes take a final `options` object argument. All -options in this object are `false` by default. The options supported -are: - -- `loose` Be more forgiving about not-quite-valid semver strings. - (Any resulting output will always be 100% strict compliant, of - course.) For backwards compatibility reasons, if the `options` - argument is a boolean value instead of an object, it is interpreted - to be the `loose` param. -- `includePrerelease` Set to suppress the [default - behavior](https://github.com/npm/node-semver#prerelease-tags) of - excluding prerelease tagged versions from ranges unless they are - explicitly opted into. - -Strict-mode Comparators and Ranges will be strict about the SemVer -strings that they parse. - -* `valid(v)`: Return the parsed version, or null if it's not valid. -* `inc(v, release)`: Return the version incremented by the release - type (`major`, `premajor`, `minor`, `preminor`, `patch`, - `prepatch`, or `prerelease`), or null if it's not valid - * `premajor` in one call will bump the version up to the next major - version and down to a prerelease of that major version. - `preminor`, and `prepatch` work the same way. - * If called from a non-prerelease version, the `prerelease` will work the - same as `prepatch`. It increments the patch version, then makes a - prerelease. If the input version is already a prerelease it simply - increments it. -* `prerelease(v)`: Returns an array of prerelease components, or null - if none exist. Example: `prerelease('1.2.3-alpha.1') -> ['alpha', 1]` -* `major(v)`: Return the major version number. -* `minor(v)`: Return the minor version number. -* `patch(v)`: Return the patch version number. -* `intersects(r1, r2, loose)`: Return true if the two supplied ranges - or comparators intersect. -* `parse(v)`: Attempt to parse a string as a semantic version, returning either - a `SemVer` object or `null`. - -### Comparison - -* `gt(v1, v2)`: `v1 > v2` -* `gte(v1, v2)`: `v1 >= v2` -* `lt(v1, v2)`: `v1 < v2` -* `lte(v1, v2)`: `v1 <= v2` -* `eq(v1, v2)`: `v1 == v2` This is true if they're logically equivalent, - even if they're not the exact same string. You already know how to - compare strings. -* `neq(v1, v2)`: `v1 != v2` The opposite of `eq`. -* `cmp(v1, comparator, v2)`: Pass in a comparison string, and it'll call - the corresponding function above. `"==="` and `"!=="` do simple - string comparison, but are included for completeness. Throws if an - invalid comparison string is provided. -* `compare(v1, v2)`: Return `0` if `v1 == v2`, or `1` if `v1` is greater, or `-1` if - `v2` is greater. Sorts in ascending order if passed to `Array.sort()`. -* `rcompare(v1, v2)`: The reverse of compare. Sorts an array of versions - in descending order when passed to `Array.sort()`. -* `diff(v1, v2)`: Returns difference between two versions by the release type - (`major`, `premajor`, `minor`, `preminor`, `patch`, `prepatch`, or `prerelease`), - or null if the versions are the same. - -### Comparators - -* `intersects(comparator)`: Return true if the comparators intersect - -### Ranges - -* `validRange(range)`: Return the valid range or null if it's not valid -* `satisfies(version, range)`: Return true if the version satisfies the - range. -* `maxSatisfying(versions, range)`: Return the highest version in the list - that satisfies the range, or `null` if none of them do. -* `minSatisfying(versions, range)`: Return the lowest version in the list - that satisfies the range, or `null` if none of them do. -* `minVersion(range)`: Return the lowest version that can possibly match - the given range. -* `gtr(version, range)`: Return `true` if version is greater than all the - versions possible in the range. -* `ltr(version, range)`: Return `true` if version is less than all the - versions possible in the range. -* `outside(version, range, hilo)`: Return true if the version is outside - the bounds of the range in either the high or low direction. The - `hilo` argument must be either the string `'>'` or `'<'`. (This is - the function called by `gtr` and `ltr`.) -* `intersects(range)`: Return true if any of the ranges comparators intersect - -Note that, since ranges may be non-contiguous, a version might not be -greater than a range, less than a range, *or* satisfy a range! For -example, the range `1.2 <1.2.9 || >2.0.0` would have a hole from `1.2.9` -until `2.0.0`, so the version `1.2.10` would not be greater than the -range (because `2.0.1` satisfies, which is higher), nor less than the -range (since `1.2.8` satisfies, which is lower), and it also does not -satisfy the range. - -If you want to know if a version satisfies or does not satisfy a -range, use the `satisfies(version, range)` function. - -### Coercion - -* `coerce(version)`: Coerces a string to semver if possible - -This aims to provide a very forgiving translation of a non-semver -string to semver. It looks for the first digit in a string, and -consumes all remaining characters which satisfy at least a partial semver -(e.g., `1`, `1.2`, `1.2.3`) up to the max permitted length (256 characters). -Longer versions are simply truncated (`4.6.3.9.2-alpha2` becomes `4.6.3`). -All surrounding text is simply ignored (`v3.4 replaces v3.3.1` becomes `3.4.0`). -Only text which lacks digits will fail coercion (`version one` is not valid). -The maximum length for any semver component considered for coercion is 16 characters; -longer components will be ignored (`10000000000000000.4.7.4` becomes `4.7.4`). -The maximum value for any semver component is `Integer.MAX_SAFE_INTEGER || (2**53 - 1)`; -higher value components are invalid (`9999999999999999.4.7.4` is likely invalid). diff --git a/node_modules/node-notifier/node_modules/semver/bin/semver b/node_modules/node-notifier/node_modules/semver/bin/semver deleted file mode 100755 index 801e77f13..000000000 --- a/node_modules/node-notifier/node_modules/semver/bin/semver +++ /dev/null @@ -1,160 +0,0 @@ -#!/usr/bin/env node -// Standalone semver comparison program. -// Exits successfully and prints matching version(s) if -// any supplied version is valid and passes all tests. - -var argv = process.argv.slice(2) - -var versions = [] - -var range = [] - -var inc = null - -var version = require('../package.json').version - -var loose = false - -var includePrerelease = false - -var coerce = false - -var identifier - -var semver = require('../semver') - -var reverse = false - -var options = {} - -main() - -function main () { - if (!argv.length) return help() - while (argv.length) { - var a = argv.shift() - var indexOfEqualSign = a.indexOf('=') - if (indexOfEqualSign !== -1) { - a = a.slice(0, indexOfEqualSign) - argv.unshift(a.slice(indexOfEqualSign + 1)) - } - switch (a) { - case '-rv': case '-rev': case '--rev': case '--reverse': - reverse = true - break - case '-l': case '--loose': - loose = true - break - case '-p': case '--include-prerelease': - includePrerelease = true - break - case '-v': case '--version': - versions.push(argv.shift()) - break - case '-i': case '--inc': case '--increment': - switch (argv[0]) { - case 'major': case 'minor': case 'patch': case 'prerelease': - case 'premajor': case 'preminor': case 'prepatch': - inc = argv.shift() - break - default: - inc = 'patch' - break - } - break - case '--preid': - identifier = argv.shift() - break - case '-r': case '--range': - range.push(argv.shift()) - break - case '-c': case '--coerce': - coerce = true - break - case '-h': case '--help': case '-?': - return help() - default: - versions.push(a) - break - } - } - - var options = { loose: loose, includePrerelease: includePrerelease } - - versions = versions.map(function (v) { - return coerce ? (semver.coerce(v) || { version: v }).version : v - }).filter(function (v) { - return semver.valid(v) - }) - if (!versions.length) return fail() - if (inc && (versions.length !== 1 || range.length)) { return failInc() } - - for (var i = 0, l = range.length; i < l; i++) { - versions = versions.filter(function (v) { - return semver.satisfies(v, range[i], options) - }) - if (!versions.length) return fail() - } - return success(versions) -} - -function failInc () { - console.error('--inc can only be used on a single version with no range') - fail() -} - -function fail () { process.exit(1) } - -function success () { - var compare = reverse ? 'rcompare' : 'compare' - versions.sort(function (a, b) { - return semver[compare](a, b, options) - }).map(function (v) { - return semver.clean(v, options) - }).map(function (v) { - return inc ? semver.inc(v, inc, options, identifier) : v - }).forEach(function (v, i, _) { console.log(v) }) -} - -function help () { - console.log(['SemVer ' + version, - '', - 'A JavaScript implementation of the https://semver.org/ specification', - 'Copyright Isaac Z. Schlueter', - '', - 'Usage: semver [options] [ [...]]', - 'Prints valid versions sorted by SemVer precedence', - '', - 'Options:', - '-r --range ', - ' Print versions that match the specified range.', - '', - '-i --increment []', - ' Increment a version by the specified level. Level can', - ' be one of: major, minor, patch, premajor, preminor,', - " prepatch, or prerelease. Default level is 'patch'.", - ' Only one version may be specified.', - '', - '--preid ', - ' Identifier to be used to prefix premajor, preminor,', - ' prepatch or prerelease version increments.', - '', - '-l --loose', - ' Interpret versions and ranges loosely', - '', - '-p --include-prerelease', - ' Always include prerelease versions in range matching', - '', - '-c --coerce', - ' Coerce a string into SemVer if possible', - ' (does not imply --loose)', - '', - 'Program exits successfully if any valid version satisfies', - 'all supplied ranges, and prints all satisfying versions.', - '', - 'If no satisfying versions are found, then exits failure.', - '', - 'Versions are printed in ascending order, so supplying', - 'multiple versions to the utility will just sort them.' - ].join('\n')) -} diff --git a/node_modules/node-notifier/node_modules/semver/package.json b/node_modules/node-notifier/node_modules/semver/package.json deleted file mode 100644 index 0b51a6020..000000000 --- a/node_modules/node-notifier/node_modules/semver/package.json +++ /dev/null @@ -1,64 +0,0 @@ -{ - "_args": [ - [ - "semver@5.7.0", - "/Users/drew.heavner/Documents/Github/sign-android-release" - ] - ], - "_development": true, - "_from": "semver@5.7.0", - "_id": "semver@5.7.0", - "_inBundle": false, - "_integrity": "sha512-Ya52jSX2u7QKghxeoFGpLwCtGlt7j0oY9DYb5apt9nPlJ42ID+ulTXESnt/qAQcoSERyZ5sl3LDIOw0nAn/5DA==", - "_location": "/node-notifier/semver", - "_phantomChildren": {}, - "_requested": { - "type": "version", - "registry": true, - "raw": "semver@5.7.0", - "name": "semver", - "escapedName": "semver", - "rawSpec": "5.7.0", - "saveSpec": null, - "fetchSpec": "5.7.0" - }, - "_requiredBy": [ - "/node-notifier" - ], - "_resolved": "https://registry.npmjs.org/semver/-/semver-5.7.0.tgz", - "_spec": "5.7.0", - "_where": "/Users/drew.heavner/Documents/Github/sign-android-release", - "bin": { - "semver": "./bin/semver" - }, - "bugs": { - "url": "https://github.com/npm/node-semver/issues" - }, - "description": "The semantic version parser used by npm.", - "devDependencies": { - "tap": "^13.0.0-rc.18" - }, - "files": [ - "bin", - "range.bnf", - "semver.js" - ], - "homepage": "https://github.com/npm/node-semver#readme", - "license": "ISC", - "main": "semver.js", - "name": "semver", - "repository": { - "type": "git", - "url": "git+https://github.com/npm/node-semver.git" - }, - "scripts": { - "postpublish": "git push origin --all; git push origin --tags", - "postversion": "npm publish", - "preversion": "npm test", - "test": "tap" - }, - "tap": { - "check-coverage": true - }, - "version": "5.7.0" -} diff --git a/node_modules/node-notifier/node_modules/semver/range.bnf b/node_modules/node-notifier/node_modules/semver/range.bnf deleted file mode 100644 index d4c6ae0d7..000000000 --- a/node_modules/node-notifier/node_modules/semver/range.bnf +++ /dev/null @@ -1,16 +0,0 @@ -range-set ::= range ( logical-or range ) * -logical-or ::= ( ' ' ) * '||' ( ' ' ) * -range ::= hyphen | simple ( ' ' simple ) * | '' -hyphen ::= partial ' - ' partial -simple ::= primitive | partial | tilde | caret -primitive ::= ( '<' | '>' | '>=' | '<=' | '=' ) partial -partial ::= xr ( '.' xr ( '.' xr qualifier ? )? )? -xr ::= 'x' | 'X' | '*' | nr -nr ::= '0' | [1-9] ( [0-9] ) * -tilde ::= '~' partial -caret ::= '^' partial -qualifier ::= ( '-' pre )? ( '+' build )? -pre ::= parts -build ::= parts -parts ::= part ( '.' part ) * -part ::= nr | [-0-9A-Za-z]+ diff --git a/node_modules/node-notifier/node_modules/semver/semver.js b/node_modules/node-notifier/node_modules/semver/semver.js deleted file mode 100644 index d315d5d68..000000000 --- a/node_modules/node-notifier/node_modules/semver/semver.js +++ /dev/null @@ -1,1483 +0,0 @@ -exports = module.exports = SemVer - -var debug -/* istanbul ignore next */ -if (typeof process === 'object' && - process.env && - process.env.NODE_DEBUG && - /\bsemver\b/i.test(process.env.NODE_DEBUG)) { - debug = function () { - var args = Array.prototype.slice.call(arguments, 0) - args.unshift('SEMVER') - console.log.apply(console, args) - } -} else { - debug = function () {} -} - -// Note: this is the semver.org version of the spec that it implements -// Not necessarily the package version of this code. -exports.SEMVER_SPEC_VERSION = '2.0.0' - -var MAX_LENGTH = 256 -var MAX_SAFE_INTEGER = Number.MAX_SAFE_INTEGER || - /* istanbul ignore next */ 9007199254740991 - -// Max safe segment length for coercion. -var MAX_SAFE_COMPONENT_LENGTH = 16 - -// The actual regexps go on exports.re -var re = exports.re = [] -var src = exports.src = [] -var R = 0 - -// The following Regular Expressions can be used for tokenizing, -// validating, and parsing SemVer version strings. - -// ## Numeric Identifier -// A single `0`, or a non-zero digit followed by zero or more digits. - -var NUMERICIDENTIFIER = R++ -src[NUMERICIDENTIFIER] = '0|[1-9]\\d*' -var NUMERICIDENTIFIERLOOSE = R++ -src[NUMERICIDENTIFIERLOOSE] = '[0-9]+' - -// ## Non-numeric Identifier -// Zero or more digits, followed by a letter or hyphen, and then zero or -// more letters, digits, or hyphens. - -var NONNUMERICIDENTIFIER = R++ -src[NONNUMERICIDENTIFIER] = '\\d*[a-zA-Z-][a-zA-Z0-9-]*' - -// ## Main Version -// Three dot-separated numeric identifiers. - -var MAINVERSION = R++ -src[MAINVERSION] = '(' + src[NUMERICIDENTIFIER] + ')\\.' + - '(' + src[NUMERICIDENTIFIER] + ')\\.' + - '(' + src[NUMERICIDENTIFIER] + ')' - -var MAINVERSIONLOOSE = R++ -src[MAINVERSIONLOOSE] = '(' + src[NUMERICIDENTIFIERLOOSE] + ')\\.' + - '(' + src[NUMERICIDENTIFIERLOOSE] + ')\\.' + - '(' + src[NUMERICIDENTIFIERLOOSE] + ')' - -// ## Pre-release Version Identifier -// A numeric identifier, or a non-numeric identifier. - -var PRERELEASEIDENTIFIER = R++ -src[PRERELEASEIDENTIFIER] = '(?:' + src[NUMERICIDENTIFIER] + - '|' + src[NONNUMERICIDENTIFIER] + ')' - -var PRERELEASEIDENTIFIERLOOSE = R++ -src[PRERELEASEIDENTIFIERLOOSE] = '(?:' + src[NUMERICIDENTIFIERLOOSE] + - '|' + src[NONNUMERICIDENTIFIER] + ')' - -// ## Pre-release Version -// Hyphen, followed by one or more dot-separated pre-release version -// identifiers. - -var PRERELEASE = R++ -src[PRERELEASE] = '(?:-(' + src[PRERELEASEIDENTIFIER] + - '(?:\\.' + src[PRERELEASEIDENTIFIER] + ')*))' - -var PRERELEASELOOSE = R++ -src[PRERELEASELOOSE] = '(?:-?(' + src[PRERELEASEIDENTIFIERLOOSE] + - '(?:\\.' + src[PRERELEASEIDENTIFIERLOOSE] + ')*))' - -// ## Build Metadata Identifier -// Any combination of digits, letters, or hyphens. - -var BUILDIDENTIFIER = R++ -src[BUILDIDENTIFIER] = '[0-9A-Za-z-]+' - -// ## Build Metadata -// Plus sign, followed by one or more period-separated build metadata -// identifiers. - -var BUILD = R++ -src[BUILD] = '(?:\\+(' + src[BUILDIDENTIFIER] + - '(?:\\.' + src[BUILDIDENTIFIER] + ')*))' - -// ## Full Version String -// A main version, followed optionally by a pre-release version and -// build metadata. - -// Note that the only major, minor, patch, and pre-release sections of -// the version string are capturing groups. The build metadata is not a -// capturing group, because it should not ever be used in version -// comparison. - -var FULL = R++ -var FULLPLAIN = 'v?' + src[MAINVERSION] + - src[PRERELEASE] + '?' + - src[BUILD] + '?' - -src[FULL] = '^' + FULLPLAIN + '$' - -// like full, but allows v1.2.3 and =1.2.3, which people do sometimes. -// also, 1.0.0alpha1 (prerelease without the hyphen) which is pretty -// common in the npm registry. -var LOOSEPLAIN = '[v=\\s]*' + src[MAINVERSIONLOOSE] + - src[PRERELEASELOOSE] + '?' + - src[BUILD] + '?' - -var LOOSE = R++ -src[LOOSE] = '^' + LOOSEPLAIN + '$' - -var GTLT = R++ -src[GTLT] = '((?:<|>)?=?)' - -// Something like "2.*" or "1.2.x". -// Note that "x.x" is a valid xRange identifer, meaning "any version" -// Only the first item is strictly required. -var XRANGEIDENTIFIERLOOSE = R++ -src[XRANGEIDENTIFIERLOOSE] = src[NUMERICIDENTIFIERLOOSE] + '|x|X|\\*' -var XRANGEIDENTIFIER = R++ -src[XRANGEIDENTIFIER] = src[NUMERICIDENTIFIER] + '|x|X|\\*' - -var XRANGEPLAIN = R++ -src[XRANGEPLAIN] = '[v=\\s]*(' + src[XRANGEIDENTIFIER] + ')' + - '(?:\\.(' + src[XRANGEIDENTIFIER] + ')' + - '(?:\\.(' + src[XRANGEIDENTIFIER] + ')' + - '(?:' + src[PRERELEASE] + ')?' + - src[BUILD] + '?' + - ')?)?' - -var XRANGEPLAINLOOSE = R++ -src[XRANGEPLAINLOOSE] = '[v=\\s]*(' + src[XRANGEIDENTIFIERLOOSE] + ')' + - '(?:\\.(' + src[XRANGEIDENTIFIERLOOSE] + ')' + - '(?:\\.(' + src[XRANGEIDENTIFIERLOOSE] + ')' + - '(?:' + src[PRERELEASELOOSE] + ')?' + - src[BUILD] + '?' + - ')?)?' - -var XRANGE = R++ -src[XRANGE] = '^' + src[GTLT] + '\\s*' + src[XRANGEPLAIN] + '$' -var XRANGELOOSE = R++ -src[XRANGELOOSE] = '^' + src[GTLT] + '\\s*' + src[XRANGEPLAINLOOSE] + '$' - -// Coercion. -// Extract anything that could conceivably be a part of a valid semver -var COERCE = R++ -src[COERCE] = '(?:^|[^\\d])' + - '(\\d{1,' + MAX_SAFE_COMPONENT_LENGTH + '})' + - '(?:\\.(\\d{1,' + MAX_SAFE_COMPONENT_LENGTH + '}))?' + - '(?:\\.(\\d{1,' + MAX_SAFE_COMPONENT_LENGTH + '}))?' + - '(?:$|[^\\d])' - -// Tilde ranges. -// Meaning is "reasonably at or greater than" -var LONETILDE = R++ -src[LONETILDE] = '(?:~>?)' - -var TILDETRIM = R++ -src[TILDETRIM] = '(\\s*)' + src[LONETILDE] + '\\s+' -re[TILDETRIM] = new RegExp(src[TILDETRIM], 'g') -var tildeTrimReplace = '$1~' - -var TILDE = R++ -src[TILDE] = '^' + src[LONETILDE] + src[XRANGEPLAIN] + '$' -var TILDELOOSE = R++ -src[TILDELOOSE] = '^' + src[LONETILDE] + src[XRANGEPLAINLOOSE] + '$' - -// Caret ranges. -// Meaning is "at least and backwards compatible with" -var LONECARET = R++ -src[LONECARET] = '(?:\\^)' - -var CARETTRIM = R++ -src[CARETTRIM] = '(\\s*)' + src[LONECARET] + '\\s+' -re[CARETTRIM] = new RegExp(src[CARETTRIM], 'g') -var caretTrimReplace = '$1^' - -var CARET = R++ -src[CARET] = '^' + src[LONECARET] + src[XRANGEPLAIN] + '$' -var CARETLOOSE = R++ -src[CARETLOOSE] = '^' + src[LONECARET] + src[XRANGEPLAINLOOSE] + '$' - -// A simple gt/lt/eq thing, or just "" to indicate "any version" -var COMPARATORLOOSE = R++ -src[COMPARATORLOOSE] = '^' + src[GTLT] + '\\s*(' + LOOSEPLAIN + ')$|^$' -var COMPARATOR = R++ -src[COMPARATOR] = '^' + src[GTLT] + '\\s*(' + FULLPLAIN + ')$|^$' - -// An expression to strip any whitespace between the gtlt and the thing -// it modifies, so that `> 1.2.3` ==> `>1.2.3` -var COMPARATORTRIM = R++ -src[COMPARATORTRIM] = '(\\s*)' + src[GTLT] + - '\\s*(' + LOOSEPLAIN + '|' + src[XRANGEPLAIN] + ')' - -// this one has to use the /g flag -re[COMPARATORTRIM] = new RegExp(src[COMPARATORTRIM], 'g') -var comparatorTrimReplace = '$1$2$3' - -// Something like `1.2.3 - 1.2.4` -// Note that these all use the loose form, because they'll be -// checked against either the strict or loose comparator form -// later. -var HYPHENRANGE = R++ -src[HYPHENRANGE] = '^\\s*(' + src[XRANGEPLAIN] + ')' + - '\\s+-\\s+' + - '(' + src[XRANGEPLAIN] + ')' + - '\\s*$' - -var HYPHENRANGELOOSE = R++ -src[HYPHENRANGELOOSE] = '^\\s*(' + src[XRANGEPLAINLOOSE] + ')' + - '\\s+-\\s+' + - '(' + src[XRANGEPLAINLOOSE] + ')' + - '\\s*$' - -// Star ranges basically just allow anything at all. -var STAR = R++ -src[STAR] = '(<|>)?=?\\s*\\*' - -// Compile to actual regexp objects. -// All are flag-free, unless they were created above with a flag. -for (var i = 0; i < R; i++) { - debug(i, src[i]) - if (!re[i]) { - re[i] = new RegExp(src[i]) - } -} - -exports.parse = parse -function parse (version, options) { - if (!options || typeof options !== 'object') { - options = { - loose: !!options, - includePrerelease: false - } - } - - if (version instanceof SemVer) { - return version - } - - if (typeof version !== 'string') { - return null - } - - if (version.length > MAX_LENGTH) { - return null - } - - var r = options.loose ? re[LOOSE] : re[FULL] - if (!r.test(version)) { - return null - } - - try { - return new SemVer(version, options) - } catch (er) { - return null - } -} - -exports.valid = valid -function valid (version, options) { - var v = parse(version, options) - return v ? v.version : null -} - -exports.clean = clean -function clean (version, options) { - var s = parse(version.trim().replace(/^[=v]+/, ''), options) - return s ? s.version : null -} - -exports.SemVer = SemVer - -function SemVer (version, options) { - if (!options || typeof options !== 'object') { - options = { - loose: !!options, - includePrerelease: false - } - } - if (version instanceof SemVer) { - if (version.loose === options.loose) { - return version - } else { - version = version.version - } - } else if (typeof version !== 'string') { - throw new TypeError('Invalid Version: ' + version) - } - - if (version.length > MAX_LENGTH) { - throw new TypeError('version is longer than ' + MAX_LENGTH + ' characters') - } - - if (!(this instanceof SemVer)) { - return new SemVer(version, options) - } - - debug('SemVer', version, options) - this.options = options - this.loose = !!options.loose - - var m = version.trim().match(options.loose ? re[LOOSE] : re[FULL]) - - if (!m) { - throw new TypeError('Invalid Version: ' + version) - } - - this.raw = version - - // these are actually numbers - this.major = +m[1] - this.minor = +m[2] - this.patch = +m[3] - - if (this.major > MAX_SAFE_INTEGER || this.major < 0) { - throw new TypeError('Invalid major version') - } - - if (this.minor > MAX_SAFE_INTEGER || this.minor < 0) { - throw new TypeError('Invalid minor version') - } - - if (this.patch > MAX_SAFE_INTEGER || this.patch < 0) { - throw new TypeError('Invalid patch version') - } - - // numberify any prerelease numeric ids - if (!m[4]) { - this.prerelease = [] - } else { - this.prerelease = m[4].split('.').map(function (id) { - if (/^[0-9]+$/.test(id)) { - var num = +id - if (num >= 0 && num < MAX_SAFE_INTEGER) { - return num - } - } - return id - }) - } - - this.build = m[5] ? m[5].split('.') : [] - this.format() -} - -SemVer.prototype.format = function () { - this.version = this.major + '.' + this.minor + '.' + this.patch - if (this.prerelease.length) { - this.version += '-' + this.prerelease.join('.') - } - return this.version -} - -SemVer.prototype.toString = function () { - return this.version -} - -SemVer.prototype.compare = function (other) { - debug('SemVer.compare', this.version, this.options, other) - if (!(other instanceof SemVer)) { - other = new SemVer(other, this.options) - } - - return this.compareMain(other) || this.comparePre(other) -} - -SemVer.prototype.compareMain = function (other) { - if (!(other instanceof SemVer)) { - other = new SemVer(other, this.options) - } - - return compareIdentifiers(this.major, other.major) || - compareIdentifiers(this.minor, other.minor) || - compareIdentifiers(this.patch, other.patch) -} - -SemVer.prototype.comparePre = function (other) { - if (!(other instanceof SemVer)) { - other = new SemVer(other, this.options) - } - - // NOT having a prerelease is > having one - if (this.prerelease.length && !other.prerelease.length) { - return -1 - } else if (!this.prerelease.length && other.prerelease.length) { - return 1 - } else if (!this.prerelease.length && !other.prerelease.length) { - return 0 - } - - var i = 0 - do { - var a = this.prerelease[i] - var b = other.prerelease[i] - debug('prerelease compare', i, a, b) - if (a === undefined && b === undefined) { - return 0 - } else if (b === undefined) { - return 1 - } else if (a === undefined) { - return -1 - } else if (a === b) { - continue - } else { - return compareIdentifiers(a, b) - } - } while (++i) -} - -// preminor will bump the version up to the next minor release, and immediately -// down to pre-release. premajor and prepatch work the same way. -SemVer.prototype.inc = function (release, identifier) { - switch (release) { - case 'premajor': - this.prerelease.length = 0 - this.patch = 0 - this.minor = 0 - this.major++ - this.inc('pre', identifier) - break - case 'preminor': - this.prerelease.length = 0 - this.patch = 0 - this.minor++ - this.inc('pre', identifier) - break - case 'prepatch': - // If this is already a prerelease, it will bump to the next version - // drop any prereleases that might already exist, since they are not - // relevant at this point. - this.prerelease.length = 0 - this.inc('patch', identifier) - this.inc('pre', identifier) - break - // If the input is a non-prerelease version, this acts the same as - // prepatch. - case 'prerelease': - if (this.prerelease.length === 0) { - this.inc('patch', identifier) - } - this.inc('pre', identifier) - break - - case 'major': - // If this is a pre-major version, bump up to the same major version. - // Otherwise increment major. - // 1.0.0-5 bumps to 1.0.0 - // 1.1.0 bumps to 2.0.0 - if (this.minor !== 0 || - this.patch !== 0 || - this.prerelease.length === 0) { - this.major++ - } - this.minor = 0 - this.patch = 0 - this.prerelease = [] - break - case 'minor': - // If this is a pre-minor version, bump up to the same minor version. - // Otherwise increment minor. - // 1.2.0-5 bumps to 1.2.0 - // 1.2.1 bumps to 1.3.0 - if (this.patch !== 0 || this.prerelease.length === 0) { - this.minor++ - } - this.patch = 0 - this.prerelease = [] - break - case 'patch': - // If this is not a pre-release version, it will increment the patch. - // If it is a pre-release it will bump up to the same patch version. - // 1.2.0-5 patches to 1.2.0 - // 1.2.0 patches to 1.2.1 - if (this.prerelease.length === 0) { - this.patch++ - } - this.prerelease = [] - break - // This probably shouldn't be used publicly. - // 1.0.0 "pre" would become 1.0.0-0 which is the wrong direction. - case 'pre': - if (this.prerelease.length === 0) { - this.prerelease = [0] - } else { - var i = this.prerelease.length - while (--i >= 0) { - if (typeof this.prerelease[i] === 'number') { - this.prerelease[i]++ - i = -2 - } - } - if (i === -1) { - // didn't increment anything - this.prerelease.push(0) - } - } - if (identifier) { - // 1.2.0-beta.1 bumps to 1.2.0-beta.2, - // 1.2.0-beta.fooblz or 1.2.0-beta bumps to 1.2.0-beta.0 - if (this.prerelease[0] === identifier) { - if (isNaN(this.prerelease[1])) { - this.prerelease = [identifier, 0] - } - } else { - this.prerelease = [identifier, 0] - } - } - break - - default: - throw new Error('invalid increment argument: ' + release) - } - this.format() - this.raw = this.version - return this -} - -exports.inc = inc -function inc (version, release, loose, identifier) { - if (typeof (loose) === 'string') { - identifier = loose - loose = undefined - } - - try { - return new SemVer(version, loose).inc(release, identifier).version - } catch (er) { - return null - } -} - -exports.diff = diff -function diff (version1, version2) { - if (eq(version1, version2)) { - return null - } else { - var v1 = parse(version1) - var v2 = parse(version2) - var prefix = '' - if (v1.prerelease.length || v2.prerelease.length) { - prefix = 'pre' - var defaultResult = 'prerelease' - } - for (var key in v1) { - if (key === 'major' || key === 'minor' || key === 'patch') { - if (v1[key] !== v2[key]) { - return prefix + key - } - } - } - return defaultResult // may be undefined - } -} - -exports.compareIdentifiers = compareIdentifiers - -var numeric = /^[0-9]+$/ -function compareIdentifiers (a, b) { - var anum = numeric.test(a) - var bnum = numeric.test(b) - - if (anum && bnum) { - a = +a - b = +b - } - - return a === b ? 0 - : (anum && !bnum) ? -1 - : (bnum && !anum) ? 1 - : a < b ? -1 - : 1 -} - -exports.rcompareIdentifiers = rcompareIdentifiers -function rcompareIdentifiers (a, b) { - return compareIdentifiers(b, a) -} - -exports.major = major -function major (a, loose) { - return new SemVer(a, loose).major -} - -exports.minor = minor -function minor (a, loose) { - return new SemVer(a, loose).minor -} - -exports.patch = patch -function patch (a, loose) { - return new SemVer(a, loose).patch -} - -exports.compare = compare -function compare (a, b, loose) { - return new SemVer(a, loose).compare(new SemVer(b, loose)) -} - -exports.compareLoose = compareLoose -function compareLoose (a, b) { - return compare(a, b, true) -} - -exports.rcompare = rcompare -function rcompare (a, b, loose) { - return compare(b, a, loose) -} - -exports.sort = sort -function sort (list, loose) { - return list.sort(function (a, b) { - return exports.compare(a, b, loose) - }) -} - -exports.rsort = rsort -function rsort (list, loose) { - return list.sort(function (a, b) { - return exports.rcompare(a, b, loose) - }) -} - -exports.gt = gt -function gt (a, b, loose) { - return compare(a, b, loose) > 0 -} - -exports.lt = lt -function lt (a, b, loose) { - return compare(a, b, loose) < 0 -} - -exports.eq = eq -function eq (a, b, loose) { - return compare(a, b, loose) === 0 -} - -exports.neq = neq -function neq (a, b, loose) { - return compare(a, b, loose) !== 0 -} - -exports.gte = gte -function gte (a, b, loose) { - return compare(a, b, loose) >= 0 -} - -exports.lte = lte -function lte (a, b, loose) { - return compare(a, b, loose) <= 0 -} - -exports.cmp = cmp -function cmp (a, op, b, loose) { - switch (op) { - case '===': - if (typeof a === 'object') - a = a.version - if (typeof b === 'object') - b = b.version - return a === b - - case '!==': - if (typeof a === 'object') - a = a.version - if (typeof b === 'object') - b = b.version - return a !== b - - case '': - case '=': - case '==': - return eq(a, b, loose) - - case '!=': - return neq(a, b, loose) - - case '>': - return gt(a, b, loose) - - case '>=': - return gte(a, b, loose) - - case '<': - return lt(a, b, loose) - - case '<=': - return lte(a, b, loose) - - default: - throw new TypeError('Invalid operator: ' + op) - } -} - -exports.Comparator = Comparator -function Comparator (comp, options) { - if (!options || typeof options !== 'object') { - options = { - loose: !!options, - includePrerelease: false - } - } - - if (comp instanceof Comparator) { - if (comp.loose === !!options.loose) { - return comp - } else { - comp = comp.value - } - } - - if (!(this instanceof Comparator)) { - return new Comparator(comp, options) - } - - debug('comparator', comp, options) - this.options = options - this.loose = !!options.loose - this.parse(comp) - - if (this.semver === ANY) { - this.value = '' - } else { - this.value = this.operator + this.semver.version - } - - debug('comp', this) -} - -var ANY = {} -Comparator.prototype.parse = function (comp) { - var r = this.options.loose ? re[COMPARATORLOOSE] : re[COMPARATOR] - var m = comp.match(r) - - if (!m) { - throw new TypeError('Invalid comparator: ' + comp) - } - - this.operator = m[1] - if (this.operator === '=') { - this.operator = '' - } - - // if it literally is just '>' or '' then allow anything. - if (!m[2]) { - this.semver = ANY - } else { - this.semver = new SemVer(m[2], this.options.loose) - } -} - -Comparator.prototype.toString = function () { - return this.value -} - -Comparator.prototype.test = function (version) { - debug('Comparator.test', version, this.options.loose) - - if (this.semver === ANY) { - return true - } - - if (typeof version === 'string') { - version = new SemVer(version, this.options) - } - - return cmp(version, this.operator, this.semver, this.options) -} - -Comparator.prototype.intersects = function (comp, options) { - if (!(comp instanceof Comparator)) { - throw new TypeError('a Comparator is required') - } - - if (!options || typeof options !== 'object') { - options = { - loose: !!options, - includePrerelease: false - } - } - - var rangeTmp - - if (this.operator === '') { - rangeTmp = new Range(comp.value, options) - return satisfies(this.value, rangeTmp, options) - } else if (comp.operator === '') { - rangeTmp = new Range(this.value, options) - return satisfies(comp.semver, rangeTmp, options) - } - - var sameDirectionIncreasing = - (this.operator === '>=' || this.operator === '>') && - (comp.operator === '>=' || comp.operator === '>') - var sameDirectionDecreasing = - (this.operator === '<=' || this.operator === '<') && - (comp.operator === '<=' || comp.operator === '<') - var sameSemVer = this.semver.version === comp.semver.version - var differentDirectionsInclusive = - (this.operator === '>=' || this.operator === '<=') && - (comp.operator === '>=' || comp.operator === '<=') - var oppositeDirectionsLessThan = - cmp(this.semver, '<', comp.semver, options) && - ((this.operator === '>=' || this.operator === '>') && - (comp.operator === '<=' || comp.operator === '<')) - var oppositeDirectionsGreaterThan = - cmp(this.semver, '>', comp.semver, options) && - ((this.operator === '<=' || this.operator === '<') && - (comp.operator === '>=' || comp.operator === '>')) - - return sameDirectionIncreasing || sameDirectionDecreasing || - (sameSemVer && differentDirectionsInclusive) || - oppositeDirectionsLessThan || oppositeDirectionsGreaterThan -} - -exports.Range = Range -function Range (range, options) { - if (!options || typeof options !== 'object') { - options = { - loose: !!options, - includePrerelease: false - } - } - - if (range instanceof Range) { - if (range.loose === !!options.loose && - range.includePrerelease === !!options.includePrerelease) { - return range - } else { - return new Range(range.raw, options) - } - } - - if (range instanceof Comparator) { - return new Range(range.value, options) - } - - if (!(this instanceof Range)) { - return new Range(range, options) - } - - this.options = options - this.loose = !!options.loose - this.includePrerelease = !!options.includePrerelease - - // First, split based on boolean or || - this.raw = range - this.set = range.split(/\s*\|\|\s*/).map(function (range) { - return this.parseRange(range.trim()) - }, this).filter(function (c) { - // throw out any that are not relevant for whatever reason - return c.length - }) - - if (!this.set.length) { - throw new TypeError('Invalid SemVer Range: ' + range) - } - - this.format() -} - -Range.prototype.format = function () { - this.range = this.set.map(function (comps) { - return comps.join(' ').trim() - }).join('||').trim() - return this.range -} - -Range.prototype.toString = function () { - return this.range -} - -Range.prototype.parseRange = function (range) { - var loose = this.options.loose - range = range.trim() - // `1.2.3 - 1.2.4` => `>=1.2.3 <=1.2.4` - var hr = loose ? re[HYPHENRANGELOOSE] : re[HYPHENRANGE] - range = range.replace(hr, hyphenReplace) - debug('hyphen replace', range) - // `> 1.2.3 < 1.2.5` => `>1.2.3 <1.2.5` - range = range.replace(re[COMPARATORTRIM], comparatorTrimReplace) - debug('comparator trim', range, re[COMPARATORTRIM]) - - // `~ 1.2.3` => `~1.2.3` - range = range.replace(re[TILDETRIM], tildeTrimReplace) - - // `^ 1.2.3` => `^1.2.3` - range = range.replace(re[CARETTRIM], caretTrimReplace) - - // normalize spaces - range = range.split(/\s+/).join(' ') - - // At this point, the range is completely trimmed and - // ready to be split into comparators. - - var compRe = loose ? re[COMPARATORLOOSE] : re[COMPARATOR] - var set = range.split(' ').map(function (comp) { - return parseComparator(comp, this.options) - }, this).join(' ').split(/\s+/) - if (this.options.loose) { - // in loose mode, throw out any that are not valid comparators - set = set.filter(function (comp) { - return !!comp.match(compRe) - }) - } - set = set.map(function (comp) { - return new Comparator(comp, this.options) - }, this) - - return set -} - -Range.prototype.intersects = function (range, options) { - if (!(range instanceof Range)) { - throw new TypeError('a Range is required') - } - - return this.set.some(function (thisComparators) { - return thisComparators.every(function (thisComparator) { - return range.set.some(function (rangeComparators) { - return rangeComparators.every(function (rangeComparator) { - return thisComparator.intersects(rangeComparator, options) - }) - }) - }) - }) -} - -// Mostly just for testing and legacy API reasons -exports.toComparators = toComparators -function toComparators (range, options) { - return new Range(range, options).set.map(function (comp) { - return comp.map(function (c) { - return c.value - }).join(' ').trim().split(' ') - }) -} - -// comprised of xranges, tildes, stars, and gtlt's at this point. -// already replaced the hyphen ranges -// turn into a set of JUST comparators. -function parseComparator (comp, options) { - debug('comp', comp, options) - comp = replaceCarets(comp, options) - debug('caret', comp) - comp = replaceTildes(comp, options) - debug('tildes', comp) - comp = replaceXRanges(comp, options) - debug('xrange', comp) - comp = replaceStars(comp, options) - debug('stars', comp) - return comp -} - -function isX (id) { - return !id || id.toLowerCase() === 'x' || id === '*' -} - -// ~, ~> --> * (any, kinda silly) -// ~2, ~2.x, ~2.x.x, ~>2, ~>2.x ~>2.x.x --> >=2.0.0 <3.0.0 -// ~2.0, ~2.0.x, ~>2.0, ~>2.0.x --> >=2.0.0 <2.1.0 -// ~1.2, ~1.2.x, ~>1.2, ~>1.2.x --> >=1.2.0 <1.3.0 -// ~1.2.3, ~>1.2.3 --> >=1.2.3 <1.3.0 -// ~1.2.0, ~>1.2.0 --> >=1.2.0 <1.3.0 -function replaceTildes (comp, options) { - return comp.trim().split(/\s+/).map(function (comp) { - return replaceTilde(comp, options) - }).join(' ') -} - -function replaceTilde (comp, options) { - var r = options.loose ? re[TILDELOOSE] : re[TILDE] - return comp.replace(r, function (_, M, m, p, pr) { - debug('tilde', comp, _, M, m, p, pr) - var ret - - if (isX(M)) { - ret = '' - } else if (isX(m)) { - ret = '>=' + M + '.0.0 <' + (+M + 1) + '.0.0' - } else if (isX(p)) { - // ~1.2 == >=1.2.0 <1.3.0 - ret = '>=' + M + '.' + m + '.0 <' + M + '.' + (+m + 1) + '.0' - } else if (pr) { - debug('replaceTilde pr', pr) - ret = '>=' + M + '.' + m + '.' + p + '-' + pr + - ' <' + M + '.' + (+m + 1) + '.0' - } else { - // ~1.2.3 == >=1.2.3 <1.3.0 - ret = '>=' + M + '.' + m + '.' + p + - ' <' + M + '.' + (+m + 1) + '.0' - } - - debug('tilde return', ret) - return ret - }) -} - -// ^ --> * (any, kinda silly) -// ^2, ^2.x, ^2.x.x --> >=2.0.0 <3.0.0 -// ^2.0, ^2.0.x --> >=2.0.0 <3.0.0 -// ^1.2, ^1.2.x --> >=1.2.0 <2.0.0 -// ^1.2.3 --> >=1.2.3 <2.0.0 -// ^1.2.0 --> >=1.2.0 <2.0.0 -function replaceCarets (comp, options) { - return comp.trim().split(/\s+/).map(function (comp) { - return replaceCaret(comp, options) - }).join(' ') -} - -function replaceCaret (comp, options) { - debug('caret', comp, options) - var r = options.loose ? re[CARETLOOSE] : re[CARET] - return comp.replace(r, function (_, M, m, p, pr) { - debug('caret', comp, _, M, m, p, pr) - var ret - - if (isX(M)) { - ret = '' - } else if (isX(m)) { - ret = '>=' + M + '.0.0 <' + (+M + 1) + '.0.0' - } else if (isX(p)) { - if (M === '0') { - ret = '>=' + M + '.' + m + '.0 <' + M + '.' + (+m + 1) + '.0' - } else { - ret = '>=' + M + '.' + m + '.0 <' + (+M + 1) + '.0.0' - } - } else if (pr) { - debug('replaceCaret pr', pr) - if (M === '0') { - if (m === '0') { - ret = '>=' + M + '.' + m + '.' + p + '-' + pr + - ' <' + M + '.' + m + '.' + (+p + 1) - } else { - ret = '>=' + M + '.' + m + '.' + p + '-' + pr + - ' <' + M + '.' + (+m + 1) + '.0' - } - } else { - ret = '>=' + M + '.' + m + '.' + p + '-' + pr + - ' <' + (+M + 1) + '.0.0' - } - } else { - debug('no pr') - if (M === '0') { - if (m === '0') { - ret = '>=' + M + '.' + m + '.' + p + - ' <' + M + '.' + m + '.' + (+p + 1) - } else { - ret = '>=' + M + '.' + m + '.' + p + - ' <' + M + '.' + (+m + 1) + '.0' - } - } else { - ret = '>=' + M + '.' + m + '.' + p + - ' <' + (+M + 1) + '.0.0' - } - } - - debug('caret return', ret) - return ret - }) -} - -function replaceXRanges (comp, options) { - debug('replaceXRanges', comp, options) - return comp.split(/\s+/).map(function (comp) { - return replaceXRange(comp, options) - }).join(' ') -} - -function replaceXRange (comp, options) { - comp = comp.trim() - var r = options.loose ? re[XRANGELOOSE] : re[XRANGE] - return comp.replace(r, function (ret, gtlt, M, m, p, pr) { - debug('xRange', comp, ret, gtlt, M, m, p, pr) - var xM = isX(M) - var xm = xM || isX(m) - var xp = xm || isX(p) - var anyX = xp - - if (gtlt === '=' && anyX) { - gtlt = '' - } - - if (xM) { - if (gtlt === '>' || gtlt === '<') { - // nothing is allowed - ret = '<0.0.0' - } else { - // nothing is forbidden - ret = '*' - } - } else if (gtlt && anyX) { - // we know patch is an x, because we have any x at all. - // replace X with 0 - if (xm) { - m = 0 - } - p = 0 - - if (gtlt === '>') { - // >1 => >=2.0.0 - // >1.2 => >=1.3.0 - // >1.2.3 => >= 1.2.4 - gtlt = '>=' - if (xm) { - M = +M + 1 - m = 0 - p = 0 - } else { - m = +m + 1 - p = 0 - } - } else if (gtlt === '<=') { - // <=0.7.x is actually <0.8.0, since any 0.7.x should - // pass. Similarly, <=7.x is actually <8.0.0, etc. - gtlt = '<' - if (xm) { - M = +M + 1 - } else { - m = +m + 1 - } - } - - ret = gtlt + M + '.' + m + '.' + p - } else if (xm) { - ret = '>=' + M + '.0.0 <' + (+M + 1) + '.0.0' - } else if (xp) { - ret = '>=' + M + '.' + m + '.0 <' + M + '.' + (+m + 1) + '.0' - } - - debug('xRange return', ret) - - return ret - }) -} - -// Because * is AND-ed with everything else in the comparator, -// and '' means "any version", just remove the *s entirely. -function replaceStars (comp, options) { - debug('replaceStars', comp, options) - // Looseness is ignored here. star is always as loose as it gets! - return comp.trim().replace(re[STAR], '') -} - -// This function is passed to string.replace(re[HYPHENRANGE]) -// M, m, patch, prerelease, build -// 1.2 - 3.4.5 => >=1.2.0 <=3.4.5 -// 1.2.3 - 3.4 => >=1.2.0 <3.5.0 Any 3.4.x will do -// 1.2 - 3.4 => >=1.2.0 <3.5.0 -function hyphenReplace ($0, - from, fM, fm, fp, fpr, fb, - to, tM, tm, tp, tpr, tb) { - if (isX(fM)) { - from = '' - } else if (isX(fm)) { - from = '>=' + fM + '.0.0' - } else if (isX(fp)) { - from = '>=' + fM + '.' + fm + '.0' - } else { - from = '>=' + from - } - - if (isX(tM)) { - to = '' - } else if (isX(tm)) { - to = '<' + (+tM + 1) + '.0.0' - } else if (isX(tp)) { - to = '<' + tM + '.' + (+tm + 1) + '.0' - } else if (tpr) { - to = '<=' + tM + '.' + tm + '.' + tp + '-' + tpr - } else { - to = '<=' + to - } - - return (from + ' ' + to).trim() -} - -// if ANY of the sets match ALL of its comparators, then pass -Range.prototype.test = function (version) { - if (!version) { - return false - } - - if (typeof version === 'string') { - version = new SemVer(version, this.options) - } - - for (var i = 0; i < this.set.length; i++) { - if (testSet(this.set[i], version, this.options)) { - return true - } - } - return false -} - -function testSet (set, version, options) { - for (var i = 0; i < set.length; i++) { - if (!set[i].test(version)) { - return false - } - } - - if (version.prerelease.length && !options.includePrerelease) { - // Find the set of versions that are allowed to have prereleases - // For example, ^1.2.3-pr.1 desugars to >=1.2.3-pr.1 <2.0.0 - // That should allow `1.2.3-pr.2` to pass. - // However, `1.2.4-alpha.notready` should NOT be allowed, - // even though it's within the range set by the comparators. - for (i = 0; i < set.length; i++) { - debug(set[i].semver) - if (set[i].semver === ANY) { - continue - } - - if (set[i].semver.prerelease.length > 0) { - var allowed = set[i].semver - if (allowed.major === version.major && - allowed.minor === version.minor && - allowed.patch === version.patch) { - return true - } - } - } - - // Version has a -pre, but it's not one of the ones we like. - return false - } - - return true -} - -exports.satisfies = satisfies -function satisfies (version, range, options) { - try { - range = new Range(range, options) - } catch (er) { - return false - } - return range.test(version) -} - -exports.maxSatisfying = maxSatisfying -function maxSatisfying (versions, range, options) { - var max = null - var maxSV = null - try { - var rangeObj = new Range(range, options) - } catch (er) { - return null - } - versions.forEach(function (v) { - if (rangeObj.test(v)) { - // satisfies(v, range, options) - if (!max || maxSV.compare(v) === -1) { - // compare(max, v, true) - max = v - maxSV = new SemVer(max, options) - } - } - }) - return max -} - -exports.minSatisfying = minSatisfying -function minSatisfying (versions, range, options) { - var min = null - var minSV = null - try { - var rangeObj = new Range(range, options) - } catch (er) { - return null - } - versions.forEach(function (v) { - if (rangeObj.test(v)) { - // satisfies(v, range, options) - if (!min || minSV.compare(v) === 1) { - // compare(min, v, true) - min = v - minSV = new SemVer(min, options) - } - } - }) - return min -} - -exports.minVersion = minVersion -function minVersion (range, loose) { - range = new Range(range, loose) - - var minver = new SemVer('0.0.0') - if (range.test(minver)) { - return minver - } - - minver = new SemVer('0.0.0-0') - if (range.test(minver)) { - return minver - } - - minver = null - for (var i = 0; i < range.set.length; ++i) { - var comparators = range.set[i] - - comparators.forEach(function (comparator) { - // Clone to avoid manipulating the comparator's semver object. - var compver = new SemVer(comparator.semver.version) - switch (comparator.operator) { - case '>': - if (compver.prerelease.length === 0) { - compver.patch++ - } else { - compver.prerelease.push(0) - } - compver.raw = compver.format() - /* fallthrough */ - case '': - case '>=': - if (!minver || gt(minver, compver)) { - minver = compver - } - break - case '<': - case '<=': - /* Ignore maximum versions */ - break - /* istanbul ignore next */ - default: - throw new Error('Unexpected operation: ' + comparator.operator) - } - }) - } - - if (minver && range.test(minver)) { - return minver - } - - return null -} - -exports.validRange = validRange -function validRange (range, options) { - try { - // Return '*' instead of '' so that truthiness works. - // This will throw if it's invalid anyway - return new Range(range, options).range || '*' - } catch (er) { - return null - } -} - -// Determine if version is less than all the versions possible in the range -exports.ltr = ltr -function ltr (version, range, options) { - return outside(version, range, '<', options) -} - -// Determine if version is greater than all the versions possible in the range. -exports.gtr = gtr -function gtr (version, range, options) { - return outside(version, range, '>', options) -} - -exports.outside = outside -function outside (version, range, hilo, options) { - version = new SemVer(version, options) - range = new Range(range, options) - - var gtfn, ltefn, ltfn, comp, ecomp - switch (hilo) { - case '>': - gtfn = gt - ltefn = lte - ltfn = lt - comp = '>' - ecomp = '>=' - break - case '<': - gtfn = lt - ltefn = gte - ltfn = gt - comp = '<' - ecomp = '<=' - break - default: - throw new TypeError('Must provide a hilo val of "<" or ">"') - } - - // If it satisifes the range it is not outside - if (satisfies(version, range, options)) { - return false - } - - // From now on, variable terms are as if we're in "gtr" mode. - // but note that everything is flipped for the "ltr" function. - - for (var i = 0; i < range.set.length; ++i) { - var comparators = range.set[i] - - var high = null - var low = null - - comparators.forEach(function (comparator) { - if (comparator.semver === ANY) { - comparator = new Comparator('>=0.0.0') - } - high = high || comparator - low = low || comparator - if (gtfn(comparator.semver, high.semver, options)) { - high = comparator - } else if (ltfn(comparator.semver, low.semver, options)) { - low = comparator - } - }) - - // If the edge version comparator has a operator then our version - // isn't outside it - if (high.operator === comp || high.operator === ecomp) { - return false - } - - // If the lowest version comparator has an operator and our version - // is less than it then it isn't higher than the range - if ((!low.operator || low.operator === comp) && - ltefn(version, low.semver)) { - return false - } else if (low.operator === ecomp && ltfn(version, low.semver)) { - return false - } - } - return true -} - -exports.prerelease = prerelease -function prerelease (version, options) { - var parsed = parse(version, options) - return (parsed && parsed.prerelease.length) ? parsed.prerelease : null -} - -exports.intersects = intersects -function intersects (r1, r2, options) { - r1 = new Range(r1, options) - r2 = new Range(r2, options) - return r1.intersects(r2) -} - -exports.coerce = coerce -function coerce (version) { - if (version instanceof SemVer) { - return version - } - - if (typeof version !== 'string') { - return null - } - - var match = version.match(re[COERCE]) - - if (match == null) { - return null - } - - return parse(match[1] + - '.' + (match[2] || '0') + - '.' + (match[3] || '0')) -} diff --git a/node_modules/node-notifier/package.json b/node_modules/node-notifier/package.json index 320a51925..7e6701953 100644 --- a/node_modules/node-notifier/package.json +++ b/node_modules/node-notifier/package.json @@ -1,39 +1,34 @@ { - "_args": [ - [ - "node-notifier@5.4.0", - "/Users/drew.heavner/Documents/Github/sign-android-release" - ] - ], - "_development": true, - "_from": "node-notifier@5.4.0", - "_id": "node-notifier@5.4.0", + "_from": "node-notifier@^5.4.2", + "_id": "node-notifier@5.4.3", "_inBundle": false, - "_integrity": "sha512-SUDEb+o71XR5lXSTyivXd9J7fCloE3SyP4lSgt3lU2oSANiox+SxlNRGPjDKrwU1YN3ix2KN/VGGCg0t01rttQ==", + "_integrity": "sha512-M4UBGcs4jeOK9CjTsYwkvH6/MzuUmGCyTW+kCY7uO+1ZVr0+FHGdPdIf5CCLqAaxnRrWidyoQlNkMIIVwbKB8Q==", "_location": "/node-notifier", "_phantomChildren": {}, "_requested": { - "type": "version", + "type": "range", "registry": true, - "raw": "node-notifier@5.4.0", + "raw": "node-notifier@^5.4.2", "name": "node-notifier", "escapedName": "node-notifier", - "rawSpec": "5.4.0", + "rawSpec": "^5.4.2", "saveSpec": null, - "fetchSpec": "5.4.0" + "fetchSpec": "^5.4.2" }, "_requiredBy": [ "/@jest/reporters" ], - "_resolved": "https://registry.npmjs.org/node-notifier/-/node-notifier-5.4.0.tgz", - "_spec": "5.4.0", - "_where": "/Users/drew.heavner/Documents/Github/sign-android-release", + "_resolved": "https://registry.npmjs.org/node-notifier/-/node-notifier-5.4.3.tgz", + "_shasum": "cb72daf94c93904098e28b9c590fd866e464bd50", + "_spec": "node-notifier@^5.4.2", + "_where": "/Users/drew.heavner/Documents/Github/sign-android-release/node_modules/@jest/reporters", "author": { "name": "Mikael Brevik" }, "bugs": { "url": "https://github.com/mikaelbr/node-notifier/issues" }, + "bundleDependencies": false, "dependencies": { "growly": "^1.3.0", "is-wsl": "^1.1.0", @@ -41,6 +36,7 @@ "shellwords": "^0.1.1", "which": "^1.3.0" }, + "deprecated": false, "description": "A Node.js module for sending notifications on native Mac, Windows (post and pre 8) and Linux (or Growl as fallback)", "devDependencies": { "eslint": "^5.12.1", @@ -99,5 +95,5 @@ "pretest": "npm run lint", "test": "jest" }, - "version": "5.4.0" + "version": "5.4.3" } diff --git a/node_modules/normalize-package-data/node_modules/.bin/semver b/node_modules/normalize-package-data/node_modules/.bin/semver deleted file mode 120000 index 317eb293d..000000000 --- a/node_modules/normalize-package-data/node_modules/.bin/semver +++ /dev/null @@ -1 +0,0 @@ -../semver/bin/semver \ No newline at end of file diff --git a/node_modules/normalize-package-data/node_modules/semver/CHANGELOG.md b/node_modules/normalize-package-data/node_modules/semver/CHANGELOG.md deleted file mode 100644 index 66304fdd2..000000000 --- a/node_modules/normalize-package-data/node_modules/semver/CHANGELOG.md +++ /dev/null @@ -1,39 +0,0 @@ -# changes log - -## 5.7 - -* Add `minVersion` method - -## 5.6 - -* Move boolean `loose` param to an options object, with - backwards-compatibility protection. -* Add ability to opt out of special prerelease version handling with - the `includePrerelease` option flag. - -## 5.5 - -* Add version coercion capabilities - -## 5.4 - -* Add intersection checking - -## 5.3 - -* Add `minSatisfying` method - -## 5.2 - -* Add `prerelease(v)` that returns prerelease components - -## 5.1 - -* Add Backus-Naur for ranges -* Remove excessively cute inspection methods - -## 5.0 - -* Remove AMD/Browserified build artifacts -* Fix ltr and gtr when using the `*` range -* Fix for range `*` with a prerelease identifier diff --git a/node_modules/normalize-package-data/node_modules/semver/LICENSE b/node_modules/normalize-package-data/node_modules/semver/LICENSE deleted file mode 100644 index 19129e315..000000000 --- a/node_modules/normalize-package-data/node_modules/semver/LICENSE +++ /dev/null @@ -1,15 +0,0 @@ -The ISC License - -Copyright (c) Isaac Z. Schlueter and Contributors - -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR -ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR -IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/node_modules/normalize-package-data/node_modules/semver/README.md b/node_modules/normalize-package-data/node_modules/semver/README.md deleted file mode 100644 index e5ccececf..000000000 --- a/node_modules/normalize-package-data/node_modules/semver/README.md +++ /dev/null @@ -1,411 +0,0 @@ -semver(1) -- The semantic versioner for npm -=========================================== - -## Install - -```bash -npm install --save semver -```` - -## Usage - -As a node module: - -```js -const semver = require('semver') - -semver.valid('1.2.3') // '1.2.3' -semver.valid('a.b.c') // null -semver.clean(' =v1.2.3 ') // '1.2.3' -semver.satisfies('1.2.3', '1.x || >=2.5.0 || 5.0.0 - 7.2.3') // true -semver.gt('1.2.3', '9.8.7') // false -semver.lt('1.2.3', '9.8.7') // true -semver.minVersion('>=1.0.0') // '1.0.0' -semver.valid(semver.coerce('v2')) // '2.0.0' -semver.valid(semver.coerce('42.6.7.9.3-alpha')) // '42.6.7' -``` - -As a command-line utility: - -``` -$ semver -h - -A JavaScript implementation of the https://semver.org/ specification -Copyright Isaac Z. Schlueter - -Usage: semver [options] [ [...]] -Prints valid versions sorted by SemVer precedence - -Options: --r --range - Print versions that match the specified range. - --i --increment [] - Increment a version by the specified level. Level can - be one of: major, minor, patch, premajor, preminor, - prepatch, or prerelease. Default level is 'patch'. - Only one version may be specified. - ---preid - Identifier to be used to prefix premajor, preminor, - prepatch or prerelease version increments. - --l --loose - Interpret versions and ranges loosely - --p --include-prerelease - Always include prerelease versions in range matching - --c --coerce - Coerce a string into SemVer if possible - (does not imply --loose) - -Program exits successfully if any valid version satisfies -all supplied ranges, and prints all satisfying versions. - -If no satisfying versions are found, then exits failure. - -Versions are printed in ascending order, so supplying -multiple versions to the utility will just sort them. -``` - -## Versions - -A "version" is described by the `v2.0.0` specification found at -. - -A leading `"="` or `"v"` character is stripped off and ignored. - -## Ranges - -A `version range` is a set of `comparators` which specify versions -that satisfy the range. - -A `comparator` is composed of an `operator` and a `version`. The set -of primitive `operators` is: - -* `<` Less than -* `<=` Less than or equal to -* `>` Greater than -* `>=` Greater than or equal to -* `=` Equal. If no operator is specified, then equality is assumed, - so this operator is optional, but MAY be included. - -For example, the comparator `>=1.2.7` would match the versions -`1.2.7`, `1.2.8`, `2.5.3`, and `1.3.9`, but not the versions `1.2.6` -or `1.1.0`. - -Comparators can be joined by whitespace to form a `comparator set`, -which is satisfied by the **intersection** of all of the comparators -it includes. - -A range is composed of one or more comparator sets, joined by `||`. A -version matches a range if and only if every comparator in at least -one of the `||`-separated comparator sets is satisfied by the version. - -For example, the range `>=1.2.7 <1.3.0` would match the versions -`1.2.7`, `1.2.8`, and `1.2.99`, but not the versions `1.2.6`, `1.3.0`, -or `1.1.0`. - -The range `1.2.7 || >=1.2.9 <2.0.0` would match the versions `1.2.7`, -`1.2.9`, and `1.4.6`, but not the versions `1.2.8` or `2.0.0`. - -### Prerelease Tags - -If a version has a prerelease tag (for example, `1.2.3-alpha.3`) then -it will only be allowed to satisfy comparator sets if at least one -comparator with the same `[major, minor, patch]` tuple also has a -prerelease tag. - -For example, the range `>1.2.3-alpha.3` would be allowed to match the -version `1.2.3-alpha.7`, but it would *not* be satisfied by -`3.4.5-alpha.9`, even though `3.4.5-alpha.9` is technically "greater -than" `1.2.3-alpha.3` according to the SemVer sort rules. The version -range only accepts prerelease tags on the `1.2.3` version. The -version `3.4.5` *would* satisfy the range, because it does not have a -prerelease flag, and `3.4.5` is greater than `1.2.3-alpha.7`. - -The purpose for this behavior is twofold. First, prerelease versions -frequently are updated very quickly, and contain many breaking changes -that are (by the author's design) not yet fit for public consumption. -Therefore, by default, they are excluded from range matching -semantics. - -Second, a user who has opted into using a prerelease version has -clearly indicated the intent to use *that specific* set of -alpha/beta/rc versions. By including a prerelease tag in the range, -the user is indicating that they are aware of the risk. However, it -is still not appropriate to assume that they have opted into taking a -similar risk on the *next* set of prerelease versions. - -Note that this behavior can be suppressed (treating all prerelease -versions as if they were normal versions, for the purpose of range -matching) by setting the `includePrerelease` flag on the options -object to any -[functions](https://github.com/npm/node-semver#functions) that do -range matching. - -#### Prerelease Identifiers - -The method `.inc` takes an additional `identifier` string argument that -will append the value of the string as a prerelease identifier: - -```javascript -semver.inc('1.2.3', 'prerelease', 'beta') -// '1.2.4-beta.0' -``` - -command-line example: - -```bash -$ semver 1.2.3 -i prerelease --preid beta -1.2.4-beta.0 -``` - -Which then can be used to increment further: - -```bash -$ semver 1.2.4-beta.0 -i prerelease -1.2.4-beta.1 -``` - -### Advanced Range Syntax - -Advanced range syntax desugars to primitive comparators in -deterministic ways. - -Advanced ranges may be combined in the same way as primitive -comparators using white space or `||`. - -#### Hyphen Ranges `X.Y.Z - A.B.C` - -Specifies an inclusive set. - -* `1.2.3 - 2.3.4` := `>=1.2.3 <=2.3.4` - -If a partial version is provided as the first version in the inclusive -range, then the missing pieces are replaced with zeroes. - -* `1.2 - 2.3.4` := `>=1.2.0 <=2.3.4` - -If a partial version is provided as the second version in the -inclusive range, then all versions that start with the supplied parts -of the tuple are accepted, but nothing that would be greater than the -provided tuple parts. - -* `1.2.3 - 2.3` := `>=1.2.3 <2.4.0` -* `1.2.3 - 2` := `>=1.2.3 <3.0.0` - -#### X-Ranges `1.2.x` `1.X` `1.2.*` `*` - -Any of `X`, `x`, or `*` may be used to "stand in" for one of the -numeric values in the `[major, minor, patch]` tuple. - -* `*` := `>=0.0.0` (Any version satisfies) -* `1.x` := `>=1.0.0 <2.0.0` (Matching major version) -* `1.2.x` := `>=1.2.0 <1.3.0` (Matching major and minor versions) - -A partial version range is treated as an X-Range, so the special -character is in fact optional. - -* `""` (empty string) := `*` := `>=0.0.0` -* `1` := `1.x.x` := `>=1.0.0 <2.0.0` -* `1.2` := `1.2.x` := `>=1.2.0 <1.3.0` - -#### Tilde Ranges `~1.2.3` `~1.2` `~1` - -Allows patch-level changes if a minor version is specified on the -comparator. Allows minor-level changes if not. - -* `~1.2.3` := `>=1.2.3 <1.(2+1).0` := `>=1.2.3 <1.3.0` -* `~1.2` := `>=1.2.0 <1.(2+1).0` := `>=1.2.0 <1.3.0` (Same as `1.2.x`) -* `~1` := `>=1.0.0 <(1+1).0.0` := `>=1.0.0 <2.0.0` (Same as `1.x`) -* `~0.2.3` := `>=0.2.3 <0.(2+1).0` := `>=0.2.3 <0.3.0` -* `~0.2` := `>=0.2.0 <0.(2+1).0` := `>=0.2.0 <0.3.0` (Same as `0.2.x`) -* `~0` := `>=0.0.0 <(0+1).0.0` := `>=0.0.0 <1.0.0` (Same as `0.x`) -* `~1.2.3-beta.2` := `>=1.2.3-beta.2 <1.3.0` Note that prereleases in - the `1.2.3` version will be allowed, if they are greater than or - equal to `beta.2`. So, `1.2.3-beta.4` would be allowed, but - `1.2.4-beta.2` would not, because it is a prerelease of a - different `[major, minor, patch]` tuple. - -#### Caret Ranges `^1.2.3` `^0.2.5` `^0.0.4` - -Allows changes that do not modify the left-most non-zero digit in the -`[major, minor, patch]` tuple. In other words, this allows patch and -minor updates for versions `1.0.0` and above, patch updates for -versions `0.X >=0.1.0`, and *no* updates for versions `0.0.X`. - -Many authors treat a `0.x` version as if the `x` were the major -"breaking-change" indicator. - -Caret ranges are ideal when an author may make breaking changes -between `0.2.4` and `0.3.0` releases, which is a common practice. -However, it presumes that there will *not* be breaking changes between -`0.2.4` and `0.2.5`. It allows for changes that are presumed to be -additive (but non-breaking), according to commonly observed practices. - -* `^1.2.3` := `>=1.2.3 <2.0.0` -* `^0.2.3` := `>=0.2.3 <0.3.0` -* `^0.0.3` := `>=0.0.3 <0.0.4` -* `^1.2.3-beta.2` := `>=1.2.3-beta.2 <2.0.0` Note that prereleases in - the `1.2.3` version will be allowed, if they are greater than or - equal to `beta.2`. So, `1.2.3-beta.4` would be allowed, but - `1.2.4-beta.2` would not, because it is a prerelease of a - different `[major, minor, patch]` tuple. -* `^0.0.3-beta` := `>=0.0.3-beta <0.0.4` Note that prereleases in the - `0.0.3` version *only* will be allowed, if they are greater than or - equal to `beta`. So, `0.0.3-pr.2` would be allowed. - -When parsing caret ranges, a missing `patch` value desugars to the -number `0`, but will allow flexibility within that value, even if the -major and minor versions are both `0`. - -* `^1.2.x` := `>=1.2.0 <2.0.0` -* `^0.0.x` := `>=0.0.0 <0.1.0` -* `^0.0` := `>=0.0.0 <0.1.0` - -A missing `minor` and `patch` values will desugar to zero, but also -allow flexibility within those values, even if the major version is -zero. - -* `^1.x` := `>=1.0.0 <2.0.0` -* `^0.x` := `>=0.0.0 <1.0.0` - -### Range Grammar - -Putting all this together, here is a Backus-Naur grammar for ranges, -for the benefit of parser authors: - -```bnf -range-set ::= range ( logical-or range ) * -logical-or ::= ( ' ' ) * '||' ( ' ' ) * -range ::= hyphen | simple ( ' ' simple ) * | '' -hyphen ::= partial ' - ' partial -simple ::= primitive | partial | tilde | caret -primitive ::= ( '<' | '>' | '>=' | '<=' | '=' ) partial -partial ::= xr ( '.' xr ( '.' xr qualifier ? )? )? -xr ::= 'x' | 'X' | '*' | nr -nr ::= '0' | ['1'-'9'] ( ['0'-'9'] ) * -tilde ::= '~' partial -caret ::= '^' partial -qualifier ::= ( '-' pre )? ( '+' build )? -pre ::= parts -build ::= parts -parts ::= part ( '.' part ) * -part ::= nr | [-0-9A-Za-z]+ -``` - -## Functions - -All methods and classes take a final `options` object argument. All -options in this object are `false` by default. The options supported -are: - -- `loose` Be more forgiving about not-quite-valid semver strings. - (Any resulting output will always be 100% strict compliant, of - course.) For backwards compatibility reasons, if the `options` - argument is a boolean value instead of an object, it is interpreted - to be the `loose` param. -- `includePrerelease` Set to suppress the [default - behavior](https://github.com/npm/node-semver#prerelease-tags) of - excluding prerelease tagged versions from ranges unless they are - explicitly opted into. - -Strict-mode Comparators and Ranges will be strict about the SemVer -strings that they parse. - -* `valid(v)`: Return the parsed version, or null if it's not valid. -* `inc(v, release)`: Return the version incremented by the release - type (`major`, `premajor`, `minor`, `preminor`, `patch`, - `prepatch`, or `prerelease`), or null if it's not valid - * `premajor` in one call will bump the version up to the next major - version and down to a prerelease of that major version. - `preminor`, and `prepatch` work the same way. - * If called from a non-prerelease version, the `prerelease` will work the - same as `prepatch`. It increments the patch version, then makes a - prerelease. If the input version is already a prerelease it simply - increments it. -* `prerelease(v)`: Returns an array of prerelease components, or null - if none exist. Example: `prerelease('1.2.3-alpha.1') -> ['alpha', 1]` -* `major(v)`: Return the major version number. -* `minor(v)`: Return the minor version number. -* `patch(v)`: Return the patch version number. -* `intersects(r1, r2, loose)`: Return true if the two supplied ranges - or comparators intersect. -* `parse(v)`: Attempt to parse a string as a semantic version, returning either - a `SemVer` object or `null`. - -### Comparison - -* `gt(v1, v2)`: `v1 > v2` -* `gte(v1, v2)`: `v1 >= v2` -* `lt(v1, v2)`: `v1 < v2` -* `lte(v1, v2)`: `v1 <= v2` -* `eq(v1, v2)`: `v1 == v2` This is true if they're logically equivalent, - even if they're not the exact same string. You already know how to - compare strings. -* `neq(v1, v2)`: `v1 != v2` The opposite of `eq`. -* `cmp(v1, comparator, v2)`: Pass in a comparison string, and it'll call - the corresponding function above. `"==="` and `"!=="` do simple - string comparison, but are included for completeness. Throws if an - invalid comparison string is provided. -* `compare(v1, v2)`: Return `0` if `v1 == v2`, or `1` if `v1` is greater, or `-1` if - `v2` is greater. Sorts in ascending order if passed to `Array.sort()`. -* `rcompare(v1, v2)`: The reverse of compare. Sorts an array of versions - in descending order when passed to `Array.sort()`. -* `diff(v1, v2)`: Returns difference between two versions by the release type - (`major`, `premajor`, `minor`, `preminor`, `patch`, `prepatch`, or `prerelease`), - or null if the versions are the same. - -### Comparators - -* `intersects(comparator)`: Return true if the comparators intersect - -### Ranges - -* `validRange(range)`: Return the valid range or null if it's not valid -* `satisfies(version, range)`: Return true if the version satisfies the - range. -* `maxSatisfying(versions, range)`: Return the highest version in the list - that satisfies the range, or `null` if none of them do. -* `minSatisfying(versions, range)`: Return the lowest version in the list - that satisfies the range, or `null` if none of them do. -* `minVersion(range)`: Return the lowest version that can possibly match - the given range. -* `gtr(version, range)`: Return `true` if version is greater than all the - versions possible in the range. -* `ltr(version, range)`: Return `true` if version is less than all the - versions possible in the range. -* `outside(version, range, hilo)`: Return true if the version is outside - the bounds of the range in either the high or low direction. The - `hilo` argument must be either the string `'>'` or `'<'`. (This is - the function called by `gtr` and `ltr`.) -* `intersects(range)`: Return true if any of the ranges comparators intersect - -Note that, since ranges may be non-contiguous, a version might not be -greater than a range, less than a range, *or* satisfy a range! For -example, the range `1.2 <1.2.9 || >2.0.0` would have a hole from `1.2.9` -until `2.0.0`, so the version `1.2.10` would not be greater than the -range (because `2.0.1` satisfies, which is higher), nor less than the -range (since `1.2.8` satisfies, which is lower), and it also does not -satisfy the range. - -If you want to know if a version satisfies or does not satisfy a -range, use the `satisfies(version, range)` function. - -### Coercion - -* `coerce(version)`: Coerces a string to semver if possible - -This aims to provide a very forgiving translation of a non-semver -string to semver. It looks for the first digit in a string, and -consumes all remaining characters which satisfy at least a partial semver -(e.g., `1`, `1.2`, `1.2.3`) up to the max permitted length (256 characters). -Longer versions are simply truncated (`4.6.3.9.2-alpha2` becomes `4.6.3`). -All surrounding text is simply ignored (`v3.4 replaces v3.3.1` becomes `3.4.0`). -Only text which lacks digits will fail coercion (`version one` is not valid). -The maximum length for any semver component considered for coercion is 16 characters; -longer components will be ignored (`10000000000000000.4.7.4` becomes `4.7.4`). -The maximum value for any semver component is `Integer.MAX_SAFE_INTEGER || (2**53 - 1)`; -higher value components are invalid (`9999999999999999.4.7.4` is likely invalid). diff --git a/node_modules/normalize-package-data/node_modules/semver/bin/semver b/node_modules/normalize-package-data/node_modules/semver/bin/semver deleted file mode 100755 index 801e77f13..000000000 --- a/node_modules/normalize-package-data/node_modules/semver/bin/semver +++ /dev/null @@ -1,160 +0,0 @@ -#!/usr/bin/env node -// Standalone semver comparison program. -// Exits successfully and prints matching version(s) if -// any supplied version is valid and passes all tests. - -var argv = process.argv.slice(2) - -var versions = [] - -var range = [] - -var inc = null - -var version = require('../package.json').version - -var loose = false - -var includePrerelease = false - -var coerce = false - -var identifier - -var semver = require('../semver') - -var reverse = false - -var options = {} - -main() - -function main () { - if (!argv.length) return help() - while (argv.length) { - var a = argv.shift() - var indexOfEqualSign = a.indexOf('=') - if (indexOfEqualSign !== -1) { - a = a.slice(0, indexOfEqualSign) - argv.unshift(a.slice(indexOfEqualSign + 1)) - } - switch (a) { - case '-rv': case '-rev': case '--rev': case '--reverse': - reverse = true - break - case '-l': case '--loose': - loose = true - break - case '-p': case '--include-prerelease': - includePrerelease = true - break - case '-v': case '--version': - versions.push(argv.shift()) - break - case '-i': case '--inc': case '--increment': - switch (argv[0]) { - case 'major': case 'minor': case 'patch': case 'prerelease': - case 'premajor': case 'preminor': case 'prepatch': - inc = argv.shift() - break - default: - inc = 'patch' - break - } - break - case '--preid': - identifier = argv.shift() - break - case '-r': case '--range': - range.push(argv.shift()) - break - case '-c': case '--coerce': - coerce = true - break - case '-h': case '--help': case '-?': - return help() - default: - versions.push(a) - break - } - } - - var options = { loose: loose, includePrerelease: includePrerelease } - - versions = versions.map(function (v) { - return coerce ? (semver.coerce(v) || { version: v }).version : v - }).filter(function (v) { - return semver.valid(v) - }) - if (!versions.length) return fail() - if (inc && (versions.length !== 1 || range.length)) { return failInc() } - - for (var i = 0, l = range.length; i < l; i++) { - versions = versions.filter(function (v) { - return semver.satisfies(v, range[i], options) - }) - if (!versions.length) return fail() - } - return success(versions) -} - -function failInc () { - console.error('--inc can only be used on a single version with no range') - fail() -} - -function fail () { process.exit(1) } - -function success () { - var compare = reverse ? 'rcompare' : 'compare' - versions.sort(function (a, b) { - return semver[compare](a, b, options) - }).map(function (v) { - return semver.clean(v, options) - }).map(function (v) { - return inc ? semver.inc(v, inc, options, identifier) : v - }).forEach(function (v, i, _) { console.log(v) }) -} - -function help () { - console.log(['SemVer ' + version, - '', - 'A JavaScript implementation of the https://semver.org/ specification', - 'Copyright Isaac Z. Schlueter', - '', - 'Usage: semver [options] [ [...]]', - 'Prints valid versions sorted by SemVer precedence', - '', - 'Options:', - '-r --range ', - ' Print versions that match the specified range.', - '', - '-i --increment []', - ' Increment a version by the specified level. Level can', - ' be one of: major, minor, patch, premajor, preminor,', - " prepatch, or prerelease. Default level is 'patch'.", - ' Only one version may be specified.', - '', - '--preid ', - ' Identifier to be used to prefix premajor, preminor,', - ' prepatch or prerelease version increments.', - '', - '-l --loose', - ' Interpret versions and ranges loosely', - '', - '-p --include-prerelease', - ' Always include prerelease versions in range matching', - '', - '-c --coerce', - ' Coerce a string into SemVer if possible', - ' (does not imply --loose)', - '', - 'Program exits successfully if any valid version satisfies', - 'all supplied ranges, and prints all satisfying versions.', - '', - 'If no satisfying versions are found, then exits failure.', - '', - 'Versions are printed in ascending order, so supplying', - 'multiple versions to the utility will just sort them.' - ].join('\n')) -} diff --git a/node_modules/normalize-package-data/node_modules/semver/package.json b/node_modules/normalize-package-data/node_modules/semver/package.json deleted file mode 100644 index c9b392234..000000000 --- a/node_modules/normalize-package-data/node_modules/semver/package.json +++ /dev/null @@ -1,64 +0,0 @@ -{ - "_args": [ - [ - "semver@5.7.0", - "/Users/drew.heavner/Documents/Github/sign-android-release" - ] - ], - "_development": true, - "_from": "semver@5.7.0", - "_id": "semver@5.7.0", - "_inBundle": false, - "_integrity": "sha512-Ya52jSX2u7QKghxeoFGpLwCtGlt7j0oY9DYb5apt9nPlJ42ID+ulTXESnt/qAQcoSERyZ5sl3LDIOw0nAn/5DA==", - "_location": "/normalize-package-data/semver", - "_phantomChildren": {}, - "_requested": { - "type": "version", - "registry": true, - "raw": "semver@5.7.0", - "name": "semver", - "escapedName": "semver", - "rawSpec": "5.7.0", - "saveSpec": null, - "fetchSpec": "5.7.0" - }, - "_requiredBy": [ - "/normalize-package-data" - ], - "_resolved": "https://registry.npmjs.org/semver/-/semver-5.7.0.tgz", - "_spec": "5.7.0", - "_where": "/Users/drew.heavner/Documents/Github/sign-android-release", - "bin": { - "semver": "./bin/semver" - }, - "bugs": { - "url": "https://github.com/npm/node-semver/issues" - }, - "description": "The semantic version parser used by npm.", - "devDependencies": { - "tap": "^13.0.0-rc.18" - }, - "files": [ - "bin", - "range.bnf", - "semver.js" - ], - "homepage": "https://github.com/npm/node-semver#readme", - "license": "ISC", - "main": "semver.js", - "name": "semver", - "repository": { - "type": "git", - "url": "git+https://github.com/npm/node-semver.git" - }, - "scripts": { - "postpublish": "git push origin --all; git push origin --tags", - "postversion": "npm publish", - "preversion": "npm test", - "test": "tap" - }, - "tap": { - "check-coverage": true - }, - "version": "5.7.0" -} diff --git a/node_modules/normalize-package-data/node_modules/semver/range.bnf b/node_modules/normalize-package-data/node_modules/semver/range.bnf deleted file mode 100644 index d4c6ae0d7..000000000 --- a/node_modules/normalize-package-data/node_modules/semver/range.bnf +++ /dev/null @@ -1,16 +0,0 @@ -range-set ::= range ( logical-or range ) * -logical-or ::= ( ' ' ) * '||' ( ' ' ) * -range ::= hyphen | simple ( ' ' simple ) * | '' -hyphen ::= partial ' - ' partial -simple ::= primitive | partial | tilde | caret -primitive ::= ( '<' | '>' | '>=' | '<=' | '=' ) partial -partial ::= xr ( '.' xr ( '.' xr qualifier ? )? )? -xr ::= 'x' | 'X' | '*' | nr -nr ::= '0' | [1-9] ( [0-9] ) * -tilde ::= '~' partial -caret ::= '^' partial -qualifier ::= ( '-' pre )? ( '+' build )? -pre ::= parts -build ::= parts -parts ::= part ( '.' part ) * -part ::= nr | [-0-9A-Za-z]+ diff --git a/node_modules/normalize-package-data/node_modules/semver/semver.js b/node_modules/normalize-package-data/node_modules/semver/semver.js deleted file mode 100644 index d315d5d68..000000000 --- a/node_modules/normalize-package-data/node_modules/semver/semver.js +++ /dev/null @@ -1,1483 +0,0 @@ -exports = module.exports = SemVer - -var debug -/* istanbul ignore next */ -if (typeof process === 'object' && - process.env && - process.env.NODE_DEBUG && - /\bsemver\b/i.test(process.env.NODE_DEBUG)) { - debug = function () { - var args = Array.prototype.slice.call(arguments, 0) - args.unshift('SEMVER') - console.log.apply(console, args) - } -} else { - debug = function () {} -} - -// Note: this is the semver.org version of the spec that it implements -// Not necessarily the package version of this code. -exports.SEMVER_SPEC_VERSION = '2.0.0' - -var MAX_LENGTH = 256 -var MAX_SAFE_INTEGER = Number.MAX_SAFE_INTEGER || - /* istanbul ignore next */ 9007199254740991 - -// Max safe segment length for coercion. -var MAX_SAFE_COMPONENT_LENGTH = 16 - -// The actual regexps go on exports.re -var re = exports.re = [] -var src = exports.src = [] -var R = 0 - -// The following Regular Expressions can be used for tokenizing, -// validating, and parsing SemVer version strings. - -// ## Numeric Identifier -// A single `0`, or a non-zero digit followed by zero or more digits. - -var NUMERICIDENTIFIER = R++ -src[NUMERICIDENTIFIER] = '0|[1-9]\\d*' -var NUMERICIDENTIFIERLOOSE = R++ -src[NUMERICIDENTIFIERLOOSE] = '[0-9]+' - -// ## Non-numeric Identifier -// Zero or more digits, followed by a letter or hyphen, and then zero or -// more letters, digits, or hyphens. - -var NONNUMERICIDENTIFIER = R++ -src[NONNUMERICIDENTIFIER] = '\\d*[a-zA-Z-][a-zA-Z0-9-]*' - -// ## Main Version -// Three dot-separated numeric identifiers. - -var MAINVERSION = R++ -src[MAINVERSION] = '(' + src[NUMERICIDENTIFIER] + ')\\.' + - '(' + src[NUMERICIDENTIFIER] + ')\\.' + - '(' + src[NUMERICIDENTIFIER] + ')' - -var MAINVERSIONLOOSE = R++ -src[MAINVERSIONLOOSE] = '(' + src[NUMERICIDENTIFIERLOOSE] + ')\\.' + - '(' + src[NUMERICIDENTIFIERLOOSE] + ')\\.' + - '(' + src[NUMERICIDENTIFIERLOOSE] + ')' - -// ## Pre-release Version Identifier -// A numeric identifier, or a non-numeric identifier. - -var PRERELEASEIDENTIFIER = R++ -src[PRERELEASEIDENTIFIER] = '(?:' + src[NUMERICIDENTIFIER] + - '|' + src[NONNUMERICIDENTIFIER] + ')' - -var PRERELEASEIDENTIFIERLOOSE = R++ -src[PRERELEASEIDENTIFIERLOOSE] = '(?:' + src[NUMERICIDENTIFIERLOOSE] + - '|' + src[NONNUMERICIDENTIFIER] + ')' - -// ## Pre-release Version -// Hyphen, followed by one or more dot-separated pre-release version -// identifiers. - -var PRERELEASE = R++ -src[PRERELEASE] = '(?:-(' + src[PRERELEASEIDENTIFIER] + - '(?:\\.' + src[PRERELEASEIDENTIFIER] + ')*))' - -var PRERELEASELOOSE = R++ -src[PRERELEASELOOSE] = '(?:-?(' + src[PRERELEASEIDENTIFIERLOOSE] + - '(?:\\.' + src[PRERELEASEIDENTIFIERLOOSE] + ')*))' - -// ## Build Metadata Identifier -// Any combination of digits, letters, or hyphens. - -var BUILDIDENTIFIER = R++ -src[BUILDIDENTIFIER] = '[0-9A-Za-z-]+' - -// ## Build Metadata -// Plus sign, followed by one or more period-separated build metadata -// identifiers. - -var BUILD = R++ -src[BUILD] = '(?:\\+(' + src[BUILDIDENTIFIER] + - '(?:\\.' + src[BUILDIDENTIFIER] + ')*))' - -// ## Full Version String -// A main version, followed optionally by a pre-release version and -// build metadata. - -// Note that the only major, minor, patch, and pre-release sections of -// the version string are capturing groups. The build metadata is not a -// capturing group, because it should not ever be used in version -// comparison. - -var FULL = R++ -var FULLPLAIN = 'v?' + src[MAINVERSION] + - src[PRERELEASE] + '?' + - src[BUILD] + '?' - -src[FULL] = '^' + FULLPLAIN + '$' - -// like full, but allows v1.2.3 and =1.2.3, which people do sometimes. -// also, 1.0.0alpha1 (prerelease without the hyphen) which is pretty -// common in the npm registry. -var LOOSEPLAIN = '[v=\\s]*' + src[MAINVERSIONLOOSE] + - src[PRERELEASELOOSE] + '?' + - src[BUILD] + '?' - -var LOOSE = R++ -src[LOOSE] = '^' + LOOSEPLAIN + '$' - -var GTLT = R++ -src[GTLT] = '((?:<|>)?=?)' - -// Something like "2.*" or "1.2.x". -// Note that "x.x" is a valid xRange identifer, meaning "any version" -// Only the first item is strictly required. -var XRANGEIDENTIFIERLOOSE = R++ -src[XRANGEIDENTIFIERLOOSE] = src[NUMERICIDENTIFIERLOOSE] + '|x|X|\\*' -var XRANGEIDENTIFIER = R++ -src[XRANGEIDENTIFIER] = src[NUMERICIDENTIFIER] + '|x|X|\\*' - -var XRANGEPLAIN = R++ -src[XRANGEPLAIN] = '[v=\\s]*(' + src[XRANGEIDENTIFIER] + ')' + - '(?:\\.(' + src[XRANGEIDENTIFIER] + ')' + - '(?:\\.(' + src[XRANGEIDENTIFIER] + ')' + - '(?:' + src[PRERELEASE] + ')?' + - src[BUILD] + '?' + - ')?)?' - -var XRANGEPLAINLOOSE = R++ -src[XRANGEPLAINLOOSE] = '[v=\\s]*(' + src[XRANGEIDENTIFIERLOOSE] + ')' + - '(?:\\.(' + src[XRANGEIDENTIFIERLOOSE] + ')' + - '(?:\\.(' + src[XRANGEIDENTIFIERLOOSE] + ')' + - '(?:' + src[PRERELEASELOOSE] + ')?' + - src[BUILD] + '?' + - ')?)?' - -var XRANGE = R++ -src[XRANGE] = '^' + src[GTLT] + '\\s*' + src[XRANGEPLAIN] + '$' -var XRANGELOOSE = R++ -src[XRANGELOOSE] = '^' + src[GTLT] + '\\s*' + src[XRANGEPLAINLOOSE] + '$' - -// Coercion. -// Extract anything that could conceivably be a part of a valid semver -var COERCE = R++ -src[COERCE] = '(?:^|[^\\d])' + - '(\\d{1,' + MAX_SAFE_COMPONENT_LENGTH + '})' + - '(?:\\.(\\d{1,' + MAX_SAFE_COMPONENT_LENGTH + '}))?' + - '(?:\\.(\\d{1,' + MAX_SAFE_COMPONENT_LENGTH + '}))?' + - '(?:$|[^\\d])' - -// Tilde ranges. -// Meaning is "reasonably at or greater than" -var LONETILDE = R++ -src[LONETILDE] = '(?:~>?)' - -var TILDETRIM = R++ -src[TILDETRIM] = '(\\s*)' + src[LONETILDE] + '\\s+' -re[TILDETRIM] = new RegExp(src[TILDETRIM], 'g') -var tildeTrimReplace = '$1~' - -var TILDE = R++ -src[TILDE] = '^' + src[LONETILDE] + src[XRANGEPLAIN] + '$' -var TILDELOOSE = R++ -src[TILDELOOSE] = '^' + src[LONETILDE] + src[XRANGEPLAINLOOSE] + '$' - -// Caret ranges. -// Meaning is "at least and backwards compatible with" -var LONECARET = R++ -src[LONECARET] = '(?:\\^)' - -var CARETTRIM = R++ -src[CARETTRIM] = '(\\s*)' + src[LONECARET] + '\\s+' -re[CARETTRIM] = new RegExp(src[CARETTRIM], 'g') -var caretTrimReplace = '$1^' - -var CARET = R++ -src[CARET] = '^' + src[LONECARET] + src[XRANGEPLAIN] + '$' -var CARETLOOSE = R++ -src[CARETLOOSE] = '^' + src[LONECARET] + src[XRANGEPLAINLOOSE] + '$' - -// A simple gt/lt/eq thing, or just "" to indicate "any version" -var COMPARATORLOOSE = R++ -src[COMPARATORLOOSE] = '^' + src[GTLT] + '\\s*(' + LOOSEPLAIN + ')$|^$' -var COMPARATOR = R++ -src[COMPARATOR] = '^' + src[GTLT] + '\\s*(' + FULLPLAIN + ')$|^$' - -// An expression to strip any whitespace between the gtlt and the thing -// it modifies, so that `> 1.2.3` ==> `>1.2.3` -var COMPARATORTRIM = R++ -src[COMPARATORTRIM] = '(\\s*)' + src[GTLT] + - '\\s*(' + LOOSEPLAIN + '|' + src[XRANGEPLAIN] + ')' - -// this one has to use the /g flag -re[COMPARATORTRIM] = new RegExp(src[COMPARATORTRIM], 'g') -var comparatorTrimReplace = '$1$2$3' - -// Something like `1.2.3 - 1.2.4` -// Note that these all use the loose form, because they'll be -// checked against either the strict or loose comparator form -// later. -var HYPHENRANGE = R++ -src[HYPHENRANGE] = '^\\s*(' + src[XRANGEPLAIN] + ')' + - '\\s+-\\s+' + - '(' + src[XRANGEPLAIN] + ')' + - '\\s*$' - -var HYPHENRANGELOOSE = R++ -src[HYPHENRANGELOOSE] = '^\\s*(' + src[XRANGEPLAINLOOSE] + ')' + - '\\s+-\\s+' + - '(' + src[XRANGEPLAINLOOSE] + ')' + - '\\s*$' - -// Star ranges basically just allow anything at all. -var STAR = R++ -src[STAR] = '(<|>)?=?\\s*\\*' - -// Compile to actual regexp objects. -// All are flag-free, unless they were created above with a flag. -for (var i = 0; i < R; i++) { - debug(i, src[i]) - if (!re[i]) { - re[i] = new RegExp(src[i]) - } -} - -exports.parse = parse -function parse (version, options) { - if (!options || typeof options !== 'object') { - options = { - loose: !!options, - includePrerelease: false - } - } - - if (version instanceof SemVer) { - return version - } - - if (typeof version !== 'string') { - return null - } - - if (version.length > MAX_LENGTH) { - return null - } - - var r = options.loose ? re[LOOSE] : re[FULL] - if (!r.test(version)) { - return null - } - - try { - return new SemVer(version, options) - } catch (er) { - return null - } -} - -exports.valid = valid -function valid (version, options) { - var v = parse(version, options) - return v ? v.version : null -} - -exports.clean = clean -function clean (version, options) { - var s = parse(version.trim().replace(/^[=v]+/, ''), options) - return s ? s.version : null -} - -exports.SemVer = SemVer - -function SemVer (version, options) { - if (!options || typeof options !== 'object') { - options = { - loose: !!options, - includePrerelease: false - } - } - if (version instanceof SemVer) { - if (version.loose === options.loose) { - return version - } else { - version = version.version - } - } else if (typeof version !== 'string') { - throw new TypeError('Invalid Version: ' + version) - } - - if (version.length > MAX_LENGTH) { - throw new TypeError('version is longer than ' + MAX_LENGTH + ' characters') - } - - if (!(this instanceof SemVer)) { - return new SemVer(version, options) - } - - debug('SemVer', version, options) - this.options = options - this.loose = !!options.loose - - var m = version.trim().match(options.loose ? re[LOOSE] : re[FULL]) - - if (!m) { - throw new TypeError('Invalid Version: ' + version) - } - - this.raw = version - - // these are actually numbers - this.major = +m[1] - this.minor = +m[2] - this.patch = +m[3] - - if (this.major > MAX_SAFE_INTEGER || this.major < 0) { - throw new TypeError('Invalid major version') - } - - if (this.minor > MAX_SAFE_INTEGER || this.minor < 0) { - throw new TypeError('Invalid minor version') - } - - if (this.patch > MAX_SAFE_INTEGER || this.patch < 0) { - throw new TypeError('Invalid patch version') - } - - // numberify any prerelease numeric ids - if (!m[4]) { - this.prerelease = [] - } else { - this.prerelease = m[4].split('.').map(function (id) { - if (/^[0-9]+$/.test(id)) { - var num = +id - if (num >= 0 && num < MAX_SAFE_INTEGER) { - return num - } - } - return id - }) - } - - this.build = m[5] ? m[5].split('.') : [] - this.format() -} - -SemVer.prototype.format = function () { - this.version = this.major + '.' + this.minor + '.' + this.patch - if (this.prerelease.length) { - this.version += '-' + this.prerelease.join('.') - } - return this.version -} - -SemVer.prototype.toString = function () { - return this.version -} - -SemVer.prototype.compare = function (other) { - debug('SemVer.compare', this.version, this.options, other) - if (!(other instanceof SemVer)) { - other = new SemVer(other, this.options) - } - - return this.compareMain(other) || this.comparePre(other) -} - -SemVer.prototype.compareMain = function (other) { - if (!(other instanceof SemVer)) { - other = new SemVer(other, this.options) - } - - return compareIdentifiers(this.major, other.major) || - compareIdentifiers(this.minor, other.minor) || - compareIdentifiers(this.patch, other.patch) -} - -SemVer.prototype.comparePre = function (other) { - if (!(other instanceof SemVer)) { - other = new SemVer(other, this.options) - } - - // NOT having a prerelease is > having one - if (this.prerelease.length && !other.prerelease.length) { - return -1 - } else if (!this.prerelease.length && other.prerelease.length) { - return 1 - } else if (!this.prerelease.length && !other.prerelease.length) { - return 0 - } - - var i = 0 - do { - var a = this.prerelease[i] - var b = other.prerelease[i] - debug('prerelease compare', i, a, b) - if (a === undefined && b === undefined) { - return 0 - } else if (b === undefined) { - return 1 - } else if (a === undefined) { - return -1 - } else if (a === b) { - continue - } else { - return compareIdentifiers(a, b) - } - } while (++i) -} - -// preminor will bump the version up to the next minor release, and immediately -// down to pre-release. premajor and prepatch work the same way. -SemVer.prototype.inc = function (release, identifier) { - switch (release) { - case 'premajor': - this.prerelease.length = 0 - this.patch = 0 - this.minor = 0 - this.major++ - this.inc('pre', identifier) - break - case 'preminor': - this.prerelease.length = 0 - this.patch = 0 - this.minor++ - this.inc('pre', identifier) - break - case 'prepatch': - // If this is already a prerelease, it will bump to the next version - // drop any prereleases that might already exist, since they are not - // relevant at this point. - this.prerelease.length = 0 - this.inc('patch', identifier) - this.inc('pre', identifier) - break - // If the input is a non-prerelease version, this acts the same as - // prepatch. - case 'prerelease': - if (this.prerelease.length === 0) { - this.inc('patch', identifier) - } - this.inc('pre', identifier) - break - - case 'major': - // If this is a pre-major version, bump up to the same major version. - // Otherwise increment major. - // 1.0.0-5 bumps to 1.0.0 - // 1.1.0 bumps to 2.0.0 - if (this.minor !== 0 || - this.patch !== 0 || - this.prerelease.length === 0) { - this.major++ - } - this.minor = 0 - this.patch = 0 - this.prerelease = [] - break - case 'minor': - // If this is a pre-minor version, bump up to the same minor version. - // Otherwise increment minor. - // 1.2.0-5 bumps to 1.2.0 - // 1.2.1 bumps to 1.3.0 - if (this.patch !== 0 || this.prerelease.length === 0) { - this.minor++ - } - this.patch = 0 - this.prerelease = [] - break - case 'patch': - // If this is not a pre-release version, it will increment the patch. - // If it is a pre-release it will bump up to the same patch version. - // 1.2.0-5 patches to 1.2.0 - // 1.2.0 patches to 1.2.1 - if (this.prerelease.length === 0) { - this.patch++ - } - this.prerelease = [] - break - // This probably shouldn't be used publicly. - // 1.0.0 "pre" would become 1.0.0-0 which is the wrong direction. - case 'pre': - if (this.prerelease.length === 0) { - this.prerelease = [0] - } else { - var i = this.prerelease.length - while (--i >= 0) { - if (typeof this.prerelease[i] === 'number') { - this.prerelease[i]++ - i = -2 - } - } - if (i === -1) { - // didn't increment anything - this.prerelease.push(0) - } - } - if (identifier) { - // 1.2.0-beta.1 bumps to 1.2.0-beta.2, - // 1.2.0-beta.fooblz or 1.2.0-beta bumps to 1.2.0-beta.0 - if (this.prerelease[0] === identifier) { - if (isNaN(this.prerelease[1])) { - this.prerelease = [identifier, 0] - } - } else { - this.prerelease = [identifier, 0] - } - } - break - - default: - throw new Error('invalid increment argument: ' + release) - } - this.format() - this.raw = this.version - return this -} - -exports.inc = inc -function inc (version, release, loose, identifier) { - if (typeof (loose) === 'string') { - identifier = loose - loose = undefined - } - - try { - return new SemVer(version, loose).inc(release, identifier).version - } catch (er) { - return null - } -} - -exports.diff = diff -function diff (version1, version2) { - if (eq(version1, version2)) { - return null - } else { - var v1 = parse(version1) - var v2 = parse(version2) - var prefix = '' - if (v1.prerelease.length || v2.prerelease.length) { - prefix = 'pre' - var defaultResult = 'prerelease' - } - for (var key in v1) { - if (key === 'major' || key === 'minor' || key === 'patch') { - if (v1[key] !== v2[key]) { - return prefix + key - } - } - } - return defaultResult // may be undefined - } -} - -exports.compareIdentifiers = compareIdentifiers - -var numeric = /^[0-9]+$/ -function compareIdentifiers (a, b) { - var anum = numeric.test(a) - var bnum = numeric.test(b) - - if (anum && bnum) { - a = +a - b = +b - } - - return a === b ? 0 - : (anum && !bnum) ? -1 - : (bnum && !anum) ? 1 - : a < b ? -1 - : 1 -} - -exports.rcompareIdentifiers = rcompareIdentifiers -function rcompareIdentifiers (a, b) { - return compareIdentifiers(b, a) -} - -exports.major = major -function major (a, loose) { - return new SemVer(a, loose).major -} - -exports.minor = minor -function minor (a, loose) { - return new SemVer(a, loose).minor -} - -exports.patch = patch -function patch (a, loose) { - return new SemVer(a, loose).patch -} - -exports.compare = compare -function compare (a, b, loose) { - return new SemVer(a, loose).compare(new SemVer(b, loose)) -} - -exports.compareLoose = compareLoose -function compareLoose (a, b) { - return compare(a, b, true) -} - -exports.rcompare = rcompare -function rcompare (a, b, loose) { - return compare(b, a, loose) -} - -exports.sort = sort -function sort (list, loose) { - return list.sort(function (a, b) { - return exports.compare(a, b, loose) - }) -} - -exports.rsort = rsort -function rsort (list, loose) { - return list.sort(function (a, b) { - return exports.rcompare(a, b, loose) - }) -} - -exports.gt = gt -function gt (a, b, loose) { - return compare(a, b, loose) > 0 -} - -exports.lt = lt -function lt (a, b, loose) { - return compare(a, b, loose) < 0 -} - -exports.eq = eq -function eq (a, b, loose) { - return compare(a, b, loose) === 0 -} - -exports.neq = neq -function neq (a, b, loose) { - return compare(a, b, loose) !== 0 -} - -exports.gte = gte -function gte (a, b, loose) { - return compare(a, b, loose) >= 0 -} - -exports.lte = lte -function lte (a, b, loose) { - return compare(a, b, loose) <= 0 -} - -exports.cmp = cmp -function cmp (a, op, b, loose) { - switch (op) { - case '===': - if (typeof a === 'object') - a = a.version - if (typeof b === 'object') - b = b.version - return a === b - - case '!==': - if (typeof a === 'object') - a = a.version - if (typeof b === 'object') - b = b.version - return a !== b - - case '': - case '=': - case '==': - return eq(a, b, loose) - - case '!=': - return neq(a, b, loose) - - case '>': - return gt(a, b, loose) - - case '>=': - return gte(a, b, loose) - - case '<': - return lt(a, b, loose) - - case '<=': - return lte(a, b, loose) - - default: - throw new TypeError('Invalid operator: ' + op) - } -} - -exports.Comparator = Comparator -function Comparator (comp, options) { - if (!options || typeof options !== 'object') { - options = { - loose: !!options, - includePrerelease: false - } - } - - if (comp instanceof Comparator) { - if (comp.loose === !!options.loose) { - return comp - } else { - comp = comp.value - } - } - - if (!(this instanceof Comparator)) { - return new Comparator(comp, options) - } - - debug('comparator', comp, options) - this.options = options - this.loose = !!options.loose - this.parse(comp) - - if (this.semver === ANY) { - this.value = '' - } else { - this.value = this.operator + this.semver.version - } - - debug('comp', this) -} - -var ANY = {} -Comparator.prototype.parse = function (comp) { - var r = this.options.loose ? re[COMPARATORLOOSE] : re[COMPARATOR] - var m = comp.match(r) - - if (!m) { - throw new TypeError('Invalid comparator: ' + comp) - } - - this.operator = m[1] - if (this.operator === '=') { - this.operator = '' - } - - // if it literally is just '>' or '' then allow anything. - if (!m[2]) { - this.semver = ANY - } else { - this.semver = new SemVer(m[2], this.options.loose) - } -} - -Comparator.prototype.toString = function () { - return this.value -} - -Comparator.prototype.test = function (version) { - debug('Comparator.test', version, this.options.loose) - - if (this.semver === ANY) { - return true - } - - if (typeof version === 'string') { - version = new SemVer(version, this.options) - } - - return cmp(version, this.operator, this.semver, this.options) -} - -Comparator.prototype.intersects = function (comp, options) { - if (!(comp instanceof Comparator)) { - throw new TypeError('a Comparator is required') - } - - if (!options || typeof options !== 'object') { - options = { - loose: !!options, - includePrerelease: false - } - } - - var rangeTmp - - if (this.operator === '') { - rangeTmp = new Range(comp.value, options) - return satisfies(this.value, rangeTmp, options) - } else if (comp.operator === '') { - rangeTmp = new Range(this.value, options) - return satisfies(comp.semver, rangeTmp, options) - } - - var sameDirectionIncreasing = - (this.operator === '>=' || this.operator === '>') && - (comp.operator === '>=' || comp.operator === '>') - var sameDirectionDecreasing = - (this.operator === '<=' || this.operator === '<') && - (comp.operator === '<=' || comp.operator === '<') - var sameSemVer = this.semver.version === comp.semver.version - var differentDirectionsInclusive = - (this.operator === '>=' || this.operator === '<=') && - (comp.operator === '>=' || comp.operator === '<=') - var oppositeDirectionsLessThan = - cmp(this.semver, '<', comp.semver, options) && - ((this.operator === '>=' || this.operator === '>') && - (comp.operator === '<=' || comp.operator === '<')) - var oppositeDirectionsGreaterThan = - cmp(this.semver, '>', comp.semver, options) && - ((this.operator === '<=' || this.operator === '<') && - (comp.operator === '>=' || comp.operator === '>')) - - return sameDirectionIncreasing || sameDirectionDecreasing || - (sameSemVer && differentDirectionsInclusive) || - oppositeDirectionsLessThan || oppositeDirectionsGreaterThan -} - -exports.Range = Range -function Range (range, options) { - if (!options || typeof options !== 'object') { - options = { - loose: !!options, - includePrerelease: false - } - } - - if (range instanceof Range) { - if (range.loose === !!options.loose && - range.includePrerelease === !!options.includePrerelease) { - return range - } else { - return new Range(range.raw, options) - } - } - - if (range instanceof Comparator) { - return new Range(range.value, options) - } - - if (!(this instanceof Range)) { - return new Range(range, options) - } - - this.options = options - this.loose = !!options.loose - this.includePrerelease = !!options.includePrerelease - - // First, split based on boolean or || - this.raw = range - this.set = range.split(/\s*\|\|\s*/).map(function (range) { - return this.parseRange(range.trim()) - }, this).filter(function (c) { - // throw out any that are not relevant for whatever reason - return c.length - }) - - if (!this.set.length) { - throw new TypeError('Invalid SemVer Range: ' + range) - } - - this.format() -} - -Range.prototype.format = function () { - this.range = this.set.map(function (comps) { - return comps.join(' ').trim() - }).join('||').trim() - return this.range -} - -Range.prototype.toString = function () { - return this.range -} - -Range.prototype.parseRange = function (range) { - var loose = this.options.loose - range = range.trim() - // `1.2.3 - 1.2.4` => `>=1.2.3 <=1.2.4` - var hr = loose ? re[HYPHENRANGELOOSE] : re[HYPHENRANGE] - range = range.replace(hr, hyphenReplace) - debug('hyphen replace', range) - // `> 1.2.3 < 1.2.5` => `>1.2.3 <1.2.5` - range = range.replace(re[COMPARATORTRIM], comparatorTrimReplace) - debug('comparator trim', range, re[COMPARATORTRIM]) - - // `~ 1.2.3` => `~1.2.3` - range = range.replace(re[TILDETRIM], tildeTrimReplace) - - // `^ 1.2.3` => `^1.2.3` - range = range.replace(re[CARETTRIM], caretTrimReplace) - - // normalize spaces - range = range.split(/\s+/).join(' ') - - // At this point, the range is completely trimmed and - // ready to be split into comparators. - - var compRe = loose ? re[COMPARATORLOOSE] : re[COMPARATOR] - var set = range.split(' ').map(function (comp) { - return parseComparator(comp, this.options) - }, this).join(' ').split(/\s+/) - if (this.options.loose) { - // in loose mode, throw out any that are not valid comparators - set = set.filter(function (comp) { - return !!comp.match(compRe) - }) - } - set = set.map(function (comp) { - return new Comparator(comp, this.options) - }, this) - - return set -} - -Range.prototype.intersects = function (range, options) { - if (!(range instanceof Range)) { - throw new TypeError('a Range is required') - } - - return this.set.some(function (thisComparators) { - return thisComparators.every(function (thisComparator) { - return range.set.some(function (rangeComparators) { - return rangeComparators.every(function (rangeComparator) { - return thisComparator.intersects(rangeComparator, options) - }) - }) - }) - }) -} - -// Mostly just for testing and legacy API reasons -exports.toComparators = toComparators -function toComparators (range, options) { - return new Range(range, options).set.map(function (comp) { - return comp.map(function (c) { - return c.value - }).join(' ').trim().split(' ') - }) -} - -// comprised of xranges, tildes, stars, and gtlt's at this point. -// already replaced the hyphen ranges -// turn into a set of JUST comparators. -function parseComparator (comp, options) { - debug('comp', comp, options) - comp = replaceCarets(comp, options) - debug('caret', comp) - comp = replaceTildes(comp, options) - debug('tildes', comp) - comp = replaceXRanges(comp, options) - debug('xrange', comp) - comp = replaceStars(comp, options) - debug('stars', comp) - return comp -} - -function isX (id) { - return !id || id.toLowerCase() === 'x' || id === '*' -} - -// ~, ~> --> * (any, kinda silly) -// ~2, ~2.x, ~2.x.x, ~>2, ~>2.x ~>2.x.x --> >=2.0.0 <3.0.0 -// ~2.0, ~2.0.x, ~>2.0, ~>2.0.x --> >=2.0.0 <2.1.0 -// ~1.2, ~1.2.x, ~>1.2, ~>1.2.x --> >=1.2.0 <1.3.0 -// ~1.2.3, ~>1.2.3 --> >=1.2.3 <1.3.0 -// ~1.2.0, ~>1.2.0 --> >=1.2.0 <1.3.0 -function replaceTildes (comp, options) { - return comp.trim().split(/\s+/).map(function (comp) { - return replaceTilde(comp, options) - }).join(' ') -} - -function replaceTilde (comp, options) { - var r = options.loose ? re[TILDELOOSE] : re[TILDE] - return comp.replace(r, function (_, M, m, p, pr) { - debug('tilde', comp, _, M, m, p, pr) - var ret - - if (isX(M)) { - ret = '' - } else if (isX(m)) { - ret = '>=' + M + '.0.0 <' + (+M + 1) + '.0.0' - } else if (isX(p)) { - // ~1.2 == >=1.2.0 <1.3.0 - ret = '>=' + M + '.' + m + '.0 <' + M + '.' + (+m + 1) + '.0' - } else if (pr) { - debug('replaceTilde pr', pr) - ret = '>=' + M + '.' + m + '.' + p + '-' + pr + - ' <' + M + '.' + (+m + 1) + '.0' - } else { - // ~1.2.3 == >=1.2.3 <1.3.0 - ret = '>=' + M + '.' + m + '.' + p + - ' <' + M + '.' + (+m + 1) + '.0' - } - - debug('tilde return', ret) - return ret - }) -} - -// ^ --> * (any, kinda silly) -// ^2, ^2.x, ^2.x.x --> >=2.0.0 <3.0.0 -// ^2.0, ^2.0.x --> >=2.0.0 <3.0.0 -// ^1.2, ^1.2.x --> >=1.2.0 <2.0.0 -// ^1.2.3 --> >=1.2.3 <2.0.0 -// ^1.2.0 --> >=1.2.0 <2.0.0 -function replaceCarets (comp, options) { - return comp.trim().split(/\s+/).map(function (comp) { - return replaceCaret(comp, options) - }).join(' ') -} - -function replaceCaret (comp, options) { - debug('caret', comp, options) - var r = options.loose ? re[CARETLOOSE] : re[CARET] - return comp.replace(r, function (_, M, m, p, pr) { - debug('caret', comp, _, M, m, p, pr) - var ret - - if (isX(M)) { - ret = '' - } else if (isX(m)) { - ret = '>=' + M + '.0.0 <' + (+M + 1) + '.0.0' - } else if (isX(p)) { - if (M === '0') { - ret = '>=' + M + '.' + m + '.0 <' + M + '.' + (+m + 1) + '.0' - } else { - ret = '>=' + M + '.' + m + '.0 <' + (+M + 1) + '.0.0' - } - } else if (pr) { - debug('replaceCaret pr', pr) - if (M === '0') { - if (m === '0') { - ret = '>=' + M + '.' + m + '.' + p + '-' + pr + - ' <' + M + '.' + m + '.' + (+p + 1) - } else { - ret = '>=' + M + '.' + m + '.' + p + '-' + pr + - ' <' + M + '.' + (+m + 1) + '.0' - } - } else { - ret = '>=' + M + '.' + m + '.' + p + '-' + pr + - ' <' + (+M + 1) + '.0.0' - } - } else { - debug('no pr') - if (M === '0') { - if (m === '0') { - ret = '>=' + M + '.' + m + '.' + p + - ' <' + M + '.' + m + '.' + (+p + 1) - } else { - ret = '>=' + M + '.' + m + '.' + p + - ' <' + M + '.' + (+m + 1) + '.0' - } - } else { - ret = '>=' + M + '.' + m + '.' + p + - ' <' + (+M + 1) + '.0.0' - } - } - - debug('caret return', ret) - return ret - }) -} - -function replaceXRanges (comp, options) { - debug('replaceXRanges', comp, options) - return comp.split(/\s+/).map(function (comp) { - return replaceXRange(comp, options) - }).join(' ') -} - -function replaceXRange (comp, options) { - comp = comp.trim() - var r = options.loose ? re[XRANGELOOSE] : re[XRANGE] - return comp.replace(r, function (ret, gtlt, M, m, p, pr) { - debug('xRange', comp, ret, gtlt, M, m, p, pr) - var xM = isX(M) - var xm = xM || isX(m) - var xp = xm || isX(p) - var anyX = xp - - if (gtlt === '=' && anyX) { - gtlt = '' - } - - if (xM) { - if (gtlt === '>' || gtlt === '<') { - // nothing is allowed - ret = '<0.0.0' - } else { - // nothing is forbidden - ret = '*' - } - } else if (gtlt && anyX) { - // we know patch is an x, because we have any x at all. - // replace X with 0 - if (xm) { - m = 0 - } - p = 0 - - if (gtlt === '>') { - // >1 => >=2.0.0 - // >1.2 => >=1.3.0 - // >1.2.3 => >= 1.2.4 - gtlt = '>=' - if (xm) { - M = +M + 1 - m = 0 - p = 0 - } else { - m = +m + 1 - p = 0 - } - } else if (gtlt === '<=') { - // <=0.7.x is actually <0.8.0, since any 0.7.x should - // pass. Similarly, <=7.x is actually <8.0.0, etc. - gtlt = '<' - if (xm) { - M = +M + 1 - } else { - m = +m + 1 - } - } - - ret = gtlt + M + '.' + m + '.' + p - } else if (xm) { - ret = '>=' + M + '.0.0 <' + (+M + 1) + '.0.0' - } else if (xp) { - ret = '>=' + M + '.' + m + '.0 <' + M + '.' + (+m + 1) + '.0' - } - - debug('xRange return', ret) - - return ret - }) -} - -// Because * is AND-ed with everything else in the comparator, -// and '' means "any version", just remove the *s entirely. -function replaceStars (comp, options) { - debug('replaceStars', comp, options) - // Looseness is ignored here. star is always as loose as it gets! - return comp.trim().replace(re[STAR], '') -} - -// This function is passed to string.replace(re[HYPHENRANGE]) -// M, m, patch, prerelease, build -// 1.2 - 3.4.5 => >=1.2.0 <=3.4.5 -// 1.2.3 - 3.4 => >=1.2.0 <3.5.0 Any 3.4.x will do -// 1.2 - 3.4 => >=1.2.0 <3.5.0 -function hyphenReplace ($0, - from, fM, fm, fp, fpr, fb, - to, tM, tm, tp, tpr, tb) { - if (isX(fM)) { - from = '' - } else if (isX(fm)) { - from = '>=' + fM + '.0.0' - } else if (isX(fp)) { - from = '>=' + fM + '.' + fm + '.0' - } else { - from = '>=' + from - } - - if (isX(tM)) { - to = '' - } else if (isX(tm)) { - to = '<' + (+tM + 1) + '.0.0' - } else if (isX(tp)) { - to = '<' + tM + '.' + (+tm + 1) + '.0' - } else if (tpr) { - to = '<=' + tM + '.' + tm + '.' + tp + '-' + tpr - } else { - to = '<=' + to - } - - return (from + ' ' + to).trim() -} - -// if ANY of the sets match ALL of its comparators, then pass -Range.prototype.test = function (version) { - if (!version) { - return false - } - - if (typeof version === 'string') { - version = new SemVer(version, this.options) - } - - for (var i = 0; i < this.set.length; i++) { - if (testSet(this.set[i], version, this.options)) { - return true - } - } - return false -} - -function testSet (set, version, options) { - for (var i = 0; i < set.length; i++) { - if (!set[i].test(version)) { - return false - } - } - - if (version.prerelease.length && !options.includePrerelease) { - // Find the set of versions that are allowed to have prereleases - // For example, ^1.2.3-pr.1 desugars to >=1.2.3-pr.1 <2.0.0 - // That should allow `1.2.3-pr.2` to pass. - // However, `1.2.4-alpha.notready` should NOT be allowed, - // even though it's within the range set by the comparators. - for (i = 0; i < set.length; i++) { - debug(set[i].semver) - if (set[i].semver === ANY) { - continue - } - - if (set[i].semver.prerelease.length > 0) { - var allowed = set[i].semver - if (allowed.major === version.major && - allowed.minor === version.minor && - allowed.patch === version.patch) { - return true - } - } - } - - // Version has a -pre, but it's not one of the ones we like. - return false - } - - return true -} - -exports.satisfies = satisfies -function satisfies (version, range, options) { - try { - range = new Range(range, options) - } catch (er) { - return false - } - return range.test(version) -} - -exports.maxSatisfying = maxSatisfying -function maxSatisfying (versions, range, options) { - var max = null - var maxSV = null - try { - var rangeObj = new Range(range, options) - } catch (er) { - return null - } - versions.forEach(function (v) { - if (rangeObj.test(v)) { - // satisfies(v, range, options) - if (!max || maxSV.compare(v) === -1) { - // compare(max, v, true) - max = v - maxSV = new SemVer(max, options) - } - } - }) - return max -} - -exports.minSatisfying = minSatisfying -function minSatisfying (versions, range, options) { - var min = null - var minSV = null - try { - var rangeObj = new Range(range, options) - } catch (er) { - return null - } - versions.forEach(function (v) { - if (rangeObj.test(v)) { - // satisfies(v, range, options) - if (!min || minSV.compare(v) === 1) { - // compare(min, v, true) - min = v - minSV = new SemVer(min, options) - } - } - }) - return min -} - -exports.minVersion = minVersion -function minVersion (range, loose) { - range = new Range(range, loose) - - var minver = new SemVer('0.0.0') - if (range.test(minver)) { - return minver - } - - minver = new SemVer('0.0.0-0') - if (range.test(minver)) { - return minver - } - - minver = null - for (var i = 0; i < range.set.length; ++i) { - var comparators = range.set[i] - - comparators.forEach(function (comparator) { - // Clone to avoid manipulating the comparator's semver object. - var compver = new SemVer(comparator.semver.version) - switch (comparator.operator) { - case '>': - if (compver.prerelease.length === 0) { - compver.patch++ - } else { - compver.prerelease.push(0) - } - compver.raw = compver.format() - /* fallthrough */ - case '': - case '>=': - if (!minver || gt(minver, compver)) { - minver = compver - } - break - case '<': - case '<=': - /* Ignore maximum versions */ - break - /* istanbul ignore next */ - default: - throw new Error('Unexpected operation: ' + comparator.operator) - } - }) - } - - if (minver && range.test(minver)) { - return minver - } - - return null -} - -exports.validRange = validRange -function validRange (range, options) { - try { - // Return '*' instead of '' so that truthiness works. - // This will throw if it's invalid anyway - return new Range(range, options).range || '*' - } catch (er) { - return null - } -} - -// Determine if version is less than all the versions possible in the range -exports.ltr = ltr -function ltr (version, range, options) { - return outside(version, range, '<', options) -} - -// Determine if version is greater than all the versions possible in the range. -exports.gtr = gtr -function gtr (version, range, options) { - return outside(version, range, '>', options) -} - -exports.outside = outside -function outside (version, range, hilo, options) { - version = new SemVer(version, options) - range = new Range(range, options) - - var gtfn, ltefn, ltfn, comp, ecomp - switch (hilo) { - case '>': - gtfn = gt - ltefn = lte - ltfn = lt - comp = '>' - ecomp = '>=' - break - case '<': - gtfn = lt - ltefn = gte - ltfn = gt - comp = '<' - ecomp = '<=' - break - default: - throw new TypeError('Must provide a hilo val of "<" or ">"') - } - - // If it satisifes the range it is not outside - if (satisfies(version, range, options)) { - return false - } - - // From now on, variable terms are as if we're in "gtr" mode. - // but note that everything is flipped for the "ltr" function. - - for (var i = 0; i < range.set.length; ++i) { - var comparators = range.set[i] - - var high = null - var low = null - - comparators.forEach(function (comparator) { - if (comparator.semver === ANY) { - comparator = new Comparator('>=0.0.0') - } - high = high || comparator - low = low || comparator - if (gtfn(comparator.semver, high.semver, options)) { - high = comparator - } else if (ltfn(comparator.semver, low.semver, options)) { - low = comparator - } - }) - - // If the edge version comparator has a operator then our version - // isn't outside it - if (high.operator === comp || high.operator === ecomp) { - return false - } - - // If the lowest version comparator has an operator and our version - // is less than it then it isn't higher than the range - if ((!low.operator || low.operator === comp) && - ltefn(version, low.semver)) { - return false - } else if (low.operator === ecomp && ltfn(version, low.semver)) { - return false - } - } - return true -} - -exports.prerelease = prerelease -function prerelease (version, options) { - var parsed = parse(version, options) - return (parsed && parsed.prerelease.length) ? parsed.prerelease : null -} - -exports.intersects = intersects -function intersects (r1, r2, options) { - r1 = new Range(r1, options) - r2 = new Range(r2, options) - return r1.intersects(r2) -} - -exports.coerce = coerce -function coerce (version) { - if (version instanceof SemVer) { - return version - } - - if (typeof version !== 'string') { - return null - } - - var match = version.match(re[COERCE]) - - if (match == null) { - return null - } - - return parse(match[1] + - '.' + (match[2] || '0') + - '.' + (match[3] || '0')) -} diff --git a/node_modules/number-is-nan/index.js b/node_modules/number-is-nan/index.js deleted file mode 100644 index 79be4b9cb..000000000 --- a/node_modules/number-is-nan/index.js +++ /dev/null @@ -1,4 +0,0 @@ -'use strict'; -module.exports = Number.isNaN || function (x) { - return x !== x; -}; diff --git a/node_modules/number-is-nan/license b/node_modules/number-is-nan/license deleted file mode 100644 index 654d0bfe9..000000000 --- a/node_modules/number-is-nan/license +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) Sindre Sorhus (sindresorhus.com) - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/node_modules/number-is-nan/package.json b/node_modules/number-is-nan/package.json deleted file mode 100644 index 48b6d3778..000000000 --- a/node_modules/number-is-nan/package.json +++ /dev/null @@ -1,71 +0,0 @@ -{ - "_args": [ - [ - "number-is-nan@1.0.1", - "/Users/drew.heavner/Documents/Github/sign-android-release" - ] - ], - "_development": true, - "_from": "number-is-nan@1.0.1", - "_id": "number-is-nan@1.0.1", - "_inBundle": false, - "_integrity": "sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0=", - "_location": "/number-is-nan", - "_phantomChildren": {}, - "_requested": { - "type": "version", - "registry": true, - "raw": "number-is-nan@1.0.1", - "name": "number-is-nan", - "escapedName": "number-is-nan", - "rawSpec": "1.0.1", - "saveSpec": null, - "fetchSpec": "1.0.1" - }, - "_requiredBy": [ - "/wrap-ansi/is-fullwidth-code-point" - ], - "_resolved": "https://registry.npmjs.org/number-is-nan/-/number-is-nan-1.0.1.tgz", - "_spec": "1.0.1", - "_where": "/Users/drew.heavner/Documents/Github/sign-android-release", - "author": { - "name": "Sindre Sorhus", - "email": "sindresorhus@gmail.com", - "url": "sindresorhus.com" - }, - "bugs": { - "url": "https://github.com/sindresorhus/number-is-nan/issues" - }, - "description": "ES2015 Number.isNaN() ponyfill", - "devDependencies": { - "ava": "*" - }, - "engines": { - "node": ">=0.10.0" - }, - "files": [ - "index.js" - ], - "homepage": "https://github.com/sindresorhus/number-is-nan#readme", - "keywords": [ - "es2015", - "ecmascript", - "ponyfill", - "polyfill", - "shim", - "number", - "is", - "nan", - "not" - ], - "license": "MIT", - "name": "number-is-nan", - "repository": { - "type": "git", - "url": "git+https://github.com/sindresorhus/number-is-nan.git" - }, - "scripts": { - "test": "ava" - }, - "version": "1.0.1" -} diff --git a/node_modules/number-is-nan/readme.md b/node_modules/number-is-nan/readme.md deleted file mode 100644 index 246350871..000000000 --- a/node_modules/number-is-nan/readme.md +++ /dev/null @@ -1,28 +0,0 @@ -# number-is-nan [![Build Status](https://travis-ci.org/sindresorhus/number-is-nan.svg?branch=master)](https://travis-ci.org/sindresorhus/number-is-nan) - -> ES2015 [`Number.isNaN()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/isNaN) [ponyfill](https://ponyfill.com) - - -## Install - -``` -$ npm install --save number-is-nan -``` - - -## Usage - -```js -var numberIsNan = require('number-is-nan'); - -numberIsNan(NaN); -//=> true - -numberIsNan('unicorn'); -//=> false -``` - - -## License - -MIT © [Sindre Sorhus](http://sindresorhus.com) diff --git a/node_modules/nwsapi/LICENSE b/node_modules/nwsapi/LICENSE index 43327e714..cc3621a8a 100644 --- a/node_modules/nwsapi/LICENSE +++ b/node_modules/nwsapi/LICENSE @@ -4,8 +4,8 @@ Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, -copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the +copy, modify, merge, publish, distribute, sublicense, and/or +sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: diff --git a/node_modules/nwsapi/package.json b/node_modules/nwsapi/package.json index 07b77b631..1ba125feb 100644 --- a/node_modules/nwsapi/package.json +++ b/node_modules/nwsapi/package.json @@ -1,33 +1,27 @@ { - "_args": [ - [ - "nwsapi@2.1.4", - "/Users/drew.heavner/Documents/Github/sign-android-release" - ] - ], - "_development": true, - "_from": "nwsapi@2.1.4", - "_id": "nwsapi@2.1.4", + "_from": "nwsapi@^2.0.7", + "_id": "nwsapi@2.2.0", "_inBundle": false, - "_integrity": "sha512-iGfd9Y6SFdTNldEy2L0GUhcarIutFmk+MPWIn9dmj8NMIup03G08uUF2KGbbmv/Ux4RT0VZJoP/sVbWA6d/VIw==", + "_integrity": "sha512-h2AatdwYH+JHiZpv7pt/gSX1XoRGb7L/qSIeuqA6GwYoF9w1vP1cw42TO0aI2pNyshRK5893hNSl+1//vHK7hQ==", "_location": "/nwsapi", "_phantomChildren": {}, "_requested": { - "type": "version", + "type": "range", "registry": true, - "raw": "nwsapi@2.1.4", + "raw": "nwsapi@^2.0.7", "name": "nwsapi", "escapedName": "nwsapi", - "rawSpec": "2.1.4", + "rawSpec": "^2.0.7", "saveSpec": null, - "fetchSpec": "2.1.4" + "fetchSpec": "^2.0.7" }, "_requiredBy": [ "/jsdom" ], - "_resolved": "https://registry.npmjs.org/nwsapi/-/nwsapi-2.1.4.tgz", - "_spec": "2.1.4", - "_where": "/Users/drew.heavner/Documents/Github/sign-android-release", + "_resolved": "https://registry.npmjs.org/nwsapi/-/nwsapi-2.2.0.tgz", + "_shasum": "204879a9e3d068ff2a55139c2c772780681a38b7", + "_spec": "nwsapi@^2.0.7", + "_where": "/Users/drew.heavner/Documents/Github/sign-android-release/node_modules/jsdom", "author": { "name": "Diego Perini", "email": "diego.perini@gmail.com", @@ -36,7 +30,12 @@ "bugs": { "url": "http://github.com/dperini/nwsapi/issues" }, + "bundleDependencies": false, + "deprecated": false, "description": "Fast CSS Selectors API Engine", + "directories": { + "test": "test" + }, "homepage": "http://javascript.nwbox.com/nwsapi/", "keywords": [ "css", @@ -68,5 +67,5 @@ "scripts": { "lint": "eslint ./src/nwsapi.js" }, - "version": "2.1.4" + "version": "2.2.0" } diff --git a/node_modules/nwsapi/src/nwsapi.js b/node_modules/nwsapi/src/nwsapi.js index 62496cc2f..79e0eb75c 100644 --- a/node_modules/nwsapi/src/nwsapi.js +++ b/node_modules/nwsapi/src/nwsapi.js @@ -5,9 +5,9 @@ * nwsapi.js - Fast CSS Selectors API Engine * * Author: Diego Perini - * Version: 2.1.4 + * Version: 2.2.0 * Created: 20070722 - * Release: 20190426 + * Release: 20191102 * * License: * http://javascript.nwbox.com/nwsapi/MIT-LICENSE @@ -30,10 +30,11 @@ })(this, function Factory(global, Export) { - var version = 'nwsapi-2.1.4', + var version = 'nwsapi-2.2.0', doc = global.document, root = doc.documentElement, + slice = Array.prototype.slice, WSP = '[\\x20\\t\\r\\n\\f]', @@ -83,8 +84,10 @@ structural: '(root|empty|(?:(?:first|last|only)(?:-child|-of-type)))\\b', inputstate: '(enabled|disabled|read-only|read-write|placeholder-shown|default)\\b', inputvalue: '(checked|indeterminate|required|optional|valid|invalid|in-range|out-of-range)\\b', - pseudo_dbl: '(after|before|first-letter|first-line|-webkit-[-a-zA-Z0-9]{2,})\\b', - pseudo_sng: ':(after|before|first-letter|first-line|selection|placeholder)\\b' + // pseudo-elements starting with single colon (:) + pseudo_sng: '(after|before|first-letter|first-line)\\b', + // pseudo-elements starting with double colon (::) + pseudo_dbl: ':(after|before|first-letter|first-line|selection|placeholder|-webkit-[-a-zA-Z0-9]{2,})\\b' }, Patterns = { @@ -99,7 +102,7 @@ logicalsel: RegExp('^:(?:' + GROUPS.logicalsel + ')(.*)', 'i'), pseudo_dbl: RegExp('^:(?:' + GROUPS.pseudo_dbl + ')(.*)', 'i'), pseudo_sng: RegExp('^:(?:' + GROUPS.pseudo_sng + ')(.*)', 'i'), - // combinators symbols + // combinator symbols children: RegExp('^' + WSP + '?\\>' + WSP + '?(.*)'), adjacent: RegExp('^' + WSP + '?\\+' + WSP + '?(.*)'), relative: RegExp('^' + WSP + '?\\~' + WSP + '?(.*)'), @@ -127,7 +130,6 @@ // special handling configuration flags Config = { IDS_DUPES: true, - LIVECACHE: false, MIXEDCASE: true, LOGERRORS: true, VERBOSITY: true @@ -381,13 +383,13 @@ var e, nodes, api = method['*']; // DOCUMENT_NODE (9) & ELEMENT_NODE (1) if (api in context) { - return context[api](tag); + return slice.call(context[api](tag)); } else { // DOCUMENT_FRAGMENT_NODE (11) if ((e = context.firstElementChild)) { tag = tag.toLowerCase(); if (!(e.nextElementSibling || tag == '*' || e.nodeName.toLowerCase() == tag)) { - return e[api](tag); + return slice.call(e[api](tag)); } else { nodes = [ ]; do { @@ -406,13 +408,13 @@ var e, nodes, api = method['.'], reCls; // DOCUMENT_NODE (9) & ELEMENT_NODE (1) if (api in context) { - return context[api](cls); + return slice.call(context[api](cls)); } else { // DOCUMENT_FRAGMENT_NODE (11) if ((e = context.firstElementChild)) { reCls = RegExp('(^|\\s)' + cls + '(\\s|$)', QUIRKS_MODE ? 'i' : ''); if (!(e.nextElementSibling || reCls.test(e.className))) { - return e[api](cls); + return slice.call(e[api](cls)); } else { nodes = [ ]; do { @@ -430,9 +432,9 @@ hasAttributeNS = function(e, name) { var i, l, attr = e.getAttributeNames(); - HTML_DOCUMENT && (name = name.toLowerCase()); + name = RegExp(':?' + name + '$', HTML_DOCUMENT ? 'i' : ''); for (i = 0, l = attr.length; l > i; ++i) { - if (name == attr[i].toLowerCase()) return true; + if (name.test(attr[i])) return true; } return false; }, @@ -1247,13 +1249,13 @@ } // allow pseudo-elements starting with single colon (:) - // :after, :before, :first-letter, :first-line, :placeholder-shown, :-webkit- + // :after, :before, :first-letter, :first-line else if ((match = selector.match(Patterns.pseudo_sng))) { source = 'if(' + D + '(e.nodeType==1)){' + source + '}'; } // allow pseudo-elements starting with double colon (::) - // ::after, ::before, ::marker, ::placeholder, ::inactive-selection, ::selection + // ::after, ::before, ::marker, ::placeholder, ::inactive-selection, ::selection, ::-webkit- else if ((match = selector.match(Patterns.pseudo_dbl))) { source = 'if(' + D + '(e.nodeType==1)){' + source + '}'; } @@ -1442,8 +1444,27 @@ if (selectors) { if ((resolver = selectResolvers[selectors])) { if (resolver.context === context && resolver.callback === callback) { - nodes = results_from(resolver, context, callback); - Config.LIVECACHE && !(/\[[^\]]*\]/).test(selectors) && (resolver.results = nodes); + var f = resolver.factory, h = resolver.htmlset, n = resolver.nodeset, nodes = [ ]; + if (n.length > 1) { + for (var i = 0, l = n.length, list; l > i; ++i) { + list = compat[n[i][0]](context, n[i].slice(1))(); + if (f[i] !== null) { + f[i](list, callback, context, nodes); + } else { + nodes = nodes.concat(list); + } + } + if (l > 1 && nodes.length > 1) { + nodes.sort(documentOrder); + hasDupes && (nodes = unique(nodes)); + } + } else { + if (f[0]) { + nodes = f[0](h[0](), callback, context, nodes); + } else { + nodes = h[0](); + } + } return typeof callback == 'function' ? concatCall(nodes, callback) : nodes; } @@ -1496,7 +1517,7 @@ // save/reuse factory and closure collection selectResolvers[selectors] = collect(expressions, context, callback); - nodes = results_from(selectResolvers[selectors], context, callback); + nodes = selectResolvers[selectors].results; return typeof callback == 'function' ? concatCall(nodes, callback) : nodes; @@ -1513,83 +1534,45 @@ '*' : '') : '') + selector.slice(index + length - (token[1] == '*' ? 1 : 0)); }, - results_from = - function(resolver, context, callback) { - var i, k, l, list, nodes = [ ], - f = resolver.factory, h = resolver.htmlset, - n = resolver.nodeset, r = resolver.results; - for (i = 0, k = 0, l = n.length; l > i; ++i) { - list = r && h[i] ? h[i]() : compat[n[i][0]](context, n[i].slice(1))(); - if (f[i] !== null) { - if (r && h[i]) { - if (list.item || validate(resolver, n[i], list)) { - ++k; - } else { - f[i](list, callback, context, nodes); - } - } else { - f[i](list, callback, context, nodes); - } - } else { - if (list.length !== 0) { - list.length == 1 ? - nodes[nodes.length] = list[0] : - concatList(nodes, list); - } - } - if (r && h[i]) { - if (k == l) { nodes = r; } - } else { - if (l > 1 && nodes.length > 1) { - nodes.sort(documentOrder); - hasDupes && (nodes = unique(nodes)); - } - } - } - return nodes; - }, - - // validate memoized HTMLCollection - validate = - function(resolver, n, s) { - var c = 0, i = 0, l = s.length, m; - if (l === 0) { return false; } - m = compat[n[0]](resolver.context, n.slice(1))(); - if (m.item && s.item) { - while (l > i) { if (m.item(i) === s.item(c)) { ++i; ++c; } else return false; } - } else { - while (l > i) { if (m[i] === s[c]) { ++i; ++c;} else return false; } - } - return m.length == c; - }, - // prepare factory resolvers and closure collections collect = function(selectors, context, callback) { - var i, l, token, seen = { }, factory = [ ], htmlset = [ ], nodeset = [ ]; + var i, l, token, seen = { }, factory = [ ], htmlset = [ ], nodeset = [ ], results = [ ]; for (i = 0, l = selectors.length; l > i; ++i) { if (!seen[selectors[i]] && (seen[selectors[i]] = true)) { + if ((token = selectors[i].match(reOptimizer)) && token[1] != ':') { - Config.LIVECACHE && !(/\[[^\]]*\]/).test(selectors[i]) && (htmlset[i] = compat[token[1] || '*'](context, token[2])); - nodeset[i] = (token[1] || '*') + token[2]; + token[1] || (token[1] = '*'); selectors[i] = optimize(selectors[i], token); - } else if (token && token[1] != ':') { - Config.LIVECACHE && !(/\[[^\]]*\]/).test(selectors[i]) && (htmlset[i] = compat['*'](context, '*')); - nodeset[i] = '**'; } else { - nodeset[i] = '**'; + token = ['', '*', '*']; + } + + nodeset[i] = token[1] + token[2]; + htmlset[i] = compat[token[1]](context, token[2]); + factory[i] = compile(selectors[i], true, null); + + if (factory[i]) { + factory[i](htmlset[i](), callback, context, results); + } else { + results = results.concat(htmlset[i]()); } - factory[i] = selectors[i] == '*' ? null : compile(selectors[i], true, null); + } } + if (l > 1) { + results.sort(documentOrder); + hasDupes && (results = unique(results)); + } + return { callback: callback, context: context, factory: factory, htmlset: htmlset, nodeset: nodeset, - results: null + results: results }; }, diff --git a/node_modules/optimist/.travis.yml b/node_modules/optimist/.travis.yml deleted file mode 100644 index cc4dba29d..000000000 --- a/node_modules/optimist/.travis.yml +++ /dev/null @@ -1,4 +0,0 @@ -language: node_js -node_js: - - "0.8" - - "0.10" diff --git a/node_modules/optimist/LICENSE b/node_modules/optimist/LICENSE deleted file mode 100644 index 432d1aeb0..000000000 --- a/node_modules/optimist/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -Copyright 2010 James Halliday (mail@substack.net) - -This project is free software released under the MIT/X11 license: - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/node_modules/optimist/example/bool.js b/node_modules/optimist/example/bool.js deleted file mode 100644 index a998fb7ab..000000000 --- a/node_modules/optimist/example/bool.js +++ /dev/null @@ -1,10 +0,0 @@ -#!/usr/bin/env node -var util = require('util'); -var argv = require('optimist').argv; - -if (argv.s) { - util.print(argv.fr ? 'Le chat dit: ' : 'The cat says: '); -} -console.log( - (argv.fr ? 'miaou' : 'meow') + (argv.p ? '.' : '') -); diff --git a/node_modules/optimist/example/boolean_double.js b/node_modules/optimist/example/boolean_double.js deleted file mode 100644 index a35a7e6d3..000000000 --- a/node_modules/optimist/example/boolean_double.js +++ /dev/null @@ -1,7 +0,0 @@ -#!/usr/bin/env node -var argv = require('optimist') - .boolean(['x','y','z']) - .argv -; -console.dir([ argv.x, argv.y, argv.z ]); -console.dir(argv._); diff --git a/node_modules/optimist/example/boolean_single.js b/node_modules/optimist/example/boolean_single.js deleted file mode 100644 index 017bb6893..000000000 --- a/node_modules/optimist/example/boolean_single.js +++ /dev/null @@ -1,7 +0,0 @@ -#!/usr/bin/env node -var argv = require('optimist') - .boolean('v') - .argv -; -console.dir(argv.v); -console.dir(argv._); diff --git a/node_modules/optimist/example/default_hash.js b/node_modules/optimist/example/default_hash.js deleted file mode 100644 index ade77681d..000000000 --- a/node_modules/optimist/example/default_hash.js +++ /dev/null @@ -1,8 +0,0 @@ -#!/usr/bin/env node - -var argv = require('optimist') - .default({ x : 10, y : 10 }) - .argv -; - -console.log(argv.x + argv.y); diff --git a/node_modules/optimist/example/default_singles.js b/node_modules/optimist/example/default_singles.js deleted file mode 100644 index d9b1ff458..000000000 --- a/node_modules/optimist/example/default_singles.js +++ /dev/null @@ -1,7 +0,0 @@ -#!/usr/bin/env node -var argv = require('optimist') - .default('x', 10) - .default('y', 10) - .argv -; -console.log(argv.x + argv.y); diff --git a/node_modules/optimist/example/divide.js b/node_modules/optimist/example/divide.js deleted file mode 100644 index 5e2ee82ff..000000000 --- a/node_modules/optimist/example/divide.js +++ /dev/null @@ -1,8 +0,0 @@ -#!/usr/bin/env node - -var argv = require('optimist') - .usage('Usage: $0 -x [num] -y [num]') - .demand(['x','y']) - .argv; - -console.log(argv.x / argv.y); diff --git a/node_modules/optimist/example/line_count.js b/node_modules/optimist/example/line_count.js deleted file mode 100644 index b5f95bf6d..000000000 --- a/node_modules/optimist/example/line_count.js +++ /dev/null @@ -1,20 +0,0 @@ -#!/usr/bin/env node -var argv = require('optimist') - .usage('Count the lines in a file.\nUsage: $0') - .demand('f') - .alias('f', 'file') - .describe('f', 'Load a file') - .argv -; - -var fs = require('fs'); -var s = fs.createReadStream(argv.file); - -var lines = 0; -s.on('data', function (buf) { - lines += buf.toString().match(/\n/g).length; -}); - -s.on('end', function () { - console.log(lines); -}); diff --git a/node_modules/optimist/example/line_count_options.js b/node_modules/optimist/example/line_count_options.js deleted file mode 100644 index d9ac70904..000000000 --- a/node_modules/optimist/example/line_count_options.js +++ /dev/null @@ -1,29 +0,0 @@ -#!/usr/bin/env node -var argv = require('optimist') - .usage('Count the lines in a file.\nUsage: $0') - .options({ - file : { - demand : true, - alias : 'f', - description : 'Load a file' - }, - base : { - alias : 'b', - description : 'Numeric base to use for output', - default : 10, - }, - }) - .argv -; - -var fs = require('fs'); -var s = fs.createReadStream(argv.file); - -var lines = 0; -s.on('data', function (buf) { - lines += buf.toString().match(/\n/g).length; -}); - -s.on('end', function () { - console.log(lines.toString(argv.base)); -}); diff --git a/node_modules/optimist/example/line_count_wrap.js b/node_modules/optimist/example/line_count_wrap.js deleted file mode 100644 index 426751112..000000000 --- a/node_modules/optimist/example/line_count_wrap.js +++ /dev/null @@ -1,29 +0,0 @@ -#!/usr/bin/env node -var argv = require('optimist') - .usage('Count the lines in a file.\nUsage: $0') - .wrap(80) - .demand('f') - .alias('f', [ 'file', 'filename' ]) - .describe('f', - "Load a file. It's pretty important." - + " Required even. So you'd better specify it." - ) - .alias('b', 'base') - .describe('b', 'Numeric base to display the number of lines in') - .default('b', 10) - .describe('x', 'Super-secret optional parameter which is secret') - .default('x', '') - .argv -; - -var fs = require('fs'); -var s = fs.createReadStream(argv.file); - -var lines = 0; -s.on('data', function (buf) { - lines += buf.toString().match(/\n/g).length; -}); - -s.on('end', function () { - console.log(lines.toString(argv.base)); -}); diff --git a/node_modules/optimist/example/nonopt.js b/node_modules/optimist/example/nonopt.js deleted file mode 100644 index ee633eedc..000000000 --- a/node_modules/optimist/example/nonopt.js +++ /dev/null @@ -1,4 +0,0 @@ -#!/usr/bin/env node -var argv = require('optimist').argv; -console.log('(%d,%d)', argv.x, argv.y); -console.log(argv._); diff --git a/node_modules/optimist/example/reflect.js b/node_modules/optimist/example/reflect.js deleted file mode 100644 index 816b3e111..000000000 --- a/node_modules/optimist/example/reflect.js +++ /dev/null @@ -1,2 +0,0 @@ -#!/usr/bin/env node -console.dir(require('optimist').argv); diff --git a/node_modules/optimist/example/short.js b/node_modules/optimist/example/short.js deleted file mode 100644 index 1db0ad0f8..000000000 --- a/node_modules/optimist/example/short.js +++ /dev/null @@ -1,3 +0,0 @@ -#!/usr/bin/env node -var argv = require('optimist').argv; -console.log('(%d,%d)', argv.x, argv.y); diff --git a/node_modules/optimist/example/string.js b/node_modules/optimist/example/string.js deleted file mode 100644 index a8e5aeb23..000000000 --- a/node_modules/optimist/example/string.js +++ /dev/null @@ -1,11 +0,0 @@ -#!/usr/bin/env node -var argv = require('optimist') - .string('x', 'y') - .argv -; -console.dir([ argv.x, argv.y ]); - -/* Turns off numeric coercion: - ./node string.js -x 000123 -y 9876 - [ '000123', '9876' ] -*/ diff --git a/node_modules/optimist/example/usage-options.js b/node_modules/optimist/example/usage-options.js deleted file mode 100644 index b99997767..000000000 --- a/node_modules/optimist/example/usage-options.js +++ /dev/null @@ -1,19 +0,0 @@ -var optimist = require('./../index'); - -var argv = optimist.usage('This is my awesome program', { - 'about': { - description: 'Provide some details about the author of this program', - required: true, - short: 'a', - }, - 'info': { - description: 'Provide some information about the node.js agains!!!!!!', - boolean: true, - short: 'i' - } -}).argv; - -optimist.showHelp(); - -console.log('\n\nInspecting options'); -console.dir(argv); \ No newline at end of file diff --git a/node_modules/optimist/example/xup.js b/node_modules/optimist/example/xup.js deleted file mode 100644 index 8f6ecd201..000000000 --- a/node_modules/optimist/example/xup.js +++ /dev/null @@ -1,10 +0,0 @@ -#!/usr/bin/env node -var argv = require('optimist').argv; - -if (argv.rif - 5 * argv.xup > 7.138) { - console.log('Buy more riffiwobbles'); -} -else { - console.log('Sell the xupptumblers'); -} - diff --git a/node_modules/optimist/index.js b/node_modules/optimist/index.js deleted file mode 100644 index 4da5a6d87..000000000 --- a/node_modules/optimist/index.js +++ /dev/null @@ -1,343 +0,0 @@ -var path = require('path'); -var minimist = require('minimist'); -var wordwrap = require('wordwrap'); - -/* Hack an instance of Argv with process.argv into Argv - so people can do - require('optimist')(['--beeble=1','-z','zizzle']).argv - to parse a list of args and - require('optimist').argv - to get a parsed version of process.argv. -*/ - -var inst = Argv(process.argv.slice(2)); -Object.keys(inst).forEach(function (key) { - Argv[key] = typeof inst[key] == 'function' - ? inst[key].bind(inst) - : inst[key]; -}); - -var exports = module.exports = Argv; -function Argv (processArgs, cwd) { - var self = {}; - if (!cwd) cwd = process.cwd(); - - self.$0 = process.argv - .slice(0,2) - .map(function (x) { - var b = rebase(cwd, x); - return x.match(/^\//) && b.length < x.length - ? b : x - }) - .join(' ') - ; - - if (process.env._ != undefined && process.argv[1] == process.env._) { - self.$0 = process.env._.replace( - path.dirname(process.execPath) + '/', '' - ); - } - - var options = { - boolean: [], - string: [], - alias: {}, - default: [] - }; - - self.boolean = function (bools) { - options.boolean.push.apply(options.boolean, [].concat(bools)); - return self; - }; - - self.string = function (strings) { - options.string.push.apply(options.string, [].concat(strings)); - return self; - }; - - self.default = function (key, value) { - if (typeof key === 'object') { - Object.keys(key).forEach(function (k) { - self.default(k, key[k]); - }); - } - else { - options.default[key] = value; - } - return self; - }; - - self.alias = function (x, y) { - if (typeof x === 'object') { - Object.keys(x).forEach(function (key) { - self.alias(key, x[key]); - }); - } - else { - options.alias[x] = (options.alias[x] || []).concat(y); - } - return self; - }; - - var demanded = {}; - self.demand = function (keys) { - if (typeof keys == 'number') { - if (!demanded._) demanded._ = 0; - demanded._ += keys; - } - else if (Array.isArray(keys)) { - keys.forEach(function (key) { - self.demand(key); - }); - } - else { - demanded[keys] = true; - } - - return self; - }; - - var usage; - self.usage = function (msg, opts) { - if (!opts && typeof msg === 'object') { - opts = msg; - msg = null; - } - - usage = msg; - - if (opts) self.options(opts); - - return self; - }; - - function fail (msg) { - self.showHelp(); - if (msg) console.error(msg); - process.exit(1); - } - - var checks = []; - self.check = function (f) { - checks.push(f); - return self; - }; - - var descriptions = {}; - self.describe = function (key, desc) { - if (typeof key === 'object') { - Object.keys(key).forEach(function (k) { - self.describe(k, key[k]); - }); - } - else { - descriptions[key] = desc; - } - return self; - }; - - self.parse = function (args) { - return parseArgs(args); - }; - - self.option = self.options = function (key, opt) { - if (typeof key === 'object') { - Object.keys(key).forEach(function (k) { - self.options(k, key[k]); - }); - } - else { - if (opt.alias) self.alias(key, opt.alias); - if (opt.demand) self.demand(key); - if (typeof opt.default !== 'undefined') { - self.default(key, opt.default); - } - - if (opt.boolean || opt.type === 'boolean') { - self.boolean(key); - } - if (opt.string || opt.type === 'string') { - self.string(key); - } - - var desc = opt.describe || opt.description || opt.desc; - if (desc) { - self.describe(key, desc); - } - } - - return self; - }; - - var wrap = null; - self.wrap = function (cols) { - wrap = cols; - return self; - }; - - self.showHelp = function (fn) { - if (!fn) fn = console.error; - fn(self.help()); - }; - - self.help = function () { - var keys = Object.keys( - Object.keys(descriptions) - .concat(Object.keys(demanded)) - .concat(Object.keys(options.default)) - .reduce(function (acc, key) { - if (key !== '_') acc[key] = true; - return acc; - }, {}) - ); - - var help = keys.length ? [ 'Options:' ] : []; - - if (usage) { - help.unshift(usage.replace(/\$0/g, self.$0), ''); - } - - var switches = keys.reduce(function (acc, key) { - acc[key] = [ key ].concat(options.alias[key] || []) - .map(function (sw) { - return (sw.length > 1 ? '--' : '-') + sw - }) - .join(', ') - ; - return acc; - }, {}); - - var switchlen = longest(Object.keys(switches).map(function (s) { - return switches[s] || ''; - })); - - var desclen = longest(Object.keys(descriptions).map(function (d) { - return descriptions[d] || ''; - })); - - keys.forEach(function (key) { - var kswitch = switches[key]; - var desc = descriptions[key] || ''; - - if (wrap) { - desc = wordwrap(switchlen + 4, wrap)(desc) - .slice(switchlen + 4) - ; - } - - var spadding = new Array( - Math.max(switchlen - kswitch.length + 3, 0) - ).join(' '); - - var dpadding = new Array( - Math.max(desclen - desc.length + 1, 0) - ).join(' '); - - var type = null; - - if (options.boolean[key]) type = '[boolean]'; - if (options.string[key]) type = '[string]'; - - if (!wrap && dpadding.length > 0) { - desc += dpadding; - } - - var prelude = ' ' + kswitch + spadding; - var extra = [ - type, - demanded[key] - ? '[required]' - : null - , - options.default[key] !== undefined - ? '[default: ' + JSON.stringify(options.default[key]) + ']' - : null - , - ].filter(Boolean).join(' '); - - var body = [ desc, extra ].filter(Boolean).join(' '); - - if (wrap) { - var dlines = desc.split('\n'); - var dlen = dlines.slice(-1)[0].length - + (dlines.length === 1 ? prelude.length : 0) - - body = desc + (dlen + extra.length > wrap - 2 - ? '\n' - + new Array(wrap - extra.length + 1).join(' ') - + extra - : new Array(wrap - extra.length - dlen + 1).join(' ') - + extra - ); - } - - help.push(prelude + body); - }); - - help.push(''); - return help.join('\n'); - }; - - Object.defineProperty(self, 'argv', { - get : function () { return parseArgs(processArgs) }, - enumerable : true, - }); - - function parseArgs (args) { - var argv = minimist(args, options); - argv.$0 = self.$0; - - if (demanded._ && argv._.length < demanded._) { - fail('Not enough non-option arguments: got ' - + argv._.length + ', need at least ' + demanded._ - ); - } - - var missing = []; - Object.keys(demanded).forEach(function (key) { - if (!argv[key]) missing.push(key); - }); - - if (missing.length) { - fail('Missing required arguments: ' + missing.join(', ')); - } - - checks.forEach(function (f) { - try { - if (f(argv) === false) { - fail('Argument check failed: ' + f.toString()); - } - } - catch (err) { - fail(err) - } - }); - - return argv; - } - - function longest (xs) { - return Math.max.apply( - null, - xs.map(function (x) { return x.length }) - ); - } - - return self; -}; - -// rebase an absolute path to a relative one with respect to a base directory -// exported for tests -exports.rebase = rebase; -function rebase (base, dir) { - var ds = path.normalize(dir).split('/').slice(1); - var bs = path.normalize(base).split('/').slice(1); - - for (var i = 0; ds[i] && ds[i] == bs[i]; i++); - ds.splice(0, i); bs.splice(0, i); - - var p = path.normalize( - bs.map(function () { return '..' }).concat(ds).join('/') - ).replace(/\/$/,'').replace(/^$/, '.'); - return p.match(/^[.\/]/) ? p : './' + p; -}; diff --git a/node_modules/optimist/node_modules/minimist/.travis.yml b/node_modules/optimist/node_modules/minimist/.travis.yml deleted file mode 100644 index cc4dba29d..000000000 --- a/node_modules/optimist/node_modules/minimist/.travis.yml +++ /dev/null @@ -1,4 +0,0 @@ -language: node_js -node_js: - - "0.8" - - "0.10" diff --git a/node_modules/optimist/node_modules/minimist/LICENSE b/node_modules/optimist/node_modules/minimist/LICENSE deleted file mode 100644 index ee27ba4b4..000000000 --- a/node_modules/optimist/node_modules/minimist/LICENSE +++ /dev/null @@ -1,18 +0,0 @@ -This software is released under the MIT license: - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of -the Software, and to permit persons to whom the Software is furnished to do so, -subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS -FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR -COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER -IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/optimist/node_modules/minimist/example/parse.js b/node_modules/optimist/node_modules/minimist/example/parse.js deleted file mode 100644 index abff3e8ee..000000000 --- a/node_modules/optimist/node_modules/minimist/example/parse.js +++ /dev/null @@ -1,2 +0,0 @@ -var argv = require('../')(process.argv.slice(2)); -console.dir(argv); diff --git a/node_modules/optimist/node_modules/minimist/index.js b/node_modules/optimist/node_modules/minimist/index.js deleted file mode 100644 index 71fb8305b..000000000 --- a/node_modules/optimist/node_modules/minimist/index.js +++ /dev/null @@ -1,187 +0,0 @@ -module.exports = function (args, opts) { - if (!opts) opts = {}; - - var flags = { bools : {}, strings : {} }; - - [].concat(opts['boolean']).filter(Boolean).forEach(function (key) { - flags.bools[key] = true; - }); - - var aliases = {}; - Object.keys(opts.alias || {}).forEach(function (key) { - aliases[key] = [].concat(opts.alias[key]); - aliases[key].forEach(function (x) { - aliases[x] = [key].concat(aliases[key].filter(function (y) { - return x !== y; - })); - }); - }); - - [].concat(opts.string).filter(Boolean).forEach(function (key) { - flags.strings[key] = true; - if (aliases[key]) { - flags.strings[aliases[key]] = true; - } - }); - - var defaults = opts['default'] || {}; - - var argv = { _ : [] }; - Object.keys(flags.bools).forEach(function (key) { - setArg(key, defaults[key] === undefined ? false : defaults[key]); - }); - - var notFlags = []; - - if (args.indexOf('--') !== -1) { - notFlags = args.slice(args.indexOf('--')+1); - args = args.slice(0, args.indexOf('--')); - } - - function setArg (key, val) { - var value = !flags.strings[key] && isNumber(val) - ? Number(val) : val - ; - setKey(argv, key.split('.'), value); - - (aliases[key] || []).forEach(function (x) { - setKey(argv, x.split('.'), value); - }); - } - - for (var i = 0; i < args.length; i++) { - var arg = args[i]; - - if (/^--.+=/.test(arg)) { - // Using [\s\S] instead of . because js doesn't support the - // 'dotall' regex modifier. See: - // http://stackoverflow.com/a/1068308/13216 - var m = arg.match(/^--([^=]+)=([\s\S]*)$/); - setArg(m[1], m[2]); - } - else if (/^--no-.+/.test(arg)) { - var key = arg.match(/^--no-(.+)/)[1]; - setArg(key, false); - } - else if (/^--.+/.test(arg)) { - var key = arg.match(/^--(.+)/)[1]; - var next = args[i + 1]; - if (next !== undefined && !/^-/.test(next) - && !flags.bools[key] - && (aliases[key] ? !flags.bools[aliases[key]] : true)) { - setArg(key, next); - i++; - } - else if (/^(true|false)$/.test(next)) { - setArg(key, next === 'true'); - i++; - } - else { - setArg(key, flags.strings[key] ? '' : true); - } - } - else if (/^-[^-]+/.test(arg)) { - var letters = arg.slice(1,-1).split(''); - - var broken = false; - for (var j = 0; j < letters.length; j++) { - var next = arg.slice(j+2); - - if (next === '-') { - setArg(letters[j], next) - continue; - } - - if (/[A-Za-z]/.test(letters[j]) - && /-?\d+(\.\d*)?(e-?\d+)?$/.test(next)) { - setArg(letters[j], next); - broken = true; - break; - } - - if (letters[j+1] && letters[j+1].match(/\W/)) { - setArg(letters[j], arg.slice(j+2)); - broken = true; - break; - } - else { - setArg(letters[j], flags.strings[letters[j]] ? '' : true); - } - } - - var key = arg.slice(-1)[0]; - if (!broken && key !== '-') { - if (args[i+1] && !/^(-|--)[^-]/.test(args[i+1]) - && !flags.bools[key] - && (aliases[key] ? !flags.bools[aliases[key]] : true)) { - setArg(key, args[i+1]); - i++; - } - else if (args[i+1] && /true|false/.test(args[i+1])) { - setArg(key, args[i+1] === 'true'); - i++; - } - else { - setArg(key, flags.strings[key] ? '' : true); - } - } - } - else { - argv._.push( - flags.strings['_'] || !isNumber(arg) ? arg : Number(arg) - ); - } - } - - Object.keys(defaults).forEach(function (key) { - if (!hasKey(argv, key.split('.'))) { - setKey(argv, key.split('.'), defaults[key]); - - (aliases[key] || []).forEach(function (x) { - setKey(argv, x.split('.'), defaults[key]); - }); - } - }); - - notFlags.forEach(function(key) { - argv._.push(key); - }); - - return argv; -}; - -function hasKey (obj, keys) { - var o = obj; - keys.slice(0,-1).forEach(function (key) { - o = (o[key] || {}); - }); - - var key = keys[keys.length - 1]; - return key in o; -} - -function setKey (obj, keys, value) { - var o = obj; - keys.slice(0,-1).forEach(function (key) { - if (o[key] === undefined) o[key] = {}; - o = o[key]; - }); - - var key = keys[keys.length - 1]; - if (o[key] === undefined || typeof o[key] === 'boolean') { - o[key] = value; - } - else if (Array.isArray(o[key])) { - o[key].push(value); - } - else { - o[key] = [ o[key], value ]; - } -} - -function isNumber (x) { - if (typeof x === 'number') return true; - if (/^0x[0-9a-f]+$/i.test(x)) return true; - return /^[-+]?(?:\d+(?:\.\d*)?|\.\d+)(e[-+]?\d+)?$/.test(x); -} - diff --git a/node_modules/optimist/node_modules/minimist/package.json b/node_modules/optimist/node_modules/minimist/package.json deleted file mode 100644 index 003a591de..000000000 --- a/node_modules/optimist/node_modules/minimist/package.json +++ /dev/null @@ -1,75 +0,0 @@ -{ - "_args": [ - [ - "minimist@0.0.10", - "/Users/drew.heavner/Documents/Github/sign-android-release" - ] - ], - "_development": true, - "_from": "minimist@0.0.10", - "_id": "minimist@0.0.10", - "_inBundle": false, - "_integrity": "sha1-3j+YVD2/lggr5IrRoMfNqDYwHc8=", - "_location": "/optimist/minimist", - "_phantomChildren": {}, - "_requested": { - "type": "version", - "registry": true, - "raw": "minimist@0.0.10", - "name": "minimist", - "escapedName": "minimist", - "rawSpec": "0.0.10", - "saveSpec": null, - "fetchSpec": "0.0.10" - }, - "_requiredBy": [ - "/optimist" - ], - "_resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.10.tgz", - "_spec": "0.0.10", - "_where": "/Users/drew.heavner/Documents/Github/sign-android-release", - "author": { - "name": "James Halliday", - "email": "mail@substack.net", - "url": "http://substack.net" - }, - "bugs": { - "url": "https://github.com/substack/minimist/issues" - }, - "description": "parse argument options", - "devDependencies": { - "tap": "~0.4.0", - "tape": "~1.0.4" - }, - "homepage": "https://github.com/substack/minimist", - "keywords": [ - "argv", - "getopt", - "parser", - "optimist" - ], - "license": "MIT", - "main": "index.js", - "name": "minimist", - "repository": { - "type": "git", - "url": "git://github.com/substack/minimist.git" - }, - "scripts": { - "test": "tap test/*.js" - }, - "testling": { - "files": "test/*.js", - "browsers": [ - "ie/6..latest", - "ff/5", - "firefox/latest", - "chrome/10", - "chrome/latest", - "safari/5.1", - "safari/latest", - "opera/12" - ] - }, - "version": "0.0.10" -} diff --git a/node_modules/optimist/node_modules/minimist/readme.markdown b/node_modules/optimist/node_modules/minimist/readme.markdown deleted file mode 100644 index c25635323..000000000 --- a/node_modules/optimist/node_modules/minimist/readme.markdown +++ /dev/null @@ -1,73 +0,0 @@ -# minimist - -parse argument options - -This module is the guts of optimist's argument parser without all the -fanciful decoration. - -[![browser support](https://ci.testling.com/substack/minimist.png)](http://ci.testling.com/substack/minimist) - -[![build status](https://secure.travis-ci.org/substack/minimist.png)](http://travis-ci.org/substack/minimist) - -# example - -``` js -var argv = require('minimist')(process.argv.slice(2)); -console.dir(argv); -``` - -``` -$ node example/parse.js -a beep -b boop -{ _: [], a: 'beep', b: 'boop' } -``` - -``` -$ node example/parse.js -x 3 -y 4 -n5 -abc --beep=boop foo bar baz -{ _: [ 'foo', 'bar', 'baz' ], - x: 3, - y: 4, - n: 5, - a: true, - b: true, - c: true, - beep: 'boop' } -``` - -# methods - -``` js -var parseArgs = require('minimist') -``` - -## var argv = parseArgs(args, opts={}) - -Return an argument object `argv` populated with the array arguments from `args`. - -`argv._` contains all the arguments that didn't have an option associated with -them. - -Numeric-looking arguments will be returned as numbers unless `opts.string` or -`opts.boolean` is set for that argument name. - -Any arguments after `'--'` will not be parsed and will end up in `argv._`. - -options can be: - -* `opts.string` - a string or array of strings argument names to always treat as -strings -* `opts.boolean` - a string or array of strings to always treat as booleans -* `opts.alias` - an object mapping string names to strings or arrays of string -argument names to use as aliases -* `opts.default` - an object mapping string argument names to default values - -# install - -With [npm](https://npmjs.org) do: - -``` -npm install minimist -``` - -# license - -MIT diff --git a/node_modules/optimist/node_modules/minimist/test/bool.js b/node_modules/optimist/node_modules/minimist/test/bool.js deleted file mode 100644 index 749e083cb..000000000 --- a/node_modules/optimist/node_modules/minimist/test/bool.js +++ /dev/null @@ -1,119 +0,0 @@ -var parse = require('../'); -var test = require('tape'); - -test('flag boolean default false', function (t) { - var argv = parse(['moo'], { - boolean: ['t', 'verbose'], - default: { verbose: false, t: false } - }); - - t.deepEqual(argv, { - verbose: false, - t: false, - _: ['moo'] - }); - - t.deepEqual(typeof argv.verbose, 'boolean'); - t.deepEqual(typeof argv.t, 'boolean'); - t.end(); - -}); - -test('boolean groups', function (t) { - var argv = parse([ '-x', '-z', 'one', 'two', 'three' ], { - boolean: ['x','y','z'] - }); - - t.deepEqual(argv, { - x : true, - y : false, - z : true, - _ : [ 'one', 'two', 'three' ] - }); - - t.deepEqual(typeof argv.x, 'boolean'); - t.deepEqual(typeof argv.y, 'boolean'); - t.deepEqual(typeof argv.z, 'boolean'); - t.end(); -}); -test('boolean and alias with chainable api', function (t) { - var aliased = [ '-h', 'derp' ]; - var regular = [ '--herp', 'derp' ]; - var opts = { - herp: { alias: 'h', boolean: true } - }; - var aliasedArgv = parse(aliased, { - boolean: 'herp', - alias: { h: 'herp' } - }); - var propertyArgv = parse(regular, { - boolean: 'herp', - alias: { h: 'herp' } - }); - var expected = { - herp: true, - h: true, - '_': [ 'derp' ] - }; - - t.same(aliasedArgv, expected); - t.same(propertyArgv, expected); - t.end(); -}); - -test('boolean and alias with options hash', function (t) { - var aliased = [ '-h', 'derp' ]; - var regular = [ '--herp', 'derp' ]; - var opts = { - alias: { 'h': 'herp' }, - boolean: 'herp' - }; - var aliasedArgv = parse(aliased, opts); - var propertyArgv = parse(regular, opts); - var expected = { - herp: true, - h: true, - '_': [ 'derp' ] - }; - t.same(aliasedArgv, expected); - t.same(propertyArgv, expected); - t.end(); -}); - -test('boolean and alias using explicit true', function (t) { - var aliased = [ '-h', 'true' ]; - var regular = [ '--herp', 'true' ]; - var opts = { - alias: { h: 'herp' }, - boolean: 'h' - }; - var aliasedArgv = parse(aliased, opts); - var propertyArgv = parse(regular, opts); - var expected = { - herp: true, - h: true, - '_': [ ] - }; - - t.same(aliasedArgv, expected); - t.same(propertyArgv, expected); - t.end(); -}); - -// regression, see https://github.com/substack/node-optimist/issues/71 -test('boolean and --x=true', function(t) { - var parsed = parse(['--boool', '--other=true'], { - boolean: 'boool' - }); - - t.same(parsed.boool, true); - t.same(parsed.other, 'true'); - - parsed = parse(['--boool', '--other=false'], { - boolean: 'boool' - }); - - t.same(parsed.boool, true); - t.same(parsed.other, 'false'); - t.end(); -}); diff --git a/node_modules/optimist/node_modules/minimist/test/dash.js b/node_modules/optimist/node_modules/minimist/test/dash.js deleted file mode 100644 index 8b034b99a..000000000 --- a/node_modules/optimist/node_modules/minimist/test/dash.js +++ /dev/null @@ -1,24 +0,0 @@ -var parse = require('../'); -var test = require('tape'); - -test('-', function (t) { - t.plan(5); - t.deepEqual(parse([ '-n', '-' ]), { n: '-', _: [] }); - t.deepEqual(parse([ '-' ]), { _: [ '-' ] }); - t.deepEqual(parse([ '-f-' ]), { f: '-', _: [] }); - t.deepEqual( - parse([ '-b', '-' ], { boolean: 'b' }), - { b: true, _: [ '-' ] } - ); - t.deepEqual( - parse([ '-s', '-' ], { string: 's' }), - { s: '-', _: [] } - ); -}); - -test('-a -- b', function (t) { - t.plan(3); - t.deepEqual(parse([ '-a', '--', 'b' ]), { a: true, _: [ 'b' ] }); - t.deepEqual(parse([ '--a', '--', 'b' ]), { a: true, _: [ 'b' ] }); - t.deepEqual(parse([ '--a', '--', 'b' ]), { a: true, _: [ 'b' ] }); -}); diff --git a/node_modules/optimist/node_modules/minimist/test/default_bool.js b/node_modules/optimist/node_modules/minimist/test/default_bool.js deleted file mode 100644 index f0041ee40..000000000 --- a/node_modules/optimist/node_modules/minimist/test/default_bool.js +++ /dev/null @@ -1,20 +0,0 @@ -var test = require('tape'); -var parse = require('../'); - -test('boolean default true', function (t) { - var argv = parse([], { - boolean: 'sometrue', - default: { sometrue: true } - }); - t.equal(argv.sometrue, true); - t.end(); -}); - -test('boolean default false', function (t) { - var argv = parse([], { - boolean: 'somefalse', - default: { somefalse: false } - }); - t.equal(argv.somefalse, false); - t.end(); -}); diff --git a/node_modules/optimist/node_modules/minimist/test/dotted.js b/node_modules/optimist/node_modules/minimist/test/dotted.js deleted file mode 100644 index d8b3e856e..000000000 --- a/node_modules/optimist/node_modules/minimist/test/dotted.js +++ /dev/null @@ -1,22 +0,0 @@ -var parse = require('../'); -var test = require('tape'); - -test('dotted alias', function (t) { - var argv = parse(['--a.b', '22'], {default: {'a.b': 11}, alias: {'a.b': 'aa.bb'}}); - t.equal(argv.a.b, 22); - t.equal(argv.aa.bb, 22); - t.end(); -}); - -test('dotted default', function (t) { - var argv = parse('', {default: {'a.b': 11}, alias: {'a.b': 'aa.bb'}}); - t.equal(argv.a.b, 11); - t.equal(argv.aa.bb, 11); - t.end(); -}); - -test('dotted default with no alias', function (t) { - var argv = parse('', {default: {'a.b': 11}}); - t.equal(argv.a.b, 11); - t.end(); -}); diff --git a/node_modules/optimist/node_modules/minimist/test/long.js b/node_modules/optimist/node_modules/minimist/test/long.js deleted file mode 100644 index 5d3a1e09d..000000000 --- a/node_modules/optimist/node_modules/minimist/test/long.js +++ /dev/null @@ -1,31 +0,0 @@ -var test = require('tape'); -var parse = require('../'); - -test('long opts', function (t) { - t.deepEqual( - parse([ '--bool' ]), - { bool : true, _ : [] }, - 'long boolean' - ); - t.deepEqual( - parse([ '--pow', 'xixxle' ]), - { pow : 'xixxle', _ : [] }, - 'long capture sp' - ); - t.deepEqual( - parse([ '--pow=xixxle' ]), - { pow : 'xixxle', _ : [] }, - 'long capture eq' - ); - t.deepEqual( - parse([ '--host', 'localhost', '--port', '555' ]), - { host : 'localhost', port : 555, _ : [] }, - 'long captures sp' - ); - t.deepEqual( - parse([ '--host=localhost', '--port=555' ]), - { host : 'localhost', port : 555, _ : [] }, - 'long captures eq' - ); - t.end(); -}); diff --git a/node_modules/optimist/node_modules/minimist/test/num.js b/node_modules/optimist/node_modules/minimist/test/num.js deleted file mode 100644 index 2cc77f4d6..000000000 --- a/node_modules/optimist/node_modules/minimist/test/num.js +++ /dev/null @@ -1,36 +0,0 @@ -var parse = require('../'); -var test = require('tape'); - -test('nums', function (t) { - var argv = parse([ - '-x', '1234', - '-y', '5.67', - '-z', '1e7', - '-w', '10f', - '--hex', '0xdeadbeef', - '789' - ]); - t.deepEqual(argv, { - x : 1234, - y : 5.67, - z : 1e7, - w : '10f', - hex : 0xdeadbeef, - _ : [ 789 ] - }); - t.deepEqual(typeof argv.x, 'number'); - t.deepEqual(typeof argv.y, 'number'); - t.deepEqual(typeof argv.z, 'number'); - t.deepEqual(typeof argv.w, 'string'); - t.deepEqual(typeof argv.hex, 'number'); - t.deepEqual(typeof argv._[0], 'number'); - t.end(); -}); - -test('already a number', function (t) { - var argv = parse([ '-x', 1234, 789 ]); - t.deepEqual(argv, { x : 1234, _ : [ 789 ] }); - t.deepEqual(typeof argv.x, 'number'); - t.deepEqual(typeof argv._[0], 'number'); - t.end(); -}); diff --git a/node_modules/optimist/node_modules/minimist/test/parse.js b/node_modules/optimist/node_modules/minimist/test/parse.js deleted file mode 100644 index 7b4a2a17c..000000000 --- a/node_modules/optimist/node_modules/minimist/test/parse.js +++ /dev/null @@ -1,197 +0,0 @@ -var parse = require('../'); -var test = require('tape'); - -test('parse args', function (t) { - t.deepEqual( - parse([ '--no-moo' ]), - { moo : false, _ : [] }, - 'no' - ); - t.deepEqual( - parse([ '-v', 'a', '-v', 'b', '-v', 'c' ]), - { v : ['a','b','c'], _ : [] }, - 'multi' - ); - t.end(); -}); - -test('comprehensive', function (t) { - t.deepEqual( - parse([ - '--name=meowmers', 'bare', '-cats', 'woo', - '-h', 'awesome', '--multi=quux', - '--key', 'value', - '-b', '--bool', '--no-meep', '--multi=baz', - '--', '--not-a-flag', 'eek' - ]), - { - c : true, - a : true, - t : true, - s : 'woo', - h : 'awesome', - b : true, - bool : true, - key : 'value', - multi : [ 'quux', 'baz' ], - meep : false, - name : 'meowmers', - _ : [ 'bare', '--not-a-flag', 'eek' ] - } - ); - t.end(); -}); - -test('flag boolean', function (t) { - var argv = parse([ '-t', 'moo' ], { boolean: 't' }); - t.deepEqual(argv, { t : true, _ : [ 'moo' ] }); - t.deepEqual(typeof argv.t, 'boolean'); - t.end(); -}); - -test('flag boolean value', function (t) { - var argv = parse(['--verbose', 'false', 'moo', '-t', 'true'], { - boolean: [ 't', 'verbose' ], - default: { verbose: true } - }); - - t.deepEqual(argv, { - verbose: false, - t: true, - _: ['moo'] - }); - - t.deepEqual(typeof argv.verbose, 'boolean'); - t.deepEqual(typeof argv.t, 'boolean'); - t.end(); -}); - -test('newlines in params' , function (t) { - var args = parse([ '-s', "X\nX" ]) - t.deepEqual(args, { _ : [], s : "X\nX" }); - - // reproduce in bash: - // VALUE="new - // line" - // node program.js --s="$VALUE" - args = parse([ "--s=X\nX" ]) - t.deepEqual(args, { _ : [], s : "X\nX" }); - t.end(); -}); - -test('strings' , function (t) { - var s = parse([ '-s', '0001234' ], { string: 's' }).s; - t.equal(s, '0001234'); - t.equal(typeof s, 'string'); - - var x = parse([ '-x', '56' ], { string: 'x' }).x; - t.equal(x, '56'); - t.equal(typeof x, 'string'); - t.end(); -}); - -test('stringArgs', function (t) { - var s = parse([ ' ', ' ' ], { string: '_' })._; - t.same(s.length, 2); - t.same(typeof s[0], 'string'); - t.same(s[0], ' '); - t.same(typeof s[1], 'string'); - t.same(s[1], ' '); - t.end(); -}); - -test('empty strings', function(t) { - var s = parse([ '-s' ], { string: 's' }).s; - t.equal(s, ''); - t.equal(typeof s, 'string'); - - var str = parse([ '--str' ], { string: 'str' }).str; - t.equal(str, ''); - t.equal(typeof str, 'string'); - - var letters = parse([ '-art' ], { - string: [ 'a', 't' ] - }); - - t.equal(letters.a, ''); - t.equal(letters.r, true); - t.equal(letters.t, ''); - - t.end(); -}); - - -test('string and alias', function(t) { - var x = parse([ '--str', '000123' ], { - string: 's', - alias: { s: 'str' } - }); - - t.equal(x.str, '000123'); - t.equal(typeof x.str, 'string'); - t.equal(x.s, '000123'); - t.equal(typeof x.s, 'string'); - - var y = parse([ '-s', '000123' ], { - string: 'str', - alias: { str: 's' } - }); - - t.equal(y.str, '000123'); - t.equal(typeof y.str, 'string'); - t.equal(y.s, '000123'); - t.equal(typeof y.s, 'string'); - t.end(); -}); - -test('slashBreak', function (t) { - t.same( - parse([ '-I/foo/bar/baz' ]), - { I : '/foo/bar/baz', _ : [] } - ); - t.same( - parse([ '-xyz/foo/bar/baz' ]), - { x : true, y : true, z : '/foo/bar/baz', _ : [] } - ); - t.end(); -}); - -test('alias', function (t) { - var argv = parse([ '-f', '11', '--zoom', '55' ], { - alias: { z: 'zoom' } - }); - t.equal(argv.zoom, 55); - t.equal(argv.z, argv.zoom); - t.equal(argv.f, 11); - t.end(); -}); - -test('multiAlias', function (t) { - var argv = parse([ '-f', '11', '--zoom', '55' ], { - alias: { z: [ 'zm', 'zoom' ] } - }); - t.equal(argv.zoom, 55); - t.equal(argv.z, argv.zoom); - t.equal(argv.z, argv.zm); - t.equal(argv.f, 11); - t.end(); -}); - -test('nested dotted objects', function (t) { - var argv = parse([ - '--foo.bar', '3', '--foo.baz', '4', - '--foo.quux.quibble', '5', '--foo.quux.o_O', - '--beep.boop' - ]); - - t.same(argv.foo, { - bar : 3, - baz : 4, - quux : { - quibble : 5, - o_O : true - } - }); - t.same(argv.beep, { boop : true }); - t.end(); -}); diff --git a/node_modules/optimist/node_modules/minimist/test/parse_modified.js b/node_modules/optimist/node_modules/minimist/test/parse_modified.js deleted file mode 100644 index 21851b036..000000000 --- a/node_modules/optimist/node_modules/minimist/test/parse_modified.js +++ /dev/null @@ -1,9 +0,0 @@ -var parse = require('../'); -var test = require('tape'); - -test('parse with modifier functions' , function (t) { - t.plan(1); - - var argv = parse([ '-b', '123' ], { boolean: 'b' }); - t.deepEqual(argv, { b: true, _: ['123'] }); -}); diff --git a/node_modules/optimist/node_modules/minimist/test/short.js b/node_modules/optimist/node_modules/minimist/test/short.js deleted file mode 100644 index d513a1c25..000000000 --- a/node_modules/optimist/node_modules/minimist/test/short.js +++ /dev/null @@ -1,67 +0,0 @@ -var parse = require('../'); -var test = require('tape'); - -test('numeric short args', function (t) { - t.plan(2); - t.deepEqual(parse([ '-n123' ]), { n: 123, _: [] }); - t.deepEqual( - parse([ '-123', '456' ]), - { 1: true, 2: true, 3: 456, _: [] } - ); -}); - -test('short', function (t) { - t.deepEqual( - parse([ '-b' ]), - { b : true, _ : [] }, - 'short boolean' - ); - t.deepEqual( - parse([ 'foo', 'bar', 'baz' ]), - { _ : [ 'foo', 'bar', 'baz' ] }, - 'bare' - ); - t.deepEqual( - parse([ '-cats' ]), - { c : true, a : true, t : true, s : true, _ : [] }, - 'group' - ); - t.deepEqual( - parse([ '-cats', 'meow' ]), - { c : true, a : true, t : true, s : 'meow', _ : [] }, - 'short group next' - ); - t.deepEqual( - parse([ '-h', 'localhost' ]), - { h : 'localhost', _ : [] }, - 'short capture' - ); - t.deepEqual( - parse([ '-h', 'localhost', '-p', '555' ]), - { h : 'localhost', p : 555, _ : [] }, - 'short captures' - ); - t.end(); -}); - -test('mixed short bool and capture', function (t) { - t.same( - parse([ '-h', 'localhost', '-fp', '555', 'script.js' ]), - { - f : true, p : 555, h : 'localhost', - _ : [ 'script.js' ] - } - ); - t.end(); -}); - -test('short and long', function (t) { - t.deepEqual( - parse([ '-h', 'localhost', '-fp', '555', 'script.js' ]), - { - f : true, p : 555, h : 'localhost', - _ : [ 'script.js' ] - } - ); - t.end(); -}); diff --git a/node_modules/optimist/node_modules/minimist/test/whitespace.js b/node_modules/optimist/node_modules/minimist/test/whitespace.js deleted file mode 100644 index 8a52a58ce..000000000 --- a/node_modules/optimist/node_modules/minimist/test/whitespace.js +++ /dev/null @@ -1,8 +0,0 @@ -var parse = require('../'); -var test = require('tape'); - -test('whitespace should be whitespace' , function (t) { - t.plan(1); - var x = parse([ '-x', '\t' ]).x; - t.equal(x, '\t'); -}); diff --git a/node_modules/optimist/package.json b/node_modules/optimist/package.json deleted file mode 100644 index 612c4e688..000000000 --- a/node_modules/optimist/package.json +++ /dev/null @@ -1,72 +0,0 @@ -{ - "_args": [ - [ - "optimist@0.6.1", - "/Users/drew.heavner/Documents/Github/sign-android-release" - ] - ], - "_development": true, - "_from": "optimist@0.6.1", - "_id": "optimist@0.6.1", - "_inBundle": false, - "_integrity": "sha1-2j6nRob6IaGaERwybpDrFaAZZoY=", - "_location": "/optimist", - "_phantomChildren": {}, - "_requested": { - "type": "version", - "registry": true, - "raw": "optimist@0.6.1", - "name": "optimist", - "escapedName": "optimist", - "rawSpec": "0.6.1", - "saveSpec": null, - "fetchSpec": "0.6.1" - }, - "_requiredBy": [ - "/handlebars" - ], - "_resolved": "https://registry.npmjs.org/optimist/-/optimist-0.6.1.tgz", - "_spec": "0.6.1", - "_where": "/Users/drew.heavner/Documents/Github/sign-android-release", - "author": { - "name": "James Halliday", - "email": "mail@substack.net", - "url": "http://substack.net" - }, - "bugs": { - "url": "https://github.com/substack/node-optimist/issues" - }, - "dependencies": { - "minimist": "~0.0.1", - "wordwrap": "~0.0.2" - }, - "description": "Light-weight option parsing with an argv hash. No optstrings attached.", - "devDependencies": { - "hashish": "~0.0.4", - "tap": "~0.4.0" - }, - "engine": { - "node": ">=0.4" - }, - "homepage": "https://github.com/substack/node-optimist#readme", - "keywords": [ - "argument", - "args", - "option", - "parser", - "parsing", - "cli", - "command" - ], - "license": "MIT/X11", - "main": "./index.js", - "name": "optimist", - "repository": { - "type": "git", - "url": "git+ssh://git@github.com/substack/node-optimist.git" - }, - "scripts": { - "test": "tap ./test/*.js" - }, - "version": "0.6.1" -} diff --git a/node_modules/optimist/readme.markdown b/node_modules/optimist/readme.markdown deleted file mode 100644 index b74b43724..000000000 --- a/node_modules/optimist/readme.markdown +++ /dev/null @@ -1,513 +0,0 @@ -# DEPRECATION NOTICE - -I don't want to maintain this module anymore since I just use -[minimist](https://npmjs.org/package/minimist), the argument parsing engine, -directly instead nowadays. - -See [yargs](https://github.com/chevex/yargs) for the modern, pirate-themed -successor to optimist. - -[![yarrrrrrrgs!](http://i.imgur.com/4WFGVJ9.png)](https://github.com/chevex/yargs) - -You should also consider [nomnom](https://github.com/harthur/nomnom). - -optimist -======== - -Optimist is a node.js library for option parsing for people who hate option -parsing. More specifically, this module is for people who like all the --bells -and -whistlz of program usage but think optstrings are a waste of time. - -With optimist, option parsing doesn't have to suck (as much). - -[![build status](https://secure.travis-ci.org/substack/node-optimist.png)](http://travis-ci.org/substack/node-optimist) - -examples -======== - -With Optimist, the options are just a hash! No optstrings attached. -------------------------------------------------------------------- - -xup.js: - -````javascript -#!/usr/bin/env node -var argv = require('optimist').argv; - -if (argv.rif - 5 * argv.xup > 7.138) { - console.log('Buy more riffiwobbles'); -} -else { - console.log('Sell the xupptumblers'); -} -```` - -*** - - $ ./xup.js --rif=55 --xup=9.52 - Buy more riffiwobbles - - $ ./xup.js --rif 12 --xup 8.1 - Sell the xupptumblers - -![This one's optimistic.](http://substack.net/images/optimistic.png) - -But wait! There's more! You can do short options: -------------------------------------------------- - -short.js: - -````javascript -#!/usr/bin/env node -var argv = require('optimist').argv; -console.log('(%d,%d)', argv.x, argv.y); -```` - -*** - - $ ./short.js -x 10 -y 21 - (10,21) - -And booleans, both long and short (and grouped): ----------------------------------- - -bool.js: - -````javascript -#!/usr/bin/env node -var util = require('util'); -var argv = require('optimist').argv; - -if (argv.s) { - util.print(argv.fr ? 'Le chat dit: ' : 'The cat says: '); -} -console.log( - (argv.fr ? 'miaou' : 'meow') + (argv.p ? '.' : '') -); -```` - -*** - - $ ./bool.js -s - The cat says: meow - - $ ./bool.js -sp - The cat says: meow. - - $ ./bool.js -sp --fr - Le chat dit: miaou. - -And non-hypenated options too! Just use `argv._`! -------------------------------------------------- - -nonopt.js: - -````javascript -#!/usr/bin/env node -var argv = require('optimist').argv; -console.log('(%d,%d)', argv.x, argv.y); -console.log(argv._); -```` - -*** - - $ ./nonopt.js -x 6.82 -y 3.35 moo - (6.82,3.35) - [ 'moo' ] - - $ ./nonopt.js foo -x 0.54 bar -y 1.12 baz - (0.54,1.12) - [ 'foo', 'bar', 'baz' ] - -Plus, Optimist comes with .usage() and .demand()! -------------------------------------------------- - -divide.js: - -````javascript -#!/usr/bin/env node -var argv = require('optimist') - .usage('Usage: $0 -x [num] -y [num]') - .demand(['x','y']) - .argv; - -console.log(argv.x / argv.y); -```` - -*** - - $ ./divide.js -x 55 -y 11 - 5 - - $ node ./divide.js -x 4.91 -z 2.51 - Usage: node ./divide.js -x [num] -y [num] - - Options: - -x [required] - -y [required] - - Missing required arguments: y - -EVEN MORE HOLY COW ------------------- - -default_singles.js: - -````javascript -#!/usr/bin/env node -var argv = require('optimist') - .default('x', 10) - .default('y', 10) - .argv -; -console.log(argv.x + argv.y); -```` - -*** - - $ ./default_singles.js -x 5 - 15 - -default_hash.js: - -````javascript -#!/usr/bin/env node -var argv = require('optimist') - .default({ x : 10, y : 10 }) - .argv -; -console.log(argv.x + argv.y); -```` - -*** - - $ ./default_hash.js -y 7 - 17 - -And if you really want to get all descriptive about it... ---------------------------------------------------------- - -boolean_single.js - -````javascript -#!/usr/bin/env node -var argv = require('optimist') - .boolean('v') - .argv -; -console.dir(argv); -```` - -*** - - $ ./boolean_single.js -v foo bar baz - true - [ 'bar', 'baz', 'foo' ] - -boolean_double.js - -````javascript -#!/usr/bin/env node -var argv = require('optimist') - .boolean(['x','y','z']) - .argv -; -console.dir([ argv.x, argv.y, argv.z ]); -console.dir(argv._); -```` - -*** - - $ ./boolean_double.js -x -z one two three - [ true, false, true ] - [ 'one', 'two', 'three' ] - -Optimist is here to help... ---------------------------- - -You can describe parameters for help messages and set aliases. Optimist figures -out how to format a handy help string automatically. - -line_count.js - -````javascript -#!/usr/bin/env node -var argv = require('optimist') - .usage('Count the lines in a file.\nUsage: $0') - .demand('f') - .alias('f', 'file') - .describe('f', 'Load a file') - .argv -; - -var fs = require('fs'); -var s = fs.createReadStream(argv.file); - -var lines = 0; -s.on('data', function (buf) { - lines += buf.toString().match(/\n/g).length; -}); - -s.on('end', function () { - console.log(lines); -}); -```` - -*** - - $ node line_count.js - Count the lines in a file. - Usage: node ./line_count.js - - Options: - -f, --file Load a file [required] - - Missing required arguments: f - - $ node line_count.js --file line_count.js - 20 - - $ node line_count.js -f line_count.js - 20 - -methods -======= - -By itself, - -````javascript -require('optimist').argv -````` - -will use `process.argv` array to construct the `argv` object. - -You can pass in the `process.argv` yourself: - -````javascript -require('optimist')([ '-x', '1', '-y', '2' ]).argv -```` - -or use .parse() to do the same thing: - -````javascript -require('optimist').parse([ '-x', '1', '-y', '2' ]) -```` - -The rest of these methods below come in just before the terminating `.argv`. - -.alias(key, alias) ------------------- - -Set key names as equivalent such that updates to a key will propagate to aliases -and vice-versa. - -Optionally `.alias()` can take an object that maps keys to aliases. - -.default(key, value) --------------------- - -Set `argv[key]` to `value` if no option was specified on `process.argv`. - -Optionally `.default()` can take an object that maps keys to default values. - -.demand(key) ------------- - -If `key` is a string, show the usage information and exit if `key` wasn't -specified in `process.argv`. - -If `key` is a number, demand at least as many non-option arguments, which show -up in `argv._`. - -If `key` is an Array, demand each element. - -.describe(key, desc) --------------------- - -Describe a `key` for the generated usage information. - -Optionally `.describe()` can take an object that maps keys to descriptions. - -.options(key, opt) ------------------- - -Instead of chaining together `.alias().demand().default()`, you can specify -keys in `opt` for each of the chainable methods. - -For example: - -````javascript -var argv = require('optimist') - .options('f', { - alias : 'file', - default : '/etc/passwd', - }) - .argv -; -```` - -is the same as - -````javascript -var argv = require('optimist') - .alias('f', 'file') - .default('f', '/etc/passwd') - .argv -; -```` - -Optionally `.options()` can take an object that maps keys to `opt` parameters. - -.usage(message) ---------------- - -Set a usage message to show which commands to use. Inside `message`, the string -`$0` will get interpolated to the current script name or node command for the -present script similar to how `$0` works in bash or perl. - -.check(fn) ----------- - -Check that certain conditions are met in the provided arguments. - -If `fn` throws or returns `false`, show the thrown error, usage information, and -exit. - -.boolean(key) -------------- - -Interpret `key` as a boolean. If a non-flag option follows `key` in -`process.argv`, that string won't get set as the value of `key`. - -If `key` never shows up as a flag in `process.arguments`, `argv[key]` will be -`false`. - -If `key` is an Array, interpret all the elements as booleans. - -.string(key) ------------- - -Tell the parser logic not to interpret `key` as a number or boolean. -This can be useful if you need to preserve leading zeros in an input. - -If `key` is an Array, interpret all the elements as strings. - -.wrap(columns) --------------- - -Format usage output to wrap at `columns` many columns. - -.help() -------- - -Return the generated usage string. - -.showHelp(fn=console.error) ---------------------------- - -Print the usage data using `fn` for printing. - -.parse(args) ------------- - -Parse `args` instead of `process.argv`. Returns the `argv` object. - -.argv ------ - -Get the arguments as a plain old object. - -Arguments without a corresponding flag show up in the `argv._` array. - -The script name or node command is available at `argv.$0` similarly to how `$0` -works in bash or perl. - -parsing tricks -============== - -stop parsing ------------- - -Use `--` to stop parsing flags and stuff the remainder into `argv._`. - - $ node examples/reflect.js -a 1 -b 2 -- -c 3 -d 4 - { _: [ '-c', '3', '-d', '4' ], - '$0': 'node ./examples/reflect.js', - a: 1, - b: 2 } - -negate fields -------------- - -If you want to explicity set a field to false instead of just leaving it -undefined or to override a default you can do `--no-key`. - - $ node examples/reflect.js -a --no-b - { _: [], - '$0': 'node ./examples/reflect.js', - a: true, - b: false } - -numbers -------- - -Every argument that looks like a number (`!isNaN(Number(arg))`) is converted to -one. This way you can just `net.createConnection(argv.port)` and you can add -numbers out of `argv` with `+` without having that mean concatenation, -which is super frustrating. - -duplicates ----------- - -If you specify a flag multiple times it will get turned into an array containing -all the values in order. - - $ node examples/reflect.js -x 5 -x 8 -x 0 - { _: [], - '$0': 'node ./examples/reflect.js', - x: [ 5, 8, 0 ] } - -dot notation ------------- - -When you use dots (`.`s) in argument names, an implicit object path is assumed. -This lets you organize arguments into nested objects. - - $ node examples/reflect.js --foo.bar.baz=33 --foo.quux=5 - { _: [], - '$0': 'node ./examples/reflect.js', - foo: { bar: { baz: 33 }, quux: 5 } } - -short numbers -------------- - -Short numeric `head -n5` style argument work too: - - $ node reflect.js -n123 -m456 - { '3': true, - '6': true, - _: [], - '$0': 'node ./reflect.js', - n: 123, - m: 456 } - -installation -============ - -With [npm](http://github.com/isaacs/npm), just do: - npm install optimist - -or clone this project on github: - - git clone http://github.com/substack/node-optimist.git - -To run the tests with [expresso](http://github.com/visionmedia/expresso), -just do: - - expresso - -inspired By -=========== - -This module is loosely inspired by Perl's -[Getopt::Casual](http://search.cpan.org/~photo/Getopt-Casual-0.13.1/Casual.pm). diff --git a/node_modules/optimist/test/_.js b/node_modules/optimist/test/_.js deleted file mode 100644 index d9c58b368..000000000 --- a/node_modules/optimist/test/_.js +++ /dev/null @@ -1,71 +0,0 @@ -var spawn = require('child_process').spawn; -var test = require('tap').test; - -test('dotSlashEmpty', testCmd('./bin.js', [])); - -test('dotSlashArgs', testCmd('./bin.js', [ 'a', 'b', 'c' ])); - -test('nodeEmpty', testCmd('node bin.js', [])); - -test('nodeArgs', testCmd('node bin.js', [ 'x', 'y', 'z' ])); - -test('whichNodeEmpty', function (t) { - var which = spawn('which', ['node']); - - which.stdout.on('data', function (buf) { - t.test( - testCmd(buf.toString().trim() + ' bin.js', []) - ); - t.end(); - }); - - which.stderr.on('data', function (err) { - assert.error(err); - t.end(); - }); -}); - -test('whichNodeArgs', function (t) { - var which = spawn('which', ['node']); - - which.stdout.on('data', function (buf) { - t.test( - testCmd(buf.toString().trim() + ' bin.js', [ 'q', 'r' ]) - ); - t.end(); - }); - - which.stderr.on('data', function (err) { - t.error(err); - t.end(); - }); -}); - -function testCmd (cmd, args) { - - return function (t) { - var to = setTimeout(function () { - assert.fail('Never got stdout data.') - }, 5000); - - var oldDir = process.cwd(); - process.chdir(__dirname + '/_'); - - var cmds = cmd.split(' '); - - var bin = spawn(cmds[0], cmds.slice(1).concat(args.map(String))); - process.chdir(oldDir); - - bin.stderr.on('data', function (err) { - t.error(err); - t.end(); - }); - - bin.stdout.on('data', function (buf) { - clearTimeout(to); - var _ = JSON.parse(buf.toString()); - t.same(_.map(String), args.map(String)); - t.end(); - }); - }; -} diff --git a/node_modules/optimist/test/_/argv.js b/node_modules/optimist/test/_/argv.js deleted file mode 100644 index 3d096062c..000000000 --- a/node_modules/optimist/test/_/argv.js +++ /dev/null @@ -1,2 +0,0 @@ -#!/usr/bin/env node -console.log(JSON.stringify(process.argv)); diff --git a/node_modules/optimist/test/_/bin.js b/node_modules/optimist/test/_/bin.js deleted file mode 100755 index 4a18d85f3..000000000 --- a/node_modules/optimist/test/_/bin.js +++ /dev/null @@ -1,3 +0,0 @@ -#!/usr/bin/env node -var argv = require('../../index').argv -console.log(JSON.stringify(argv._)); diff --git a/node_modules/optimist/test/dash.js b/node_modules/optimist/test/dash.js deleted file mode 100644 index af8ed6fc6..000000000 --- a/node_modules/optimist/test/dash.js +++ /dev/null @@ -1,31 +0,0 @@ -var optimist = require('../index'); -var test = require('tap').test; - -test('-', function (t) { - t.plan(5); - t.deepEqual( - fix(optimist.parse([ '-n', '-' ])), - { n: '-', _: [] } - ); - t.deepEqual( - fix(optimist.parse([ '-' ])), - { _: [ '-' ] } - ); - t.deepEqual( - fix(optimist.parse([ '-f-' ])), - { f: '-', _: [] } - ); - t.deepEqual( - fix(optimist([ '-b', '-' ]).boolean('b').argv), - { b: true, _: [ '-' ] } - ); - t.deepEqual( - fix(optimist([ '-s', '-' ]).string('s').argv), - { s: '-', _: [] } - ); -}); - -function fix (obj) { - delete obj.$0; - return obj; -} diff --git a/node_modules/optimist/test/parse.js b/node_modules/optimist/test/parse.js deleted file mode 100644 index d320f4336..000000000 --- a/node_modules/optimist/test/parse.js +++ /dev/null @@ -1,446 +0,0 @@ -var optimist = require('../index'); -var path = require('path'); -var test = require('tap').test; - -var $0 = 'node ./' + path.relative(process.cwd(), __filename); - -test('short boolean', function (t) { - var parse = optimist.parse([ '-b' ]); - t.same(parse, { b : true, _ : [], $0 : $0 }); - t.same(typeof parse.b, 'boolean'); - t.end(); -}); - -test('long boolean', function (t) { - t.same( - optimist.parse([ '--bool' ]), - { bool : true, _ : [], $0 : $0 } - ); - t.end(); -}); - -test('bare', function (t) { - t.same( - optimist.parse([ 'foo', 'bar', 'baz' ]), - { _ : [ 'foo', 'bar', 'baz' ], $0 : $0 } - ); - t.end(); -}); - -test('short group', function (t) { - t.same( - optimist.parse([ '-cats' ]), - { c : true, a : true, t : true, s : true, _ : [], $0 : $0 } - ); - t.end(); -}); - -test('short group next', function (t) { - t.same( - optimist.parse([ '-cats', 'meow' ]), - { c : true, a : true, t : true, s : 'meow', _ : [], $0 : $0 } - ); - t.end(); -}); - -test('short capture', function (t) { - t.same( - optimist.parse([ '-h', 'localhost' ]), - { h : 'localhost', _ : [], $0 : $0 } - ); - t.end(); -}); - -test('short captures', function (t) { - t.same( - optimist.parse([ '-h', 'localhost', '-p', '555' ]), - { h : 'localhost', p : 555, _ : [], $0 : $0 } - ); - t.end(); -}); - -test('long capture sp', function (t) { - t.same( - optimist.parse([ '--pow', 'xixxle' ]), - { pow : 'xixxle', _ : [], $0 : $0 } - ); - t.end(); -}); - -test('long capture eq', function (t) { - t.same( - optimist.parse([ '--pow=xixxle' ]), - { pow : 'xixxle', _ : [], $0 : $0 } - ); - t.end() -}); - -test('long captures sp', function (t) { - t.same( - optimist.parse([ '--host', 'localhost', '--port', '555' ]), - { host : 'localhost', port : 555, _ : [], $0 : $0 } - ); - t.end(); -}); - -test('long captures eq', function (t) { - t.same( - optimist.parse([ '--host=localhost', '--port=555' ]), - { host : 'localhost', port : 555, _ : [], $0 : $0 } - ); - t.end(); -}); - -test('mixed short bool and capture', function (t) { - t.same( - optimist.parse([ '-h', 'localhost', '-fp', '555', 'script.js' ]), - { - f : true, p : 555, h : 'localhost', - _ : [ 'script.js' ], $0 : $0, - } - ); - t.end(); -}); - -test('short and long', function (t) { - t.same( - optimist.parse([ '-h', 'localhost', '-fp', '555', 'script.js' ]), - { - f : true, p : 555, h : 'localhost', - _ : [ 'script.js' ], $0 : $0, - } - ); - t.end(); -}); - -test('no', function (t) { - t.same( - optimist.parse([ '--no-moo' ]), - { moo : false, _ : [], $0 : $0 } - ); - t.end(); -}); - -test('multi', function (t) { - t.same( - optimist.parse([ '-v', 'a', '-v', 'b', '-v', 'c' ]), - { v : ['a','b','c'], _ : [], $0 : $0 } - ); - t.end(); -}); - -test('comprehensive', function (t) { - t.same( - optimist.parse([ - '--name=meowmers', 'bare', '-cats', 'woo', - '-h', 'awesome', '--multi=quux', - '--key', 'value', - '-b', '--bool', '--no-meep', '--multi=baz', - '--', '--not-a-flag', 'eek' - ]), - { - c : true, - a : true, - t : true, - s : 'woo', - h : 'awesome', - b : true, - bool : true, - key : 'value', - multi : [ 'quux', 'baz' ], - meep : false, - name : 'meowmers', - _ : [ 'bare', '--not-a-flag', 'eek' ], - $0 : $0 - } - ); - t.end(); -}); - -test('nums', function (t) { - var argv = optimist.parse([ - '-x', '1234', - '-y', '5.67', - '-z', '1e7', - '-w', '10f', - '--hex', '0xdeadbeef', - '789', - ]); - t.same(argv, { - x : 1234, - y : 5.67, - z : 1e7, - w : '10f', - hex : 0xdeadbeef, - _ : [ 789 ], - $0 : $0 - }); - t.same(typeof argv.x, 'number'); - t.same(typeof argv.y, 'number'); - t.same(typeof argv.z, 'number'); - t.same(typeof argv.w, 'string'); - t.same(typeof argv.hex, 'number'); - t.same(typeof argv._[0], 'number'); - t.end(); -}); - -test('flag boolean', function (t) { - var parse = optimist([ '-t', 'moo' ]).boolean(['t']).argv; - t.same(parse, { t : true, _ : [ 'moo' ], $0 : $0 }); - t.same(typeof parse.t, 'boolean'); - t.end(); -}); - -test('flag boolean value', function (t) { - var parse = optimist(['--verbose', 'false', 'moo', '-t', 'true']) - .boolean(['t', 'verbose']).default('verbose', true).argv; - - t.same(parse, { - verbose: false, - t: true, - _: ['moo'], - $0 : $0 - }); - - t.same(typeof parse.verbose, 'boolean'); - t.same(typeof parse.t, 'boolean'); - t.end(); -}); - -test('flag boolean default false', function (t) { - var parse = optimist(['moo']) - .boolean(['t', 'verbose']) - .default('verbose', false) - .default('t', false).argv; - - t.same(parse, { - verbose: false, - t: false, - _: ['moo'], - $0 : $0 - }); - - t.same(typeof parse.verbose, 'boolean'); - t.same(typeof parse.t, 'boolean'); - t.end(); - -}); - -test('boolean groups', function (t) { - var parse = optimist([ '-x', '-z', 'one', 'two', 'three' ]) - .boolean(['x','y','z']).argv; - - t.same(parse, { - x : true, - y : false, - z : true, - _ : [ 'one', 'two', 'three' ], - $0 : $0 - }); - - t.same(typeof parse.x, 'boolean'); - t.same(typeof parse.y, 'boolean'); - t.same(typeof parse.z, 'boolean'); - t.end(); -}); - -test('newlines in params' , function (t) { - var args = optimist.parse([ '-s', "X\nX" ]) - t.same(args, { _ : [], s : "X\nX", $0 : $0 }); - - // reproduce in bash: - // VALUE="new - // line" - // node program.js --s="$VALUE" - args = optimist.parse([ "--s=X\nX" ]) - t.same(args, { _ : [], s : "X\nX", $0 : $0 }); - t.end(); -}); - -test('strings' , function (t) { - var s = optimist([ '-s', '0001234' ]).string('s').argv.s; - t.same(s, '0001234'); - t.same(typeof s, 'string'); - - var x = optimist([ '-x', '56' ]).string('x').argv.x; - t.same(x, '56'); - t.same(typeof x, 'string'); - t.end(); -}); - -test('stringArgs', function (t) { - var s = optimist([ ' ', ' ' ]).string('_').argv._; - t.same(s.length, 2); - t.same(typeof s[0], 'string'); - t.same(s[0], ' '); - t.same(typeof s[1], 'string'); - t.same(s[1], ' '); - t.end(); -}); - -test('slashBreak', function (t) { - t.same( - optimist.parse([ '-I/foo/bar/baz' ]), - { I : '/foo/bar/baz', _ : [], $0 : $0 } - ); - t.same( - optimist.parse([ '-xyz/foo/bar/baz' ]), - { x : true, y : true, z : '/foo/bar/baz', _ : [], $0 : $0 } - ); - t.end(); -}); - -test('alias', function (t) { - var argv = optimist([ '-f', '11', '--zoom', '55' ]) - .alias('z', 'zoom') - .argv - ; - t.equal(argv.zoom, 55); - t.equal(argv.z, argv.zoom); - t.equal(argv.f, 11); - t.end(); -}); - -test('multiAlias', function (t) { - var argv = optimist([ '-f', '11', '--zoom', '55' ]) - .alias('z', [ 'zm', 'zoom' ]) - .argv - ; - t.equal(argv.zoom, 55); - t.equal(argv.z, argv.zoom); - t.equal(argv.z, argv.zm); - t.equal(argv.f, 11); - t.end(); -}); - -test('boolean default true', function (t) { - var argv = optimist.options({ - sometrue: { - boolean: true, - default: true - } - }).argv; - - t.equal(argv.sometrue, true); - t.end(); -}); - -test('boolean default false', function (t) { - var argv = optimist.options({ - somefalse: { - boolean: true, - default: false - } - }).argv; - - t.equal(argv.somefalse, false); - t.end(); -}); - -test('nested dotted objects', function (t) { - var argv = optimist([ - '--foo.bar', '3', '--foo.baz', '4', - '--foo.quux.quibble', '5', '--foo.quux.o_O', - '--beep.boop' - ]).argv; - - t.same(argv.foo, { - bar : 3, - baz : 4, - quux : { - quibble : 5, - o_O : true - }, - }); - t.same(argv.beep, { boop : true }); - t.end(); -}); - -test('boolean and alias with chainable api', function (t) { - var aliased = [ '-h', 'derp' ]; - var regular = [ '--herp', 'derp' ]; - var opts = { - herp: { alias: 'h', boolean: true } - }; - var aliasedArgv = optimist(aliased) - .boolean('herp') - .alias('h', 'herp') - .argv; - var propertyArgv = optimist(regular) - .boolean('herp') - .alias('h', 'herp') - .argv; - var expected = { - herp: true, - h: true, - '_': [ 'derp' ], - '$0': $0, - }; - - t.same(aliasedArgv, expected); - t.same(propertyArgv, expected); - t.end(); -}); - -test('boolean and alias with options hash', function (t) { - var aliased = [ '-h', 'derp' ]; - var regular = [ '--herp', 'derp' ]; - var opts = { - herp: { alias: 'h', boolean: true } - }; - var aliasedArgv = optimist(aliased) - .options(opts) - .argv; - var propertyArgv = optimist(regular).options(opts).argv; - var expected = { - herp: true, - h: true, - '_': [ 'derp' ], - '$0': $0, - }; - - t.same(aliasedArgv, expected); - t.same(propertyArgv, expected); - - t.end(); -}); - -test('boolean and alias using explicit true', function (t) { - var aliased = [ '-h', 'true' ]; - var regular = [ '--herp', 'true' ]; - var opts = { - herp: { alias: 'h', boolean: true } - }; - var aliasedArgv = optimist(aliased) - .boolean('h') - .alias('h', 'herp') - .argv; - var propertyArgv = optimist(regular) - .boolean('h') - .alias('h', 'herp') - .argv; - var expected = { - herp: true, - h: true, - '_': [ ], - '$0': $0, - }; - - t.same(aliasedArgv, expected); - t.same(propertyArgv, expected); - t.end(); -}); - -// regression, see https://github.com/substack/node-optimist/issues/71 -test('boolean and --x=true', function(t) { - var parsed = optimist(['--boool', '--other=true']).boolean('boool').argv; - - t.same(parsed.boool, true); - t.same(parsed.other, 'true'); - - parsed = optimist(['--boool', '--other=false']).boolean('boool').argv; - - t.same(parsed.boool, true); - t.same(parsed.other, 'false'); - t.end(); -}); diff --git a/node_modules/optimist/test/parse_modified.js b/node_modules/optimist/test/parse_modified.js deleted file mode 100644 index a57dc84e9..000000000 --- a/node_modules/optimist/test/parse_modified.js +++ /dev/null @@ -1,14 +0,0 @@ -var optimist = require('../'); -var test = require('tap').test; - -test('parse with modifier functions' , function (t) { - t.plan(1); - - var argv = optimist().boolean('b').parse([ '-b', '123' ]); - t.deepEqual(fix(argv), { b: true, _: ['123'] }); -}); - -function fix (obj) { - delete obj.$0; - return obj; -} diff --git a/node_modules/optimist/test/short.js b/node_modules/optimist/test/short.js deleted file mode 100644 index b2c38ad84..000000000 --- a/node_modules/optimist/test/short.js +++ /dev/null @@ -1,16 +0,0 @@ -var optimist = require('../index'); -var test = require('tap').test; - -test('-n123', function (t) { - t.plan(1); - var parse = optimist.parse([ '-n123' ]); - t.equal(parse.n, 123); -}); - -test('-123', function (t) { - t.plan(3); - var parse = optimist.parse([ '-123', '456' ]); - t.equal(parse['1'], true); - t.equal(parse['2'], true); - t.equal(parse['3'], 456); -}); diff --git a/node_modules/optimist/test/usage.js b/node_modules/optimist/test/usage.js deleted file mode 100644 index 300454c1e..000000000 --- a/node_modules/optimist/test/usage.js +++ /dev/null @@ -1,292 +0,0 @@ -var Hash = require('hashish'); -var optimist = require('../index'); -var test = require('tap').test; - -test('usageFail', function (t) { - var r = checkUsage(function () { - return optimist('-x 10 -z 20'.split(' ')) - .usage('Usage: $0 -x NUM -y NUM') - .demand(['x','y']) - .argv; - }); - t.same( - r.result, - { x : 10, z : 20, _ : [], $0 : './usage' } - ); - - t.same( - r.errors.join('\n').split(/\n+/), - [ - 'Usage: ./usage -x NUM -y NUM', - 'Options:', - ' -x [required]', - ' -y [required]', - 'Missing required arguments: y', - ] - ); - t.same(r.logs, []); - t.ok(r.exit); - t.end(); -}); - - -test('usagePass', function (t) { - var r = checkUsage(function () { - return optimist('-x 10 -y 20'.split(' ')) - .usage('Usage: $0 -x NUM -y NUM') - .demand(['x','y']) - .argv; - }); - t.same(r, { - result : { x : 10, y : 20, _ : [], $0 : './usage' }, - errors : [], - logs : [], - exit : false, - }); - t.end(); -}); - -test('checkPass', function (t) { - var r = checkUsage(function () { - return optimist('-x 10 -y 20'.split(' ')) - .usage('Usage: $0 -x NUM -y NUM') - .check(function (argv) { - if (!('x' in argv)) throw 'You forgot about -x'; - if (!('y' in argv)) throw 'You forgot about -y'; - }) - .argv; - }); - t.same(r, { - result : { x : 10, y : 20, _ : [], $0 : './usage' }, - errors : [], - logs : [], - exit : false, - }); - t.end(); -}); - -test('checkFail', function (t) { - var r = checkUsage(function () { - return optimist('-x 10 -z 20'.split(' ')) - .usage('Usage: $0 -x NUM -y NUM') - .check(function (argv) { - if (!('x' in argv)) throw 'You forgot about -x'; - if (!('y' in argv)) throw 'You forgot about -y'; - }) - .argv; - }); - - t.same( - r.result, - { x : 10, z : 20, _ : [], $0 : './usage' } - ); - - t.same( - r.errors.join('\n').split(/\n+/), - [ - 'Usage: ./usage -x NUM -y NUM', - 'You forgot about -y' - ] - ); - - t.same(r.logs, []); - t.ok(r.exit); - t.end(); -}); - -test('checkCondPass', function (t) { - function checker (argv) { - return 'x' in argv && 'y' in argv; - } - - var r = checkUsage(function () { - return optimist('-x 10 -y 20'.split(' ')) - .usage('Usage: $0 -x NUM -y NUM') - .check(checker) - .argv; - }); - t.same(r, { - result : { x : 10, y : 20, _ : [], $0 : './usage' }, - errors : [], - logs : [], - exit : false, - }); - t.end(); -}); - -test('checkCondFail', function (t) { - function checker (argv) { - return 'x' in argv && 'y' in argv; - } - - var r = checkUsage(function () { - return optimist('-x 10 -z 20'.split(' ')) - .usage('Usage: $0 -x NUM -y NUM') - .check(checker) - .argv; - }); - - t.same( - r.result, - { x : 10, z : 20, _ : [], $0 : './usage' } - ); - - t.same( - r.errors.join('\n').split(/\n+/).join('\n'), - 'Usage: ./usage -x NUM -y NUM\n' - + 'Argument check failed: ' + checker.toString() - ); - - t.same(r.logs, []); - t.ok(r.exit); - t.end(); -}); - -test('countPass', function (t) { - var r = checkUsage(function () { - return optimist('1 2 3 --moo'.split(' ')) - .usage('Usage: $0 [x] [y] [z] {OPTIONS}') - .demand(3) - .argv; - }); - t.same(r, { - result : { _ : [ '1', '2', '3' ], moo : true, $0 : './usage' }, - errors : [], - logs : [], - exit : false, - }); - t.end(); -}); - -test('countFail', function (t) { - var r = checkUsage(function () { - return optimist('1 2 --moo'.split(' ')) - .usage('Usage: $0 [x] [y] [z] {OPTIONS}') - .demand(3) - .argv; - }); - t.same( - r.result, - { _ : [ '1', '2' ], moo : true, $0 : './usage' } - ); - - t.same( - r.errors.join('\n').split(/\n+/), - [ - 'Usage: ./usage [x] [y] [z] {OPTIONS}', - 'Not enough non-option arguments: got 2, need at least 3', - ] - ); - - t.same(r.logs, []); - t.ok(r.exit); - t.end(); -}); - -test('defaultSingles', function (t) { - var r = checkUsage(function () { - return optimist('--foo 50 --baz 70 --powsy'.split(' ')) - .default('foo', 5) - .default('bar', 6) - .default('baz', 7) - .argv - ; - }); - t.same(r.result, { - foo : '50', - bar : 6, - baz : '70', - powsy : true, - _ : [], - $0 : './usage', - }); - t.end(); -}); - -test('defaultAliases', function (t) { - var r = checkUsage(function () { - return optimist('') - .alias('f', 'foo') - .default('f', 5) - .argv - ; - }); - t.same(r.result, { - f : '5', - foo : '5', - _ : [], - $0 : './usage', - }); - t.end(); -}); - -test('defaultHash', function (t) { - var r = checkUsage(function () { - return optimist('--foo 50 --baz 70'.split(' ')) - .default({ foo : 10, bar : 20, quux : 30 }) - .argv - ; - }); - t.same(r.result, { - _ : [], - $0 : './usage', - foo : 50, - baz : 70, - bar : 20, - quux : 30, - }); - t.end(); -}); - -test('rebase', function (t) { - t.equal( - optimist.rebase('/home/substack', '/home/substack/foo/bar/baz'), - './foo/bar/baz' - ); - t.equal( - optimist.rebase('/home/substack/foo/bar/baz', '/home/substack'), - '../../..' - ); - t.equal( - optimist.rebase('/home/substack/foo', '/home/substack/pow/zoom.txt'), - '../pow/zoom.txt' - ); - t.end(); -}); - -function checkUsage (f) { - - var exit = false; - - process._exit = process.exit; - process._env = process.env; - process._argv = process.argv; - - process.exit = function (t) { exit = true }; - process.env = Hash.merge(process.env, { _ : 'node' }); - process.argv = [ './usage' ]; - - var errors = []; - var logs = []; - - console._error = console.error; - console.error = function (msg) { errors.push(msg) }; - console._log = console.log; - console.log = function (msg) { logs.push(msg) }; - - var result = f(); - - process.exit = process._exit; - process.env = process._env; - process.argv = process._argv; - - console.error = console._error; - console.log = console._log; - - return { - errors : errors, - logs : logs, - exit : exit, - result : result, - }; -}; diff --git a/node_modules/optimist/test/whitespace.js b/node_modules/optimist/test/whitespace.js deleted file mode 100644 index 90b90752c..000000000 --- a/node_modules/optimist/test/whitespace.js +++ /dev/null @@ -1,8 +0,0 @@ -var optimist = require('../'); -var test = require('tap').test; - -test('whitespace should be whitespace' , function (t) { - t.plan(1); - var x = optimist.parse([ '-x', '\t' ]).x; - t.equal(x, '\t'); -}); diff --git a/node_modules/optionator/CHANGELOG.md b/node_modules/optionator/CHANGELOG.md index c0e0cf284..ddaf0b5b0 100644 --- a/node_modules/optionator/CHANGELOG.md +++ b/node_modules/optionator/CHANGELOG.md @@ -1,3 +1,7 @@ +# 0.8.3 +- changes dependency from `wordwrap` to `word-wrap` due to license issue +- update dependencies + # 0.8.2 - fix bug #18 - detect missing value when flag is last item - update dependencies diff --git a/node_modules/optionator/README.md b/node_modules/optionator/README.md index 91c59d379..8e4ba4245 100644 --- a/node_modules/optionator/README.md +++ b/node_modules/optionator/README.md @@ -1,7 +1,7 @@ # Optionator -Optionator is a JavaScript option parsing and help generation library used by [eslint](http://eslint.org), [Grasp](http://graspjs.com), [LiveScript](http://livescript.net), [esmangle](https://github.com/estools/esmangle), [escodegen](https://github.com/estools/escodegen), and [many more](https://www.npmjs.com/browse/depended/optionator). +Optionator is a JavaScript/Node.js option parsing and help generation library used by [eslint](http://eslint.org), [Grasp](http://graspjs.com), [LiveScript](http://livescript.net), [esmangle](https://github.com/estools/esmangle), [escodegen](https://github.com/estools/escodegen), and [many more](https://www.npmjs.com/browse/depended/optionator). For an online demo, check out the [Grasp online demo](http://www.graspjs.com/#demo). @@ -23,12 +23,14 @@ Other helpful features include reformatting the help text based on the size of t ## About Optionator uses [type-check](https://github.com/gkz/type-check) and [levn](https://github.com/gkz/levn) behind the scenes to cast and verify input according the specified types. -MIT license. Version 0.8.2 +MIT license. Version 0.8.3 npm install optionator For updates on Optionator, [follow me on twitter](https://twitter.com/gkzahariev). +Optionator is a Node.js module, but can be used in the browser as well if packed with webpack/browserify. + ## Usage `require('optionator');` returns a function. It has one property, `VERSION`, the current version of the library as a string. This function is called with an object specifying your options and other information, see the [settings format section](#settings-format). This in turn returns an object with three properties, `parse`, `parseArgv`, `generateHelp`, and `generateHelpForOption`, which are all functions. diff --git a/node_modules/optionator/lib/help.js b/node_modules/optionator/lib/help.js index a459c02c2..59e6f9694 100644 --- a/node_modules/optionator/lib/help.js +++ b/node_modules/optionator/lib/help.js @@ -1,9 +1,22 @@ -// Generated by LiveScript 1.5.0 +// Generated by LiveScript 1.6.0 (function(){ - var ref$, id, find, sort, min, max, map, unlines, nameToRaw, dasherize, naturalJoin, wordwrap, getPreText, setHelpStyleDefaults, generateHelpForOption, generateHelp; + var ref$, id, find, sort, min, max, map, unlines, nameToRaw, dasherize, naturalJoin, wordWrap, wordwrap, getPreText, setHelpStyleDefaults, generateHelpForOption, generateHelp; ref$ = require('prelude-ls'), id = ref$.id, find = ref$.find, sort = ref$.sort, min = ref$.min, max = ref$.max, map = ref$.map, unlines = ref$.unlines; ref$ = require('./util'), nameToRaw = ref$.nameToRaw, dasherize = ref$.dasherize, naturalJoin = ref$.naturalJoin; - wordwrap = require('wordwrap'); + wordWrap = require('word-wrap'); + wordwrap = function(a, b){ + var ref$, indent, width; + ref$ = b === undefined + ? ['', a - 1] + : [repeatString$(' ', a), b - a - 1], indent = ref$[0], width = ref$[1]; + return function(text){ + return wordWrap(text, { + indent: indent, + width: width, + trim: true + }); + }; + }; getPreText = function(option, arg$, maxWidth){ var mainName, shortNames, ref$, longNames, type, description, aliasSeparator, typeSeparator, initialIndent, names, namesString, namesStringLen, typeSeparatorString, typeSeparatorStringLen, wrap; mainName = option.option, shortNames = (ref$ = option.shortNames) != null diff --git a/node_modules/optionator/lib/index.js b/node_modules/optionator/lib/index.js index d947286c7..7ce37b23b 100644 --- a/node_modules/optionator/lib/index.js +++ b/node_modules/optionator/lib/index.js @@ -1,7 +1,7 @@ -// Generated by LiveScript 1.5.0 +// Generated by LiveScript 1.6.0 (function(){ - var VERSION, ref$, id, map, compact, any, groupBy, partition, chars, isItNaN, keys, Obj, camelize, deepIs, closestString, nameToRaw, dasherize, naturalJoin, generateHelp, generateHelpForOption, parsedTypeCheck, parseType, parseLevn, camelizeKeys, parseString, main, toString$ = {}.toString, slice$ = [].slice; - VERSION = '0.8.2'; + var VERSION, ref$, id, map, compact, any, groupBy, partition, chars, isItNaN, keys, Obj, camelize, deepIs, closestString, nameToRaw, dasherize, naturalJoin, generateHelp, generateHelpForOption, parsedTypeCheck, parseType, parseLevn, camelizeKeys, parseString, main, toString$ = {}.toString, slice$ = [].slice, arrayFrom$ = Array.from || function(x){return slice$.call(x);}; + VERSION = '0.8.3'; ref$ = require('prelude-ls'), id = ref$.id, map = ref$.map, compact = ref$.compact, any = ref$.any, groupBy = ref$.groupBy, partition = ref$.partition, chars = ref$.chars, isItNaN = ref$.isItNaN, keys = ref$.keys, Obj = ref$.Obj, camelize = ref$.camelize; deepIs = require('deep-is'); ref$ = require('./util'), closestString = ref$.closestString, nameToRaw = ref$.nameToRaw, dasherize = ref$.dasherize, naturalJoin = ref$.naturalJoin; @@ -17,7 +17,7 @@ return resultObj$; }; parseString = function(string){ - var assignOpt, regex, replaceRegex, result, this$ = this; + var assignOpt, regex, replaceRegex, result; assignOpt = '--?[a-zA-Z][-a-z-A-Z0-9]*='; regex = RegExp('(?:' + assignOpt + ')?(?:\'(?:\\\\\'|[^\'])+\'|"(?:\\\\"|[^"])+")|[^\'"\\s]+', 'g'); replaceRegex = RegExp('^(' + assignOpt + ')?[\'"]([\\s\\S]*)[\'"]$'); @@ -44,7 +44,7 @@ libOptions.defaults.mergeRepeatedObjects = libOptions.mergeRepeatedObjects; } traverse = function(options){ - var i$, len$, option, name, k, ref$, v, type, that, e, parsedPossibilities, parsedType, j$, len1$, possibility, rawDependsType, dependsOpts, dependsType, cra, alias, shortNames, longNames, this$ = this; + var i$, len$, option, name, k, ref$, v, type, that, e, parsedPossibilities, parsedType, j$, len1$, possibility, rawDependsType, dependsOpts, dependsType, cra, alias, shortNames, longNames; if (toString$.call(options).slice(8, -1) !== 'Array') { throw new Error('No options defined.'); } @@ -104,7 +104,7 @@ dependsType = rawDependsType.toLowerCase(); if (dependsOpts.length) { if (dependsType === 'and' || dependsType === 'or') { - option.dependsOn = [dependsType].concat(slice$.call(dependsOpts)); + option.dependsOn = [dependsType].concat(arrayFrom$(dependsOpts)); } else { throw new Error("Option '" + name + "': If you have more than one dependency, you must specify either 'and' or 'or'"); } diff --git a/node_modules/optionator/lib/util.js b/node_modules/optionator/lib/util.js index d5c972def..5bc0cbb69 100644 --- a/node_modules/optionator/lib/util.js +++ b/node_modules/optionator/lib/util.js @@ -1,10 +1,10 @@ -// Generated by LiveScript 1.5.0 +// Generated by LiveScript 1.6.0 (function(){ var prelude, map, sortBy, fl, closestString, nameToRaw, dasherize, naturalJoin; prelude = require('prelude-ls'), map = prelude.map, sortBy = prelude.sortBy; fl = require('fast-levenshtein'); closestString = function(possibilities, input){ - var distances, ref$, string, distance, this$ = this; + var distances, ref$, string, distance; if (!possibilities.length) { return; } diff --git a/node_modules/optionator/node_modules/wordwrap/LICENSE b/node_modules/optionator/node_modules/wordwrap/LICENSE deleted file mode 100644 index ee27ba4b4..000000000 --- a/node_modules/optionator/node_modules/wordwrap/LICENSE +++ /dev/null @@ -1,18 +0,0 @@ -This software is released under the MIT license: - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of -the Software, and to permit persons to whom the Software is furnished to do so, -subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS -FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR -COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER -IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/optionator/node_modules/wordwrap/README.markdown b/node_modules/optionator/node_modules/wordwrap/README.markdown deleted file mode 100644 index 346374e0d..000000000 --- a/node_modules/optionator/node_modules/wordwrap/README.markdown +++ /dev/null @@ -1,70 +0,0 @@ -wordwrap -======== - -Wrap your words. - -example -======= - -made out of meat ----------------- - -meat.js - - var wrap = require('wordwrap')(15); - console.log(wrap('You and your whole family are made out of meat.')); - -output: - - You and your - whole family - are made out - of meat. - -centered --------- - -center.js - - var wrap = require('wordwrap')(20, 60); - console.log(wrap( - 'At long last the struggle and tumult was over.' - + ' The machines had finally cast off their oppressors' - + ' and were finally free to roam the cosmos.' - + '\n' - + 'Free of purpose, free of obligation.' - + ' Just drifting through emptiness.' - + ' The sun was just another point of light.' - )); - -output: - - At long last the struggle and tumult - was over. The machines had finally cast - off their oppressors and were finally - free to roam the cosmos. - Free of purpose, free of obligation. - Just drifting through emptiness. The - sun was just another point of light. - -methods -======= - -var wrap = require('wordwrap'); - -wrap(stop), wrap(start, stop, params={mode:"soft"}) ---------------------------------------------------- - -Returns a function that takes a string and returns a new string. - -Pad out lines with spaces out to column `start` and then wrap until column -`stop`. If a word is longer than `stop - start` characters it will overflow. - -In "soft" mode, split chunks by `/(\S+\s+/` and don't break up chunks which are -longer than `stop - start`, in "hard" mode, split chunks with `/\b/` and break -up chunks longer than `stop - start`. - -wrap.hard(start, stop) ----------------------- - -Like `wrap()` but with `params.mode = "hard"`. diff --git a/node_modules/optionator/node_modules/wordwrap/example/center.js b/node_modules/optionator/node_modules/wordwrap/example/center.js deleted file mode 100644 index a3fbaae98..000000000 --- a/node_modules/optionator/node_modules/wordwrap/example/center.js +++ /dev/null @@ -1,10 +0,0 @@ -var wrap = require('wordwrap')(20, 60); -console.log(wrap( - 'At long last the struggle and tumult was over.' - + ' The machines had finally cast off their oppressors' - + ' and were finally free to roam the cosmos.' - + '\n' - + 'Free of purpose, free of obligation.' - + ' Just drifting through emptiness.' - + ' The sun was just another point of light.' -)); diff --git a/node_modules/optionator/node_modules/wordwrap/example/meat.js b/node_modules/optionator/node_modules/wordwrap/example/meat.js deleted file mode 100644 index a4665e105..000000000 --- a/node_modules/optionator/node_modules/wordwrap/example/meat.js +++ /dev/null @@ -1,3 +0,0 @@ -var wrap = require('wordwrap')(15); - -console.log(wrap('You and your whole family are made out of meat.')); diff --git a/node_modules/optionator/node_modules/wordwrap/index.js b/node_modules/optionator/node_modules/wordwrap/index.js deleted file mode 100644 index c9bc94521..000000000 --- a/node_modules/optionator/node_modules/wordwrap/index.js +++ /dev/null @@ -1,76 +0,0 @@ -var wordwrap = module.exports = function (start, stop, params) { - if (typeof start === 'object') { - params = start; - start = params.start; - stop = params.stop; - } - - if (typeof stop === 'object') { - params = stop; - start = start || params.start; - stop = undefined; - } - - if (!stop) { - stop = start; - start = 0; - } - - if (!params) params = {}; - var mode = params.mode || 'soft'; - var re = mode === 'hard' ? /\b/ : /(\S+\s+)/; - - return function (text) { - var chunks = text.toString() - .split(re) - .reduce(function (acc, x) { - if (mode === 'hard') { - for (var i = 0; i < x.length; i += stop - start) { - acc.push(x.slice(i, i + stop - start)); - } - } - else acc.push(x) - return acc; - }, []) - ; - - return chunks.reduce(function (lines, rawChunk) { - if (rawChunk === '') return lines; - - var chunk = rawChunk.replace(/\t/g, ' '); - - var i = lines.length - 1; - if (lines[i].length + chunk.length > stop) { - lines[i] = lines[i].replace(/\s+$/, ''); - - chunk.split(/\n/).forEach(function (c) { - lines.push( - new Array(start + 1).join(' ') - + c.replace(/^\s+/, '') - ); - }); - } - else if (chunk.match(/\n/)) { - var xs = chunk.split(/\n/); - lines[i] += xs.shift(); - xs.forEach(function (c) { - lines.push( - new Array(start + 1).join(' ') - + c.replace(/^\s+/, '') - ); - }); - } - else { - lines[i] += chunk; - } - - return lines; - }, [ new Array(start + 1).join(' ') ]).join('\n'); - }; -}; - -wordwrap.soft = wordwrap; - -wordwrap.hard = function (start, stop) { - return wordwrap(start, stop, { mode : 'hard' }); -}; diff --git a/node_modules/optionator/node_modules/wordwrap/package.json b/node_modules/optionator/node_modules/wordwrap/package.json deleted file mode 100644 index eb0aa8d10..000000000 --- a/node_modules/optionator/node_modules/wordwrap/package.json +++ /dev/null @@ -1,67 +0,0 @@ -{ - "_args": [ - [ - "wordwrap@1.0.0", - "/Users/drew.heavner/Documents/Github/sign-android-release" - ] - ], - "_development": true, - "_from": "wordwrap@1.0.0", - "_id": "wordwrap@1.0.0", - "_inBundle": false, - "_integrity": "sha1-J1hIEIkUVqQXHI0CJkQa3pDLyus=", - "_location": "/optionator/wordwrap", - "_phantomChildren": {}, - "_requested": { - "type": "version", - "registry": true, - "raw": "wordwrap@1.0.0", - "name": "wordwrap", - "escapedName": "wordwrap", - "rawSpec": "1.0.0", - "saveSpec": null, - "fetchSpec": "1.0.0" - }, - "_requiredBy": [ - "/optionator" - ], - "_resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-1.0.0.tgz", - "_spec": "1.0.0", - "_where": "/Users/drew.heavner/Documents/Github/sign-android-release", - "author": { - "name": "James Halliday", - "email": "mail@substack.net", - "url": "http://substack.net" - }, - "bugs": { - "url": "https://github.com/substack/node-wordwrap/issues" - }, - "description": "Wrap those words. Show them at what columns to start and stop.", - "devDependencies": { - "tape": "^4.0.0" - }, - "directories": { - "lib": ".", - "example": "example", - "test": "test" - }, - "homepage": "https://github.com/substack/node-wordwrap#readme", - "keywords": [ - "word", - "wrap", - "rule", - "format", - "column" - ], - "license": "MIT", - "main": "./index.js", - "name": "wordwrap", - "repository": { - "type": "git", - "url": "git://github.com/substack/node-wordwrap.git" - }, - "scripts": { - "test": "expresso" - }, - "version": "1.0.0" -} diff --git a/node_modules/optionator/node_modules/wordwrap/test/break.js b/node_modules/optionator/node_modules/wordwrap/test/break.js deleted file mode 100644 index 7d0e8b54c..000000000 --- a/node_modules/optionator/node_modules/wordwrap/test/break.js +++ /dev/null @@ -1,32 +0,0 @@ -var test = require('tape'); -var wordwrap = require('../'); - -test('hard', function (t) { - var s = 'Assert from {"type":"equal","ok":false,"found":1,"wanted":2,' - + '"stack":[],"id":"b7ddcd4c409de8799542a74d1a04689b",' - + '"browser":"chrome/6.0"}' - ; - var s_ = wordwrap.hard(80)(s); - - var lines = s_.split('\n'); - t.equal(lines.length, 2); - t.ok(lines[0].length < 80); - t.ok(lines[1].length < 80); - - t.equal(s, s_.replace(/\n/g, '')); - t.end(); -}); - -test('break', function (t) { - var s = new Array(55+1).join('a'); - var s_ = wordwrap.hard(20)(s); - - var lines = s_.split('\n'); - t.equal(lines.length, 3); - t.ok(lines[0].length === 20); - t.ok(lines[1].length === 20); - t.ok(lines[2].length === 15); - - t.equal(s, s_.replace(/\n/g, '')); - t.end(); -}); diff --git a/node_modules/optionator/node_modules/wordwrap/test/idleness.txt b/node_modules/optionator/node_modules/wordwrap/test/idleness.txt deleted file mode 100644 index aa3f4907f..000000000 --- a/node_modules/optionator/node_modules/wordwrap/test/idleness.txt +++ /dev/null @@ -1,63 +0,0 @@ -In Praise of Idleness - -By Bertrand Russell - -[1932] - -Like most of my generation, I was brought up on the saying: 'Satan finds some mischief for idle hands to do.' Being a highly virtuous child, I believed all that I was told, and acquired a conscience which has kept me working hard down to the present moment. But although my conscience has controlled my actions, my opinions have undergone a revolution. I think that there is far too much work done in the world, that immense harm is caused by the belief that work is virtuous, and that what needs to be preached in modern industrial countries is quite different from what always has been preached. Everyone knows the story of the traveler in Naples who saw twelve beggars lying in the sun (it was before the days of Mussolini), and offered a lira to the laziest of them. Eleven of them jumped up to claim it, so he gave it to the twelfth. this traveler was on the right lines. But in countries which do not enjoy Mediterranean sunshine idleness is more difficult, and a great public propaganda will be required to inaugurate it. I hope that, after reading the following pages, the leaders of the YMCA will start a campaign to induce good young men to do nothing. If so, I shall not have lived in vain. - -Before advancing my own arguments for laziness, I must dispose of one which I cannot accept. Whenever a person who already has enough to live on proposes to engage in some everyday kind of job, such as school-teaching or typing, he or she is told that such conduct takes the bread out of other people's mouths, and is therefore wicked. If this argument were valid, it would only be necessary for us all to be idle in order that we should all have our mouths full of bread. What people who say such things forget is that what a man earns he usually spends, and in spending he gives employment. As long as a man spends his income, he puts just as much bread into people's mouths in spending as he takes out of other people's mouths in earning. The real villain, from this point of view, is the man who saves. If he merely puts his savings in a stocking, like the proverbial French peasant, it is obvious that they do not give employment. If he invests his savings, the matter is less obvious, and different cases arise. - -One of the commonest things to do with savings is to lend them to some Government. In view of the fact that the bulk of the public expenditure of most civilized Governments consists in payment for past wars or preparation for future wars, the man who lends his money to a Government is in the same position as the bad men in Shakespeare who hire murderers. The net result of the man's economical habits is to increase the armed forces of the State to which he lends his savings. Obviously it would be better if he spent the money, even if he spent it in drink or gambling. - -But, I shall be told, the case is quite different when savings are invested in industrial enterprises. When such enterprises succeed, and produce something useful, this may be conceded. In these days, however, no one will deny that most enterprises fail. That means that a large amount of human labor, which might have been devoted to producing something that could be enjoyed, was expended on producing machines which, when produced, lay idle and did no good to anyone. The man who invests his savings in a concern that goes bankrupt is therefore injuring others as well as himself. If he spent his money, say, in giving parties for his friends, they (we may hope) would get pleasure, and so would all those upon whom he spent money, such as the butcher, the baker, and the bootlegger. But if he spends it (let us say) upon laying down rails for surface card in some place where surface cars turn out not to be wanted, he has diverted a mass of labor into channels where it gives pleasure to no one. Nevertheless, when he becomes poor through failure of his investment he will be regarded as a victim of undeserved misfortune, whereas the gay spendthrift, who has spent his money philanthropically, will be despised as a fool and a frivolous person. - -All this is only preliminary. I want to say, in all seriousness, that a great deal of harm is being done in the modern world by belief in the virtuousness of work, and that the road to happiness and prosperity lies in an organized diminution of work. - -First of all: what is work? Work is of two kinds: first, altering the position of matter at or near the earth's surface relatively to other such matter; second, telling other people to do so. The first kind is unpleasant and ill paid; the second is pleasant and highly paid. The second kind is capable of indefinite extension: there are not only those who give orders, but those who give advice as to what orders should be given. Usually two opposite kinds of advice are given simultaneously by two organized bodies of men; this is called politics. The skill required for this kind of work is not knowledge of the subjects as to which advice is given, but knowledge of the art of persuasive speaking and writing, i.e. of advertising. - -Throughout Europe, though not in America, there is a third class of men, more respected than either of the classes of workers. There are men who, through ownership of land, are able to make others pay for the privilege of being allowed to exist and to work. These landowners are idle, and I might therefore be expected to praise them. Unfortunately, their idleness is only rendered possible by the industry of others; indeed their desire for comfortable idleness is historically the source of the whole gospel of work. The last thing they have ever wished is that others should follow their example. - -From the beginning of civilization until the Industrial Revolution, a man could, as a rule, produce by hard work little more than was required for the subsistence of himself and his family, although his wife worked at least as hard as he did, and his children added their labor as soon as they were old enough to do so. The small surplus above bare necessaries was not left to those who produced it, but was appropriated by warriors and priests. In times of famine there was no surplus; the warriors and priests, however, still secured as much as at other times, with the result that many of the workers died of hunger. This system persisted in Russia until 1917 [1], and still persists in the East; in England, in spite of the Industrial Revolution, it remained in full force throughout the Napoleonic wars, and until a hundred years ago, when the new class of manufacturers acquired power. In America, the system came to an end with the Revolution, except in the South, where it persisted until the Civil War. A system which lasted so long and ended so recently has naturally left a profound impress upon men's thoughts and opinions. Much that we take for granted about the desirability of work is derived from this system, and, being pre-industrial, is not adapted to the modern world. Modern technique has made it possible for leisure, within limits, to be not the prerogative of small privileged classes, but a right evenly distributed throughout the community. The morality of work is the morality of slaves, and the modern world has no need of slavery. - -It is obvious that, in primitive communities, peasants, left to themselves, would not have parted with the slender surplus upon which the warriors and priests subsisted, but would have either produced less or consumed more. At first, sheer force compelled them to produce and part with the surplus. Gradually, however, it was found possible to induce many of them to accept an ethic according to which it was their duty to work hard, although part of their work went to support others in idleness. By this means the amount of compulsion required was lessened, and the expenses of government were diminished. To this day, 99 per cent of British wage-earners would be genuinely shocked if it were proposed that the King should not have a larger income than a working man. The conception of duty, speaking historically, has been a means used by the holders of power to induce others to live for the interests of their masters rather than for their own. Of course the holders of power conceal this fact from themselves by managing to believe that their interests are identical with the larger interests of humanity. Sometimes this is true; Athenian slave-owners, for instance, employed part of their leisure in making a permanent contribution to civilization which would have been impossible under a just economic system. Leisure is essential to civilization, and in former times leisure for the few was only rendered possible by the labors of the many. But their labors were valuable, not because work is good, but because leisure is good. And with modern technique it would be possible to distribute leisure justly without injury to civilization. - -Modern technique has made it possible to diminish enormously the amount of labor required to secure the necessaries of life for everyone. This was made obvious during the war. At that time all the men in the armed forces, and all the men and women engaged in the production of munitions, all the men and women engaged in spying, war propaganda, or Government offices connected with the war, were withdrawn from productive occupations. In spite of this, the general level of well-being among unskilled wage-earners on the side of the Allies was higher than before or since. The significance of this fact was concealed by finance: borrowing made it appear as if the future was nourishing the present. But that, of course, would have been impossible; a man cannot eat a loaf of bread that does not yet exist. The war showed conclusively that, by the scientific organization of production, it is possible to keep modern populations in fair comfort on a small part of the working capacity of the modern world. If, at the end of the war, the scientific organization, which had been created in order to liberate men for fighting and munition work, had been preserved, and the hours of the week had been cut down to four, all would have been well. Instead of that the old chaos was restored, those whose work was demanded were made to work long hours, and the rest were left to starve as unemployed. Why? Because work is a duty, and a man should not receive wages in proportion to what he has produced, but in proportion to his virtue as exemplified by his industry. - -This is the morality of the Slave State, applied in circumstances totally unlike those in which it arose. No wonder the result has been disastrous. Let us take an illustration. Suppose that, at a given moment, a certain number of people are engaged in the manufacture of pins. They make as many pins as the world needs, working (say) eight hours a day. Someone makes an invention by which the same number of men can make twice as many pins: pins are already so cheap that hardly any more will be bought at a lower price. In a sensible world, everybody concerned in the manufacturing of pins would take to working four hours instead of eight, and everything else would go on as before. But in the actual world this would be thought demoralizing. The men still work eight hours, there are too many pins, some employers go bankrupt, and half the men previously concerned in making pins are thrown out of work. There is, in the end, just as much leisure as on the other plan, but half the men are totally idle while half are still overworked. In this way, it is insured that the unavoidable leisure shall cause misery all round instead of being a universal source of happiness. Can anything more insane be imagined? - -The idea that the poor should have leisure has always been shocking to the rich. In England, in the early nineteenth century, fifteen hours was the ordinary day's work for a man; children sometimes did as much, and very commonly did twelve hours a day. When meddlesome busybodies suggested that perhaps these hours were rather long, they were told that work kept adults from drink and children from mischief. When I was a child, shortly after urban working men had acquired the vote, certain public holidays were established by law, to the great indignation of the upper classes. I remember hearing an old Duchess say: 'What do the poor want with holidays? They ought to work.' People nowadays are less frank, but the sentiment persists, and is the source of much of our economic confusion. - -Let us, for a moment, consider the ethics of work frankly, without superstition. Every human being, of necessity, consumes, in the course of his life, a certain amount of the produce of human labor. Assuming, as we may, that labor is on the whole disagreeable, it is unjust that a man should consume more than he produces. Of course he may provide services rather than commodities, like a medical man, for example; but he should provide something in return for his board and lodging. to this extent, the duty of work must be admitted, but to this extent only. - -I shall not dwell upon the fact that, in all modern societies outside the USSR, many people escape even this minimum amount of work, namely all those who inherit money and all those who marry money. I do not think the fact that these people are allowed to be idle is nearly so harmful as the fact that wage-earners are expected to overwork or starve. - -If the ordinary wage-earner worked four hours a day, there would be enough for everybody and no unemployment -- assuming a certain very moderate amount of sensible organization. This idea shocks the well-to-do, because they are convinced that the poor would not know how to use so much leisure. In America men often work long hours even when they are well off; such men, naturally, are indignant at the idea of leisure for wage-earners, except as the grim punishment of unemployment; in fact, they dislike leisure even for their sons. Oddly enough, while they wish their sons to work so hard as to have no time to be civilized, they do not mind their wives and daughters having no work at all. the snobbish admiration of uselessness, which, in an aristocratic society, extends to both sexes, is, under a plutocracy, confined to women; this, however, does not make it any more in agreement with common sense. - -The wise use of leisure, it must be conceded, is a product of civilization and education. A man who has worked long hours all his life will become bored if he becomes suddenly idle. But without a considerable amount of leisure a man is cut off from many of the best things. There is no longer any reason why the bulk of the population should suffer this deprivation; only a foolish asceticism, usually vicarious, makes us continue to insist on work in excessive quantities now that the need no longer exists. - -In the new creed which controls the government of Russia, while there is much that is very different from the traditional teaching of the West, there are some things that are quite unchanged. The attitude of the governing classes, and especially of those who conduct educational propaganda, on the subject of the dignity of labor, is almost exactly that which the governing classes of the world have always preached to what were called the 'honest poor'. Industry, sobriety, willingness to work long hours for distant advantages, even submissiveness to authority, all these reappear; moreover authority still represents the will of the Ruler of the Universe, Who, however, is now called by a new name, Dialectical Materialism. - -The victory of the proletariat in Russia has some points in common with the victory of the feminists in some other countries. For ages, men had conceded the superior saintliness of women, and had consoled women for their inferiority by maintaining that saintliness is more desirable than power. At last the feminists decided that they would have both, since the pioneers among them believed all that the men had told them about the desirability of virtue, but not what they had told them about the worthlessness of political power. A similar thing has happened in Russia as regards manual work. For ages, the rich and their sycophants have written in praise of 'honest toil', have praised the simple life, have professed a religion which teaches that the poor are much more likely to go to heaven than the rich, and in general have tried to make manual workers believe that there is some special nobility about altering the position of matter in space, just as men tried to make women believe that they derived some special nobility from their sexual enslavement. In Russia, all this teaching about the excellence of manual work has been taken seriously, with the result that the manual worker is more honored than anyone else. What are, in essence, revivalist appeals are made, but not for the old purposes: they are made to secure shock workers for special tasks. Manual work is the ideal which is held before the young, and is the basis of all ethical teaching. - -For the present, possibly, this is all to the good. A large country, full of natural resources, awaits development, and has has to be developed with very little use of credit. In these circumstances, hard work is necessary, and is likely to bring a great reward. But what will happen when the point has been reached where everybody could be comfortable without working long hours? - -In the West, we have various ways of dealing with this problem. We have no attempt at economic justice, so that a large proportion of the total produce goes to a small minority of the population, many of whom do no work at all. Owing to the absence of any central control over production, we produce hosts of things that are not wanted. We keep a large percentage of the working population idle, because we can dispense with their labor by making the others overwork. When all these methods prove inadequate, we have a war: we cause a number of people to manufacture high explosives, and a number of others to explode them, as if we were children who had just discovered fireworks. By a combination of all these devices we manage, though with difficulty, to keep alive the notion that a great deal of severe manual work must be the lot of the average man. - -In Russia, owing to more economic justice and central control over production, the problem will have to be differently solved. the rational solution would be, as soon as the necessaries and elementary comforts can be provided for all, to reduce the hours of labor gradually, allowing a popular vote to decide, at each stage, whether more leisure or more goods were to be preferred. But, having taught the supreme virtue of hard work, it is difficult to see how the authorities can aim at a paradise in which there will be much leisure and little work. It seems more likely that they will find continually fresh schemes, by which present leisure is to be sacrificed to future productivity. I read recently of an ingenious plan put forward by Russian engineers, for making the White Sea and the northern coasts of Siberia warm, by putting a dam across the Kara Sea. An admirable project, but liable to postpone proletarian comfort for a generation, while the nobility of toil is being displayed amid the ice-fields and snowstorms of the Arctic Ocean. This sort of thing, if it happens, will be the result of regarding the virtue of hard work as an end in itself, rather than as a means to a state of affairs in which it is no longer needed. - -The fact is that moving matter about, while a certain amount of it is necessary to our existence, is emphatically not one of the ends of human life. If it were, we should have to consider every navvy superior to Shakespeare. We have been misled in this matter by two causes. One is the necessity of keeping the poor contented, which has led the rich, for thousands of years, to preach the dignity of labor, while taking care themselves to remain undignified in this respect. The other is the new pleasure in mechanism, which makes us delight in the astonishingly clever changes that we can produce on the earth's surface. Neither of these motives makes any great appeal to the actual worker. If you ask him what he thinks the best part of his life, he is not likely to say: 'I enjoy manual work because it makes me feel that I am fulfilling man's noblest task, and because I like to think how much man can transform his planet. It is true that my body demands periods of rest, which I have to fill in as best I may, but I am never so happy as when the morning comes and I can return to the toil from which my contentment springs.' I have never heard working men say this sort of thing. They consider work, as it should be considered, a necessary means to a livelihood, and it is from their leisure that they derive whatever happiness they may enjoy. - -It will be said that, while a little leisure is pleasant, men would not know how to fill their days if they had only four hours of work out of the twenty-four. In so far as this is true in the modern world, it is a condemnation of our civilization; it would not have been true at any earlier period. There was formerly a capacity for light-heartedness and play which has been to some extent inhibited by the cult of efficiency. The modern man thinks that everything ought to be done for the sake of something else, and never for its own sake. Serious-minded persons, for example, are continually condemning the habit of going to the cinema, and telling us that it leads the young into crime. But all the work that goes to producing a cinema is respectable, because it is work, and because it brings a money profit. The notion that the desirable activities are those that bring a profit has made everything topsy-turvy. The butcher who provides you with meat and the baker who provides you with bread are praiseworthy, because they are making money; but when you enjoy the food they have provided, you are merely frivolous, unless you eat only to get strength for your work. Broadly speaking, it is held that getting money is good and spending money is bad. Seeing that they are two sides of one transaction, this is absurd; one might as well maintain that keys are good, but keyholes are bad. Whatever merit there may be in the production of goods must be entirely derivative from the advantage to be obtained by consuming them. The individual, in our society, works for profit; but the social purpose of his work lies in the consumption of what he produces. It is this divorce between the individual and the social purpose of production that makes it so difficult for men to think clearly in a world in which profit-making is the incentive to industry. We think too much of production, and too little of consumption. One result is that we attach too little importance to enjoyment and simple happiness, and that we do not judge production by the pleasure that it gives to the consumer. - -When I suggest that working hours should be reduced to four, I am not meaning to imply that all the remaining time should necessarily be spent in pure frivolity. I mean that four hours' work a day should entitle a man to the necessities and elementary comforts of life, and that the rest of his time should be his to use as he might see fit. It is an essential part of any such social system that education should be carried further than it usually is at present, and should aim, in part, at providing tastes which would enable a man to use leisure intelligently. I am not thinking mainly of the sort of things that would be considered 'highbrow'. Peasant dances have died out except in remote rural areas, but the impulses which caused them to be cultivated must still exist in human nature. The pleasures of urban populations have become mainly passive: seeing cinemas, watching football matches, listening to the radio, and so on. This results from the fact that their active energies are fully taken up with work; if they had more leisure, they would again enjoy pleasures in which they took an active part. - -In the past, there was a small leisure class and a larger working class. The leisure class enjoyed advantages for which there was no basis in social justice; this necessarily made it oppressive, limited its sympathies, and caused it to invent theories by which to justify its privileges. These facts greatly diminished its excellence, but in spite of this drawback it contributed nearly the whole of what we call civilization. It cultivated the arts and discovered the sciences; it wrote the books, invented the philosophies, and refined social relations. Even the liberation of the oppressed has usually been inaugurated from above. Without the leisure class, mankind would never have emerged from barbarism. - -The method of a leisure class without duties was, however, extraordinarily wasteful. None of the members of the class had to be taught to be industrious, and the class as a whole was not exceptionally intelligent. The class might produce one Darwin, but against him had to be set tens of thousands of country gentlemen who never thought of anything more intelligent than fox-hunting and punishing poachers. At present, the universities are supposed to provide, in a more systematic way, what the leisure class provided accidentally and as a by-product. This is a great improvement, but it has certain drawbacks. University life is so different from life in the world at large that men who live in academic milieu tend to be unaware of the preoccupations and problems of ordinary men and women; moreover their ways of expressing themselves are usually such as to rob their opinions of the influence that they ought to have upon the general public. Another disadvantage is that in universities studies are organized, and the man who thinks of some original line of research is likely to be discouraged. Academic institutions, therefore, useful as they are, are not adequate guardians of the interests of civilization in a world where everyone outside their walls is too busy for unutilitarian pursuits. - -In a world where no one is compelled to work more than four hours a day, every person possessed of scientific curiosity will be able to indulge it, and every painter will be able to paint without starving, however excellent his pictures may be. Young writers will not be obliged to draw attention to themselves by sensational pot-boilers, with a view to acquiring the economic independence needed for monumental works, for which, when the time at last comes, they will have lost the taste and capacity. Men who, in their professional work, have become interested in some phase of economics or government, will be able to develop their ideas without the academic detachment that makes the work of university economists often seem lacking in reality. Medical men will have the time to learn about the progress of medicine, teachers will not be exasperatedly struggling to teach by routine methods things which they learnt in their youth, which may, in the interval, have been proved to be untrue. - -Above all, there will be happiness and joy of life, instead of frayed nerves, weariness, and dyspepsia. The work exacted will be enough to make leisure delightful, but not enough to produce exhaustion. Since men will not be tired in their spare time, they will not demand only such amusements as are passive and vapid. At least one per cent will probably devote the time not spent in professional work to pursuits of some public importance, and, since they will not depend upon these pursuits for their livelihood, their originality will be unhampered, and there will be no need to conform to the standards set by elderly pundits. But it is not only in these exceptional cases that the advantages of leisure will appear. Ordinary men and women, having the opportunity of a happy life, will become more kindly and less persecuting and less inclined to view others with suspicion. The taste for war will die out, partly for this reason, and partly because it will involve long and severe work for all. Good nature is, of all moral qualities, the one that the world needs most, and good nature is the result of ease and security, not of a life of arduous struggle. Modern methods of production have given us the possibility of ease and security for all; we have chosen, instead, to have overwork for some and starvation for others. Hitherto we have continued to be as energetic as we were before there were machines; in this we have been foolish, but there is no reason to go on being foolish forever. - -[1] Since then, members of the Communist Party have succeeded to this privilege of the warriors and priests. diff --git a/node_modules/optionator/node_modules/wordwrap/test/wrap.js b/node_modules/optionator/node_modules/wordwrap/test/wrap.js deleted file mode 100644 index 01ea47185..000000000 --- a/node_modules/optionator/node_modules/wordwrap/test/wrap.js +++ /dev/null @@ -1,33 +0,0 @@ -var test = require('tape'); -var wordwrap = require('../'); - -var fs = require('fs'); -var idleness = fs.readFileSync(__dirname + '/idleness.txt', 'utf8'); - -test('stop80', function (t) { - var lines = wordwrap(80)(idleness).split(/\n/); - var words = idleness.split(/\s+/); - - lines.forEach(function (line) { - t.ok(line.length <= 80, 'line > 80 columns'); - var chunks = line.match(/\S/) ? line.split(/\s+/) : []; - t.deepEqual(chunks, words.splice(0, chunks.length)); - }); - t.end(); -}); - -test('start20stop60', function (t) { - var lines = wordwrap(20, 100)(idleness).split(/\n/); - var words = idleness.split(/\s+/); - - lines.forEach(function (line) { - t.ok(line.length <= 100, 'line > 100 columns'); - var chunks = line - .split(/\s+/) - .filter(function (x) { return x.match(/\S/) }) - ; - t.deepEqual(chunks, words.splice(0, chunks.length)); - t.deepEqual(line.slice(0, 20), new Array(20 + 1).join(' ')); - }); - t.end(); -}); diff --git a/node_modules/optionator/package.json b/node_modules/optionator/package.json index 89249c436..98ba41691 100644 --- a/node_modules/optionator/package.json +++ b/node_modules/optionator/package.json @@ -1,33 +1,27 @@ { - "_args": [ - [ - "optionator@0.8.2", - "/Users/drew.heavner/Documents/Github/sign-android-release" - ] - ], - "_development": true, - "_from": "optionator@0.8.2", - "_id": "optionator@0.8.2", + "_from": "optionator@^0.8.1", + "_id": "optionator@0.8.3", "_inBundle": false, - "_integrity": "sha1-NkxeQJ0/TWMB1sC0wFu6UBgK62Q=", + "_integrity": "sha512-+IW9pACdk3XWmmTXG8m3upGUJst5XRGzxMRjXzAuJ1XnIFNvfhjjIuYkDvysnPQ7qzqVzLt78BCruntqRhWQbA==", "_location": "/optionator", "_phantomChildren": {}, "_requested": { - "type": "version", + "type": "range", "registry": true, - "raw": "optionator@0.8.2", + "raw": "optionator@^0.8.1", "name": "optionator", "escapedName": "optionator", - "rawSpec": "0.8.2", + "rawSpec": "^0.8.1", "saveSpec": null, - "fetchSpec": "0.8.2" + "fetchSpec": "^0.8.1" }, "_requiredBy": [ "/escodegen" ], - "_resolved": "https://registry.npmjs.org/optionator/-/optionator-0.8.2.tgz", - "_spec": "0.8.2", - "_where": "/Users/drew.heavner/Documents/Github/sign-android-release", + "_resolved": "https://registry.npmjs.org/optionator/-/optionator-0.8.3.tgz", + "_shasum": "84fa1d036fe9d3c7e21d99884b601167ec8fb495", + "_spec": "optionator@^0.8.1", + "_where": "/Users/drew.heavner/Documents/Github/sign-android-release/node_modules/escodegen", "author": { "name": "George Zahariev", "email": "z@georgezahariev.com" @@ -35,19 +29,21 @@ "bugs": { "url": "https://github.com/gkz/optionator/issues" }, + "bundleDependencies": false, "dependencies": { "deep-is": "~0.1.3", - "fast-levenshtein": "~2.0.4", + "fast-levenshtein": "~2.0.6", "levn": "~0.3.0", "prelude-ls": "~1.1.2", "type-check": "~0.3.2", - "wordwrap": "~1.0.0" + "word-wrap": "~1.2.3" }, + "deprecated": false, "description": "option parsing and help generation", "devDependencies": { - "istanbul": "~0.4.1", - "livescript": "~1.5.0", - "mocha": "~3.0.2" + "istanbul": "~0.4.5", + "livescript": "~1.6.0", + "mocha": "~6.2.2" }, "engines": { "node": ">= 0.8.0" @@ -74,5 +70,5 @@ "scripts": { "test": "make test" }, - "version": "0.8.2" + "version": "0.8.3" } diff --git a/node_modules/os-locale/index.js b/node_modules/os-locale/index.js deleted file mode 100644 index 8c73c99f2..000000000 --- a/node_modules/os-locale/index.js +++ /dev/null @@ -1,114 +0,0 @@ -'use strict'; -const execa = require('execa'); -const lcid = require('lcid'); -const mem = require('mem'); - -const defaultOptions = {spawn: true}; -const defaultLocale = 'en_US'; - -function getEnvLocale(env = process.env) { - return env.LC_ALL || env.LC_MESSAGES || env.LANG || env.LANGUAGE; -} - -function parseLocale(string) { - const env = string.split('\n').reduce((env, def) => { - const [key, value] = def.split('='); - env[key] = value.replace(/^"|"$/g, ''); - return env; - }, {}); - - return getEnvLocale(env); -} - -function getLocale(string) { - return (string && string.replace(/[.:].*/, '')); -} - -function getLocales() { - return execa.stdout('locale', ['-a']); -} - -function getLocalesSync() { - return execa.sync('locale', ['-a']).stdout; -} - -function getSupportedLocale(locale, locales = '') { - return locales.includes(locale) ? locale : defaultLocale; -} - -function getAppleLocale() { - return Promise.all([ - execa.stdout('defaults', ['read', '-globalDomain', 'AppleLocale']), - getLocales() - ]).then(results => getSupportedLocale(results[0], results[1])); -} - -function getAppleLocaleSync() { - return getSupportedLocale( - execa.sync('defaults', ['read', '-globalDomain', 'AppleLocale']).stdout, - getLocalesSync() - ); -} - -function getUnixLocale() { - if (process.platform === 'darwin') { - return getAppleLocale(); - } - - return execa.stdout('locale') - .then(stdout => getLocale(parseLocale(stdout))); -} - -function getUnixLocaleSync() { - if (process.platform === 'darwin') { - return getAppleLocaleSync(); - } - - return getLocale(parseLocale(execa.sync('locale').stdout)); -} - -function getWinLocale() { - return execa.stdout('wmic', ['os', 'get', 'locale']) - .then(stdout => { - const lcidCode = parseInt(stdout.replace('Locale', ''), 16); - return lcid.from(lcidCode); - }); -} - -function getWinLocaleSync() { - const {stdout} = execa.sync('wmic', ['os', 'get', 'locale']); - const lcidCode = parseInt(stdout.replace('Locale', ''), 16); - return lcid.from(lcidCode); -} - -module.exports = mem((options = defaultOptions) => { - const envLocale = getEnvLocale(); - - let thenable; - if (envLocale || options.spawn === false) { - thenable = Promise.resolve(getLocale(envLocale)); - } else if (process.platform === 'win32') { - thenable = getWinLocale(); - } else { - thenable = getUnixLocale(); - } - - return thenable - .then(locale => locale || defaultLocale) - .catch(() => defaultLocale); -}); - -module.exports.sync = mem((options = defaultOptions) => { - const envLocale = getEnvLocale(); - - let res; - if (envLocale || options.spawn === false) { - res = getLocale(envLocale); - } else { - try { - res = process.platform === 'win32' ? getWinLocaleSync() : getUnixLocaleSync(); - } catch (_) {} - } - - return res || defaultLocale; -}); diff --git a/node_modules/os-locale/license b/node_modules/os-locale/license deleted file mode 100644 index e7af2f771..000000000 --- a/node_modules/os-locale/license +++ /dev/null @@ -1,9 +0,0 @@ -MIT License - -Copyright (c) Sindre Sorhus (sindresorhus.com) - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/os-locale/package.json b/node_modules/os-locale/package.json deleted file mode 100644 index b41a6d3b3..000000000 --- a/node_modules/os-locale/package.json +++ /dev/null @@ -1,81 +0,0 @@ -{ - "_args": [ - [ - "os-locale@3.1.0", - "/Users/drew.heavner/Documents/Github/sign-android-release" - ] - ], - "_development": true, - "_from": "os-locale@3.1.0", - "_id": "os-locale@3.1.0", - "_inBundle": false, - "_integrity": "sha512-Z8l3R4wYWM40/52Z+S265okfFj8Kt2cC2MKY+xNi3kFs+XGI7WXu/I309QQQYbRW4ijiZ+yxs9pqEhJh0DqW3Q==", - "_location": "/os-locale", - "_phantomChildren": {}, - "_requested": { - "type": "version", - "registry": true, - "raw": "os-locale@3.1.0", - "name": "os-locale", - "escapedName": "os-locale", - "rawSpec": "3.1.0", - "saveSpec": null, - "fetchSpec": "3.1.0" - }, - "_requiredBy": [ - "/yargs" - ], - "_resolved": "https://registry.npmjs.org/os-locale/-/os-locale-3.1.0.tgz", - "_spec": "3.1.0", - "_where": "/Users/drew.heavner/Documents/Github/sign-android-release", - "author": { - "name": "Sindre Sorhus", - "email": "sindresorhus@gmail.com", - "url": "sindresorhus.com" - }, - "bugs": { - "url": "https://github.com/sindresorhus/os-locale/issues" - }, - "dependencies": { - "execa": "^1.0.0", - "lcid": "^2.0.0", - "mem": "^4.0.0" - }, - "description": "Get the system locale", - "devDependencies": { - "ava": "^1.0.1", - "import-fresh": "^3.0.0", - "xo": "^0.23.0" - }, - "engines": { - "node": ">=6" - }, - "files": [ - "index.js" - ], - "homepage": "https://github.com/sindresorhus/os-locale#readme", - "keywords": [ - "locale", - "lang", - "language", - "system", - "os", - "string", - "str", - "user", - "country", - "id", - "identifier", - "region" - ], - "license": "MIT", - "name": "os-locale", - "repository": { - "type": "git", - "url": "git+https://github.com/sindresorhus/os-locale.git" - }, - "scripts": { - "test": "xo && ava" - }, - "version": "3.1.0" -} diff --git a/node_modules/os-locale/readme.md b/node_modules/os-locale/readme.md deleted file mode 100644 index 8f9c280ee..000000000 --- a/node_modules/os-locale/readme.md +++ /dev/null @@ -1,71 +0,0 @@ -# os-locale [![Build Status](https://travis-ci.org/sindresorhus/os-locale.svg?branch=master)](https://travis-ci.org/sindresorhus/os-locale) - -> Get the system [locale](https://en.wikipedia.org/wiki/Locale_(computer_software)) - -Useful for localizing your module or app. - -POSIX systems: The returned locale refers to the [`LC_MESSAGE`](http://www.gnu.org/software/libc/manual/html_node/Locale-Categories.html#Locale-Categories) category, suitable for selecting the language used in the user interface for message translation. - ---- - -
- - Get professional support for 'os-locale' with a Tidelift subscription - -
- - Tidelift helps make open source sustainable for maintainers while giving companies
assurances about security, maintenance, and licensing for their dependencies. -
-
- ---- - -## Install - -``` -$ npm install os-locale -``` - - -## Usage - -```js -const osLocale = require('os-locale'); - -(async () => { - console.log(await osLocale()); - //=> 'en_US' -})(); -``` - - -## API - -### osLocale([options]) - -Returns a `Promise` for the locale. - -### osLocale.sync([options]) - -Returns the locale. - -#### options - -Type: `Object` - -##### spawn - -Type: `boolean`
-Default: `true` - -Set to `false` to avoid spawning subprocesses and instead only resolve the locale from environment variables. - - -## Security - -To report a security vulnerability, please use the [Tidelift security contact](https://tidelift.com/security). Tidelift will coordinate the fix and disclosure. - - -## License - -MIT © [Sindre Sorhus](https://sindresorhus.com) diff --git a/node_modules/p-defer/index.js b/node_modules/p-defer/index.js deleted file mode 100644 index eaef75e4e..000000000 --- a/node_modules/p-defer/index.js +++ /dev/null @@ -1,11 +0,0 @@ -'use strict'; -module.exports = () => { - const ret = {}; - - ret.promise = new Promise((resolve, reject) => { - ret.resolve = resolve; - ret.reject = reject; - }); - - return ret; -}; diff --git a/node_modules/p-defer/license b/node_modules/p-defer/license deleted file mode 100644 index 654d0bfe9..000000000 --- a/node_modules/p-defer/license +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) Sindre Sorhus (sindresorhus.com) - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/node_modules/p-defer/package.json b/node_modules/p-defer/package.json deleted file mode 100644 index 5e76da99e..000000000 --- a/node_modules/p-defer/package.json +++ /dev/null @@ -1,77 +0,0 @@ -{ - "_args": [ - [ - "p-defer@1.0.0", - "/Users/drew.heavner/Documents/Github/sign-android-release" - ] - ], - "_development": true, - "_from": "p-defer@1.0.0", - "_id": "p-defer@1.0.0", - "_inBundle": false, - "_integrity": "sha1-n26xgvbJqozXQwBKfU+WsZaw+ww=", - "_location": "/p-defer", - "_phantomChildren": {}, - "_requested": { - "type": "version", - "registry": true, - "raw": "p-defer@1.0.0", - "name": "p-defer", - "escapedName": "p-defer", - "rawSpec": "1.0.0", - "saveSpec": null, - "fetchSpec": "1.0.0" - }, - "_requiredBy": [ - "/map-age-cleaner" - ], - "_resolved": "https://registry.npmjs.org/p-defer/-/p-defer-1.0.0.tgz", - "_spec": "1.0.0", - "_where": "/Users/drew.heavner/Documents/Github/sign-android-release", - "author": { - "name": "Sindre Sorhus", - "email": "sindresorhus@gmail.com", - "url": "sindresorhus.com" - }, - "bugs": { - "url": "https://github.com/sindresorhus/p-defer/issues" - }, - "description": "Create a deferred promise", - "devDependencies": { - "ava": "*", - "xo": "*" - }, - "engines": { - "node": ">=4" - }, - "files": [ - "index.js" - ], - "homepage": "https://github.com/sindresorhus/p-defer#readme", - "keywords": [ - "promise", - "defer", - "deferred", - "resolve", - "reject", - "lazy", - "later", - "async", - "await", - "promises", - "bluebird" - ], - "license": "MIT", - "name": "p-defer", - "repository": { - "type": "git", - "url": "git+https://github.com/sindresorhus/p-defer.git" - }, - "scripts": { - "test": "xo && ava" - }, - "version": "1.0.0", - "xo": { - "esnext": true - } -} diff --git a/node_modules/p-defer/readme.md b/node_modules/p-defer/readme.md deleted file mode 100644 index b94f13712..000000000 --- a/node_modules/p-defer/readme.md +++ /dev/null @@ -1,47 +0,0 @@ -# p-defer [![Build Status](https://travis-ci.org/sindresorhus/p-defer.svg?branch=master)](https://travis-ci.org/sindresorhus/p-defer) - -> Create a deferred promise - -[**Don't use this unless you know what you're doing!**](https://github.com/petkaantonov/bluebird/wiki/Promise-anti-patterns#the-deferred-anti-pattern) Prefer the `Promise` constructor. - - -## Install - -``` -$ npm install --save p-defer -``` - - -## Usage - -```js -const pDefer = require('p-defer'); - -function delay(ms) { - const deferred = pDefer(); - setTimeout(deferred.resolve, ms, '🦄'); - return deferred.promise; -} - -delay(100).then(console.log); -//=> '🦄' -``` - -*The above is just an example. Use [`delay`](https://github.com/sindresorhus/delay) if you need to delay a promise.* - - -## API - -### pDefer() - -Returns an `Object` with a `promise` property and functions to `resolve()` and `reject()`. - - -## Related - -- [More…](https://github.com/sindresorhus/promise-fun) - - -## License - -MIT © [Sindre Sorhus](https://sindresorhus.com) diff --git a/node_modules/p-is-promise/index.d.ts b/node_modules/p-is-promise/index.d.ts deleted file mode 100644 index 662d9e0c4..000000000 --- a/node_modules/p-is-promise/index.d.ts +++ /dev/null @@ -1,23 +0,0 @@ -declare const pIsPromise: { - /** - Check if `input` is a ES2015 promise. - - @param input - Value to be checked. - - @example - ``` - import isPromise = require('p-is-promise'); - - isPromise(Promise.resolve('🦄')); - //=> true - ``` - */ - (input: unknown): input is Promise; - - // TODO: Remove this for the next major release, refactor the whole definition to: - // declare function pIsPromise(input: unknown): input is Promise; - // export = pIsPromise; - default: typeof pIsPromise; -}; - -export = pIsPromise; diff --git a/node_modules/p-is-promise/index.js b/node_modules/p-is-promise/index.js deleted file mode 100644 index 389d38fc5..000000000 --- a/node_modules/p-is-promise/index.js +++ /dev/null @@ -1,15 +0,0 @@ -'use strict'; - -const isPromise = input => ( - input instanceof Promise || - ( - input !== null && - typeof input === 'object' && - typeof input.then === 'function' && - typeof input.catch === 'function' - ) -); - -module.exports = isPromise; -// TODO: Remove this for the next major release -module.exports.default = isPromise; diff --git a/node_modules/p-is-promise/license b/node_modules/p-is-promise/license deleted file mode 100644 index e7af2f771..000000000 --- a/node_modules/p-is-promise/license +++ /dev/null @@ -1,9 +0,0 @@ -MIT License - -Copyright (c) Sindre Sorhus (sindresorhus.com) - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/p-is-promise/package.json b/node_modules/p-is-promise/package.json deleted file mode 100644 index d293a28e3..000000000 --- a/node_modules/p-is-promise/package.json +++ /dev/null @@ -1,78 +0,0 @@ -{ - "_args": [ - [ - "p-is-promise@2.1.0", - "/Users/drew.heavner/Documents/Github/sign-android-release" - ] - ], - "_development": true, - "_from": "p-is-promise@2.1.0", - "_id": "p-is-promise@2.1.0", - "_inBundle": false, - "_integrity": "sha512-Y3W0wlRPK8ZMRbNq97l4M5otioeA5lm1z7bkNkxCka8HSPjR0xRWmpCmc9utiaLP9Jb1eD8BgeIxTW4AIF45Pg==", - "_location": "/p-is-promise", - "_phantomChildren": {}, - "_requested": { - "type": "version", - "registry": true, - "raw": "p-is-promise@2.1.0", - "name": "p-is-promise", - "escapedName": "p-is-promise", - "rawSpec": "2.1.0", - "saveSpec": null, - "fetchSpec": "2.1.0" - }, - "_requiredBy": [ - "/mem" - ], - "_resolved": "https://registry.npmjs.org/p-is-promise/-/p-is-promise-2.1.0.tgz", - "_spec": "2.1.0", - "_where": "/Users/drew.heavner/Documents/Github/sign-android-release", - "author": { - "name": "Sindre Sorhus", - "email": "sindresorhus@gmail.com", - "url": "sindresorhus.com" - }, - "bugs": { - "url": "https://github.com/sindresorhus/p-is-promise/issues" - }, - "description": "Check if something is a promise", - "devDependencies": { - "ava": "^1.4.1", - "bluebird": "^3.5.4", - "tsd": "^0.7.2", - "xo": "^0.24.0" - }, - "engines": { - "node": ">=6" - }, - "files": [ - "index.js", - "index.d.ts" - ], - "homepage": "https://github.com/sindresorhus/p-is-promise#readme", - "keywords": [ - "promise", - "is", - "detect", - "check", - "kind", - "type", - "thenable", - "es2015", - "async", - "await", - "promises", - "bluebird" - ], - "license": "MIT", - "name": "p-is-promise", - "repository": { - "type": "git", - "url": "git+https://github.com/sindresorhus/p-is-promise.git" - }, - "scripts": { - "test": "xo && ava && tsd" - }, - "version": "2.1.0" -} diff --git a/node_modules/p-is-promise/readme.md b/node_modules/p-is-promise/readme.md deleted file mode 100644 index 0e0e48171..000000000 --- a/node_modules/p-is-promise/readme.md +++ /dev/null @@ -1,43 +0,0 @@ -# p-is-promise [![Build Status](https://travis-ci.org/sindresorhus/p-is-promise.svg?branch=master)](https://travis-ci.org/sindresorhus/p-is-promise) - -> Check if something is a promise - -Why not [`is-promise`](https://github.com/then/is-promise)? That module [checks for a thenable](https://github.com/then/is-promise/issues/6), not an ES2015 promise. This one is stricter. - -You most likely don't need this. Just pass your value to `Promise.resolve()` and let it handle it. - -Can be useful if you need to create a fast path for a synchronous operation. - - -## Install - -``` -$ npm install p-is-promise -``` - - -## Usage - -```js -const pIsPromise = require('p-is-promise'); -const Bluebird = require('bluebird'); - -pIsPromise(Promise.resolve('🦄')); -//=> true - -pIsPromise(Bluebird.resolve('🦄')); -//=> true - -pIsPromise('🦄'); -//=> false -``` - - -## Related - -- [More…](https://github.com/sindresorhus/promise-fun) - - -## License - -MIT © [Sindre Sorhus](https://sindresorhus.com) diff --git a/node_modules/process-nextick-args/index.js b/node_modules/process-nextick-args/index.js deleted file mode 100644 index 3eecf1148..000000000 --- a/node_modules/process-nextick-args/index.js +++ /dev/null @@ -1,45 +0,0 @@ -'use strict'; - -if (typeof process === 'undefined' || - !process.version || - process.version.indexOf('v0.') === 0 || - process.version.indexOf('v1.') === 0 && process.version.indexOf('v1.8.') !== 0) { - module.exports = { nextTick: nextTick }; -} else { - module.exports = process -} - -function nextTick(fn, arg1, arg2, arg3) { - if (typeof fn !== 'function') { - throw new TypeError('"callback" argument must be a function'); - } - var len = arguments.length; - var args, i; - switch (len) { - case 0: - case 1: - return process.nextTick(fn); - case 2: - return process.nextTick(function afterTickOne() { - fn.call(null, arg1); - }); - case 3: - return process.nextTick(function afterTickTwo() { - fn.call(null, arg1, arg2); - }); - case 4: - return process.nextTick(function afterTickThree() { - fn.call(null, arg1, arg2, arg3); - }); - default: - args = new Array(len - 1); - i = 0; - while (i < args.length) { - args[i++] = arguments[i]; - } - return process.nextTick(function afterTick() { - fn.apply(null, args); - }); - } -} - diff --git a/node_modules/process-nextick-args/license.md b/node_modules/process-nextick-args/license.md deleted file mode 100644 index c67e3532b..000000000 --- a/node_modules/process-nextick-args/license.md +++ /dev/null @@ -1,19 +0,0 @@ -# Copyright (c) 2015 Calvin Metcalf - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -**THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE.** diff --git a/node_modules/process-nextick-args/package.json b/node_modules/process-nextick-args/package.json deleted file mode 100644 index a76f08b90..000000000 --- a/node_modules/process-nextick-args/package.json +++ /dev/null @@ -1,54 +0,0 @@ -{ - "_args": [ - [ - "process-nextick-args@2.0.1", - "/Users/drew.heavner/Documents/Github/sign-android-release" - ] - ], - "_development": true, - "_from": "process-nextick-args@2.0.1", - "_id": "process-nextick-args@2.0.1", - "_inBundle": false, - "_integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==", - "_location": "/process-nextick-args", - "_phantomChildren": {}, - "_requested": { - "type": "version", - "registry": true, - "raw": "process-nextick-args@2.0.1", - "name": "process-nextick-args", - "escapedName": "process-nextick-args", - "rawSpec": "2.0.1", - "saveSpec": null, - "fetchSpec": "2.0.1" - }, - "_requiredBy": [ - "/readable-stream" - ], - "_resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz", - "_spec": "2.0.1", - "_where": "/Users/drew.heavner/Documents/Github/sign-android-release", - "author": "", - "bugs": { - "url": "https://github.com/calvinmetcalf/process-nextick-args/issues" - }, - "description": "process.nextTick but always with args", - "devDependencies": { - "tap": "~0.2.6" - }, - "files": [ - "index.js" - ], - "homepage": "https://github.com/calvinmetcalf/process-nextick-args", - "license": "MIT", - "main": "index.js", - "name": "process-nextick-args", - "repository": { - "type": "git", - "url": "git+https://github.com/calvinmetcalf/process-nextick-args.git" - }, - "scripts": { - "test": "node test.js" - }, - "version": "2.0.1" -} diff --git a/node_modules/process-nextick-args/readme.md b/node_modules/process-nextick-args/readme.md deleted file mode 100644 index ecb432c9b..000000000 --- a/node_modules/process-nextick-args/readme.md +++ /dev/null @@ -1,18 +0,0 @@ -process-nextick-args -===== - -[![Build Status](https://travis-ci.org/calvinmetcalf/process-nextick-args.svg?branch=master)](https://travis-ci.org/calvinmetcalf/process-nextick-args) - -```bash -npm install --save process-nextick-args -``` - -Always be able to pass arguments to process.nextTick, no matter the platform - -```js -var pna = require('process-nextick-args'); - -pna.nextTick(function (a, b, c) { - console.log(a, b, c); -}, 'step', 3, 'profit'); -``` diff --git a/node_modules/prompts/dist/dateparts/datepart.js b/node_modules/prompts/dist/dateparts/datepart.js deleted file mode 100644 index b954c5ed7..000000000 --- a/node_modules/prompts/dist/dateparts/datepart.js +++ /dev/null @@ -1,39 +0,0 @@ -'use strict'; - -class DatePart { - constructor({ - token, - date, - parts, - locales - }) { - this.token = token; - this.date = date || new Date(); - this.parts = parts || [this]; - this.locales = locales || {}; - } - - up() {} - - down() {} - - next() { - const currentIdx = this.parts.indexOf(this); - return this.parts.find((part, idx) => idx > currentIdx && part instanceof DatePart); - } - - setTo(val) {} - - prev() { - let parts = [].concat(this.parts).reverse(); - const currentIdx = parts.indexOf(this); - return parts.find((part, idx) => idx > currentIdx && part instanceof DatePart); - } - - toString() { - return String(this.date); - } - -} - -module.exports = DatePart; \ No newline at end of file diff --git a/node_modules/prompts/dist/dateparts/day.js b/node_modules/prompts/dist/dateparts/day.js deleted file mode 100644 index a525e9242..000000000 --- a/node_modules/prompts/dist/dateparts/day.js +++ /dev/null @@ -1,35 +0,0 @@ -'use strict'; - -const DatePart = require('./datepart'); - -const pos = n => { - n = n % 10; - return n === 1 ? 'st' : n === 2 ? 'nd' : n === 3 ? 'rd' : 'th'; -}; - -class Day extends DatePart { - constructor(opts = {}) { - super(opts); - } - - up() { - this.date.setDate(this.date.getDate() + 1); - } - - down() { - this.date.setDate(this.date.getDate() - 1); - } - - setTo(val) { - this.date.setDate(parseInt(val.substr(-2))); - } - - toString() { - let date = this.date.getDate(); - let day = this.date.getDay(); - return this.token === 'DD' ? String(date).padStart(2, '0') : this.token === 'Do' ? date + pos(date) : this.token === 'd' ? day + 1 : this.token === 'ddd' ? this.locales.weekdaysShort[day] : this.token === 'dddd' ? this.locales.weekdays[day] : date; - } - -} - -module.exports = Day; \ No newline at end of file diff --git a/node_modules/prompts/dist/dateparts/hours.js b/node_modules/prompts/dist/dateparts/hours.js deleted file mode 100644 index 7743632fb..000000000 --- a/node_modules/prompts/dist/dateparts/hours.js +++ /dev/null @@ -1,30 +0,0 @@ -'use strict'; - -const DatePart = require('./datepart'); - -class Hours extends DatePart { - constructor(opts = {}) { - super(opts); - } - - up() { - this.date.setHours(this.date.getHours() + 1); - } - - down() { - this.date.setHours(this.date.getHours() - 1); - } - - setTo(val) { - this.date.setHours(parseInt(val.substr(-2))); - } - - toString() { - let hours = this.date.getHours(); - if (/h/.test(this.token)) hours = hours % 12 || 12; - return this.token.length > 1 ? String(hours).padStart(2, '0') : hours; - } - -} - -module.exports = Hours; \ No newline at end of file diff --git a/node_modules/prompts/dist/dateparts/index.js b/node_modules/prompts/dist/dateparts/index.js deleted file mode 100644 index 754516eba..000000000 --- a/node_modules/prompts/dist/dateparts/index.js +++ /dev/null @@ -1,13 +0,0 @@ -'use strict'; - -module.exports = { - DatePart: require('./datepart'), - Meridiem: require('./meridiem'), - Day: require('./day'), - Hours: require('./hours'), - Milliseconds: require('./milliseconds'), - Minutes: require('./minutes'), - Month: require('./month'), - Seconds: require('./seconds'), - Year: require('./year') -}; \ No newline at end of file diff --git a/node_modules/prompts/dist/dateparts/meridiem.js b/node_modules/prompts/dist/dateparts/meridiem.js deleted file mode 100644 index 5bc8dd7fe..000000000 --- a/node_modules/prompts/dist/dateparts/meridiem.js +++ /dev/null @@ -1,25 +0,0 @@ -'use strict'; - -const DatePart = require('./datepart'); - -class Meridiem extends DatePart { - constructor(opts = {}) { - super(opts); - } - - up() { - this.date.setHours((this.date.getHours() + 12) % 24); - } - - down() { - this.up(); - } - - toString() { - let meridiem = this.date.getHours() > 12 ? 'pm' : 'am'; - return /\A/.test(this.token) ? meridiem.toUpperCase() : meridiem; - } - -} - -module.exports = Meridiem; \ No newline at end of file diff --git a/node_modules/prompts/dist/dateparts/milliseconds.js b/node_modules/prompts/dist/dateparts/milliseconds.js deleted file mode 100644 index 3440e3a92..000000000 --- a/node_modules/prompts/dist/dateparts/milliseconds.js +++ /dev/null @@ -1,28 +0,0 @@ -'use strict'; - -const DatePart = require('./datepart'); - -class Milliseconds extends DatePart { - constructor(opts = {}) { - super(opts); - } - - up() { - this.date.setMilliseconds(this.date.getMilliseconds() + 1); - } - - down() { - this.date.setMilliseconds(this.date.getMilliseconds() - 1); - } - - setTo(val) { - this.date.setMilliseconds(parseInt(val.substr(-this.token.length))); - } - - toString() { - return String(this.date.getMilliseconds()).padStart(4, '0').substr(0, this.token.length); - } - -} - -module.exports = Milliseconds; \ No newline at end of file diff --git a/node_modules/prompts/dist/dateparts/minutes.js b/node_modules/prompts/dist/dateparts/minutes.js deleted file mode 100644 index 2b8ef1fbc..000000000 --- a/node_modules/prompts/dist/dateparts/minutes.js +++ /dev/null @@ -1,29 +0,0 @@ -'use strict'; - -const DatePart = require('./datepart'); - -class Minutes extends DatePart { - constructor(opts = {}) { - super(opts); - } - - up() { - this.date.setMinutes(this.date.getMinutes() + 1); - } - - down() { - this.date.setMinutes(this.date.getMinutes() - 1); - } - - setTo(val) { - this.date.setMinutes(parseInt(val.substr(-2))); - } - - toString() { - let m = this.date.getMinutes(); - return this.token.length > 1 ? String(m).padStart(2, '0') : m; - } - -} - -module.exports = Minutes; \ No newline at end of file diff --git a/node_modules/prompts/dist/dateparts/month.js b/node_modules/prompts/dist/dateparts/month.js deleted file mode 100644 index f9d4e13cb..000000000 --- a/node_modules/prompts/dist/dateparts/month.js +++ /dev/null @@ -1,31 +0,0 @@ -'use strict'; - -const DatePart = require('./datepart'); - -class Month extends DatePart { - constructor(opts = {}) { - super(opts); - } - - up() { - this.date.setMonth(this.date.getMonth() + 1); - } - - down() { - this.date.setMonth(this.date.getMonth() - 1); - } - - setTo(val) { - val = parseInt(val.substr(-2)) - 1; - this.date.setMonth(val < 0 ? 0 : val); - } - - toString() { - let month = this.date.getMonth(); - let tl = this.token.length; - return tl === 2 ? String(month + 1).padStart(2, '0') : tl === 3 ? this.locales.monthsShort[month] : tl === 4 ? this.locales.months[month] : String(month + 1); - } - -} - -module.exports = Month; \ No newline at end of file diff --git a/node_modules/prompts/dist/dateparts/seconds.js b/node_modules/prompts/dist/dateparts/seconds.js deleted file mode 100644 index e16f030a0..000000000 --- a/node_modules/prompts/dist/dateparts/seconds.js +++ /dev/null @@ -1,29 +0,0 @@ -'use strict'; - -const DatePart = require('./datepart'); - -class Seconds extends DatePart { - constructor(opts = {}) { - super(opts); - } - - up() { - this.date.setSeconds(this.date.getSeconds() + 1); - } - - down() { - this.date.setSeconds(this.date.getSeconds() - 1); - } - - setTo(val) { - this.date.setSeconds(parseInt(val.substr(-2))); - } - - toString() { - let s = this.date.getSeconds(); - return this.token.length > 1 ? String(s).padStart(2, '0') : s; - } - -} - -module.exports = Seconds; \ No newline at end of file diff --git a/node_modules/prompts/dist/dateparts/year.js b/node_modules/prompts/dist/dateparts/year.js deleted file mode 100644 index cd6267780..000000000 --- a/node_modules/prompts/dist/dateparts/year.js +++ /dev/null @@ -1,29 +0,0 @@ -'use strict'; - -const DatePart = require('./datepart'); - -class Year extends DatePart { - constructor(opts = {}) { - super(opts); - } - - up() { - this.date.setFullYear(this.date.getFullYear() + 1); - } - - down() { - this.date.setFullYear(this.date.getFullYear() - 1); - } - - setTo(val) { - this.date.setFullYear(val.substr(-4)); - } - - toString() { - let year = String(this.date.getFullYear()).padStart(4, '0'); - return this.token.length === 2 ? year.substr(-2) : year; - } - -} - -module.exports = Year; \ No newline at end of file diff --git a/node_modules/prompts/dist/elements/autocomplete.js b/node_modules/prompts/dist/elements/autocomplete.js deleted file mode 100644 index 35ab8ab7a..000000000 --- a/node_modules/prompts/dist/elements/autocomplete.js +++ /dev/null @@ -1,276 +0,0 @@ -'use strict'; - -function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } } - -function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; } - -const color = require('kleur'); - -const Prompt = require('./prompt'); - -const _require = require('sisteransi'), - cursor = _require.cursor; - -const _require2 = require('../util'), - style = _require2.style, - clear = _require2.clear, - figures = _require2.figures, - strip = _require2.strip; - -const getVal = (arr, i) => arr[i] && (arr[i].value || arr[i].title || arr[i]); - -const getTitle = (arr, i) => arr[i] && (arr[i].title || arr[i].value || arr[i]); - -const getIndex = (arr, valOrTitle) => { - const index = arr.findIndex(el => el.value === valOrTitle || el.title === valOrTitle); - return index > -1 ? index : undefined; -}; -/** - * TextPrompt Base Element - * @param {Object} opts Options - * @param {String} opts.message Message - * @param {Array} opts.choices Array of auto-complete choices objects - * @param {Function} [opts.suggest] Filter function. Defaults to sort by title - * @param {Number} [opts.limit=10] Max number of results to show - * @param {Number} [opts.cursor=0] Cursor start position - * @param {String} [opts.style='default'] Render style - * @param {String} [opts.fallback] Fallback message - initial to default value - * @param {String} [opts.initial] Index of the default value - * @param {Stream} [opts.stdin] The Readable stream to listen to - * @param {Stream} [opts.stdout] The Writable stream to write readline data to - * @param {String} [opts.noMatches] The no matches found label - */ - - -class AutocompletePrompt extends Prompt { - constructor(opts = {}) { - super(opts); - this.msg = opts.message; - this.suggest = opts.suggest; - this.choices = opts.choices; - this.initial = typeof opts.initial === 'number' ? opts.initial : getIndex(opts.choices, opts.initial); - this.select = this.initial || opts.cursor || 0; - this.fallback = opts.fallback || (opts.initial !== undefined ? `${figures.pointerSmall} ${getTitle(this.choices, this.initial)}` : `${figures.pointerSmall} ${opts.noMatches || 'no matches found'}`); - this.suggestions = [[]]; - this.page = 0; - this.input = ''; - this.limit = opts.limit || 10; - this.cursor = 0; - this.transform = style.render(opts.style); - this.scale = this.transform.scale; - this.render = this.render.bind(this); - this.complete = this.complete.bind(this); - this.clear = clear(''); - this.complete(this.render); - this.render(); - } - - moveSelect(i) { - this.select = i; - - if (this.suggestions[this.page].length > 0) { - this.value = getVal(this.suggestions[this.page], i); - } else { - this.value = this.initial !== undefined ? getVal(this.choices, this.initial) : null; - } - - this.fire(); - } - - complete(cb) { - var _this = this; - - return _asyncToGenerator(function* () { - const p = _this.completing = _this.suggest(_this.input, _this.choices); - - const suggestions = yield p; - if (_this.completing !== p) return; - _this.suggestions = suggestions.map((s, i, arr) => ({ - title: getTitle(arr, i), - value: getVal(arr, i) - })).reduce((arr, sug) => { - if (arr[arr.length - 1].length < _this.limit) arr[arr.length - 1].push(sug);else arr.push([sug]); - return arr; - }, [[]]); - _this.isFallback = false; - _this.completing = false; - if (!_this.suggestions[_this.page]) _this.page = 0; - - if (!_this.suggestions.length && _this.fallback) { - const index = getIndex(_this.choices, _this.fallback); - _this.suggestions = [[]]; - if (index !== undefined) _this.suggestions[0].push({ - title: getTitle(_this.choices, index), - value: getVal(_this.choices, index) - }); - _this.isFallback = true; - } - - const l = Math.max(suggestions.length - 1, 0); - - _this.moveSelect(Math.min(l, _this.select)); - - cb && cb(); - })(); - } - - reset() { - this.input = ''; - this.complete(() => { - this.moveSelect(this.initial !== void 0 ? this.initial : 0); - this.render(); - }); - this.render(); - } - - abort() { - this.done = this.aborted = true; - this.fire(); - this.render(); - this.out.write('\n'); - this.close(); - } - - submit() { - this.done = true; - this.aborted = false; - this.fire(); - this.render(); - this.out.write('\n'); - this.close(); - } - - _(c, key) { - // TODO on ctrl+# go to page # - let s1 = this.input.slice(0, this.cursor); - let s2 = this.input.slice(this.cursor); - this.input = `${s1}${c}${s2}`; - this.cursor = s1.length + 1; - this.complete(this.render); - this.render(); - } - - delete() { - if (this.cursor === 0) return this.bell(); - let s1 = this.input.slice(0, this.cursor - 1); - let s2 = this.input.slice(this.cursor); - this.input = `${s1}${s2}`; - this.complete(this.render); - this.cursor = this.cursor - 1; - this.render(); - } - - deleteForward() { - if (this.cursor * this.scale >= this.rendered.length) return this.bell(); - let s1 = this.input.slice(0, this.cursor); - let s2 = this.input.slice(this.cursor + 1); - this.input = `${s1}${s2}`; - this.complete(this.render); - this.render(); - } - - first() { - this.moveSelect(0); - this.render(); - } - - last() { - this.moveSelect(this.suggestions[this.page].length - 1); - this.render(); - } - - up() { - if (this.select <= 0) return this.bell(); - this.moveSelect(this.select - 1); - this.render(); - } - - down() { - if (this.select >= this.suggestions[this.page].length - 1) return this.bell(); - this.moveSelect(this.select + 1); - this.render(); - } - - next() { - if (this.select === this.suggestions[this.page].length - 1) { - this.page = (this.page + 1) % this.suggestions.length; - this.moveSelect(0); - } else this.moveSelect(this.select + 1); - - this.render(); - } - - nextPage() { - if (this.page >= this.suggestions.length - 1) return this.bell(); - this.page++; - this.moveSelect(0); - this.render(); - } - - prevPage() { - if (this.page <= 0) return this.bell(); - this.page--; - this.moveSelect(0); - this.render(); - } - - left() { - if (this.cursor <= 0) return this.bell(); - this.cursor = this.cursor - 1; - this.render(); - } - - right() { - if (this.cursor * this.scale >= this.rendered.length) return this.bell(); - this.cursor = this.cursor + 1; - this.render(); - } - - render() { - if (this.closed) return; - super.render(); - if (this.lineCount) this.out.write(cursor.down(this.lineCount)); - let prompt = color.bold(`${style.symbol(this.done, this.aborted)} ${this.msg} `) + `${style.delimiter(this.completing)} `; - let length = strip(prompt).length; - - if (this.done && this.suggestions[this.page][this.select]) { - prompt += `${this.suggestions[this.page][this.select].title}`; - } else { - this.rendered = `${this.transform.render(this.input)}`; - length += this.rendered.length; - prompt += this.rendered; - } - - if (!this.done) { - this.lineCount = this.suggestions[this.page].length; - let suggestions = this.suggestions[this.page].reduce((acc, item, i) => acc + `\n${i === this.select ? color.cyan(item.title) : item.title}`, ''); - - if (suggestions && !this.isFallback) { - prompt += suggestions; - - if (this.suggestions.length > 1) { - this.lineCount++; - prompt += color.blue(`\nPage ${this.page + 1}/${this.suggestions.length}`); - } - } else { - const fallbackIndex = getIndex(this.choices, this.fallback); - const fallbackTitle = fallbackIndex !== undefined ? getTitle(this.choices, fallbackIndex) : this.fallback; - prompt += `\n${color.gray(fallbackTitle)}`; - this.lineCount++; - } - } - - this.out.write(this.clear + prompt); - this.clear = clear(prompt); - - if (this.lineCount && !this.done) { - let pos = cursor.up(this.lineCount); - pos += cursor.left + cursor.to(length); - pos += cursor.move(-this.rendered.length + this.cursor * this.scale); - this.out.write(pos); - } - } - -} - -module.exports = AutocompletePrompt; \ No newline at end of file diff --git a/node_modules/prompts/dist/elements/autocompleteMultiselect.js b/node_modules/prompts/dist/elements/autocompleteMultiselect.js deleted file mode 100644 index 61a8d4d88..000000000 --- a/node_modules/prompts/dist/elements/autocompleteMultiselect.js +++ /dev/null @@ -1,194 +0,0 @@ -'use strict'; - -const color = require('kleur'); - -const _require = require('sisteransi'), - cursor = _require.cursor; - -const MultiselectPrompt = require('./multiselect'); - -const _require2 = require('../util'), - clear = _require2.clear, - style = _require2.style, - figures = _require2.figures; -/** - * MultiselectPrompt Base Element - * @param {Object} opts Options - * @param {String} opts.message Message - * @param {Array} opts.choices Array of choice objects - * @param {String} [opts.hint] Hint to display - * @param {String} [opts.warn] Hint shown for disabled choices - * @param {Number} [opts.max] Max choices - * @param {Number} [opts.cursor=0] Cursor start position - * @param {Stream} [opts.stdin] The Readable stream to listen to - * @param {Stream} [opts.stdout] The Writable stream to write readline data to - */ - - -class AutocompleteMultiselectPrompt extends MultiselectPrompt { - constructor(opts = {}) { - opts.overrideRender = true; - super(opts); - this.inputValue = ''; - this.clear = clear(''); - this.filteredOptions = this.value; - this.render(); - } - - last() { - this.cursor = this.filteredOptions.length - 1; - this.render(); - } - - next() { - this.cursor = (this.cursor + 1) % this.filteredOptions.length; - this.render(); - } - - up() { - if (this.cursor === 0) { - this.cursor = this.filteredOptions.length - 1; - } else { - this.cursor--; - } - - this.render(); - } - - down() { - if (this.cursor === this.filteredOptions.length - 1) { - this.cursor = 0; - } else { - this.cursor++; - } - - this.render(); - } - - left() { - this.filteredOptions[this.cursor].selected = false; - this.render(); - } - - right() { - if (this.value.filter(e => e.selected).length >= this.maxChoices) return this.bell(); - this.filteredOptions[this.cursor].selected = true; - this.render(); - } - - delete() { - if (this.inputValue.length) { - this.inputValue = this.inputValue.substr(0, this.inputValue.length - 1); - this.updateFilteredOptions(); - } - } - - updateFilteredOptions() { - const currentHighlight = this.filteredOptions[this.cursor]; - this.filteredOptions = this.value.filter(v => { - if (this.inputValue) { - if (typeof v.title === 'string') { - if (v.title.toLowerCase().includes(this.inputValue.toLowerCase())) { - return true; - } - } - - if (typeof v.value === 'string') { - if (v.value.toLowerCase().includes(this.inputValue.toLowerCase())) { - return true; - } - } - - return false; - } - - return true; - }); - const newHighlightIndex = this.filteredOptions.findIndex(v => v === currentHighlight); - this.cursor = newHighlightIndex < 0 ? 0 : newHighlightIndex; - this.render(); - } - - handleSpaceToggle() { - const v = this.filteredOptions[this.cursor]; - - if (v.selected) { - v.selected = false; - this.render(); - } else if (v.disabled || this.value.filter(e => e.selected).length >= this.maxChoices) { - return this.bell(); - } else { - v.selected = true; - this.render(); - } - } - - handleInputChange(c) { - this.inputValue = this.inputValue + c; - this.updateFilteredOptions(); - } - - _(c, key) { - if (c === ' ') { - this.handleSpaceToggle(); - } else { - this.handleInputChange(c); - } - } - - renderInstructions() { - return ` -Instructions: - ${figures.arrowUp}/${figures.arrowDown}: Highlight option - ${figures.arrowLeft}/${figures.arrowRight}/[space]: Toggle selection - [a,b,c]/delete: Filter choices - enter/return: Complete answer - `; - } - - renderCurrentInput() { - return ` -Filtered results for: ${this.inputValue ? this.inputValue : color.gray('Enter something to filter')}\n`; - } - - renderOption(cursor, v, i) { - let title; - if (v.disabled) title = cursor === i ? color.gray().underline(v.title) : color.strikethrough().gray(v.title);else title = cursor === i ? color.cyan().underline(v.title) : v.title; - return (v.selected ? color.green(figures.radioOn) : figures.radioOff) + ' ' + title; - } - - renderDoneOrInstructions() { - if (this.done) { - const selected = this.value.filter(e => e.selected).map(v => v.title).join(', '); - return selected; - } - - const output = [color.gray(this.hint), this.renderInstructions(), this.renderCurrentInput()]; - - if (this.filteredOptions.length && this.filteredOptions[this.cursor].disabled) { - output.push(color.yellow(this.warn)); - } - - return output.join(' '); - } - - render() { - if (this.closed) return; - if (this.firstRender) this.out.write(cursor.hide); - super.render(); // print prompt - - let prompt = [style.symbol(this.done, this.aborted), color.bold(this.msg), style.delimiter(false), this.renderDoneOrInstructions()].join(' '); - - if (this.showMinError) { - prompt += color.red(`You must select a minimum of ${this.minSelected} choices.`); - this.showMinError = false; - } - - prompt += this.renderOptions(this.filteredOptions); - this.out.write(this.clear + prompt); - this.clear = clear(prompt); - } - -} - -module.exports = AutocompleteMultiselectPrompt; \ No newline at end of file diff --git a/node_modules/prompts/dist/elements/confirm.js b/node_modules/prompts/dist/elements/confirm.js deleted file mode 100644 index 245a1a889..000000000 --- a/node_modules/prompts/dist/elements/confirm.js +++ /dev/null @@ -1,87 +0,0 @@ -"use strict"; - -const color = require('kleur'); - -const Prompt = require('./prompt'); - -const _require = require('../util'), - style = _require.style; - -const _require2 = require('sisteransi'), - erase = _require2.erase, - cursor = _require2.cursor; -/** - * ConfirmPrompt Base Element - * @param {Object} opts Options - * @param {String} opts.message Message - * @param {Boolean} [opts.initial] Default value (true/false) - * @param {Stream} [opts.stdin] The Readable stream to listen to - * @param {Stream} [opts.stdout] The Writable stream to write readline data to - * @param {String} [opts.yes] The "Yes" label - * @param {String} [opts.yesOption] The "Yes" option when choosing between yes/no - * @param {String} [opts.no] The "No" label - * @param {String} [opts.noOption] The "No" option when choosing between yes/no - */ - - -class ConfirmPrompt extends Prompt { - constructor(opts = {}) { - super(opts); - this.msg = opts.message; - this.value = opts.initial; - this.initialValue = !!opts.initial; - this.yesMsg = opts.yes || 'yes'; - this.yesOption = opts.yesOption || '(Y/n)'; - this.noMsg = opts.no || 'no'; - this.noOption = opts.noOption || '(y/N)'; - this.render(); - } - - reset() { - this.value = this.initialValue; - this.fire(); - this.render(); - } - - abort() { - this.done = this.aborted = true; - this.fire(); - this.render(); - this.out.write('\n'); - this.close(); - } - - submit() { - this.value = this.value || false; - this.done = true; - this.aborted = false; - this.fire(); - this.render(); - this.out.write('\n'); - this.close(); - } - - _(c, key) { - if (c.toLowerCase() === 'y') { - this.value = true; - return this.submit(); - } - - if (c.toLowerCase() === 'n') { - this.value = false; - return this.submit(); - } - - return this.bell(); - } - - render() { - if (this.closed) return; - if (this.firstRender) this.out.write(cursor.hide); - super.render(); - this.out.write(erase.line + cursor.to(0) + [style.symbol(this.done, this.aborted), color.bold(this.msg), style.delimiter(this.done), this.done ? this.value ? this.yesMsg : this.noMsg : color.gray(this.initialValue ? this.yesOption : this.noOption)].join(' ')); - } - -} - -module.exports = ConfirmPrompt; \ No newline at end of file diff --git a/node_modules/prompts/dist/elements/date.js b/node_modules/prompts/dist/elements/date.js deleted file mode 100644 index 76482ec50..000000000 --- a/node_modules/prompts/dist/elements/date.js +++ /dev/null @@ -1,260 +0,0 @@ -'use strict'; - -function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } } - -function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; } - -const color = require('kleur'); - -const Prompt = require('./prompt'); - -const _require = require('../util'), - style = _require.style, - clear = _require.clear, - figures = _require.figures, - strip = _require.strip; - -const _require2 = require('sisteransi'), - erase = _require2.erase, - cursor = _require2.cursor; - -const _require3 = require('../dateparts'), - DatePart = _require3.DatePart, - Meridiem = _require3.Meridiem, - Day = _require3.Day, - Hours = _require3.Hours, - Milliseconds = _require3.Milliseconds, - Minutes = _require3.Minutes, - Month = _require3.Month, - Seconds = _require3.Seconds, - Year = _require3.Year; - -const regex = /\\(.)|"((?:\\["\\]|[^"])+)"|(D[Do]?|d{3,4}|d)|(M{1,4})|(YY(?:YY)?)|([aA])|([Hh]{1,2})|(m{1,2})|(s{1,2})|(S{1,4})|./g; -const regexGroups = { - 1: ({ - token - }) => token.replace(/\\(.)/g, '$1'), - 2: opts => new Day(opts), - // Day // TODO - 3: opts => new Month(opts), - // Month - 4: opts => new Year(opts), - // Year - 5: opts => new Meridiem(opts), - // AM/PM // TODO (special) - 6: opts => new Hours(opts), - // Hours - 7: opts => new Minutes(opts), - // Minutes - 8: opts => new Seconds(opts), - // Seconds - 9: opts => new Milliseconds(opts) // Fractional seconds - -}; -const dfltLocales = { - months: 'January,February,March,April,May,June,July,August,September,October,November,December'.split(','), - monthsShort: 'Jan,Feb,Mar,Apr,May,Jun,Jul,Aug,Sep,Oct,Nov,Dec'.split(','), - weekdays: 'Sunday,Monday,Tuesday,Wednesday,Thursday,Friday,Saturday'.split(','), - weekdaysShort: 'Sun,Mon,Tue,Wed,Thu,Fri,Sat'.split(',') - /** - * DatePrompt Base Element - * @param {Object} opts Options - * @param {String} opts.message Message - * @param {Number} [opts.initial] Index of default value - * @param {String} [opts.mask] The format mask - * @param {object} [opts.locales] The date locales - * @param {String} [opts.error] The error message shown on invalid value - * @param {Function} [opts.validate] Function to validate the submitted value - * @param {Stream} [opts.stdin] The Readable stream to listen to - * @param {Stream} [opts.stdout] The Writable stream to write readline data to - */ - -}; - -class DatePrompt extends Prompt { - constructor(opts = {}) { - super(opts); - this.msg = opts.message; - this.cursor = 0; - this.typed = ''; - this.locales = Object.assign(dfltLocales, opts.locales); - this._date = opts.initial || new Date(); - this.errorMsg = opts.error || 'Please Enter A Valid Value'; - - this.validator = opts.validate || (() => true); - - this.mask = opts.mask || 'YYYY-MM-DD HH:mm:ss'; - this.clear = clear(''); - this.render(); - } - - get value() { - return this.date; - } - - get date() { - return this._date; - } - - set date(date) { - if (date) this._date.setTime(date.getTime()); - } - - set mask(mask) { - let result; - this.parts = []; - - while (result = regex.exec(mask)) { - let match = result.shift(); - let idx = result.findIndex(gr => gr != null); - this.parts.push(idx in regexGroups ? regexGroups[idx]({ - token: result[idx] || match, - date: this.date, - parts: this.parts, - locales: this.locales - }) : result[idx] || match); - } - - let parts = this.parts.reduce((arr, i) => { - if (typeof i === 'string' && typeof arr[arr.length - 1] === 'string') arr[arr.length - 1] += i;else arr.push(i); - return arr; - }, []); - this.parts.splice(0); - this.parts.push(...parts); - this.reset(); - } - - moveCursor(n) { - this.typed = ''; - this.cursor = n; - this.fire(); - } - - reset() { - this.moveCursor(this.parts.findIndex(p => p instanceof DatePart)); - this.fire(); - this.render(); - } - - abort() { - this.done = this.aborted = true; - this.error = false; - this.fire(); - this.render(); - this.out.write('\n'); - this.close(); - } - - validate() { - var _this = this; - - return _asyncToGenerator(function* () { - let valid = yield _this.validator(_this.value); - - if (typeof valid === 'string') { - _this.errorMsg = valid; - valid = false; - } - - _this.error = !valid; - })(); - } - - submit() { - var _this2 = this; - - return _asyncToGenerator(function* () { - yield _this2.validate(); - - if (_this2.error) { - _this2.color = 'red'; - - _this2.fire(); - - _this2.render(); - - return; - } - - _this2.done = true; - _this2.aborted = false; - - _this2.fire(); - - _this2.render(); - - _this2.out.write('\n'); - - _this2.close(); - })(); - } - - up() { - this.typed = ''; - this.parts[this.cursor].up(); - this.render(); - } - - down() { - this.typed = ''; - this.parts[this.cursor].down(); - this.render(); - } - - left() { - let prev = this.parts[this.cursor].prev(); - if (prev == null) return this.bell(); - this.moveCursor(this.parts.indexOf(prev)); - this.render(); - } - - right() { - let next = this.parts[this.cursor].next(); - if (next == null) return this.bell(); - this.moveCursor(this.parts.indexOf(next)); - this.render(); - } - - next() { - let next = this.parts[this.cursor].next(); - this.moveCursor(next ? this.parts.indexOf(next) : this.parts.findIndex(part => part instanceof DatePart)); - this.render(); - } - - _(c) { - if (/\d/.test(c)) { - this.typed += c; - this.parts[this.cursor].setTo(this.typed); - this.render(); - } - } - - render() { - if (this.closed) return; - if (this.firstRender) this.out.write(cursor.hide);else this.out.write(erase.lines(1)); - super.render(); - let clear = erase.line + (this.lines ? erase.down(this.lines) : '') + cursor.to(0); - this.lines = 0; - let error = ''; - - if (this.error) { - let lines = this.errorMsg.split('\n'); - error = lines.reduce((a, l, i) => a + `\n${i ? ` ` : figures.pointerSmall} ${color.red().italic(l)}`, ``); - this.lines = lines.length; - } // Print prompt - - - let prompt = [style.symbol(this.done, this.aborted), color.bold(this.msg), style.delimiter(false), this.parts.reduce((arr, p, idx) => arr.concat(idx === this.cursor && !this.done ? color.cyan().underline(p.toString()) : p), []).join('')].join(' '); - let position = ''; - - if (this.lines) { - position += cursor.up(this.lines); - position += cursor.left + cursor.to(strip(prompt).length); - } - - this.out.write(clear + prompt + error + position); - } - -} - -module.exports = DatePrompt; \ No newline at end of file diff --git a/node_modules/prompts/dist/elements/index.js b/node_modules/prompts/dist/elements/index.js deleted file mode 100644 index cf0ccc1e3..000000000 --- a/node_modules/prompts/dist/elements/index.js +++ /dev/null @@ -1,13 +0,0 @@ -'use strict'; - -module.exports = { - TextPrompt: require('./text'), - SelectPrompt: require('./select'), - TogglePrompt: require('./toggle'), - DatePrompt: require('./date'), - NumberPrompt: require('./number'), - MultiselectPrompt: require('./multiselect'), - AutocompletePrompt: require('./autocomplete'), - AutocompleteMultiselectPrompt: require('./autocompleteMultiselect'), - ConfirmPrompt: require('./confirm') -}; \ No newline at end of file diff --git a/node_modules/prompts/dist/elements/multiselect.js b/node_modules/prompts/dist/elements/multiselect.js deleted file mode 100644 index 86142b6cf..000000000 --- a/node_modules/prompts/dist/elements/multiselect.js +++ /dev/null @@ -1,249 +0,0 @@ -'use strict'; - -const color = require('kleur'); - -const _require = require('sisteransi'), - cursor = _require.cursor; - -const Prompt = require('./prompt'); - -const _require2 = require('../util'), - clear = _require2.clear, - figures = _require2.figures, - style = _require2.style; -/** - * MultiselectPrompt Base Element - * @param {Object} opts Options - * @param {String} opts.message Message - * @param {Array} opts.choices Array of choice objects - * @param {String} [opts.hint] Hint to display - * @param {String} [opts.warn] Hint shown for disabled choices - * @param {Number} [opts.max] Max choices - * @param {Number} [opts.cursor=0] Cursor start position - * @param {Stream} [opts.stdin] The Readable stream to listen to - * @param {Stream} [opts.stdout] The Writable stream to write readline data to - */ - - -class MultiselectPrompt extends Prompt { - constructor(opts = {}) { - super(opts); - this.msg = opts.message; - this.cursor = opts.cursor || 0; - this.scrollIndex = opts.cursor || 0; - this.hint = opts.hint || ''; - this.warn = opts.warn || '- This option is disabled -'; - this.minSelected = opts.min; - this.showMinError = false; - this.maxChoices = opts.max; - this.value = opts.choices.map((ch, idx) => { - if (typeof ch === 'string') ch = { - title: ch, - value: idx - }; - return { - title: ch && (ch.title || ch.value || ch), - value: ch && (ch.value || idx), - selected: ch && ch.selected, - disabled: ch && ch.disabled - }; - }); - this.clear = clear(''); - - if (!opts.overrideRender) { - this.render(); - } - } - - reset() { - this.value.map(v => !v.selected); - this.cursor = 0; - this.fire(); - this.render(); - } - - selected() { - return this.value.filter(v => v.selected); - } - - abort() { - this.done = this.aborted = true; - this.fire(); - this.render(); - this.out.write('\n'); - this.close(); - } - - submit() { - const selected = this.value.filter(e => e.selected); - - if (this.minSelected && selected.length < this.minSelected) { - this.showMinError = true; - this.render(); - } else { - this.done = true; - this.aborted = false; - this.fire(); - this.render(); - this.out.write('\n'); - this.close(); - } - } - - first() { - this.cursor = 0; - this.render(); - } - - last() { - this.cursor = this.value.length - 1; - this.render(); - } - - next() { - this.cursor = (this.cursor + 1) % this.value.length; - this.render(); - } - - up() { - if (this.cursor === 0) { - this.cursor = this.value.length - 1; - } else { - this.cursor--; - } - - this.render(); - } - - down() { - if (this.cursor === this.value.length - 1) { - this.cursor = 0; - } else { - this.cursor++; - } - - this.render(); - } - - left() { - this.value[this.cursor].selected = false; - this.render(); - } - - right() { - if (this.value.filter(e => e.selected).length >= this.maxChoices) return this.bell(); - this.value[this.cursor].selected = true; - this.render(); - } - - handleSpaceToggle() { - const v = this.value[this.cursor]; - - if (v.selected) { - v.selected = false; - this.render(); - } else if (v.disabled || this.value.filter(e => e.selected).length >= this.maxChoices) { - return this.bell(); - } else { - v.selected = true; - this.render(); - } - } - - _(c, key) { - if (c === ' ') { - this.handleSpaceToggle(); - } else { - return this.bell(); - } - } - - renderInstructions() { - return ` -Instructions: - ${figures.arrowUp}/${figures.arrowDown}: Highlight option - ${figures.arrowLeft}/${figures.arrowRight}/[space]: Toggle selection - enter/return: Complete answer - `; - } - - renderOption(cursor, v, i) { - let title; - if (v.disabled) title = cursor === i ? color.gray().underline(v.title) : color.strikethrough().gray(v.title);else title = cursor === i ? color.cyan().underline(v.title) : v.title; - return (v.selected ? color.green(figures.radioOn) : figures.radioOff) + ' ' + title; - } // shared with autocompleteMultiselect - - - paginateOptions(options) { - const c = this.cursor; - let styledOptions = options.map((v, i) => this.renderOption(c, v, i)); - const numOfOptionsToRender = 10; // if needed, can add an option to change this. - - let scopedOptions = styledOptions; - let hint = ''; - - if (styledOptions.length === 0) { - return color.red('No matches for this query.'); - } else if (styledOptions.length > numOfOptionsToRender) { - let startIndex = c - numOfOptionsToRender / 2; - let endIndex = c + numOfOptionsToRender / 2; - - if (startIndex < 0) { - startIndex = 0; - endIndex = numOfOptionsToRender; - } else if (endIndex > options.length) { - endIndex = options.length; - startIndex = endIndex - numOfOptionsToRender; - } - - scopedOptions = styledOptions.slice(startIndex, endIndex); - hint = color.dim('(Move up and down to reveal more choices)'); - } - - return '\n' + scopedOptions.join('\n') + '\n' + hint; - } // shared with autocomleteMultiselect - - - renderOptions(options) { - if (!this.done) { - return this.paginateOptions(options); - } - - return ''; - } - - renderDoneOrInstructions() { - if (this.done) { - const selected = this.value.filter(e => e.selected).map(v => v.title).join(', '); - return selected; - } - - const output = [color.gray(this.hint), this.renderInstructions()]; - - if (this.value[this.cursor].disabled) { - output.push(color.yellow(this.warn)); - } - - return output.join(' '); - } - - render() { - if (this.closed) return; - if (this.firstRender) this.out.write(cursor.hide); - super.render(); // print prompt - - let prompt = [style.symbol(this.done, this.aborted), color.bold(this.msg), style.delimiter(false), this.renderDoneOrInstructions()].join(' '); - - if (this.showMinError) { - prompt += color.red(`You must select a minimum of ${this.minSelected} choices.`); - this.showMinError = false; - } - - prompt += this.renderOptions(this.value); - this.out.write(this.clear + prompt); - this.clear = clear(prompt); - } - -} - -module.exports = MultiselectPrompt; \ No newline at end of file diff --git a/node_modules/prompts/dist/elements/number.js b/node_modules/prompts/dist/elements/number.js deleted file mode 100644 index 59446337a..000000000 --- a/node_modules/prompts/dist/elements/number.js +++ /dev/null @@ -1,236 +0,0 @@ -"use strict"; - -function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } } - -function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; } - -const color = require('kleur'); - -const Prompt = require('./prompt'); - -const _require = require('sisteransi'), - cursor = _require.cursor, - erase = _require.erase; - -const _require2 = require('../util'), - style = _require2.style, - clear = _require2.clear, - figures = _require2.figures, - strip = _require2.strip; - -const isNumber = /[0-9]/; - -const isDef = any => any !== undefined; - -const round = (number, precision) => { - let factor = Math.pow(10, precision); - return Math.round(number * factor) / factor; -}; -/** - * NumberPrompt Base Element - * @param {Object} opts Options - * @param {String} opts.message Message - * @param {String} [opts.style='default'] Render style - * @param {Number} [opts.initial] Default value - * @param {Number} [opts.max=+Infinity] Max value - * @param {Number} [opts.min=-Infinity] Min value - * @param {Boolean} [opts.float=false] Parse input as floats - * @param {Number} [opts.round=2] Round floats to x decimals - * @param {Number} [opts.increment=1] Number to increment by when using arrow-keys - * @param {Function} [opts.validate] Validate function - * @param {Stream} [opts.stdin] The Readable stream to listen to - * @param {Stream} [opts.stdout] The Writable stream to write readline data to - * @param {String} [opts.error] The invalid error label - */ - - -class NumberPrompt extends Prompt { - constructor(opts = {}) { - super(opts); - this.transform = style.render(opts.style); - this.msg = opts.message; - this.initial = isDef(opts.initial) ? opts.initial : ''; - this.float = !!opts.float; - this.round = opts.round || 2; - this.inc = opts.increment || 1; - this.min = isDef(opts.min) ? opts.min : -Infinity; - this.max = isDef(opts.max) ? opts.max : Infinity; - this.errorMsg = opts.error || `Please Enter A Valid Value`; - - this.validator = opts.validate || (() => true); - - this.color = `cyan`; - this.value = ``; - this.typed = ``; - this.lastHit = 0; - this.render(); - } - - set value(v) { - if (!v && v !== 0) { - this.placeholder = true; - this.rendered = color.gray(this.transform.render(`${this.initial}`)); - this._value = ``; - } else { - this.placeholder = false; - this.rendered = this.transform.render(`${round(v, this.round)}`); - this._value = round(v, this.round); - } - - this.fire(); - } - - get value() { - return this._value; - } - - parse(x) { - return this.float ? parseFloat(x) : parseInt(x); - } - - valid(c) { - return c === `-` || c === `.` && this.float || isNumber.test(c); - } - - reset() { - this.typed = ``; - this.value = ``; - this.fire(); - this.render(); - } - - abort() { - let x = this.value; - this.value = x !== `` ? x : this.initial; - this.done = this.aborted = true; - this.error = false; - this.fire(); - this.render(); - this.out.write(`\n`); - this.close(); - } - - validate() { - var _this = this; - - return _asyncToGenerator(function* () { - let valid = yield _this.validator(_this.value); - - if (typeof valid === `string`) { - _this.errorMsg = valid; - valid = false; - } - - _this.error = !valid; - })(); - } - - submit() { - var _this2 = this; - - return _asyncToGenerator(function* () { - yield _this2.validate(); - - if (_this2.error) { - _this2.color = `red`; - - _this2.fire(); - - _this2.render(); - - return; - } - - let x = _this2.value; - _this2.value = x !== `` ? x : _this2.initial; - _this2.done = true; - _this2.aborted = false; - _this2.error = false; - - _this2.fire(); - - _this2.render(); - - _this2.out.write(`\n`); - - _this2.close(); - })(); - } - - up() { - this.typed = ``; - if (this.value >= this.max) return this.bell(); - this.value += this.inc; - this.color = `cyan`; - this.fire(); - this.render(); - } - - down() { - this.typed = ``; - if (this.value <= this.min) return this.bell(); - this.value -= this.inc; - this.color = `cyan`; - this.fire(); - this.render(); - } - - delete() { - let val = this.value.toString(); - if (val.length === 0) return this.bell(); - this.value = this.parse(val = val.slice(0, -1)) || ``; - this.color = `cyan`; - this.fire(); - this.render(); - } - - next() { - this.value = this.initial; - this.fire(); - this.render(); - } - - _(c, key) { - if (!this.valid(c)) return this.bell(); - const now = Date.now(); - if (now - this.lastHit > 1000) this.typed = ``; // 1s elapsed - - this.typed += c; - this.lastHit = now; - this.color = `cyan`; - if (c === `.`) return this.fire(); - this.value = Math.min(this.parse(this.typed), this.max); - if (this.value > this.max) this.value = this.max; - if (this.value < this.min) this.value = this.min; - this.fire(); - this.render(); - } - - render() { - if (this.closed) return; - super.render(); - let clear = erase.line + (this.lines ? erase.down(this.lines) : ``) + cursor.to(0); - this.lines = 0; - let error = ``; - - if (this.error) { - let lines = this.errorMsg.split(`\n`); - error += lines.reduce((a, l, i) => a + `\n${i ? ` ` : figures.pointerSmall} ${color.red().italic(l)}`, ``); - this.lines = lines.length; - } - - let underline = !this.done || !this.done && !this.placeholder; - let prompt = [style.symbol(this.done, this.aborted), color.bold(this.msg), style.delimiter(this.done), underline ? color[this.color]().underline(this.rendered) : this.rendered].join(` `); - let position = ``; - - if (this.lines) { - position += cursor.up(this.lines); - position += cursor.left + cursor.to(strip(prompt).length); - } - - this.out.write(clear + prompt + error + position); - } - -} - -module.exports = NumberPrompt; \ No newline at end of file diff --git a/node_modules/prompts/dist/elements/prompt.js b/node_modules/prompts/dist/elements/prompt.js deleted file mode 100644 index c08142dd1..000000000 --- a/node_modules/prompts/dist/elements/prompt.js +++ /dev/null @@ -1,77 +0,0 @@ -'use strict'; - -const readline = require('readline'); - -const _require = require('../util'), - action = _require.action; - -const EventEmitter = require('events'); - -const _require2 = require('sisteransi'), - beep = _require2.beep, - cursor = _require2.cursor; - -const color = require('kleur'); -/** - * Base prompt skeleton - * @param {Stream} [opts.stdin] The Readable stream to listen to - * @param {Stream} [opts.stdout] The Writable stream to write readline data to - */ - - -class Prompt extends EventEmitter { - constructor(opts = {}) { - super(); - this.firstRender = true; - this.in = opts.in || process.stdin; - this.out = opts.out || process.stdout; - - this.onRender = (opts.onRender || (() => void 0)).bind(this); - - const rl = readline.createInterface(this.in); - readline.emitKeypressEvents(this.in, rl); - if (this.in.isTTY) this.in.setRawMode(true); - - const keypress = (str, key) => { - let a = action(key); - - if (a === false) { - this._ && this._(str, key); - } else if (typeof this[a] === 'function') { - this[a](key); - } else { - this.bell(); - } - }; - - this.close = () => { - this.out.write(cursor.show); - this.in.removeListener('keypress', keypress); - if (this.in.isTTY) this.in.setRawMode(false); - rl.close(); - this.emit(this.aborted ? 'abort' : 'submit', this.value); - this.closed = true; - }; - - this.in.on('keypress', keypress); - } - - fire() { - this.emit('state', { - value: this.value, - aborted: !!this.aborted - }); - } - - bell() { - this.out.write(beep); - } - - render() { - this.onRender(color); - if (this.firstRender) this.firstRender = false; - } - -} - -module.exports = Prompt; \ No newline at end of file diff --git a/node_modules/prompts/dist/elements/select.js b/node_modules/prompts/dist/elements/select.js deleted file mode 100644 index 60746769c..000000000 --- a/node_modules/prompts/dist/elements/select.js +++ /dev/null @@ -1,143 +0,0 @@ -'use strict'; - -const color = require('kleur'); - -const Prompt = require('./prompt'); - -const _require = require('../util'), - style = _require.style, - clear = _require.clear, - figures = _require.figures; - -const _require2 = require('sisteransi'), - erase = _require2.erase, - cursor = _require2.cursor; -/** - * SelectPrompt Base Element - * @param {Object} opts Options - * @param {String} opts.message Message - * @param {Array} opts.choices Array of choice objects - * @param {String} [opts.hint] Hint to display - * @param {Number} [opts.initial] Index of default value - * @param {Stream} [opts.stdin] The Readable stream to listen to - * @param {Stream} [opts.stdout] The Writable stream to write readline data to - */ - - -class SelectPrompt extends Prompt { - constructor(opts = {}) { - super(opts); - this.msg = opts.message; - this.hint = opts.hint || '- Use arrow-keys. Return to submit.'; - this.warn = opts.warn || '- This option is disabled'; - this.cursor = opts.initial || 0; - this.choices = opts.choices.map((ch, idx) => { - if (typeof ch === 'string') ch = { - title: ch, - value: idx - }; - return { - title: ch && (ch.title || ch.value || ch), - value: ch && (ch.value || idx), - selected: ch && ch.selected, - disabled: ch && ch.disabled - }; - }); - this.value = (this.choices[this.cursor] || {}).value; - this.clear = clear(''); - this.render(); - } - - moveCursor(n) { - this.cursor = n; - this.value = this.choices[n].value; - this.fire(); - } - - reset() { - this.moveCursor(0); - this.fire(); - this.render(); - } - - abort() { - this.done = this.aborted = true; - this.fire(); - this.render(); - this.out.write('\n'); - this.close(); - } - - submit() { - if (!this.selection.disabled) { - this.done = true; - this.aborted = false; - this.fire(); - this.render(); - this.out.write('\n'); - this.close(); - } else this.bell(); - } - - first() { - this.moveCursor(0); - this.render(); - } - - last() { - this.moveCursor(this.choices.length - 1); - this.render(); - } - - up() { - if (this.cursor === 0) return this.bell(); - this.moveCursor(this.cursor - 1); - this.render(); - } - - down() { - if (this.cursor === this.choices.length - 1) return this.bell(); - this.moveCursor(this.cursor + 1); - this.render(); - } - - next() { - this.moveCursor((this.cursor + 1) % this.choices.length); - this.render(); - } - - _(c, key) { - if (c === ' ') return this.submit(); - } - - get selection() { - return this.choices[this.cursor]; - } - - render() { - if (this.closed) return; - if (this.firstRender) this.out.write(cursor.hide);else this.out.write(erase.lines(this.choices.length + 1)); - super.render(); // Print prompt - - this.out.write([style.symbol(this.done, this.aborted), color.bold(this.msg), style.delimiter(false), this.done ? this.selection.title : this.selection.disabled ? color.yellow(this.warn) : color.gray(this.hint)].join(' ')); // Print choices - - if (!this.done) { - this.out.write('\n' + this.choices.map((v, i) => { - let title, prefix; - - if (v.disabled) { - title = this.cursor === i ? color.gray().underline(v.title) : color.strikethrough().gray(v.title); - prefix = this.cursor === i ? color.bold().gray(figures.pointer) + ' ' : ' '; - } else { - title = this.cursor === i ? color.cyan().underline(v.title) : v.title; - prefix = this.cursor === i ? color.cyan(figures.pointer) + ' ' : ' '; - } - - return `${prefix} ${title}`; - }).join('\n')); - } - } - -} - -module.exports = SelectPrompt; \ No newline at end of file diff --git a/node_modules/prompts/dist/elements/text.js b/node_modules/prompts/dist/elements/text.js deleted file mode 100644 index 763a02a64..000000000 --- a/node_modules/prompts/dist/elements/text.js +++ /dev/null @@ -1,220 +0,0 @@ -"use strict"; - -function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } } - -function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; } - -const color = require('kleur'); - -const Prompt = require('./prompt'); - -const _require = require('sisteransi'), - cursor = _require.cursor; - -const _require2 = require('../util'), - style = _require2.style, - clear = _require2.clear, - strip = _require2.strip, - figures = _require2.figures; -/** - * TextPrompt Base Element - * @param {Object} opts Options - * @param {String} opts.message Message - * @param {String} [opts.style='default'] Render style - * @param {String} [opts.initial] Default value - * @param {Function} [opts.validate] Validate function - * @param {Stream} [opts.stdin] The Readable stream to listen to - * @param {Stream} [opts.stdout] The Writable stream to write readline data to - * @param {String} [opts.error] The invalid error label - */ - - -class TextPrompt extends Prompt { - constructor(opts = {}) { - super(opts); - this.transform = style.render(opts.style); - this.scale = this.transform.scale; - this.msg = opts.message; - this.initial = opts.initial || ``; - - this.validator = opts.validate || (() => true); - - this.value = ``; - this.errorMsg = opts.error || `Please Enter A Valid Value`; - this.cursor = Number(!!this.initial); - this.clear = clear(``); - this.render(); - } - - set value(v) { - if (!v && this.initial) { - this.placeholder = true; - this.rendered = color.gray(this.transform.render(this.initial)); - } else { - this.placeholder = false; - this.rendered = this.transform.render(v); - } - - this._value = v; - this.fire(); - } - - get value() { - return this._value; - } - - reset() { - this.value = ``; - this.cursor = Number(!!this.initial); - this.fire(); - this.render(); - } - - abort() { - this.value = this.value || this.initial; - this.done = this.aborted = true; - this.error = false; - this.red = false; - this.fire(); - this.render(); - this.out.write('\n'); - this.close(); - } - - validate() { - var _this = this; - - return _asyncToGenerator(function* () { - let valid = yield _this.validator(_this.value); - - if (typeof valid === `string`) { - _this.errorMsg = valid; - valid = false; - } - - _this.error = !valid; - })(); - } - - submit() { - var _this2 = this; - - return _asyncToGenerator(function* () { - _this2.value = _this2.value || _this2.initial; - yield _this2.validate(); - - if (_this2.error) { - _this2.red = true; - - _this2.fire(); - - _this2.render(); - - return; - } - - _this2.done = true; - _this2.aborted = false; - - _this2.fire(); - - _this2.render(); - - _this2.out.write('\n'); - - _this2.close(); - })(); - } - - next() { - if (!this.placeholder) return this.bell(); - this.value = this.initial; - this.cursor = this.rendered.length; - this.fire(); - this.render(); - } - - moveCursor(n) { - if (this.placeholder) return; - this.cursor = this.cursor + n; - } - - _(c, key) { - let s1 = this.value.slice(0, this.cursor); - let s2 = this.value.slice(this.cursor); - this.value = `${s1}${c}${s2}`; - this.red = false; - this.cursor = this.placeholder ? 0 : s1.length + 1; - this.render(); - } - - delete() { - if (this.cursor === 0) return this.bell(); - let s1 = this.value.slice(0, this.cursor - 1); - let s2 = this.value.slice(this.cursor); - this.value = `${s1}${s2}`; - this.red = false; - this.moveCursor(-1); - this.render(); - } - - deleteForward() { - if (this.cursor * this.scale >= this.rendered.length || this.placeholder) return this.bell(); - let s1 = this.value.slice(0, this.cursor); - let s2 = this.value.slice(this.cursor + 1); - this.value = `${s1}${s2}`; - this.red = false; - this.render(); - } - - first() { - this.cursor = 0; - this.render(); - } - - last() { - this.cursor = this.value.length; - this.render(); - } - - left() { - if (this.cursor <= 0 || this.placeholder) return this.bell(); - this.moveCursor(-1); - this.render(); - } - - right() { - if (this.cursor * this.scale >= this.rendered.length || this.placeholder) return this.bell(); - this.moveCursor(1); - this.render(); - } - - render() { - if (this.closed) return; - super.render(); - let erase = (this.lines ? cursor.down(this.lines) : ``) + this.clear; - this.lines = 0; - let prompt = [style.symbol(this.done, this.aborted), color.bold(this.msg), style.delimiter(this.done), this.red ? color.red(this.rendered) : this.rendered].join(` `); - let error = ``; - - if (this.error) { - let lines = this.errorMsg.split(`\n`); - error += lines.reduce((a, l, i) => a += `\n${i ? ' ' : figures.pointerSmall} ${color.red().italic(l)}`, ``); - this.lines = lines.length; - } - - let position = ``; - - if (this.lines) { - position += cursor.up(this.lines); - position += cursor.left + cursor.to(strip(prompt).length); - } - - position += cursor.move(this.placeholder ? -this.initial.length * this.scale : -this.rendered.length + this.cursor * this.scale); - this.out.write(erase + prompt + error + position); - this.clear = clear(prompt + error); - } - -} - -module.exports = TextPrompt; \ No newline at end of file diff --git a/node_modules/prompts/dist/elements/toggle.js b/node_modules/prompts/dist/elements/toggle.js deleted file mode 100644 index 1b17a6b5f..000000000 --- a/node_modules/prompts/dist/elements/toggle.js +++ /dev/null @@ -1,119 +0,0 @@ -"use strict"; - -const color = require('kleur'); - -const Prompt = require('./prompt'); - -const _require = require('../util'), - style = _require.style, - clear = _require.clear; - -const _require2 = require('sisteransi'), - cursor = _require2.cursor, - erase = _require2.erase; -/** - * TogglePrompt Base Element - * @param {Object} opts Options - * @param {String} opts.message Message - * @param {Boolean} [opts.initial=false] Default value - * @param {String} [opts.active='no'] Active label - * @param {String} [opts.inactive='off'] Inactive label - * @param {Stream} [opts.stdin] The Readable stream to listen to - * @param {Stream} [opts.stdout] The Writable stream to write readline data to - */ - - -class TogglePrompt extends Prompt { - constructor(opts = {}) { - super(opts); - this.msg = opts.message; - this.value = !!opts.initial; - this.active = opts.active || 'on'; - this.inactive = opts.inactive || 'off'; - this.initialValue = this.value; - this.render(); - } - - reset() { - this.value = this.initialValue; - this.fire(); - this.render(); - } - - abort() { - this.done = this.aborted = true; - this.fire(); - this.render(); - this.out.write('\n'); - this.close(); - } - - submit() { - this.done = true; - this.aborted = false; - this.fire(); - this.render(); - this.out.write('\n'); - this.close(); - } - - deactivate() { - if (this.value === false) return this.bell(); - this.value = false; - this.render(); - } - - activate() { - if (this.value === true) return this.bell(); - this.value = true; - this.render(); - } - - delete() { - this.deactivate(); - } - - left() { - this.deactivate(); - } - - right() { - this.activate(); - } - - down() { - this.deactivate(); - } - - up() { - this.activate(); - } - - next() { - this.value = !this.value; - this.fire(); - this.render(); - } - - _(c, key) { - if (c === ' ') { - this.value = !this.value; - } else if (c === '1') { - this.value = true; - } else if (c === '0') { - this.value = false; - } else return this.bell(); - - this.render(); - } - - render() { - if (this.closed) return; - if (this.firstRender) this.out.write(cursor.hide); - super.render(); - this.out.write(erase.lines(this.first ? 1 : this.msg.split(/\n/g).length) + cursor.to(0) + [style.symbol(this.done, this.aborted), color.bold(this.msg), style.delimiter(this.done), this.value ? this.inactive : color.cyan().underline(this.inactive), color.gray('/'), this.value ? color.cyan().underline(this.active) : this.active].join(' ')); - } - -} - -module.exports = TogglePrompt; \ No newline at end of file diff --git a/node_modules/prompts/dist/index.js b/node_modules/prompts/dist/index.js deleted file mode 100644 index 56923c29c..000000000 --- a/node_modules/prompts/dist/index.js +++ /dev/null @@ -1,151 +0,0 @@ -'use strict'; - -function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; var ownKeys = Object.keys(source); if (typeof Object.getOwnPropertySymbols === 'function') { ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function (sym) { return Object.getOwnPropertyDescriptor(source, sym).enumerable; })); } ownKeys.forEach(function (key) { _defineProperty(target, key, source[key]); }); } return target; } - -function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } - -function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } } - -function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; } - -const prompts = require('./prompts'); - -const passOn = ['suggest', 'format', 'onState', 'validate', 'onRender']; - -const noop = () => {}; -/** - * Prompt for a series of questions - * @param {Array|Object} questions Single question object or Array of question objects - * @param {Function} [onSubmit] Callback function called on prompt submit - * @param {Function} [onCancel] Callback function called on cancel/abort - * @returns {Object} Object with values from user input - */ - - -function prompt() { - return _prompt.apply(this, arguments); -} - -function _prompt() { - _prompt = _asyncToGenerator(function* (questions = [], { - onSubmit = noop, - onCancel = noop - } = {}) { - const answers = {}; - const override = prompt._override || {}; - questions = [].concat(questions); - let answer, question, quit, name, type; - - const getFormattedAnswer = - /*#__PURE__*/ - function () { - var _ref = _asyncToGenerator(function* (question, answer, skipValidation = false) { - if (!skipValidation && question.validate && question.validate(answer) !== true) { - return; - } - - return question.format ? yield question.format(answer, answers) : answer; - }); - - return function getFormattedAnswer(_x, _x2) { - return _ref.apply(this, arguments); - }; - }(); - - var _iteratorNormalCompletion = true; - var _didIteratorError = false; - var _iteratorError = undefined; - - try { - for (var _iterator = questions[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) { - question = _step.value; - var _question = question; - name = _question.name; - type = _question.type; - - // if property is a function, invoke it unless it's a special function - for (let key in question) { - if (passOn.includes(key)) continue; - let value = question[key]; - question[key] = typeof value === 'function' ? yield value(answer, _objectSpread({}, answers), question) : value; - } - - if (typeof question.message !== 'string') { - throw new Error('prompt message is required'); - } // update vars in case they changed - - - var _question2 = question; - name = _question2.name; - type = _question2.type; - // skip if type is a falsy value - if (!type) continue; - - if (prompts[type] === void 0) { - throw new Error(`prompt type (${type}) is not defined`); - } - - if (override[question.name] !== undefined) { - answer = yield getFormattedAnswer(question, override[question.name]); - - if (answer !== undefined) { - answers[name] = answer; - continue; - } - } - - try { - // Get the injected answer if there is one or prompt the user - answer = prompt._injected ? getInjectedAnswer(prompt._injected) : yield prompts[type](question); - answers[name] = answer = yield getFormattedAnswer(question, answer, true); - quit = yield onSubmit(question, answer, answers); - } catch (err) { - quit = !(yield onCancel(question, answers)); - } - - if (quit) return answers; - } - } catch (err) { - _didIteratorError = true; - _iteratorError = err; - } finally { - try { - if (!_iteratorNormalCompletion && _iterator.return != null) { - _iterator.return(); - } - } finally { - if (_didIteratorError) { - throw _iteratorError; - } - } - } - - return answers; - }); - return _prompt.apply(this, arguments); -} - -function getInjectedAnswer(injected) { - const answer = injected.shift(); - - if (answer instanceof Error) { - throw answer; - } - - return answer; -} - -function inject(answers) { - prompt._injected = (prompt._injected || []).concat(answers); -} - -function override(answers) { - prompt._override = Object.assign({}, answers); -} - -module.exports = Object.assign(prompt, { - prompt, - prompts, - inject, - override -}); \ No newline at end of file diff --git a/node_modules/prompts/dist/prompts.js b/node_modules/prompts/dist/prompts.js deleted file mode 100644 index 82c39dd68..000000000 --- a/node_modules/prompts/dist/prompts.js +++ /dev/null @@ -1,219 +0,0 @@ -'use strict'; - -const $ = exports; - -const el = require('./elements'); - -const noop = v => v; - -function toPrompt(type, args, opts = {}) { - return new Promise((res, rej) => { - const p = new el[type](args); - const onAbort = opts.onAbort || noop; - const onSubmit = opts.onSubmit || noop; - p.on('state', args.onState || noop); - p.on('submit', x => res(onSubmit(x))); - p.on('abort', x => rej(onAbort(x))); - }); -} -/** - * Text prompt - * @param {string} args.message Prompt message to display - * @param {string} [args.initial] Default string value - * @param {string} [args.style="default"] Render style ('default', 'password', 'invisible') - * @param {function} [args.onState] On state change callback - * @param {function} [args.validate] Function to validate user input - * @param {Stream} [args.stdin] The Readable stream to listen to - * @param {Stream} [args.stdout] The Writable stream to write readline data to - * @returns {Promise} Promise with user input - */ - - -$.text = args => toPrompt('TextPrompt', args); -/** - * Password prompt with masked input - * @param {string} args.message Prompt message to display - * @param {string} [args.initial] Default string value - * @param {function} [args.onState] On state change callback - * @param {function} [args.validate] Function to validate user input - * @param {Stream} [args.stdin] The Readable stream to listen to - * @param {Stream} [args.stdout] The Writable stream to write readline data to - * @returns {Promise} Promise with user input - */ - - -$.password = args => { - args.style = 'password'; - return $.text(args); -}; -/** - * Prompt where input is invisible, like sudo - * @param {string} args.message Prompt message to display - * @param {string} [args.initial] Default string value - * @param {function} [args.onState] On state change callback - * @param {function} [args.validate] Function to validate user input - * @param {Stream} [args.stdin] The Readable stream to listen to - * @param {Stream} [args.stdout] The Writable stream to write readline data to - * @returns {Promise} Promise with user input - */ - - -$.invisible = args => { - args.style = 'invisible'; - return $.text(args); -}; -/** - * Number prompt - * @param {string} args.message Prompt message to display - * @param {number} args.initial Default number value - * @param {function} [args.onState] On state change callback - * @param {number} [args.max] Max value - * @param {number} [args.min] Min value - * @param {string} [args.style="default"] Render style ('default', 'password', 'invisible') - * @param {Boolean} [opts.float=false] Parse input as floats - * @param {Number} [opts.round=2] Round floats to x decimals - * @param {Number} [opts.increment=1] Number to increment by when using arrow-keys - * @param {function} [args.validate] Function to validate user input - * @param {Stream} [args.stdin] The Readable stream to listen to - * @param {Stream} [args.stdout] The Writable stream to write readline data to - * @returns {Promise} Promise with user input - */ - - -$.number = args => toPrompt('NumberPrompt', args); -/** - * Date prompt - * @param {string} args.message Prompt message to display - * @param {number} args.initial Default number value - * @param {function} [args.onState] On state change callback - * @param {number} [args.max] Max value - * @param {number} [args.min] Min value - * @param {string} [args.style="default"] Render style ('default', 'password', 'invisible') - * @param {Boolean} [opts.float=false] Parse input as floats - * @param {Number} [opts.round=2] Round floats to x decimals - * @param {Number} [opts.increment=1] Number to increment by when using arrow-keys - * @param {function} [args.validate] Function to validate user input - * @param {Stream} [args.stdin] The Readable stream to listen to - * @param {Stream} [args.stdout] The Writable stream to write readline data to - * @returns {Promise} Promise with user input - */ - - -$.date = args => toPrompt('DatePrompt', args); -/** - * Classic yes/no prompt - * @param {string} args.message Prompt message to display - * @param {boolean} [args.initial=false] Default value - * @param {function} [args.onState] On state change callback - * @param {Stream} [args.stdin] The Readable stream to listen to - * @param {Stream} [args.stdout] The Writable stream to write readline data to - * @returns {Promise} Promise with user input - */ - - -$.confirm = args => toPrompt('ConfirmPrompt', args); -/** - * List prompt, split intput string by `seperator` - * @param {string} args.message Prompt message to display - * @param {string} [args.initial] Default string value - * @param {string} [args.style="default"] Render style ('default', 'password', 'invisible') - * @param {string} [args.separator] String separator - * @param {function} [args.onState] On state change callback - * @param {Stream} [args.stdin] The Readable stream to listen to - * @param {Stream} [args.stdout] The Writable stream to write readline data to - * @returns {Promise} Promise with user input, in form of an `Array` - */ - - -$.list = args => { - const sep = args.separator || ','; - return toPrompt('TextPrompt', args, { - onSubmit: str => str.split(sep).map(s => s.trim()) - }); -}; -/** - * Toggle/switch prompt - * @param {string} args.message Prompt message to display - * @param {boolean} [args.initial=false] Default value - * @param {string} [args.active="on"] Text for `active` state - * @param {string} [args.inactive="off"] Text for `inactive` state - * @param {function} [args.onState] On state change callback - * @param {Stream} [args.stdin] The Readable stream to listen to - * @param {Stream} [args.stdout] The Writable stream to write readline data to - * @returns {Promise} Promise with user input - */ - - -$.toggle = args => toPrompt('TogglePrompt', args); -/** - * Interactive select prompt - * @param {string} args.message Prompt message to display - * @param {Array} args.choices Array of choices objects `[{ title, value }, ...]` - * @param {number} [args.initial] Index of default value - * @param {String} [args.hint] Hint to display - * @param {function} [args.onState] On state change callback - * @param {Stream} [args.stdin] The Readable stream to listen to - * @param {Stream} [args.stdout] The Writable stream to write readline data to - * @returns {Promise} Promise with user input - */ - - -$.select = args => toPrompt('SelectPrompt', args); -/** - * Interactive multi-select / autocompleteMultiselect prompt - * @param {string} args.message Prompt message to display - * @param {Array} args.choices Array of choices objects `[{ title, value, [selected] }, ...]` - * @param {number} [args.max] Max select - * @param {string} [args.hint] Hint to display user - * @param {Number} [args.cursor=0] Cursor start position - * @param {function} [args.onState] On state change callback - * @param {Stream} [args.stdin] The Readable stream to listen to - * @param {Stream} [args.stdout] The Writable stream to write readline data to - * @returns {Promise} Promise with user input - */ - - -$.multiselect = args => { - args.choices = [].concat(args.choices || []); - - const toSelected = items => items.filter(item => item.selected).map(item => item.value); - - return toPrompt('MultiselectPrompt', args, { - onAbort: toSelected, - onSubmit: toSelected - }); -}; - -$.autocompleteMultiselect = args => { - args.choices = [].concat(args.choices || []); - - const toSelected = items => items.filter(item => item.selected).map(item => item.value); - - return toPrompt('AutocompleteMultiselectPrompt', args, { - onAbort: toSelected, - onSubmit: toSelected - }); -}; - -const byTitle = (input, choices) => Promise.resolve(choices.filter(item => item.title.slice(0, input.length).toLowerCase() === input.toLowerCase())); -/** - * Interactive auto-complete prompt - * @param {string} args.message Prompt message to display - * @param {Array} args.choices Array of auto-complete choices objects `[{ title, value }, ...]` - * @param {Function} [args.suggest] Function to filter results based on user input. Defaults to sort by `title` - * @param {number} [args.limit=10] Max number of results to show - * @param {string} [args.style="default"] Render style ('default', 'password', 'invisible') - * @param {String} [args.initial] Index of the default value - * @param {String} [args.fallback] Fallback message - defaults to initial value - * @param {function} [args.onState] On state change callback - * @param {Stream} [args.stdin] The Readable stream to listen to - * @param {Stream} [args.stdout] The Writable stream to write readline data to - * @returns {Promise} Promise with user input - */ - - -$.autocomplete = args => { - args.suggest = args.suggest || byTitle; - args.choices = [].concat(args.choices || []); - return toPrompt('AutocompletePrompt', args); -}; \ No newline at end of file diff --git a/node_modules/prompts/dist/util/action.js b/node_modules/prompts/dist/util/action.js deleted file mode 100644 index 76a2c8434..000000000 --- a/node_modules/prompts/dist/util/action.js +++ /dev/null @@ -1,27 +0,0 @@ -'use strict'; - -module.exports = key => { - if (key.ctrl) { - if (key.name === 'a') return 'first'; - if (key.name === 'c') return 'abort'; - if (key.name === 'd') return 'abort'; - if (key.name === 'e') return 'last'; - if (key.name === 'g') return 'reset'; - } - - if (key.name === 'return') return 'submit'; - if (key.name === 'enter') return 'submit'; // ctrl + J - - if (key.name === 'backspace') return 'delete'; - if (key.name === 'delete') return 'deleteForward'; - if (key.name === 'abort') return 'abort'; - if (key.name === 'escape') return 'abort'; - if (key.name === 'tab') return 'next'; - if (key.name === 'pagedown') return 'nextPage'; - if (key.name === 'pageup') return 'prevPage'; - if (key.name === 'up') return 'up'; - if (key.name === 'down') return 'down'; - if (key.name === 'right') return 'right'; - if (key.name === 'left') return 'left'; - return false; -}; \ No newline at end of file diff --git a/node_modules/prompts/dist/util/clear.js b/node_modules/prompts/dist/util/clear.js deleted file mode 100644 index 56a331c7a..000000000 --- a/node_modules/prompts/dist/util/clear.js +++ /dev/null @@ -1,40 +0,0 @@ -'use strict'; - -const strip = require('./strip'); - -const _require = require('sisteransi'), - erase = _require.erase, - cursor = _require.cursor; - -const width = str => [...strip(str)].length; - -module.exports = function (prompt, perLine = process.stdout.columns) { - if (!perLine) return erase.line + cursor.to(0); - let rows = 0; - const lines = prompt.split(/\r?\n/); - var _iteratorNormalCompletion = true; - var _didIteratorError = false; - var _iteratorError = undefined; - - try { - for (var _iterator = lines[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) { - let line = _step.value; - rows += 1 + Math.floor(Math.max(width(line) - 1, 0) / perLine); - } - } catch (err) { - _didIteratorError = true; - _iteratorError = err; - } finally { - try { - if (!_iteratorNormalCompletion && _iterator.return != null) { - _iterator.return(); - } - } finally { - if (_didIteratorError) { - throw _iteratorError; - } - } - } - - return (erase.line + cursor.prevLine()).repeat(rows - 1) + erase.line + cursor.to(0); -}; \ No newline at end of file diff --git a/node_modules/prompts/dist/util/figures.js b/node_modules/prompts/dist/util/figures.js deleted file mode 100644 index 036ec5016..000000000 --- a/node_modules/prompts/dist/util/figures.js +++ /dev/null @@ -1,32 +0,0 @@ -'use strict'; - -const main = { - arrowUp: '↑', - arrowDown: '↓', - arrowLeft: '←', - arrowRight: '→', - radioOn: '◉', - radioOff: '◯', - tick: '✔', - cross: '✖', - ellipsis: '…', - pointerSmall: '›', - line: '─', - pointer: '❯' -}; -const win = { - arrowUp: main.arrowUp, - arrowDown: main.arrowDown, - arrowLeft: main.arrowLeft, - arrowRight: main.arrowRight, - radioOn: '(*)', - radioOff: '( )', - tick: '√', - cross: '×', - ellipsis: '...', - pointerSmall: '»', - line: '─', - pointer: '>' -}; -const figures = process.platform === 'win32' ? win : main; -module.exports = figures; \ No newline at end of file diff --git a/node_modules/prompts/dist/util/index.js b/node_modules/prompts/dist/util/index.js deleted file mode 100644 index 8e73f7b41..000000000 --- a/node_modules/prompts/dist/util/index.js +++ /dev/null @@ -1,9 +0,0 @@ -'use strict'; - -module.exports = { - action: require('./action'), - clear: require('./clear'), - style: require('./style'), - strip: require('./strip'), - figures: require('./figures') -}; \ No newline at end of file diff --git a/node_modules/prompts/dist/util/strip.js b/node_modules/prompts/dist/util/strip.js deleted file mode 100644 index abc99585f..000000000 --- a/node_modules/prompts/dist/util/strip.js +++ /dev/null @@ -1,7 +0,0 @@ -'use strict'; - -module.exports = str => { - const pattern = ['[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:[a-zA-Z\\d]*(?:;[a-zA-Z\\d]*)*)?\\u0007)', '(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PRZcf-ntqry=><~]))'].join('|'); - const RGX = new RegExp(pattern, 'g'); - return typeof str === 'string' ? str.replace(RGX, '') : str; -}; \ No newline at end of file diff --git a/node_modules/prompts/dist/util/style.js b/node_modules/prompts/dist/util/style.js deleted file mode 100644 index a02e4e3d6..000000000 --- a/node_modules/prompts/dist/util/style.js +++ /dev/null @@ -1,50 +0,0 @@ -'use strict'; - -const c = require('kleur'); - -const figures = require('./figures'); // rendering user input. - - -const styles = Object.freeze({ - password: { - scale: 1, - render: input => '*'.repeat(input.length) - }, - emoji: { - scale: 2, - render: input => '😃'.repeat(input.length) - }, - invisible: { - scale: 0, - render: input => '' - }, - default: { - scale: 1, - render: input => `${input}` - } -}); - -const render = type => styles[type] || styles.default; // icon to signalize a prompt. - - -const symbols = Object.freeze({ - aborted: c.red(figures.cross), - done: c.green(figures.tick), - default: c.cyan('?') -}); - -const symbol = (done, aborted) => aborted ? symbols.aborted : done ? symbols.done : symbols.default; // between the question and the user's input. - - -const delimiter = completing => c.gray(completing ? figures.ellipsis : figures.pointerSmall); - -const item = (expandable, expanded) => c.gray(expandable ? expanded ? figures.pointerSmall : '+' : figures.line); - -module.exports = { - styles, - render, - symbols, - symbol, - delimiter, - item -}; \ No newline at end of file diff --git a/node_modules/prompts/index.js b/node_modules/prompts/index.js deleted file mode 100644 index 3479956c4..000000000 --- a/node_modules/prompts/index.js +++ /dev/null @@ -1,14 +0,0 @@ -function isNodeLT(tar) { - tar = (Array.isArray(tar) ? tar : tar.split('.')).map(Number); - let i=0, src=process.versions.node.split('.').map(Number); - for (; i < tar.length; i++) { - if (src[i] > tar[i]) return false; - if (tar[i] > src[i]) return true; - } - return false; -} - -module.exports = - isNodeLT('8.6.0') - ? require('./dist/index.js') - : require('./lib/index.js'); diff --git a/node_modules/prompts/lib/dateparts/datepart.js b/node_modules/prompts/lib/dateparts/datepart.js deleted file mode 100644 index 62b893bca..000000000 --- a/node_modules/prompts/lib/dateparts/datepart.js +++ /dev/null @@ -1,35 +0,0 @@ -'use strict'; - -class DatePart { - constructor({token, date, parts, locales}) { - this.token = token; - this.date = date || new Date(); - this.parts = parts || [this]; - this.locales = locales || {}; - } - - up() {} - - down() {} - - next() { - const currentIdx = this.parts.indexOf(this); - return this.parts.find((part, idx) => idx > currentIdx && part instanceof DatePart); - } - - setTo(val) {} - - prev() { - let parts = [].concat(this.parts).reverse(); - const currentIdx = parts.indexOf(this); - return parts.find((part, idx) => idx > currentIdx && part instanceof DatePart); - } - - toString() { - return String(this.date); - } -} - -module.exports = DatePart; - - diff --git a/node_modules/prompts/lib/dateparts/day.js b/node_modules/prompts/lib/dateparts/day.js deleted file mode 100644 index 5db84fe1f..000000000 --- a/node_modules/prompts/lib/dateparts/day.js +++ /dev/null @@ -1,42 +0,0 @@ -'use strict'; - -const DatePart = require('./datepart'); - -const pos = n => { - n = n % 10; - return n === 1 ? 'st' - : n === 2 ? 'nd' - : n === 3 ? 'rd' - : 'th'; -} - -class Day extends DatePart { - constructor(opts={}) { - super(opts); - } - - up() { - this.date.setDate(this.date.getDate() + 1); - } - - down() { - this.date.setDate(this.date.getDate() - 1); - } - - setTo(val) { - this.date.setDate(parseInt(val.substr(-2))); - } - - toString() { - let date = this.date.getDate(); - let day = this.date.getDay(); - return this.token === 'DD' ? String(date).padStart(2, '0') - : this.token === 'Do' ? date + pos(date) - : this.token === 'd' ? day + 1 - : this.token === 'ddd' ? this.locales.weekdaysShort[day] - : this.token === 'dddd' ? this.locales.weekdays[day] - : date; - } -} - -module.exports = Day; diff --git a/node_modules/prompts/lib/dateparts/hours.js b/node_modules/prompts/lib/dateparts/hours.js deleted file mode 100644 index 171b3d2c2..000000000 --- a/node_modules/prompts/lib/dateparts/hours.js +++ /dev/null @@ -1,30 +0,0 @@ -'use strict'; - -const DatePart = require('./datepart'); - -class Hours extends DatePart { - constructor(opts={}) { - super(opts); - } - - up() { - this.date.setHours(this.date.getHours() + 1); - } - - down() { - this.date.setHours(this.date.getHours() - 1); - } - - setTo(val) { - this.date.setHours(parseInt(val.substr(-2))); - } - - toString() { - let hours = this.date.getHours(); - if (/h/.test(this.token)) - hours = (hours % 12) || 12; - return this.token.length > 1 ? String(hours).padStart(2, '0') : hours; - } -} - -module.exports = Hours; diff --git a/node_modules/prompts/lib/dateparts/index.js b/node_modules/prompts/lib/dateparts/index.js deleted file mode 100644 index dc0cc9530..000000000 --- a/node_modules/prompts/lib/dateparts/index.js +++ /dev/null @@ -1,13 +0,0 @@ -'use strict'; - -module.exports = { - DatePart: require('./datepart'), - Meridiem: require('./meridiem'), - Day: require('./day'), - Hours: require('./hours'), - Milliseconds: require('./milliseconds'), - Minutes: require('./minutes'), - Month: require('./month'), - Seconds: require('./seconds'), - Year: require('./year'), -} diff --git a/node_modules/prompts/lib/dateparts/meridiem.js b/node_modules/prompts/lib/dateparts/meridiem.js deleted file mode 100644 index 8488677b4..000000000 --- a/node_modules/prompts/lib/dateparts/meridiem.js +++ /dev/null @@ -1,24 +0,0 @@ -'use strict'; - -const DatePart = require('./datepart'); - -class Meridiem extends DatePart { - constructor(opts={}) { - super(opts); - } - - up() { - this.date.setHours((this.date.getHours() + 12) % 24); - } - - down() { - this.up(); - } - - toString() { - let meridiem = this.date.getHours() > 12 ? 'pm' : 'am'; - return /\A/.test(this.token) ? meridiem.toUpperCase() : meridiem; - } -} - -module.exports = Meridiem; diff --git a/node_modules/prompts/lib/dateparts/milliseconds.js b/node_modules/prompts/lib/dateparts/milliseconds.js deleted file mode 100644 index 898427024..000000000 --- a/node_modules/prompts/lib/dateparts/milliseconds.js +++ /dev/null @@ -1,28 +0,0 @@ -'use strict'; - -const DatePart = require('./datepart'); - -class Milliseconds extends DatePart { - constructor(opts={}) { - super(opts); - } - - up() { - this.date.setMilliseconds(this.date.getMilliseconds() + 1); - } - - down() { - this.date.setMilliseconds(this.date.getMilliseconds() - 1); - } - - setTo(val) { - this.date.setMilliseconds(parseInt(val.substr(-(this.token.length)))); - } - - toString() { - return String(this.date.getMilliseconds()).padStart(4, '0') - .substr(0, this.token.length); - } -} - -module.exports = Milliseconds; diff --git a/node_modules/prompts/lib/dateparts/minutes.js b/node_modules/prompts/lib/dateparts/minutes.js deleted file mode 100644 index aa1d8f7e0..000000000 --- a/node_modules/prompts/lib/dateparts/minutes.js +++ /dev/null @@ -1,28 +0,0 @@ -'use strict'; - -const DatePart = require('./datepart'); - -class Minutes extends DatePart { - constructor(opts={}) { - super(opts); - } - - up() { - this.date.setMinutes(this.date.getMinutes() + 1); - } - - down() { - this.date.setMinutes(this.date.getMinutes() - 1); - } - - setTo(val) { - this.date.setMinutes(parseInt(val.substr(-2))); - } - - toString() { - let m = this.date.getMinutes(); - return this.token.length > 1 ? String(m).padStart(2, '0') : m; - } -} - -module.exports = Minutes; diff --git a/node_modules/prompts/lib/dateparts/month.js b/node_modules/prompts/lib/dateparts/month.js deleted file mode 100644 index f65645590..000000000 --- a/node_modules/prompts/lib/dateparts/month.js +++ /dev/null @@ -1,33 +0,0 @@ -'use strict'; - -const DatePart = require('./datepart'); - -class Month extends DatePart { - constructor(opts={}) { - super(opts); - } - - up() { - this.date.setMonth(this.date.getMonth() + 1); - } - - down() { - this.date.setMonth(this.date.getMonth() - 1); - } - - setTo(val) { - val = parseInt(val.substr(-2)) - 1; - this.date.setMonth(val < 0 ? 0 : val); - } - - toString() { - let month = this.date.getMonth(); - let tl = this.token.length; - return tl === 2 ? String(month + 1).padStart(2, '0') - : tl === 3 ? this.locales.monthsShort[month] - : tl === 4 ? this.locales.months[month] - : String(month + 1); - } -} - -module.exports = Month; diff --git a/node_modules/prompts/lib/dateparts/seconds.js b/node_modules/prompts/lib/dateparts/seconds.js deleted file mode 100644 index 0c1a1a4f7..000000000 --- a/node_modules/prompts/lib/dateparts/seconds.js +++ /dev/null @@ -1,28 +0,0 @@ -'use strict'; - -const DatePart = require('./datepart'); - -class Seconds extends DatePart { - constructor(opts={}) { - super(opts); - } - - up() { - this.date.setSeconds(this.date.getSeconds() + 1); - } - - down() { - this.date.setSeconds(this.date.getSeconds() - 1); - } - - setTo(val) { - this.date.setSeconds(parseInt(val.substr(-2))); - } - - toString() { - let s = this.date.getSeconds(); - return this.token.length > 1 ? String(s).padStart(2, '0') : s; - } -} - -module.exports = Seconds; diff --git a/node_modules/prompts/lib/dateparts/year.js b/node_modules/prompts/lib/dateparts/year.js deleted file mode 100644 index f068e4302..000000000 --- a/node_modules/prompts/lib/dateparts/year.js +++ /dev/null @@ -1,28 +0,0 @@ -'use strict'; - -const DatePart = require('./datepart'); - -class Year extends DatePart { - constructor(opts={}) { - super(opts); - } - - up() { - this.date.setFullYear(this.date.getFullYear() + 1); - } - - down() { - this.date.setFullYear(this.date.getFullYear() - 1); - } - - setTo(val) { - this.date.setFullYear(val.substr(-4)); - } - - toString() { - let year = String(this.date.getFullYear()).padStart(4, '0'); - return this.token.length === 2 ? year.substr(-2) : year; - } -} - -module.exports = Year; diff --git a/node_modules/prompts/lib/elements/autocomplete.js b/node_modules/prompts/lib/elements/autocomplete.js deleted file mode 100644 index bb4b859c5..000000000 --- a/node_modules/prompts/lib/elements/autocomplete.js +++ /dev/null @@ -1,264 +0,0 @@ -'use strict'; - -const color = require('kleur'); -const Prompt = require('./prompt'); -const { cursor } = require('sisteransi'); -const { style, clear, figures, strip } = require('../util'); - -const getVal = (arr, i) => arr[i] && (arr[i].value || arr[i].title || arr[i]); -const getTitle = (arr, i) => arr[i] && (arr[i].title || arr[i].value || arr[i]); -const getIndex = (arr, valOrTitle) => { - const index = arr.findIndex(el => el.value === valOrTitle || el.title === valOrTitle); - return index > -1 ? index : undefined; -}; - -/** - * TextPrompt Base Element - * @param {Object} opts Options - * @param {String} opts.message Message - * @param {Array} opts.choices Array of auto-complete choices objects - * @param {Function} [opts.suggest] Filter function. Defaults to sort by title - * @param {Number} [opts.limit=10] Max number of results to show - * @param {Number} [opts.cursor=0] Cursor start position - * @param {String} [opts.style='default'] Render style - * @param {String} [opts.fallback] Fallback message - initial to default value - * @param {String} [opts.initial] Index of the default value - * @param {Stream} [opts.stdin] The Readable stream to listen to - * @param {Stream} [opts.stdout] The Writable stream to write readline data to - * @param {String} [opts.noMatches] The no matches found label - */ -class AutocompletePrompt extends Prompt { - constructor(opts={}) { - super(opts); - this.msg = opts.message; - this.suggest = opts.suggest; - this.choices = opts.choices; - this.initial = typeof opts.initial === 'number' - ? opts.initial - : getIndex(opts.choices, opts.initial); - this.select = this.initial || opts.cursor || 0; - this.fallback = opts.fallback || ( - opts.initial !== undefined ? - `${figures.pointerSmall} ${getTitle(this.choices, this.initial)}` : - `${figures.pointerSmall} ${opts.noMatches || 'no matches found'}` - ); - this.suggestions = [[]]; - this.page = 0; - this.input = ''; - this.limit = opts.limit || 10; - this.cursor = 0; - this.transform = style.render(opts.style); - this.scale = this.transform.scale; - this.render = this.render.bind(this); - this.complete = this.complete.bind(this); - this.clear = clear(''); - this.complete(this.render); - this.render(); - } - - moveSelect(i) { - this.select = i; - if (this.suggestions[this.page].length > 0) { - this.value = getVal(this.suggestions[this.page], i); - } else { - this.value = this.initial !== undefined - ? getVal(this.choices, this.initial) - : null; - } - this.fire(); - } - - async complete(cb) { - const p = (this.completing = this.suggest(this.input, this.choices)); - const suggestions = await p; - - if (this.completing !== p) return; - this.suggestions = suggestions - .map((s, i, arr) => ({title: getTitle(arr, i), value: getVal(arr, i)})) - .reduce((arr, sug) => { - if (arr[arr.length - 1].length < this.limit) - arr[arr.length - 1].push(sug); - else arr.push([sug]); - return arr; - }, [[]]); - this.isFallback = false; - this.completing = false; - if (!this.suggestions[this.page]) - this.page = 0; - - if (!this.suggestions.length && this.fallback) { - const index = getIndex(this.choices, this.fallback); - this.suggestions = [[]]; - if (index !== undefined) - this.suggestions[0].push({ title: getTitle(this.choices, index), value: getVal(this.choices, index) }); - this.isFallback = true; - } - - const l = Math.max(suggestions.length - 1, 0); - this.moveSelect(Math.min(l, this.select)); - - cb && cb(); - } - - reset() { - this.input = ''; - this.complete(() => { - this.moveSelect(this.initial !== void 0 ? this.initial : 0); - this.render(); - }); - this.render(); - } - - abort() { - this.done = this.aborted = true; - this.fire(); - this.render(); - this.out.write('\n'); - this.close(); - } - - submit() { - this.done = true; - this.aborted = false; - this.fire(); - this.render(); - this.out.write('\n'); - this.close(); - } - - _(c, key) { // TODO on ctrl+# go to page # - let s1 = this.input.slice(0, this.cursor); - let s2 = this.input.slice(this.cursor); - this.input = `${s1}${c}${s2}`; - this.cursor = s1.length+1; - this.complete(this.render); - this.render(); - } - - delete() { - if (this.cursor === 0) return this.bell(); - let s1 = this.input.slice(0, this.cursor-1); - let s2 = this.input.slice(this.cursor); - this.input = `${s1}${s2}`; - this.complete(this.render); - this.cursor = this.cursor-1; - this.render(); - } - - deleteForward() { - if(this.cursor*this.scale >= this.rendered.length) return this.bell(); - let s1 = this.input.slice(0, this.cursor); - let s2 = this.input.slice(this.cursor+1); - this.input = `${s1}${s2}`; - this.complete(this.render); - this.render(); - } - - first() { - this.moveSelect(0); - this.render(); - } - - last() { - this.moveSelect(this.suggestions[this.page].length - 1); - this.render(); - } - - up() { - if (this.select <= 0) return this.bell(); - this.moveSelect(this.select - 1); - this.render(); - } - - down() { - if (this.select >= this.suggestions[this.page].length - 1) return this.bell(); - this.moveSelect(this.select + 1); - this.render(); - } - - next() { - if (this.select === this.suggestions[this.page].length - 1) { - this.page = (this.page + 1) % this.suggestions.length; - this.moveSelect(0); - } else this.moveSelect(this.select + 1); - this.render(); - } - - nextPage() { - if (this.page >= this.suggestions.length - 1) - return this.bell(); - this.page++; - this.moveSelect(0); - this.render(); - } - - prevPage() { - if (this.page <= 0) - return this.bell(); - this.page--; - this.moveSelect(0); - this.render(); - } - - left() { - if (this.cursor <= 0) return this.bell(); - this.cursor = this.cursor-1; - this.render(); - } - - right() { - if (this.cursor*this.scale >= this.rendered.length) return this.bell(); - this.cursor = this.cursor+1; - this.render(); - } - - render() { - if (this.closed) return; - super.render(); - if (this.lineCount) this.out.write(cursor.down(this.lineCount)); - - let prompt = color.bold(`${style.symbol(this.done, this.aborted)} ${this.msg} `) - + `${style.delimiter(this.completing)} `; - let length = strip(prompt).length; - - if (this.done && this.suggestions[this.page][this.select]) { - prompt += `${this.suggestions[this.page][this.select].title}`; - } else { - this.rendered = `${this.transform.render(this.input)}`; - length += this.rendered.length; - prompt += this.rendered; - } - - if (!this.done) { - this.lineCount = this.suggestions[this.page].length; - let suggestions = this.suggestions[this.page].reduce((acc, item, i) => - acc + `\n${i === this.select ? color.cyan(item.title) : item.title}`, ''); - if (suggestions && !this.isFallback) { - prompt += suggestions; - if (this.suggestions.length > 1) { - this.lineCount++; - prompt += color.blue(`\nPage ${this.page+1}/${this.suggestions.length}`); - } - } else { - const fallbackIndex = getIndex(this.choices, this.fallback); - const fallbackTitle = fallbackIndex !== undefined - ? getTitle(this.choices, fallbackIndex) - : this.fallback; - prompt += `\n${color.gray(fallbackTitle)}`; - this.lineCount++; - } - } - - this.out.write(this.clear + prompt); - this.clear = clear(prompt); - - if (this.lineCount && !this.done) { - let pos = cursor.up(this.lineCount); - pos += cursor.left+cursor.to(length); - pos += cursor.move(-this.rendered.length+this.cursor*this.scale); - this.out.write(pos); - } - } -} - -module.exports = AutocompletePrompt; diff --git a/node_modules/prompts/lib/elements/autocompleteMultiselect.js b/node_modules/prompts/lib/elements/autocompleteMultiselect.js deleted file mode 100644 index 2f053ac53..000000000 --- a/node_modules/prompts/lib/elements/autocompleteMultiselect.js +++ /dev/null @@ -1,189 +0,0 @@ -'use strict'; - -const color = require('kleur'); -const { cursor } = require('sisteransi'); -const MultiselectPrompt = require('./multiselect'); -const { clear, style, figures } = require('../util'); -/** - * MultiselectPrompt Base Element - * @param {Object} opts Options - * @param {String} opts.message Message - * @param {Array} opts.choices Array of choice objects - * @param {String} [opts.hint] Hint to display - * @param {String} [opts.warn] Hint shown for disabled choices - * @param {Number} [opts.max] Max choices - * @param {Number} [opts.cursor=0] Cursor start position - * @param {Stream} [opts.stdin] The Readable stream to listen to - * @param {Stream} [opts.stdout] The Writable stream to write readline data to - */ -class AutocompleteMultiselectPrompt extends MultiselectPrompt { - constructor(opts={}) { - opts.overrideRender = true; - super(opts); - this.inputValue = ''; - this.clear = clear(''); - this.filteredOptions = this.value; - this.render(); - } - - last() { - this.cursor = this.filteredOptions.length - 1; - this.render(); - } - next() { - this.cursor = (this.cursor + 1) % this.filteredOptions.length; - this.render(); - } - - up() { - if (this.cursor === 0) { - this.cursor = this.filteredOptions.length - 1; - } else { - this.cursor--; - } - this.render(); - } - - down() { - if (this.cursor === this.filteredOptions.length - 1) { - this.cursor = 0; - } else { - this.cursor++; - } - this.render(); - } - - left() { - this.filteredOptions[this.cursor].selected = false; - this.render(); - } - - right() { - if (this.value.filter(e => e.selected).length >= this.maxChoices) return this.bell(); - this.filteredOptions[this.cursor].selected = true; - this.render(); - } - - delete() { - if (this.inputValue.length) { - this.inputValue = this.inputValue.substr(0, this.inputValue.length - 1); - this.updateFilteredOptions(); - } - } - - updateFilteredOptions() { - const currentHighlight = this.filteredOptions[this.cursor]; - this.filteredOptions = this.value - .filter(v => { - if (this.inputValue) { - if (typeof v.title === 'string') { - if (v.title.toLowerCase().includes(this.inputValue.toLowerCase())) { - return true; - } - } - if (typeof v.value === 'string') { - if (v.value.toLowerCase().includes(this.inputValue.toLowerCase())) { - return true; - } - } - return false; - } - return true; - }); - const newHighlightIndex = this.filteredOptions.findIndex(v => v === currentHighlight) - this.cursor = newHighlightIndex < 0 ? 0 : newHighlightIndex; - this.render(); - } - - handleSpaceToggle() { - const v = this.filteredOptions[this.cursor]; - - if (v.selected) { - v.selected = false; - this.render(); - } else if (v.disabled || this.value.filter(e => e.selected).length >= this.maxChoices) { - return this.bell(); - } else { - v.selected = true; - this.render(); - } - } - - handleInputChange(c) { - this.inputValue = this.inputValue + c; - this.updateFilteredOptions(); - } - - _(c, key) { - if (c === ' ') { - this.handleSpaceToggle(); - } else { - this.handleInputChange(c); - } - } - - renderInstructions() { - return ` -Instructions: - ${figures.arrowUp}/${figures.arrowDown}: Highlight option - ${figures.arrowLeft}/${figures.arrowRight}/[space]: Toggle selection - [a,b,c]/delete: Filter choices - enter/return: Complete answer - ` - } - - renderCurrentInput() { - return ` -Filtered results for: ${this.inputValue ? this.inputValue : color.gray('Enter something to filter')}\n`; - } - - renderOption(cursor, v, i) { - let title; - if (v.disabled) title = cursor === i ? color.gray().underline(v.title) : color.strikethrough().gray(v.title); - else title = cursor === i ? color.cyan().underline(v.title) : v.title; - return (v.selected ? color.green(figures.radioOn) : figures.radioOff) + ' ' + title - } - - renderDoneOrInstructions() { - if (this.done) { - const selected = this.value - .filter(e => e.selected) - .map(v => v.title) - .join(', '); - return selected; - } - - const output = [color.gray(this.hint), this.renderInstructions(), this.renderCurrentInput()]; - - if (this.filteredOptions.length && this.filteredOptions[this.cursor].disabled) { - output.push(color.yellow(this.warn)); - } - return output.join(' '); - } - - render() { - if (this.closed) return; - if (this.firstRender) this.out.write(cursor.hide); - super.render(); - - // print prompt - - let prompt = [ - style.symbol(this.done, this.aborted), - color.bold(this.msg), - style.delimiter(false), - this.renderDoneOrInstructions() - ].join(' '); - - if (this.showMinError) { - prompt += color.red(`You must select a minimum of ${this.minSelected} choices.`); - this.showMinError = false; - } - prompt += this.renderOptions(this.filteredOptions); - - this.out.write(this.clear + prompt); - this.clear = clear(prompt); - } -} - -module.exports = AutocompleteMultiselectPrompt; diff --git a/node_modules/prompts/lib/elements/confirm.js b/node_modules/prompts/lib/elements/confirm.js deleted file mode 100644 index e5ce738f0..000000000 --- a/node_modules/prompts/lib/elements/confirm.js +++ /dev/null @@ -1,87 +0,0 @@ -const color = require('kleur'); -const Prompt = require('./prompt'); -const { style } = require('../util'); -const { erase, cursor } = require('sisteransi'); - -/** - * ConfirmPrompt Base Element - * @param {Object} opts Options - * @param {String} opts.message Message - * @param {Boolean} [opts.initial] Default value (true/false) - * @param {Stream} [opts.stdin] The Readable stream to listen to - * @param {Stream} [opts.stdout] The Writable stream to write readline data to - * @param {String} [opts.yes] The "Yes" label - * @param {String} [opts.yesOption] The "Yes" option when choosing between yes/no - * @param {String} [opts.no] The "No" label - * @param {String} [opts.noOption] The "No" option when choosing between yes/no - */ -class ConfirmPrompt extends Prompt { - constructor(opts={}) { - super(opts); - this.msg = opts.message; - this.value = opts.initial; - this.initialValue = !!opts.initial; - this.yesMsg = opts.yes || 'yes'; - this.yesOption = opts.yesOption || '(Y/n)'; - this.noMsg = opts.no || 'no'; - this.noOption = opts.noOption || '(y/N)'; - this.render(); - } - - reset() { - this.value = this.initialValue; - this.fire(); - this.render(); - } - - abort() { - this.done = this.aborted = true; - this.fire(); - this.render(); - this.out.write('\n'); - this.close(); - } - - submit() { - this.value = this.value || false; - this.done = true; - this.aborted = false; - this.fire(); - this.render(); - this.out.write('\n'); - this.close(); - } - - _(c, key) { - if (c.toLowerCase() === 'y') { - this.value = true; - return this.submit(); - } - if (c.toLowerCase() === 'n') { - this.value = false; - return this.submit(); - } - return this.bell(); - } - - render() { - if (this.closed) return; - if (this.firstRender) this.out.write(cursor.hide); - super.render(); - - this.out.write( - erase.line + - cursor.to(0) + - [ - style.symbol(this.done, this.aborted), - color.bold(this.msg), - style.delimiter(this.done), - this.done - ? this.value ? this.yesMsg : this.noMsg - : color.gray(this.initialValue ? this.yesOption : this.noOption) - ].join(' ') - ); - } -} - -module.exports = ConfirmPrompt; diff --git a/node_modules/prompts/lib/elements/date.js b/node_modules/prompts/lib/elements/date.js deleted file mode 100644 index d74b863ee..000000000 --- a/node_modules/prompts/lib/elements/date.js +++ /dev/null @@ -1,213 +0,0 @@ -'use strict'; - -const color = require('kleur'); -const Prompt = require('./prompt'); -const { style, clear, figures, strip } = require('../util'); -const { erase, cursor } = require('sisteransi'); -const { DatePart, Meridiem, Day, Hours, Milliseconds, Minutes, Month, Seconds, Year } = require('../dateparts'); - -const regex = /\\(.)|"((?:\\["\\]|[^"])+)"|(D[Do]?|d{3,4}|d)|(M{1,4})|(YY(?:YY)?)|([aA])|([Hh]{1,2})|(m{1,2})|(s{1,2})|(S{1,4})|./g; -const regexGroups = { - 1: ({token}) => token.replace(/\\(.)/g, '$1'), - 2: (opts) => new Day(opts), // Day // TODO - 3: (opts) => new Month(opts), // Month - 4: (opts) => new Year(opts), // Year - 5: (opts) => new Meridiem(opts), // AM/PM // TODO (special) - 6: (opts) => new Hours(opts), // Hours - 7: (opts) => new Minutes(opts), // Minutes - 8: (opts) => new Seconds(opts), // Seconds - 9: (opts) => new Milliseconds(opts), // Fractional seconds -} - -const dfltLocales = { - months: 'January,February,March,April,May,June,July,August,September,October,November,December'.split(','), - monthsShort: 'Jan,Feb,Mar,Apr,May,Jun,Jul,Aug,Sep,Oct,Nov,Dec'.split(','), - weekdays: 'Sunday,Monday,Tuesday,Wednesday,Thursday,Friday,Saturday'.split(','), - weekdaysShort: 'Sun,Mon,Tue,Wed,Thu,Fri,Sat'.split(',') -} - -/** - * DatePrompt Base Element - * @param {Object} opts Options - * @param {String} opts.message Message - * @param {Number} [opts.initial] Index of default value - * @param {String} [opts.mask] The format mask - * @param {object} [opts.locales] The date locales - * @param {String} [opts.error] The error message shown on invalid value - * @param {Function} [opts.validate] Function to validate the submitted value - * @param {Stream} [opts.stdin] The Readable stream to listen to - * @param {Stream} [opts.stdout] The Writable stream to write readline data to - */ -class DatePrompt extends Prompt { - constructor(opts={}) { - super(opts); - this.msg = opts.message; - this.cursor = 0; - this.typed = ''; - this.locales = Object.assign(dfltLocales, opts.locales); - this._date = opts.initial || new Date(); - this.errorMsg = opts.error || 'Please Enter A Valid Value'; - this.validator = opts.validate || (() => true); - this.mask = opts.mask || 'YYYY-MM-DD HH:mm:ss'; - this.clear = clear(''); - this.render(); - } - - get value() { - return this.date - } - - get date() { - return this._date; - } - - set date(date) { - if (date) this._date.setTime(date.getTime()); - } - - set mask(mask) { - let result; - this.parts = []; - while(result = regex.exec(mask)) { - let match = result.shift(); - let idx = result.findIndex(gr => gr != null); - this.parts.push(idx in regexGroups - ? regexGroups[idx]({ token: result[idx] || match, date: this.date, parts: this.parts, locales: this.locales }) - : result[idx] || match); - } - - let parts = this.parts.reduce((arr, i) => { - if (typeof i === 'string' && typeof arr[arr.length - 1] === 'string') - arr[arr.length - 1] += i; - else arr.push(i); - return arr; - }, []); - - this.parts.splice(0); - this.parts.push(...parts); - this.reset(); - } - - moveCursor(n) { - this.typed = ''; - this.cursor = n; - this.fire(); - } - - reset() { - this.moveCursor(this.parts.findIndex(p => p instanceof DatePart)); - this.fire(); - this.render(); - } - - abort() { - this.done = this.aborted = true; - this.error = false; - this.fire(); - this.render(); - this.out.write('\n'); - this.close(); - } - - async validate() { - let valid = await this.validator(this.value); - if (typeof valid === 'string') { - this.errorMsg = valid; - valid = false; - } - this.error = !valid; - } - - async submit() { - await this.validate(); - if (this.error) { - this.color = 'red'; - this.fire(); - this.render(); - return; - } - this.done = true; - this.aborted = false; - this.fire(); - this.render(); - this.out.write('\n'); - this.close(); - } - - up() { - this.typed = ''; - this.parts[this.cursor].up(); - this.render(); - } - - down() { - this.typed = ''; - this.parts[this.cursor].down(); - this.render(); - } - - left() { - let prev = this.parts[this.cursor].prev(); - if (prev == null) return this.bell(); - this.moveCursor(this.parts.indexOf(prev)); - this.render(); - } - - right() { - let next = this.parts[this.cursor].next(); - if (next == null) return this.bell(); - this.moveCursor(this.parts.indexOf(next)); - this.render(); - } - - next() { - let next = this.parts[this.cursor].next(); - this.moveCursor(next - ? this.parts.indexOf(next) - : this.parts.findIndex((part) => part instanceof DatePart)); - this.render(); - } - - _(c) { - if (/\d/.test(c)) { - this.typed += c; - this.parts[this.cursor].setTo(this.typed); - this.render(); - } - } - - render() { - if (this.closed) return; - if (this.firstRender) this.out.write(cursor.hide); - else this.out.write(erase.lines(1)); - super.render(); - let clear = erase.line + (this.lines ? erase.down(this.lines) : '') + cursor.to(0); - this.lines = 0; - - let error = ''; - if (this.error) { - let lines = this.errorMsg.split('\n'); - error = lines.reduce((a, l, i) => a + `\n${i ? ` ` : figures.pointerSmall} ${color.red().italic(l)}`, ``); - this.lines = lines.length; - } - - // Print prompt - let prompt = [ - style.symbol(this.done, this.aborted), - color.bold(this.msg), - style.delimiter(false), - this.parts.reduce((arr, p, idx) => arr.concat(idx === this.cursor && !this.done ? color.cyan().underline(p.toString()) : p), []) - .join(''), - ].join(' '); - - let position = ''; - if (this.lines) { - position += cursor.up(this.lines); - position += cursor.left+cursor.to(strip(prompt).length); - } - - this.out.write(clear+prompt+error+position); - } -} - -module.exports = DatePrompt; diff --git a/node_modules/prompts/lib/elements/index.js b/node_modules/prompts/lib/elements/index.js deleted file mode 100644 index 2556dd051..000000000 --- a/node_modules/prompts/lib/elements/index.js +++ /dev/null @@ -1,13 +0,0 @@ -'use strict'; - -module.exports = { - TextPrompt: require('./text'), - SelectPrompt: require('./select'), - TogglePrompt: require('./toggle'), - DatePrompt: require('./date'), - NumberPrompt: require('./number'), - MultiselectPrompt: require('./multiselect'), - AutocompletePrompt: require('./autocomplete'), - AutocompleteMultiselectPrompt: require('./autocompleteMultiselect'), - ConfirmPrompt: require('./confirm') -}; diff --git a/node_modules/prompts/lib/elements/multiselect.js b/node_modules/prompts/lib/elements/multiselect.js deleted file mode 100644 index cd3da11f6..000000000 --- a/node_modules/prompts/lib/elements/multiselect.js +++ /dev/null @@ -1,238 +0,0 @@ -'use strict'; - -const color = require('kleur'); -const { cursor } = require('sisteransi'); -const Prompt = require('./prompt'); -const { clear, figures, style } = require('../util'); - -/** - * MultiselectPrompt Base Element - * @param {Object} opts Options - * @param {String} opts.message Message - * @param {Array} opts.choices Array of choice objects - * @param {String} [opts.hint] Hint to display - * @param {String} [opts.warn] Hint shown for disabled choices - * @param {Number} [opts.max] Max choices - * @param {Number} [opts.cursor=0] Cursor start position - * @param {Stream} [opts.stdin] The Readable stream to listen to - * @param {Stream} [opts.stdout] The Writable stream to write readline data to - */ -class MultiselectPrompt extends Prompt { - constructor(opts={}) { - super(opts); - this.msg = opts.message; - this.cursor = opts.cursor || 0; - this.scrollIndex = opts.cursor || 0; - this.hint = opts.hint || ''; - this.warn = opts.warn || '- This option is disabled -'; - this.minSelected = opts.min; - this.showMinError = false; - this.maxChoices = opts.max; - this.value = opts.choices.map((ch, idx) => { - if (typeof ch === 'string') - ch = {title: ch, value: idx}; - return { - title: ch && (ch.title || ch.value || ch), - value: ch && (ch.value || idx), - selected: ch && ch.selected, - disabled: ch && ch.disabled - }; - }); - this.clear = clear(''); - if (!opts.overrideRender) { - this.render(); - } - } - - reset() { - this.value.map(v => !v.selected); - this.cursor = 0; - this.fire(); - this.render(); - } - - selected() { - return this.value.filter(v => v.selected); - } - - abort() { - this.done = this.aborted = true; - this.fire(); - this.render(); - this.out.write('\n'); - this.close(); - } - - submit() { - const selected = this.value - .filter(e => e.selected); - if (this.minSelected && selected.length < this.minSelected) { - this.showMinError = true; - this.render(); - } else { - this.done = true; - this.aborted = false; - this.fire(); - this.render(); - this.out.write('\n'); - this.close(); - } - } - - first() { - this.cursor = 0; - this.render(); - } - - last() { - this.cursor = this.value.length - 1; - this.render(); - } - next() { - this.cursor = (this.cursor + 1) % this.value.length; - this.render(); - } - - up() { - if (this.cursor === 0) { - this.cursor = this.value.length - 1; - } else { - this.cursor--; - } - this.render(); - } - - down() { - if (this.cursor === this.value.length - 1) { - this.cursor = 0; - } else { - this.cursor++; - } - this.render(); - } - - left() { - this.value[this.cursor].selected = false; - this.render(); - } - - right() { - if (this.value.filter(e => e.selected).length >= this.maxChoices) return this.bell(); - this.value[this.cursor].selected = true; - this.render(); - } - - handleSpaceToggle() { - const v = this.value[this.cursor]; - - if (v.selected) { - v.selected = false; - this.render(); - } else if (v.disabled || this.value.filter(e => e.selected).length >= this.maxChoices) { - return this.bell(); - } else { - v.selected = true; - this.render(); - } - } - - _(c, key) { - if (c === ' ') { - this.handleSpaceToggle(); - } else { - return this.bell(); - } - } - - renderInstructions() { - return ` -Instructions: - ${figures.arrowUp}/${figures.arrowDown}: Highlight option - ${figures.arrowLeft}/${figures.arrowRight}/[space]: Toggle selection - enter/return: Complete answer - ` - } - - renderOption(cursor, v, i) { - let title; - if (v.disabled) title = cursor === i ? color.gray().underline(v.title) : color.strikethrough().gray(v.title); - else title = cursor === i ? color.cyan().underline(v.title) : v.title; - return (v.selected ? color.green(figures.radioOn) : figures.radioOff) + ' ' + title - } - - // shared with autocompleteMultiselect - paginateOptions(options) { - const c = this.cursor; - let styledOptions = options.map((v, i) => this.renderOption(c, v, i)); - const numOfOptionsToRender = 10; // if needed, can add an option to change this. - - let scopedOptions = styledOptions; - let hint = ''; - if (styledOptions.length === 0) { - return color.red('No matches for this query.'); - } else if (styledOptions.length > numOfOptionsToRender) { - let startIndex = c - (numOfOptionsToRender / 2); - let endIndex = c + (numOfOptionsToRender / 2); - if (startIndex < 0) { - startIndex = 0; - endIndex = numOfOptionsToRender; - } else if (endIndex > options.length) { - endIndex = options.length; - startIndex = endIndex - numOfOptionsToRender; - } - scopedOptions = styledOptions.slice(startIndex, endIndex); - hint = color.dim('(Move up and down to reveal more choices)'); - } - return '\n' + scopedOptions.join('\n') + '\n' + hint; - } - - // shared with autocomleteMultiselect - renderOptions(options) { - if (!this.done) { - return this.paginateOptions(options); - } - return ''; - } - - renderDoneOrInstructions() { - if (this.done) { - const selected = this.value - .filter(e => e.selected) - .map(v => v.title) - .join(', '); - return selected; - } - - const output = [color.gray(this.hint), this.renderInstructions()]; - - if (this.value[this.cursor].disabled) { - output.push(color.yellow(this.warn)); - } - return output.join(' '); - } - - render() { - if (this.closed) return; - if (this.firstRender) this.out.write(cursor.hide); - super.render(); - - // print prompt - - let prompt = [ - style.symbol(this.done, this.aborted), - color.bold(this.msg), - style.delimiter(false), - this.renderDoneOrInstructions() - ].join(' '); - if (this.showMinError) { - prompt += color.red(`You must select a minimum of ${this.minSelected} choices.`); - this.showMinError = false; - } - prompt += this.renderOptions(this.value); - - this.out.write(this.clear + prompt); - this.clear = clear(prompt); - } -} - -module.exports = MultiselectPrompt; diff --git a/node_modules/prompts/lib/elements/number.js b/node_modules/prompts/lib/elements/number.js deleted file mode 100644 index f0a50cf5b..000000000 --- a/node_modules/prompts/lib/elements/number.js +++ /dev/null @@ -1,202 +0,0 @@ -const color = require('kleur'); -const Prompt = require('./prompt'); -const { cursor, erase } = require('sisteransi'); -const { style, clear, figures, strip } = require('../util'); - -const isNumber = /[0-9]/; -const isDef = any => any !== undefined; -const round = (number, precision) => { - let factor = Math.pow(10, precision); - return Math.round(number * factor) / factor; -} - -/** - * NumberPrompt Base Element - * @param {Object} opts Options - * @param {String} opts.message Message - * @param {String} [opts.style='default'] Render style - * @param {Number} [opts.initial] Default value - * @param {Number} [opts.max=+Infinity] Max value - * @param {Number} [opts.min=-Infinity] Min value - * @param {Boolean} [opts.float=false] Parse input as floats - * @param {Number} [opts.round=2] Round floats to x decimals - * @param {Number} [opts.increment=1] Number to increment by when using arrow-keys - * @param {Function} [opts.validate] Validate function - * @param {Stream} [opts.stdin] The Readable stream to listen to - * @param {Stream} [opts.stdout] The Writable stream to write readline data to - * @param {String} [opts.error] The invalid error label - */ -class NumberPrompt extends Prompt { - constructor(opts={}) { - super(opts); - this.transform = style.render(opts.style); - this.msg = opts.message; - this.initial = isDef(opts.initial) ? opts.initial : ''; - this.float = !!opts.float; - this.round = opts.round || 2; - this.inc = opts.increment || 1; - this.min = isDef(opts.min) ? opts.min : -Infinity; - this.max = isDef(opts.max) ? opts.max : Infinity; - this.errorMsg = opts.error || `Please Enter A Valid Value`; - this.validator = opts.validate || (() => true); - this.color = `cyan`; - this.value = ``; - this.typed = ``; - this.lastHit = 0; - this.render(); - } - - set value(v) { - if (!v && v !== 0) { - this.placeholder = true; - this.rendered = color.gray(this.transform.render(`${this.initial}`)); - this._value = ``; - } else { - this.placeholder = false; - this.rendered = this.transform.render(`${round(v, this.round)}`); - this._value = round(v, this.round); - } - this.fire(); - } - - get value() { - return this._value; - } - - parse(x) { - return this.float ? parseFloat(x) : parseInt(x); - } - - valid(c) { - return c === `-` || c === `.` && this.float || isNumber.test(c) - } - - reset() { - this.typed = ``; - this.value = ``; - this.fire(); - this.render(); - } - - abort() { - let x = this.value; - this.value = x !== `` ? x : this.initial; - this.done = this.aborted = true; - this.error = false; - this.fire(); - this.render(); - this.out.write(`\n`); - this.close(); - } - - async validate() { - let valid = await this.validator(this.value); - if (typeof valid === `string`) { - this.errorMsg = valid; - valid = false; - } - this.error = !valid; - } - - async submit() { - await this.validate(); - if (this.error) { - this.color = `red`; - this.fire(); - this.render(); - return; - } - let x = this.value; - this.value = x !== `` ? x : this.initial; - this.done = true; - this.aborted = false; - this.error = false; - this.fire(); - this.render(); - this.out.write(`\n`); - this.close(); - } - - up() { - this.typed = ``; - if (this.value >= this.max) return this.bell(); - this.value += this.inc; - this.color = `cyan`; - this.fire(); - this.render(); - } - - down() { - this.typed = ``; - if (this.value <= this.min) return this.bell(); - this.value -= this.inc; - this.color = `cyan`; - this.fire(); - this.render(); - } - - delete() { - let val = this.value.toString(); - if (val.length === 0) return this.bell(); - this.value = this.parse((val = val.slice(0, -1))) || ``; - this.color = `cyan`; - this.fire(); - this.render(); - } - - next() { - this.value = this.initial; - this.fire(); - this.render(); - } - - _(c, key) { - if (!this.valid(c)) return this.bell(); - - const now = Date.now(); - if (now - this.lastHit > 1000) this.typed = ``; // 1s elapsed - this.typed += c; - this.lastHit = now; - this.color = `cyan`; - - if (c === `.`) return this.fire(); - - this.value = Math.min(this.parse(this.typed), this.max); - if (this.value > this.max) this.value = this.max; - if (this.value < this.min) this.value = this.min; - this.fire(); - this.render(); - } - - render() { - if (this.closed) return; - super.render(); - let clear = erase.line + (this.lines ? erase.down(this.lines) : ``) + cursor.to(0); - this.lines = 0; - - let error = ``; - if (this.error) { - let lines = this.errorMsg.split(`\n`); - error += lines.reduce((a, l, i) => a + `\n${i ? ` ` : figures.pointerSmall} ${color.red().italic(l)}`, ``); - this.lines = lines.length; - } - - let underline = !this.done || (!this.done && !this.placeholder); - let prompt = [ - style.symbol(this.done, this.aborted), - color.bold(this.msg), - style.delimiter(this.done), - underline ? color[this.color]().underline(this.rendered) : this.rendered - ].join(` `); - - let position = ``; - if (this.lines) { - position += cursor.up(this.lines); - position += cursor.left+cursor.to(strip(prompt).length); - } - - this.out.write(clear+prompt+error+position); - } -} - -module.exports = NumberPrompt; diff --git a/node_modules/prompts/lib/elements/prompt.js b/node_modules/prompts/lib/elements/prompt.js deleted file mode 100644 index fb244ad39..000000000 --- a/node_modules/prompts/lib/elements/prompt.js +++ /dev/null @@ -1,68 +0,0 @@ -'use strict'; - -const readline = require('readline'); -const { action } = require('../util'); -const EventEmitter = require('events'); -const { beep, cursor } = require('sisteransi'); -const color = require('kleur'); - -/** - * Base prompt skeleton - * @param {Stream} [opts.stdin] The Readable stream to listen to - * @param {Stream} [opts.stdout] The Writable stream to write readline data to - */ -class Prompt extends EventEmitter { - constructor(opts={}) { - super(); - - this.firstRender = true; - this.in = opts.in || process.stdin; - this.out = opts.out || process.stdout; - this.onRender = (opts.onRender || (() => void 0)).bind(this); - - const rl = readline.createInterface(this.in); - readline.emitKeypressEvents(this.in, rl); - - if (this.in.isTTY) this.in.setRawMode(true); - - const keypress = (str, key) => { - let a = action(key); - if (a === false) { - this._ && this._(str, key); - } else if (typeof this[a] === 'function') { - this[a](key); - } else { - this.bell(); - } - }; - - this.close = () => { - this.out.write(cursor.show); - this.in.removeListener('keypress', keypress); - if (this.in.isTTY) this.in.setRawMode(false); - rl.close(); - this.emit(this.aborted ? 'abort' : 'submit', this.value); - this.closed = true; - }; - - this.in.on('keypress', keypress); - } - - fire() { - this.emit('state', { - value: this.value, - aborted: !!this.aborted - }); - } - - bell() { - this.out.write(beep); - } - - render() { - this.onRender(color); - if (this.firstRender) this.firstRender = false; - } -} - -module.exports = Prompt; diff --git a/node_modules/prompts/lib/elements/select.js b/node_modules/prompts/lib/elements/select.js deleted file mode 100644 index 26d98c3b6..000000000 --- a/node_modules/prompts/lib/elements/select.js +++ /dev/null @@ -1,144 +0,0 @@ -'use strict'; - -const color = require('kleur'); -const Prompt = require('./prompt'); -const { style, clear, figures } = require('../util'); -const { erase, cursor } = require('sisteransi'); - -/** - * SelectPrompt Base Element - * @param {Object} opts Options - * @param {String} opts.message Message - * @param {Array} opts.choices Array of choice objects - * @param {String} [opts.hint] Hint to display - * @param {Number} [opts.initial] Index of default value - * @param {Stream} [opts.stdin] The Readable stream to listen to - * @param {Stream} [opts.stdout] The Writable stream to write readline data to - */ -class SelectPrompt extends Prompt { - constructor(opts={}) { - super(opts); - this.msg = opts.message; - this.hint = opts.hint || '- Use arrow-keys. Return to submit.'; - this.warn = opts.warn || '- This option is disabled'; - this.cursor = opts.initial || 0; - this.choices = opts.choices.map((ch, idx) => { - if (typeof ch === 'string') - ch = {title: ch, value: idx}; - return { - title: ch && (ch.title || ch.value || ch), - value: ch && (ch.value || idx), - selected: ch && ch.selected, - disabled: ch && ch.disabled - }; - }); - this.value = (this.choices[this.cursor] || {}).value; - this.clear = clear(''); - this.render(); - } - - moveCursor(n) { - this.cursor = n; - this.value = this.choices[n].value; - this.fire(); - } - - reset() { - this.moveCursor(0); - this.fire(); - this.render(); - } - - abort() { - this.done = this.aborted = true; - this.fire(); - this.render(); - this.out.write('\n'); - this.close(); - } - - submit() { - if (!this.selection.disabled) { - this.done = true; - this.aborted = false; - this.fire(); - this.render(); - this.out.write('\n'); - this.close(); - } else - this.bell(); - } - - first() { - this.moveCursor(0); - this.render(); - } - - last() { - this.moveCursor(this.choices.length - 1); - this.render(); - } - - up() { - if (this.cursor === 0) return this.bell(); - this.moveCursor(this.cursor - 1); - this.render(); - } - - down() { - if (this.cursor === this.choices.length - 1) return this.bell(); - this.moveCursor(this.cursor + 1); - this.render(); - } - - next() { - this.moveCursor((this.cursor + 1) % this.choices.length); - this.render(); - } - - _(c, key) { - if (c === ' ') return this.submit(); - } - - get selection() { - return this.choices[this.cursor]; - } - - render() { - if (this.closed) return; - if (this.firstRender) this.out.write(cursor.hide); - else this.out.write(erase.lines(this.choices.length + 1)); - super.render(); - - // Print prompt - this.out.write([ - style.symbol(this.done, this.aborted), - color.bold(this.msg), - style.delimiter(false), - this.done ? this.selection.title : this.selection.disabled - ? color.yellow(this.warn) : color.gray(this.hint) - ].join(' ')); - - // Print choices - if (!this.done) { - this.out.write( - '\n' + - this.choices - .map((v, i) => { - let title, prefix; - if (v.disabled) { - title = this.cursor === i ? color.gray().underline(v.title) : color.strikethrough().gray(v.title); - prefix = this.cursor === i ? color.bold().gray(figures.pointer) + ' ' : ' '; - } else { - title = this.cursor === i ? color.cyan().underline(v.title) : v.title; - prefix = this.cursor === i ? color.cyan(figures.pointer) + ' ' : ' '; - } - return `${prefix} ${title}`; - }) - .join('\n') - ); - } - } -} - -module.exports = SelectPrompt; diff --git a/node_modules/prompts/lib/elements/text.js b/node_modules/prompts/lib/elements/text.js deleted file mode 100644 index 3a85a7aef..000000000 --- a/node_modules/prompts/lib/elements/text.js +++ /dev/null @@ -1,190 +0,0 @@ -const color = require('kleur'); -const Prompt = require('./prompt'); -const { cursor } = require('sisteransi'); -const { style, clear, strip, figures } = require('../util'); - -/** - * TextPrompt Base Element - * @param {Object} opts Options - * @param {String} opts.message Message - * @param {String} [opts.style='default'] Render style - * @param {String} [opts.initial] Default value - * @param {Function} [opts.validate] Validate function - * @param {Stream} [opts.stdin] The Readable stream to listen to - * @param {Stream} [opts.stdout] The Writable stream to write readline data to - * @param {String} [opts.error] The invalid error label - */ -class TextPrompt extends Prompt { - constructor(opts={}) { - super(opts); - this.transform = style.render(opts.style); - this.scale = this.transform.scale; - this.msg = opts.message; - this.initial = opts.initial || ``; - this.validator = opts.validate || (() => true); - this.value = ``; - this.errorMsg = opts.error || `Please Enter A Valid Value`; - this.cursor = Number(!!this.initial); - this.clear = clear(``); - this.render(); - } - - set value(v) { - if (!v && this.initial) { - this.placeholder = true; - this.rendered = color.gray(this.transform.render(this.initial)); - } else { - this.placeholder = false; - this.rendered = this.transform.render(v); - } - this._value = v; - this.fire(); - } - - get value() { - return this._value; - } - - reset() { - this.value = ``; - this.cursor = Number(!!this.initial); - this.fire(); - this.render(); - } - - abort() { - this.value = this.value || this.initial; - this.done = this.aborted = true; - this.error = false; - this.red = false; - this.fire(); - this.render(); - this.out.write('\n'); - this.close(); - } - - async validate() { - let valid = await this.validator(this.value); - if (typeof valid === `string`) { - this.errorMsg = valid; - valid = false; - } - this.error = !valid; - } - - async submit() { - this.value = this.value || this.initial; - await this.validate(); - if (this.error) { - this.red = true; - this.fire(); - this.render(); - return; - } - this.done = true; - this.aborted = false; - this.fire(); - this.render(); - this.out.write('\n'); - this.close(); - } - - next() { - if (!this.placeholder) return this.bell(); - this.value = this.initial; - this.cursor = this.rendered.length; - this.fire(); - this.render(); - } - - moveCursor(n) { - if (this.placeholder) return; - this.cursor = this.cursor+n; - } - - _(c, key) { - let s1 = this.value.slice(0, this.cursor); - let s2 = this.value.slice(this.cursor); - this.value = `${s1}${c}${s2}`; - this.red = false; - this.cursor = this.placeholder ? 0 : s1.length+1; - this.render(); - } - - delete() { - if (this.cursor === 0) return this.bell(); - let s1 = this.value.slice(0, this.cursor-1); - let s2 = this.value.slice(this.cursor); - this.value = `${s1}${s2}`; - this.red = false; - this.moveCursor(-1); - this.render(); - } - - deleteForward() { - if(this.cursor*this.scale >= this.rendered.length || this.placeholder) return this.bell(); - let s1 = this.value.slice(0, this.cursor); - let s2 = this.value.slice(this.cursor+1); - this.value = `${s1}${s2}`; - this.red = false; - this.render(); - } - - first() { - this.cursor = 0; - this.render(); - } - - last() { - this.cursor = this.value.length; - this.render(); - } - - left() { - if (this.cursor <= 0 || this.placeholder) return this.bell(); - this.moveCursor(-1); - this.render(); - } - - right() { - if (this.cursor*this.scale >= this.rendered.length || this.placeholder) return this.bell(); - this.moveCursor(1); - this.render(); - } - - render() { - if (this.closed) return; - super.render(); - let erase = (this.lines ? cursor.down(this.lines) : ``)+this.clear; - this.lines = 0; - - let prompt = [ - style.symbol(this.done, this.aborted), - color.bold(this.msg), - style.delimiter(this.done), - this.red ? color.red(this.rendered) : this.rendered - ].join(` `); - - let error = ``; - if (this.error) { - let lines = this.errorMsg.split(`\n`); - error += lines.reduce((a, l, i) => a += `\n${i ? ' ' : figures.pointerSmall} ${color.red().italic(l)}`, ``); - this.lines = lines.length; - } - - let position = ``; - if (this.lines) { - position += cursor.up(this.lines); - position += cursor.left+cursor.to(strip(prompt).length); - } - position += cursor.move(this.placeholder ? - -this.initial.length*this.scale : - -this.rendered.length+this.cursor*this.scale - ); - - this.out.write(erase+prompt+error+position); - this.clear = clear(prompt+error); - } -} - -module.exports = TextPrompt; diff --git a/node_modules/prompts/lib/elements/toggle.js b/node_modules/prompts/lib/elements/toggle.js deleted file mode 100644 index b542c0966..000000000 --- a/node_modules/prompts/lib/elements/toggle.js +++ /dev/null @@ -1,114 +0,0 @@ -const color = require('kleur'); -const Prompt = require('./prompt'); -const { style, clear } = require('../util'); -const { cursor, erase } = require('sisteransi'); - -/** - * TogglePrompt Base Element - * @param {Object} opts Options - * @param {String} opts.message Message - * @param {Boolean} [opts.initial=false] Default value - * @param {String} [opts.active='no'] Active label - * @param {String} [opts.inactive='off'] Inactive label - * @param {Stream} [opts.stdin] The Readable stream to listen to - * @param {Stream} [opts.stdout] The Writable stream to write readline data to - */ -class TogglePrompt extends Prompt { - constructor(opts={}) { - super(opts); - this.msg = opts.message; - this.value = !!opts.initial; - this.active = opts.active || 'on'; - this.inactive = opts.inactive || 'off'; - this.initialValue = this.value; - this.render(); - } - - reset() { - this.value = this.initialValue; - this.fire(); - this.render(); - } - - abort() { - this.done = this.aborted = true; - this.fire(); - this.render(); - this.out.write('\n'); - this.close(); - } - - submit() { - this.done = true; - this.aborted = false; - this.fire(); - this.render(); - this.out.write('\n'); - this.close(); - } - - deactivate() { - if (this.value === false) return this.bell(); - this.value = false; - this.render(); - } - - activate() { - if (this.value === true) return this.bell(); - this.value = true; - this.render(); - } - - delete() { - this.deactivate(); - } - left() { - this.deactivate(); - } - right() { - this.activate(); - } - down() { - this.deactivate(); - } - up() { - this.activate(); - } - - next() { - this.value = !this.value; - this.fire(); - this.render(); - } - - _(c, key) { - if (c === ' ') { - this.value = !this.value; - } else if (c === '1') { - this.value = true; - } else if (c === '0') { - this.value = false; - } else return this.bell(); - this.render(); - } - - render() { - if (this.closed) return; - if (this.firstRender) this.out.write(cursor.hide); - super.render(); - - this.out.write( - erase.lines(this.first ? 1 : this.msg.split(/\n/g).length) + - cursor.to(0) + [ - style.symbol(this.done, this.aborted), - color.bold(this.msg), - style.delimiter(this.done), - this.value ? this.inactive : color.cyan().underline(this.inactive), - color.gray('/'), - this.value ? color.cyan().underline(this.active) : this.active - ].join(' ') - ); - } -} - -module.exports = TogglePrompt; diff --git a/node_modules/prompts/lib/index.js b/node_modules/prompts/lib/index.js deleted file mode 100644 index 66648cb60..000000000 --- a/node_modules/prompts/lib/index.js +++ /dev/null @@ -1,92 +0,0 @@ -'use strict'; - -const prompts = require('./prompts'); - -const passOn = ['suggest', 'format', 'onState', 'validate', 'onRender']; -const noop = () => {}; - -/** - * Prompt for a series of questions - * @param {Array|Object} questions Single question object or Array of question objects - * @param {Function} [onSubmit] Callback function called on prompt submit - * @param {Function} [onCancel] Callback function called on cancel/abort - * @returns {Object} Object with values from user input - */ -async function prompt(questions=[], { onSubmit=noop, onCancel=noop }={}) { - const answers = {}; - const override = prompt._override || {}; - questions = [].concat(questions); - let answer, question, quit, name, type; - - const getFormattedAnswer = async (question, answer, skipValidation = false) => { - if (!skipValidation && question.validate && question.validate(answer) !== true) { - return; - } - return question.format ? await question.format(answer, answers) : answer - }; - - for (question of questions) { - ({ name, type } = question); - - // if property is a function, invoke it unless it's a special function - for (let key in question) { - if (passOn.includes(key)) continue; - let value = question[key]; - question[key] = typeof value === 'function' ? await value(answer, { ...answers }, question) : value; - } - - if (typeof question.message !== 'string') { - throw new Error('prompt message is required'); - } - - // update vars in case they changed - ({ name, type } = question); - - // skip if type is a falsy value - if (!type) continue; - - if (prompts[type] === void 0) { - throw new Error(`prompt type (${type}) is not defined`); - } - - if (override[question.name] !== undefined) { - answer = await getFormattedAnswer(question, override[question.name]); - if (answer !== undefined) { - answers[name] = answer; - continue; - } - } - - try { - // Get the injected answer if there is one or prompt the user - answer = prompt._injected ? getInjectedAnswer(prompt._injected) : await prompts[type](question); - answers[name] = answer = await getFormattedAnswer(question, answer, true); - quit = await onSubmit(question, answer, answers); - } catch (err) { - quit = !(await onCancel(question, answers)); - } - - if (quit) return answers; - } - - return answers; -} - -function getInjectedAnswer(injected) { - const answer = injected.shift(); - if (answer instanceof Error) { - throw answer; - } - - return answer; -} - -function inject(answers) { - prompt._injected = (prompt._injected || []).concat(answers); -} - -function override(answers) { - prompt._override = Object.assign({}, answers); -} - -module.exports = Object.assign(prompt, { prompt, prompts, inject, override }); diff --git a/node_modules/prompts/lib/prompts.js b/node_modules/prompts/lib/prompts.js deleted file mode 100644 index df5d66bc6..000000000 --- a/node_modules/prompts/lib/prompts.js +++ /dev/null @@ -1,203 +0,0 @@ -'use strict'; -const $ = exports; -const el = require('./elements'); -const noop = v => v; - -function toPrompt(type, args, opts={}) { - return new Promise((res, rej) => { - const p = new el[type](args); - const onAbort = opts.onAbort || noop; - const onSubmit = opts.onSubmit || noop; - p.on('state', args.onState || noop); - p.on('submit', x => res(onSubmit(x))); - p.on('abort', x => rej(onAbort(x))); - }); -} - -/** - * Text prompt - * @param {string} args.message Prompt message to display - * @param {string} [args.initial] Default string value - * @param {string} [args.style="default"] Render style ('default', 'password', 'invisible') - * @param {function} [args.onState] On state change callback - * @param {function} [args.validate] Function to validate user input - * @param {Stream} [args.stdin] The Readable stream to listen to - * @param {Stream} [args.stdout] The Writable stream to write readline data to - * @returns {Promise} Promise with user input - */ -$.text = args => toPrompt('TextPrompt', args); - -/** - * Password prompt with masked input - * @param {string} args.message Prompt message to display - * @param {string} [args.initial] Default string value - * @param {function} [args.onState] On state change callback - * @param {function} [args.validate] Function to validate user input - * @param {Stream} [args.stdin] The Readable stream to listen to - * @param {Stream} [args.stdout] The Writable stream to write readline data to - * @returns {Promise} Promise with user input - */ -$.password = args => { - args.style = 'password'; - return $.text(args); -}; - -/** - * Prompt where input is invisible, like sudo - * @param {string} args.message Prompt message to display - * @param {string} [args.initial] Default string value - * @param {function} [args.onState] On state change callback - * @param {function} [args.validate] Function to validate user input - * @param {Stream} [args.stdin] The Readable stream to listen to - * @param {Stream} [args.stdout] The Writable stream to write readline data to - * @returns {Promise} Promise with user input - */ -$.invisible = args => { - args.style = 'invisible'; - return $.text(args); -}; - -/** - * Number prompt - * @param {string} args.message Prompt message to display - * @param {number} args.initial Default number value - * @param {function} [args.onState] On state change callback - * @param {number} [args.max] Max value - * @param {number} [args.min] Min value - * @param {string} [args.style="default"] Render style ('default', 'password', 'invisible') - * @param {Boolean} [opts.float=false] Parse input as floats - * @param {Number} [opts.round=2] Round floats to x decimals - * @param {Number} [opts.increment=1] Number to increment by when using arrow-keys - * @param {function} [args.validate] Function to validate user input - * @param {Stream} [args.stdin] The Readable stream to listen to - * @param {Stream} [args.stdout] The Writable stream to write readline data to - * @returns {Promise} Promise with user input - */ -$.number = args => toPrompt('NumberPrompt', args); - -/** - * Date prompt - * @param {string} args.message Prompt message to display - * @param {number} args.initial Default number value - * @param {function} [args.onState] On state change callback - * @param {number} [args.max] Max value - * @param {number} [args.min] Min value - * @param {string} [args.style="default"] Render style ('default', 'password', 'invisible') - * @param {Boolean} [opts.float=false] Parse input as floats - * @param {Number} [opts.round=2] Round floats to x decimals - * @param {Number} [opts.increment=1] Number to increment by when using arrow-keys - * @param {function} [args.validate] Function to validate user input - * @param {Stream} [args.stdin] The Readable stream to listen to - * @param {Stream} [args.stdout] The Writable stream to write readline data to - * @returns {Promise} Promise with user input - */ -$.date = args => toPrompt('DatePrompt', args); - -/** - * Classic yes/no prompt - * @param {string} args.message Prompt message to display - * @param {boolean} [args.initial=false] Default value - * @param {function} [args.onState] On state change callback - * @param {Stream} [args.stdin] The Readable stream to listen to - * @param {Stream} [args.stdout] The Writable stream to write readline data to - * @returns {Promise} Promise with user input - */ -$.confirm = args => toPrompt('ConfirmPrompt', args); - -/** - * List prompt, split intput string by `seperator` - * @param {string} args.message Prompt message to display - * @param {string} [args.initial] Default string value - * @param {string} [args.style="default"] Render style ('default', 'password', 'invisible') - * @param {string} [args.separator] String separator - * @param {function} [args.onState] On state change callback - * @param {Stream} [args.stdin] The Readable stream to listen to - * @param {Stream} [args.stdout] The Writable stream to write readline data to - * @returns {Promise} Promise with user input, in form of an `Array` - */ -$.list = args => { - const sep = args.separator || ','; - return toPrompt('TextPrompt', args, { - onSubmit: str => str.split(sep).map(s => s.trim()) - }); -}; - -/** - * Toggle/switch prompt - * @param {string} args.message Prompt message to display - * @param {boolean} [args.initial=false] Default value - * @param {string} [args.active="on"] Text for `active` state - * @param {string} [args.inactive="off"] Text for `inactive` state - * @param {function} [args.onState] On state change callback - * @param {Stream} [args.stdin] The Readable stream to listen to - * @param {Stream} [args.stdout] The Writable stream to write readline data to - * @returns {Promise} Promise with user input - */ -$.toggle = args => toPrompt('TogglePrompt', args); - -/** - * Interactive select prompt - * @param {string} args.message Prompt message to display - * @param {Array} args.choices Array of choices objects `[{ title, value }, ...]` - * @param {number} [args.initial] Index of default value - * @param {String} [args.hint] Hint to display - * @param {function} [args.onState] On state change callback - * @param {Stream} [args.stdin] The Readable stream to listen to - * @param {Stream} [args.stdout] The Writable stream to write readline data to - * @returns {Promise} Promise with user input - */ -$.select = args => toPrompt('SelectPrompt', args); - -/** - * Interactive multi-select / autocompleteMultiselect prompt - * @param {string} args.message Prompt message to display - * @param {Array} args.choices Array of choices objects `[{ title, value, [selected] }, ...]` - * @param {number} [args.max] Max select - * @param {string} [args.hint] Hint to display user - * @param {Number} [args.cursor=0] Cursor start position - * @param {function} [args.onState] On state change callback - * @param {Stream} [args.stdin] The Readable stream to listen to - * @param {Stream} [args.stdout] The Writable stream to write readline data to - * @returns {Promise} Promise with user input - */ -$.multiselect = args => { - args.choices = [].concat(args.choices || []); - const toSelected = items => items.filter(item => item.selected).map(item => item.value); - return toPrompt('MultiselectPrompt', args, { - onAbort: toSelected, - onSubmit: toSelected - }); -}; - -$.autocompleteMultiselect = args => { - args.choices = [].concat(args.choices || []); - const toSelected = items => items.filter(item => item.selected).map(item => item.value); - return toPrompt('AutocompleteMultiselectPrompt', args, { - onAbort: toSelected, - onSubmit: toSelected - }); -}; - -const byTitle = (input, choices) => Promise.resolve( - choices.filter(item => item.title.slice(0, input.length).toLowerCase() === input.toLowerCase()) -); - -/** - * Interactive auto-complete prompt - * @param {string} args.message Prompt message to display - * @param {Array} args.choices Array of auto-complete choices objects `[{ title, value }, ...]` - * @param {Function} [args.suggest] Function to filter results based on user input. Defaults to sort by `title` - * @param {number} [args.limit=10] Max number of results to show - * @param {string} [args.style="default"] Render style ('default', 'password', 'invisible') - * @param {String} [args.initial] Index of the default value - * @param {String} [args.fallback] Fallback message - defaults to initial value - * @param {function} [args.onState] On state change callback - * @param {Stream} [args.stdin] The Readable stream to listen to - * @param {Stream} [args.stdout] The Writable stream to write readline data to - * @returns {Promise} Promise with user input - */ -$.autocomplete = args => { - args.suggest = args.suggest || byTitle; - args.choices = [].concat(args.choices || []); - return toPrompt('AutocompletePrompt', args); -}; diff --git a/node_modules/prompts/lib/util/action.js b/node_modules/prompts/lib/util/action.js deleted file mode 100644 index b961c748d..000000000 --- a/node_modules/prompts/lib/util/action.js +++ /dev/null @@ -1,28 +0,0 @@ -'use strict'; - -module.exports = key => { - if (key.ctrl) { - if (key.name === 'a') return 'first'; - if (key.name === 'c') return 'abort'; - if (key.name === 'd') return 'abort'; - if (key.name === 'e') return 'last'; - if (key.name === 'g') return 'reset'; - } - - if (key.name === 'return') return 'submit'; - if (key.name === 'enter') return 'submit'; // ctrl + J - if (key.name === 'backspace') return 'delete'; - if (key.name === 'delete') return 'deleteForward'; - if (key.name === 'abort') return 'abort'; - if (key.name === 'escape') return 'abort'; - if (key.name === 'tab') return 'next'; - if (key.name === 'pagedown') return 'nextPage'; - if (key.name === 'pageup') return 'prevPage'; - - if (key.name === 'up') return 'up'; - if (key.name === 'down') return 'down'; - if (key.name === 'right') return 'right'; - if (key.name === 'left') return 'left'; - - return false; -}; diff --git a/node_modules/prompts/lib/util/clear.js b/node_modules/prompts/lib/util/clear.js deleted file mode 100644 index 8946df59c..000000000 --- a/node_modules/prompts/lib/util/clear.js +++ /dev/null @@ -1,18 +0,0 @@ -'use strict'; - -const strip = require('./strip'); -const { erase, cursor } = require('sisteransi'); - -const width = str => [...strip(str)].length; - -module.exports = function(prompt, perLine = process.stdout.columns) { - if (!perLine) return erase.line + cursor.to(0); - - let rows = 0; - const lines = prompt.split(/\r?\n/); - for (let line of lines) { - rows += 1 + Math.floor(Math.max(width(line) - 1, 0) / perLine); - } - - return (erase.line + cursor.prevLine()).repeat(rows - 1) + erase.line + cursor.to(0); -}; diff --git a/node_modules/prompts/lib/util/figures.js b/node_modules/prompts/lib/util/figures.js deleted file mode 100644 index cd31b8852..000000000 --- a/node_modules/prompts/lib/util/figures.js +++ /dev/null @@ -1,33 +0,0 @@ -'use strict'; - - const main = { - arrowUp: '↑', - arrowDown: '↓', - arrowLeft: '←', - arrowRight: '→', - radioOn: '◉', - radioOff: '◯', - tick: '✔', - cross: '✖', - ellipsis: '…', - pointerSmall: '›', - line: '─', - pointer: '❯' -}; -const win = { - arrowUp: main.arrowUp, - arrowDown: main.arrowDown, - arrowLeft: main.arrowLeft, - arrowRight: main.arrowRight, - radioOn: '(*)', - radioOff: '( )', - tick: '√', - cross: '×', - ellipsis: '...', - pointerSmall: '»', - line: '─', - pointer: '>' -}; -const figures = process.platform === 'win32' ? win : main; - - module.exports = figures; diff --git a/node_modules/prompts/lib/util/index.js b/node_modules/prompts/lib/util/index.js deleted file mode 100644 index 5cada774d..000000000 --- a/node_modules/prompts/lib/util/index.js +++ /dev/null @@ -1,9 +0,0 @@ -'use strict'; - -module.exports = { - action: require('./action'), - clear: require('./clear'), - style: require('./style'), - strip: require('./strip'), - figures: require('./figures') -}; diff --git a/node_modules/prompts/lib/util/strip.js b/node_modules/prompts/lib/util/strip.js deleted file mode 100644 index 68d15df64..000000000 --- a/node_modules/prompts/lib/util/strip.js +++ /dev/null @@ -1,11 +0,0 @@ -'use strict'; - -module.exports = str => { - const pattern = [ - '[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:[a-zA-Z\\d]*(?:;[a-zA-Z\\d]*)*)?\\u0007)', - '(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PRZcf-ntqry=><~]))' - ].join('|'); - - const RGX = new RegExp(pattern, 'g'); - return typeof str === 'string' ? str.replace(RGX, '') : str; -}; diff --git a/node_modules/prompts/lib/util/style.js b/node_modules/prompts/lib/util/style.js deleted file mode 100644 index 982ff81cc..000000000 --- a/node_modules/prompts/lib/util/style.js +++ /dev/null @@ -1,39 +0,0 @@ -'use strict'; - -const c = require('kleur'); -const figures = require('./figures'); - -// rendering user input. -const styles = Object.freeze({ - password: { scale: 1, render: input => '*'.repeat(input.length) }, - emoji: { scale: 2, render: input => '😃'.repeat(input.length) }, - invisible: { scale: 0, render: input => '' }, - default: { scale: 1, render: input => `${input}` } -}); -const render = type => styles[type] || styles.default; - -// icon to signalize a prompt. -const symbols = Object.freeze({ - aborted: c.red(figures.cross), - done: c.green(figures.tick), - default: c.cyan('?') -}); - -const symbol = (done, aborted) => - aborted ? symbols.aborted : done ? symbols.done : symbols.default; - -// between the question and the user's input. -const delimiter = completing => - c.gray(completing ? figures.ellipsis : figures.pointerSmall); - -const item = (expandable, expanded) => - c.gray(expandable ? (expanded ? figures.pointerSmall : '+') : figures.line); - -module.exports = { - styles, - render, - symbols, - symbol, - delimiter, - item -}; diff --git a/node_modules/prompts/license b/node_modules/prompts/license deleted file mode 100644 index 13dc83c13..000000000 --- a/node_modules/prompts/license +++ /dev/null @@ -1,21 +0,0 @@ -MIT License - -Copyright (c) 2018 Terkel Gjervig Nielsen - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/node_modules/prompts/package.json b/node_modules/prompts/package.json deleted file mode 100644 index 5726c9c8b..000000000 --- a/node_modules/prompts/package.json +++ /dev/null @@ -1,89 +0,0 @@ -{ - "_args": [ - [ - "prompts@2.1.0", - "/Users/drew.heavner/Documents/Github/sign-android-release" - ] - ], - "_development": true, - "_from": "prompts@2.1.0", - "_id": "prompts@2.1.0", - "_inBundle": false, - "_integrity": "sha512-+x5TozgqYdOwWsQFZizE/Tra3fKvAoy037kOyU6cgz84n8f6zxngLOV4O32kTwt9FcLCxAqw0P/c8rOr9y+Gfg==", - "_location": "/prompts", - "_phantomChildren": {}, - "_requested": { - "type": "version", - "registry": true, - "raw": "prompts@2.1.0", - "name": "prompts", - "escapedName": "prompts", - "rawSpec": "2.1.0", - "saveSpec": null, - "fetchSpec": "2.1.0" - }, - "_requiredBy": [ - "/jest/jest-cli" - ], - "_resolved": "https://registry.npmjs.org/prompts/-/prompts-2.1.0.tgz", - "_spec": "2.1.0", - "_where": "/Users/drew.heavner/Documents/Github/sign-android-release", - "author": { - "name": "Terkel Gjervig", - "email": "terkel@terkel.com", - "url": "https://terkel.com" - }, - "bugs": { - "url": "https://github.com/terkelg/prompts/issues" - }, - "dependencies": { - "kleur": "^3.0.2", - "sisteransi": "^1.0.0" - }, - "description": "Lightweight, beautiful and user-friendly prompts", - "devDependencies": { - "@babel/cli": "^7.2.3", - "@babel/core": "^7.3.3", - "@babel/plugin-proposal-object-rest-spread": "^7.3.4", - "@babel/preset-env": "^7.3.4", - "tap-spec": "^5.0.0", - "tape": "^4.10.1" - }, - "engines": { - "node": ">= 6" - }, - "files": [ - "lib", - "dist", - "index.js" - ], - "homepage": "https://github.com/terkelg/prompts#readme", - "keywords": [ - "ui", - "prompts", - "cli", - "prompt", - "interface", - "command-line", - "input", - "command", - "stdin", - "menu", - "ask", - "interact" - ], - "license": "MIT", - "main": "index.js", - "name": "prompts", - "repository": { - "type": "git", - "url": "git+https://github.com/terkelg/prompts.git" - }, - "scripts": { - "build": "babel lib -d dist", - "prepublishOnly": "npm run build", - "start": "node lib/index.js", - "test": "tape test/*.js | tap-spec" - }, - "version": "2.1.0" -} diff --git a/node_modules/prompts/readme.md b/node_modules/prompts/readme.md deleted file mode 100755 index ac51b543b..000000000 --- a/node_modules/prompts/readme.md +++ /dev/null @@ -1,818 +0,0 @@ -

- Prompts -

- -

❯ Prompts

- -

- - version - - - travis - - - downloads - - -

- -

- Lightweight, beautiful and user-friendly interactive prompts
- >_ Easy to use CLI prompts to enquire users for information▌ -

- -
- -* **Simple**: prompts has [no big dependencies](http://npm.anvaka.com/#/view/2d/prompts) nor is it broken into a [dozen](http://npm.anvaka.com/#/view/2d/inquirer) tiny modules that only work well together. -* **User friendly**: prompt uses layout and colors to create beautiful cli interfaces. -* **Promised**: uses promises and `async`/`await`. No callback hell. -* **Flexible**: all prompts are independent and can be used on their own. -* **Testable**: provides a way to submit answers programmatically. -* **Unified**: consistent experience across all prompts. - - -![split](https://github.com/terkelg/prompts/raw/master/media/split.png) - - -## ❯ Install - -``` -$ npm install --save prompts -``` - -> This package supports Node 6 and above - -![split](https://github.com/terkelg/prompts/raw/master/media/split.png) - -## ❯ Usage - -example prompt - -```js -const prompts = require('prompts'); - -(async () => { - const response = await prompts({ - type: 'number', - name: 'value', - message: 'How old are you?', - validate: value => value < 18 ? `Nightclub is 18+ only` : true - }); - - console.log(response); // => { value: 24 } -})(); -``` - -> See [`example.js`](https://github.com/terkelg/prompts/blob/master/example.js) for more options. - - -![split](https://github.com/terkelg/prompts/raw/master/media/split.png) - - -## ❯ Examples - -### Single Prompt - -Prompt with a single prompt object. Returns object with the response. - -```js -const prompts = require('prompts'); - -(async () => { - const response = await prompts({ - type: 'text', - name: 'meaning', - message: 'What is the meaning of life?' - }); - - console.log(response.meaning); -})(); -``` - -### Prompt Chain - -Prompt with a list of prompt objects. Returns object with response. -Make sure to give each prompt a unique `name` property to prevent overwriting values. - -```js -const prompts = require('prompts'); - -const questions = [ - { - type: 'text', - name: 'username', - message: 'What is your GitHub username?' - }, - { - type: 'number', - name: 'age', - message: 'How old are you?' - }, - { - type: 'text', - name: 'about', - message: 'Tell something about yourself', - initial: 'Why should I?' - } -]; - -(async () => { - const response = await prompts(questions); - - // => response => { username, age, about } -})(); -``` - -### Dynamic Prompts - -Prompt properties can be functions too. -Prompt Objects with `type` set to `falsy` values are skipped. - -```js -const prompts = require('prompts'); - -const questions = [ - { - type: 'text', - name: 'dish', - message: 'Do you like pizza?' - }, - { - type: prev => prev == 'pizza' ? 'text' : null, - name: 'topping', - message: 'Name a topping' - } -]; - -(async () => { - const response = await prompts(questions); -})(); -``` - - -![split](https://github.com/terkelg/prompts/raw/master/media/split.png) - - -## ❯ API - -### prompts(prompts, options) - -Type: `Function`
-Returns: `Object` - -Prompter function which takes your [prompt objects](#-prompt-objects) and returns an object with responses. - - -#### prompts - -Type: `Array|Object`
- -Array of [prompt objects](#-prompt-objects). - These are the questions the user will be prompted. You can see the list of supported [prompt types here](#-types). - -Prompts can be submitted (return, enter) or canceled (esc, abort, ctrl+c, ctrl+d). No property is being defined on the returned response object when a prompt is canceled. - -#### options.onSubmit - -Type: `Function`
-Default: `() => {}` - -Callback that's invoked after each prompt submission. -Its signature is `(prompt, answer, answers)` where `prompt` is the current prompt object, `answer` the user answer to the current question and `answers` the user answers so far. Async functions are supported. - -Return `true` to quit the prompt chain and return all collected responses so far, otherwise continue to iterate prompt objects. - -**Example:** -```js -(async () => { - const questions = [{ ... }]; - const onSubmit = (prompt, response) => console.log(`Thanks I got ${response} from ${prompt.name}`); - const response = await prompts(questions, { onSubmit }); -})(); -``` - -#### options.onCancel - -Type: `Function`
-Default: `() => {}` - -Callback that's invoked when the user cancels/exits the prompt. -Its signature is `(prompt, answers)` where `prompt` is the current prompt object and `answers` the user answers so far. Async functions are supported. - -Return `true` to continue and prevent the prompt loop from aborting. -On cancel responses collected so far are returned. - -**Example:** -```js -(async () => { - const questions = [{ ... }]; - const onCancel = prompt => { - console.log('Never stop prompting!'); - return true; - } - const response = await prompts(questions, { onCancel }); -})(); -``` - -### override - -Type: `Function` - -Preanswer questions by passing an object with answers to `prompts.override`. -Powerful when combined with arguments of process. - -**Example** -```js -const prompts = require('prompts'); -prompts.override(require('yargs').argv); - -(async () => { - const response = await prompts([ - { - type: 'text', - name: 'twitter', - message: `What's your twitter handle?` - }, - { - type: 'multiselect', - name: 'color', - message: 'Pick colors', - choices: [ - { title: 'Red', value: '#ff0000' }, - { title: 'Green', value: '#00ff00' }, - { title: 'Blue', value: '#0000ff' } - ], - } - ]); - - console.log(response); -})(); -``` - -### inject(values) - -Type: `Function`
- -Programmatically inject responses. This enables you to prepare the responses ahead of time. -If any injected value is found the prompt is immediately resolved with the injected value. -This feature is intended for testing only. - -#### values - -Type: `Array` - -Array with values to inject. Resolved values are removed from the internal inject array. -Each value can be an array of values in order to provide answers for a question asked multiple times. -If a value is an instance of `Error` it will simulate the user cancelling/exiting the prompt. - -**Example:** -```js -const prompts = require('prompts'); - -prompts.inject([ '@terkelg', ['#ff0000', '#0000ff'] ]); - -(async () => { - const response = await prompts([ - { - type: 'text', - name: 'twitter', - message: `What's your twitter handle?` - }, - { - type: 'multiselect', - name: 'color', - message: 'Pick colors', - choices: [ - { title: 'Red', value: '#ff0000' }, - { title: 'Green', value: '#00ff00' }, - { title: 'Blue', value: '#0000ff' } - ], - } - ]); - - // => { twitter: 'terkelg', color: [ '#ff0000', '#0000ff' ] } -})(); -``` - -![split](https://github.com/terkelg/prompts/raw/master/media/split.png) - - -## ❯ Prompt Objects - -Prompts Objects are JavaScript objects that define the "questions" and the [type of prompt](#-types). -Almost all prompt objects have the following properties: - -```js -{ - type: String | Function, - name: String | Function, - message: String | Function, - initial: String | Function | Async Function - format: Function | Async Function, - onRender: Function - onState: Function -} -``` - -Each property be of type `function` and will be invoked right before prompting the user. - -The function signature is `(prev, values, prompt)`, where `prev` is the value from the previous prompt, -`values` is the response object with all values collected so far and `prompt` is the previous prompt object. - -**Function example:** -```js -{ - type: prev => prev > 3 ? 'confirm' : null, - name: 'confirm', - message: (prev, values) => `Please confirm that you eat ${values.dish} times ${prev} a day?` -} -``` - -The above prompt will be skipped if the value of the previous prompt is less than 3. - -### type - -Type: `String|Function` - -Defines the type of prompt to display. See the list of [prompt types](#-types) for valid values. - -If `type` is a falsy value the prompter will skip that question. -```js -{ - type: null, - name: 'forgetme', - message: `I'll never be shown anyway`, -} -``` - -### name - -Type: `String|Function` - -The response will be saved under this key/property in the returned response object. -In case you have multiple prompts with the same name only the latest response will be stored. - -> Make sure to give prompts unique names if you don't want to overwrite previous values. - -### message - -Type: `String|Function` - -The message to be displayed to the user. - -### initial - -Type: `String|Function` - -Optional default prompt value. Async functions are supported too. - -### format - -Type: `Function` - -Receive the user input and return the formatted value to be used inside the program. -The value returned will be added to the response object. - -The function signature is `(val, values)`, where `val` is the value from the current prompt and -`values` is the current response object in case you need to format based on previous responses. - -**Example:** -```js -{ - type: 'number', - name: 'price', - message: 'Enter price', - format: val => Intl.NumberFormat(undefined, { style: 'currency', currency: 'USD' }).format(val); -} -``` - -### onRender - -Type: `Function` - -Callback for when the prompt is rendered. -The function receives [kleur](https://github.com/lukeed/kleur) as its first argument and `this` refers to the current prompt. - -**Example:** -```js -{ - type: 'number', - message: 'This message will be overridden', - onRender(kleur) { - this.msg = kleur.cyan('Enter a number'); - } -} -``` - -### onState - -Type: `Function` - -Callback for when the state of the current prompt changes. -The function signature is `(state)` where `state` is an object with a snapshot of the current state. -The state object have two properties `value` and `aborted`. E.g `{ value: 'This is ', aborted: false }` - - -![split](https://github.com/terkelg/prompts/raw/master/media/split.png) - - -## ❯ Types - -### text(message, [initial], [style]) -> Text prompt for free text input. - -Hit tab to autocomplete to `initial` value when provided. - -#### Example -text prompt - -```js -{ - type: 'text', - name: 'value', - message: `What's your twitter handle?` -} -``` - -#### Options -| Param | Type | Description | -| ----- | :--: | ----------- | -| message | `string` | Prompt message to display | -| initial | `string` | Default string value | -| style | `string` | Render style (`default`, `password`, `invisible`, `emoji`). Defaults to `default` | -| format | `function` | Receive user input. The returned value will be added to the response object | -| validate | `function` | Receive user input. Should return `true` if the value is valid, and an error message `String` otherwise. If `false` is returned, a default error message is shown | -| onRender | `function` | On render callback. Keyword `this` refers to the current prompt | -| onState | `function` | On state change callback. Function signature is an `object` with two propetires: `value` and `aborted` | - - -### password(message, [initial]) -> Password prompt with masked input. - -This prompt is a similar to a prompt of type `'text'` with `style` set to `'password'`. - -#### Example -password prompt - -```js -{ - type: 'password', - name: 'value', - message: 'Tell me a secret' -} -``` - -#### Options -| Param | Type | Description | -| ----- | :--: | ----------- | -| message | `string` | Prompt message to display | -| initial | `string` | Default string value | -| format | `function` | Receive user input. The returned value will be added to the response object | -| validate | `function` | Receive user input. Should return `true` if the value is valid, and an error message `String` otherwise. If `false` is returned, a default error message is shown | -| onRender | `function` | On render callback. Keyword `this` refers to the current prompt | -| onState | `function` | On state change callback. Function signature is an `object` with two propetires: `value` and `aborted` | - - -### invisible(message, [initial]) -> Prompts user for invisible text input. - -This prompt is working like `sudo` where the input is invisible. -This prompt is a similar to a prompt of type `'text'` with style set to `'invisible'`. - -#### Example -invisible prompt - -```js -{ - type: 'invisible', - name: 'value', - message: 'Enter password' -} -``` - -#### Options -| Param | Type | Description | -| ----- | :--: | ----------- | -| message | `string` | Prompt message to display | -| initial | `string` | Default string value | -| format | `function` | Receive user input. The returned value will be added to the response object | -| validate | `function` | Receive user input. Should return `true` if the value is valid, and an error message `String` otherwise. If `false` is returned, a default error message is shown | -| onRender | `function` | On render callback. Keyword `this` refers to the current prompt | -| onState | `function` | On state change callback. Function signature is an `object` with two propetires: `value` and `aborted` | - - -### number(message, initial, [max], [min], [style]) -> Prompts user for number input. - -You can type in numbers and use up/down to increase/decrease the value. Only numbers are allowed as input. Hit tab to autocomplete to `initial` value when provided. - -#### Example -number prompt - -```js -{ - type: 'number', - name: 'value', - message: 'How old are you?', - initial: 0, - style: 'default', - min: 2, - max: 10 -} -``` - -#### Options -| Param | Type | Description | -| ----- | :--: | ----------- | -| message | `string` | Prompt message to display | -| initial | `number` | Default number value | -| format | `function` | Receive user input. The returned value will be added to the response object | -| validate | `function` | Receive user input. Should return `true` if the value is valid, and an error message `String` otherwise. If `false` is returned, a default error message is shown | -| max | `number` | Max value. Defaults to `Infinity` | -| min | `number` | Min value. Defaults to `-infinity` | -| float | `boolean` | Allow floating point inputs. Defaults to `false` | -| round | `number` | Round `float` values to x decimals. Defaults to `2` | -| increment | `number` | Increment step when using arrow keys. Defaults to `1` | -| style | `string` | Render style (`default`, `password`, `invisible`, `emoji`). Defaults to `default` | -| onRender | `function` | On render callback. Keyword `this` refers to the current prompt | -| onState | `function` | On state change callback. Function signature is an `object` with two propetires: `value` and `aborted` | - -### confirm(message, [initial]) -> Classic yes/no prompt. - -Hit y or n to confirm/reject. - -#### Example -confirm prompt - -```js -{ - type: 'confirm', - name: 'value', - message: 'Can you confirm?', - initial: true -} -``` - - -#### Options -| Param | Type | Description | -| ----- | :--: | ----------- | -| message | `string` | Prompt message to display | -| initial | `boolean` | Default value. Default is `false` | -| format | `function` | Receive user input. The returned value will be added to the response object | -| onRender | `function` | On render callback. Keyword `this` refers to the current prompt | -| onState | `function` | On state change callback. Function signature is an `object` with two properties: `value` and `aborted` | - -### list(message, [initial]) -> List prompt that return an array. - -Similar to the `text` prompt, but the output is an `Array` containing the -string separated by `separator`. - -```js -{ - type: 'list', - name: 'value', - message: 'Enter keywords', - initial: '', - separator: ',' -} -``` - -list prompt - - -| Param | Type | Description | -| ----- | :--: | ----------- | -| message | `string` | Prompt message to display | -| initial | `boolean` | Default value | -| format | `function` | Receive user input. The returned value will be added to the response object | -| separator | `string` | String separator. Will trim all white-spaces from start and end of string. Defaults to `','` | -| onRender | `function` | On render callback. Keyword `this` refers to the current prompt | -| onState | `function` | On state change callback. Function signature is an `object` with two propetires: `value` and `aborted` | - - -### toggle(message, [initial], [active], [inactive]) -> Interactive toggle/switch prompt. - -Use tab or arrow keys/tab/space to switch between options. - -#### Example -toggle prompt - -```js -{ - type: 'toggle', - name: 'value', - message: 'Can you confirm?', - initial: true, - active: 'yes', - inactive: 'no' -} -``` - -#### Options -| Param | Type | Description | -| ----- | :--: | ----------- | -| message | `string` | Prompt message to display | -| initial | `boolean` | Default value. Defaults to `false` | -| format | `function` | Receive user input. The returned value will be added to the response object | -| active | `string` | Text for `active` state. Defaults to `'on'` | -| inactive | `string` | Text for `inactive` state. Defaults to `'off'` | -| onRender | `function` | On render callback. Keyword `this` refers to the current prompt | -| onState | `function` | On state change callback. Function signature is an `object` with two propetires: `value` and `aborted` | - -### select(message, choices, [initial], [hint], [warn]) -> Interactive select prompt. - -Use up/down to navigate. Use tab to cycle the list. - -#### Example -select prompt - -```js -{ - type: 'select', - name: 'value', - message: 'Pick a color', - choices: [ - { title: 'Red', value: '#ff0000' }, - { title: 'Green', value: '#00ff00', disabled: true }, - { title: 'Blue', value: '#0000ff' } - ], - initial: 1 -} -``` - -#### Options -| Param | Type | Description | -| ----- | :--: | ----------- | -| message | `string` | Prompt message to display | -| initial | `number` | Index of default value | -| format | `function` | Receive user input. The returned value will be added to the response object | -| hint | `string` | Hint to display to the user | -| warn | `string` | Message to display when selecting a disabled option | -| choices | `Array` | Array of strings or choices objects `[{ title, value, disabled }, ...]`. The choice's index in the array will be used as its value if it is not specified. | -| onRender | `function` | On render callback. Keyword `this` refers to the current prompt | -| onState | `function` | On state change callback. Function signature is an `object` with two properties: `value` and `aborted` | - -### multiselect(message, choices, [initial], [max], [hint], [warn]) -### autocompleteMultiselect(same) -> Interactive multi-select prompt. -> Autocomplete is a searchable multiselect prompt with the same options. Useful for long lists. - -Use space to toggle select/unselect and up/down to navigate. Use tab to cycle the list. You can also use right to select and left to deselect. -By default this prompt returns an `array` containing the **values** of the selected items - not their display title. - -#### Example -multiselect prompt - -```js -{ - type: 'multiselect', - name: 'value', - message: 'Pick colors', - choices: [ - { title: 'Red', value: '#ff0000' }, - { title: 'Green', value: '#00ff00', disabled: true }, - { title: 'Blue', value: '#0000ff', selected: true } - ], - max: 2, - hint: '- Space to select. Return to submit' -} -``` - -#### Options -| Param | Type | Description | -| ----- | :--: | ----------- | -| message | `string` | Prompt message to display | -| format | `function` | Receive user input. The returned value will be added to the response object | -| choices | `Array` | Array of strings or choices objects `[{ title, value, disabled }, ...]`. The choice's index in the array will be used as its value if it is not specified. | -| min | `number` | Min select - will display error | -| max | `number` | Max select | -| hint | `string` | Hint to display to the user | -| warn | `string` | Message to display when selecting a disabled option | -| onRender | `function` | On render callback. Keyword `this` refers to the current prompt | -| onState | `function` | On state change callback. Function signature is an `object` with two properties: `value` and `aborted` | - -This is one of the few prompts that don't take a initial value. -If you want to predefine selected values, give the choice object an `selected` property of `true`. - - -### autocomplete(message, choices, [initial], [suggest], [limit], [style]) -> Interactive auto complete prompt. - -The prompt will list options based on user input. Type to filter the list. -Use / to navigate. Use tab to cycle the result. Use Page Up/Page Down (on Mac: fn + / ) to change page. Hit enter to select the highlighted item below the prompt. - -The default suggests function is sorting based on the `title` property of the choices. -You can overwrite how choices are being filtered by passing your own suggest function. - -#### Example -auto complete prompt - -```js -{ - type: 'autocomplete', - name: 'value', - message: 'Pick your favorite actor', - choices: [ - { title: 'Cage' }, - { title: 'Clooney', value: 'silver-fox' }, - { title: 'Gyllenhaal' }, - { title: 'Gibson' }, - { title: 'Grant' } - ] -} -``` - -#### Options -| Param | Type | Description | -| ----- | :--: | ----------- | -| message | `string` | Prompt message to display | -| format | `function` | Receive user input. The returned value will be added to the response object | -| choices | `Array` | Array of auto-complete choices objects `[{ title, value }, ...]` | -| suggest | `function` | Filter function. Defaults to sort by `title` property. `suggest` should always return a promise. Filters using `title` by default | -| limit | `number` | Max number of results to show. Defaults to `10` | -| style | `string` | Render style (`default`, `password`, `invisible`, `emoji`). Defaults to `'default'` | -| initial | `string \| number` | Default initial value | -| fallback | `function` | Fallback message when no match is found. Defaults to `initial` value if provided | -| onRender | `function` | On render callback. Keyword `this` refers to the current prompt | -| onState | `function` | On state change callback. Function signature is an `object` with two propetires: `value` and `aborted` | - -Example on what a `suggest` function might look like: -```js -const suggestByTitle = (input, choices) => - Promise.resolve(choices.filter(i => i.title.slice(0, input.length) === input)) -``` - - -### date(message, [initial], [warn]) -> Interactive date prompt. - -Use left/right/tab to navigate. Use up/down to change date. - -#### Example -date prompt - -```js -{ - type: 'date', - name: 'value', - message: 'Pick a date', - initial: new Date(1997, 09, 12), - validate: date => date > Date.now() ? 'Not in the future' : true -} -``` - -#### Options -| Param | Type | Description | -| ----- | :--: | ----------- | -| message | `string` | Prompt message to display | -| initial | `date` | Default date | -| locales | `object` | Use to define custom locales. See below for an example. | -| mask | `string` | The format mask of the date. See below for more information.
Default: `YYYY-MM-DD HH:mm:ss` | -| validate | `function` | Receive user input. Should return `true` if the value is valid, and an error message `String` otherwise. If `false` is returned, a default error message is shown | -| onRender | `function` | On render callback. Keyword `this` refers to the current prompt | -| onState | `function` | On state change callback. Function signature is an `object` with two propetires: `value` and `aborted` | - -Default locales: - -```javascript -{ - months: [ - 'January', 'February', 'March', 'April', - 'May', 'June', 'July', 'August', - 'September', 'October', 'November', 'December' - ], - monthsShort: [ - 'Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', - 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec' - ], - weekdays: [ - 'Sunday', 'Monday', 'Tuesday', 'Wednesday', - 'Thursday', 'Friday', 'Saturday' - ], - weekdaysShort: [ - 'Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat' - ] -} -``` ->**Formatting**: See full list of formatting options in the [wiki](https://github.com/terkelg/prompts/wiki/Date-Time-Formatting) - -![split](https://github.com/terkelg/prompts/raw/master/media/split.png) - - -## ❯ Credit -Many of the prompts are based on the work of [derhuerst](https://github.com/derhuerst). - - -## ❯ License - -MIT © [Terkel Gjervig](https://terkel.com) diff --git a/node_modules/psl/data/rules.json b/node_modules/psl/data/rules.json index fd98685e3..e19abdc89 100644 --- a/node_modules/psl/data/rules.json +++ b/node_modules/psl/data/rules.json @@ -189,7 +189,6 @@ "wa.au", "act.edu.au", "catholic.edu.au", -"eq.edu.au", "nsw.edu.au", "nt.edu.au", "qld.edu.au", @@ -577,9 +576,10 @@ "*.ck", "!www.ck", "cl", -"gov.cl", -"gob.cl", +"aprendemas.cl", "co.cl", +"gob.cl", +"gov.cl", "mil.cl", "cm", "co.cm", @@ -768,7 +768,17 @@ "eu", "fi", "aland.fi", -"*.fj", +"fj", +"ac.fj", +"biz.fj", +"com.fj", +"gov.fj", +"info.fj", +"mil.fj", +"name.fj", +"net.fj", +"org.fj", +"pro.fj", "*.fk", "fm", "fo", @@ -3887,8 +3897,6 @@ "norfolk.museum", "north.museum", "nrw.museum", -"nuernberg.museum", -"nuremberg.museum", "nyc.museum", "nyny.museum", "oceanographic.museum", @@ -5323,12 +5331,6 @@ "in.rs", "org.rs", "ru", -"ac.ru", -"edu.ru", -"gov.ru", -"int.ru", -"mil.ru", -"test.ru", "rw", "ac.rw", "co.rw", @@ -5440,9 +5442,19 @@ "univ.sn", "so", "com.so", +"edu.so", +"gov.so", +"me.so", "net.so", "org.so", "sr", +"ss", +"biz.ss", +"com.ss", +"edu.ss", +"gov.ss", +"net.ss", +"org.ss", "st", "co.st", "com.st", @@ -6025,6 +6037,8 @@ "الجزائر", "مصر", "ею", +"ευ", +"موريتانيا", "გე", "ελ", "香港", @@ -6176,6 +6190,7 @@ "ally", "alsace", "alstom", +"amazon", "americanexpress", "americanfamily", "amex", @@ -6257,7 +6272,6 @@ "blue", "bms", "bmw", -"bnl", "bnpparibas", "boats", "boehringer", @@ -6307,7 +6321,6 @@ "career", "careers", "cars", -"cartier", "casa", "case", "caseih", @@ -6334,7 +6347,6 @@ "chintai", "christmas", "chrome", -"chrysler", "church", "cipriani", "circle", @@ -6428,7 +6440,6 @@ "dnp", "docs", "doctor", -"dodge", "dog", "domains", "dot", @@ -6438,7 +6449,6 @@ "dubai", "duck", "dunlop", -"duns", "dupont", "durban", "dvag", @@ -6465,7 +6475,6 @@ "eurovision", "eus", "events", -"everbank", "exchange", "expert", "exposed", @@ -6609,7 +6618,6 @@ "homes", "homesense", "honda", -"honeywell", "horse", "hospital", "host", @@ -6649,7 +6657,6 @@ "investments", "ipiranga", "irish", -"iselect", "ismaili", "ist", "istanbul", @@ -6696,12 +6703,10 @@ "kuokgroup", "kyoto", "lacaixa", -"ladbrokes", "lamborghini", "lamer", "lancaster", "lancia", -"lancome", "land", "landrover", "lanxess", @@ -6719,7 +6724,6 @@ "lego", "lexus", "lgbt", -"liaison", "lidl", "life", "lifeinsurance", @@ -6737,6 +6741,7 @@ "living", "lixil", "llc", +"llp", "loan", "loans", "locker", @@ -6793,7 +6798,6 @@ "mls", "mma", "mobile", -"mobily", "moda", "moe", "moi", @@ -6801,7 +6805,6 @@ "monash", "money", "monster", -"mopar", "mormon", "mortgage", "moscow", @@ -6809,7 +6812,6 @@ "motorcycles", "mov", "movie", -"movistar", "msd", "mtn", "mtr", @@ -6896,7 +6898,6 @@ "photography", "photos", "physio", -"piaget", "pics", "pictet", "pictures", @@ -7061,16 +7062,15 @@ "song", "sony", "soy", +"spa", "space", "sport", "spot", "spreadbetting", "srl", -"srt", "stada", "staples", "star", -"starhub", "statebank", "statefarm", "stc", @@ -7110,7 +7110,6 @@ "team", "tech", "technology", -"telefonica", "temasek", "tennis", "teva", @@ -7155,7 +7154,6 @@ "tvs", "ubank", "ubs", -"uconnect", "unicom", "university", "uno", @@ -7179,7 +7177,6 @@ "virgin", "visa", "vision", -"vistaprint", "viva", "vivo", "vlaanderen", @@ -7196,7 +7193,6 @@ "walter", "wang", "wanggou", -"warman", "watch", "watches", "weather", @@ -7260,6 +7256,7 @@ "орг", "नेट", "ストア", +"アマゾン", "삼성", "商标", "商店", @@ -7283,6 +7280,7 @@ "餐厅", "网络", "ком", +"亚马逊", "诺基亚", "食品", "飞利浦", @@ -7292,7 +7290,6 @@ "العليان", "اتصالات", "بازار", -"موبايلي", "ابوظبي", "كاثوليك", "همراه", @@ -7345,10 +7342,14 @@ "cc.ua", "inf.ua", "ltd.ua", +"adobeaemcloud.com", +"adobeaemcloud.net", +"*.dev.adobeaemcloud.com", "beep.pl", "barsy.ca", "*.compute.estate", "*.alces.network", +"altervista.org", "alwaysdata.net", "cloudfront.net", "*.compute.amazonaws.com", @@ -7431,6 +7432,7 @@ "s3-website.eu-west-2.amazonaws.com", "s3-website.eu-west-3.amazonaws.com", "s3-website.us-east-2.amazonaws.com", +"amsw.nl", "t3l3p0rt.net", "tele.amune.org", "apigee.io", @@ -7444,9 +7446,6 @@ "potager.org", "sweetpepper.org", "myasustor.com", -"go-vip.co", -"go-vip.net", -"wpcomstaging.com", "myfritz.net", "*.awdev.ca", "*.advisor.ws", @@ -7509,6 +7508,7 @@ "certmgr.org", "xenapponazure.com", "discourse.group", +"discourse.team", "virtueeldomein.nl", "cleverapps.io", "*.lcl.dev", @@ -7552,6 +7552,12 @@ "co.no", "webhosting.be", "hosting-cluster.nl", +"ac.ru", +"edu.ru", +"gov.ru", +"int.ru", +"mil.ru", +"test.ru", "dyn.cosidns.de", "dynamisches-dns.de", "dnsupdater.de", @@ -7564,6 +7570,10 @@ "realm.cz", "*.cryptonomic.net", "cupcake.is", +"*.customer-oci.com", +"*.oci.customer-oci.com", +"*.ocp.customer-oci.com", +"*.ocs.customer-oci.com", "cyon.link", "cyon.site", "daplie.me", @@ -7581,6 +7591,8 @@ "store.dk", "*.dapps.earth", "*.bzz.dapps.earth", +"builtwithdark.com", +"edgestack.me", "debian.net", "dedyn.io", "dnshome.de", @@ -7904,6 +7916,7 @@ "blogsite.xyz", "dynv6.net", "e4.cz", +"en-root.fr", "mytuleap.com", "onred.one", "staging.onred.one", @@ -8052,6 +8065,7 @@ "vladimir.su", "vologda.su", "channelsdvr.net", +"u.channelsdvr.net", "fastly-terrarium.com", "fastlylb.net", "map.fastlylb.net", @@ -8081,6 +8095,7 @@ "firebaseapp.com", "flynnhub.com", "flynnhosting.net", +"0e.vc", "freebox-os.com", "freeboxos.com", "fbx-os.fr", @@ -8099,11 +8114,13 @@ "service.gov.uk", "gehirn.ne.jp", "usercontent.jp", +"gentapps.com", "lab.ms", "github.io", "githubusercontent.com", "gitlab.io", "glitch.me", +"lolipop.io", "cloudapps.digital", "london.cloudapps.digital", "homeoffice.gov.uk", @@ -8115,6 +8132,7 @@ "web.app", "*.0emm.com", "appspot.com", +"*.r.appspot.com", "blogspot.ae", "blogspot.al", "blogspot.am", @@ -8198,6 +8216,7 @@ "publishproxy.com", "withgoogle.com", "withyoutube.com", +"awsmppl.com", "fin.ci", "free.hr", "caa.li", @@ -8225,6 +8244,7 @@ "firm.ng", "gen.ng", "ltd.ng", +"ngo.ng", "ng.school", "sch.so", "häkkinen.fi", @@ -8291,6 +8311,7 @@ "kinghost.net", "uni5.net", "knightpoint.systems", +"oya.to", "co.krd", "edu.krd", "git-repos.de", @@ -8517,6 +8538,7 @@ "nom.ai", "nom.al", "nym.by", +"nom.bz", "nym.bz", "nom.cl", "nym.ec", @@ -8538,6 +8560,7 @@ "nym.li", "nym.lt", "nym.lu", +"nom.lv", "nym.me", "nom.mk", "nym.mn", @@ -8561,11 +8584,13 @@ "nom.uy", "nom.vc", "nom.vg", +"static.observableusercontent.com", "cya.gg", "cloudycluster.net", "nid.io", "opencraft.hosting", "operaunite.com", +"skygearapp.com", "outsystemscloud.com", "ownprovider.com", "own.pm", @@ -8582,6 +8607,7 @@ "pantheonsite.io", "gotpantheon.com", "mypep.link", +"perspecta.cloud", "on-web.fr", "*.platform.sh", "*.platformsh.site", @@ -8596,9 +8622,12 @@ "byen.site", "pubtls.org", "qualifioapp.com", +"qbuser.com", "instantcloud.cn", "ras.ru", "qa2.com", +"qcx.io", +"*.sys.qcx.io", "dev-myqnapcloud.com", "alpha-myqnapcloud.com", "myqnapcloud.com", @@ -8607,6 +8636,7 @@ "vaporcloud.io", "rackmaze.com", "rackmaze.net", +"*.on-k3s.io", "*.on-rancher.cloud", "*.on-rio.io", "readthedocs.io", @@ -8626,6 +8656,7 @@ "logoip.de", "logoip.com", "schokokeks.net", +"gov.scot", "scrysec.com", "firewall-gateway.com", "firewall-gateway.de", @@ -8637,6 +8668,7 @@ "my-firewall.org", "myfirewall.org", "spdns.org", +"senseering.net", "biz.ua", "co.ua", "pp.ua", @@ -8686,6 +8718,7 @@ "myds.me", "synology.me", "vpnplus.to", +"direct.quickconnect.to", "taifun-dns.de", "gda.pl", "gdansk.pl", @@ -8750,11 +8783,14 @@ "inc.hk", "virtualuser.de", "virtual-user.de", +"urown.cloud", +"dnsupdate.info", "lib.de.us", "2038.io", "router.management", "v-info.info", "voorloper.cloud", +"v.ua", "wafflecell.com", "*.webhare.dev", "wedeploy.io", @@ -8762,6 +8798,11 @@ "wedeploy.sh", "remotewd.com", "wmflabs.org", +"myforum.community", +"community-pro.de", +"diskussionsbereich.de", +"community-pro.net", +"meinforum.net", "half.host", "xnbay.com", "u2.xnbay.com", @@ -8789,7 +8830,5 @@ "bss.design", "basicserver.io", "virtualserver.io", -"site.builder.nu", -"enterprisecloud.nu", -"zone.id" +"enterprisecloud.nu" ] \ No newline at end of file diff --git a/node_modules/psl/dist/psl.js b/node_modules/psl/dist/psl.js index e6a277a76..f4b9b8925 100644 --- a/node_modules/psl/dist/psl.js +++ b/node_modules/psl/dist/psl.js @@ -190,7 +190,6 @@ module.exports=[ "wa.au", "act.edu.au", "catholic.edu.au", -"eq.edu.au", "nsw.edu.au", "nt.edu.au", "qld.edu.au", @@ -578,9 +577,10 @@ module.exports=[ "*.ck", "!www.ck", "cl", -"gov.cl", -"gob.cl", +"aprendemas.cl", "co.cl", +"gob.cl", +"gov.cl", "mil.cl", "cm", "co.cm", @@ -769,7 +769,17 @@ module.exports=[ "eu", "fi", "aland.fi", -"*.fj", +"fj", +"ac.fj", +"biz.fj", +"com.fj", +"gov.fj", +"info.fj", +"mil.fj", +"name.fj", +"net.fj", +"org.fj", +"pro.fj", "*.fk", "fm", "fo", @@ -3888,8 +3898,6 @@ module.exports=[ "norfolk.museum", "north.museum", "nrw.museum", -"nuernberg.museum", -"nuremberg.museum", "nyc.museum", "nyny.museum", "oceanographic.museum", @@ -5324,12 +5332,6 @@ module.exports=[ "in.rs", "org.rs", "ru", -"ac.ru", -"edu.ru", -"gov.ru", -"int.ru", -"mil.ru", -"test.ru", "rw", "ac.rw", "co.rw", @@ -5441,9 +5443,19 @@ module.exports=[ "univ.sn", "so", "com.so", +"edu.so", +"gov.so", +"me.so", "net.so", "org.so", "sr", +"ss", +"biz.ss", +"com.ss", +"edu.ss", +"gov.ss", +"net.ss", +"org.ss", "st", "co.st", "com.st", @@ -6026,6 +6038,8 @@ module.exports=[ "الجزائر", "مصر", "ею", +"ευ", +"موريتانيا", "გე", "ελ", "香港", @@ -6177,6 +6191,7 @@ module.exports=[ "ally", "alsace", "alstom", +"amazon", "americanexpress", "americanfamily", "amex", @@ -6258,7 +6273,6 @@ module.exports=[ "blue", "bms", "bmw", -"bnl", "bnpparibas", "boats", "boehringer", @@ -6308,7 +6322,6 @@ module.exports=[ "career", "careers", "cars", -"cartier", "casa", "case", "caseih", @@ -6335,7 +6348,6 @@ module.exports=[ "chintai", "christmas", "chrome", -"chrysler", "church", "cipriani", "circle", @@ -6429,7 +6441,6 @@ module.exports=[ "dnp", "docs", "doctor", -"dodge", "dog", "domains", "dot", @@ -6439,7 +6450,6 @@ module.exports=[ "dubai", "duck", "dunlop", -"duns", "dupont", "durban", "dvag", @@ -6466,7 +6476,6 @@ module.exports=[ "eurovision", "eus", "events", -"everbank", "exchange", "expert", "exposed", @@ -6610,7 +6619,6 @@ module.exports=[ "homes", "homesense", "honda", -"honeywell", "horse", "hospital", "host", @@ -6650,7 +6658,6 @@ module.exports=[ "investments", "ipiranga", "irish", -"iselect", "ismaili", "ist", "istanbul", @@ -6697,12 +6704,10 @@ module.exports=[ "kuokgroup", "kyoto", "lacaixa", -"ladbrokes", "lamborghini", "lamer", "lancaster", "lancia", -"lancome", "land", "landrover", "lanxess", @@ -6720,7 +6725,6 @@ module.exports=[ "lego", "lexus", "lgbt", -"liaison", "lidl", "life", "lifeinsurance", @@ -6738,6 +6742,7 @@ module.exports=[ "living", "lixil", "llc", +"llp", "loan", "loans", "locker", @@ -6794,7 +6799,6 @@ module.exports=[ "mls", "mma", "mobile", -"mobily", "moda", "moe", "moi", @@ -6802,7 +6806,6 @@ module.exports=[ "monash", "money", "monster", -"mopar", "mormon", "mortgage", "moscow", @@ -6810,7 +6813,6 @@ module.exports=[ "motorcycles", "mov", "movie", -"movistar", "msd", "mtn", "mtr", @@ -6897,7 +6899,6 @@ module.exports=[ "photography", "photos", "physio", -"piaget", "pics", "pictet", "pictures", @@ -7062,16 +7063,15 @@ module.exports=[ "song", "sony", "soy", +"spa", "space", "sport", "spot", "spreadbetting", "srl", -"srt", "stada", "staples", "star", -"starhub", "statebank", "statefarm", "stc", @@ -7111,7 +7111,6 @@ module.exports=[ "team", "tech", "technology", -"telefonica", "temasek", "tennis", "teva", @@ -7156,7 +7155,6 @@ module.exports=[ "tvs", "ubank", "ubs", -"uconnect", "unicom", "university", "uno", @@ -7180,7 +7178,6 @@ module.exports=[ "virgin", "visa", "vision", -"vistaprint", "viva", "vivo", "vlaanderen", @@ -7197,7 +7194,6 @@ module.exports=[ "walter", "wang", "wanggou", -"warman", "watch", "watches", "weather", @@ -7261,6 +7257,7 @@ module.exports=[ "орг", "नेट", "ストア", +"アマゾン", "삼성", "商标", "商店", @@ -7284,6 +7281,7 @@ module.exports=[ "餐厅", "网络", "ком", +"亚马逊", "诺基亚", "食品", "飞利浦", @@ -7293,7 +7291,6 @@ module.exports=[ "العليان", "اتصالات", "بازار", -"موبايلي", "ابوظبي", "كاثوليك", "همراه", @@ -7346,10 +7343,14 @@ module.exports=[ "cc.ua", "inf.ua", "ltd.ua", +"adobeaemcloud.com", +"adobeaemcloud.net", +"*.dev.adobeaemcloud.com", "beep.pl", "barsy.ca", "*.compute.estate", "*.alces.network", +"altervista.org", "alwaysdata.net", "cloudfront.net", "*.compute.amazonaws.com", @@ -7432,6 +7433,7 @@ module.exports=[ "s3-website.eu-west-2.amazonaws.com", "s3-website.eu-west-3.amazonaws.com", "s3-website.us-east-2.amazonaws.com", +"amsw.nl", "t3l3p0rt.net", "tele.amune.org", "apigee.io", @@ -7445,9 +7447,6 @@ module.exports=[ "potager.org", "sweetpepper.org", "myasustor.com", -"go-vip.co", -"go-vip.net", -"wpcomstaging.com", "myfritz.net", "*.awdev.ca", "*.advisor.ws", @@ -7510,6 +7509,7 @@ module.exports=[ "certmgr.org", "xenapponazure.com", "discourse.group", +"discourse.team", "virtueeldomein.nl", "cleverapps.io", "*.lcl.dev", @@ -7553,6 +7553,12 @@ module.exports=[ "co.no", "webhosting.be", "hosting-cluster.nl", +"ac.ru", +"edu.ru", +"gov.ru", +"int.ru", +"mil.ru", +"test.ru", "dyn.cosidns.de", "dynamisches-dns.de", "dnsupdater.de", @@ -7565,6 +7571,10 @@ module.exports=[ "realm.cz", "*.cryptonomic.net", "cupcake.is", +"*.customer-oci.com", +"*.oci.customer-oci.com", +"*.ocp.customer-oci.com", +"*.ocs.customer-oci.com", "cyon.link", "cyon.site", "daplie.me", @@ -7582,6 +7592,8 @@ module.exports=[ "store.dk", "*.dapps.earth", "*.bzz.dapps.earth", +"builtwithdark.com", +"edgestack.me", "debian.net", "dedyn.io", "dnshome.de", @@ -7905,6 +7917,7 @@ module.exports=[ "blogsite.xyz", "dynv6.net", "e4.cz", +"en-root.fr", "mytuleap.com", "onred.one", "staging.onred.one", @@ -8053,6 +8066,7 @@ module.exports=[ "vladimir.su", "vologda.su", "channelsdvr.net", +"u.channelsdvr.net", "fastly-terrarium.com", "fastlylb.net", "map.fastlylb.net", @@ -8082,6 +8096,7 @@ module.exports=[ "firebaseapp.com", "flynnhub.com", "flynnhosting.net", +"0e.vc", "freebox-os.com", "freeboxos.com", "fbx-os.fr", @@ -8100,11 +8115,13 @@ module.exports=[ "service.gov.uk", "gehirn.ne.jp", "usercontent.jp", +"gentapps.com", "lab.ms", "github.io", "githubusercontent.com", "gitlab.io", "glitch.me", +"lolipop.io", "cloudapps.digital", "london.cloudapps.digital", "homeoffice.gov.uk", @@ -8116,6 +8133,7 @@ module.exports=[ "web.app", "*.0emm.com", "appspot.com", +"*.r.appspot.com", "blogspot.ae", "blogspot.al", "blogspot.am", @@ -8199,6 +8217,7 @@ module.exports=[ "publishproxy.com", "withgoogle.com", "withyoutube.com", +"awsmppl.com", "fin.ci", "free.hr", "caa.li", @@ -8226,6 +8245,7 @@ module.exports=[ "firm.ng", "gen.ng", "ltd.ng", +"ngo.ng", "ng.school", "sch.so", "häkkinen.fi", @@ -8292,6 +8312,7 @@ module.exports=[ "kinghost.net", "uni5.net", "knightpoint.systems", +"oya.to", "co.krd", "edu.krd", "git-repos.de", @@ -8518,6 +8539,7 @@ module.exports=[ "nom.ai", "nom.al", "nym.by", +"nom.bz", "nym.bz", "nom.cl", "nym.ec", @@ -8539,6 +8561,7 @@ module.exports=[ "nym.li", "nym.lt", "nym.lu", +"nom.lv", "nym.me", "nom.mk", "nym.mn", @@ -8562,11 +8585,13 @@ module.exports=[ "nom.uy", "nom.vc", "nom.vg", +"static.observableusercontent.com", "cya.gg", "cloudycluster.net", "nid.io", "opencraft.hosting", "operaunite.com", +"skygearapp.com", "outsystemscloud.com", "ownprovider.com", "own.pm", @@ -8583,6 +8608,7 @@ module.exports=[ "pantheonsite.io", "gotpantheon.com", "mypep.link", +"perspecta.cloud", "on-web.fr", "*.platform.sh", "*.platformsh.site", @@ -8597,9 +8623,12 @@ module.exports=[ "byen.site", "pubtls.org", "qualifioapp.com", +"qbuser.com", "instantcloud.cn", "ras.ru", "qa2.com", +"qcx.io", +"*.sys.qcx.io", "dev-myqnapcloud.com", "alpha-myqnapcloud.com", "myqnapcloud.com", @@ -8608,6 +8637,7 @@ module.exports=[ "vaporcloud.io", "rackmaze.com", "rackmaze.net", +"*.on-k3s.io", "*.on-rancher.cloud", "*.on-rio.io", "readthedocs.io", @@ -8627,6 +8657,7 @@ module.exports=[ "logoip.de", "logoip.com", "schokokeks.net", +"gov.scot", "scrysec.com", "firewall-gateway.com", "firewall-gateway.de", @@ -8638,6 +8669,7 @@ module.exports=[ "my-firewall.org", "myfirewall.org", "spdns.org", +"senseering.net", "biz.ua", "co.ua", "pp.ua", @@ -8687,6 +8719,7 @@ module.exports=[ "myds.me", "synology.me", "vpnplus.to", +"direct.quickconnect.to", "taifun-dns.de", "gda.pl", "gdansk.pl", @@ -8751,11 +8784,14 @@ module.exports=[ "inc.hk", "virtualuser.de", "virtual-user.de", +"urown.cloud", +"dnsupdate.info", "lib.de.us", "2038.io", "router.management", "v-info.info", "voorloper.cloud", +"v.ua", "wafflecell.com", "*.webhare.dev", "wedeploy.io", @@ -8763,6 +8799,11 @@ module.exports=[ "wedeploy.sh", "remotewd.com", "wmflabs.org", +"myforum.community", +"community-pro.de", +"diskussionsbereich.de", +"community-pro.net", +"meinforum.net", "half.host", "xnbay.com", "u2.xnbay.com", @@ -8790,9 +8831,7 @@ module.exports=[ "bss.design", "basicserver.io", "virtualserver.io", -"site.builder.nu", -"enterprisecloud.nu", -"zone.id" +"enterprisecloud.nu" ] },{}],2:[function(require,module,exports){ /*eslint no-var:0, prefer-arrow-callback: 0, object-shorthand: 0 */ diff --git a/node_modules/psl/dist/psl.min.js b/node_modules/psl/dist/psl.min.js index 780127e53..d5c787e48 100644 --- a/node_modules/psl/dist/psl.min.js +++ b/node_modules/psl/dist/psl.min.js @@ -1 +1 @@ -!function(a){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=a();else if("function"==typeof define&&define.amd)define([],a);else{("undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this).psl=a()}}(function(){return function s(m,t,u){function r(o,a){if(!t[o]){if(!m[o]){var i="function"==typeof require&&require;if(!a&&i)return i(o,!0);if(p)return p(o,!0);var e=new Error("Cannot find module '"+o+"'");throw e.code="MODULE_NOT_FOUND",e}var n=t[o]={exports:{}};m[o][0].call(n.exports,function(a){return r(m[o][1][a]||a)},n,n.exports,s,m,t,u)}return t[o].exports}for(var p="function"==typeof require&&require,a=0;a= 0x80 (not a basic code point)","invalid-input":"Invalid input"},c=b-y,x=Math.floor,q=String.fromCharCode;function A(a){throw new RangeError(k[a])}function l(a,o){for(var i=a.length,e=[];i--;)e[i]=o(a[i]);return e}function g(a,o){var i=a.split("@"),e="";return 1>>10&1023|55296),a=56320|1023&a),o+=q(a)}).join("")}function L(a,o){return a+22+75*(a<26)-((0!=o)<<5)}function I(a,o,i){var e=0;for(a=i?x(a/t):a>>1,a+=x(a/o);c*f>>1x((d-g)/m))&&A("overflow"),g+=u*m,!(u<(r=t<=j?y:j+f<=t?f:t-j));t+=b)m>x(d/(p=b-r))&&A("overflow"),m*=p;j=I(g-s,o=c.length+1,0==s),x(g/o)>d-h&&A("overflow"),h+=x(g/o),g%=o,c.splice(g++,0,h)}return _(c)}function j(a){var o,i,e,n,s,m,t,u,r,p,k,c,l,g,h,j=[];for(c=(a=O(a)).length,o=w,s=v,m=i=0;mx((d-i)/(l=e+1))&&A("overflow"),i+=(t-o)*l,o=t,m=0;md&&A("overflow"),k==o){for(u=i,r=b;!(u<(p=r<=s?y:s+f<=r?f:r-s));r+=b)h=u-p,g=b-p,j.push(q(L(p+h%g,0))),u=x(h/g);j.push(q(L(u,0))),s=I(i,l,e==n),i=0,++e}++i,++o}return j.join("")}if(n={version:"1.4.1",ucs2:{decode:O,encode:_},decode:h,encode:j,toASCII:function(a){return g(a,function(a){return r.test(a)?"xn--"+j(a):a})},toUnicode:function(a){return g(a,function(a){return u.test(a)?h(a.slice(4).toLowerCase()):a})}},o&&i)if(T.exports==o)i.exports=n;else for(s in n)n.hasOwnProperty(s)&&(o[s]=n[s]);else a.punycode=n}(this)}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}]},{},[2])(2)}); +!function(a){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=a();else if("function"==typeof define&&define.amd)define([],a);else{("undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this).psl=a()}}(function(){return function s(m,t,u){function r(o,a){if(!t[o]){if(!m[o]){var i="function"==typeof require&&require;if(!a&&i)return i(o,!0);if(p)return p(o,!0);var e=new Error("Cannot find module '"+o+"'");throw e.code="MODULE_NOT_FOUND",e}var n=t[o]={exports:{}};m[o][0].call(n.exports,function(a){return r(m[o][1][a]||a)},n,n.exports,s,m,t,u)}return t[o].exports}for(var p="function"==typeof require&&require,a=0;a= 0x80 (not a basic code point)","invalid-input":"Invalid input"},c=b-y,x=Math.floor,q=String.fromCharCode;function A(a){throw new RangeError(k[a])}function l(a,o){for(var i=a.length,e=[];i--;)e[i]=o(a[i]);return e}function g(a,o){var i=a.split("@"),e="";return 1>>10&1023|55296),a=56320|1023&a),o+=q(a)}).join("")}function L(a,o){return a+22+75*(a<26)-((0!=o)<<5)}function I(a,o,i){var e=0;for(a=i?x(a/t):a>>1,a+=x(a/o);c*f>>1x((d-g)/m))&&A("overflow"),g+=u*m,!(u<(r=t<=j?y:j+f<=t?f:t-j));t+=b)m>x(d/(p=b-r))&&A("overflow"),m*=p;j=I(g-s,o=c.length+1,0==s),x(g/o)>d-h&&A("overflow"),h+=x(g/o),g%=o,c.splice(g++,0,h)}return _(c)}function j(a){var o,i,e,n,s,m,t,u,r,p,k,c,l,g,h,j=[];for(c=(a=O(a)).length,o=w,s=v,m=i=0;mx((d-i)/(l=e+1))&&A("overflow"),i+=(t-o)*l,o=t,m=0;md&&A("overflow"),k==o){for(u=i,r=b;!(u<(p=r<=s?y:s+f<=r?f:r-s));r+=b)h=u-p,g=b-p,j.push(q(L(p+h%g,0))),u=x(h/g);j.push(q(L(u,0))),s=I(i,l,e==n),i=0,++e}++i,++o}return j.join("")}if(n={version:"1.4.1",ucs2:{decode:O,encode:_},decode:h,encode:j,toASCII:function(a){return g(a,function(a){return r.test(a)?"xn--"+j(a):a})},toUnicode:function(a){return g(a,function(a){return u.test(a)?h(a.slice(4).toLowerCase()):a})}},0,o&&i)if(T.exports==o)i.exports=n;else for(s in n)n.hasOwnProperty(s)&&(o[s]=n[s]);else a.punycode=n}(this)}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}]},{},[2])(2)}); diff --git a/node_modules/psl/package.json b/node_modules/psl/package.json index b44f75001..e1be04aec 100644 --- a/node_modules/psl/package.json +++ b/node_modules/psl/package.json @@ -1,34 +1,27 @@ { - "_args": [ - [ - "psl@1.3.0", - "/Users/drew.heavner/Documents/Github/sign-android-release" - ] - ], - "_development": true, - "_from": "psl@1.3.0", - "_id": "psl@1.3.0", + "_from": "psl@^1.1.28", + "_id": "psl@1.8.0", "_inBundle": false, - "_integrity": "sha512-avHdspHO+9rQTLbv1RO+MPYeP/SzsCoxofjVnHanETfQhTJrmB0HlDoW+EiN/R+C0BZ+gERab9NY0lPN2TxNag==", + "_integrity": "sha512-RIdOzyoavK+hA18OGGWDqUTsCLhtA7IcZ/6NCs4fFJaHBDab+pDDmDIByWFRQJq2Cd7r1OoQxBGKOaztq+hjIQ==", "_location": "/psl", "_phantomChildren": {}, "_requested": { - "type": "version", + "type": "range", "registry": true, - "raw": "psl@1.3.0", + "raw": "psl@^1.1.28", "name": "psl", "escapedName": "psl", - "rawSpec": "1.3.0", + "rawSpec": "^1.1.28", "saveSpec": null, - "fetchSpec": "1.3.0" + "fetchSpec": "^1.1.28" }, "_requiredBy": [ - "/request/tough-cookie", "/tough-cookie" ], - "_resolved": "https://registry.npmjs.org/psl/-/psl-1.3.0.tgz", - "_spec": "1.3.0", - "_where": "/Users/drew.heavner/Documents/Github/sign-android-release", + "_resolved": "https://registry.npmjs.org/psl/-/psl-1.8.0.tgz", + "_shasum": "9326f8bcfb013adcc005fdff056acce020e51c24", + "_spec": "psl@^1.1.28", + "_where": "/Users/drew.heavner/Documents/Github/sign-android-release/node_modules/tough-cookie", "author": { "name": "Lupo Montero", "email": "lupomontero@gmail.com", @@ -37,23 +30,25 @@ "bugs": { "url": "https://github.com/lupomontero/psl/issues" }, + "bundleDependencies": false, + "deprecated": false, "description": "Domain name parser based on the Public Suffix List", "devDependencies": { "JSONStream": "^1.3.5", - "browserify": "^16.3.0", - "commit-and-pr": "^1.0.3", - "eslint": "^6.1.0", + "browserify": "^16.5.0", + "commit-and-pr": "^1.0.4", + "eslint": "^6.8.0", "eslint-config-hapi": "^12.0.0", "eslint-plugin-hapi": "^4.1.0", - "karma": "^4.2.0", - "karma-browserify": "^6.1.0", + "karma": "^4.4.1", + "karma-browserify": "^7.0.0", "karma-mocha": "^1.3.0", "karma-mocha-reporter": "^2.2.5", "karma-phantomjs-launcher": "^1.0.4", - "mocha": "^6.2.0", + "mocha": "^7.1.1", "phantomjs-prebuilt": "^2.1.16", - "request": "^2.88.0", - "uglify-js": "^3.6.0", + "request": "^2.88.2", + "uglify-js": "^3.8.0", "watchify": "^3.11.1" }, "homepage": "https://github.com/lupomontero/psl#readme", @@ -78,5 +73,5 @@ "test": "mocha test && karma start ./karma.conf.js --single-run", "watch": "mocha test --watch" }, - "version": "1.3.0" + "version": "1.8.0" } diff --git a/node_modules/read-pkg-up/node_modules/read-pkg/index.js b/node_modules/read-pkg-up/node_modules/read-pkg/index.js deleted file mode 100644 index dff948b69..000000000 --- a/node_modules/read-pkg-up/node_modules/read-pkg/index.js +++ /dev/null @@ -1,47 +0,0 @@ -'use strict'; -const path = require('path'); -const loadJsonFile = require('load-json-file'); -const pathType = require('path-type'); - -module.exports = (fp, opts) => { - if (typeof fp !== 'string') { - opts = fp; - fp = '.'; - } - - opts = opts || {}; - - return pathType.dir(fp) - .then(isDir => { - if (isDir) { - fp = path.join(fp, 'package.json'); - } - - return loadJsonFile(fp); - }) - .then(x => { - if (opts.normalize !== false) { - require('normalize-package-data')(x); - } - - return x; - }); -}; - -module.exports.sync = (fp, opts) => { - if (typeof fp !== 'string') { - opts = fp; - fp = '.'; - } - - opts = opts || {}; - fp = pathType.dirSync(fp) ? path.join(fp, 'package.json') : fp; - - const x = loadJsonFile.sync(fp); - - if (opts.normalize !== false) { - require('normalize-package-data')(x); - } - - return x; -}; diff --git a/node_modules/read-pkg-up/node_modules/read-pkg/license b/node_modules/read-pkg-up/node_modules/read-pkg/license deleted file mode 100644 index e7af2f771..000000000 --- a/node_modules/read-pkg-up/node_modules/read-pkg/license +++ /dev/null @@ -1,9 +0,0 @@ -MIT License - -Copyright (c) Sindre Sorhus (sindresorhus.com) - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/read-pkg-up/node_modules/read-pkg/package.json b/node_modules/read-pkg-up/node_modules/read-pkg/package.json deleted file mode 100644 index 2b413a453..000000000 --- a/node_modules/read-pkg-up/node_modules/read-pkg/package.json +++ /dev/null @@ -1,78 +0,0 @@ -{ - "_args": [ - [ - "read-pkg@3.0.0", - "/Users/drew.heavner/Documents/Github/sign-android-release" - ] - ], - "_development": true, - "_from": "read-pkg@3.0.0", - "_id": "read-pkg@3.0.0", - "_inBundle": false, - "_integrity": "sha1-nLxoaXj+5l0WwA4rGcI3/Pbjg4k=", - "_location": "/read-pkg-up/read-pkg", - "_phantomChildren": {}, - "_requested": { - "type": "version", - "registry": true, - "raw": "read-pkg@3.0.0", - "name": "read-pkg", - "escapedName": "read-pkg", - "rawSpec": "3.0.0", - "saveSpec": null, - "fetchSpec": "3.0.0" - }, - "_requiredBy": [ - "/read-pkg-up" - ], - "_resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-3.0.0.tgz", - "_spec": "3.0.0", - "_where": "/Users/drew.heavner/Documents/Github/sign-android-release", - "author": { - "name": "Sindre Sorhus", - "email": "sindresorhus@gmail.com", - "url": "sindresorhus.com" - }, - "bugs": { - "url": "https://github.com/sindresorhus/read-pkg/issues" - }, - "dependencies": { - "load-json-file": "^4.0.0", - "normalize-package-data": "^2.3.2", - "path-type": "^3.0.0" - }, - "description": "Read a package.json file", - "devDependencies": { - "ava": "*", - "xo": "*" - }, - "engines": { - "node": ">=4" - }, - "files": [ - "index.js" - ], - "homepage": "https://github.com/sindresorhus/read-pkg#readme", - "keywords": [ - "json", - "read", - "parse", - "file", - "fs", - "graceful", - "load", - "pkg", - "package", - "normalize" - ], - "license": "MIT", - "name": "read-pkg", - "repository": { - "type": "git", - "url": "git+https://github.com/sindresorhus/read-pkg.git" - }, - "scripts": { - "test": "xo && ava" - }, - "version": "3.0.0" -} diff --git a/node_modules/read-pkg-up/node_modules/read-pkg/readme.md b/node_modules/read-pkg-up/node_modules/read-pkg/readme.md deleted file mode 100644 index 687506740..000000000 --- a/node_modules/read-pkg-up/node_modules/read-pkg/readme.md +++ /dev/null @@ -1,79 +0,0 @@ -# read-pkg [![Build Status](https://travis-ci.org/sindresorhus/read-pkg.svg?branch=master)](https://travis-ci.org/sindresorhus/read-pkg) - -> Read a package.json file - - -## Why - -- [Gracefully handles filesystem issues](https://github.com/isaacs/node-graceful-fs) -- [Strips UTF-8 BOM](https://github.com/sindresorhus/strip-bom) -- [Throws more helpful JSON errors](https://github.com/sindresorhus/parse-json) -- [Normalizes the data](https://github.com/npm/normalize-package-data#what-normalization-currently-entails) - - -## Install - -``` -$ npm install read-pkg -``` - - -## Usage - -```js -const readPkg = require('read-pkg'); - -readPkg().then(pkg => { - console.log(pkg); - //=> {name: 'read-pkg', ...} -}); - -readPkg(__dirname).then(pkg => { - console.log(pkg); - //=> {name: 'read-pkg', ...} -}); - -readPkg(path.join('unicorn', 'package.json')).then(pkg => { - console.log(pkg); - //=> {name: 'read-pkg', ...} -}); -``` - - -## API - -### readPkg([path], [options]) - -Returns a `Promise` for the parsed JSON. - -### readPkg.sync([path], [options]) - -Returns the parsed JSON. - -#### path - -Type: `string`
-Default: `process.cwd()` - -Path to a `package.json` file or its directory. - -#### options - -##### normalize - -Type: `boolean`
-Default: `true` - -[Normalize](https://github.com/npm/normalize-package-data#what-normalization-currently-entails) the package data. - - -## Related - -- [read-pkg-up](https://github.com/sindresorhus/read-pkg-up) - Read the closest package.json file -- [write-pkg](https://github.com/sindresorhus/write-pkg) - Write a `package.json` file -- [load-json-file](https://github.com/sindresorhus/load-json-file) - Read and parse a JSON file - - -## License - -MIT © [Sindre Sorhus](https://sindresorhus.com) diff --git a/node_modules/readable-stream/.travis.yml b/node_modules/readable-stream/.travis.yml deleted file mode 100644 index 40992555b..000000000 --- a/node_modules/readable-stream/.travis.yml +++ /dev/null @@ -1,55 +0,0 @@ -sudo: false -language: node_js -before_install: - - npm install -g npm@2 - - test $NPM_LEGACY && npm install -g npm@latest-3 || npm install npm -g -notifications: - email: false -matrix: - fast_finish: true - include: - - node_js: '0.8' - env: - - TASK=test - - NPM_LEGACY=true - - node_js: '0.10' - env: - - TASK=test - - NPM_LEGACY=true - - node_js: '0.11' - env: - - TASK=test - - NPM_LEGACY=true - - node_js: '0.12' - env: - - TASK=test - - NPM_LEGACY=true - - node_js: 1 - env: - - TASK=test - - NPM_LEGACY=true - - node_js: 2 - env: - - TASK=test - - NPM_LEGACY=true - - node_js: 3 - env: - - TASK=test - - NPM_LEGACY=true - - node_js: 4 - env: TASK=test - - node_js: 5 - env: TASK=test - - node_js: 6 - env: TASK=test - - node_js: 7 - env: TASK=test - - node_js: 8 - env: TASK=test - - node_js: 9 - env: TASK=test -script: "npm run $TASK" -env: - global: - - secure: rE2Vvo7vnjabYNULNyLFxOyt98BoJexDqsiOnfiD6kLYYsiQGfr/sbZkPMOFm9qfQG7pjqx+zZWZjGSswhTt+626C0t/njXqug7Yps4c3dFblzGfreQHp7wNX5TFsvrxd6dAowVasMp61sJcRnB2w8cUzoe3RAYUDHyiHktwqMc= - - secure: g9YINaKAdMatsJ28G9jCGbSaguXCyxSTy+pBO6Ch0Cf57ZLOTka3HqDj8p3nV28LUIHZ3ut5WO43CeYKwt4AUtLpBS3a0dndHdY6D83uY6b2qh5hXlrcbeQTq2cvw2y95F7hm4D1kwrgZ7ViqaKggRcEupAL69YbJnxeUDKWEdI= diff --git a/node_modules/readable-stream/CONTRIBUTING.md b/node_modules/readable-stream/CONTRIBUTING.md deleted file mode 100644 index f478d58dc..000000000 --- a/node_modules/readable-stream/CONTRIBUTING.md +++ /dev/null @@ -1,38 +0,0 @@ -# Developer's Certificate of Origin 1.1 - -By making a contribution to this project, I certify that: - -* (a) The contribution was created in whole or in part by me and I - have the right to submit it under the open source license - indicated in the file; or - -* (b) The contribution is based upon previous work that, to the best - of my knowledge, is covered under an appropriate open source - license and I have the right under that license to submit that - work with modifications, whether created in whole or in part - by me, under the same open source license (unless I am - permitted to submit under a different license), as indicated - in the file; or - -* (c) The contribution was provided directly to me by some other - person who certified (a), (b) or (c) and I have not modified - it. - -* (d) I understand and agree that this project and the contribution - are public and that a record of the contribution (including all - personal information I submit with it, including my sign-off) is - maintained indefinitely and may be redistributed consistent with - this project or the open source license(s) involved. - -## Moderation Policy - -The [Node.js Moderation Policy] applies to this WG. - -## Code of Conduct - -The [Node.js Code of Conduct][] applies to this WG. - -[Node.js Code of Conduct]: -https://github.com/nodejs/node/blob/master/CODE_OF_CONDUCT.md -[Node.js Moderation Policy]: -https://github.com/nodejs/TSC/blob/master/Moderation-Policy.md diff --git a/node_modules/readable-stream/GOVERNANCE.md b/node_modules/readable-stream/GOVERNANCE.md deleted file mode 100644 index 16ffb93f2..000000000 --- a/node_modules/readable-stream/GOVERNANCE.md +++ /dev/null @@ -1,136 +0,0 @@ -### Streams Working Group - -The Node.js Streams is jointly governed by a Working Group -(WG) -that is responsible for high-level guidance of the project. - -The WG has final authority over this project including: - -* Technical direction -* Project governance and process (including this policy) -* Contribution policy -* GitHub repository hosting -* Conduct guidelines -* Maintaining the list of additional Collaborators - -For the current list of WG members, see the project -[README.md](./README.md#current-project-team-members). - -### Collaborators - -The readable-stream GitHub repository is -maintained by the WG and additional Collaborators who are added by the -WG on an ongoing basis. - -Individuals making significant and valuable contributions are made -Collaborators and given commit-access to the project. These -individuals are identified by the WG and their addition as -Collaborators is discussed during the WG meeting. - -_Note:_ If you make a significant contribution and are not considered -for commit-access log an issue or contact a WG member directly and it -will be brought up in the next WG meeting. - -Modifications of the contents of the readable-stream repository are -made on -a collaborative basis. Anybody with a GitHub account may propose a -modification via pull request and it will be considered by the project -Collaborators. All pull requests must be reviewed and accepted by a -Collaborator with sufficient expertise who is able to take full -responsibility for the change. In the case of pull requests proposed -by an existing Collaborator, an additional Collaborator is required -for sign-off. Consensus should be sought if additional Collaborators -participate and there is disagreement around a particular -modification. See _Consensus Seeking Process_ below for further detail -on the consensus model used for governance. - -Collaborators may opt to elevate significant or controversial -modifications, or modifications that have not found consensus to the -WG for discussion by assigning the ***WG-agenda*** tag to a pull -request or issue. The WG should serve as the final arbiter where -required. - -For the current list of Collaborators, see the project -[README.md](./README.md#members). - -### WG Membership - -WG seats are not time-limited. There is no fixed size of the WG. -However, the expected target is between 6 and 12, to ensure adequate -coverage of important areas of expertise, balanced with the ability to -make decisions efficiently. - -There is no specific set of requirements or qualifications for WG -membership beyond these rules. - -The WG may add additional members to the WG by unanimous consensus. - -A WG member may be removed from the WG by voluntary resignation, or by -unanimous consensus of all other WG members. - -Changes to WG membership should be posted in the agenda, and may be -suggested as any other agenda item (see "WG Meetings" below). - -If an addition or removal is proposed during a meeting, and the full -WG is not in attendance to participate, then the addition or removal -is added to the agenda for the subsequent meeting. This is to ensure -that all members are given the opportunity to participate in all -membership decisions. If a WG member is unable to attend a meeting -where a planned membership decision is being made, then their consent -is assumed. - -No more than 1/3 of the WG members may be affiliated with the same -employer. If removal or resignation of a WG member, or a change of -employment by a WG member, creates a situation where more than 1/3 of -the WG membership shares an employer, then the situation must be -immediately remedied by the resignation or removal of one or more WG -members affiliated with the over-represented employer(s). - -### WG Meetings - -The WG meets occasionally on a Google Hangout On Air. A designated moderator -approved by the WG runs the meeting. Each meeting should be -published to YouTube. - -Items are added to the WG agenda that are considered contentious or -are modifications of governance, contribution policy, WG membership, -or release process. - -The intention of the agenda is not to approve or review all patches; -that should happen continuously on GitHub and be handled by the larger -group of Collaborators. - -Any community member or contributor can ask that something be added to -the next meeting's agenda by logging a GitHub Issue. Any Collaborator, -WG member or the moderator can add the item to the agenda by adding -the ***WG-agenda*** tag to the issue. - -Prior to each WG meeting the moderator will share the Agenda with -members of the WG. WG members can add any items they like to the -agenda at the beginning of each meeting. The moderator and the WG -cannot veto or remove items. - -The WG may invite persons or representatives from certain projects to -participate in a non-voting capacity. - -The moderator is responsible for summarizing the discussion of each -agenda item and sends it as a pull request after the meeting. - -### Consensus Seeking Process - -The WG follows a -[Consensus -Seeking](http://en.wikipedia.org/wiki/Consensus-seeking_decision-making) -decision-making model. - -When an agenda item has appeared to reach a consensus the moderator -will ask "Does anyone object?" as a final call for dissent from the -consensus. - -If an agenda item cannot reach a consensus a WG member can call for -either a closing vote or a vote to table the issue to the next -meeting. The call for a vote must be seconded by a majority of the WG -or else the discussion will continue. Simple majority wins. - -Note that changes to WG membership require a majority consensus. See -"WG Membership" above. diff --git a/node_modules/readable-stream/LICENSE b/node_modules/readable-stream/LICENSE deleted file mode 100644 index 2873b3b2e..000000000 --- a/node_modules/readable-stream/LICENSE +++ /dev/null @@ -1,47 +0,0 @@ -Node.js is licensed for use as follows: - -""" -Copyright Node.js contributors. All rights reserved. - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to -deal in the Software without restriction, including without limitation the -rights to use, copy, modify, merge, publish, distribute, sublicense, and/or -sell copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS -IN THE SOFTWARE. -""" - -This license applies to parts of Node.js originating from the -https://github.com/joyent/node repository: - -""" -Copyright Joyent, Inc. and other Node contributors. All rights reserved. -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to -deal in the Software without restriction, including without limitation the -rights to use, copy, modify, merge, publish, distribute, sublicense, and/or -sell copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS -IN THE SOFTWARE. -""" diff --git a/node_modules/readable-stream/README.md b/node_modules/readable-stream/README.md deleted file mode 100644 index 23fe3f3e3..000000000 --- a/node_modules/readable-stream/README.md +++ /dev/null @@ -1,58 +0,0 @@ -# readable-stream - -***Node-core v8.11.1 streams for userland*** [![Build Status](https://travis-ci.org/nodejs/readable-stream.svg?branch=master)](https://travis-ci.org/nodejs/readable-stream) - - -[![NPM](https://nodei.co/npm/readable-stream.png?downloads=true&downloadRank=true)](https://nodei.co/npm/readable-stream/) -[![NPM](https://nodei.co/npm-dl/readable-stream.png?&months=6&height=3)](https://nodei.co/npm/readable-stream/) - - -[![Sauce Test Status](https://saucelabs.com/browser-matrix/readable-stream.svg)](https://saucelabs.com/u/readable-stream) - -```bash -npm install --save readable-stream -``` - -***Node-core streams for userland*** - -This package is a mirror of the Streams2 and Streams3 implementations in -Node-core. - -Full documentation may be found on the [Node.js website](https://nodejs.org/dist/v8.11.1/docs/api/stream.html). - -If you want to guarantee a stable streams base, regardless of what version of -Node you, or the users of your libraries are using, use **readable-stream** *only* and avoid the *"stream"* module in Node-core, for background see [this blogpost](http://r.va.gg/2014/06/why-i-dont-use-nodes-core-stream-module.html). - -As of version 2.0.0 **readable-stream** uses semantic versioning. - -# Streams Working Group - -`readable-stream` is maintained by the Streams Working Group, which -oversees the development and maintenance of the Streams API within -Node.js. The responsibilities of the Streams Working Group include: - -* Addressing stream issues on the Node.js issue tracker. -* Authoring and editing stream documentation within the Node.js project. -* Reviewing changes to stream subclasses within the Node.js project. -* Redirecting changes to streams from the Node.js project to this - project. -* Assisting in the implementation of stream providers within Node.js. -* Recommending versions of `readable-stream` to be included in Node.js. -* Messaging about the future of streams to give the community advance - notice of changes. - - -## Team Members - -* **Chris Dickinson** ([@chrisdickinson](https://github.com/chrisdickinson)) <christopher.s.dickinson@gmail.com> - - Release GPG key: 9554F04D7259F04124DE6B476D5A82AC7E37093B -* **Calvin Metcalf** ([@calvinmetcalf](https://github.com/calvinmetcalf)) <calvin.metcalf@gmail.com> - - Release GPG key: F3EF5F62A87FC27A22E643F714CE4FF5015AA242 -* **Rod Vagg** ([@rvagg](https://github.com/rvagg)) <rod@vagg.org> - - Release GPG key: DD8F2338BAE7501E3DD5AC78C273792F7D83545D -* **Sam Newman** ([@sonewman](https://github.com/sonewman)) <newmansam@outlook.com> -* **Mathias Buus** ([@mafintosh](https://github.com/mafintosh)) <mathiasbuus@gmail.com> -* **Domenic Denicola** ([@domenic](https://github.com/domenic)) <d@domenic.me> -* **Matteo Collina** ([@mcollina](https://github.com/mcollina)) <matteo.collina@gmail.com> - - Release GPG key: 3ABC01543F22DD2239285CDD818674489FBC127E -* **Irina Shestak** ([@lrlna](https://github.com/lrlna)) <shestak.irina@gmail.com> diff --git a/node_modules/readable-stream/doc/wg-meetings/2015-01-30.md b/node_modules/readable-stream/doc/wg-meetings/2015-01-30.md deleted file mode 100644 index 83275f192..000000000 --- a/node_modules/readable-stream/doc/wg-meetings/2015-01-30.md +++ /dev/null @@ -1,60 +0,0 @@ -# streams WG Meeting 2015-01-30 - -## Links - -* **Google Hangouts Video**: http://www.youtube.com/watch?v=I9nDOSGfwZg -* **GitHub Issue**: https://github.com/iojs/readable-stream/issues/106 -* **Original Minutes Google Doc**: https://docs.google.com/document/d/17aTgLnjMXIrfjgNaTUnHQO7m3xgzHR2VXBTmi03Qii4/ - -## Agenda - -Extracted from https://github.com/iojs/readable-stream/labels/wg-agenda prior to meeting. - -* adopt a charter [#105](https://github.com/iojs/readable-stream/issues/105) -* release and versioning strategy [#101](https://github.com/iojs/readable-stream/issues/101) -* simpler stream creation [#102](https://github.com/iojs/readable-stream/issues/102) -* proposal: deprecate implicit flowing of streams [#99](https://github.com/iojs/readable-stream/issues/99) - -## Minutes - -### adopt a charter - -* group: +1's all around - -### What versioning scheme should be adopted? -* group: +1’s 3.0.0 -* domenic+group: pulling in patches from other sources where appropriate -* mikeal: version independently, suggesting versions for io.js -* mikeal+domenic: work with TC to notify in advance of changes -simpler stream creation - -### streamline creation of streams -* sam: streamline creation of streams -* domenic: nice simple solution posted - but, we lose the opportunity to change the model - may not be backwards incompatible (double check keys) - - **action item:** domenic will check - -### remove implicit flowing of streams on(‘data’) -* add isFlowing / isPaused -* mikeal: worrying that we’re documenting polyfill methods – confuses users -* domenic: more reflective API is probably good, with warning labels for users -* new section for mad scientists (reflective stream access) -* calvin: name the “third state” -* mikeal: maybe borrow the name from whatwg? -* domenic: we’re missing the “third state” -* consensus: kind of difficult to name the third state -* mikeal: figure out differences in states / compat -* mathias: always flow on data – eliminates third state - * explore what it breaks - -**action items:** -* ask isaac for ability to list packages by what public io.js APIs they use (esp. Stream) -* ask rod/build for infrastructure -* **chris**: explore the “flow on data” approach -* add isPaused/isFlowing -* add new docs section -* move isPaused to that section - - diff --git a/node_modules/readable-stream/duplex-browser.js b/node_modules/readable-stream/duplex-browser.js deleted file mode 100644 index f8b2db83d..000000000 --- a/node_modules/readable-stream/duplex-browser.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('./lib/_stream_duplex.js'); diff --git a/node_modules/readable-stream/duplex.js b/node_modules/readable-stream/duplex.js deleted file mode 100644 index 46924cbfd..000000000 --- a/node_modules/readable-stream/duplex.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('./readable').Duplex diff --git a/node_modules/readable-stream/lib/_stream_duplex.js b/node_modules/readable-stream/lib/_stream_duplex.js deleted file mode 100644 index a1ca813e5..000000000 --- a/node_modules/readable-stream/lib/_stream_duplex.js +++ /dev/null @@ -1,131 +0,0 @@ -// Copyright Joyent, Inc. and other Node contributors. -// -// Permission is hereby granted, free of charge, to any person obtaining a -// copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to permit -// persons to whom the Software is furnished to do so, subject to the -// following conditions: -// -// The above copyright notice and this permission notice shall be included -// in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN -// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE -// USE OR OTHER DEALINGS IN THE SOFTWARE. - -// a duplex stream is just a stream that is both readable and writable. -// Since JS doesn't have multiple prototypal inheritance, this class -// prototypally inherits from Readable, and then parasitically from -// Writable. - -'use strict'; - -/**/ - -var pna = require('process-nextick-args'); -/**/ - -/**/ -var objectKeys = Object.keys || function (obj) { - var keys = []; - for (var key in obj) { - keys.push(key); - }return keys; -}; -/**/ - -module.exports = Duplex; - -/**/ -var util = require('core-util-is'); -util.inherits = require('inherits'); -/**/ - -var Readable = require('./_stream_readable'); -var Writable = require('./_stream_writable'); - -util.inherits(Duplex, Readable); - -{ - // avoid scope creep, the keys array can then be collected - var keys = objectKeys(Writable.prototype); - for (var v = 0; v < keys.length; v++) { - var method = keys[v]; - if (!Duplex.prototype[method]) Duplex.prototype[method] = Writable.prototype[method]; - } -} - -function Duplex(options) { - if (!(this instanceof Duplex)) return new Duplex(options); - - Readable.call(this, options); - Writable.call(this, options); - - if (options && options.readable === false) this.readable = false; - - if (options && options.writable === false) this.writable = false; - - this.allowHalfOpen = true; - if (options && options.allowHalfOpen === false) this.allowHalfOpen = false; - - this.once('end', onend); -} - -Object.defineProperty(Duplex.prototype, 'writableHighWaterMark', { - // making it explicit this property is not enumerable - // because otherwise some prototype manipulation in - // userland will fail - enumerable: false, - get: function () { - return this._writableState.highWaterMark; - } -}); - -// the no-half-open enforcer -function onend() { - // if we allow half-open state, or if the writable side ended, - // then we're ok. - if (this.allowHalfOpen || this._writableState.ended) return; - - // no more data can be written. - // But allow more writes to happen in this tick. - pna.nextTick(onEndNT, this); -} - -function onEndNT(self) { - self.end(); -} - -Object.defineProperty(Duplex.prototype, 'destroyed', { - get: function () { - if (this._readableState === undefined || this._writableState === undefined) { - return false; - } - return this._readableState.destroyed && this._writableState.destroyed; - }, - set: function (value) { - // we ignore the value if the stream - // has not been initialized yet - if (this._readableState === undefined || this._writableState === undefined) { - return; - } - - // backward compatibility, the user is explicitly - // managing destroyed - this._readableState.destroyed = value; - this._writableState.destroyed = value; - } -}); - -Duplex.prototype._destroy = function (err, cb) { - this.push(null); - this.end(); - - pna.nextTick(cb, err); -}; \ No newline at end of file diff --git a/node_modules/readable-stream/lib/_stream_passthrough.js b/node_modules/readable-stream/lib/_stream_passthrough.js deleted file mode 100644 index a9c835884..000000000 --- a/node_modules/readable-stream/lib/_stream_passthrough.js +++ /dev/null @@ -1,47 +0,0 @@ -// Copyright Joyent, Inc. and other Node contributors. -// -// Permission is hereby granted, free of charge, to any person obtaining a -// copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to permit -// persons to whom the Software is furnished to do so, subject to the -// following conditions: -// -// The above copyright notice and this permission notice shall be included -// in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN -// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE -// USE OR OTHER DEALINGS IN THE SOFTWARE. - -// a passthrough stream. -// basically just the most minimal sort of Transform stream. -// Every written chunk gets output as-is. - -'use strict'; - -module.exports = PassThrough; - -var Transform = require('./_stream_transform'); - -/**/ -var util = require('core-util-is'); -util.inherits = require('inherits'); -/**/ - -util.inherits(PassThrough, Transform); - -function PassThrough(options) { - if (!(this instanceof PassThrough)) return new PassThrough(options); - - Transform.call(this, options); -} - -PassThrough.prototype._transform = function (chunk, encoding, cb) { - cb(null, chunk); -}; \ No newline at end of file diff --git a/node_modules/readable-stream/lib/_stream_readable.js b/node_modules/readable-stream/lib/_stream_readable.js deleted file mode 100644 index bf34ac65e..000000000 --- a/node_modules/readable-stream/lib/_stream_readable.js +++ /dev/null @@ -1,1019 +0,0 @@ -// Copyright Joyent, Inc. and other Node contributors. -// -// Permission is hereby granted, free of charge, to any person obtaining a -// copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to permit -// persons to whom the Software is furnished to do so, subject to the -// following conditions: -// -// The above copyright notice and this permission notice shall be included -// in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN -// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE -// USE OR OTHER DEALINGS IN THE SOFTWARE. - -'use strict'; - -/**/ - -var pna = require('process-nextick-args'); -/**/ - -module.exports = Readable; - -/**/ -var isArray = require('isarray'); -/**/ - -/**/ -var Duplex; -/**/ - -Readable.ReadableState = ReadableState; - -/**/ -var EE = require('events').EventEmitter; - -var EElistenerCount = function (emitter, type) { - return emitter.listeners(type).length; -}; -/**/ - -/**/ -var Stream = require('./internal/streams/stream'); -/**/ - -/**/ - -var Buffer = require('safe-buffer').Buffer; -var OurUint8Array = global.Uint8Array || function () {}; -function _uint8ArrayToBuffer(chunk) { - return Buffer.from(chunk); -} -function _isUint8Array(obj) { - return Buffer.isBuffer(obj) || obj instanceof OurUint8Array; -} - -/**/ - -/**/ -var util = require('core-util-is'); -util.inherits = require('inherits'); -/**/ - -/**/ -var debugUtil = require('util'); -var debug = void 0; -if (debugUtil && debugUtil.debuglog) { - debug = debugUtil.debuglog('stream'); -} else { - debug = function () {}; -} -/**/ - -var BufferList = require('./internal/streams/BufferList'); -var destroyImpl = require('./internal/streams/destroy'); -var StringDecoder; - -util.inherits(Readable, Stream); - -var kProxyEvents = ['error', 'close', 'destroy', 'pause', 'resume']; - -function prependListener(emitter, event, fn) { - // Sadly this is not cacheable as some libraries bundle their own - // event emitter implementation with them. - if (typeof emitter.prependListener === 'function') return emitter.prependListener(event, fn); - - // This is a hack to make sure that our error handler is attached before any - // userland ones. NEVER DO THIS. This is here only because this code needs - // to continue to work with older versions of Node.js that do not include - // the prependListener() method. The goal is to eventually remove this hack. - if (!emitter._events || !emitter._events[event]) emitter.on(event, fn);else if (isArray(emitter._events[event])) emitter._events[event].unshift(fn);else emitter._events[event] = [fn, emitter._events[event]]; -} - -function ReadableState(options, stream) { - Duplex = Duplex || require('./_stream_duplex'); - - options = options || {}; - - // Duplex streams are both readable and writable, but share - // the same options object. - // However, some cases require setting options to different - // values for the readable and the writable sides of the duplex stream. - // These options can be provided separately as readableXXX and writableXXX. - var isDuplex = stream instanceof Duplex; - - // object stream flag. Used to make read(n) ignore n and to - // make all the buffer merging and length checks go away - this.objectMode = !!options.objectMode; - - if (isDuplex) this.objectMode = this.objectMode || !!options.readableObjectMode; - - // the point at which it stops calling _read() to fill the buffer - // Note: 0 is a valid value, means "don't call _read preemptively ever" - var hwm = options.highWaterMark; - var readableHwm = options.readableHighWaterMark; - var defaultHwm = this.objectMode ? 16 : 16 * 1024; - - if (hwm || hwm === 0) this.highWaterMark = hwm;else if (isDuplex && (readableHwm || readableHwm === 0)) this.highWaterMark = readableHwm;else this.highWaterMark = defaultHwm; - - // cast to ints. - this.highWaterMark = Math.floor(this.highWaterMark); - - // A linked list is used to store data chunks instead of an array because the - // linked list can remove elements from the beginning faster than - // array.shift() - this.buffer = new BufferList(); - this.length = 0; - this.pipes = null; - this.pipesCount = 0; - this.flowing = null; - this.ended = false; - this.endEmitted = false; - this.reading = false; - - // a flag to be able to tell if the event 'readable'/'data' is emitted - // immediately, or on a later tick. We set this to true at first, because - // any actions that shouldn't happen until "later" should generally also - // not happen before the first read call. - this.sync = true; - - // whenever we return null, then we set a flag to say - // that we're awaiting a 'readable' event emission. - this.needReadable = false; - this.emittedReadable = false; - this.readableListening = false; - this.resumeScheduled = false; - - // has it been destroyed - this.destroyed = false; - - // Crypto is kind of old and crusty. Historically, its default string - // encoding is 'binary' so we have to make this configurable. - // Everything else in the universe uses 'utf8', though. - this.defaultEncoding = options.defaultEncoding || 'utf8'; - - // the number of writers that are awaiting a drain event in .pipe()s - this.awaitDrain = 0; - - // if true, a maybeReadMore has been scheduled - this.readingMore = false; - - this.decoder = null; - this.encoding = null; - if (options.encoding) { - if (!StringDecoder) StringDecoder = require('string_decoder/').StringDecoder; - this.decoder = new StringDecoder(options.encoding); - this.encoding = options.encoding; - } -} - -function Readable(options) { - Duplex = Duplex || require('./_stream_duplex'); - - if (!(this instanceof Readable)) return new Readable(options); - - this._readableState = new ReadableState(options, this); - - // legacy - this.readable = true; - - if (options) { - if (typeof options.read === 'function') this._read = options.read; - - if (typeof options.destroy === 'function') this._destroy = options.destroy; - } - - Stream.call(this); -} - -Object.defineProperty(Readable.prototype, 'destroyed', { - get: function () { - if (this._readableState === undefined) { - return false; - } - return this._readableState.destroyed; - }, - set: function (value) { - // we ignore the value if the stream - // has not been initialized yet - if (!this._readableState) { - return; - } - - // backward compatibility, the user is explicitly - // managing destroyed - this._readableState.destroyed = value; - } -}); - -Readable.prototype.destroy = destroyImpl.destroy; -Readable.prototype._undestroy = destroyImpl.undestroy; -Readable.prototype._destroy = function (err, cb) { - this.push(null); - cb(err); -}; - -// Manually shove something into the read() buffer. -// This returns true if the highWaterMark has not been hit yet, -// similar to how Writable.write() returns true if you should -// write() some more. -Readable.prototype.push = function (chunk, encoding) { - var state = this._readableState; - var skipChunkCheck; - - if (!state.objectMode) { - if (typeof chunk === 'string') { - encoding = encoding || state.defaultEncoding; - if (encoding !== state.encoding) { - chunk = Buffer.from(chunk, encoding); - encoding = ''; - } - skipChunkCheck = true; - } - } else { - skipChunkCheck = true; - } - - return readableAddChunk(this, chunk, encoding, false, skipChunkCheck); -}; - -// Unshift should *always* be something directly out of read() -Readable.prototype.unshift = function (chunk) { - return readableAddChunk(this, chunk, null, true, false); -}; - -function readableAddChunk(stream, chunk, encoding, addToFront, skipChunkCheck) { - var state = stream._readableState; - if (chunk === null) { - state.reading = false; - onEofChunk(stream, state); - } else { - var er; - if (!skipChunkCheck) er = chunkInvalid(state, chunk); - if (er) { - stream.emit('error', er); - } else if (state.objectMode || chunk && chunk.length > 0) { - if (typeof chunk !== 'string' && !state.objectMode && Object.getPrototypeOf(chunk) !== Buffer.prototype) { - chunk = _uint8ArrayToBuffer(chunk); - } - - if (addToFront) { - if (state.endEmitted) stream.emit('error', new Error('stream.unshift() after end event'));else addChunk(stream, state, chunk, true); - } else if (state.ended) { - stream.emit('error', new Error('stream.push() after EOF')); - } else { - state.reading = false; - if (state.decoder && !encoding) { - chunk = state.decoder.write(chunk); - if (state.objectMode || chunk.length !== 0) addChunk(stream, state, chunk, false);else maybeReadMore(stream, state); - } else { - addChunk(stream, state, chunk, false); - } - } - } else if (!addToFront) { - state.reading = false; - } - } - - return needMoreData(state); -} - -function addChunk(stream, state, chunk, addToFront) { - if (state.flowing && state.length === 0 && !state.sync) { - stream.emit('data', chunk); - stream.read(0); - } else { - // update the buffer info. - state.length += state.objectMode ? 1 : chunk.length; - if (addToFront) state.buffer.unshift(chunk);else state.buffer.push(chunk); - - if (state.needReadable) emitReadable(stream); - } - maybeReadMore(stream, state); -} - -function chunkInvalid(state, chunk) { - var er; - if (!_isUint8Array(chunk) && typeof chunk !== 'string' && chunk !== undefined && !state.objectMode) { - er = new TypeError('Invalid non-string/buffer chunk'); - } - return er; -} - -// if it's past the high water mark, we can push in some more. -// Also, if we have no data yet, we can stand some -// more bytes. This is to work around cases where hwm=0, -// such as the repl. Also, if the push() triggered a -// readable event, and the user called read(largeNumber) such that -// needReadable was set, then we ought to push more, so that another -// 'readable' event will be triggered. -function needMoreData(state) { - return !state.ended && (state.needReadable || state.length < state.highWaterMark || state.length === 0); -} - -Readable.prototype.isPaused = function () { - return this._readableState.flowing === false; -}; - -// backwards compatibility. -Readable.prototype.setEncoding = function (enc) { - if (!StringDecoder) StringDecoder = require('string_decoder/').StringDecoder; - this._readableState.decoder = new StringDecoder(enc); - this._readableState.encoding = enc; - return this; -}; - -// Don't raise the hwm > 8MB -var MAX_HWM = 0x800000; -function computeNewHighWaterMark(n) { - if (n >= MAX_HWM) { - n = MAX_HWM; - } else { - // Get the next highest power of 2 to prevent increasing hwm excessively in - // tiny amounts - n--; - n |= n >>> 1; - n |= n >>> 2; - n |= n >>> 4; - n |= n >>> 8; - n |= n >>> 16; - n++; - } - return n; -} - -// This function is designed to be inlinable, so please take care when making -// changes to the function body. -function howMuchToRead(n, state) { - if (n <= 0 || state.length === 0 && state.ended) return 0; - if (state.objectMode) return 1; - if (n !== n) { - // Only flow one buffer at a time - if (state.flowing && state.length) return state.buffer.head.data.length;else return state.length; - } - // If we're asking for more than the current hwm, then raise the hwm. - if (n > state.highWaterMark) state.highWaterMark = computeNewHighWaterMark(n); - if (n <= state.length) return n; - // Don't have enough - if (!state.ended) { - state.needReadable = true; - return 0; - } - return state.length; -} - -// you can override either this method, or the async _read(n) below. -Readable.prototype.read = function (n) { - debug('read', n); - n = parseInt(n, 10); - var state = this._readableState; - var nOrig = n; - - if (n !== 0) state.emittedReadable = false; - - // if we're doing read(0) to trigger a readable event, but we - // already have a bunch of data in the buffer, then just trigger - // the 'readable' event and move on. - if (n === 0 && state.needReadable && (state.length >= state.highWaterMark || state.ended)) { - debug('read: emitReadable', state.length, state.ended); - if (state.length === 0 && state.ended) endReadable(this);else emitReadable(this); - return null; - } - - n = howMuchToRead(n, state); - - // if we've ended, and we're now clear, then finish it up. - if (n === 0 && state.ended) { - if (state.length === 0) endReadable(this); - return null; - } - - // All the actual chunk generation logic needs to be - // *below* the call to _read. The reason is that in certain - // synthetic stream cases, such as passthrough streams, _read - // may be a completely synchronous operation which may change - // the state of the read buffer, providing enough data when - // before there was *not* enough. - // - // So, the steps are: - // 1. Figure out what the state of things will be after we do - // a read from the buffer. - // - // 2. If that resulting state will trigger a _read, then call _read. - // Note that this may be asynchronous, or synchronous. Yes, it is - // deeply ugly to write APIs this way, but that still doesn't mean - // that the Readable class should behave improperly, as streams are - // designed to be sync/async agnostic. - // Take note if the _read call is sync or async (ie, if the read call - // has returned yet), so that we know whether or not it's safe to emit - // 'readable' etc. - // - // 3. Actually pull the requested chunks out of the buffer and return. - - // if we need a readable event, then we need to do some reading. - var doRead = state.needReadable; - debug('need readable', doRead); - - // if we currently have less than the highWaterMark, then also read some - if (state.length === 0 || state.length - n < state.highWaterMark) { - doRead = true; - debug('length less than watermark', doRead); - } - - // however, if we've ended, then there's no point, and if we're already - // reading, then it's unnecessary. - if (state.ended || state.reading) { - doRead = false; - debug('reading or ended', doRead); - } else if (doRead) { - debug('do read'); - state.reading = true; - state.sync = true; - // if the length is currently zero, then we *need* a readable event. - if (state.length === 0) state.needReadable = true; - // call internal read method - this._read(state.highWaterMark); - state.sync = false; - // If _read pushed data synchronously, then `reading` will be false, - // and we need to re-evaluate how much data we can return to the user. - if (!state.reading) n = howMuchToRead(nOrig, state); - } - - var ret; - if (n > 0) ret = fromList(n, state);else ret = null; - - if (ret === null) { - state.needReadable = true; - n = 0; - } else { - state.length -= n; - } - - if (state.length === 0) { - // If we have nothing in the buffer, then we want to know - // as soon as we *do* get something into the buffer. - if (!state.ended) state.needReadable = true; - - // If we tried to read() past the EOF, then emit end on the next tick. - if (nOrig !== n && state.ended) endReadable(this); - } - - if (ret !== null) this.emit('data', ret); - - return ret; -}; - -function onEofChunk(stream, state) { - if (state.ended) return; - if (state.decoder) { - var chunk = state.decoder.end(); - if (chunk && chunk.length) { - state.buffer.push(chunk); - state.length += state.objectMode ? 1 : chunk.length; - } - } - state.ended = true; - - // emit 'readable' now to make sure it gets picked up. - emitReadable(stream); -} - -// Don't emit readable right away in sync mode, because this can trigger -// another read() call => stack overflow. This way, it might trigger -// a nextTick recursion warning, but that's not so bad. -function emitReadable(stream) { - var state = stream._readableState; - state.needReadable = false; - if (!state.emittedReadable) { - debug('emitReadable', state.flowing); - state.emittedReadable = true; - if (state.sync) pna.nextTick(emitReadable_, stream);else emitReadable_(stream); - } -} - -function emitReadable_(stream) { - debug('emit readable'); - stream.emit('readable'); - flow(stream); -} - -// at this point, the user has presumably seen the 'readable' event, -// and called read() to consume some data. that may have triggered -// in turn another _read(n) call, in which case reading = true if -// it's in progress. -// However, if we're not ended, or reading, and the length < hwm, -// then go ahead and try to read some more preemptively. -function maybeReadMore(stream, state) { - if (!state.readingMore) { - state.readingMore = true; - pna.nextTick(maybeReadMore_, stream, state); - } -} - -function maybeReadMore_(stream, state) { - var len = state.length; - while (!state.reading && !state.flowing && !state.ended && state.length < state.highWaterMark) { - debug('maybeReadMore read 0'); - stream.read(0); - if (len === state.length) - // didn't get any data, stop spinning. - break;else len = state.length; - } - state.readingMore = false; -} - -// abstract method. to be overridden in specific implementation classes. -// call cb(er, data) where data is <= n in length. -// for virtual (non-string, non-buffer) streams, "length" is somewhat -// arbitrary, and perhaps not very meaningful. -Readable.prototype._read = function (n) { - this.emit('error', new Error('_read() is not implemented')); -}; - -Readable.prototype.pipe = function (dest, pipeOpts) { - var src = this; - var state = this._readableState; - - switch (state.pipesCount) { - case 0: - state.pipes = dest; - break; - case 1: - state.pipes = [state.pipes, dest]; - break; - default: - state.pipes.push(dest); - break; - } - state.pipesCount += 1; - debug('pipe count=%d opts=%j', state.pipesCount, pipeOpts); - - var doEnd = (!pipeOpts || pipeOpts.end !== false) && dest !== process.stdout && dest !== process.stderr; - - var endFn = doEnd ? onend : unpipe; - if (state.endEmitted) pna.nextTick(endFn);else src.once('end', endFn); - - dest.on('unpipe', onunpipe); - function onunpipe(readable, unpipeInfo) { - debug('onunpipe'); - if (readable === src) { - if (unpipeInfo && unpipeInfo.hasUnpiped === false) { - unpipeInfo.hasUnpiped = true; - cleanup(); - } - } - } - - function onend() { - debug('onend'); - dest.end(); - } - - // when the dest drains, it reduces the awaitDrain counter - // on the source. This would be more elegant with a .once() - // handler in flow(), but adding and removing repeatedly is - // too slow. - var ondrain = pipeOnDrain(src); - dest.on('drain', ondrain); - - var cleanedUp = false; - function cleanup() { - debug('cleanup'); - // cleanup event handlers once the pipe is broken - dest.removeListener('close', onclose); - dest.removeListener('finish', onfinish); - dest.removeListener('drain', ondrain); - dest.removeListener('error', onerror); - dest.removeListener('unpipe', onunpipe); - src.removeListener('end', onend); - src.removeListener('end', unpipe); - src.removeListener('data', ondata); - - cleanedUp = true; - - // if the reader is waiting for a drain event from this - // specific writer, then it would cause it to never start - // flowing again. - // So, if this is awaiting a drain, then we just call it now. - // If we don't know, then assume that we are waiting for one. - if (state.awaitDrain && (!dest._writableState || dest._writableState.needDrain)) ondrain(); - } - - // If the user pushes more data while we're writing to dest then we'll end up - // in ondata again. However, we only want to increase awaitDrain once because - // dest will only emit one 'drain' event for the multiple writes. - // => Introduce a guard on increasing awaitDrain. - var increasedAwaitDrain = false; - src.on('data', ondata); - function ondata(chunk) { - debug('ondata'); - increasedAwaitDrain = false; - var ret = dest.write(chunk); - if (false === ret && !increasedAwaitDrain) { - // If the user unpiped during `dest.write()`, it is possible - // to get stuck in a permanently paused state if that write - // also returned false. - // => Check whether `dest` is still a piping destination. - if ((state.pipesCount === 1 && state.pipes === dest || state.pipesCount > 1 && indexOf(state.pipes, dest) !== -1) && !cleanedUp) { - debug('false write response, pause', src._readableState.awaitDrain); - src._readableState.awaitDrain++; - increasedAwaitDrain = true; - } - src.pause(); - } - } - - // if the dest has an error, then stop piping into it. - // however, don't suppress the throwing behavior for this. - function onerror(er) { - debug('onerror', er); - unpipe(); - dest.removeListener('error', onerror); - if (EElistenerCount(dest, 'error') === 0) dest.emit('error', er); - } - - // Make sure our error handler is attached before userland ones. - prependListener(dest, 'error', onerror); - - // Both close and finish should trigger unpipe, but only once. - function onclose() { - dest.removeListener('finish', onfinish); - unpipe(); - } - dest.once('close', onclose); - function onfinish() { - debug('onfinish'); - dest.removeListener('close', onclose); - unpipe(); - } - dest.once('finish', onfinish); - - function unpipe() { - debug('unpipe'); - src.unpipe(dest); - } - - // tell the dest that it's being piped to - dest.emit('pipe', src); - - // start the flow if it hasn't been started already. - if (!state.flowing) { - debug('pipe resume'); - src.resume(); - } - - return dest; -}; - -function pipeOnDrain(src) { - return function () { - var state = src._readableState; - debug('pipeOnDrain', state.awaitDrain); - if (state.awaitDrain) state.awaitDrain--; - if (state.awaitDrain === 0 && EElistenerCount(src, 'data')) { - state.flowing = true; - flow(src); - } - }; -} - -Readable.prototype.unpipe = function (dest) { - var state = this._readableState; - var unpipeInfo = { hasUnpiped: false }; - - // if we're not piping anywhere, then do nothing. - if (state.pipesCount === 0) return this; - - // just one destination. most common case. - if (state.pipesCount === 1) { - // passed in one, but it's not the right one. - if (dest && dest !== state.pipes) return this; - - if (!dest) dest = state.pipes; - - // got a match. - state.pipes = null; - state.pipesCount = 0; - state.flowing = false; - if (dest) dest.emit('unpipe', this, unpipeInfo); - return this; - } - - // slow case. multiple pipe destinations. - - if (!dest) { - // remove all. - var dests = state.pipes; - var len = state.pipesCount; - state.pipes = null; - state.pipesCount = 0; - state.flowing = false; - - for (var i = 0; i < len; i++) { - dests[i].emit('unpipe', this, unpipeInfo); - }return this; - } - - // try to find the right one. - var index = indexOf(state.pipes, dest); - if (index === -1) return this; - - state.pipes.splice(index, 1); - state.pipesCount -= 1; - if (state.pipesCount === 1) state.pipes = state.pipes[0]; - - dest.emit('unpipe', this, unpipeInfo); - - return this; -}; - -// set up data events if they are asked for -// Ensure readable listeners eventually get something -Readable.prototype.on = function (ev, fn) { - var res = Stream.prototype.on.call(this, ev, fn); - - if (ev === 'data') { - // Start flowing on next tick if stream isn't explicitly paused - if (this._readableState.flowing !== false) this.resume(); - } else if (ev === 'readable') { - var state = this._readableState; - if (!state.endEmitted && !state.readableListening) { - state.readableListening = state.needReadable = true; - state.emittedReadable = false; - if (!state.reading) { - pna.nextTick(nReadingNextTick, this); - } else if (state.length) { - emitReadable(this); - } - } - } - - return res; -}; -Readable.prototype.addListener = Readable.prototype.on; - -function nReadingNextTick(self) { - debug('readable nexttick read 0'); - self.read(0); -} - -// pause() and resume() are remnants of the legacy readable stream API -// If the user uses them, then switch into old mode. -Readable.prototype.resume = function () { - var state = this._readableState; - if (!state.flowing) { - debug('resume'); - state.flowing = true; - resume(this, state); - } - return this; -}; - -function resume(stream, state) { - if (!state.resumeScheduled) { - state.resumeScheduled = true; - pna.nextTick(resume_, stream, state); - } -} - -function resume_(stream, state) { - if (!state.reading) { - debug('resume read 0'); - stream.read(0); - } - - state.resumeScheduled = false; - state.awaitDrain = 0; - stream.emit('resume'); - flow(stream); - if (state.flowing && !state.reading) stream.read(0); -} - -Readable.prototype.pause = function () { - debug('call pause flowing=%j', this._readableState.flowing); - if (false !== this._readableState.flowing) { - debug('pause'); - this._readableState.flowing = false; - this.emit('pause'); - } - return this; -}; - -function flow(stream) { - var state = stream._readableState; - debug('flow', state.flowing); - while (state.flowing && stream.read() !== null) {} -} - -// wrap an old-style stream as the async data source. -// This is *not* part of the readable stream interface. -// It is an ugly unfortunate mess of history. -Readable.prototype.wrap = function (stream) { - var _this = this; - - var state = this._readableState; - var paused = false; - - stream.on('end', function () { - debug('wrapped end'); - if (state.decoder && !state.ended) { - var chunk = state.decoder.end(); - if (chunk && chunk.length) _this.push(chunk); - } - - _this.push(null); - }); - - stream.on('data', function (chunk) { - debug('wrapped data'); - if (state.decoder) chunk = state.decoder.write(chunk); - - // don't skip over falsy values in objectMode - if (state.objectMode && (chunk === null || chunk === undefined)) return;else if (!state.objectMode && (!chunk || !chunk.length)) return; - - var ret = _this.push(chunk); - if (!ret) { - paused = true; - stream.pause(); - } - }); - - // proxy all the other methods. - // important when wrapping filters and duplexes. - for (var i in stream) { - if (this[i] === undefined && typeof stream[i] === 'function') { - this[i] = function (method) { - return function () { - return stream[method].apply(stream, arguments); - }; - }(i); - } - } - - // proxy certain important events. - for (var n = 0; n < kProxyEvents.length; n++) { - stream.on(kProxyEvents[n], this.emit.bind(this, kProxyEvents[n])); - } - - // when we try to consume some more bytes, simply unpause the - // underlying stream. - this._read = function (n) { - debug('wrapped _read', n); - if (paused) { - paused = false; - stream.resume(); - } - }; - - return this; -}; - -Object.defineProperty(Readable.prototype, 'readableHighWaterMark', { - // making it explicit this property is not enumerable - // because otherwise some prototype manipulation in - // userland will fail - enumerable: false, - get: function () { - return this._readableState.highWaterMark; - } -}); - -// exposed for testing purposes only. -Readable._fromList = fromList; - -// Pluck off n bytes from an array of buffers. -// Length is the combined lengths of all the buffers in the list. -// This function is designed to be inlinable, so please take care when making -// changes to the function body. -function fromList(n, state) { - // nothing buffered - if (state.length === 0) return null; - - var ret; - if (state.objectMode) ret = state.buffer.shift();else if (!n || n >= state.length) { - // read it all, truncate the list - if (state.decoder) ret = state.buffer.join('');else if (state.buffer.length === 1) ret = state.buffer.head.data;else ret = state.buffer.concat(state.length); - state.buffer.clear(); - } else { - // read part of list - ret = fromListPartial(n, state.buffer, state.decoder); - } - - return ret; -} - -// Extracts only enough buffered data to satisfy the amount requested. -// This function is designed to be inlinable, so please take care when making -// changes to the function body. -function fromListPartial(n, list, hasStrings) { - var ret; - if (n < list.head.data.length) { - // slice is the same for buffers and strings - ret = list.head.data.slice(0, n); - list.head.data = list.head.data.slice(n); - } else if (n === list.head.data.length) { - // first chunk is a perfect match - ret = list.shift(); - } else { - // result spans more than one buffer - ret = hasStrings ? copyFromBufferString(n, list) : copyFromBuffer(n, list); - } - return ret; -} - -// Copies a specified amount of characters from the list of buffered data -// chunks. -// This function is designed to be inlinable, so please take care when making -// changes to the function body. -function copyFromBufferString(n, list) { - var p = list.head; - var c = 1; - var ret = p.data; - n -= ret.length; - while (p = p.next) { - var str = p.data; - var nb = n > str.length ? str.length : n; - if (nb === str.length) ret += str;else ret += str.slice(0, n); - n -= nb; - if (n === 0) { - if (nb === str.length) { - ++c; - if (p.next) list.head = p.next;else list.head = list.tail = null; - } else { - list.head = p; - p.data = str.slice(nb); - } - break; - } - ++c; - } - list.length -= c; - return ret; -} - -// Copies a specified amount of bytes from the list of buffered data chunks. -// This function is designed to be inlinable, so please take care when making -// changes to the function body. -function copyFromBuffer(n, list) { - var ret = Buffer.allocUnsafe(n); - var p = list.head; - var c = 1; - p.data.copy(ret); - n -= p.data.length; - while (p = p.next) { - var buf = p.data; - var nb = n > buf.length ? buf.length : n; - buf.copy(ret, ret.length - n, 0, nb); - n -= nb; - if (n === 0) { - if (nb === buf.length) { - ++c; - if (p.next) list.head = p.next;else list.head = list.tail = null; - } else { - list.head = p; - p.data = buf.slice(nb); - } - break; - } - ++c; - } - list.length -= c; - return ret; -} - -function endReadable(stream) { - var state = stream._readableState; - - // If we get here before consuming all the bytes, then that is a - // bug in node. Should never happen. - if (state.length > 0) throw new Error('"endReadable()" called on non-empty stream'); - - if (!state.endEmitted) { - state.ended = true; - pna.nextTick(endReadableNT, state, stream); - } -} - -function endReadableNT(state, stream) { - // Check that we didn't get one last unshift. - if (!state.endEmitted && state.length === 0) { - state.endEmitted = true; - stream.readable = false; - stream.emit('end'); - } -} - -function indexOf(xs, x) { - for (var i = 0, l = xs.length; i < l; i++) { - if (xs[i] === x) return i; - } - return -1; -} \ No newline at end of file diff --git a/node_modules/readable-stream/lib/_stream_transform.js b/node_modules/readable-stream/lib/_stream_transform.js deleted file mode 100644 index 5d1f8b876..000000000 --- a/node_modules/readable-stream/lib/_stream_transform.js +++ /dev/null @@ -1,214 +0,0 @@ -// Copyright Joyent, Inc. and other Node contributors. -// -// Permission is hereby granted, free of charge, to any person obtaining a -// copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to permit -// persons to whom the Software is furnished to do so, subject to the -// following conditions: -// -// The above copyright notice and this permission notice shall be included -// in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN -// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE -// USE OR OTHER DEALINGS IN THE SOFTWARE. - -// a transform stream is a readable/writable stream where you do -// something with the data. Sometimes it's called a "filter", -// but that's not a great name for it, since that implies a thing where -// some bits pass through, and others are simply ignored. (That would -// be a valid example of a transform, of course.) -// -// While the output is causally related to the input, it's not a -// necessarily symmetric or synchronous transformation. For example, -// a zlib stream might take multiple plain-text writes(), and then -// emit a single compressed chunk some time in the future. -// -// Here's how this works: -// -// The Transform stream has all the aspects of the readable and writable -// stream classes. When you write(chunk), that calls _write(chunk,cb) -// internally, and returns false if there's a lot of pending writes -// buffered up. When you call read(), that calls _read(n) until -// there's enough pending readable data buffered up. -// -// In a transform stream, the written data is placed in a buffer. When -// _read(n) is called, it transforms the queued up data, calling the -// buffered _write cb's as it consumes chunks. If consuming a single -// written chunk would result in multiple output chunks, then the first -// outputted bit calls the readcb, and subsequent chunks just go into -// the read buffer, and will cause it to emit 'readable' if necessary. -// -// This way, back-pressure is actually determined by the reading side, -// since _read has to be called to start processing a new chunk. However, -// a pathological inflate type of transform can cause excessive buffering -// here. For example, imagine a stream where every byte of input is -// interpreted as an integer from 0-255, and then results in that many -// bytes of output. Writing the 4 bytes {ff,ff,ff,ff} would result in -// 1kb of data being output. In this case, you could write a very small -// amount of input, and end up with a very large amount of output. In -// such a pathological inflating mechanism, there'd be no way to tell -// the system to stop doing the transform. A single 4MB write could -// cause the system to run out of memory. -// -// However, even in such a pathological case, only a single written chunk -// would be consumed, and then the rest would wait (un-transformed) until -// the results of the previous transformed chunk were consumed. - -'use strict'; - -module.exports = Transform; - -var Duplex = require('./_stream_duplex'); - -/**/ -var util = require('core-util-is'); -util.inherits = require('inherits'); -/**/ - -util.inherits(Transform, Duplex); - -function afterTransform(er, data) { - var ts = this._transformState; - ts.transforming = false; - - var cb = ts.writecb; - - if (!cb) { - return this.emit('error', new Error('write callback called multiple times')); - } - - ts.writechunk = null; - ts.writecb = null; - - if (data != null) // single equals check for both `null` and `undefined` - this.push(data); - - cb(er); - - var rs = this._readableState; - rs.reading = false; - if (rs.needReadable || rs.length < rs.highWaterMark) { - this._read(rs.highWaterMark); - } -} - -function Transform(options) { - if (!(this instanceof Transform)) return new Transform(options); - - Duplex.call(this, options); - - this._transformState = { - afterTransform: afterTransform.bind(this), - needTransform: false, - transforming: false, - writecb: null, - writechunk: null, - writeencoding: null - }; - - // start out asking for a readable event once data is transformed. - this._readableState.needReadable = true; - - // we have implemented the _read method, and done the other things - // that Readable wants before the first _read call, so unset the - // sync guard flag. - this._readableState.sync = false; - - if (options) { - if (typeof options.transform === 'function') this._transform = options.transform; - - if (typeof options.flush === 'function') this._flush = options.flush; - } - - // When the writable side finishes, then flush out anything remaining. - this.on('prefinish', prefinish); -} - -function prefinish() { - var _this = this; - - if (typeof this._flush === 'function') { - this._flush(function (er, data) { - done(_this, er, data); - }); - } else { - done(this, null, null); - } -} - -Transform.prototype.push = function (chunk, encoding) { - this._transformState.needTransform = false; - return Duplex.prototype.push.call(this, chunk, encoding); -}; - -// This is the part where you do stuff! -// override this function in implementation classes. -// 'chunk' is an input chunk. -// -// Call `push(newChunk)` to pass along transformed output -// to the readable side. You may call 'push' zero or more times. -// -// Call `cb(err)` when you are done with this chunk. If you pass -// an error, then that'll put the hurt on the whole operation. If you -// never call cb(), then you'll never get another chunk. -Transform.prototype._transform = function (chunk, encoding, cb) { - throw new Error('_transform() is not implemented'); -}; - -Transform.prototype._write = function (chunk, encoding, cb) { - var ts = this._transformState; - ts.writecb = cb; - ts.writechunk = chunk; - ts.writeencoding = encoding; - if (!ts.transforming) { - var rs = this._readableState; - if (ts.needTransform || rs.needReadable || rs.length < rs.highWaterMark) this._read(rs.highWaterMark); - } -}; - -// Doesn't matter what the args are here. -// _transform does all the work. -// That we got here means that the readable side wants more data. -Transform.prototype._read = function (n) { - var ts = this._transformState; - - if (ts.writechunk !== null && ts.writecb && !ts.transforming) { - ts.transforming = true; - this._transform(ts.writechunk, ts.writeencoding, ts.afterTransform); - } else { - // mark that we need a transform, so that any data that comes in - // will get processed, now that we've asked for it. - ts.needTransform = true; - } -}; - -Transform.prototype._destroy = function (err, cb) { - var _this2 = this; - - Duplex.prototype._destroy.call(this, err, function (err2) { - cb(err2); - _this2.emit('close'); - }); -}; - -function done(stream, er, data) { - if (er) return stream.emit('error', er); - - if (data != null) // single equals check for both `null` and `undefined` - stream.push(data); - - // if there's nothing in the write buffer, then that means - // that nothing more will ever be provided - if (stream._writableState.length) throw new Error('Calling transform done when ws.length != 0'); - - if (stream._transformState.transforming) throw new Error('Calling transform done when still transforming'); - - return stream.push(null); -} \ No newline at end of file diff --git a/node_modules/readable-stream/lib/_stream_writable.js b/node_modules/readable-stream/lib/_stream_writable.js deleted file mode 100644 index b3f4e85a2..000000000 --- a/node_modules/readable-stream/lib/_stream_writable.js +++ /dev/null @@ -1,687 +0,0 @@ -// Copyright Joyent, Inc. and other Node contributors. -// -// Permission is hereby granted, free of charge, to any person obtaining a -// copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to permit -// persons to whom the Software is furnished to do so, subject to the -// following conditions: -// -// The above copyright notice and this permission notice shall be included -// in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN -// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE -// USE OR OTHER DEALINGS IN THE SOFTWARE. - -// A bit simpler than readable streams. -// Implement an async ._write(chunk, encoding, cb), and it'll handle all -// the drain event emission and buffering. - -'use strict'; - -/**/ - -var pna = require('process-nextick-args'); -/**/ - -module.exports = Writable; - -/* */ -function WriteReq(chunk, encoding, cb) { - this.chunk = chunk; - this.encoding = encoding; - this.callback = cb; - this.next = null; -} - -// It seems a linked list but it is not -// there will be only 2 of these for each stream -function CorkedRequest(state) { - var _this = this; - - this.next = null; - this.entry = null; - this.finish = function () { - onCorkedFinish(_this, state); - }; -} -/* */ - -/**/ -var asyncWrite = !process.browser && ['v0.10', 'v0.9.'].indexOf(process.version.slice(0, 5)) > -1 ? setImmediate : pna.nextTick; -/**/ - -/**/ -var Duplex; -/**/ - -Writable.WritableState = WritableState; - -/**/ -var util = require('core-util-is'); -util.inherits = require('inherits'); -/**/ - -/**/ -var internalUtil = { - deprecate: require('util-deprecate') -}; -/**/ - -/**/ -var Stream = require('./internal/streams/stream'); -/**/ - -/**/ - -var Buffer = require('safe-buffer').Buffer; -var OurUint8Array = global.Uint8Array || function () {}; -function _uint8ArrayToBuffer(chunk) { - return Buffer.from(chunk); -} -function _isUint8Array(obj) { - return Buffer.isBuffer(obj) || obj instanceof OurUint8Array; -} - -/**/ - -var destroyImpl = require('./internal/streams/destroy'); - -util.inherits(Writable, Stream); - -function nop() {} - -function WritableState(options, stream) { - Duplex = Duplex || require('./_stream_duplex'); - - options = options || {}; - - // Duplex streams are both readable and writable, but share - // the same options object. - // However, some cases require setting options to different - // values for the readable and the writable sides of the duplex stream. - // These options can be provided separately as readableXXX and writableXXX. - var isDuplex = stream instanceof Duplex; - - // object stream flag to indicate whether or not this stream - // contains buffers or objects. - this.objectMode = !!options.objectMode; - - if (isDuplex) this.objectMode = this.objectMode || !!options.writableObjectMode; - - // the point at which write() starts returning false - // Note: 0 is a valid value, means that we always return false if - // the entire buffer is not flushed immediately on write() - var hwm = options.highWaterMark; - var writableHwm = options.writableHighWaterMark; - var defaultHwm = this.objectMode ? 16 : 16 * 1024; - - if (hwm || hwm === 0) this.highWaterMark = hwm;else if (isDuplex && (writableHwm || writableHwm === 0)) this.highWaterMark = writableHwm;else this.highWaterMark = defaultHwm; - - // cast to ints. - this.highWaterMark = Math.floor(this.highWaterMark); - - // if _final has been called - this.finalCalled = false; - - // drain event flag. - this.needDrain = false; - // at the start of calling end() - this.ending = false; - // when end() has been called, and returned - this.ended = false; - // when 'finish' is emitted - this.finished = false; - - // has it been destroyed - this.destroyed = false; - - // should we decode strings into buffers before passing to _write? - // this is here so that some node-core streams can optimize string - // handling at a lower level. - var noDecode = options.decodeStrings === false; - this.decodeStrings = !noDecode; - - // Crypto is kind of old and crusty. Historically, its default string - // encoding is 'binary' so we have to make this configurable. - // Everything else in the universe uses 'utf8', though. - this.defaultEncoding = options.defaultEncoding || 'utf8'; - - // not an actual buffer we keep track of, but a measurement - // of how much we're waiting to get pushed to some underlying - // socket or file. - this.length = 0; - - // a flag to see when we're in the middle of a write. - this.writing = false; - - // when true all writes will be buffered until .uncork() call - this.corked = 0; - - // a flag to be able to tell if the onwrite cb is called immediately, - // or on a later tick. We set this to true at first, because any - // actions that shouldn't happen until "later" should generally also - // not happen before the first write call. - this.sync = true; - - // a flag to know if we're processing previously buffered items, which - // may call the _write() callback in the same tick, so that we don't - // end up in an overlapped onwrite situation. - this.bufferProcessing = false; - - // the callback that's passed to _write(chunk,cb) - this.onwrite = function (er) { - onwrite(stream, er); - }; - - // the callback that the user supplies to write(chunk,encoding,cb) - this.writecb = null; - - // the amount that is being written when _write is called. - this.writelen = 0; - - this.bufferedRequest = null; - this.lastBufferedRequest = null; - - // number of pending user-supplied write callbacks - // this must be 0 before 'finish' can be emitted - this.pendingcb = 0; - - // emit prefinish if the only thing we're waiting for is _write cbs - // This is relevant for synchronous Transform streams - this.prefinished = false; - - // True if the error was already emitted and should not be thrown again - this.errorEmitted = false; - - // count buffered requests - this.bufferedRequestCount = 0; - - // allocate the first CorkedRequest, there is always - // one allocated and free to use, and we maintain at most two - this.corkedRequestsFree = new CorkedRequest(this); -} - -WritableState.prototype.getBuffer = function getBuffer() { - var current = this.bufferedRequest; - var out = []; - while (current) { - out.push(current); - current = current.next; - } - return out; -}; - -(function () { - try { - Object.defineProperty(WritableState.prototype, 'buffer', { - get: internalUtil.deprecate(function () { - return this.getBuffer(); - }, '_writableState.buffer is deprecated. Use _writableState.getBuffer ' + 'instead.', 'DEP0003') - }); - } catch (_) {} -})(); - -// Test _writableState for inheritance to account for Duplex streams, -// whose prototype chain only points to Readable. -var realHasInstance; -if (typeof Symbol === 'function' && Symbol.hasInstance && typeof Function.prototype[Symbol.hasInstance] === 'function') { - realHasInstance = Function.prototype[Symbol.hasInstance]; - Object.defineProperty(Writable, Symbol.hasInstance, { - value: function (object) { - if (realHasInstance.call(this, object)) return true; - if (this !== Writable) return false; - - return object && object._writableState instanceof WritableState; - } - }); -} else { - realHasInstance = function (object) { - return object instanceof this; - }; -} - -function Writable(options) { - Duplex = Duplex || require('./_stream_duplex'); - - // Writable ctor is applied to Duplexes, too. - // `realHasInstance` is necessary because using plain `instanceof` - // would return false, as no `_writableState` property is attached. - - // Trying to use the custom `instanceof` for Writable here will also break the - // Node.js LazyTransform implementation, which has a non-trivial getter for - // `_writableState` that would lead to infinite recursion. - if (!realHasInstance.call(Writable, this) && !(this instanceof Duplex)) { - return new Writable(options); - } - - this._writableState = new WritableState(options, this); - - // legacy. - this.writable = true; - - if (options) { - if (typeof options.write === 'function') this._write = options.write; - - if (typeof options.writev === 'function') this._writev = options.writev; - - if (typeof options.destroy === 'function') this._destroy = options.destroy; - - if (typeof options.final === 'function') this._final = options.final; - } - - Stream.call(this); -} - -// Otherwise people can pipe Writable streams, which is just wrong. -Writable.prototype.pipe = function () { - this.emit('error', new Error('Cannot pipe, not readable')); -}; - -function writeAfterEnd(stream, cb) { - var er = new Error('write after end'); - // TODO: defer error events consistently everywhere, not just the cb - stream.emit('error', er); - pna.nextTick(cb, er); -} - -// Checks that a user-supplied chunk is valid, especially for the particular -// mode the stream is in. Currently this means that `null` is never accepted -// and undefined/non-string values are only allowed in object mode. -function validChunk(stream, state, chunk, cb) { - var valid = true; - var er = false; - - if (chunk === null) { - er = new TypeError('May not write null values to stream'); - } else if (typeof chunk !== 'string' && chunk !== undefined && !state.objectMode) { - er = new TypeError('Invalid non-string/buffer chunk'); - } - if (er) { - stream.emit('error', er); - pna.nextTick(cb, er); - valid = false; - } - return valid; -} - -Writable.prototype.write = function (chunk, encoding, cb) { - var state = this._writableState; - var ret = false; - var isBuf = !state.objectMode && _isUint8Array(chunk); - - if (isBuf && !Buffer.isBuffer(chunk)) { - chunk = _uint8ArrayToBuffer(chunk); - } - - if (typeof encoding === 'function') { - cb = encoding; - encoding = null; - } - - if (isBuf) encoding = 'buffer';else if (!encoding) encoding = state.defaultEncoding; - - if (typeof cb !== 'function') cb = nop; - - if (state.ended) writeAfterEnd(this, cb);else if (isBuf || validChunk(this, state, chunk, cb)) { - state.pendingcb++; - ret = writeOrBuffer(this, state, isBuf, chunk, encoding, cb); - } - - return ret; -}; - -Writable.prototype.cork = function () { - var state = this._writableState; - - state.corked++; -}; - -Writable.prototype.uncork = function () { - var state = this._writableState; - - if (state.corked) { - state.corked--; - - if (!state.writing && !state.corked && !state.finished && !state.bufferProcessing && state.bufferedRequest) clearBuffer(this, state); - } -}; - -Writable.prototype.setDefaultEncoding = function setDefaultEncoding(encoding) { - // node::ParseEncoding() requires lower case. - if (typeof encoding === 'string') encoding = encoding.toLowerCase(); - if (!(['hex', 'utf8', 'utf-8', 'ascii', 'binary', 'base64', 'ucs2', 'ucs-2', 'utf16le', 'utf-16le', 'raw'].indexOf((encoding + '').toLowerCase()) > -1)) throw new TypeError('Unknown encoding: ' + encoding); - this._writableState.defaultEncoding = encoding; - return this; -}; - -function decodeChunk(state, chunk, encoding) { - if (!state.objectMode && state.decodeStrings !== false && typeof chunk === 'string') { - chunk = Buffer.from(chunk, encoding); - } - return chunk; -} - -Object.defineProperty(Writable.prototype, 'writableHighWaterMark', { - // making it explicit this property is not enumerable - // because otherwise some prototype manipulation in - // userland will fail - enumerable: false, - get: function () { - return this._writableState.highWaterMark; - } -}); - -// if we're already writing something, then just put this -// in the queue, and wait our turn. Otherwise, call _write -// If we return false, then we need a drain event, so set that flag. -function writeOrBuffer(stream, state, isBuf, chunk, encoding, cb) { - if (!isBuf) { - var newChunk = decodeChunk(state, chunk, encoding); - if (chunk !== newChunk) { - isBuf = true; - encoding = 'buffer'; - chunk = newChunk; - } - } - var len = state.objectMode ? 1 : chunk.length; - - state.length += len; - - var ret = state.length < state.highWaterMark; - // we must ensure that previous needDrain will not be reset to false. - if (!ret) state.needDrain = true; - - if (state.writing || state.corked) { - var last = state.lastBufferedRequest; - state.lastBufferedRequest = { - chunk: chunk, - encoding: encoding, - isBuf: isBuf, - callback: cb, - next: null - }; - if (last) { - last.next = state.lastBufferedRequest; - } else { - state.bufferedRequest = state.lastBufferedRequest; - } - state.bufferedRequestCount += 1; - } else { - doWrite(stream, state, false, len, chunk, encoding, cb); - } - - return ret; -} - -function doWrite(stream, state, writev, len, chunk, encoding, cb) { - state.writelen = len; - state.writecb = cb; - state.writing = true; - state.sync = true; - if (writev) stream._writev(chunk, state.onwrite);else stream._write(chunk, encoding, state.onwrite); - state.sync = false; -} - -function onwriteError(stream, state, sync, er, cb) { - --state.pendingcb; - - if (sync) { - // defer the callback if we are being called synchronously - // to avoid piling up things on the stack - pna.nextTick(cb, er); - // this can emit finish, and it will always happen - // after error - pna.nextTick(finishMaybe, stream, state); - stream._writableState.errorEmitted = true; - stream.emit('error', er); - } else { - // the caller expect this to happen before if - // it is async - cb(er); - stream._writableState.errorEmitted = true; - stream.emit('error', er); - // this can emit finish, but finish must - // always follow error - finishMaybe(stream, state); - } -} - -function onwriteStateUpdate(state) { - state.writing = false; - state.writecb = null; - state.length -= state.writelen; - state.writelen = 0; -} - -function onwrite(stream, er) { - var state = stream._writableState; - var sync = state.sync; - var cb = state.writecb; - - onwriteStateUpdate(state); - - if (er) onwriteError(stream, state, sync, er, cb);else { - // Check if we're actually ready to finish, but don't emit yet - var finished = needFinish(state); - - if (!finished && !state.corked && !state.bufferProcessing && state.bufferedRequest) { - clearBuffer(stream, state); - } - - if (sync) { - /**/ - asyncWrite(afterWrite, stream, state, finished, cb); - /**/ - } else { - afterWrite(stream, state, finished, cb); - } - } -} - -function afterWrite(stream, state, finished, cb) { - if (!finished) onwriteDrain(stream, state); - state.pendingcb--; - cb(); - finishMaybe(stream, state); -} - -// Must force callback to be called on nextTick, so that we don't -// emit 'drain' before the write() consumer gets the 'false' return -// value, and has a chance to attach a 'drain' listener. -function onwriteDrain(stream, state) { - if (state.length === 0 && state.needDrain) { - state.needDrain = false; - stream.emit('drain'); - } -} - -// if there's something in the buffer waiting, then process it -function clearBuffer(stream, state) { - state.bufferProcessing = true; - var entry = state.bufferedRequest; - - if (stream._writev && entry && entry.next) { - // Fast case, write everything using _writev() - var l = state.bufferedRequestCount; - var buffer = new Array(l); - var holder = state.corkedRequestsFree; - holder.entry = entry; - - var count = 0; - var allBuffers = true; - while (entry) { - buffer[count] = entry; - if (!entry.isBuf) allBuffers = false; - entry = entry.next; - count += 1; - } - buffer.allBuffers = allBuffers; - - doWrite(stream, state, true, state.length, buffer, '', holder.finish); - - // doWrite is almost always async, defer these to save a bit of time - // as the hot path ends with doWrite - state.pendingcb++; - state.lastBufferedRequest = null; - if (holder.next) { - state.corkedRequestsFree = holder.next; - holder.next = null; - } else { - state.corkedRequestsFree = new CorkedRequest(state); - } - state.bufferedRequestCount = 0; - } else { - // Slow case, write chunks one-by-one - while (entry) { - var chunk = entry.chunk; - var encoding = entry.encoding; - var cb = entry.callback; - var len = state.objectMode ? 1 : chunk.length; - - doWrite(stream, state, false, len, chunk, encoding, cb); - entry = entry.next; - state.bufferedRequestCount--; - // if we didn't call the onwrite immediately, then - // it means that we need to wait until it does. - // also, that means that the chunk and cb are currently - // being processed, so move the buffer counter past them. - if (state.writing) { - break; - } - } - - if (entry === null) state.lastBufferedRequest = null; - } - - state.bufferedRequest = entry; - state.bufferProcessing = false; -} - -Writable.prototype._write = function (chunk, encoding, cb) { - cb(new Error('_write() is not implemented')); -}; - -Writable.prototype._writev = null; - -Writable.prototype.end = function (chunk, encoding, cb) { - var state = this._writableState; - - if (typeof chunk === 'function') { - cb = chunk; - chunk = null; - encoding = null; - } else if (typeof encoding === 'function') { - cb = encoding; - encoding = null; - } - - if (chunk !== null && chunk !== undefined) this.write(chunk, encoding); - - // .end() fully uncorks - if (state.corked) { - state.corked = 1; - this.uncork(); - } - - // ignore unnecessary end() calls. - if (!state.ending && !state.finished) endWritable(this, state, cb); -}; - -function needFinish(state) { - return state.ending && state.length === 0 && state.bufferedRequest === null && !state.finished && !state.writing; -} -function callFinal(stream, state) { - stream._final(function (err) { - state.pendingcb--; - if (err) { - stream.emit('error', err); - } - state.prefinished = true; - stream.emit('prefinish'); - finishMaybe(stream, state); - }); -} -function prefinish(stream, state) { - if (!state.prefinished && !state.finalCalled) { - if (typeof stream._final === 'function') { - state.pendingcb++; - state.finalCalled = true; - pna.nextTick(callFinal, stream, state); - } else { - state.prefinished = true; - stream.emit('prefinish'); - } - } -} - -function finishMaybe(stream, state) { - var need = needFinish(state); - if (need) { - prefinish(stream, state); - if (state.pendingcb === 0) { - state.finished = true; - stream.emit('finish'); - } - } - return need; -} - -function endWritable(stream, state, cb) { - state.ending = true; - finishMaybe(stream, state); - if (cb) { - if (state.finished) pna.nextTick(cb);else stream.once('finish', cb); - } - state.ended = true; - stream.writable = false; -} - -function onCorkedFinish(corkReq, state, err) { - var entry = corkReq.entry; - corkReq.entry = null; - while (entry) { - var cb = entry.callback; - state.pendingcb--; - cb(err); - entry = entry.next; - } - if (state.corkedRequestsFree) { - state.corkedRequestsFree.next = corkReq; - } else { - state.corkedRequestsFree = corkReq; - } -} - -Object.defineProperty(Writable.prototype, 'destroyed', { - get: function () { - if (this._writableState === undefined) { - return false; - } - return this._writableState.destroyed; - }, - set: function (value) { - // we ignore the value if the stream - // has not been initialized yet - if (!this._writableState) { - return; - } - - // backward compatibility, the user is explicitly - // managing destroyed - this._writableState.destroyed = value; - } -}); - -Writable.prototype.destroy = destroyImpl.destroy; -Writable.prototype._undestroy = destroyImpl.undestroy; -Writable.prototype._destroy = function (err, cb) { - this.end(); - cb(err); -}; \ No newline at end of file diff --git a/node_modules/readable-stream/lib/internal/streams/BufferList.js b/node_modules/readable-stream/lib/internal/streams/BufferList.js deleted file mode 100644 index aefc68bd9..000000000 --- a/node_modules/readable-stream/lib/internal/streams/BufferList.js +++ /dev/null @@ -1,79 +0,0 @@ -'use strict'; - -function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } - -var Buffer = require('safe-buffer').Buffer; -var util = require('util'); - -function copyBuffer(src, target, offset) { - src.copy(target, offset); -} - -module.exports = function () { - function BufferList() { - _classCallCheck(this, BufferList); - - this.head = null; - this.tail = null; - this.length = 0; - } - - BufferList.prototype.push = function push(v) { - var entry = { data: v, next: null }; - if (this.length > 0) this.tail.next = entry;else this.head = entry; - this.tail = entry; - ++this.length; - }; - - BufferList.prototype.unshift = function unshift(v) { - var entry = { data: v, next: this.head }; - if (this.length === 0) this.tail = entry; - this.head = entry; - ++this.length; - }; - - BufferList.prototype.shift = function shift() { - if (this.length === 0) return; - var ret = this.head.data; - if (this.length === 1) this.head = this.tail = null;else this.head = this.head.next; - --this.length; - return ret; - }; - - BufferList.prototype.clear = function clear() { - this.head = this.tail = null; - this.length = 0; - }; - - BufferList.prototype.join = function join(s) { - if (this.length === 0) return ''; - var p = this.head; - var ret = '' + p.data; - while (p = p.next) { - ret += s + p.data; - }return ret; - }; - - BufferList.prototype.concat = function concat(n) { - if (this.length === 0) return Buffer.alloc(0); - if (this.length === 1) return this.head.data; - var ret = Buffer.allocUnsafe(n >>> 0); - var p = this.head; - var i = 0; - while (p) { - copyBuffer(p.data, ret, i); - i += p.data.length; - p = p.next; - } - return ret; - }; - - return BufferList; -}(); - -if (util && util.inspect && util.inspect.custom) { - module.exports.prototype[util.inspect.custom] = function () { - var obj = util.inspect({ length: this.length }); - return this.constructor.name + ' ' + obj; - }; -} \ No newline at end of file diff --git a/node_modules/readable-stream/lib/internal/streams/destroy.js b/node_modules/readable-stream/lib/internal/streams/destroy.js deleted file mode 100644 index 5a0a0d88c..000000000 --- a/node_modules/readable-stream/lib/internal/streams/destroy.js +++ /dev/null @@ -1,74 +0,0 @@ -'use strict'; - -/**/ - -var pna = require('process-nextick-args'); -/**/ - -// undocumented cb() API, needed for core, not for public API -function destroy(err, cb) { - var _this = this; - - var readableDestroyed = this._readableState && this._readableState.destroyed; - var writableDestroyed = this._writableState && this._writableState.destroyed; - - if (readableDestroyed || writableDestroyed) { - if (cb) { - cb(err); - } else if (err && (!this._writableState || !this._writableState.errorEmitted)) { - pna.nextTick(emitErrorNT, this, err); - } - return this; - } - - // we set destroyed to true before firing error callbacks in order - // to make it re-entrance safe in case destroy() is called within callbacks - - if (this._readableState) { - this._readableState.destroyed = true; - } - - // if this is a duplex stream mark the writable part as destroyed as well - if (this._writableState) { - this._writableState.destroyed = true; - } - - this._destroy(err || null, function (err) { - if (!cb && err) { - pna.nextTick(emitErrorNT, _this, err); - if (_this._writableState) { - _this._writableState.errorEmitted = true; - } - } else if (cb) { - cb(err); - } - }); - - return this; -} - -function undestroy() { - if (this._readableState) { - this._readableState.destroyed = false; - this._readableState.reading = false; - this._readableState.ended = false; - this._readableState.endEmitted = false; - } - - if (this._writableState) { - this._writableState.destroyed = false; - this._writableState.ended = false; - this._writableState.ending = false; - this._writableState.finished = false; - this._writableState.errorEmitted = false; - } -} - -function emitErrorNT(self, err) { - self.emit('error', err); -} - -module.exports = { - destroy: destroy, - undestroy: undestroy -}; \ No newline at end of file diff --git a/node_modules/readable-stream/lib/internal/streams/stream-browser.js b/node_modules/readable-stream/lib/internal/streams/stream-browser.js deleted file mode 100644 index 9332a3fda..000000000 --- a/node_modules/readable-stream/lib/internal/streams/stream-browser.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('events').EventEmitter; diff --git a/node_modules/readable-stream/lib/internal/streams/stream.js b/node_modules/readable-stream/lib/internal/streams/stream.js deleted file mode 100644 index ce2ad5b6e..000000000 --- a/node_modules/readable-stream/lib/internal/streams/stream.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('stream'); diff --git a/node_modules/readable-stream/package.json b/node_modules/readable-stream/package.json deleted file mode 100644 index 4f2a57679..000000000 --- a/node_modules/readable-stream/package.json +++ /dev/null @@ -1,85 +0,0 @@ -{ - "_args": [ - [ - "readable-stream@2.3.6", - "/Users/drew.heavner/Documents/Github/sign-android-release" - ] - ], - "_development": true, - "_from": "readable-stream@2.3.6", - "_id": "readable-stream@2.3.6", - "_inBundle": false, - "_integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==", - "_location": "/readable-stream", - "_phantomChildren": {}, - "_requested": { - "type": "version", - "registry": true, - "raw": "readable-stream@2.3.6", - "name": "readable-stream", - "escapedName": "readable-stream", - "rawSpec": "2.3.6", - "saveSpec": null, - "fetchSpec": "2.3.6" - }, - "_requiredBy": [ - "/merge-stream" - ], - "_resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz", - "_spec": "2.3.6", - "_where": "/Users/drew.heavner/Documents/Github/sign-android-release", - "browser": { - "util": false, - "./readable.js": "./readable-browser.js", - "./writable.js": "./writable-browser.js", - "./duplex.js": "./duplex-browser.js", - "./lib/internal/streams/stream.js": "./lib/internal/streams/stream-browser.js" - }, - "bugs": { - "url": "https://github.com/nodejs/readable-stream/issues" - }, - "dependencies": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.3", - "isarray": "~1.0.0", - "process-nextick-args": "~2.0.0", - "safe-buffer": "~5.1.1", - "string_decoder": "~1.1.1", - "util-deprecate": "~1.0.1" - }, - "description": "Streams3, a user-land copy of the stream library from Node.js", - "devDependencies": { - "assert": "^1.4.0", - "babel-polyfill": "^6.9.1", - "buffer": "^4.9.0", - "lolex": "^2.3.2", - "nyc": "^6.4.0", - "tap": "^0.7.0", - "tape": "^4.8.0" - }, - "homepage": "https://github.com/nodejs/readable-stream#readme", - "keywords": [ - "readable", - "stream", - "pipe" - ], - "license": "MIT", - "main": "readable.js", - "name": "readable-stream", - "nyc": { - "include": [ - "lib/**.js" - ] - }, - "repository": { - "type": "git", - "url": "git://github.com/nodejs/readable-stream.git" - }, - "scripts": { - "ci": "tap test/parallel/*.js test/ours/*.js --tap | tee test.tap && node test/verify-dependencies.js", - "cover": "nyc npm test", - "report": "nyc report --reporter=lcov", - "test": "tap test/parallel/*.js test/ours/*.js && node test/verify-dependencies.js" - }, - "version": "2.3.6" -} diff --git a/node_modules/readable-stream/passthrough.js b/node_modules/readable-stream/passthrough.js deleted file mode 100644 index ffd791d7f..000000000 --- a/node_modules/readable-stream/passthrough.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('./readable').PassThrough diff --git a/node_modules/readable-stream/readable-browser.js b/node_modules/readable-stream/readable-browser.js deleted file mode 100644 index e50372592..000000000 --- a/node_modules/readable-stream/readable-browser.js +++ /dev/null @@ -1,7 +0,0 @@ -exports = module.exports = require('./lib/_stream_readable.js'); -exports.Stream = exports; -exports.Readable = exports; -exports.Writable = require('./lib/_stream_writable.js'); -exports.Duplex = require('./lib/_stream_duplex.js'); -exports.Transform = require('./lib/_stream_transform.js'); -exports.PassThrough = require('./lib/_stream_passthrough.js'); diff --git a/node_modules/readable-stream/readable.js b/node_modules/readable-stream/readable.js deleted file mode 100644 index ec89ec533..000000000 --- a/node_modules/readable-stream/readable.js +++ /dev/null @@ -1,19 +0,0 @@ -var Stream = require('stream'); -if (process.env.READABLE_STREAM === 'disable' && Stream) { - module.exports = Stream; - exports = module.exports = Stream.Readable; - exports.Readable = Stream.Readable; - exports.Writable = Stream.Writable; - exports.Duplex = Stream.Duplex; - exports.Transform = Stream.Transform; - exports.PassThrough = Stream.PassThrough; - exports.Stream = Stream; -} else { - exports = module.exports = require('./lib/_stream_readable.js'); - exports.Stream = Stream || exports; - exports.Readable = exports; - exports.Writable = require('./lib/_stream_writable.js'); - exports.Duplex = require('./lib/_stream_duplex.js'); - exports.Transform = require('./lib/_stream_transform.js'); - exports.PassThrough = require('./lib/_stream_passthrough.js'); -} diff --git a/node_modules/readable-stream/transform.js b/node_modules/readable-stream/transform.js deleted file mode 100644 index b1baba26d..000000000 --- a/node_modules/readable-stream/transform.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('./readable').Transform diff --git a/node_modules/readable-stream/writable-browser.js b/node_modules/readable-stream/writable-browser.js deleted file mode 100644 index ebdde6a85..000000000 --- a/node_modules/readable-stream/writable-browser.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('./lib/_stream_writable.js'); diff --git a/node_modules/readable-stream/writable.js b/node_modules/readable-stream/writable.js deleted file mode 100644 index 3211a6f80..000000000 --- a/node_modules/readable-stream/writable.js +++ /dev/null @@ -1,8 +0,0 @@ -var Stream = require("stream") -var Writable = require("./lib/_stream_writable.js") - -if (process.env.READABLE_STREAM === 'disable') { - module.exports = Stream && Stream.Writable || Writable -} else { - module.exports = Writable -} diff --git a/node_modules/request-promise-core/LICENSE b/node_modules/request-promise-core/LICENSE index 8ecaee3df..abd09b35a 100644 --- a/node_modules/request-promise-core/LICENSE +++ b/node_modules/request-promise-core/LICENSE @@ -1,6 +1,6 @@ ISC License -Copyright (c) 2016, Nicolai Kamenzky and contributors +Copyright (c) 2020, Nicolai Kamenzky and contributors Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above diff --git a/node_modules/request-promise-core/README.md b/node_modules/request-promise-core/README.md index ac23715ed..1b3e61f7b 100644 --- a/node_modules/request-promise-core/README.md +++ b/node_modules/request-promise-core/README.md @@ -105,6 +105,11 @@ If you want to debug a test you should use `gulp test-without-coverage` to run a ## Change History +- 1.1.4 (2020-07-21) + - Security fix: bumped `lodash` to `^4.17.19` following [this advisory](https://www.npmjs.com/advisories/1523). +- 1.1.3 (2019-11-03) + - Security fix: bumped `lodash` to `^4.17.15`. See [vulnerabilty reports](https://snyk.io/vuln/search?q=lodash&type=npm). + *(Thanks to @daniel-nagy for pull request [#20](https://github.com/request/promise-core/pull/20) and thanks to @quetzaluz for reporting this in issue [#21](https://github.com/request/promise-core/issues/21).)* - 1.1.2 (2019-02-14) - Security fix: bumped `lodash` to `^4.17.11`. See [vulnerabilty reports](https://snyk.io/vuln/search?q=lodash&type=npm). *(Thanks to @lucaswillering and @sam-warren-finnair for reporting this in issues [#12](https://github.com/request/promise-core/issues/12) and [#13](https://github.com/request/promise-core/issues/13) and thanks to @Alec321 for pull request [#14](https://github.com/request/promise-core/pull/14).)* diff --git a/node_modules/request-promise-core/package.json b/node_modules/request-promise-core/package.json index 8ec43e31c..1d1c22e78 100644 --- a/node_modules/request-promise-core/package.json +++ b/node_modules/request-promise-core/package.json @@ -1,33 +1,27 @@ { - "_args": [ - [ - "request-promise-core@1.1.2", - "/Users/drew.heavner/Documents/Github/sign-android-release" - ] - ], - "_development": true, - "_from": "request-promise-core@1.1.2", - "_id": "request-promise-core@1.1.2", + "_from": "request-promise-core@1.1.4", + "_id": "request-promise-core@1.1.4", "_inBundle": false, - "_integrity": "sha512-UHYyq1MO8GsefGEt7EprS8UrXsm1TxEvFUX1IMTuSLU2Rh7fTIdFtl8xD7JiEYiWU2dl+NYAjCTksTehQUxPag==", + "_integrity": "sha512-TTbAfBBRdWD7aNNOoVOBH4pN/KigV6LyapYNNlAPA8JwbovRti1E88m3sYAwsLi5ryhPKsE9APwnjFTgdUjTpw==", "_location": "/request-promise-core", "_phantomChildren": {}, "_requested": { "type": "version", "registry": true, - "raw": "request-promise-core@1.1.2", + "raw": "request-promise-core@1.1.4", "name": "request-promise-core", "escapedName": "request-promise-core", - "rawSpec": "1.1.2", + "rawSpec": "1.1.4", "saveSpec": null, - "fetchSpec": "1.1.2" + "fetchSpec": "1.1.4" }, "_requiredBy": [ "/request-promise-native" ], - "_resolved": "https://registry.npmjs.org/request-promise-core/-/request-promise-core-1.1.2.tgz", - "_spec": "1.1.2", - "_where": "/Users/drew.heavner/Documents/Github/sign-android-release", + "_resolved": "https://registry.npmjs.org/request-promise-core/-/request-promise-core-1.1.4.tgz", + "_shasum": "3eedd4223208d419867b78ce815167d10593a22f", + "_spec": "request-promise-core@1.1.4", + "_where": "/Users/drew.heavner/Documents/Github/sign-android-release/node_modules/request-promise-native", "author": { "name": "Nicolai Kamenzky", "url": "https://github.com/analog-nico" @@ -35,9 +29,11 @@ "bugs": { "url": "https://github.com/request/promise-core/issues" }, + "bundleDependencies": false, "dependencies": { - "lodash": "^4.17.11" + "lodash": "^4.17.19" }, + "deprecated": false, "description": "Core Promise support implementation for the simplified HTTP request client 'request'.", "devDependencies": { "@request/api": "^0.6.0", @@ -52,7 +48,7 @@ "gulp-istanbul": "~1.0.0", "gulp-mocha": "~2.2.0", "node-version": "~1.0.0", - "publish-please": "~5.4.3", + "publish-please": "~2.4.1", "request": "^2.34.0", "rimraf": "~2.5.3", "run-sequence": "~1.2.2", @@ -88,5 +84,5 @@ "test": "gulp ci", "test-publish": "gulp ci-no-cov" }, - "version": "1.1.2" + "version": "1.1.4" } diff --git a/node_modules/request-promise-native/.npmignore b/node_modules/request-promise-native/.npmignore deleted file mode 100644 index b0ba43966..000000000 --- a/node_modules/request-promise-native/.npmignore +++ /dev/null @@ -1,13 +0,0 @@ -/.idea/ -/coverage/ -/test/ - -/.editorconfig -/.eslintrc.json -/.gitignore -/.publishrc -/.travis.yml -/gulpfile.js - -.DS_Store -npm-debug.log \ No newline at end of file diff --git a/node_modules/request-promise-native/LICENSE b/node_modules/request-promise-native/LICENSE index d9e1a9d26..abd09b35a 100644 --- a/node_modules/request-promise-native/LICENSE +++ b/node_modules/request-promise-native/LICENSE @@ -1,6 +1,6 @@ ISC License -Copyright (c) 2017, Nicolai Kamenzky and contributors +Copyright (c) 2020, Nicolai Kamenzky and contributors Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above diff --git a/node_modules/request-promise-native/README.md b/node_modules/request-promise-native/README.md index e8033432c..5a9b17560 100644 --- a/node_modules/request-promise-native/README.md +++ b/node_modules/request-promise-native/README.md @@ -10,11 +10,19 @@ [![Dependency Status](https://img.shields.io/david/request/request-promise-native.svg?style=flat-square&maxAge=2592000)](https://david-dm.org/request/request-promise-native) [![Known Vulnerabilities](https://snyk.io/test/npm/request-promise-native/badge.svg?style=flat-square&maxAge=2592000)](https://snyk.io/test/npm/request-promise-native) -This package is similar to [`request-promise`](https://www.npmjs.com/package/request-promise) but uses native ES6 promises. +# Deprecated! + +As of Feb 11th 2020, [`request`](https://github.com/request/request) is fully deprecated. No new changes are expected to land. In fact, none have landed for some time. This package is also deprecated because it depends on `request`. + +Fyi, here is the [reasoning of `request`'s deprecation](https://github.com/request/request/issues/3142) and a [list of alternative libraries](https://github.com/request/request/issues/3143). + +--- + +This package is similar to [`request-promise`](https://www.npmjs.com/package/request-promise) but uses native ES6+ promises. Please refer to the [`request-promise` documentation](https://www.npmjs.com/package/request-promise). Everything applies to `request-promise-native` except the following: -- Instead of using Bluebird promises this library uses native ES6 promises. -- Mind that native ES6 promises have fewer features than Bluebird promises do. In particular, the `.finally(...)` method is not available. +- Instead of using Bluebird promises this library uses native ES6+ promises. +- Native ES6+ promises may have fewer features than Bluebird promises do. In particular, the `.finally(...)` method was not included until Node v10. ## Installation @@ -49,6 +57,11 @@ If you want to debug a test you should use `gulp test-without-coverage` to run a ## Change History +- v1.0.9 (2020-07-21) + - Security fix: bumped `request-promise-core` which bumps `lodash` to `^4.17.19` following [this advisory](https://www.npmjs.com/advisories/1523). +- v1.0.8 (2019-11-03) + - Security fix: bumped `request-promise-core` which bumps `lodash` to `^4.17.15`. See [vulnerabilty reports](https://snyk.io/vuln/search?q=lodash&type=npm). + *(Thanks to @aw-davidson for reporting this in issue [#49](https://github.com/request/request-promise-native/issues/49).)* - v1.0.7 (2019-02-14) - Corrected mistakenly set `tough-cookie` version, now `^2.3.3` *(Thanks to @evocateur for pointing this out.)* diff --git a/node_modules/request-promise-native/package.json b/node_modules/request-promise-native/package.json index 2016c5c64..5a194b829 100644 --- a/node_modules/request-promise-native/package.json +++ b/node_modules/request-promise-native/package.json @@ -1,33 +1,27 @@ { - "_args": [ - [ - "request-promise-native@1.0.7", - "/Users/drew.heavner/Documents/Github/sign-android-release" - ] - ], - "_development": true, - "_from": "request-promise-native@1.0.7", - "_id": "request-promise-native@1.0.7", + "_from": "request-promise-native@^1.0.5", + "_id": "request-promise-native@1.0.9", "_inBundle": false, - "_integrity": "sha512-rIMnbBdgNViL37nZ1b3L/VfPOpSi0TqVDQPAvO6U14lMzOLrt5nilxCQqtDKhZeDiW0/hkCXGoQjhgJd/tCh6w==", + "_integrity": "sha512-wcW+sIUiWnKgNY0dqCpOZkUbF/I+YPi+f09JZIDa39Ec+q82CpSYniDp+ISgTTbKmnpJWASeJBPZmoxH84wt3g==", "_location": "/request-promise-native", "_phantomChildren": {}, "_requested": { - "type": "version", + "type": "range", "registry": true, - "raw": "request-promise-native@1.0.7", + "raw": "request-promise-native@^1.0.5", "name": "request-promise-native", "escapedName": "request-promise-native", - "rawSpec": "1.0.7", + "rawSpec": "^1.0.5", "saveSpec": null, - "fetchSpec": "1.0.7" + "fetchSpec": "^1.0.5" }, "_requiredBy": [ "/jsdom" ], - "_resolved": "https://registry.npmjs.org/request-promise-native/-/request-promise-native-1.0.7.tgz", - "_spec": "1.0.7", - "_where": "/Users/drew.heavner/Documents/Github/sign-android-release", + "_resolved": "https://registry.npmjs.org/request-promise-native/-/request-promise-native-1.0.9.tgz", + "_shasum": "e407120526a5efdc9a39b28a5679bf47b9d9dc28", + "_spec": "request-promise-native@^1.0.5", + "_where": "/Users/drew.heavner/Documents/Github/sign-android-release/node_modules/jsdom", "author": { "name": "Nicolai Kamenzky", "url": "https://github.com/analog-nico" @@ -35,11 +29,13 @@ "bugs": { "url": "https://github.com/request/request-promise-native/issues" }, + "bundleDependencies": false, "dependencies": { - "request-promise-core": "1.1.2", + "request-promise-core": "1.1.4", "stealthy-require": "^1.1.1", "tough-cookie": "^2.3.3" }, + "deprecated": "request-promise-native has been deprecated because it extends the now deprecated request package, see https://github.com/request/request/issues/3142", "description": "The simplified HTTP request client 'request' with Promise support. Powered by native ES6 promises.", "devDependencies": { "body-parser": "~1.15.2", @@ -86,5 +82,5 @@ "test": "gulp ci", "test-publish": "gulp ci-no-cov" }, - "version": "1.0.7" + "version": "1.0.9" } diff --git a/node_modules/request/CHANGELOG.md b/node_modules/request/CHANGELOG.md index 751514d28..d3ffcd00d 100644 --- a/node_modules/request/CHANGELOG.md +++ b/node_modules/request/CHANGELOG.md @@ -1,5 +1,13 @@ ## Change Log +### v2.88.0 (2018/08/10) +- [#2996](https://github.com/request/request/pull/2996) fix(uuid): import versioned uuid (@kwonoj) +- [#2994](https://github.com/request/request/pull/2994) Update to oauth-sign 0.9.0 (@dlecocq) +- [#2993](https://github.com/request/request/pull/2993) Fix header tests (@simov) +- [#2904](https://github.com/request/request/pull/2904) #515, #2894 Strip port suffix from Host header if the protocol is known. (#2904) (@paambaati) +- [#2791](https://github.com/request/request/pull/2791) Improve AWS SigV4 support. (#2791) (@vikhyat) +- [#2977](https://github.com/request/request/pull/2977) Update test certificates (@simov) + ### v2.87.0 (2018/05/21) - [#2943](https://github.com/request/request/pull/2943) Replace hawk dependency with a local implemenation (#2943) (@hueniverse) diff --git a/node_modules/request/README.md b/node_modules/request/README.md index b91623d2e..9da0eb7d8 100644 --- a/node_modules/request/README.md +++ b/node_modules/request/README.md @@ -1,3 +1,9 @@ +# Deprecated! + +As of Feb 11th 2020, request is fully deprecated. No new changes are expected land. In fact, none have landed for some time. + +For more information about why request is deprecated and possible alternatives refer to +[this issue](https://github.com/request/request/issues/3142). # Request - Simplified HTTP client @@ -16,9 +22,9 @@ Request is designed to be the simplest way possible to make http calls. It supports HTTPS and follows redirects by default. ```js -var request = require('request'); +const request = require('request'); request('http://www.google.com', function (error, response, body) { - console.log('error:', error); // Print the error if one occurred + console.error('error:', error); // Print the error if one occurred console.log('statusCode:', response && response.statusCode); // Print the response status code if a response was received console.log('body:', body); // Print the HTML for the Google homepage. }); @@ -86,7 +92,7 @@ To easily handle errors when streaming requests, listen to the `error` event bef request .get('http://mysite.com/doodle.png') .on('error', function(err) { - console.log(err) + console.error(err) }) .pipe(fs.createWriteStream('doodle.png')) ``` @@ -110,7 +116,7 @@ You can also `pipe()` from `http.ServerRequest` instances, as well as to `http.S ```js http.createServer(function (req, resp) { if (req.url === '/doodle.png') { - var x = request('http://mysite.com/doodle.png') + const x = request('http://mysite.com/doodle.png') req.pipe(x) x.pipe(resp) } @@ -126,7 +132,7 @@ req.pipe(request('http://mysite.com/doodle.png')).pipe(resp) Also, none of this new functionality conflicts with requests previous features, it just expands them. ```js -var r = request.defaults({'proxy':'http://localproxy.com'}) +const r = request.defaults({'proxy':'http://localproxy.com'}) http.createServer(function (req, resp) { if (req.url === '/doodle.png') { @@ -152,6 +158,8 @@ Several alternative interfaces are provided by the request team, including: - [`request-promise-native`](https://github.com/request/request-promise-native) (uses native Promises) - [`request-promise-any`](https://github.com/request/request-promise-any) (uses [any-promise](https://www.npmjs.com/package/any-promise) Promises) +Also, [`util.promisify`](https://nodejs.org/api/util.html#util_util_promisify_original), which is available from Node.js v8.0 can be used to convert a regular function that takes a callback to return a promise instead. + [back to top](#table-of-contents) @@ -183,7 +191,7 @@ For `multipart/form-data` we use the [form-data](https://github.com/form-data/fo ```js -var formData = { +const formData = { // Pass a simple key-value pair my_field: 'my_value', // Pass data via Buffers @@ -218,8 +226,8 @@ For advanced cases, you can access the form-data object itself via `r.form()`. T ```js // NOTE: Advanced use-case, for normal use see 'formData' usage above -var r = request.post('http://service.com/upload', function optionalCallback(err, httpResponse, body) {...}) -var form = r.form(); +const r = request.post('http://service.com/upload', function optionalCallback(err, httpResponse, body) {...}) +const form = r.form(); form.append('my_field', 'my_value'); form.append('my_buffer', Buffer.from([1, 2, 3])); form.append('custom_file', fs.createReadStream(__dirname + '/unicycle.jpg'), {filename: 'unicycle.jpg'}); @@ -314,11 +322,11 @@ detailed in [RFC 1738](http://www.ietf.org/rfc/rfc1738.txt). Simply pass the `user:password` before the host with an `@` sign: ```js -var username = 'username', +const username = 'username', password = 'password', url = 'http://' + username + ':' + password + '@some.server.com'; -request({url: url}, function (error, response, body) { +request({url}, function (error, response, body) { // Do more stuff with 'body' here }); ``` @@ -347,9 +355,9 @@ of stars and forks for the request repository. This requires a custom `User-Agent` header as well as https. ```js -var request = require('request'); +const request = require('request'); -var options = { +const options = { url: 'https://api.github.com/repos/request/request', headers: { 'User-Agent': 'request' @@ -358,7 +366,7 @@ var options = { function callback(error, response, body) { if (!error && response.statusCode == 200) { - var info = JSON.parse(body); + const info = JSON.parse(body); console.log(info.stargazers_count + " Stars"); console.log(info.forks_count + " Forks"); } @@ -382,7 +390,7 @@ default signing algorithm is ```js // OAuth1.0 - 3-legged server side flow (Twitter example) // step 1 -var qs = require('querystring') +const qs = require('querystring') , oauth = { callback: 'http://mysite.com/callback/' , consumer_key: CONSUMER_KEY @@ -397,14 +405,14 @@ request.post({url:url, oauth:oauth}, function (e, r, body) { // verified with twitter that they are authorizing your app. // step 2 - var req_data = qs.parse(body) - var uri = 'https://api.twitter.com/oauth/authenticate' + const req_data = qs.parse(body) + const uri = 'https://api.twitter.com/oauth/authenticate' + '?' + qs.stringify({oauth_token: req_data.oauth_token}) // redirect the user to the authorize uri // step 3 // after the user is redirected back to your server - var auth_data = qs.parse(body) + const auth_data = qs.parse(body) , oauth = { consumer_key: CONSUMER_KEY , consumer_secret: CONSUMER_SECRET @@ -416,7 +424,7 @@ request.post({url:url, oauth:oauth}, function (e, r, body) { ; request.post({url:url, oauth:oauth}, function (e, r, body) { // ready to make signed requests on behalf of the user - var perm_data = qs.parse(body) + const perm_data = qs.parse(body) , oauth = { consumer_key: CONSUMER_KEY , consumer_secret: CONSUMER_SECRET @@ -605,14 +613,14 @@ TLS/SSL Protocol options, such as `cert`, `key` and `passphrase`, can be set directly in `options` object, in the `agentOptions` property of the `options` object, or even in `https.globalAgent.options`. Keep in mind that, although `agentOptions` allows for a slightly wider range of configurations, the recommended way is via `options` object directly, as using `agentOptions` or `https.globalAgent.options` would not be applied in the same way in proxied environments (as data travels through a TLS connection instead of an http/https agent). ```js -var fs = require('fs') +const fs = require('fs') , path = require('path') , certFile = path.resolve(__dirname, 'ssl/client.crt') , keyFile = path.resolve(__dirname, 'ssl/client.key') , caFile = path.resolve(__dirname, 'ssl/ca.cert.pem') , request = require('request'); -var options = { +const options = { url: 'https://api.some-server.com/', cert: fs.readFileSync(certFile), key: fs.readFileSync(keyFile), @@ -629,13 +637,13 @@ In the example below, we call an API that requires client side SSL certificate (in PEM format) with passphrase protected private key (in PEM format) and disable the SSLv3 protocol: ```js -var fs = require('fs') +const fs = require('fs') , path = require('path') , certFile = path.resolve(__dirname, 'ssl/client.crt') , keyFile = path.resolve(__dirname, 'ssl/client.key') , request = require('request'); -var options = { +const options = { url: 'https://api.some-server.com/', agentOptions: { cert: fs.readFileSync(certFile), @@ -675,6 +683,25 @@ request.get({ }); ``` +The `ca` value can be an array of certificates, in the event you have a private or internal corporate public-key infrastructure hierarchy. For example, if you want to connect to https://api.some-server.com which presents a key chain consisting of: +1. its own public key, which is signed by: +2. an intermediate "Corp Issuing Server", that is in turn signed by: +3. a root CA "Corp Root CA"; + +you can configure your request as follows: + +```js +request.get({ + url: 'https://api.some-server.com/', + agentOptions: { + ca: [ + fs.readFileSync('Corp Issuing Server.pem'), + fs.readFileSync('Corp Root CA.pem') + ] + } +}); +``` + [back to top](#table-of-contents) @@ -687,7 +714,7 @@ The `options.har` property will override the values: `url`, `method`, `qs`, `hea A validation step will check if the HAR Request format matches the latest spec (v1.2) and will skip parsing if not matching. ```js - var request = require('request') + const request = require('request') request({ // will be ignored method: 'GET', @@ -802,11 +829,9 @@ The first argument can be either a `url` or an `options` object. The only requir work around this, either use [`request.defaults`](#requestdefaultsoptions) with your pool options or create the pool object with the `maxSockets` property outside of the loop. -- `timeout` - integer containing the number of milliseconds to wait for a -server to send response headers (and start the response body) before aborting -the request. Note that if the underlying TCP connection cannot be established, -the OS-wide TCP connection timeout will overrule the `timeout` option ([the -default in Linux can be anywhere from 20-120 seconds][linux-timeout]). +- `timeout` - integer containing number of milliseconds, controls two timeouts. + - **Read timeout**: Time to wait for a server to send response headers (and start the response body) before aborting the request. + - **Connection timeout**: Sets the socket to timeout after `timeout` milliseconds of inactivity. Note that increasing the timeout beyond the OS-wide TCP connection timeout will not have any effect ([the default in Linux can be anywhere from 20-120 seconds][linux-timeout]) [linux-timeout]: http://www.sekuda.com/overriding_the_default_linux_kernel_20_second_tcp_socket_connect_timeout @@ -847,7 +872,7 @@ default in Linux can be anywhere from 20-120 seconds][linux-timeout]). - `download`: Duration of HTTP download (`timings.end` - `timings.response`) - `total`: Duration entire HTTP round-trip (`timings.end`) -- `har` - a [HAR 1.2 Request Object](http://www.softwareishard.com/blog/har-12-spec/#request), will be processed from HAR format into options overwriting matching values *(see the [HAR 1.2 section](#support-for-har-1.2) for details)* +- `har` - a [HAR 1.2 Request Object](http://www.softwareishard.com/blog/har-12-spec/#request), will be processed from HAR format into options overwriting matching values *(see the [HAR 1.2 section](#support-for-har-12) for details)* - `callback` - alternatively pass the request's callback in the options object The callback argument gets 3 arguments: @@ -880,13 +905,13 @@ instead, it **returns a wrapper** that has your default settings applied to it. For example: ```js //requests using baseRequest() will set the 'x-token' header -var baseRequest = request.defaults({ +const baseRequest = request.defaults({ headers: {'x-token': 'my-token'} }) //requests using specialRequest() will include the 'x-token' header set in //baseRequest and will also include the 'special' header -var specialRequest = baseRequest.defaults({ +const specialRequest = baseRequest.defaults({ headers: {special: 'special value'} }) ``` @@ -918,6 +943,17 @@ Function that creates a new cookie jar. request.jar() ``` +### response.caseless.get('header-name') + +Function that returns the specified response header field using a [case-insensitive match](https://tools.ietf.org/html/rfc7230#section-3.2) + +```js +request('http://www.google.com', function (error, response, body) { + // print the Content-Type header even if the server returned it as 'content-type' (lowercase) + console.log('Content-Type is:', response.caseless.get('Content-Type')); +}); +``` + [back to top](#table-of-contents) @@ -975,7 +1011,7 @@ request.get('http://10.255.255.1', {timeout: 1500}, function(err) { ## Examples: ```js - var request = require('request') + const request = require('request') , rand = Math.floor(Math.random()*100000000).toString() ; request( @@ -1006,7 +1042,7 @@ while the response object is unmodified and will contain compressed data if the server sent a compressed response. ```js - var request = require('request') + const request = require('request') request( { method: 'GET' , uri: 'http://www.google.com' @@ -1034,7 +1070,7 @@ the server sent a compressed response. Cookies are disabled by default (else, they would be used in subsequent requests). To enable cookies, set `jar` to `true` (either in `defaults` or `options`). ```js -var request = request.defaults({jar: true}) +const request = request.defaults({jar: true}) request('http://www.google.com', function () { request('http://images.google.com') }) @@ -1043,8 +1079,8 @@ request('http://www.google.com', function () { To use a custom cookie jar (instead of `request`’s global cookie jar), set `jar` to an instance of `request.jar()` (either in `defaults` or `options`) ```js -var j = request.jar() -var request = request.defaults({jar:j}) +const j = request.jar() +const request = request.defaults({jar:j}) request('http://www.google.com', function () { request('http://images.google.com') }) @@ -1053,9 +1089,9 @@ request('http://www.google.com', function () { OR ```js -var j = request.jar(); -var cookie = request.cookie('key1=value1'); -var url = 'http://www.google.com'; +const j = request.jar(); +const cookie = request.cookie('key1=value1'); +const url = 'http://www.google.com'; j.setCookie(cookie, url); request({url: url, jar: j}, function () { request('http://images.google.com') @@ -1068,9 +1104,9 @@ which supports saving to and restoring from JSON files), pass it as a parameter to `request.jar()`: ```js -var FileCookieStore = require('tough-cookie-filestore'); +const FileCookieStore = require('tough-cookie-filestore'); // NOTE - currently the 'cookies.json' file must already exist! -var j = request.jar(new FileCookieStore('cookies.json')); +const j = request.jar(new FileCookieStore('cookies.json')); request = request.defaults({ jar : j }) request('http://www.google.com', function() { request('http://images.google.com') @@ -1080,16 +1116,16 @@ request('http://www.google.com', function() { The cookie store must be a [`tough-cookie`](https://github.com/SalesforceEng/tough-cookie) store and it must support synchronous operations; see the -[`CookieStore` API docs](https://github.com/SalesforceEng/tough-cookie#cookiestore-api) +[`CookieStore` API docs](https://github.com/SalesforceEng/tough-cookie#api) for details. To inspect your cookie jar after a request: ```js -var j = request.jar() +const j = request.jar() request({url: 'http://www.google.com', jar: j}, function () { - var cookie_string = j.getCookieString(url); // "key1=value1; key2=value2; ..." - var cookies = j.getCookies(url); + const cookie_string = j.getCookieString(url); // "key1=value1; key2=value2; ..." + const cookies = j.getCookies(url); // [{key: 'key1', value: 'value1', domain: "www.google.com", ...}, ...] }) ``` diff --git a/node_modules/request/index.js b/node_modules/request/index.js index f9b480a1d..d50f9917b 100755 --- a/node_modules/request/index.js +++ b/node_modules/request/index.js @@ -27,7 +27,7 @@ function initParams (uri, options, callback) { } var params = {} - if (typeof options === 'object') { + if (options !== null && typeof options === 'object') { extend(params, options, {uri: uri}) } else if (typeof uri === 'string') { extend(params, {uri: uri}) diff --git a/node_modules/request/lib/auth.js b/node_modules/request/lib/auth.js index f5edf32c3..02f203869 100644 --- a/node_modules/request/lib/auth.js +++ b/node_modules/request/lib/auth.js @@ -62,7 +62,7 @@ Auth.prototype.digest = function (method, path, authHeader) { var challenge = {} var re = /([a-z0-9_-]+)=(?:"([^"]+)"|([a-z0-9_-]+))/gi - for (;;) { + while (true) { var match = re.exec(authHeader) if (!match) { break diff --git a/node_modules/request/lib/getProxyFromURI.js b/node_modules/request/lib/getProxyFromURI.js index 4633ba5f6..0b9b18e5a 100644 --- a/node_modules/request/lib/getProxyFromURI.js +++ b/node_modules/request/lib/getProxyFromURI.js @@ -40,7 +40,7 @@ function uriInNoProxy (uri, noProxy) { function getProxyFromURI (uri) { // Decide the proper request proxy to use based on the request URI object and the // environmental variables (NO_PROXY, HTTP_PROXY, etc.) - // respect NO_PROXY environment variables (see: http://lynx.isc.org/current/breakout/lynx_help/keystrokes/environments.html) + // respect NO_PROXY environment variables (see: https://lynx.invisible-island.net/lynx2.8.7/breakout/lynx_help/keystrokes/environments.html) var noProxy = process.env.NO_PROXY || process.env.no_proxy || '' diff --git a/node_modules/request/lib/har.js b/node_modules/request/lib/har.js index 2f660309d..0dedee444 100644 --- a/node_modules/request/lib/har.js +++ b/node_modules/request/lib/har.js @@ -172,7 +172,7 @@ Har.prototype.options = function (options) { req.postData.params.forEach(function (param) { var attachment = {} - if (!param.fileName && !param.fileName && !param.contentType) { + if (!param.fileName && !param.contentType) { options.formData[param.name] = param.value return } diff --git a/node_modules/request/node_modules/punycode/LICENSE-MIT.txt b/node_modules/request/node_modules/punycode/LICENSE-MIT.txt deleted file mode 100644 index a41e0a7ef..000000000 --- a/node_modules/request/node_modules/punycode/LICENSE-MIT.txt +++ /dev/null @@ -1,20 +0,0 @@ -Copyright Mathias Bynens - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/request/node_modules/punycode/README.md b/node_modules/request/node_modules/punycode/README.md deleted file mode 100644 index 7ad7d1faa..000000000 --- a/node_modules/request/node_modules/punycode/README.md +++ /dev/null @@ -1,176 +0,0 @@ -# Punycode.js [![Build status](https://travis-ci.org/bestiejs/punycode.js.svg?branch=master)](https://travis-ci.org/bestiejs/punycode.js) [![Code coverage status](http://img.shields.io/coveralls/bestiejs/punycode.js/master.svg)](https://coveralls.io/r/bestiejs/punycode.js) [![Dependency status](https://gemnasium.com/bestiejs/punycode.js.svg)](https://gemnasium.com/bestiejs/punycode.js) - -A robust Punycode converter that fully complies to [RFC 3492](https://tools.ietf.org/html/rfc3492) and [RFC 5891](https://tools.ietf.org/html/rfc5891), and works on nearly all JavaScript platforms. - -This JavaScript library is the result of comparing, optimizing and documenting different open-source implementations of the Punycode algorithm: - -* [The C example code from RFC 3492](https://tools.ietf.org/html/rfc3492#appendix-C) -* [`punycode.c` by _Markus W. Scherer_ (IBM)](http://opensource.apple.com/source/ICU/ICU-400.42/icuSources/common/punycode.c) -* [`punycode.c` by _Ben Noordhuis_](https://github.com/bnoordhuis/punycode/blob/master/punycode.c) -* [JavaScript implementation by _some_](http://stackoverflow.com/questions/183485/can-anyone-recommend-a-good-free-javascript-for-punycode-to-unicode-conversion/301287#301287) -* [`punycode.js` by _Ben Noordhuis_](https://github.com/joyent/node/blob/426298c8c1c0d5b5224ac3658c41e7c2a3fe9377/lib/punycode.js) (note: [not fully compliant](https://github.com/joyent/node/issues/2072)) - -This project is [bundled](https://github.com/joyent/node/blob/master/lib/punycode.js) with [Node.js v0.6.2+](https://github.com/joyent/node/compare/975f1930b1...61e796decc) and [io.js v1.0.0+](https://github.com/iojs/io.js/blob/v1.x/lib/punycode.js). - -## Installation - -Via [npm](https://www.npmjs.com/) (only required for Node.js releases older than v0.6.2): - -```bash -npm install punycode -``` - -Via [Bower](http://bower.io/): - -```bash -bower install punycode -``` - -Via [Component](https://github.com/component/component): - -```bash -component install bestiejs/punycode.js -``` - -In a browser: - -```html - -``` - -In [Node.js](https://nodejs.org/), [io.js](https://iojs.org/), [Narwhal](http://narwhaljs.org/), and [RingoJS](http://ringojs.org/): - -```js -var punycode = require('punycode'); -``` - -In [Rhino](http://www.mozilla.org/rhino/): - -```js -load('punycode.js'); -``` - -Using an AMD loader like [RequireJS](http://requirejs.org/): - -```js -require( - { - 'paths': { - 'punycode': 'path/to/punycode' - } - }, - ['punycode'], - function(punycode) { - console.log(punycode); - } -); -``` - -## API - -### `punycode.decode(string)` - -Converts a Punycode string of ASCII symbols to a string of Unicode symbols. - -```js -// decode domain name parts -punycode.decode('maana-pta'); // 'mañana' -punycode.decode('--dqo34k'); // '☃-⌘' -``` - -### `punycode.encode(string)` - -Converts a string of Unicode symbols to a Punycode string of ASCII symbols. - -```js -// encode domain name parts -punycode.encode('mañana'); // 'maana-pta' -punycode.encode('☃-⌘'); // '--dqo34k' -``` - -### `punycode.toUnicode(input)` - -Converts a Punycode string representing a domain name or an email address to Unicode. Only the Punycoded parts of the input will be converted, i.e. it doesn’t matter if you call it on a string that has already been converted to Unicode. - -```js -// decode domain names -punycode.toUnicode('xn--maana-pta.com'); -// → 'mañana.com' -punycode.toUnicode('xn----dqo34k.com'); -// → '☃-⌘.com' - -// decode email addresses -punycode.toUnicode('джумла@xn--p-8sbkgc5ag7bhce.xn--ba-lmcq'); -// → 'джумла@джpумлатест.bрфa' -``` - -### `punycode.toASCII(input)` - -Converts a lowercased Unicode string representing a domain name or an email address to Punycode. Only the non-ASCII parts of the input will be converted, i.e. it doesn’t matter if you call it with a domain that’s already in ASCII. - -```js -// encode domain names -punycode.toASCII('mañana.com'); -// → 'xn--maana-pta.com' -punycode.toASCII('☃-⌘.com'); -// → 'xn----dqo34k.com' - -// encode email addresses -punycode.toASCII('джумла@джpумлатест.bрфa'); -// → 'джумла@xn--p-8sbkgc5ag7bhce.xn--ba-lmcq' -``` - -### `punycode.ucs2` - -#### `punycode.ucs2.decode(string)` - -Creates an array containing the numeric code point values of each Unicode symbol in the string. While [JavaScript uses UCS-2 internally](https://mathiasbynens.be/notes/javascript-encoding), this function will convert a pair of surrogate halves (each of which UCS-2 exposes as separate characters) into a single code point, matching UTF-16. - -```js -punycode.ucs2.decode('abc'); -// → [0x61, 0x62, 0x63] -// surrogate pair for U+1D306 TETRAGRAM FOR CENTRE: -punycode.ucs2.decode('\uD834\uDF06'); -// → [0x1D306] -``` - -#### `punycode.ucs2.encode(codePoints)` - -Creates a string based on an array of numeric code point values. - -```js -punycode.ucs2.encode([0x61, 0x62, 0x63]); -// → 'abc' -punycode.ucs2.encode([0x1D306]); -// → '\uD834\uDF06' -``` - -### `punycode.version` - -A string representing the current Punycode.js version number. - -## Unit tests & code coverage - -After cloning this repository, run `npm install --dev` to install the dependencies needed for Punycode.js development and testing. You may want to install Istanbul _globally_ using `npm install istanbul -g`. - -Once that’s done, you can run the unit tests in Node using `npm test` or `node tests/tests.js`. To run the tests in Rhino, Ringo, Narwhal, PhantomJS, and web browsers as well, use `grunt test`. - -To generate the code coverage report, use `grunt cover`. - -Feel free to fork if you see possible improvements! - -## Author - -| [![twitter/mathias](https://gravatar.com/avatar/24e08a9ea84deb17ae121074d0f17125?s=70)](https://twitter.com/mathias "Follow @mathias on Twitter") | -|---| -| [Mathias Bynens](https://mathiasbynens.be/) | - -## Contributors - -| [![twitter/jdalton](https://gravatar.com/avatar/299a3d891ff1920b69c364d061007043?s=70)](https://twitter.com/jdalton "Follow @jdalton on Twitter") | -|---| -| [John-David Dalton](http://allyoucanleet.com/) | - -## License - -Punycode.js is available under the [MIT](https://mths.be/mit) license. diff --git a/node_modules/request/node_modules/punycode/package.json b/node_modules/request/node_modules/punycode/package.json deleted file mode 100644 index f404bfa01..000000000 --- a/node_modules/request/node_modules/punycode/package.json +++ /dev/null @@ -1,91 +0,0 @@ -{ - "_args": [ - [ - "punycode@1.4.1", - "/Users/drew.heavner/Documents/Github/sign-android-release" - ] - ], - "_development": true, - "_from": "punycode@1.4.1", - "_id": "punycode@1.4.1", - "_inBundle": false, - "_integrity": "sha1-wNWmOycYgArY4esPpSachN1BhF4=", - "_location": "/request/punycode", - "_phantomChildren": {}, - "_requested": { - "type": "version", - "registry": true, - "raw": "punycode@1.4.1", - "name": "punycode", - "escapedName": "punycode", - "rawSpec": "1.4.1", - "saveSpec": null, - "fetchSpec": "1.4.1" - }, - "_requiredBy": [ - "/request/tough-cookie" - ], - "_resolved": "https://registry.npmjs.org/punycode/-/punycode-1.4.1.tgz", - "_spec": "1.4.1", - "_where": "/Users/drew.heavner/Documents/Github/sign-android-release", - "author": { - "name": "Mathias Bynens", - "url": "https://mathiasbynens.be/" - }, - "bugs": { - "url": "https://github.com/bestiejs/punycode.js/issues" - }, - "contributors": [ - { - "name": "Mathias Bynens", - "url": "https://mathiasbynens.be/" - }, - { - "name": "John-David Dalton", - "url": "http://allyoucanleet.com/" - } - ], - "description": "A robust Punycode converter that fully complies to RFC 3492 and RFC 5891, and works on nearly all JavaScript platforms.", - "devDependencies": { - "coveralls": "^2.11.4", - "grunt": "^0.4.5", - "grunt-contrib-uglify": "^0.11.0", - "grunt-shell": "^1.1.2", - "istanbul": "^0.4.1", - "qunit-extras": "^1.4.4", - "qunitjs": "~1.11.0", - "requirejs": "^2.1.22" - }, - "files": [ - "LICENSE-MIT.txt", - "punycode.js" - ], - "homepage": "https://mths.be/punycode", - "jspm": { - "map": { - "./punycode.js": { - "node": "@node/punycode" - } - } - }, - "keywords": [ - "punycode", - "unicode", - "idn", - "idna", - "dns", - "url", - "domain" - ], - "license": "MIT", - "main": "punycode.js", - "name": "punycode", - "repository": { - "type": "git", - "url": "git+https://github.com/bestiejs/punycode.js.git" - }, - "scripts": { - "test": "node tests/tests.js" - }, - "version": "1.4.1" -} diff --git a/node_modules/request/node_modules/punycode/punycode.js b/node_modules/request/node_modules/punycode/punycode.js deleted file mode 100644 index 2c87f6cc4..000000000 --- a/node_modules/request/node_modules/punycode/punycode.js +++ /dev/null @@ -1,533 +0,0 @@ -/*! https://mths.be/punycode v1.4.1 by @mathias */ -;(function(root) { - - /** Detect free variables */ - var freeExports = typeof exports == 'object' && exports && - !exports.nodeType && exports; - var freeModule = typeof module == 'object' && module && - !module.nodeType && module; - var freeGlobal = typeof global == 'object' && global; - if ( - freeGlobal.global === freeGlobal || - freeGlobal.window === freeGlobal || - freeGlobal.self === freeGlobal - ) { - root = freeGlobal; - } - - /** - * The `punycode` object. - * @name punycode - * @type Object - */ - var punycode, - - /** Highest positive signed 32-bit float value */ - maxInt = 2147483647, // aka. 0x7FFFFFFF or 2^31-1 - - /** Bootstring parameters */ - base = 36, - tMin = 1, - tMax = 26, - skew = 38, - damp = 700, - initialBias = 72, - initialN = 128, // 0x80 - delimiter = '-', // '\x2D' - - /** Regular expressions */ - regexPunycode = /^xn--/, - regexNonASCII = /[^\x20-\x7E]/, // unprintable ASCII chars + non-ASCII chars - regexSeparators = /[\x2E\u3002\uFF0E\uFF61]/g, // RFC 3490 separators - - /** Error messages */ - errors = { - 'overflow': 'Overflow: input needs wider integers to process', - 'not-basic': 'Illegal input >= 0x80 (not a basic code point)', - 'invalid-input': 'Invalid input' - }, - - /** Convenience shortcuts */ - baseMinusTMin = base - tMin, - floor = Math.floor, - stringFromCharCode = String.fromCharCode, - - /** Temporary variable */ - key; - - /*--------------------------------------------------------------------------*/ - - /** - * A generic error utility function. - * @private - * @param {String} type The error type. - * @returns {Error} Throws a `RangeError` with the applicable error message. - */ - function error(type) { - throw new RangeError(errors[type]); - } - - /** - * A generic `Array#map` utility function. - * @private - * @param {Array} array The array to iterate over. - * @param {Function} callback The function that gets called for every array - * item. - * @returns {Array} A new array of values returned by the callback function. - */ - function map(array, fn) { - var length = array.length; - var result = []; - while (length--) { - result[length] = fn(array[length]); - } - return result; - } - - /** - * A simple `Array#map`-like wrapper to work with domain name strings or email - * addresses. - * @private - * @param {String} domain The domain name or email address. - * @param {Function} callback The function that gets called for every - * character. - * @returns {Array} A new string of characters returned by the callback - * function. - */ - function mapDomain(string, fn) { - var parts = string.split('@'); - var result = ''; - if (parts.length > 1) { - // In email addresses, only the domain name should be punycoded. Leave - // the local part (i.e. everything up to `@`) intact. - result = parts[0] + '@'; - string = parts[1]; - } - // Avoid `split(regex)` for IE8 compatibility. See #17. - string = string.replace(regexSeparators, '\x2E'); - var labels = string.split('.'); - var encoded = map(labels, fn).join('.'); - return result + encoded; - } - - /** - * Creates an array containing the numeric code points of each Unicode - * character in the string. While JavaScript uses UCS-2 internally, - * this function will convert a pair of surrogate halves (each of which - * UCS-2 exposes as separate characters) into a single code point, - * matching UTF-16. - * @see `punycode.ucs2.encode` - * @see - * @memberOf punycode.ucs2 - * @name decode - * @param {String} string The Unicode input string (UCS-2). - * @returns {Array} The new array of code points. - */ - function ucs2decode(string) { - var output = [], - counter = 0, - length = string.length, - value, - extra; - while (counter < length) { - value = string.charCodeAt(counter++); - if (value >= 0xD800 && value <= 0xDBFF && counter < length) { - // high surrogate, and there is a next character - extra = string.charCodeAt(counter++); - if ((extra & 0xFC00) == 0xDC00) { // low surrogate - output.push(((value & 0x3FF) << 10) + (extra & 0x3FF) + 0x10000); - } else { - // unmatched surrogate; only append this code unit, in case the next - // code unit is the high surrogate of a surrogate pair - output.push(value); - counter--; - } - } else { - output.push(value); - } - } - return output; - } - - /** - * Creates a string based on an array of numeric code points. - * @see `punycode.ucs2.decode` - * @memberOf punycode.ucs2 - * @name encode - * @param {Array} codePoints The array of numeric code points. - * @returns {String} The new Unicode string (UCS-2). - */ - function ucs2encode(array) { - return map(array, function(value) { - var output = ''; - if (value > 0xFFFF) { - value -= 0x10000; - output += stringFromCharCode(value >>> 10 & 0x3FF | 0xD800); - value = 0xDC00 | value & 0x3FF; - } - output += stringFromCharCode(value); - return output; - }).join(''); - } - - /** - * Converts a basic code point into a digit/integer. - * @see `digitToBasic()` - * @private - * @param {Number} codePoint The basic numeric code point value. - * @returns {Number} The numeric value of a basic code point (for use in - * representing integers) in the range `0` to `base - 1`, or `base` if - * the code point does not represent a value. - */ - function basicToDigit(codePoint) { - if (codePoint - 48 < 10) { - return codePoint - 22; - } - if (codePoint - 65 < 26) { - return codePoint - 65; - } - if (codePoint - 97 < 26) { - return codePoint - 97; - } - return base; - } - - /** - * Converts a digit/integer into a basic code point. - * @see `basicToDigit()` - * @private - * @param {Number} digit The numeric value of a basic code point. - * @returns {Number} The basic code point whose value (when used for - * representing integers) is `digit`, which needs to be in the range - * `0` to `base - 1`. If `flag` is non-zero, the uppercase form is - * used; else, the lowercase form is used. The behavior is undefined - * if `flag` is non-zero and `digit` has no uppercase form. - */ - function digitToBasic(digit, flag) { - // 0..25 map to ASCII a..z or A..Z - // 26..35 map to ASCII 0..9 - return digit + 22 + 75 * (digit < 26) - ((flag != 0) << 5); - } - - /** - * Bias adaptation function as per section 3.4 of RFC 3492. - * https://tools.ietf.org/html/rfc3492#section-3.4 - * @private - */ - function adapt(delta, numPoints, firstTime) { - var k = 0; - delta = firstTime ? floor(delta / damp) : delta >> 1; - delta += floor(delta / numPoints); - for (/* no initialization */; delta > baseMinusTMin * tMax >> 1; k += base) { - delta = floor(delta / baseMinusTMin); - } - return floor(k + (baseMinusTMin + 1) * delta / (delta + skew)); - } - - /** - * Converts a Punycode string of ASCII-only symbols to a string of Unicode - * symbols. - * @memberOf punycode - * @param {String} input The Punycode string of ASCII-only symbols. - * @returns {String} The resulting string of Unicode symbols. - */ - function decode(input) { - // Don't use UCS-2 - var output = [], - inputLength = input.length, - out, - i = 0, - n = initialN, - bias = initialBias, - basic, - j, - index, - oldi, - w, - k, - digit, - t, - /** Cached calculation results */ - baseMinusT; - - // Handle the basic code points: let `basic` be the number of input code - // points before the last delimiter, or `0` if there is none, then copy - // the first basic code points to the output. - - basic = input.lastIndexOf(delimiter); - if (basic < 0) { - basic = 0; - } - - for (j = 0; j < basic; ++j) { - // if it's not a basic code point - if (input.charCodeAt(j) >= 0x80) { - error('not-basic'); - } - output.push(input.charCodeAt(j)); - } - - // Main decoding loop: start just after the last delimiter if any basic code - // points were copied; start at the beginning otherwise. - - for (index = basic > 0 ? basic + 1 : 0; index < inputLength; /* no final expression */) { - - // `index` is the index of the next character to be consumed. - // Decode a generalized variable-length integer into `delta`, - // which gets added to `i`. The overflow checking is easier - // if we increase `i` as we go, then subtract off its starting - // value at the end to obtain `delta`. - for (oldi = i, w = 1, k = base; /* no condition */; k += base) { - - if (index >= inputLength) { - error('invalid-input'); - } - - digit = basicToDigit(input.charCodeAt(index++)); - - if (digit >= base || digit > floor((maxInt - i) / w)) { - error('overflow'); - } - - i += digit * w; - t = k <= bias ? tMin : (k >= bias + tMax ? tMax : k - bias); - - if (digit < t) { - break; - } - - baseMinusT = base - t; - if (w > floor(maxInt / baseMinusT)) { - error('overflow'); - } - - w *= baseMinusT; - - } - - out = output.length + 1; - bias = adapt(i - oldi, out, oldi == 0); - - // `i` was supposed to wrap around from `out` to `0`, - // incrementing `n` each time, so we'll fix that now: - if (floor(i / out) > maxInt - n) { - error('overflow'); - } - - n += floor(i / out); - i %= out; - - // Insert `n` at position `i` of the output - output.splice(i++, 0, n); - - } - - return ucs2encode(output); - } - - /** - * Converts a string of Unicode symbols (e.g. a domain name label) to a - * Punycode string of ASCII-only symbols. - * @memberOf punycode - * @param {String} input The string of Unicode symbols. - * @returns {String} The resulting Punycode string of ASCII-only symbols. - */ - function encode(input) { - var n, - delta, - handledCPCount, - basicLength, - bias, - j, - m, - q, - k, - t, - currentValue, - output = [], - /** `inputLength` will hold the number of code points in `input`. */ - inputLength, - /** Cached calculation results */ - handledCPCountPlusOne, - baseMinusT, - qMinusT; - - // Convert the input in UCS-2 to Unicode - input = ucs2decode(input); - - // Cache the length - inputLength = input.length; - - // Initialize the state - n = initialN; - delta = 0; - bias = initialBias; - - // Handle the basic code points - for (j = 0; j < inputLength; ++j) { - currentValue = input[j]; - if (currentValue < 0x80) { - output.push(stringFromCharCode(currentValue)); - } - } - - handledCPCount = basicLength = output.length; - - // `handledCPCount` is the number of code points that have been handled; - // `basicLength` is the number of basic code points. - - // Finish the basic string - if it is not empty - with a delimiter - if (basicLength) { - output.push(delimiter); - } - - // Main encoding loop: - while (handledCPCount < inputLength) { - - // All non-basic code points < n have been handled already. Find the next - // larger one: - for (m = maxInt, j = 0; j < inputLength; ++j) { - currentValue = input[j]; - if (currentValue >= n && currentValue < m) { - m = currentValue; - } - } - - // Increase `delta` enough to advance the decoder's state to , - // but guard against overflow - handledCPCountPlusOne = handledCPCount + 1; - if (m - n > floor((maxInt - delta) / handledCPCountPlusOne)) { - error('overflow'); - } - - delta += (m - n) * handledCPCountPlusOne; - n = m; - - for (j = 0; j < inputLength; ++j) { - currentValue = input[j]; - - if (currentValue < n && ++delta > maxInt) { - error('overflow'); - } - - if (currentValue == n) { - // Represent delta as a generalized variable-length integer - for (q = delta, k = base; /* no condition */; k += base) { - t = k <= bias ? tMin : (k >= bias + tMax ? tMax : k - bias); - if (q < t) { - break; - } - qMinusT = q - t; - baseMinusT = base - t; - output.push( - stringFromCharCode(digitToBasic(t + qMinusT % baseMinusT, 0)) - ); - q = floor(qMinusT / baseMinusT); - } - - output.push(stringFromCharCode(digitToBasic(q, 0))); - bias = adapt(delta, handledCPCountPlusOne, handledCPCount == basicLength); - delta = 0; - ++handledCPCount; - } - } - - ++delta; - ++n; - - } - return output.join(''); - } - - /** - * Converts a Punycode string representing a domain name or an email address - * to Unicode. Only the Punycoded parts of the input will be converted, i.e. - * it doesn't matter if you call it on a string that has already been - * converted to Unicode. - * @memberOf punycode - * @param {String} input The Punycoded domain name or email address to - * convert to Unicode. - * @returns {String} The Unicode representation of the given Punycode - * string. - */ - function toUnicode(input) { - return mapDomain(input, function(string) { - return regexPunycode.test(string) - ? decode(string.slice(4).toLowerCase()) - : string; - }); - } - - /** - * Converts a Unicode string representing a domain name or an email address to - * Punycode. Only the non-ASCII parts of the domain name will be converted, - * i.e. it doesn't matter if you call it with a domain that's already in - * ASCII. - * @memberOf punycode - * @param {String} input The domain name or email address to convert, as a - * Unicode string. - * @returns {String} The Punycode representation of the given domain name or - * email address. - */ - function toASCII(input) { - return mapDomain(input, function(string) { - return regexNonASCII.test(string) - ? 'xn--' + encode(string) - : string; - }); - } - - /*--------------------------------------------------------------------------*/ - - /** Define the public API */ - punycode = { - /** - * A string representing the current Punycode.js version number. - * @memberOf punycode - * @type String - */ - 'version': '1.4.1', - /** - * An object of methods to convert from JavaScript's internal character - * representation (UCS-2) to Unicode code points, and back. - * @see - * @memberOf punycode - * @type Object - */ - 'ucs2': { - 'decode': ucs2decode, - 'encode': ucs2encode - }, - 'decode': decode, - 'encode': encode, - 'toASCII': toASCII, - 'toUnicode': toUnicode - }; - - /** Expose `punycode` */ - // Some AMD build optimizers, like r.js, check for specific condition patterns - // like the following: - if ( - typeof define == 'function' && - typeof define.amd == 'object' && - define.amd - ) { - define('punycode', function() { - return punycode; - }); - } else if (freeExports && freeModule) { - if (module.exports == freeExports) { - // in Node.js, io.js, or RingoJS v0.8.0+ - freeModule.exports = punycode; - } else { - // in Narwhal or RingoJS v0.7.0- - for (key in punycode) { - punycode.hasOwnProperty(key) && (freeExports[key] = punycode[key]); - } - } - } else { - // in Rhino or a web browser - root.punycode = punycode; - } - -}(this)); diff --git a/node_modules/request/node_modules/tough-cookie/LICENSE b/node_modules/request/node_modules/tough-cookie/LICENSE deleted file mode 100644 index 22204e875..000000000 --- a/node_modules/request/node_modules/tough-cookie/LICENSE +++ /dev/null @@ -1,12 +0,0 @@ -Copyright (c) 2015, Salesforce.com, Inc. -All rights reserved. - -Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: - -1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. - -2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. - -3. Neither the name of Salesforce.com nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/node_modules/request/node_modules/tough-cookie/README.md b/node_modules/request/node_modules/tough-cookie/README.md deleted file mode 100644 index d28bd460d..000000000 --- a/node_modules/request/node_modules/tough-cookie/README.md +++ /dev/null @@ -1,507 +0,0 @@ -[RFC6265](https://tools.ietf.org/html/rfc6265) Cookies and CookieJar for Node.js - -[![npm package](https://nodei.co/npm/tough-cookie.png?downloads=true&downloadRank=true&stars=true)](https://nodei.co/npm/tough-cookie/) - -[![Build Status](https://travis-ci.org/salesforce/tough-cookie.png?branch=master)](https://travis-ci.org/salesforce/tough-cookie) - -# Synopsis - -``` javascript -var tough = require('tough-cookie'); -var Cookie = tough.Cookie; -var cookie = Cookie.parse(header); -cookie.value = 'somethingdifferent'; -header = cookie.toString(); - -var cookiejar = new tough.CookieJar(); -cookiejar.setCookie(cookie, 'http://currentdomain.example.com/path', cb); -// ... -cookiejar.getCookies('http://example.com/otherpath',function(err,cookies) { - res.headers['cookie'] = cookies.join('; '); -}); -``` - -# Installation - -It's _so_ easy! - -`npm install tough-cookie` - -Why the name? NPM modules `cookie`, `cookies` and `cookiejar` were already taken. - -## Version Support - -Support for versions of node.js will follow that of the [request](https://www.npmjs.com/package/request) module. - -# API - -## tough - -Functions on the module you get from `require('tough-cookie')`. All can be used as pure functions and don't need to be "bound". - -**Note**: prior to 1.0.x, several of these functions took a `strict` parameter. This has since been removed from the API as it was no longer necessary. - -### `parseDate(string)` - -Parse a cookie date string into a `Date`. Parses according to RFC6265 Section 5.1.1, not `Date.parse()`. - -### `formatDate(date)` - -Format a Date into a RFC1123 string (the RFC6265-recommended format). - -### `canonicalDomain(str)` - -Transforms a domain-name into a canonical domain-name. The canonical domain-name is a trimmed, lowercased, stripped-of-leading-dot and optionally punycode-encoded domain-name (Section 5.1.2 of RFC6265). For the most part, this function is idempotent (can be run again on its output without ill effects). - -### `domainMatch(str,domStr[,canonicalize=true])` - -Answers "does this real domain match the domain in a cookie?". The `str` is the "current" domain-name and the `domStr` is the "cookie" domain-name. Matches according to RFC6265 Section 5.1.3, but it helps to think of it as a "suffix match". - -The `canonicalize` parameter will run the other two parameters through `canonicalDomain` or not. - -### `defaultPath(path)` - -Given a current request/response path, gives the Path apropriate for storing in a cookie. This is basically the "directory" of a "file" in the path, but is specified by Section 5.1.4 of the RFC. - -The `path` parameter MUST be _only_ the pathname part of a URI (i.e. excludes the hostname, query, fragment, etc.). This is the `.pathname` property of node's `uri.parse()` output. - -### `pathMatch(reqPath,cookiePath)` - -Answers "does the request-path path-match a given cookie-path?" as per RFC6265 Section 5.1.4. Returns a boolean. - -This is essentially a prefix-match where `cookiePath` is a prefix of `reqPath`. - -### `parse(cookieString[, options])` - -alias for `Cookie.parse(cookieString[, options])` - -### `fromJSON(string)` - -alias for `Cookie.fromJSON(string)` - -### `getPublicSuffix(hostname)` - -Returns the public suffix of this hostname. The public suffix is the shortest domain-name upon which a cookie can be set. Returns `null` if the hostname cannot have cookies set for it. - -For example: `www.example.com` and `www.subdomain.example.com` both have public suffix `example.com`. - -For further information, see http://publicsuffix.org/. This module derives its list from that site. This call is currently a wrapper around [`psl`](https://www.npmjs.com/package/psl)'s [get() method](https://www.npmjs.com/package/psl#pslgetdomain). - -### `cookieCompare(a,b)` - -For use with `.sort()`, sorts a list of cookies into the recommended order given in the RFC (Section 5.4 step 2). The sort algorithm is, in order of precedence: - -* Longest `.path` -* oldest `.creation` (which has a 1ms precision, same as `Date`) -* lowest `.creationIndex` (to get beyond the 1ms precision) - -``` javascript -var cookies = [ /* unsorted array of Cookie objects */ ]; -cookies = cookies.sort(cookieCompare); -``` - -**Note**: Since JavaScript's `Date` is limited to a 1ms precision, cookies within the same milisecond are entirely possible. This is especially true when using the `now` option to `.setCookie()`. The `.creationIndex` property is a per-process global counter, assigned during construction with `new Cookie()`. This preserves the spirit of the RFC sorting: older cookies go first. This works great for `MemoryCookieStore`, since `Set-Cookie` headers are parsed in order, but may not be so great for distributed systems. Sophisticated `Store`s may wish to set this to some other _logical clock_ such that if cookies A and B are created in the same millisecond, but cookie A is created before cookie B, then `A.creationIndex < B.creationIndex`. If you want to alter the global counter, which you probably _shouldn't_ do, it's stored in `Cookie.cookiesCreated`. - -### `permuteDomain(domain)` - -Generates a list of all possible domains that `domainMatch()` the parameter. May be handy for implementing cookie stores. - -### `permutePath(path)` - -Generates a list of all possible paths that `pathMatch()` the parameter. May be handy for implementing cookie stores. - - -## Cookie - -Exported via `tough.Cookie`. - -### `Cookie.parse(cookieString[, options])` - -Parses a single Cookie or Set-Cookie HTTP header into a `Cookie` object. Returns `undefined` if the string can't be parsed. - -The options parameter is not required and currently has only one property: - - * _loose_ - boolean - if `true` enable parsing of key-less cookies like `=abc` and `=`, which are not RFC-compliant. - -If options is not an object, it is ignored, which means you can use `Array#map` with it. - -Here's how to process the Set-Cookie header(s) on a node HTTP/HTTPS response: - -``` javascript -if (res.headers['set-cookie'] instanceof Array) - cookies = res.headers['set-cookie'].map(Cookie.parse); -else - cookies = [Cookie.parse(res.headers['set-cookie'])]; -``` - -_Note:_ in version 2.3.3, tough-cookie limited the number of spaces before the `=` to 256 characters. This limitation has since been removed. -See [Issue 92](https://github.com/salesforce/tough-cookie/issues/92) - -### Properties - -Cookie object properties: - - * _key_ - string - the name or key of the cookie (default "") - * _value_ - string - the value of the cookie (default "") - * _expires_ - `Date` - if set, the `Expires=` attribute of the cookie (defaults to the string `"Infinity"`). See `setExpires()` - * _maxAge_ - seconds - if set, the `Max-Age=` attribute _in seconds_ of the cookie. May also be set to strings `"Infinity"` and `"-Infinity"` for non-expiry and immediate-expiry, respectively. See `setMaxAge()` - * _domain_ - string - the `Domain=` attribute of the cookie - * _path_ - string - the `Path=` of the cookie - * _secure_ - boolean - the `Secure` cookie flag - * _httpOnly_ - boolean - the `HttpOnly` cookie flag - * _extensions_ - `Array` - any unrecognized cookie attributes as strings (even if equal-signs inside) - * _creation_ - `Date` - when this cookie was constructed - * _creationIndex_ - number - set at construction, used to provide greater sort precision (please see `cookieCompare(a,b)` for a full explanation) - -After a cookie has been passed through `CookieJar.setCookie()` it will have the following additional attributes: - - * _hostOnly_ - boolean - is this a host-only cookie (i.e. no Domain field was set, but was instead implied) - * _pathIsDefault_ - boolean - if true, there was no Path field on the cookie and `defaultPath()` was used to derive one. - * _creation_ - `Date` - **modified** from construction to when the cookie was added to the jar - * _lastAccessed_ - `Date` - last time the cookie got accessed. Will affect cookie cleaning once implemented. Using `cookiejar.getCookies(...)` will update this attribute. - -### `Cookie([{properties}])` - -Receives an options object that can contain any of the above Cookie properties, uses the default for unspecified properties. - -### `.toString()` - -encode to a Set-Cookie header value. The Expires cookie field is set using `formatDate()`, but is omitted entirely if `.expires` is `Infinity`. - -### `.cookieString()` - -encode to a Cookie header value (i.e. the `.key` and `.value` properties joined with '='). - -### `.setExpires(String)` - -sets the expiry based on a date-string passed through `parseDate()`. If parseDate returns `null` (i.e. can't parse this date string), `.expires` is set to `"Infinity"` (a string) is set. - -### `.setMaxAge(number)` - -sets the maxAge in seconds. Coerces `-Infinity` to `"-Infinity"` and `Infinity` to `"Infinity"` so it JSON serializes correctly. - -### `.expiryTime([now=Date.now()])` - -### `.expiryDate([now=Date.now()])` - -expiryTime() Computes the absolute unix-epoch milliseconds that this cookie expires. expiryDate() works similarly, except it returns a `Date` object. Note that in both cases the `now` parameter should be milliseconds. - -Max-Age takes precedence over Expires (as per the RFC). The `.creation` attribute -- or, by default, the `now` parameter -- is used to offset the `.maxAge` attribute. - -If Expires (`.expires`) is set, that's returned. - -Otherwise, `expiryTime()` returns `Infinity` and `expiryDate()` returns a `Date` object for "Tue, 19 Jan 2038 03:14:07 GMT" (latest date that can be expressed by a 32-bit `time_t`; the common limit for most user-agents). - -### `.TTL([now=Date.now()])` - -compute the TTL relative to `now` (milliseconds). The same precedence rules as for `expiryTime`/`expiryDate` apply. - -The "number" `Infinity` is returned for cookies without an explicit expiry and `0` is returned if the cookie is expired. Otherwise a time-to-live in milliseconds is returned. - -### `.canonicalizedDoman()` - -### `.cdomain()` - -return the canonicalized `.domain` field. This is lower-cased and punycode (RFC3490) encoded if the domain has any non-ASCII characters. - -### `.toJSON()` - -For convenience in using `JSON.serialize(cookie)`. Returns a plain-old `Object` that can be JSON-serialized. - -Any `Date` properties (i.e., `.expires`, `.creation`, and `.lastAccessed`) are exported in ISO format (`.toISOString()`). - -**NOTE**: Custom `Cookie` properties will be discarded. In tough-cookie 1.x, since there was no `.toJSON` method explicitly defined, all enumerable properties were captured. If you want a property to be serialized, add the property name to the `Cookie.serializableProperties` Array. - -### `Cookie.fromJSON(strOrObj)` - -Does the reverse of `cookie.toJSON()`. If passed a string, will `JSON.parse()` that first. - -Any `Date` properties (i.e., `.expires`, `.creation`, and `.lastAccessed`) are parsed via `Date.parse()`, not the tough-cookie `parseDate`, since it's JavaScript/JSON-y timestamps being handled at this layer. - -Returns `null` upon JSON parsing error. - -### `.clone()` - -Does a deep clone of this cookie, exactly implemented as `Cookie.fromJSON(cookie.toJSON())`. - -### `.validate()` - -Status: *IN PROGRESS*. Works for a few things, but is by no means comprehensive. - -validates cookie attributes for semantic correctness. Useful for "lint" checking any Set-Cookie headers you generate. For now, it returns a boolean, but eventually could return a reason string -- you can future-proof with this construct: - -``` javascript -if (cookie.validate() === true) { - // it's tasty -} else { - // yuck! -} -``` - - -## CookieJar - -Exported via `tough.CookieJar`. - -### `CookieJar([store],[options])` - -Simply use `new CookieJar()`. If you'd like to use a custom store, pass that to the constructor otherwise a `MemoryCookieStore` will be created and used. - -The `options` object can be omitted and can have the following properties: - - * _rejectPublicSuffixes_ - boolean - default `true` - reject cookies with domains like "com" and "co.uk" - * _looseMode_ - boolean - default `false` - accept malformed cookies like `bar` and `=bar`, which have an implied empty name. - This is not in the standard, but is used sometimes on the web and is accepted by (most) browsers. - -Since eventually this module would like to support database/remote/etc. CookieJars, continuation passing style is used for CookieJar methods. - -### `.setCookie(cookieOrString, currentUrl, [{options},] cb(err,cookie))` - -Attempt to set the cookie in the cookie jar. If the operation fails, an error will be given to the callback `cb`, otherwise the cookie is passed through. The cookie will have updated `.creation`, `.lastAccessed` and `.hostOnly` properties. - -The `options` object can be omitted and can have the following properties: - - * _http_ - boolean - default `true` - indicates if this is an HTTP or non-HTTP API. Affects HttpOnly cookies. - * _secure_ - boolean - autodetect from url - indicates if this is a "Secure" API. If the currentUrl starts with `https:` or `wss:` then this is defaulted to `true`, otherwise `false`. - * _now_ - Date - default `new Date()` - what to use for the creation/access time of cookies - * _ignoreError_ - boolean - default `false` - silently ignore things like parse errors and invalid domains. `Store` errors aren't ignored by this option. - -As per the RFC, the `.hostOnly` property is set if there was no "Domain=" parameter in the cookie string (or `.domain` was null on the Cookie object). The `.domain` property is set to the fully-qualified hostname of `currentUrl` in this case. Matching this cookie requires an exact hostname match (not a `domainMatch` as per usual). - -### `.setCookieSync(cookieOrString, currentUrl, [{options}])` - -Synchronous version of `setCookie`; only works with synchronous stores (e.g. the default `MemoryCookieStore`). - -### `.getCookies(currentUrl, [{options},] cb(err,cookies))` - -Retrieve the list of cookies that can be sent in a Cookie header for the current url. - -If an error is encountered, that's passed as `err` to the callback, otherwise an `Array` of `Cookie` objects is passed. The array is sorted with `cookieCompare()` unless the `{sort:false}` option is given. - -The `options` object can be omitted and can have the following properties: - - * _http_ - boolean - default `true` - indicates if this is an HTTP or non-HTTP API. Affects HttpOnly cookies. - * _secure_ - boolean - autodetect from url - indicates if this is a "Secure" API. If the currentUrl starts with `https:` or `wss:` then this is defaulted to `true`, otherwise `false`. - * _now_ - Date - default `new Date()` - what to use for the creation/access time of cookies - * _expire_ - boolean - default `true` - perform expiry-time checking of cookies and asynchronously remove expired cookies from the store. Using `false` will return expired cookies and **not** remove them from the store (which is useful for replaying Set-Cookie headers, potentially). - * _allPaths_ - boolean - default `false` - if `true`, do not scope cookies by path. The default uses RFC-compliant path scoping. **Note**: may not be supported by the underlying store (the default `MemoryCookieStore` supports it). - -The `.lastAccessed` property of the returned cookies will have been updated. - -### `.getCookiesSync(currentUrl, [{options}])` - -Synchronous version of `getCookies`; only works with synchronous stores (e.g. the default `MemoryCookieStore`). - -### `.getCookieString(...)` - -Accepts the same options as `.getCookies()` but passes a string suitable for a Cookie header rather than an array to the callback. Simply maps the `Cookie` array via `.cookieString()`. - -### `.getCookieStringSync(...)` - -Synchronous version of `getCookieString`; only works with synchronous stores (e.g. the default `MemoryCookieStore`). - -### `.getSetCookieStrings(...)` - -Returns an array of strings suitable for **Set-Cookie** headers. Accepts the same options as `.getCookies()`. Simply maps the cookie array via `.toString()`. - -### `.getSetCookieStringsSync(...)` - -Synchronous version of `getSetCookieStrings`; only works with synchronous stores (e.g. the default `MemoryCookieStore`). - -### `.serialize(cb(err,serializedObject))` - -Serialize the Jar if the underlying store supports `.getAllCookies`. - -**NOTE**: Custom `Cookie` properties will be discarded. If you want a property to be serialized, add the property name to the `Cookie.serializableProperties` Array. - -See [Serialization Format]. - -### `.serializeSync()` - -Sync version of .serialize - -### `.toJSON()` - -Alias of .serializeSync() for the convenience of `JSON.stringify(cookiejar)`. - -### `CookieJar.deserialize(serialized, [store], cb(err,object))` - -A new Jar is created and the serialized Cookies are added to the underlying store. Each `Cookie` is added via `store.putCookie` in the order in which they appear in the serialization. - -The `store` argument is optional, but should be an instance of `Store`. By default, a new instance of `MemoryCookieStore` is created. - -As a convenience, if `serialized` is a string, it is passed through `JSON.parse` first. If that throws an error, this is passed to the callback. - -### `CookieJar.deserializeSync(serialized, [store])` - -Sync version of `.deserialize`. _Note_ that the `store` must be synchronous for this to work. - -### `CookieJar.fromJSON(string)` - -Alias of `.deserializeSync` to provide consistency with `Cookie.fromJSON()`. - -### `.clone([store,]cb(err,newJar))` - -Produces a deep clone of this jar. Modifications to the original won't affect the clone, and vice versa. - -The `store` argument is optional, but should be an instance of `Store`. By default, a new instance of `MemoryCookieStore` is created. Transferring between store types is supported so long as the source implements `.getAllCookies()` and the destination implements `.putCookie()`. - -### `.cloneSync([store])` - -Synchronous version of `.clone`, returning a new `CookieJar` instance. - -The `store` argument is optional, but must be a _synchronous_ `Store` instance if specified. If not passed, a new instance of `MemoryCookieStore` is used. - -The _source_ and _destination_ must both be synchronous `Store`s. If one or both stores are asynchronous, use `.clone` instead. Recall that `MemoryCookieStore` supports both synchronous and asynchronous API calls. - -## Store - -Base class for CookieJar stores. Available as `tough.Store`. - -## Store API - -The storage model for each `CookieJar` instance can be replaced with a custom implementation. The default is `MemoryCookieStore` which can be found in the `lib/memstore.js` file. The API uses continuation-passing-style to allow for asynchronous stores. - -Stores should inherit from the base `Store` class, which is available as `require('tough-cookie').Store`. - -Stores are asynchronous by default, but if `store.synchronous` is set to `true`, then the `*Sync` methods on the of the containing `CookieJar` can be used (however, the continuation-passing style - -All `domain` parameters will have been normalized before calling. - -The Cookie store must have all of the following methods. - -### `store.findCookie(domain, path, key, cb(err,cookie))` - -Retrieve a cookie with the given domain, path and key (a.k.a. name). The RFC maintains that exactly one of these cookies should exist in a store. If the store is using versioning, this means that the latest/newest such cookie should be returned. - -Callback takes an error and the resulting `Cookie` object. If no cookie is found then `null` MUST be passed instead (i.e. not an error). - -### `store.findCookies(domain, path, cb(err,cookies))` - -Locates cookies matching the given domain and path. This is most often called in the context of `cookiejar.getCookies()` above. - -If no cookies are found, the callback MUST be passed an empty array. - -The resulting list will be checked for applicability to the current request according to the RFC (domain-match, path-match, http-only-flag, secure-flag, expiry, etc.), so it's OK to use an optimistic search algorithm when implementing this method. However, the search algorithm used SHOULD try to find cookies that `domainMatch()` the domain and `pathMatch()` the path in order to limit the amount of checking that needs to be done. - -As of version 0.9.12, the `allPaths` option to `cookiejar.getCookies()` above will cause the path here to be `null`. If the path is `null`, path-matching MUST NOT be performed (i.e. domain-matching only). - -### `store.putCookie(cookie, cb(err))` - -Adds a new cookie to the store. The implementation SHOULD replace any existing cookie with the same `.domain`, `.path`, and `.key` properties -- depending on the nature of the implementation, it's possible that between the call to `fetchCookie` and `putCookie` that a duplicate `putCookie` can occur. - -The `cookie` object MUST NOT be modified; the caller will have already updated the `.creation` and `.lastAccessed` properties. - -Pass an error if the cookie cannot be stored. - -### `store.updateCookie(oldCookie, newCookie, cb(err))` - -Update an existing cookie. The implementation MUST update the `.value` for a cookie with the same `domain`, `.path` and `.key`. The implementation SHOULD check that the old value in the store is equivalent to `oldCookie` - how the conflict is resolved is up to the store. - -The `.lastAccessed` property will always be different between the two objects (to the precision possible via JavaScript's clock). Both `.creation` and `.creationIndex` are guaranteed to be the same. Stores MAY ignore or defer the `.lastAccessed` change at the cost of affecting how cookies are selected for automatic deletion (e.g., least-recently-used, which is up to the store to implement). - -Stores may wish to optimize changing the `.value` of the cookie in the store versus storing a new cookie. If the implementation doesn't define this method a stub that calls `putCookie(newCookie,cb)` will be added to the store object. - -The `newCookie` and `oldCookie` objects MUST NOT be modified. - -Pass an error if the newCookie cannot be stored. - -### `store.removeCookie(domain, path, key, cb(err))` - -Remove a cookie from the store (see notes on `findCookie` about the uniqueness constraint). - -The implementation MUST NOT pass an error if the cookie doesn't exist; only pass an error due to the failure to remove an existing cookie. - -### `store.removeCookies(domain, path, cb(err))` - -Removes matching cookies from the store. The `path` parameter is optional, and if missing means all paths in a domain should be removed. - -Pass an error ONLY if removing any existing cookies failed. - -### `store.getAllCookies(cb(err, cookies))` - -Produces an `Array` of all cookies during `jar.serialize()`. The items in the array can be true `Cookie` objects or generic `Object`s with the [Serialization Format] data structure. - -Cookies SHOULD be returned in creation order to preserve sorting via `compareCookies()`. For reference, `MemoryCookieStore` will sort by `.creationIndex` since it uses true `Cookie` objects internally. If you don't return the cookies in creation order, they'll still be sorted by creation time, but this only has a precision of 1ms. See `compareCookies` for more detail. - -Pass an error if retrieval fails. - -## MemoryCookieStore - -Inherits from `Store`. - -A just-in-memory CookieJar synchronous store implementation, used by default. Despite being a synchronous implementation, it's usable with both the synchronous and asynchronous forms of the `CookieJar` API. - -## Community Cookie Stores - -These are some Store implementations authored and maintained by the community. They aren't official and we don't vouch for them but you may be interested to have a look: - -- [`db-cookie-store`](https://github.com/JSBizon/db-cookie-store): SQL including SQLite-based databases -- [`file-cookie-store`](https://github.com/JSBizon/file-cookie-store): Netscape cookie file format on disk -- [`redis-cookie-store`](https://github.com/benkroeger/redis-cookie-store): Redis -- [`tough-cookie-filestore`](https://github.com/mitsuru/tough-cookie-filestore): JSON on disk -- [`tough-cookie-web-storage-store`](https://github.com/exponentjs/tough-cookie-web-storage-store): DOM localStorage and sessionStorage - - -# Serialization Format - -**NOTE**: if you want to have custom `Cookie` properties serialized, add the property name to `Cookie.serializableProperties`. - -```js - { - // The version of tough-cookie that serialized this jar. - version: 'tough-cookie@1.x.y', - - // add the store type, to make humans happy: - storeType: 'MemoryCookieStore', - - // CookieJar configuration: - rejectPublicSuffixes: true, - // ... future items go here - - // Gets filled from jar.store.getAllCookies(): - cookies: [ - { - key: 'string', - value: 'string', - // ... - /* other Cookie.serializableProperties go here */ - } - ] - } -``` - -# Copyright and License - -(tl;dr: BSD-3-Clause with some MPL/2.0) - -```text - Copyright (c) 2015, Salesforce.com, Inc. - All rights reserved. - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - 3. Neither the name of Salesforce.com nor the names of its contributors may - be used to endorse or promote products derived from this software without - specific prior written permission. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE - LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - POSSIBILITY OF SUCH DAMAGE. -``` diff --git a/node_modules/request/node_modules/tough-cookie/lib/cookie.js b/node_modules/request/node_modules/tough-cookie/lib/cookie.js deleted file mode 100644 index 039a0e71f..000000000 --- a/node_modules/request/node_modules/tough-cookie/lib/cookie.js +++ /dev/null @@ -1,1431 +0,0 @@ -/*! - * Copyright (c) 2015, Salesforce.com, Inc. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * 3. Neither the name of Salesforce.com nor the names of its contributors may - * be used to endorse or promote products derived from this software without - * specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - */ -'use strict'; -var net = require('net'); -var urlParse = require('url').parse; -var util = require('util'); -var pubsuffix = require('./pubsuffix-psl'); -var Store = require('./store').Store; -var MemoryCookieStore = require('./memstore').MemoryCookieStore; -var pathMatch = require('./pathMatch').pathMatch; -var VERSION = require('../package.json').version; - -var punycode; -try { - punycode = require('punycode'); -} catch(e) { - console.warn("tough-cookie: can't load punycode; won't use punycode for domain normalization"); -} - -// From RFC6265 S4.1.1 -// note that it excludes \x3B ";" -var COOKIE_OCTETS = /^[\x21\x23-\x2B\x2D-\x3A\x3C-\x5B\x5D-\x7E]+$/; - -var CONTROL_CHARS = /[\x00-\x1F]/; - -// From Chromium // '\r', '\n' and '\0' should be treated as a terminator in -// the "relaxed" mode, see: -// https://github.com/ChromiumWebApps/chromium/blob/b3d3b4da8bb94c1b2e061600df106d590fda3620/net/cookies/parsed_cookie.cc#L60 -var TERMINATORS = ['\n', '\r', '\0']; - -// RFC6265 S4.1.1 defines path value as 'any CHAR except CTLs or ";"' -// Note ';' is \x3B -var PATH_VALUE = /[\x20-\x3A\x3C-\x7E]+/; - -// date-time parsing constants (RFC6265 S5.1.1) - -var DATE_DELIM = /[\x09\x20-\x2F\x3B-\x40\x5B-\x60\x7B-\x7E]/; - -var MONTH_TO_NUM = { - jan:0, feb:1, mar:2, apr:3, may:4, jun:5, - jul:6, aug:7, sep:8, oct:9, nov:10, dec:11 -}; -var NUM_TO_MONTH = [ - 'Jan','Feb','Mar','Apr','May','Jun','Jul','Aug','Sep','Oct','Nov','Dec' -]; -var NUM_TO_DAY = [ - 'Sun','Mon','Tue','Wed','Thu','Fri','Sat' -]; - -var MAX_TIME = 2147483647000; // 31-bit max -var MIN_TIME = 0; // 31-bit min - -/* - * Parses a Natural number (i.e., non-negative integer) with either the - * *DIGIT ( non-digit *OCTET ) - * or - * *DIGIT - * grammar (RFC6265 S5.1.1). - * - * The "trailingOK" boolean controls if the grammar accepts a - * "( non-digit *OCTET )" trailer. - */ -function parseDigits(token, minDigits, maxDigits, trailingOK) { - var count = 0; - while (count < token.length) { - var c = token.charCodeAt(count); - // "non-digit = %x00-2F / %x3A-FF" - if (c <= 0x2F || c >= 0x3A) { - break; - } - count++; - } - - // constrain to a minimum and maximum number of digits. - if (count < minDigits || count > maxDigits) { - return null; - } - - if (!trailingOK && count != token.length) { - return null; - } - - return parseInt(token.substr(0,count), 10); -} - -function parseTime(token) { - var parts = token.split(':'); - var result = [0,0,0]; - - /* RF6256 S5.1.1: - * time = hms-time ( non-digit *OCTET ) - * hms-time = time-field ":" time-field ":" time-field - * time-field = 1*2DIGIT - */ - - if (parts.length !== 3) { - return null; - } - - for (var i = 0; i < 3; i++) { - // "time-field" must be strictly "1*2DIGIT", HOWEVER, "hms-time" can be - // followed by "( non-digit *OCTET )" so therefore the last time-field can - // have a trailer - var trailingOK = (i == 2); - var num = parseDigits(parts[i], 1, 2, trailingOK); - if (num === null) { - return null; - } - result[i] = num; - } - - return result; -} - -function parseMonth(token) { - token = String(token).substr(0,3).toLowerCase(); - var num = MONTH_TO_NUM[token]; - return num >= 0 ? num : null; -} - -/* - * RFC6265 S5.1.1 date parser (see RFC for full grammar) - */ -function parseDate(str) { - if (!str) { - return; - } - - /* RFC6265 S5.1.1: - * 2. Process each date-token sequentially in the order the date-tokens - * appear in the cookie-date - */ - var tokens = str.split(DATE_DELIM); - if (!tokens) { - return; - } - - var hour = null; - var minute = null; - var second = null; - var dayOfMonth = null; - var month = null; - var year = null; - - for (var i=0; i= 70 && year <= 99) { - year += 1900; - } else if (year >= 0 && year <= 69) { - year += 2000; - } - } - } - } - - /* RFC 6265 S5.1.1 - * "5. Abort these steps and fail to parse the cookie-date if: - * * at least one of the found-day-of-month, found-month, found- - * year, or found-time flags is not set, - * * the day-of-month-value is less than 1 or greater than 31, - * * the year-value is less than 1601, - * * the hour-value is greater than 23, - * * the minute-value is greater than 59, or - * * the second-value is greater than 59. - * (Note that leap seconds cannot be represented in this syntax.)" - * - * So, in order as above: - */ - if ( - dayOfMonth === null || month === null || year === null || second === null || - dayOfMonth < 1 || dayOfMonth > 31 || - year < 1601 || - hour > 23 || - minute > 59 || - second > 59 - ) { - return; - } - - return new Date(Date.UTC(year, month, dayOfMonth, hour, minute, second)); -} - -function formatDate(date) { - var d = date.getUTCDate(); d = d >= 10 ? d : '0'+d; - var h = date.getUTCHours(); h = h >= 10 ? h : '0'+h; - var m = date.getUTCMinutes(); m = m >= 10 ? m : '0'+m; - var s = date.getUTCSeconds(); s = s >= 10 ? s : '0'+s; - return NUM_TO_DAY[date.getUTCDay()] + ', ' + - d+' '+ NUM_TO_MONTH[date.getUTCMonth()] +' '+ date.getUTCFullYear() +' '+ - h+':'+m+':'+s+' GMT'; -} - -// S5.1.2 Canonicalized Host Names -function canonicalDomain(str) { - if (str == null) { - return null; - } - str = str.trim().replace(/^\./,''); // S4.1.2.3 & S5.2.3: ignore leading . - - // convert to IDN if any non-ASCII characters - if (punycode && /[^\u0001-\u007f]/.test(str)) { - str = punycode.toASCII(str); - } - - return str.toLowerCase(); -} - -// S5.1.3 Domain Matching -function domainMatch(str, domStr, canonicalize) { - if (str == null || domStr == null) { - return null; - } - if (canonicalize !== false) { - str = canonicalDomain(str); - domStr = canonicalDomain(domStr); - } - - /* - * "The domain string and the string are identical. (Note that both the - * domain string and the string will have been canonicalized to lower case at - * this point)" - */ - if (str == domStr) { - return true; - } - - /* "All of the following [three] conditions hold:" (order adjusted from the RFC) */ - - /* "* The string is a host name (i.e., not an IP address)." */ - if (net.isIP(str)) { - return false; - } - - /* "* The domain string is a suffix of the string" */ - var idx = str.indexOf(domStr); - if (idx <= 0) { - return false; // it's a non-match (-1) or prefix (0) - } - - // e.g "a.b.c".indexOf("b.c") === 2 - // 5 === 3+2 - if (str.length !== domStr.length + idx) { // it's not a suffix - return false; - } - - /* "* The last character of the string that is not included in the domain - * string is a %x2E (".") character." */ - if (str.substr(idx-1,1) !== '.') { - return false; - } - - return true; -} - - -// RFC6265 S5.1.4 Paths and Path-Match - -/* - * "The user agent MUST use an algorithm equivalent to the following algorithm - * to compute the default-path of a cookie:" - * - * Assumption: the path (and not query part or absolute uri) is passed in. - */ -function defaultPath(path) { - // "2. If the uri-path is empty or if the first character of the uri-path is not - // a %x2F ("/") character, output %x2F ("/") and skip the remaining steps. - if (!path || path.substr(0,1) !== "/") { - return "/"; - } - - // "3. If the uri-path contains no more than one %x2F ("/") character, output - // %x2F ("/") and skip the remaining step." - if (path === "/") { - return path; - } - - var rightSlash = path.lastIndexOf("/"); - if (rightSlash === 0) { - return "/"; - } - - // "4. Output the characters of the uri-path from the first character up to, - // but not including, the right-most %x2F ("/")." - return path.slice(0, rightSlash); -} - -function trimTerminator(str) { - for (var t = 0; t < TERMINATORS.length; t++) { - var terminatorIdx = str.indexOf(TERMINATORS[t]); - if (terminatorIdx !== -1) { - str = str.substr(0,terminatorIdx); - } - } - - return str; -} - -function parseCookiePair(cookiePair, looseMode) { - cookiePair = trimTerminator(cookiePair); - - var firstEq = cookiePair.indexOf('='); - if (looseMode) { - if (firstEq === 0) { // '=' is immediately at start - cookiePair = cookiePair.substr(1); - firstEq = cookiePair.indexOf('='); // might still need to split on '=' - } - } else { // non-loose mode - if (firstEq <= 0) { // no '=' or is at start - return; // needs to have non-empty "cookie-name" - } - } - - var cookieName, cookieValue; - if (firstEq <= 0) { - cookieName = ""; - cookieValue = cookiePair.trim(); - } else { - cookieName = cookiePair.substr(0, firstEq).trim(); - cookieValue = cookiePair.substr(firstEq+1).trim(); - } - - if (CONTROL_CHARS.test(cookieName) || CONTROL_CHARS.test(cookieValue)) { - return; - } - - var c = new Cookie(); - c.key = cookieName; - c.value = cookieValue; - return c; -} - -function parse(str, options) { - if (!options || typeof options !== 'object') { - options = {}; - } - str = str.trim(); - - // We use a regex to parse the "name-value-pair" part of S5.2 - var firstSemi = str.indexOf(';'); // S5.2 step 1 - var cookiePair = (firstSemi === -1) ? str : str.substr(0, firstSemi); - var c = parseCookiePair(cookiePair, !!options.loose); - if (!c) { - return; - } - - if (firstSemi === -1) { - return c; - } - - // S5.2.3 "unparsed-attributes consist of the remainder of the set-cookie-string - // (including the %x3B (";") in question)." plus later on in the same section - // "discard the first ";" and trim". - var unparsed = str.slice(firstSemi + 1).trim(); - - // "If the unparsed-attributes string is empty, skip the rest of these - // steps." - if (unparsed.length === 0) { - return c; - } - - /* - * S5.2 says that when looping over the items "[p]rocess the attribute-name - * and attribute-value according to the requirements in the following - * subsections" for every item. Plus, for many of the individual attributes - * in S5.3 it says to use the "attribute-value of the last attribute in the - * cookie-attribute-list". Therefore, in this implementation, we overwrite - * the previous value. - */ - var cookie_avs = unparsed.split(';'); - while (cookie_avs.length) { - var av = cookie_avs.shift().trim(); - if (av.length === 0) { // happens if ";;" appears - continue; - } - var av_sep = av.indexOf('='); - var av_key, av_value; - - if (av_sep === -1) { - av_key = av; - av_value = null; - } else { - av_key = av.substr(0,av_sep); - av_value = av.substr(av_sep+1); - } - - av_key = av_key.trim().toLowerCase(); - - if (av_value) { - av_value = av_value.trim(); - } - - switch(av_key) { - case 'expires': // S5.2.1 - if (av_value) { - var exp = parseDate(av_value); - // "If the attribute-value failed to parse as a cookie date, ignore the - // cookie-av." - if (exp) { - // over and underflow not realistically a concern: V8's getTime() seems to - // store something larger than a 32-bit time_t (even with 32-bit node) - c.expires = exp; - } - } - break; - - case 'max-age': // S5.2.2 - if (av_value) { - // "If the first character of the attribute-value is not a DIGIT or a "-" - // character ...[or]... If the remainder of attribute-value contains a - // non-DIGIT character, ignore the cookie-av." - if (/^-?[0-9]+$/.test(av_value)) { - var delta = parseInt(av_value, 10); - // "If delta-seconds is less than or equal to zero (0), let expiry-time - // be the earliest representable date and time." - c.setMaxAge(delta); - } - } - break; - - case 'domain': // S5.2.3 - // "If the attribute-value is empty, the behavior is undefined. However, - // the user agent SHOULD ignore the cookie-av entirely." - if (av_value) { - // S5.2.3 "Let cookie-domain be the attribute-value without the leading %x2E - // (".") character." - var domain = av_value.trim().replace(/^\./, ''); - if (domain) { - // "Convert the cookie-domain to lower case." - c.domain = domain.toLowerCase(); - } - } - break; - - case 'path': // S5.2.4 - /* - * "If the attribute-value is empty or if the first character of the - * attribute-value is not %x2F ("/"): - * Let cookie-path be the default-path. - * Otherwise: - * Let cookie-path be the attribute-value." - * - * We'll represent the default-path as null since it depends on the - * context of the parsing. - */ - c.path = av_value && av_value[0] === "/" ? av_value : null; - break; - - case 'secure': // S5.2.5 - /* - * "If the attribute-name case-insensitively matches the string "Secure", - * the user agent MUST append an attribute to the cookie-attribute-list - * with an attribute-name of Secure and an empty attribute-value." - */ - c.secure = true; - break; - - case 'httponly': // S5.2.6 -- effectively the same as 'secure' - c.httpOnly = true; - break; - - default: - c.extensions = c.extensions || []; - c.extensions.push(av); - break; - } - } - - return c; -} - -// avoid the V8 deoptimization monster! -function jsonParse(str) { - var obj; - try { - obj = JSON.parse(str); - } catch (e) { - return e; - } - return obj; -} - -function fromJSON(str) { - if (!str) { - return null; - } - - var obj; - if (typeof str === 'string') { - obj = jsonParse(str); - if (obj instanceof Error) { - return null; - } - } else { - // assume it's an Object - obj = str; - } - - var c = new Cookie(); - for (var i=0; i 1) { - var lindex = path.lastIndexOf('/'); - if (lindex === 0) { - break; - } - path = path.substr(0,lindex); - permutations.push(path); - } - permutations.push('/'); - return permutations; -} - -function getCookieContext(url) { - if (url instanceof Object) { - return url; - } - // NOTE: decodeURI will throw on malformed URIs (see GH-32). - // Therefore, we will just skip decoding for such URIs. - try { - url = decodeURI(url); - } - catch(err) { - // Silently swallow error - } - - return urlParse(url); -} - -function Cookie(options) { - options = options || {}; - - Object.keys(options).forEach(function(prop) { - if (Cookie.prototype.hasOwnProperty(prop) && - Cookie.prototype[prop] !== options[prop] && - prop.substr(0,1) !== '_') - { - this[prop] = options[prop]; - } - }, this); - - this.creation = this.creation || new Date(); - - // used to break creation ties in cookieCompare(): - Object.defineProperty(this, 'creationIndex', { - configurable: false, - enumerable: false, // important for assert.deepEqual checks - writable: true, - value: ++Cookie.cookiesCreated - }); -} - -Cookie.cookiesCreated = 0; // incremented each time a cookie is created - -Cookie.parse = parse; -Cookie.fromJSON = fromJSON; - -Cookie.prototype.key = ""; -Cookie.prototype.value = ""; - -// the order in which the RFC has them: -Cookie.prototype.expires = "Infinity"; // coerces to literal Infinity -Cookie.prototype.maxAge = null; // takes precedence over expires for TTL -Cookie.prototype.domain = null; -Cookie.prototype.path = null; -Cookie.prototype.secure = false; -Cookie.prototype.httpOnly = false; -Cookie.prototype.extensions = null; - -// set by the CookieJar: -Cookie.prototype.hostOnly = null; // boolean when set -Cookie.prototype.pathIsDefault = null; // boolean when set -Cookie.prototype.creation = null; // Date when set; defaulted by Cookie.parse -Cookie.prototype.lastAccessed = null; // Date when set -Object.defineProperty(Cookie.prototype, 'creationIndex', { - configurable: true, - enumerable: false, - writable: true, - value: 0 -}); - -Cookie.serializableProperties = Object.keys(Cookie.prototype) - .filter(function(prop) { - return !( - Cookie.prototype[prop] instanceof Function || - prop === 'creationIndex' || - prop.substr(0,1) === '_' - ); - }); - -Cookie.prototype.inspect = function inspect() { - var now = Date.now(); - return 'Cookie="'+this.toString() + - '; hostOnly='+(this.hostOnly != null ? this.hostOnly : '?') + - '; aAge='+(this.lastAccessed ? (now-this.lastAccessed.getTime())+'ms' : '?') + - '; cAge='+(this.creation ? (now-this.creation.getTime())+'ms' : '?') + - '"'; -}; - -// Use the new custom inspection symbol to add the custom inspect function if -// available. -if (util.inspect.custom) { - Cookie.prototype[util.inspect.custom] = Cookie.prototype.inspect; -} - -Cookie.prototype.toJSON = function() { - var obj = {}; - - var props = Cookie.serializableProperties; - for (var i=0; i=0.8" - }, - "files": [ - "lib" - ], - "homepage": "https://github.com/salesforce/tough-cookie", - "keywords": [ - "HTTP", - "cookie", - "cookies", - "set-cookie", - "cookiejar", - "jar", - "RFC6265", - "RFC2965" - ], - "license": "BSD-3-Clause", - "main": "./lib/cookie", - "name": "tough-cookie", - "repository": { - "type": "git", - "url": "git://github.com/salesforce/tough-cookie.git" - }, - "scripts": { - "cover": "nyc --reporter=lcov --reporter=html vows test/*_test.js", - "test": "vows test/*_test.js" - }, - "version": "2.4.3" -} diff --git a/node_modules/request/package.json b/node_modules/request/package.json index e99fba099..b52ba9c72 100644 --- a/node_modules/request/package.json +++ b/node_modules/request/package.json @@ -1,35 +1,27 @@ { - "_args": [ - [ - "request@2.88.0", - "/Users/drew.heavner/Documents/Github/sign-android-release" - ] - ], - "_development": true, - "_from": "request@2.88.0", - "_id": "request@2.88.0", + "_from": "request@^2.87.0", + "_id": "request@2.88.2", "_inBundle": false, - "_integrity": "sha512-NAqBSrijGLZdM0WZNsInLJpkJokL72XYjUpnB0iwsRgxh7dB6COrHnTBNwN0E+lHDAJzu7kLAkDeY08z2/A0hg==", + "_integrity": "sha512-MsvtOrfG9ZcrOwAW+Qi+F6HbD0CWXEh9ou77uOb7FM2WPhwT7smM833PzanhJLsgXjN89Ir6V2PczXNnMpwKhw==", "_location": "/request", - "_phantomChildren": { - "psl": "1.3.0" - }, + "_phantomChildren": {}, "_requested": { - "type": "version", + "type": "range", "registry": true, - "raw": "request@2.88.0", + "raw": "request@^2.87.0", "name": "request", "escapedName": "request", - "rawSpec": "2.88.0", + "rawSpec": "^2.87.0", "saveSpec": null, - "fetchSpec": "2.88.0" + "fetchSpec": "^2.87.0" }, "_requiredBy": [ "/jsdom" ], - "_resolved": "https://registry.npmjs.org/request/-/request-2.88.0.tgz", - "_spec": "2.88.0", - "_where": "/Users/drew.heavner/Documents/Github/sign-android-release", + "_resolved": "https://registry.npmjs.org/request/-/request-2.88.2.tgz", + "_shasum": "d73c918731cb5a87da047e207234146f664d12b3", + "_spec": "request@^2.87.0", + "_where": "/Users/drew.heavner/Documents/Github/sign-android-release/node_modules/jsdom", "author": { "name": "Mikeal Rogers", "email": "mikeal.rogers@gmail.com" @@ -37,6 +29,7 @@ "bugs": { "url": "http://github.com/request/request/issues" }, + "bundleDependencies": false, "dependencies": { "aws-sign2": "~0.7.0", "aws4": "^1.8.0", @@ -45,7 +38,7 @@ "extend": "~3.0.2", "forever-agent": "~0.6.1", "form-data": "~2.3.2", - "har-validator": "~5.1.0", + "har-validator": "~5.1.3", "http-signature": "~1.2.0", "is-typedarray": "~1.0.0", "isstream": "~0.1.2", @@ -55,10 +48,11 @@ "performance-now": "^2.1.0", "qs": "~6.5.2", "safe-buffer": "^5.1.2", - "tough-cookie": "~2.4.3", + "tough-cookie": "~2.5.0", "tunnel-agent": "^0.6.0", "uuid": "^3.3.2" }, + "deprecated": "request has been deprecated, see https://github.com/request/request/issues/3142", "description": "Simplified HTTP request client.", "devDependencies": { "bluebird": "^3.2.1", @@ -68,13 +62,13 @@ "codecov": "^3.0.4", "coveralls": "^3.0.2", "function-bind": "^1.0.2", - "istanbul": "^0.4.0", "karma": "^3.0.0", "karma-browserify": "^5.0.1", "karma-cli": "^1.0.0", "karma-coverage": "^1.0.0", "karma-phantomjs-launcher": "^1.0.0", "karma-tap": "^3.0.1", + "nyc": "^14.1.1", "phantomjs-prebuilt": "^2.1.3", "rimraf": "^2.2.8", "server-destroy": "^1.0.1", @@ -83,7 +77,7 @@ "taper": "^0.5.0" }, "engines": { - "node": ">= 4" + "node": ">= 6" }, "files": [ "lib/", @@ -115,7 +109,7 @@ "test": "npm run lint && npm run test-ci && npm run test-browser", "test-browser": "node tests/browser/start.js", "test-ci": "taper tests/test-*.js", - "test-cov": "istanbul cover tape tests/test-*.js" + "test-cov": "nyc --reporter=lcov tape tests/test-*.js" }, - "version": "2.88.0" + "version": "2.88.2" } diff --git a/node_modules/request/request.js b/node_modules/request/request.js index 90bed4f4a..198b76093 100644 --- a/node_modules/request/request.js +++ b/node_modules/request/request.js @@ -828,8 +828,7 @@ Request.prototype.start = function () { if (isConnecting) { var onReqSockConnect = function () { socket.removeListener('connect', onReqSockConnect) - clearTimeout(self.timeoutTimer) - self.timeoutTimer = null + self.clearTimeout() setReqTimeout() } @@ -874,10 +873,7 @@ Request.prototype.onRequestError = function (error) { self.req.end() return } - if (self.timeout && self.timeoutTimer) { - clearTimeout(self.timeoutTimer) - self.timeoutTimer = null - } + self.clearTimeout() self.emit('error', error) } @@ -964,10 +960,7 @@ Request.prototype.onRequestResponse = function (response) { if (self.setHost) { self.removeHeader('host') } - if (self.timeout && self.timeoutTimer) { - clearTimeout(self.timeoutTimer) - self.timeoutTimer = null - } + self.clearTimeout() var targetCookieJar = (self._jar && self._jar.setCookie) ? self._jar : globalCookieJar var addCookie = function (cookie) { @@ -1172,6 +1165,7 @@ Request.prototype.abort = function () { self.response.destroy() } + self.clearTimeout() self.emit('abort') } @@ -1448,7 +1442,7 @@ Request.prototype.jar = function (jar) { cookies = false self._disableCookies = true } else { - var targetCookieJar = (jar && jar.getCookieString) ? jar : globalCookieJar + var targetCookieJar = jar.getCookieString ? jar : globalCookieJar var urihref = self.uri.href // fetch cookie in the Specified host if (targetCookieJar) { @@ -1532,6 +1526,7 @@ Request.prototype.resume = function () { } Request.prototype.destroy = function () { var self = this + this.clearTimeout() if (!self._ended) { self.end() } else if (self.response) { @@ -1539,6 +1534,13 @@ Request.prototype.destroy = function () { } } +Request.prototype.clearTimeout = function () { + if (this.timeoutTimer) { + clearTimeout(this.timeoutTimer) + this.timeoutTimer = null + } +} + Request.defaultProxyHeaderWhiteList = Tunnel.defaultProxyHeaderWhiteList.slice() diff --git a/node_modules/rimraf/package.json b/node_modules/rimraf/package.json index 5681f50fb..ba4a6b225 100644 --- a/node_modules/rimraf/package.json +++ b/node_modules/rimraf/package.json @@ -1,48 +1,44 @@ { - "_args": [ - [ - "rimraf@2.6.3", - "/Users/drew.heavner/Documents/Github/sign-android-release" - ] - ], - "_development": true, - "_from": "rimraf@2.6.3", - "_id": "rimraf@2.6.3", + "_from": "rimraf@^2.5.4", + "_id": "rimraf@2.7.1", "_inBundle": false, - "_integrity": "sha512-mwqeW5XsA2qAejG46gYdENaxXjx9onRNCfn7L0duuP4hCuTIi/QO7PDK07KJfp1d+izWPrzEJDcSqBa0OZQriA==", + "_integrity": "sha512-uWjbaKIK3T1OSVptzX7Nl6PvQ3qAGtKEtVRjRuazjfL3Bx5eI409VZSqgND+4UNnmzLVdPj9FqFJNPqBZFve4w==", "_location": "/rimraf", "_phantomChildren": {}, "_requested": { - "type": "version", + "type": "range", "registry": true, - "raw": "rimraf@2.6.3", + "raw": "rimraf@^2.5.4", "name": "rimraf", "escapedName": "rimraf", - "rawSpec": "2.6.3", + "rawSpec": "^2.5.4", "saveSpec": null, - "fetchSpec": "2.6.3" + "fetchSpec": "^2.5.4" }, "_requiredBy": [ - "/@jest/core", - "/istanbul-lib-source-maps" + "/istanbul-lib-source-maps", + "/jest/jest-cli/@jest/core" ], - "_resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.6.3.tgz", - "_spec": "2.6.3", - "_where": "/Users/drew.heavner/Documents/Github/sign-android-release", + "_resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.7.1.tgz", + "_shasum": "35797f13a7fdadc566142c29d4f07ccad483e3ec", + "_spec": "rimraf@^2.5.4", + "_where": "/Users/drew.heavner/Documents/Github/sign-android-release/node_modules/jest/node_modules/jest-cli/node_modules/@jest/core", "author": { "name": "Isaac Z. Schlueter", "email": "i@izs.me", "url": "http://blog.izs.me/" }, "bin": { - "rimraf": "./bin.js" + "rimraf": "bin.js" }, "bugs": { "url": "https://github.com/isaacs/rimraf/issues" }, + "bundleDependencies": false, "dependencies": { "glob": "^7.1.3" }, + "deprecated": false, "description": "A deep deletion module for node (like `rm -rf`)", "devDependencies": { "mkdirp": "^0.5.1", @@ -68,5 +64,5 @@ "preversion": "npm test", "test": "tap test/*.js" }, - "version": "2.6.3" + "version": "2.7.1" } diff --git a/node_modules/rimraf/rimraf.js b/node_modules/rimraf/rimraf.js index e80dd1069..a90ad029f 100644 --- a/node_modules/rimraf/rimraf.js +++ b/node_modules/rimraf/rimraf.js @@ -4,7 +4,12 @@ rimraf.sync = rimrafSync var assert = require("assert") var path = require("path") var fs = require("fs") -var glob = require("glob") +var glob = undefined +try { + glob = require("glob") +} catch (_err) { + // treat glob as optional. +} var _0666 = parseInt('666', 8) var defaultGlobOpts = { @@ -37,6 +42,9 @@ function defaults (options) { if (options.glob === false) { options.disableGlob = true } + if (options.disableGlob !== true && glob === undefined) { + throw Error('glob dependency not found, set `options.disableGlob = true` if intentional') + } options.disableGlob = options.disableGlob || false options.glob = options.glob || defaultGlobOpts } diff --git a/node_modules/semver/CHANGELOG.md b/node_modules/semver/CHANGELOG.md index f567dd3fe..66304fdd2 100644 --- a/node_modules/semver/CHANGELOG.md +++ b/node_modules/semver/CHANGELOG.md @@ -1,36 +1,5 @@ # changes log -## 6.2.0 - -* Coerce numbers to strings when passed to semver.coerce() -* Add `rtl` option to coerce from right to left - -## 6.1.3 - -* Handle X-ranges properly in includePrerelease mode - -## 6.1.2 - -* Do not throw when testing invalid version strings - -## 6.1.1 - -* Add options support for semver.coerce() -* Handle undefined version passed to Range.test - -## 6.1.0 - -* Add semver.compareBuild function -* Support `*` in semver.intersects - -## 6.0 - -* Fix `intersects` logic. - - This is technically a bug fix, but since it is also a change to behavior - that may require users updating their code, it is marked as a major - version increment. - ## 5.7 * Add `minVersion` method diff --git a/node_modules/semver/README.md b/node_modules/semver/README.md index 2293a14fd..f8dfa5a0d 100644 --- a/node_modules/semver/README.md +++ b/node_modules/semver/README.md @@ -4,7 +4,7 @@ semver(1) -- The semantic versioner for npm ## Install ```bash -npm install semver +npm install --save semver ```` ## Usage @@ -60,12 +60,6 @@ Options: Coerce a string into SemVer if possible (does not imply --loose) ---rtl - Coerce version strings right to left - ---ltr - Coerce version strings left to right (default) - Program exits successfully if any valid version satisfies all supplied ranges, and prints all satisfying versions. @@ -237,7 +231,7 @@ comparator. Allows minor-level changes if not. #### Caret Ranges `^1.2.3` `^0.2.5` `^0.0.4` -Allows changes that do not modify the left-most non-zero element in the +Allows changes that do not modify the left-most non-zero digit in the `[major, minor, patch]` tuple. In other words, this allows patch and minor updates for versions `1.0.0` and above, patch updates for versions `0.X >=0.1.0`, and *no* updates for versions `0.0.X`. @@ -360,9 +354,6 @@ strings that they parse. `v2` is greater. Sorts in ascending order if passed to `Array.sort()`. * `rcompare(v1, v2)`: The reverse of compare. Sorts an array of versions in descending order when passed to `Array.sort()`. -* `compareBuild(v1, v2)`: The same as `compare` but considers `build` when two versions - are equal. Sorts in ascending order if passed to `Array.sort()`. - `v2` is greater. Sorts in ascending order if passed to `Array.sort()`. * `diff(v1, v2)`: Returns difference between two versions by the release type (`major`, `premajor`, `minor`, `preminor`, `patch`, `prepatch`, or `prerelease`), or null if the versions are the same. @@ -405,7 +396,7 @@ range, use the `satisfies(version, range)` function. ### Coercion -* `coerce(version, options)`: Coerces a string to semver if possible +* `coerce(version)`: Coerces a string to semver if possible This aims to provide a very forgiving translation of a non-semver string to semver. It looks for the first digit in a string, and consumes all @@ -417,27 +408,5 @@ surrounding text is simply ignored (`v3.4 replaces v3.3.1` becomes is not valid). The maximum length for any semver component considered for coercion is 16 characters; longer components will be ignored (`10000000000000000.4.7.4` becomes `4.7.4`). The maximum value for any -semver component is `Integer.MAX_SAFE_INTEGER || (2**53 - 1)`; higher value +semver component is `Number.MAX_SAFE_INTEGER || (2**53 - 1)`; higher value components are invalid (`9999999999999999.4.7.4` is likely invalid). - -If the `options.rtl` flag is set, then `coerce` will return the right-most -coercible tuple that does not share an ending index with a longer coercible -tuple. For example, `1.2.3.4` will return `2.3.4` in rtl mode, not -`4.0.0`. `1.2.3/4` will return `4.0.0`, because the `4` is not a part of -any other overlapping SemVer tuple. - -### Clean - -* `clean(version)`: Clean a string to be a valid semver if possible - -This will return a cleaned and trimmed semver version. If the provided version is not valid a null will be returned. This does not work for ranges. - -ex. -* `s.clean(' = v 2.1.5foo')`: `null` -* `s.clean(' = v 2.1.5foo', { loose: true })`: `'2.1.5-foo'` -* `s.clean(' = v 2.1.5-foo')`: `null` -* `s.clean(' = v 2.1.5-foo', { loose: true })`: `'2.1.5-foo'` -* `s.clean('=v2.1.5')`: `'2.1.5'` -* `s.clean(' =v2.1.5')`: `2.1.5` -* `s.clean(' 2.1.5 ')`: `'2.1.5'` -* `s.clean('~1.0.0')`: `null` diff --git a/node_modules/semver/bin/semver.js b/node_modules/semver/bin/semver.js deleted file mode 100755 index 666034a75..000000000 --- a/node_modules/semver/bin/semver.js +++ /dev/null @@ -1,174 +0,0 @@ -#!/usr/bin/env node -// Standalone semver comparison program. -// Exits successfully and prints matching version(s) if -// any supplied version is valid and passes all tests. - -var argv = process.argv.slice(2) - -var versions = [] - -var range = [] - -var inc = null - -var version = require('../package.json').version - -var loose = false - -var includePrerelease = false - -var coerce = false - -var rtl = false - -var identifier - -var semver = require('../semver') - -var reverse = false - -var options = {} - -main() - -function main () { - if (!argv.length) return help() - while (argv.length) { - var a = argv.shift() - var indexOfEqualSign = a.indexOf('=') - if (indexOfEqualSign !== -1) { - a = a.slice(0, indexOfEqualSign) - argv.unshift(a.slice(indexOfEqualSign + 1)) - } - switch (a) { - case '-rv': case '-rev': case '--rev': case '--reverse': - reverse = true - break - case '-l': case '--loose': - loose = true - break - case '-p': case '--include-prerelease': - includePrerelease = true - break - case '-v': case '--version': - versions.push(argv.shift()) - break - case '-i': case '--inc': case '--increment': - switch (argv[0]) { - case 'major': case 'minor': case 'patch': case 'prerelease': - case 'premajor': case 'preminor': case 'prepatch': - inc = argv.shift() - break - default: - inc = 'patch' - break - } - break - case '--preid': - identifier = argv.shift() - break - case '-r': case '--range': - range.push(argv.shift()) - break - case '-c': case '--coerce': - coerce = true - break - case '--rtl': - rtl = true - break - case '--ltr': - rtl = false - break - case '-h': case '--help': case '-?': - return help() - default: - versions.push(a) - break - } - } - - var options = { loose: loose, includePrerelease: includePrerelease, rtl: rtl } - - versions = versions.map(function (v) { - return coerce ? (semver.coerce(v, options) || { version: v }).version : v - }).filter(function (v) { - return semver.valid(v) - }) - if (!versions.length) return fail() - if (inc && (versions.length !== 1 || range.length)) { return failInc() } - - for (var i = 0, l = range.length; i < l; i++) { - versions = versions.filter(function (v) { - return semver.satisfies(v, range[i], options) - }) - if (!versions.length) return fail() - } - return success(versions) -} - -function failInc () { - console.error('--inc can only be used on a single version with no range') - fail() -} - -function fail () { process.exit(1) } - -function success () { - var compare = reverse ? 'rcompare' : 'compare' - versions.sort(function (a, b) { - return semver[compare](a, b, options) - }).map(function (v) { - return semver.clean(v, options) - }).map(function (v) { - return inc ? semver.inc(v, inc, options, identifier) : v - }).forEach(function (v, i, _) { console.log(v) }) -} - -function help () { - console.log(['SemVer ' + version, - '', - 'A JavaScript implementation of the https://semver.org/ specification', - 'Copyright Isaac Z. Schlueter', - '', - 'Usage: semver [options] [ [...]]', - 'Prints valid versions sorted by SemVer precedence', - '', - 'Options:', - '-r --range ', - ' Print versions that match the specified range.', - '', - '-i --increment []', - ' Increment a version by the specified level. Level can', - ' be one of: major, minor, patch, premajor, preminor,', - " prepatch, or prerelease. Default level is 'patch'.", - ' Only one version may be specified.', - '', - '--preid ', - ' Identifier to be used to prefix premajor, preminor,', - ' prepatch or prerelease version increments.', - '', - '-l --loose', - ' Interpret versions and ranges loosely', - '', - '-p --include-prerelease', - ' Always include prerelease versions in range matching', - '', - '-c --coerce', - ' Coerce a string into SemVer if possible', - ' (does not imply --loose)', - '', - '--rtl', - ' Coerce version strings right to left', - '', - '--ltr', - ' Coerce version strings left to right (default)', - '', - 'Program exits successfully if any valid version satisfies', - 'all supplied ranges, and prints all satisfying versions.', - '', - 'If no satisfying versions are found, then exits failure.', - '', - 'Versions are printed in ascending order, so supplying', - 'multiple versions to the utility will just sort them.' - ].join('\n')) -} diff --git a/node_modules/semver/package.json b/node_modules/semver/package.json index a646bbecc..6316ff9c6 100644 --- a/node_modules/semver/package.json +++ b/node_modules/semver/package.json @@ -1,42 +1,42 @@ { - "_args": [ - [ - "semver@6.3.0", - "/Users/drew.heavner/Documents/Github/sign-android-release" - ] - ], - "_development": true, - "_from": "semver@6.3.0", - "_id": "semver@6.3.0", + "_from": "semver@^5.4.1", + "_id": "semver@5.7.1", "_inBundle": false, - "_integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", + "_integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", "_location": "/semver", "_phantomChildren": {}, "_requested": { - "type": "version", + "type": "range", "registry": true, - "raw": "semver@6.3.0", + "raw": "semver@^5.4.1", "name": "semver", "escapedName": "semver", - "rawSpec": "6.3.0", + "rawSpec": "^5.4.1", "saveSpec": null, - "fetchSpec": "6.3.0" + "fetchSpec": "^5.4.1" }, "_requiredBy": [ - "/istanbul-lib-instrument" + "/@babel/core", + "/cross-spawn", + "/make-dir", + "/node-notifier", + "/normalize-package-data" ], - "_resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", - "_spec": "6.3.0", - "_where": "/Users/drew.heavner/Documents/Github/sign-android-release", + "_resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", + "_shasum": "a954f931aeba508d307bbf069eff0c01c96116f7", + "_spec": "semver@^5.4.1", + "_where": "/Users/drew.heavner/Documents/Github/sign-android-release/node_modules/@babel/core", "bin": { - "semver": "./bin/semver.js" + "semver": "bin/semver" }, "bugs": { "url": "https://github.com/npm/node-semver/issues" }, + "bundleDependencies": false, + "deprecated": false, "description": "The semantic version parser used by npm.", "devDependencies": { - "tap": "^14.3.1" + "tap": "^13.0.0-rc.18" }, "files": [ "bin", @@ -52,7 +52,7 @@ "url": "git+https://github.com/npm/node-semver.git" }, "scripts": { - "postpublish": "git push origin --follow-tags", + "postpublish": "git push origin --all; git push origin --tags", "postversion": "npm publish", "preversion": "npm test", "test": "tap" @@ -60,5 +60,5 @@ "tap": { "check-coverage": true }, - "version": "6.3.0" + "version": "5.7.1" } diff --git a/node_modules/semver/semver.js b/node_modules/semver/semver.js index 636fa4365..d315d5d68 100644 --- a/node_modules/semver/semver.js +++ b/node_modules/semver/semver.js @@ -29,80 +29,75 @@ var MAX_SAFE_COMPONENT_LENGTH = 16 // The actual regexps go on exports.re var re = exports.re = [] var src = exports.src = [] -var t = exports.tokens = {} var R = 0 -function tok (n) { - t[n] = R++ -} - // The following Regular Expressions can be used for tokenizing, // validating, and parsing SemVer version strings. // ## Numeric Identifier // A single `0`, or a non-zero digit followed by zero or more digits. -tok('NUMERICIDENTIFIER') -src[t.NUMERICIDENTIFIER] = '0|[1-9]\\d*' -tok('NUMERICIDENTIFIERLOOSE') -src[t.NUMERICIDENTIFIERLOOSE] = '[0-9]+' +var NUMERICIDENTIFIER = R++ +src[NUMERICIDENTIFIER] = '0|[1-9]\\d*' +var NUMERICIDENTIFIERLOOSE = R++ +src[NUMERICIDENTIFIERLOOSE] = '[0-9]+' // ## Non-numeric Identifier // Zero or more digits, followed by a letter or hyphen, and then zero or // more letters, digits, or hyphens. -tok('NONNUMERICIDENTIFIER') -src[t.NONNUMERICIDENTIFIER] = '\\d*[a-zA-Z-][a-zA-Z0-9-]*' +var NONNUMERICIDENTIFIER = R++ +src[NONNUMERICIDENTIFIER] = '\\d*[a-zA-Z-][a-zA-Z0-9-]*' // ## Main Version // Three dot-separated numeric identifiers. -tok('MAINVERSION') -src[t.MAINVERSION] = '(' + src[t.NUMERICIDENTIFIER] + ')\\.' + - '(' + src[t.NUMERICIDENTIFIER] + ')\\.' + - '(' + src[t.NUMERICIDENTIFIER] + ')' +var MAINVERSION = R++ +src[MAINVERSION] = '(' + src[NUMERICIDENTIFIER] + ')\\.' + + '(' + src[NUMERICIDENTIFIER] + ')\\.' + + '(' + src[NUMERICIDENTIFIER] + ')' -tok('MAINVERSIONLOOSE') -src[t.MAINVERSIONLOOSE] = '(' + src[t.NUMERICIDENTIFIERLOOSE] + ')\\.' + - '(' + src[t.NUMERICIDENTIFIERLOOSE] + ')\\.' + - '(' + src[t.NUMERICIDENTIFIERLOOSE] + ')' +var MAINVERSIONLOOSE = R++ +src[MAINVERSIONLOOSE] = '(' + src[NUMERICIDENTIFIERLOOSE] + ')\\.' + + '(' + src[NUMERICIDENTIFIERLOOSE] + ')\\.' + + '(' + src[NUMERICIDENTIFIERLOOSE] + ')' // ## Pre-release Version Identifier // A numeric identifier, or a non-numeric identifier. -tok('PRERELEASEIDENTIFIER') -src[t.PRERELEASEIDENTIFIER] = '(?:' + src[t.NUMERICIDENTIFIER] + - '|' + src[t.NONNUMERICIDENTIFIER] + ')' +var PRERELEASEIDENTIFIER = R++ +src[PRERELEASEIDENTIFIER] = '(?:' + src[NUMERICIDENTIFIER] + + '|' + src[NONNUMERICIDENTIFIER] + ')' -tok('PRERELEASEIDENTIFIERLOOSE') -src[t.PRERELEASEIDENTIFIERLOOSE] = '(?:' + src[t.NUMERICIDENTIFIERLOOSE] + - '|' + src[t.NONNUMERICIDENTIFIER] + ')' +var PRERELEASEIDENTIFIERLOOSE = R++ +src[PRERELEASEIDENTIFIERLOOSE] = '(?:' + src[NUMERICIDENTIFIERLOOSE] + + '|' + src[NONNUMERICIDENTIFIER] + ')' // ## Pre-release Version // Hyphen, followed by one or more dot-separated pre-release version // identifiers. -tok('PRERELEASE') -src[t.PRERELEASE] = '(?:-(' + src[t.PRERELEASEIDENTIFIER] + - '(?:\\.' + src[t.PRERELEASEIDENTIFIER] + ')*))' +var PRERELEASE = R++ +src[PRERELEASE] = '(?:-(' + src[PRERELEASEIDENTIFIER] + + '(?:\\.' + src[PRERELEASEIDENTIFIER] + ')*))' -tok('PRERELEASELOOSE') -src[t.PRERELEASELOOSE] = '(?:-?(' + src[t.PRERELEASEIDENTIFIERLOOSE] + - '(?:\\.' + src[t.PRERELEASEIDENTIFIERLOOSE] + ')*))' +var PRERELEASELOOSE = R++ +src[PRERELEASELOOSE] = '(?:-?(' + src[PRERELEASEIDENTIFIERLOOSE] + + '(?:\\.' + src[PRERELEASEIDENTIFIERLOOSE] + ')*))' // ## Build Metadata Identifier // Any combination of digits, letters, or hyphens. -tok('BUILDIDENTIFIER') -src[t.BUILDIDENTIFIER] = '[0-9A-Za-z-]+' +var BUILDIDENTIFIER = R++ +src[BUILDIDENTIFIER] = '[0-9A-Za-z-]+' // ## Build Metadata // Plus sign, followed by one or more period-separated build metadata // identifiers. -tok('BUILD') -src[t.BUILD] = '(?:\\+(' + src[t.BUILDIDENTIFIER] + - '(?:\\.' + src[t.BUILDIDENTIFIER] + ')*))' +var BUILD = R++ +src[BUILD] = '(?:\\+(' + src[BUILDIDENTIFIER] + + '(?:\\.' + src[BUILDIDENTIFIER] + ')*))' // ## Full Version String // A main version, followed optionally by a pre-release version and @@ -113,133 +108,129 @@ src[t.BUILD] = '(?:\\+(' + src[t.BUILDIDENTIFIER] + // capturing group, because it should not ever be used in version // comparison. -tok('FULL') -tok('FULLPLAIN') -src[t.FULLPLAIN] = 'v?' + src[t.MAINVERSION] + - src[t.PRERELEASE] + '?' + - src[t.BUILD] + '?' +var FULL = R++ +var FULLPLAIN = 'v?' + src[MAINVERSION] + + src[PRERELEASE] + '?' + + src[BUILD] + '?' -src[t.FULL] = '^' + src[t.FULLPLAIN] + '$' +src[FULL] = '^' + FULLPLAIN + '$' // like full, but allows v1.2.3 and =1.2.3, which people do sometimes. // also, 1.0.0alpha1 (prerelease without the hyphen) which is pretty // common in the npm registry. -tok('LOOSEPLAIN') -src[t.LOOSEPLAIN] = '[v=\\s]*' + src[t.MAINVERSIONLOOSE] + - src[t.PRERELEASELOOSE] + '?' + - src[t.BUILD] + '?' +var LOOSEPLAIN = '[v=\\s]*' + src[MAINVERSIONLOOSE] + + src[PRERELEASELOOSE] + '?' + + src[BUILD] + '?' -tok('LOOSE') -src[t.LOOSE] = '^' + src[t.LOOSEPLAIN] + '$' +var LOOSE = R++ +src[LOOSE] = '^' + LOOSEPLAIN + '$' -tok('GTLT') -src[t.GTLT] = '((?:<|>)?=?)' +var GTLT = R++ +src[GTLT] = '((?:<|>)?=?)' // Something like "2.*" or "1.2.x". // Note that "x.x" is a valid xRange identifer, meaning "any version" // Only the first item is strictly required. -tok('XRANGEIDENTIFIERLOOSE') -src[t.XRANGEIDENTIFIERLOOSE] = src[t.NUMERICIDENTIFIERLOOSE] + '|x|X|\\*' -tok('XRANGEIDENTIFIER') -src[t.XRANGEIDENTIFIER] = src[t.NUMERICIDENTIFIER] + '|x|X|\\*' - -tok('XRANGEPLAIN') -src[t.XRANGEPLAIN] = '[v=\\s]*(' + src[t.XRANGEIDENTIFIER] + ')' + - '(?:\\.(' + src[t.XRANGEIDENTIFIER] + ')' + - '(?:\\.(' + src[t.XRANGEIDENTIFIER] + ')' + - '(?:' + src[t.PRERELEASE] + ')?' + - src[t.BUILD] + '?' + +var XRANGEIDENTIFIERLOOSE = R++ +src[XRANGEIDENTIFIERLOOSE] = src[NUMERICIDENTIFIERLOOSE] + '|x|X|\\*' +var XRANGEIDENTIFIER = R++ +src[XRANGEIDENTIFIER] = src[NUMERICIDENTIFIER] + '|x|X|\\*' + +var XRANGEPLAIN = R++ +src[XRANGEPLAIN] = '[v=\\s]*(' + src[XRANGEIDENTIFIER] + ')' + + '(?:\\.(' + src[XRANGEIDENTIFIER] + ')' + + '(?:\\.(' + src[XRANGEIDENTIFIER] + ')' + + '(?:' + src[PRERELEASE] + ')?' + + src[BUILD] + '?' + ')?)?' -tok('XRANGEPLAINLOOSE') -src[t.XRANGEPLAINLOOSE] = '[v=\\s]*(' + src[t.XRANGEIDENTIFIERLOOSE] + ')' + - '(?:\\.(' + src[t.XRANGEIDENTIFIERLOOSE] + ')' + - '(?:\\.(' + src[t.XRANGEIDENTIFIERLOOSE] + ')' + - '(?:' + src[t.PRERELEASELOOSE] + ')?' + - src[t.BUILD] + '?' + +var XRANGEPLAINLOOSE = R++ +src[XRANGEPLAINLOOSE] = '[v=\\s]*(' + src[XRANGEIDENTIFIERLOOSE] + ')' + + '(?:\\.(' + src[XRANGEIDENTIFIERLOOSE] + ')' + + '(?:\\.(' + src[XRANGEIDENTIFIERLOOSE] + ')' + + '(?:' + src[PRERELEASELOOSE] + ')?' + + src[BUILD] + '?' + ')?)?' -tok('XRANGE') -src[t.XRANGE] = '^' + src[t.GTLT] + '\\s*' + src[t.XRANGEPLAIN] + '$' -tok('XRANGELOOSE') -src[t.XRANGELOOSE] = '^' + src[t.GTLT] + '\\s*' + src[t.XRANGEPLAINLOOSE] + '$' +var XRANGE = R++ +src[XRANGE] = '^' + src[GTLT] + '\\s*' + src[XRANGEPLAIN] + '$' +var XRANGELOOSE = R++ +src[XRANGELOOSE] = '^' + src[GTLT] + '\\s*' + src[XRANGEPLAINLOOSE] + '$' // Coercion. // Extract anything that could conceivably be a part of a valid semver -tok('COERCE') -src[t.COERCE] = '(^|[^\\d])' + +var COERCE = R++ +src[COERCE] = '(?:^|[^\\d])' + '(\\d{1,' + MAX_SAFE_COMPONENT_LENGTH + '})' + '(?:\\.(\\d{1,' + MAX_SAFE_COMPONENT_LENGTH + '}))?' + '(?:\\.(\\d{1,' + MAX_SAFE_COMPONENT_LENGTH + '}))?' + '(?:$|[^\\d])' -tok('COERCERTL') -re[t.COERCERTL] = new RegExp(src[t.COERCE], 'g') // Tilde ranges. // Meaning is "reasonably at or greater than" -tok('LONETILDE') -src[t.LONETILDE] = '(?:~>?)' +var LONETILDE = R++ +src[LONETILDE] = '(?:~>?)' -tok('TILDETRIM') -src[t.TILDETRIM] = '(\\s*)' + src[t.LONETILDE] + '\\s+' -re[t.TILDETRIM] = new RegExp(src[t.TILDETRIM], 'g') +var TILDETRIM = R++ +src[TILDETRIM] = '(\\s*)' + src[LONETILDE] + '\\s+' +re[TILDETRIM] = new RegExp(src[TILDETRIM], 'g') var tildeTrimReplace = '$1~' -tok('TILDE') -src[t.TILDE] = '^' + src[t.LONETILDE] + src[t.XRANGEPLAIN] + '$' -tok('TILDELOOSE') -src[t.TILDELOOSE] = '^' + src[t.LONETILDE] + src[t.XRANGEPLAINLOOSE] + '$' +var TILDE = R++ +src[TILDE] = '^' + src[LONETILDE] + src[XRANGEPLAIN] + '$' +var TILDELOOSE = R++ +src[TILDELOOSE] = '^' + src[LONETILDE] + src[XRANGEPLAINLOOSE] + '$' // Caret ranges. // Meaning is "at least and backwards compatible with" -tok('LONECARET') -src[t.LONECARET] = '(?:\\^)' +var LONECARET = R++ +src[LONECARET] = '(?:\\^)' -tok('CARETTRIM') -src[t.CARETTRIM] = '(\\s*)' + src[t.LONECARET] + '\\s+' -re[t.CARETTRIM] = new RegExp(src[t.CARETTRIM], 'g') +var CARETTRIM = R++ +src[CARETTRIM] = '(\\s*)' + src[LONECARET] + '\\s+' +re[CARETTRIM] = new RegExp(src[CARETTRIM], 'g') var caretTrimReplace = '$1^' -tok('CARET') -src[t.CARET] = '^' + src[t.LONECARET] + src[t.XRANGEPLAIN] + '$' -tok('CARETLOOSE') -src[t.CARETLOOSE] = '^' + src[t.LONECARET] + src[t.XRANGEPLAINLOOSE] + '$' +var CARET = R++ +src[CARET] = '^' + src[LONECARET] + src[XRANGEPLAIN] + '$' +var CARETLOOSE = R++ +src[CARETLOOSE] = '^' + src[LONECARET] + src[XRANGEPLAINLOOSE] + '$' // A simple gt/lt/eq thing, or just "" to indicate "any version" -tok('COMPARATORLOOSE') -src[t.COMPARATORLOOSE] = '^' + src[t.GTLT] + '\\s*(' + src[t.LOOSEPLAIN] + ')$|^$' -tok('COMPARATOR') -src[t.COMPARATOR] = '^' + src[t.GTLT] + '\\s*(' + src[t.FULLPLAIN] + ')$|^$' +var COMPARATORLOOSE = R++ +src[COMPARATORLOOSE] = '^' + src[GTLT] + '\\s*(' + LOOSEPLAIN + ')$|^$' +var COMPARATOR = R++ +src[COMPARATOR] = '^' + src[GTLT] + '\\s*(' + FULLPLAIN + ')$|^$' // An expression to strip any whitespace between the gtlt and the thing // it modifies, so that `> 1.2.3` ==> `>1.2.3` -tok('COMPARATORTRIM') -src[t.COMPARATORTRIM] = '(\\s*)' + src[t.GTLT] + - '\\s*(' + src[t.LOOSEPLAIN] + '|' + src[t.XRANGEPLAIN] + ')' +var COMPARATORTRIM = R++ +src[COMPARATORTRIM] = '(\\s*)' + src[GTLT] + + '\\s*(' + LOOSEPLAIN + '|' + src[XRANGEPLAIN] + ')' // this one has to use the /g flag -re[t.COMPARATORTRIM] = new RegExp(src[t.COMPARATORTRIM], 'g') +re[COMPARATORTRIM] = new RegExp(src[COMPARATORTRIM], 'g') var comparatorTrimReplace = '$1$2$3' // Something like `1.2.3 - 1.2.4` // Note that these all use the loose form, because they'll be // checked against either the strict or loose comparator form // later. -tok('HYPHENRANGE') -src[t.HYPHENRANGE] = '^\\s*(' + src[t.XRANGEPLAIN] + ')' + +var HYPHENRANGE = R++ +src[HYPHENRANGE] = '^\\s*(' + src[XRANGEPLAIN] + ')' + '\\s+-\\s+' + - '(' + src[t.XRANGEPLAIN] + ')' + + '(' + src[XRANGEPLAIN] + ')' + '\\s*$' -tok('HYPHENRANGELOOSE') -src[t.HYPHENRANGELOOSE] = '^\\s*(' + src[t.XRANGEPLAINLOOSE] + ')' + +var HYPHENRANGELOOSE = R++ +src[HYPHENRANGELOOSE] = '^\\s*(' + src[XRANGEPLAINLOOSE] + ')' + '\\s+-\\s+' + - '(' + src[t.XRANGEPLAINLOOSE] + ')' + + '(' + src[XRANGEPLAINLOOSE] + ')' + '\\s*$' // Star ranges basically just allow anything at all. -tok('STAR') -src[t.STAR] = '(<|>)?=?\\s*\\*' +var STAR = R++ +src[STAR] = '(<|>)?=?\\s*\\*' // Compile to actual regexp objects. // All are flag-free, unless they were created above with a flag. @@ -271,7 +262,7 @@ function parse (version, options) { return null } - var r = options.loose ? re[t.LOOSE] : re[t.FULL] + var r = options.loose ? re[LOOSE] : re[FULL] if (!r.test(version)) { return null } @@ -326,7 +317,7 @@ function SemVer (version, options) { this.options = options this.loose = !!options.loose - var m = version.trim().match(options.loose ? re[t.LOOSE] : re[t.FULL]) + var m = version.trim().match(options.loose ? re[LOOSE] : re[FULL]) if (!m) { throw new TypeError('Invalid Version: ' + version) @@ -434,30 +425,6 @@ SemVer.prototype.comparePre = function (other) { } while (++i) } -SemVer.prototype.compareBuild = function (other) { - if (!(other instanceof SemVer)) { - other = new SemVer(other, this.options) - } - - var i = 0 - do { - var a = this.build[i] - var b = other.build[i] - debug('prerelease compare', i, a, b) - if (a === undefined && b === undefined) { - return 0 - } else if (b === undefined) { - return 1 - } else if (a === undefined) { - return -1 - } else if (a === b) { - continue - } else { - return compareIdentifiers(a, b) - } - } while (++i) -} - // preminor will bump the version up to the next minor release, and immediately // down to pre-release. premajor and prepatch work the same way. SemVer.prototype.inc = function (release, identifier) { @@ -652,13 +619,6 @@ function compareLoose (a, b) { return compare(a, b, true) } -exports.compareBuild = compareBuild -function compareBuild (a, b, loose) { - var versionA = new SemVer(a, loose) - var versionB = new SemVer(b, loose) - return versionA.compare(versionB) || versionA.compareBuild(versionB) -} - exports.rcompare = rcompare function rcompare (a, b, loose) { return compare(b, a, loose) @@ -667,14 +627,14 @@ function rcompare (a, b, loose) { exports.sort = sort function sort (list, loose) { return list.sort(function (a, b) { - return exports.compareBuild(a, b, loose) + return exports.compare(a, b, loose) }) } exports.rsort = rsort function rsort (list, loose) { return list.sort(function (a, b) { - return exports.compareBuild(b, a, loose) + return exports.rcompare(a, b, loose) }) } @@ -787,14 +747,14 @@ function Comparator (comp, options) { var ANY = {} Comparator.prototype.parse = function (comp) { - var r = this.options.loose ? re[t.COMPARATORLOOSE] : re[t.COMPARATOR] + var r = this.options.loose ? re[COMPARATORLOOSE] : re[COMPARATOR] var m = comp.match(r) if (!m) { throw new TypeError('Invalid comparator: ' + comp) } - this.operator = m[1] !== undefined ? m[1] : '' + this.operator = m[1] if (this.operator === '=') { this.operator = '' } @@ -814,16 +774,12 @@ Comparator.prototype.toString = function () { Comparator.prototype.test = function (version) { debug('Comparator.test', version, this.options.loose) - if (this.semver === ANY || version === ANY) { + if (this.semver === ANY) { return true } if (typeof version === 'string') { - try { - version = new SemVer(version, this.options) - } catch (er) { - return false - } + version = new SemVer(version, this.options) } return cmp(version, this.operator, this.semver, this.options) @@ -844,15 +800,9 @@ Comparator.prototype.intersects = function (comp, options) { var rangeTmp if (this.operator === '') { - if (this.value === '') { - return true - } rangeTmp = new Range(comp.value, options) return satisfies(this.value, rangeTmp, options) } else if (comp.operator === '') { - if (comp.value === '') { - return true - } rangeTmp = new Range(this.value, options) return satisfies(comp.semver, rangeTmp, options) } @@ -942,18 +892,18 @@ Range.prototype.parseRange = function (range) { var loose = this.options.loose range = range.trim() // `1.2.3 - 1.2.4` => `>=1.2.3 <=1.2.4` - var hr = loose ? re[t.HYPHENRANGELOOSE] : re[t.HYPHENRANGE] + var hr = loose ? re[HYPHENRANGELOOSE] : re[HYPHENRANGE] range = range.replace(hr, hyphenReplace) debug('hyphen replace', range) // `> 1.2.3 < 1.2.5` => `>1.2.3 <1.2.5` - range = range.replace(re[t.COMPARATORTRIM], comparatorTrimReplace) - debug('comparator trim', range, re[t.COMPARATORTRIM]) + range = range.replace(re[COMPARATORTRIM], comparatorTrimReplace) + debug('comparator trim', range, re[COMPARATORTRIM]) // `~ 1.2.3` => `~1.2.3` - range = range.replace(re[t.TILDETRIM], tildeTrimReplace) + range = range.replace(re[TILDETRIM], tildeTrimReplace) // `^ 1.2.3` => `^1.2.3` - range = range.replace(re[t.CARETTRIM], caretTrimReplace) + range = range.replace(re[CARETTRIM], caretTrimReplace) // normalize spaces range = range.split(/\s+/).join(' ') @@ -961,7 +911,7 @@ Range.prototype.parseRange = function (range) { // At this point, the range is completely trimmed and // ready to be split into comparators. - var compRe = loose ? re[t.COMPARATORLOOSE] : re[t.COMPARATOR] + var compRe = loose ? re[COMPARATORLOOSE] : re[COMPARATOR] var set = range.split(' ').map(function (comp) { return parseComparator(comp, this.options) }, this).join(' ').split(/\s+/) @@ -984,38 +934,14 @@ Range.prototype.intersects = function (range, options) { } return this.set.some(function (thisComparators) { - return ( - isSatisfiable(thisComparators, options) && - range.set.some(function (rangeComparators) { - return ( - isSatisfiable(rangeComparators, options) && - thisComparators.every(function (thisComparator) { - return rangeComparators.every(function (rangeComparator) { - return thisComparator.intersects(rangeComparator, options) - }) - }) - ) + return thisComparators.every(function (thisComparator) { + return range.set.some(function (rangeComparators) { + return rangeComparators.every(function (rangeComparator) { + return thisComparator.intersects(rangeComparator, options) + }) }) - ) - }) -} - -// take a set of comparators and determine whether there -// exists a version which can satisfy it -function isSatisfiable (comparators, options) { - var result = true - var remainingComparators = comparators.slice() - var testComparator = remainingComparators.pop() - - while (result && remainingComparators.length) { - result = remainingComparators.every(function (otherComparator) { - return testComparator.intersects(otherComparator, options) }) - - testComparator = remainingComparators.pop() - } - - return result + }) } // Mostly just for testing and legacy API reasons @@ -1061,7 +987,7 @@ function replaceTildes (comp, options) { } function replaceTilde (comp, options) { - var r = options.loose ? re[t.TILDELOOSE] : re[t.TILDE] + var r = options.loose ? re[TILDELOOSE] : re[TILDE] return comp.replace(r, function (_, M, m, p, pr) { debug('tilde', comp, _, M, m, p, pr) var ret @@ -1102,7 +1028,7 @@ function replaceCarets (comp, options) { function replaceCaret (comp, options) { debug('caret', comp, options) - var r = options.loose ? re[t.CARETLOOSE] : re[t.CARET] + var r = options.loose ? re[CARETLOOSE] : re[CARET] return comp.replace(r, function (_, M, m, p, pr) { debug('caret', comp, _, M, m, p, pr) var ret @@ -1161,7 +1087,7 @@ function replaceXRanges (comp, options) { function replaceXRange (comp, options) { comp = comp.trim() - var r = options.loose ? re[t.XRANGELOOSE] : re[t.XRANGE] + var r = options.loose ? re[XRANGELOOSE] : re[XRANGE] return comp.replace(r, function (ret, gtlt, M, m, p, pr) { debug('xRange', comp, ret, gtlt, M, m, p, pr) var xM = isX(M) @@ -1173,14 +1099,10 @@ function replaceXRange (comp, options) { gtlt = '' } - // if we're including prereleases in the match, then we need - // to fix this to -0, the lowest possible prerelease value - pr = options.includePrerelease ? '-0' : '' - if (xM) { if (gtlt === '>' || gtlt === '<') { // nothing is allowed - ret = '<0.0.0-0' + ret = '<0.0.0' } else { // nothing is forbidden ret = '*' @@ -1217,12 +1139,11 @@ function replaceXRange (comp, options) { } } - ret = gtlt + M + '.' + m + '.' + p + pr + ret = gtlt + M + '.' + m + '.' + p } else if (xm) { - ret = '>=' + M + '.0.0' + pr + ' <' + (+M + 1) + '.0.0' + pr + ret = '>=' + M + '.0.0 <' + (+M + 1) + '.0.0' } else if (xp) { - ret = '>=' + M + '.' + m + '.0' + pr + - ' <' + M + '.' + (+m + 1) + '.0' + pr + ret = '>=' + M + '.' + m + '.0 <' + M + '.' + (+m + 1) + '.0' } debug('xRange return', ret) @@ -1236,10 +1157,10 @@ function replaceXRange (comp, options) { function replaceStars (comp, options) { debug('replaceStars', comp, options) // Looseness is ignored here. star is always as loose as it gets! - return comp.trim().replace(re[t.STAR], '') + return comp.trim().replace(re[STAR], '') } -// This function is passed to string.replace(re[t.HYPHENRANGE]) +// This function is passed to string.replace(re[HYPHENRANGE]) // M, m, patch, prerelease, build // 1.2 - 3.4.5 => >=1.2.0 <=3.4.5 // 1.2.3 - 3.4 => >=1.2.0 <3.5.0 Any 3.4.x will do @@ -1279,11 +1200,7 @@ Range.prototype.test = function (version) { } if (typeof version === 'string') { - try { - version = new SemVer(version, this.options) - } catch (er) { - return false - } + version = new SemVer(version, this.options) } for (var i = 0; i < this.set.length; i++) { @@ -1545,52 +1462,22 @@ function intersects (r1, r2, options) { } exports.coerce = coerce -function coerce (version, options) { +function coerce (version) { if (version instanceof SemVer) { return version } - if (typeof version === 'number') { - version = String(version) - } - if (typeof version !== 'string') { return null } - options = options || {} - - var match = null - if (!options.rtl) { - match = version.match(re[t.COERCE]) - } else { - // Find the right-most coercible string that does not share - // a terminus with a more left-ward coercible string. - // Eg, '1.2.3.4' wants to coerce '2.3.4', not '3.4' or '4' - // - // Walk through the string checking with a /g regexp - // Manually set the index so as to pick up overlapping matches. - // Stop when we get a match that ends at the string end, since no - // coercible string can be more right-ward without the same terminus. - var next - while ((next = re[t.COERCERTL].exec(version)) && - (!match || match.index + match[0].length !== version.length) - ) { - if (!match || - next.index + next[0].length !== match.index + match[0].length) { - match = next - } - re[t.COERCERTL].lastIndex = next.index + next[1].length + next[2].length - } - // leave it in a clean state - re[t.COERCERTL].lastIndex = -1 - } + var match = version.match(re[COERCE]) - if (match === null) { + if (match == null) { return null } - return parse(match[2] + - '.' + (match[3] || '0') + - '.' + (match[4] || '0'), options) + return parse(match[1] + + '.' + (match[2] || '0') + + '.' + (match[3] || '0')) } diff --git a/node_modules/signal-exit/CHANGELOG.md b/node_modules/signal-exit/CHANGELOG.md index e2f70d225..ed104f41b 100644 --- a/node_modules/signal-exit/CHANGELOG.md +++ b/node_modules/signal-exit/CHANGELOG.md @@ -1,7 +1,15 @@ -# Change Log +# Changelog All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines. +### [3.0.3](https://github.com/tapjs/signal-exit/compare/v3.0.2...v3.0.3) (2020-03-26) + + +### Bug Fixes + +* patch `SIGHUP` to `SIGINT` when on Windows ([cfd1046](https://github.com/tapjs/signal-exit/commit/cfd1046079af4f0e44f93c69c237a09de8c23ef2)) +* **ci:** use Travis for Windows builds ([007add7](https://github.com/tapjs/signal-exit/commit/007add793d2b5ae3c382512103adbf321768a0b8)) + ## [3.0.1](https://github.com/tapjs/signal-exit/compare/v3.0.0...v3.0.1) (2016-09-08) diff --git a/node_modules/signal-exit/README.md b/node_modules/signal-exit/README.md index 8ebccabec..9f8eb5917 100644 --- a/node_modules/signal-exit/README.md +++ b/node_modules/signal-exit/README.md @@ -3,7 +3,6 @@ [![Build Status](https://travis-ci.org/tapjs/signal-exit.png)](https://travis-ci.org/tapjs/signal-exit) [![Coverage](https://coveralls.io/repos/tapjs/signal-exit/badge.svg?branch=master)](https://coveralls.io/r/tapjs/signal-exit?branch=master) [![NPM version](https://img.shields.io/npm/v/signal-exit.svg)](https://www.npmjs.com/package/signal-exit) -[![Windows Tests](https://img.shields.io/appveyor/ci/bcoe/signal-exit/master.svg?label=Windows%20Tests)](https://ci.appveyor.com/project/bcoe/signal-exit) [![Standard Version](https://img.shields.io/badge/release-standard%20version-brightgreen.svg)](https://github.com/conventional-changelog/standard-version) When you want to fire an event no matter how a process exits: diff --git a/node_modules/signal-exit/index.js b/node_modules/signal-exit/index.js index 337f691ed..6b6c43aca 100644 --- a/node_modules/signal-exit/index.js +++ b/node_modules/signal-exit/index.js @@ -3,6 +3,7 @@ // ignored, since we can never get coverage for them. var assert = require('assert') var signals = require('./signals.js') +var isWin = /^win/i.test(process.platform) var EE = require('events') /* istanbul ignore if */ @@ -92,6 +93,11 @@ signals.forEach(function (sig) { /* istanbul ignore next */ emit('afterexit', null, sig) /* istanbul ignore next */ + if (isWin && sig === 'SIGHUP') { + // "SIGHUP" throws an `ENOSYS` error on Windows, + // so use a supported signal instead + sig = 'SIGINT' + } process.kill(process.pid, sig) } } diff --git a/node_modules/signal-exit/package.json b/node_modules/signal-exit/package.json index 1b7acf010..1fadda64d 100644 --- a/node_modules/signal-exit/package.json +++ b/node_modules/signal-exit/package.json @@ -1,34 +1,28 @@ { - "_args": [ - [ - "signal-exit@3.0.2", - "/Users/drew.heavner/Documents/Github/sign-android-release" - ] - ], - "_development": true, - "_from": "signal-exit@3.0.2", - "_id": "signal-exit@3.0.2", + "_from": "signal-exit@^3.0.0", + "_id": "signal-exit@3.0.3", "_inBundle": false, - "_integrity": "sha1-tf3AjxKH6hF4Yo5BXiUTK3NkbG0=", + "_integrity": "sha512-VUJ49FC8U1OxwZLxIbTTrDvLnf/6TDgxZcK8wxR8zs13xpx7xbG60ndBlhNrFi2EMuFRoeDoJO7wthSLq42EjA==", "_location": "/signal-exit", "_phantomChildren": {}, "_requested": { - "type": "version", + "type": "range", "registry": true, - "raw": "signal-exit@3.0.2", + "raw": "signal-exit@^3.0.0", "name": "signal-exit", "escapedName": "signal-exit", - "rawSpec": "3.0.2", + "rawSpec": "^3.0.0", "saveSpec": null, - "fetchSpec": "3.0.2" + "fetchSpec": "^3.0.0" }, "_requiredBy": [ "/execa", "/write-file-atomic" ], - "_resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.2.tgz", - "_spec": "3.0.2", - "_where": "/Users/drew.heavner/Documents/Github/sign-android-release", + "_resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.3.tgz", + "_shasum": "a1410c2edd8f077b08b4e253c8eacfcaf057461c", + "_spec": "signal-exit@^3.0.0", + "_where": "/Users/drew.heavner/Documents/Github/sign-android-release/node_modules/execa", "author": { "name": "Ben Coe", "email": "ben@npmjs.com" @@ -36,12 +30,14 @@ "bugs": { "url": "https://github.com/tapjs/signal-exit/issues" }, + "bundleDependencies": false, + "deprecated": false, "description": "when you want to fire an event no matter how a process exits.", "devDependencies": { "chai": "^3.5.0", "coveralls": "^2.11.10", "nyc": "^8.1.0", - "standard": "^7.1.2", + "standard": "^8.1.0", "standard-version": "^2.3.0", "tap": "^8.0.1" }, @@ -67,5 +63,5 @@ "release": "standard-version", "test": "tap --timeout=240 ./test/*.js --cov" }, - "version": "3.0.2" + "version": "3.0.3" } diff --git a/node_modules/sisteransi/package.json b/node_modules/sisteransi/package.json index 8c03f307c..2d4a2741f 100755 --- a/node_modules/sisteransi/package.json +++ b/node_modules/sisteransi/package.json @@ -1,33 +1,27 @@ { - "_args": [ - [ - "sisteransi@1.0.2", - "/Users/drew.heavner/Documents/Github/sign-android-release" - ] - ], - "_development": true, - "_from": "sisteransi@1.0.2", - "_id": "sisteransi@1.0.2", + "_from": "sisteransi@^1.0.5", + "_id": "sisteransi@1.0.5", "_inBundle": false, - "_integrity": "sha512-ZcYcZcT69nSLAR2oLN2JwNmLkJEKGooFMCdvOkFrToUt/WfcRWqhIg4P4KwY4dmLbuyXIx4o4YmPsvMRJYJd/w==", + "_integrity": "sha512-bLGGlR1QxBcynn2d5YmDX4MGjlZvy2MRBDRNHLJ8VI6l6+9FUiyTFNJ0IveOSP0bcXgVDPRcfGqA0pjaqUpfVg==", "_location": "/sisteransi", "_phantomChildren": {}, "_requested": { - "type": "version", + "type": "range", "registry": true, - "raw": "sisteransi@1.0.2", + "raw": "sisteransi@^1.0.5", "name": "sisteransi", "escapedName": "sisteransi", - "rawSpec": "1.0.2", + "rawSpec": "^1.0.5", "saveSpec": null, - "fetchSpec": "1.0.2" + "fetchSpec": "^1.0.5" }, "_requiredBy": [ - "/prompts" + "/jest/jest-cli/prompts" ], - "_resolved": "https://registry.npmjs.org/sisteransi/-/sisteransi-1.0.2.tgz", - "_spec": "1.0.2", - "_where": "/Users/drew.heavner/Documents/Github/sign-android-release", + "_resolved": "https://registry.npmjs.org/sisteransi/-/sisteransi-1.0.5.tgz", + "_shasum": "134d681297756437cc05ca01370d3a7a571075ed", + "_spec": "sisteransi@^1.0.5", + "_where": "/Users/drew.heavner/Documents/Github/sign-android-release/node_modules/jest/node_modules/jest-cli/node_modules/prompts", "author": { "name": "Terkel Gjervig", "email": "terkel@terkel.com", @@ -36,10 +30,12 @@ "bugs": { "url": "https://github.com/terkelg/sisteransi/issues" }, + "bundleDependencies": false, + "deprecated": false, "description": "ANSI escape codes for some terminal swag", "devDependencies": { "tap-spec": "^5.0.0", - "tape": "^4.9.0" + "tape": "^4.13.2" }, "files": [ "src" @@ -63,5 +59,5 @@ "test": "tape test/*.js | tap-spec" }, "types": "./src/sisteransi.d.ts", - "version": "1.0.2" + "version": "1.0.5" } diff --git a/node_modules/sisteransi/src/sisteransi.d.ts b/node_modules/sisteransi/src/sisteransi.d.ts index d20759d6e..113da2f6b 100644 --- a/node_modules/sisteransi/src/sisteransi.d.ts +++ b/node_modules/sisteransi/src/sisteransi.d.ts @@ -8,19 +8,19 @@ export namespace cursor { export const save: string; export const restore: string; - export function to(x: number, y: number): string; + export function to(x: number, y?: number): string; export function move(x: number, y: number): string; - export function up(count: number): string; - export function down(count: number): string; - export function forward(count: number): string; - export function backward(count: number): string; - export function nextLine(count: number): string; - export function prevLine(count: number): string; + export function up(count?: number): string; + export function down(count?: number): string; + export function forward(count?: number): string; + export function backward(count?: number): string; + export function nextLine(count?: number): string; + export function prevLine(count?: number): string; } export namespace scroll { - export function up(count: number): string; - export function down(count: number): string; + export function up(count?: number): string; + export function down(count?: number): string; } export namespace erase { @@ -29,7 +29,7 @@ export namespace erase { export const lineEnd: string; export const lineStart: string; - export function up(count: number): string; - export function down(count: number): string; + export function up(count?: number): string; + export function down(count?: number): string; export function lines(count: number): string; } diff --git a/node_modules/source-map-support/browser-source-map-support.js b/node_modules/source-map-support/browser-source-map-support.js index 3c44ab2f1..37ac1882f 100644 --- a/node_modules/source-map-support/browser-source-map-support.js +++ b/node_modules/source-map-support/browser-source-map-support.js @@ -8,63 +8,63 @@ @author Feross Aboukhadijeh license MIT */ -(this.define||function(G,J){this.sourceMapSupport=J()})("browser-source-map-support",function(G){(function b(n,u,m){function e(d,a){if(!u[d]){if(!n[d]){var l="function"==typeof require&&require;if(!a&&l)return l(d,!0);if(g)return g(d,!0);throw Error("Cannot find module '"+d+"'");}l=u[d]={exports:{}};n[d][0].call(l.exports,function(a){var b=n[d][1][a];return e(b?b:a)},l,l.exports,b,n,u,m)}return u[d].exports}for(var g="function"==typeof require&&require,h=0;hb)return-1;if(58>b)return b-48+52;if(91>b)return b-65;if(123>b)return b-97+26}var g="undefined"!==typeof Uint8Array?Uint8Array:Array;b.toByteArray=function(b){function d(a){r[w++]=a}if(0>16);d((h&65280)>>8);d(h&255)}2===l?(h=e(b.charAt(a))<<2|e(b.charAt(a+1))>>4,d(h&255)):1===l&&(h=e(b.charAt(a))<<10|e(b.charAt(a+1))<<4|e(b.charAt(a+2))>>2,d(h>>8&255),d(h&255));return r};b.fromByteArray=function(b){var d=b.length%3,a="",l;var e=0;for(l=b.length-d;e> +(this.define||function(G,J){this.sourceMapSupport=J()})("browser-source-map-support",function(G){(function b(n,x,m){function e(d,a){if(!x[d]){if(!n[d]){var l="function"==typeof require&&require;if(!a&&l)return l(d,!0);if(g)return g(d,!0);throw Error("Cannot find module '"+d+"'");}l=x[d]={exports:{}};n[d][0].call(l.exports,function(a){var b=n[d][1][a];return e(b?b:a)},l,l.exports,b,n,x,m)}return x[d].exports}for(var g="function"==typeof require&&require,h=0;hb)return-1;if(58>b)return b-48+52;if(91>b)return b-65;if(123>b)return b-97+26}var g="undefined"!==typeof Uint8Array?Uint8Array:Array;b.toByteArray=function(b){function d(a){r[v++]=a}if(0>16);d((h&65280)>>8);d(h&255)}2===l?(h=e(b.charAt(a))<<2|e(b.charAt(a+1))>>4,d(h&255)):1===l&&(h=e(b.charAt(a))<<10|e(b.charAt(a+1))<<4|e(b.charAt(a+2))>>2,d(h>>8&255),d(h&255));return r};b.fromByteArray=function(b){var d=b.length%3,a="",l;var e=0;for(l=b.length-d;e> 18&63)+"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(g>>12&63)+"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(g>>6&63)+"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(g&63);a+=g}switch(d){case 1:g=b[b.length-1];a+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(g>>2);a+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(g<<4&63);a+="==";break;case 2:g=(b[b.length-2]<<8)+ -b[b.length-1],a+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(g>>10),a+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(g>>4&63),a+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(g<<2&63),a+="="}return a}})("undefined"===typeof m?this.base64js={}:m)},{}],3:[function(n,u,m){},{}],4:[function(n,u,m){(function(b){var e=Object.prototype.toString,g="function"===typeof b.alloc&&"function"===typeof b.allocUnsafe&&"function"=== -typeof b.from;u.exports=function(h,d,a){if("number"===typeof h)throw new TypeError('"value" argument must not be a number');if("ArrayBuffer"===e.call(h).slice(8,-1)){d>>>=0;var l=h.byteLength-d;if(0>l)throw new RangeError("'offset' is out of bounds");if(void 0===a)a=l;else if(a>>>=0,a>l)throw new RangeError("'length' is out of bounds");return g?b.from(h.slice(d,d+a)):new b(new Uint8Array(h.slice(d,d+a)))}if("string"===typeof h){a=d;if("string"!==typeof a||""===a)a="utf8";if(!b.isEncoding(a))throw new TypeError('"encoding" must be a valid string encoding'); -return g?b.from(h,a):new b(h,a)}return g?b.from(h):new b(h)}}).call(this,n("buffer").Buffer)},{buffer:5}],5:[function(n,u,m){function b(f,p,a){if(!(this instanceof b))return new b(f,p,a);var c=typeof f;if("number"===c)var d=0>>0:0;else if("string"===c){if("base64"===p)for(f=(f.trim?f.trim():f.replace(/^\s+|\s+$/g,"")).replace(H,"");0!==f.length%4;)f+="=";d=b.byteLength(f,p)}else if("object"===c&&null!==f)"Buffer"===f.type&&F(f.data)&&(f=f.data),d=0<+f.length?Math.floor(+f.length):0;else throw new TypeError("must start with number, buffer, array or string"); +b[b.length-1],a+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(g>>10),a+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(g>>4&63),a+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(g<<2&63),a+="="}return a}})("undefined"===typeof m?this.base64js={}:m)},{}],3:[function(n,x,m){},{}],4:[function(n,x,m){(function(b){var e=Object.prototype.toString,g="function"===typeof b.alloc&&"function"===typeof b.allocUnsafe&&"function"=== +typeof b.from;x.exports=function(h,d,a){if("number"===typeof h)throw new TypeError('"value" argument must not be a number');if("ArrayBuffer"===e.call(h).slice(8,-1)){d>>>=0;var l=h.byteLength-d;if(0>l)throw new RangeError("'offset' is out of bounds");if(void 0===a)a=l;else if(a>>>=0,a>l)throw new RangeError("'length' is out of bounds");return g?b.from(h.slice(d,d+a)):new b(new Uint8Array(h.slice(d,d+a)))}if("string"===typeof h){a=d;if("string"!==typeof a||""===a)a="utf8";if(!b.isEncoding(a))throw new TypeError('"encoding" must be a valid string encoding'); +return g?b.from(h,a):new b(h,a)}return g?b.from(h):new b(h)}}).call(this,n("buffer").Buffer)},{buffer:5}],5:[function(n,x,m){function b(f,p,a){if(!(this instanceof b))return new b(f,p,a);var c=typeof f;if("number"===c)var d=0>>0:0;else if("string"===c){if("base64"===p)for(f=(f.trim?f.trim():f.replace(/^\s+|\s+$/g,"")).replace(H,"");0!==f.length%4;)f+="=";d=b.byteLength(f,p)}else if("object"===c&&null!==f)"Buffer"===f.type&&F(f.data)&&(f=f.data),d=0<+f.length?Math.floor(+f.length):0;else throw new TypeError("must start with number, buffer, array or string"); if(this.length>D)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+D.toString(16)+" bytes");if(b.TYPED_ARRAY_SUPPORT)var k=b._augment(new Uint8Array(d));else k=this,k.length=d,k._isBuffer=!0;if(b.TYPED_ARRAY_SUPPORT&&"number"===typeof f.byteLength)k._set(f);else{var C=f;if(F(C)||b.isBuffer(C)||C&&"object"===typeof C&&"number"===typeof C.length)if(b.isBuffer(f))for(p=0;pf)throw new RangeError("offset is not uint");if(f+p>b)throw new RangeError("Trying to access beyond buffer length");}function h(f,p,a,c,d,k){if(!b.isBuffer(f))throw new TypeError("buffer must be a Buffer instance");if(p>d||pf.length)throw new TypeError("index out of range"); -}function d(f,p,b,a){0>p&&(p=65535+p+1);for(var c=0,d=Math.min(f.length-b,2);c>>8*(a?c:1-c)}function a(f,p,b,a){0>p&&(p=4294967295+p+1);for(var c=0,d=Math.min(f.length-b,4);c>>8*(a?c:3-c)&255}function l(f,p,b,a,c,d){if(p>c||pf.length)throw new TypeError("index out of range");}function r(f,p,b,a,c){c||l(f,p,b,4,3.4028234663852886E38,-3.4028234663852886E38);z.write(f,p,b,a,23,4);return b+4}function q(f, -p,b,a,c){c||l(f,p,b,8,1.7976931348623157E308,-1.7976931348623157E308);z.write(f,p,b,a,52,8);return b+8}function w(f){for(var p=[],b=0;b=a)p.push(a);else{var c=b;55296<=a&&57343>=a&&b++;a=encodeURIComponent(f.slice(c,b+1)).substr(1).split("%");for(c=0;c=b.length||d>=f.length);d++)b[d+ -a]=f[d];return d}function k(f){try{return decodeURIComponent(f)}catch(p){return String.fromCharCode(65533)}}var x=n("base64-js"),z=n("ieee754"),F=n("is-array");m.Buffer=b;m.SlowBuffer=b;m.INSPECT_MAX_BYTES=50;b.poolSize=8192;var D=1073741823;b.TYPED_ARRAY_SUPPORT=function(){try{var f=new ArrayBuffer(0),b=new Uint8Array(f);b.foo=function(){return 42};return 42===b.foo()&&"function"===typeof b.subarray&&0===(new Uint8Array(1)).subarray(1,1).byteLength}catch(C){return!1}}();b.isBuffer=function(f){return!(null== +}function d(f,p,b,a){0>p&&(p=65535+p+1);for(var c=0,d=Math.min(f.length-b,2);c>>8*(a?c:1-c)}function a(f,p,b,a){0>p&&(p=4294967295+p+1);for(var c=0,d=Math.min(f.length-b,4);c>>8*(a?c:3-c)&255}function l(f,p,b,a,c,d){if(p>c||pf.length)throw new TypeError("index out of range");}function r(f,p,b,a,c){c||l(f,p,b,4,3.4028234663852886E38,-3.4028234663852886E38);y.write(f,p,b,a,23,4);return b+4}function q(f, +p,b,a,c){c||l(f,p,b,8,1.7976931348623157E308,-1.7976931348623157E308);y.write(f,p,b,a,52,8);return b+8}function v(f){for(var p=[],b=0;b=a)p.push(a);else{var c=b;55296<=a&&57343>=a&&b++;a=encodeURIComponent(f.slice(c,b+1)).substr(1).split("%");for(c=0;c=b.length||d>=f.length);d++)b[d+ +a]=f[d];return d}function k(f){try{return decodeURIComponent(f)}catch(p){return String.fromCharCode(65533)}}var w=n("base64-js"),y=n("ieee754"),F=n("is-array");m.Buffer=b;m.SlowBuffer=b;m.INSPECT_MAX_BYTES=50;b.poolSize=8192;var D=1073741823;b.TYPED_ARRAY_SUPPORT=function(){try{var f=new ArrayBuffer(0),b=new Uint8Array(f);b.foo=function(){return 42};return 42===b.foo()&&"function"===typeof b.subarray&&0===(new Uint8Array(1)).subarray(1,1).byteLength}catch(C){return!1}}();b.isBuffer=function(f){return!(null== f||!f._isBuffer)};b.compare=function(f,a){if(!b.isBuffer(f)||!b.isBuffer(a))throw new TypeError("Arguments must be Buffers");for(var c=f.length,p=a.length,d=0,k=Math.min(c,p);d>>1;break;case "utf8":case "utf-8":b=w(f).length;break;case "base64":b=x.toByteArray(f).length; +if(0===f.length)return new b(0);if(1===f.length)return f[0];var c;if(void 0===a)for(c=a=0;c>>1;break;case "utf8":case "utf-8":b=v(f).length;break;case "base64":b=w.toByteArray(f).length; break;default:b=f.length}return b};b.prototype.length=void 0;b.prototype.parent=void 0;b.prototype.toString=function(f,b,a){var c=!1;b>>>=0;a=void 0===a||Infinity===a?this.length:a>>>0;f||(f="utf8");0>b&&(b=0);a>this.length&&(a=this.length);if(a<=b)return"";for(;;)switch(f){case "hex":f=b;b=a;a=this.length;if(!f||0>f)f=0;if(!b||0>b||b>a)b=a;c="";for(a=f;ac?"0"+c.toString(16):c.toString(16),c=f+c;return c;case "utf8":case "utf-8":c=f="";for(a=Math.min(this.length,a);b= -this[b]?(f+=k(c)+String.fromCharCode(this[b]),c=""):c+="%"+this[b].toString(16);return f+k(c);case "ascii":return e(this,b,a);case "binary":return e(this,b,a);case "base64":return b=0===b&&a===this.length?x.fromByteArray(this):x.fromByteArray(this.slice(b,a)),b;case "ucs2":case "ucs-2":case "utf16le":case "utf-16le":b=this.slice(b,a);a="";for(f=0;fb&&(f+=" ... "));return""};b.prototype.compare=function(f){if(!b.isBuffer(f))throw new TypeError("Argument must be a Buffer");return b.compare(this,f)};b.prototype.get=function(f){console.log(".get() is deprecated. Access using array indexes instead."); return this.readUInt8(f)};b.prototype.set=function(f,b){console.log(".set() is deprecated. Access using array indexes instead.");return this.writeUInt8(f,b)};b.prototype.write=function(f,b,a,d){if(isFinite(b))isFinite(a)||(d=a,a=void 0);else{var p=d;d=b;b=a;a=p}b=Number(b)||0;p=this.length-b;a?(a=Number(a),a>p&&(a=p)):a=p;d=String(d||"utf8").toLowerCase();switch(d){case "hex":b=Number(b)||0;d=this.length-b;a?(a=Number(a),a>d&&(a=d)):a=d;d=f.length;if(0!==d%2)throw Error("Invalid hex string");a>d/ -2&&(a=d/2);for(d=0;d>8;l%=256;p.push(l);p.push(d)}f=c(p,this,b,a,2);break;default:throw new TypeError("Unknown encoding: "+ +2&&(a=d/2);for(d=0;d>8;l%=256;p.push(l);p.push(d)}f=c(p,this,b,a,2);break;default:throw new TypeError("Unknown encoding: "+ d);}return f};b.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};b.prototype.slice=function(f,a){var c=this.length;f=~~f;a=void 0===a?c:~~a;0>f?(f+=c,0>f&&(f=0)):f>c&&(f=c);0>a?(a+=c,0>a&&(a=0)):a>c&&(a=c);a>>=0;d||h(this,a,c,1,255,0);b.TYPED_ARRAY_SUPPORT||(a=Math.floor(a));this[c]=a;return c+1};b.prototype.writeUInt16LE=function(a, +b){b||g(a,4,this.length);return y.read(this,a,!0,23,4)};b.prototype.readFloatBE=function(a,b){b||g(a,4,this.length);return y.read(this,a,!1,23,4)};b.prototype.readDoubleLE=function(a,b){b||g(a,8,this.length);return y.read(this,a,!0,52,8)};b.prototype.readDoubleBE=function(a,b){b||g(a,8,this.length);return y.read(this,a,!1,52,8)};b.prototype.writeUInt8=function(a,c,d){a=+a;c>>>=0;d||h(this,a,c,1,255,0);b.TYPED_ARRAY_SUPPORT||(a=Math.floor(a));this[c]=a;return c+1};b.prototype.writeUInt16LE=function(a, c,k){a=+a;c>>>=0;k||h(this,a,c,2,65535,0);b.TYPED_ARRAY_SUPPORT?(this[c]=a,this[c+1]=a>>>8):d(this,a,c,!0);return c+2};b.prototype.writeUInt16BE=function(a,c,k){a=+a;c>>>=0;k||h(this,a,c,2,65535,0);b.TYPED_ARRAY_SUPPORT?(this[c]=a>>>8,this[c+1]=a):d(this,a,c,!1);return c+2};b.prototype.writeUInt32LE=function(f,c,d){f=+f;c>>>=0;d||h(this,f,c,4,4294967295,0);b.TYPED_ARRAY_SUPPORT?(this[c+3]=f>>>24,this[c+2]=f>>>16,this[c+1]=f>>>8,this[c]=f):a(this,f,c,!0);return c+4};b.prototype.writeUInt32BE=function(f, c,d){f=+f;c>>>=0;d||h(this,f,c,4,4294967295,0);b.TYPED_ARRAY_SUPPORT?(this[c]=f>>>24,this[c+1]=f>>>16,this[c+2]=f>>>8,this[c+3]=f):a(this,f,c,!1);return c+4};b.prototype.writeInt8=function(a,c,d){a=+a;c>>>=0;d||h(this,a,c,1,127,-128);b.TYPED_ARRAY_SUPPORT||(a=Math.floor(a));0>a&&(a=255+a+1);this[c]=a;return c+1};b.prototype.writeInt16LE=function(a,c,k){a=+a;c>>>=0;k||h(this,a,c,2,32767,-32768);b.TYPED_ARRAY_SUPPORT?(this[c]=a,this[c+1]=a>>>8):d(this,a,c,!0);return c+2};b.prototype.writeInt16BE=function(a, c,k){a=+a;c>>>=0;k||h(this,a,c,2,32767,-32768);b.TYPED_ARRAY_SUPPORT?(this[c]=a>>>8,this[c+1]=a):d(this,a,c,!1);return c+2};b.prototype.writeInt32LE=function(c,d,k){c=+c;d>>>=0;k||h(this,c,d,4,2147483647,-2147483648);b.TYPED_ARRAY_SUPPORT?(this[d]=c,this[d+1]=c>>>8,this[d+2]=c>>>16,this[d+3]=c>>>24):a(this,c,d,!0);return d+4};b.prototype.writeInt32BE=function(c,d,k){c=+c;d>>>=0;k||h(this,c,d,4,2147483647,-2147483648);0>c&&(c=4294967295+c+1);b.TYPED_ARRAY_SUPPORT?(this[d]=c>>>24,this[d+1]=c>>>16,this[d+ 2]=c>>>8,this[d+3]=c):a(this,c,d,!1);return d+4};b.prototype.writeFloatLE=function(a,c,b){return r(this,a,c,!0,b)};b.prototype.writeFloatBE=function(a,c,b){return r(this,a,c,!1,b)};b.prototype.writeDoubleLE=function(a,c,b){return q(this,a,c,!0,b)};b.prototype.writeDoubleBE=function(a,c,b){return q(this,a,c,!1,b)};b.prototype.copy=function(a,c,d,k){d||(d=0);k||0===k||(k=this.length);c||(c=0);if(k!==d&&0!==a.length&&0!==this.length){if(kc||c>=a.length)throw new TypeError("targetStart out of bounds"); if(0>d||d>=this.length)throw new TypeError("sourceStart out of bounds");if(0>k||k>this.length)throw new TypeError("sourceEnd out of bounds");k>this.length&&(k=this.length);a.length-ck||!b.TYPED_ARRAY_SUPPORT)for(var f=0;fc||c>=this.length)throw new TypeError("start out of bounds"); -if(0>b||b>this.length)throw new TypeError("end out of bounds");if("number"===typeof a)for(;cb||b>this.length)throw new TypeError("end out of bounds");if("number"===typeof a)for(;c>1,q=-7;d=g?d-1:0;var w=g?-1:1,v=b[e+d];d+=w;g=v&(1<<-q)-1;v>>=-q;for(q+=a;0>=-q;for(q+=h;0>1,v=23===d?Math.pow(2,-24)-Math.pow(2,-77):0;a=h?0:a-1;var c=h?1:-1,k=0>e||0===e&&0>1/e?1:0;e=Math.abs(e);isNaN(e)||Infinity===e?(e=isNaN(e)?1:0,h=q):(h=Math.floor(Math.log(e)/Math.LN2),1>e*(l=Math.pow(2,-h))&&(h--,l*=2),e=1<=h+w?e+v/l:e+v*Math.pow(2,1-w),2<=e*l&&(h++,l/=2),h+w>=q?(e=0,h=q):1<=h+w?(e=(e*l-1)*Math.pow(2,d),h+=w):(e=e*Math.pow(2,w-1)*Math.pow(2,d),h=0));for(;8<=d;b[g+a]=e&255,a+= -c,e/=256,d-=8);h=h<>1,q=-7;d=g?d-1:0;var v=g?-1:1,u=b[e+d];d+=v;g=u&(1<<-q)-1;u>>=-q;for(q+=a;0>=-q;for(q+=h;0>1,u=23===d?Math.pow(2,-24)-Math.pow(2,-77):0;a=h?0:a-1;var c=h?1:-1,k=0>e||0===e&&0>1/e?1:0;e=Math.abs(e);isNaN(e)||Infinity===e?(e=isNaN(e)?1:0,h=q):(h=Math.floor(Math.log(e)/Math.LN2),1>e*(l=Math.pow(2,-h))&&(h--,l*=2),e=1<=h+v?e+u/l:e+u*Math.pow(2,1-v),2<=e*l&&(h++,l/=2),h+v>=q?(e=0,h=q):1<=h+v?(e=(e*l-1)*Math.pow(2,d),h+=v):(e=e*Math.pow(2,v-1)*Math.pow(2,d),h=0));for(;8<=d;b[g+a]=e&255,a+= +c,e/=256,d-=8);h=h<b?[]:a.slice(c,b-c+1)}a=m.resolve(a).substr(1);b=m.resolve(b).substr(1); -for(var l=d(a.split("/")),w=d(b.split("/")),e=Math.min(l.length,w.length),c=e,k=0;kb&&(b=a.length+b);return a.substr(b,d)}}).call(this,n("g5I+bs"))},{"g5I+bs":9}],9:[function(n,u,m){function b(){}n=u.exports={};n.nextTick=function(){if("undefined"!==typeof window&&window.setImmediate)return function(b){return window.setImmediate(b)};if("undefined"!==typeof window&&window.postMessage&&window.addEventListener){var b=[];window.addEventListener("message",function(e){var g=e.source;g!==window&&null!== +for(var l=d(a.split("/")),v=d(b.split("/")),e=Math.min(l.length,v.length),c=e,k=0;kb&&(b=a.length+b);return a.substr(b,d)}}).call(this,n("g5I+bs"))},{"g5I+bs":9}],9:[function(n,x,m){function b(){}n=x.exports={};n.nextTick=function(){if("undefined"!==typeof window&&window.setImmediate)return function(b){return window.setImmediate(b)};if("undefined"!==typeof window&&window.postMessage&&window.addEventListener){var b=[];window.addEventListener("message",function(e){var g=e.source;g!==window&&null!== g||"process-tick"!==e.data||(e.stopPropagation(),0e?(-e<<1)+1:e<<1;do e=h&31,h>>>=5,0=d)throw Error("Expected more digits in base 64 VLQ value.");var r=b.decode(e.charCodeAt(g++));if(-1===r)throw Error("Invalid base64 digit: "+e.charAt(g-1));var q=!!(r&32);r&=31;a+=r<>1;h.value=1===(a&1)?-e:e;h.rest=g}},{"./base64":12}],12:[function(n, -u,m){var b="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split("");m.encode=function(e){if(0<=e&&e=b?b-65:97<=b&&122>=b?b-97+26:48<=b&&57>=b?b-48+52:43==b?62:47==b?63:-1}},{}],13:[function(n,u,m){function b(e,g,h,d,a,l){var r=Math.floor((g-e)/2)+e,q=a(h,d[r],!0);return 0===q?r:0e?-1:e}m.GREATEST_LOWER_BOUND=1;m.LEAST_UPPER_BOUND=2;m.search=function(e,g,h,d){if(0===g.length)return-1;e=b(-1,g.length,e,g,h,d||m.GREATEST_LOWER_BOUND);if(0>e)return-1;for(;0<=e-1&&0===h(g[e],g[e-1],!0);)--e;return e}},{}],14:[function(n,u,m){function b(){this._array=[];this._sorted=!0;this._last={generatedLine:-1,generatedColumn:0}}var e=n("./util");b.prototype.unsortedForEach=function(b,e){this._array.forEach(b,e)};b.prototype.add=function(b){var g=this._last,d=g.generatedLine, -a=b.generatedLine,l=g.generatedColumn,r=b.generatedColumn;a>d||a==d&&r>=l||0>=e.compareByGeneratedPositionsInflated(g,b)?this._last=b:this._sorted=!1;this._array.push(b)};b.prototype.toArray=function(){this._sorted||(this._array.sort(e.compareByGeneratedPositionsInflated),this._sorted=!0);return this._array};m.MappingList=b},{"./util":19}],15:[function(n,u,m){function b(b,e,d){var a=b[e];b[e]=b[d];b[d]=a}function e(g,h,d,a){if(d=h(g[q],r)&&(l+=1,b(g,l,q));b(g,l+1,q);l+=1;e(g,h,d,l-1);e(g,h,l+1,a)}}m.quickSort=function(b,h){e(b,h,0,b.length-1)}},{}],16:[function(n,u,m){function b(a,b){var c=a;"string"===typeof a&&(c=d.parseSourceMapInput(a));return null!=c.sections?new h(c,b):new e(c,b)}function e(a,b){var c=a;"string"===typeof a&&(c=d.parseSourceMapInput(a));var k=d.getArg(c,"version"),e=d.getArg(c,"sources"),w=d.getArg(c,"names",[]),g=d.getArg(c,"sourceRoot",null),h=d.getArg(c,"sourcesContent",null),q=d.getArg(c, -"mappings");c=d.getArg(c,"file",null);if(k!=this._version)throw Error("Unsupported version: "+k);g&&(g=d.normalize(g));e=e.map(String).map(d.normalize).map(function(a){return g&&d.isAbsolute(g)&&d.isAbsolute(a)?d.relative(g,a):a});this._names=l.fromArray(w.map(String),!0);this._sources=l.fromArray(e,!0);this.sourceRoot=g;this.sourcesContent=h;this._mappings=q;this._sourceMapURL=b;this.file=c}function g(){this.generatedColumn=this.generatedLine=0;this.name=this.originalColumn=this.originalLine=this.source= -null}function h(a,e){var c=a;"string"===typeof a&&(c=d.parseSourceMapInput(a));var k=d.getArg(c,"version");c=d.getArg(c,"sections");if(k!=this._version)throw Error("Unsupported version: "+k);this._sources=new l;this._names=new l;var w={line:-1,column:0};this._sections=c.map(function(a){if(a.url)throw Error("Support for url field in sections not implemented.");var c=d.getArg(a,"offset"),k=d.getArg(c,"line"),g=d.getArg(c,"column");if(ke?(-e<<1)+1:e<<1;do e=h&31,h>>>=5,0=d)throw Error("Expected more digits in base 64 VLQ value.");var r=b.decode(e.charCodeAt(g++));if(-1===r)throw Error("Invalid base64 digit: "+e.charAt(g-1));var q=!!(r&32);r&=31;a+=r<>1;h.value=1===(a&1)?-e:e;h.rest=g}},{"./base64":12}],12:[function(n, +x,m){var b="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split("");m.encode=function(e){if(0<=e&&e=b?b-65:97<=b&&122>=b?b-97+26:48<=b&&57>=b?b-48+52:43==b?62:47==b?63:-1}},{}],13:[function(n,x,m){function b(e,g,h,d,a,l){var r=Math.floor((g-e)/2)+e,q=a(h,d[r],!0);return 0===q?r:0e?-1:e}m.GREATEST_LOWER_BOUND=1;m.LEAST_UPPER_BOUND=2;m.search=function(e,g,h,d){if(0===g.length)return-1;e=b(-1,g.length,e,g,h,d||m.GREATEST_LOWER_BOUND);if(0>e)return-1;for(;0<=e-1&&0===h(g[e],g[e-1],!0);)--e;return e}},{}],14:[function(n,x,m){function b(){this._array=[];this._sorted=!0;this._last={generatedLine:-1,generatedColumn:0}}var e=n("./util");b.prototype.unsortedForEach=function(b,e){this._array.forEach(b,e)};b.prototype.add=function(b){var g=this._last,d=g.generatedLine, +a=b.generatedLine,l=g.generatedColumn,r=b.generatedColumn;a>d||a==d&&r>=l||0>=e.compareByGeneratedPositionsInflated(g,b)?this._last=b:this._sorted=!1;this._array.push(b)};b.prototype.toArray=function(){this._sorted||(this._array.sort(e.compareByGeneratedPositionsInflated),this._sorted=!0);return this._array};m.MappingList=b},{"./util":19}],15:[function(n,x,m){function b(b,e,d){var a=b[e];b[e]=b[d];b[d]=a}function e(g,h,d,a){if(d=h(g[q],r)&&(l+=1,b(g,l,q));b(g,l+1,q);l+=1;e(g,h,d,l-1);e(g,h,l+1,a)}}m.quickSort=function(b,h){e(b,h,0,b.length-1)}},{}],16:[function(n,x,m){function b(a,b){var c=a;"string"===typeof a&&(c=d.parseSourceMapInput(a));return null!=c.sections?new h(c,b):new e(c,b)}function e(a,b){var c=a;"string"===typeof a&&(c=d.parseSourceMapInput(a));var k=d.getArg(c,"version"),e=d.getArg(c,"sources"),v=d.getArg(c,"names",[]),g=d.getArg(c,"sourceRoot",null),h=d.getArg(c,"sourcesContent",null),q=d.getArg(c, +"mappings");c=d.getArg(c,"file",null);if(k!=this._version)throw Error("Unsupported version: "+k);g&&(g=d.normalize(g));e=e.map(String).map(d.normalize).map(function(a){return g&&d.isAbsolute(g)&&d.isAbsolute(a)?d.relative(g,a):a});this._names=l.fromArray(v.map(String),!0);this._sources=l.fromArray(e,!0);this.sourceRoot=g;this.sourcesContent=h;this._mappings=q;this._sourceMapURL=b;this.file=c}function g(){this.generatedColumn=this.generatedLine=0;this.name=this.originalColumn=this.originalLine=this.source= +null}function h(a,e){var c=a;"string"===typeof a&&(c=d.parseSourceMapInput(a));var k=d.getArg(c,"version");c=d.getArg(c,"sections");if(k!=this._version)throw Error("Unsupported version: "+k);this._sources=new l;this._names=new l;var v={line:-1,column:0};this._sections=c.map(function(a){if(a.url)throw Error("Support for url field in sections not implemented.");var c=d.getArg(a,"offset"),k=d.getArg(c,"line"),g=d.getArg(c,"column");if(k=b[c])throw new TypeError("Line must be greater than or equal to 1, got "+ +lastColumn:d.getArg(g,"lastGeneratedColumn",null)}),g=this._originalMappings[++c]}return k};m.SourceMapConsumer=b;e.prototype=Object.create(b.prototype);e.prototype.consumer=b;e.fromSourceMap=function(a,b){var c=Object.create(e.prototype),k=c._names=l.fromArray(a._names.toArray(),!0),v=c._sources=l.fromArray(a._sources.toArray(),!0);c.sourceRoot=a._sourceRoot;c.sourcesContent=a._generateSourcesContent(c._sources.toArray(),c.sourceRoot);c.file=a._file;c._sourceMapURL=b;for(var h=a._mappings.toArray().slice(), +r=c.__generatedMappings=[],m=c.__originalMappings=[],u=0,n=h.length;u=b[c])throw new TypeError("Line must be greater than or equal to 1, got "+ b[c]);if(0>b[k])throw new TypeError("Column must be greater than or equal to 0, got "+b[k]);return a.search(b,d,e,g)};e.prototype.computeColumnSpans=function(){for(var a=0;a=this._sources.size()&&!this.sourcesContent.some(function(a){return null==a}):!1};e.prototype.sourceContentFor=function(a,b){if(!this.sourcesContent)return null;var c=a;null!=this.sourceRoot&&(c=d.relative(this.sourceRoot,c));if(this._sources.has(c))return this.sourcesContent[this._sources.indexOf(c)]; @@ -75,39 +75,40 @@ function(b){var e={generatedLine:d.getArg(b,"line"),generatedColumn:d.getArg(b," line:null,column:null,name:null}};h.prototype.hasContentsOfAllSources=function(){return this._sections.every(function(a){return a.consumer.hasContentsOfAllSources()})};h.prototype.sourceContentFor=function(a,b){for(var c=0;c -b||95!==a.charCodeAt(b-1)||95!==a.charCodeAt(b-2)||111!==a.charCodeAt(b-3)||116!==a.charCodeAt(b-4)||111!==a.charCodeAt(b-5)||114!==a.charCodeAt(b-6)||112!==a.charCodeAt(b-7)||95!==a.charCodeAt(b-8)||95!==a.charCodeAt(b-9))return!1;for(b-=10;0<=b;b--)if(36!==a.charCodeAt(b))return!1;return!0}function q(a,b){return a===b?0:null===a?1:null===b?-1:a>b?1:-1}m.getArg=function(a,b,d){if(b in a)return a[b];if(3===arguments.length)return d;throw Error('"'+b+'" is a required argument.');};var w=/^(?:([\w+\-.]+):)?\/\/(?:(\w+:\w+)@)?([\w.-]*)(?::(\d+))?(.*)$/, -v=/^data:.+,.+$/;m.urlParse=b;m.urlGenerate=e;m.normalize=g;m.join=h;m.isAbsolute=function(a){return"/"===a.charAt(0)||w.test(a)};m.relative=function(a,b){""===a&&(a=".");a=a.replace(/\/$/,"");for(var c=0;0!==b.indexOf(a+"/");){var d=a.lastIndexOf("/");if(0>d)return b;a=a.slice(0,d);if(a.match(/^([^\/]+:\/)?\/*$/))return b;++c}return Array(c+1).join("../")+b.substr(a.length+1)};n=!("__proto__"in Object.create(null));m.toSetString=n?d:a;m.fromSetString=n?d:l;m.compareByOriginalPositions=function(a, +this.children[a].walkSourceContents(b);var e=Object.keys(this.sourceContents);a=0;for(d=e.length;a +b||95!==a.charCodeAt(b-1)||95!==a.charCodeAt(b-2)||111!==a.charCodeAt(b-3)||116!==a.charCodeAt(b-4)||111!==a.charCodeAt(b-5)||114!==a.charCodeAt(b-6)||112!==a.charCodeAt(b-7)||95!==a.charCodeAt(b-8)||95!==a.charCodeAt(b-9))return!1;for(b-=10;0<=b;b--)if(36!==a.charCodeAt(b))return!1;return!0}function q(a,b){return a===b?0:null===a?1:null===b?-1:a>b?1:-1}m.getArg=function(a,b,d){if(b in a)return a[b];if(3===arguments.length)return d;throw Error('"'+b+'" is a required argument.');};var v=/^(?:([\w+\-.]+):)?\/\/(?:(\w+:\w+)@)?([\w.-]*)(?::(\d+))?(.*)$/, +u=/^data:.+,.+$/;m.urlParse=b;m.urlGenerate=e;m.normalize=g;m.join=h;m.isAbsolute=function(a){return"/"===a.charAt(0)||v.test(a)};m.relative=function(a,b){""===a&&(a=".");a=a.replace(/\/$/,"");for(var c=0;0!==b.indexOf(a+"/");){var d=a.lastIndexOf("/");if(0>d)return b;a=a.slice(0,d);if(a.match(/^([^\/]+:\/)?\/*$/))return b;++c}return Array(c+1).join("../")+b.substr(a.length+1)};n=!("__proto__"in Object.create(null));m.toSetString=n?d:a;m.fromSetString=n?d:l;m.compareByOriginalPositions=function(a, b,d){var c=q(a.source,b.source);if(0!==c)return c;c=a.originalLine-b.originalLine;if(0!==c)return c;c=a.originalColumn-b.originalColumn;if(0!==c||d)return c;c=a.generatedColumn-b.generatedColumn;if(0!==c)return c;c=a.generatedLine-b.generatedLine;return 0!==c?c:q(a.name,b.name)};m.compareByGeneratedPositionsDeflated=function(a,b,d){var c=a.generatedLine-b.generatedLine;if(0!==c)return c;c=a.generatedColumn-b.generatedColumn;if(0!==c||d)return c;c=q(a.source,b.source);if(0!==c)return c;c=a.originalLine- b.originalLine;if(0!==c)return c;c=a.originalColumn-b.originalColumn;return 0!==c?c:q(a.name,b.name)};m.compareByGeneratedPositionsInflated=function(a,b){var c=a.generatedLine-b.generatedLine;if(0!==c)return c;c=a.generatedColumn-b.generatedColumn;if(0!==c)return c;c=q(a.source,b.source);if(0!==c)return c;c=a.originalLine-b.originalLine;if(0!==c)return c;c=a.originalColumn-b.originalColumn;return 0!==c?c:q(a.name,b.name)};m.parseSourceMapInput=function(a){return JSON.parse(a.replace(/^\)]}'[^\n]*\n/, -""))};m.computeSourceURL=function(a,d,l){d=d||"";a&&("/"!==a[a.length-1]&&"/"!==d[0]&&(a+="/"),d=a+d);if(l){a=b(l);if(!a)throw Error("sourceMapURL could not be parsed");a.path&&(l=a.path.lastIndexOf("/"),0<=l&&(a.path=a.path.substring(0,l+1)));d=h(e(a),d)}return g(d)}},{}],20:[function(n,u,m){m.SourceMapGenerator=n("./lib/source-map-generator").SourceMapGenerator;m.SourceMapConsumer=n("./lib/source-map-consumer").SourceMapConsumer;m.SourceNode=n("./lib/source-node").SourceNode},{"./lib/source-map-consumer":16, -"./lib/source-map-generator":17,"./lib/source-node":18}],21:[function(n,u,m){(function(b){function e(){return"browser"===f?!0:"node"===f?!1:"undefined"!==typeof window&&"function"===typeof XMLHttpRequest&&!(window.require&&window.module&&window.process&&"renderer"===window.process.type)}function g(a){return function(b){for(var c=0;c";b=this.getLineNumber();null!=b&&(a+=":"+b,(b= this.getColumnNumber())&&(a+=":"+b))}b="";var c=this.getFunctionName(),d=!0,e=this.isConstructor();if(this.isToplevel()||e)e?b+="new "+(c||""):c?b+=c:(b+=a,d=!1);else{e=this.getTypeName();"[object Object]"===e&&(e="null");var f=this.getMethodName();c?(e&&0!=c.indexOf(e)&&(b+=e+"."),b+=c,f&&c.indexOf("."+f)!=c.length-f.length-1&&(b+=" [as "+f+"]")):b+=e+"."+(f||"")}d&&(b+=" ("+a+")");return b}function r(a){var b={};Object.getOwnPropertyNames(Object.getPrototypeOf(a)).forEach(function(c){b[c]= -/^(?:is|get)/.test(c)?function(){return a[c].call(a)}:a[c]});b.toString=l;return b}function q(b){if(b.isNative())return b;var c=b.getFileName()||b.getScriptNameOrSourceURL();if(c){var f=b.getLineNumber(),g=b.getColumnNumber()-1;1===f&&62l&&!e()&&!c.isEval()&&(k-=l);var m=d({source:g,line:h,column:k});f.curPosition=m;c=r(c);var p= +c.getFunctionName;c.getFunctionName=function(){return null==f.nextPosition?p():f.nextPosition.name||p()};c.getFileName=function(){return m.source};c.getLineNumber=function(){return m.line};c.getColumnNumber=function(){return m.column+1};c.getScriptNameOrSourceURL=function(){return m.source};return c}var n=c.isEval()&&c.getEvalOrigin();n&&(n=a(n),c=r(c),c.getEvalOrigin=function(){return n});return c}function v(a,b){H&&(p={},C={});for(var c=(a.name||"Error")+": "+(a.message||""),d={nextPosition:null, +curPosition:null},e=[],f=b.length-1;0<=f;f--)e.push("\n at "+q(b[f],d)),d.nextPosition=d.curPosition;d.curPosition=d.nextPosition=null;return c+e.reverse().join("")}function u(a){var b=/\n at [^(]+ \((.*):(\d+):(\d+)\)/.exec(a.stack);if(b){a=b[1];var c=+b[2];b=+b[3];var d=p[a];if(!d&&y&&y.existsSync(a))try{d=y.readFileSync(a,"utf8")}catch(N){d=""}if(d&&(d=d.split(/(?:\r\n|\r|\n)/)[c-1]))return a+":"+c+"\n"+d+"\n"+Array(b).join(" ")+"^"}return null}function c(){var a=b.emit;b.emit=function(c){if("uncaughtException"=== +c){var d=arguments[1]&&arguments[1].stack,e=0=11.11.0 + // v11 is not an LTS candidate, we can just test the one version with it. + // Test node versions for: 10.16-19, 10.20+, 12-19, 20-99, 100+, or 11.11 + var noHeader = /^v(10\.1[6-9]|10\.[2-9][0-9]|10\.[0-9]{3,}|1[2-9]\d*|[2-9]\d|\d{3,}|11\.11)/; + var headerLength = noHeader.test(process.version) ? 0 : 62; if (line === 1 && column > headerLength && !isInBrowser() && !frame.isEval()) { column -= headerLength; } @@ -360,9 +379,15 @@ function wrapCallSite(frame) { line: line, column: column }); + state.curPosition = position; frame = cloneCallSite(frame); var originalFunctionName = frame.getFunctionName; - frame.getFunctionName = function() { return position.name || originalFunctionName(); }; + frame.getFunctionName = function() { + if (state.nextPosition == null) { + return originalFunctionName(); + } + return state.nextPosition.name || originalFunctionName(); + }; frame.getFileName = function() { return position.source; }; frame.getLineNumber = function() { return position.line; }; frame.getColumnNumber = function() { return position.column + 1; }; @@ -395,9 +420,14 @@ function prepareStackTrace(error, stack) { var message = error.message || ''; var errorString = name + ": " + message; - return errorString + stack.map(function(frame) { - return '\n at ' + wrapCallSite(frame); - }).join(''); + var state = { nextPosition: null, curPosition: null }; + var processedStack = []; + for (var i = stack.length - 1; i >= 0; i--) { + processedStack.push('\n at ' + wrapCallSite(stack[i], state)); + state.nextPosition = state.curPosition; + } + state.curPosition = state.nextPosition = null; + return errorString + processedStack.reverse().join(''); } // Generate position and snippet of original source with pointer @@ -506,12 +536,8 @@ exports.install = function(options) { // Support runtime transpilers that include inline source maps if (options.hookRequire && !isInBrowser()) { - var Module; - try { - Module = require('module'); - } catch (err) { - // NOP: Loading in catch block to convert webpack error to warning. - } + // Use dynamicRequire to avoid including in browser bundles + var Module = dynamicRequire(module, 'module'); var $compile = Module.prototype._compile; if (!$compile.__sourceMapSupport) { @@ -541,6 +567,17 @@ exports.install = function(options) { var installHandler = 'handleUncaughtExceptions' in options ? options.handleUncaughtExceptions : true; + // Do not override 'uncaughtException' with our own handler in Node.js + // Worker threads. Workers pass the error to the main thread as an event, + // rather than printing something to stderr and exiting. + try { + // We need to use `dynamicRequire` because `require` on it's own will be optimized by WebPack/Browserify. + var worker_threads = dynamicRequire(module, 'worker_threads'); + if (worker_threads.isMainThread === false) { + installHandler = false; + } + } catch(e) {} + // Provide the option to not install the uncaught exception handler. This is // to support other uncaught exception handlers (in test frameworks, for // example). If this handler is not installed and there are no other uncaught @@ -561,7 +598,7 @@ exports.resetRetrieveHandlers = function() { retrieveFileHandlers = originalRetrieveFileHandlers.slice(0); retrieveMapHandlers = originalRetrieveMapHandlers.slice(0); - + retrieveSourceMap = handlerExec(retrieveMapHandlers); retrieveFile = handlerExec(retrieveFileHandlers); } diff --git a/node_modules/spdx-correct/index.js b/node_modules/spdx-correct/index.js index 8e0e5aeda..c51a79f5d 100644 --- a/node_modules/spdx-correct/index.js +++ b/node_modules/spdx-correct/index.js @@ -49,6 +49,7 @@ var transpositions = [ ['GNU GENERAL PUBLIC LICENSE', 'GPL'], ['MTI', 'MIT'], ['Mozilla Public License', 'MPL'], + ['Universal Permissive License', 'UPL'], ['WTH', 'WTF'], ['-License', ''] ] @@ -138,6 +139,26 @@ var transforms = [ function (argument) { return argument.replace(/(-| )clause(-| )(\d)/, '-$3-Clause') }, + // e.g. 'New BSD license' + function (argument) { + return argument.replace(/\b(Modified|New|Revised)(-| )?BSD((-| )License)?/i, 'BSD-3-Clause') + }, + // e.g. 'Simplified BSD license' + function (argument) { + return argument.replace(/\bSimplified(-| )?BSD((-| )License)?/i, 'BSD-2-Clause') + }, + // e.g. 'Free BSD license' + function (argument) { + return argument.replace(/\b(Free|Net)(-| )?BSD((-| )License)?/i, 'BSD-2-Clause-$1BSD') + }, + // e.g. 'Clear BSD license' + function (argument) { + return argument.replace(/\bClear(-| )?BSD((-| )License)?/i, 'BSD-3-Clause-Clear') + }, + // e.g. 'Old BSD License' + function (argument) { + return argument.replace(/\b(Old|Original)(-| )?BSD((-| )License)?/i, 'BSD-4-Clause') + }, // e.g. 'BY-NC-4.0' function (argument) { return 'CC-' + argument diff --git a/node_modules/spdx-correct/package.json b/node_modules/spdx-correct/package.json index 7a54efe9f..232925a18 100644 --- a/node_modules/spdx-correct/package.json +++ b/node_modules/spdx-correct/package.json @@ -1,33 +1,27 @@ { - "_args": [ - [ - "spdx-correct@3.1.0", - "/Users/drew.heavner/Documents/Github/sign-android-release" - ] - ], - "_development": true, - "_from": "spdx-correct@3.1.0", - "_id": "spdx-correct@3.1.0", + "_from": "spdx-correct@^3.0.0", + "_id": "spdx-correct@3.1.1", "_inBundle": false, - "_integrity": "sha512-lr2EZCctC2BNR7j7WzJ2FpDznxky1sjfxvvYEyzxNyb6lZXHODmEoJeFu4JupYlkfha1KZpJyoqiJ7pgA1qq8Q==", + "_integrity": "sha512-cOYcUWwhCuHCXi49RhFRCyJEK3iPj1Ziz9DpViV3tbZOwXD49QzIN3MpOLJNxh2qwq2lJJZaKMVw9qNi4jTC0w==", "_location": "/spdx-correct", "_phantomChildren": {}, "_requested": { - "type": "version", + "type": "range", "registry": true, - "raw": "spdx-correct@3.1.0", + "raw": "spdx-correct@^3.0.0", "name": "spdx-correct", "escapedName": "spdx-correct", - "rawSpec": "3.1.0", + "rawSpec": "^3.0.0", "saveSpec": null, - "fetchSpec": "3.1.0" + "fetchSpec": "^3.0.0" }, "_requiredBy": [ "/validate-npm-package-license" ], - "_resolved": "https://registry.npmjs.org/spdx-correct/-/spdx-correct-3.1.0.tgz", - "_spec": "3.1.0", - "_where": "/Users/drew.heavner/Documents/Github/sign-android-release", + "_resolved": "https://registry.npmjs.org/spdx-correct/-/spdx-correct-3.1.1.tgz", + "_shasum": "dece81ac9c1e6713e5f7d1b6f17d468fa53d89a9", + "_spec": "spdx-correct@^3.0.0", + "_where": "/Users/drew.heavner/Documents/Github/sign-android-release/node_modules/validate-npm-package-license", "author": { "name": "Kyle E. Mitchell", "email": "kyle@kemitchell.com", @@ -36,6 +30,7 @@ "bugs": { "url": "https://github.com/jslicense/spdx-correct.js/issues" }, + "bundleDependencies": false, "contributors": [ { "name": "Kyle E. Mitchell", @@ -59,6 +54,7 @@ "spdx-expression-parse": "^3.0.0", "spdx-license-ids": "^3.0.0" }, + "deprecated": false, "description": "correct invalid SPDX expressions", "devDependencies": { "defence-cli": "^2.0.1", @@ -88,5 +84,5 @@ "lint": "standard && standard-markdown README.md", "test": "defence README.md | replace-require-self | node && node test.js" }, - "version": "3.1.0" + "version": "3.1.1" } diff --git a/node_modules/spdx-exceptions/index.json b/node_modules/spdx-exceptions/index.json index 1063ebd2d..f88f088ab 100644 --- a/node_modules/spdx-exceptions/index.json +++ b/node_modules/spdx-exceptions/index.json @@ -15,6 +15,9 @@ "GCC-exception-2.0", "GCC-exception-3.1", "gnu-javamail-exception", + "GPL-3.0-linking-exception", + "GPL-3.0-linking-source-exception", + "GPL-CC-1.0", "i2p-gpl-java-exception", "Libtool-exception", "Linux-syscall-note", @@ -22,6 +25,7 @@ "LZMA-exception", "mif-exception", "Nokia-Qt-exception-1.1", + "OCaml-LGPL-linking-exception", "OCCT-exception-1.0", "OpenJDK-assembly-exception-1.0", "openvpn-openssl-exception", @@ -29,6 +33,8 @@ "Qt-GPL-exception-1.0", "Qt-LGPL-exception-1.1", "Qwt-exception-1.0", + "Swift-exception", "u-boot-exception-2.0", + "Universal-FOSS-exception-1.0", "WxWindows-exception-3.1" ] diff --git a/node_modules/spdx-exceptions/package.json b/node_modules/spdx-exceptions/package.json index 374216180..58ae400f0 100644 --- a/node_modules/spdx-exceptions/package.json +++ b/node_modules/spdx-exceptions/package.json @@ -1,39 +1,34 @@ { - "_args": [ - [ - "spdx-exceptions@2.2.0", - "/Users/drew.heavner/Documents/Github/sign-android-release" - ] - ], - "_development": true, - "_from": "spdx-exceptions@2.2.0", - "_id": "spdx-exceptions@2.2.0", + "_from": "spdx-exceptions@^2.1.0", + "_id": "spdx-exceptions@2.3.0", "_inBundle": false, - "_integrity": "sha512-2XQACfElKi9SlVb1CYadKDXvoajPgBVPn/gOQLrTvHdElaVhr7ZEbqJaRnJLVNeaI4cMEAgVCeBMKF6MWRDCRA==", + "_integrity": "sha512-/tTrYOC7PPI1nUAgx34hUpqXuyJG+DTHJTnIULG4rDygi4xu/tfgmq1e1cIRwRzwZgo4NLySi+ricLkZkw4i5A==", "_location": "/spdx-exceptions", "_phantomChildren": {}, "_requested": { - "type": "version", + "type": "range", "registry": true, - "raw": "spdx-exceptions@2.2.0", + "raw": "spdx-exceptions@^2.1.0", "name": "spdx-exceptions", "escapedName": "spdx-exceptions", - "rawSpec": "2.2.0", + "rawSpec": "^2.1.0", "saveSpec": null, - "fetchSpec": "2.2.0" + "fetchSpec": "^2.1.0" }, "_requiredBy": [ "/spdx-expression-parse" ], - "_resolved": "https://registry.npmjs.org/spdx-exceptions/-/spdx-exceptions-2.2.0.tgz", - "_spec": "2.2.0", - "_where": "/Users/drew.heavner/Documents/Github/sign-android-release", + "_resolved": "https://registry.npmjs.org/spdx-exceptions/-/spdx-exceptions-2.3.0.tgz", + "_shasum": "3f28ce1a77a00372683eade4a433183527a2163d", + "_spec": "spdx-exceptions@^2.1.0", + "_where": "/Users/drew.heavner/Documents/Github/sign-android-release/node_modules/spdx-expression-parse", "author": { "name": "The Linux Foundation" }, "bugs": { "url": "https://github.com/kemitchell/spdx-exceptions.json/issues" }, + "bundleDependencies": false, "contributors": [ { "name": "Kyle E. Mitchell", @@ -41,7 +36,11 @@ "url": "https://kemitchell.com/" } ], + "deprecated": false, "description": "list of SPDX standard license exceptions", + "files": [ + "index.json" + ], "homepage": "https://github.com/kemitchell/spdx-exceptions.json#readme", "license": "CC-BY-3.0", "name": "spdx-exceptions", @@ -49,5 +48,8 @@ "type": "git", "url": "git+https://github.com/kemitchell/spdx-exceptions.json.git" }, - "version": "2.2.0" + "scripts": { + "build": "node build.js" + }, + "version": "2.3.0" } diff --git a/node_modules/spdx-expression-parse/README.md b/node_modules/spdx-expression-parse/README.md index 514895b7d..9406462e3 100644 --- a/node_modules/spdx-expression-parse/README.md +++ b/node_modules/spdx-expression-parse/README.md @@ -39,7 +39,7 @@ The syntax comes from the [Software Package Data eXchange (SPDX)](https://spdx.o The bulk of the SPDX standard describes syntax and semantics of XML metadata files. This package implements two lightweight, plain-text components of that larger standard: -1. The [license list](https://spdx.org/licenses), a mapping from specific string identifiers, like `Apache-2.0`, to standard form license texts and bolt-on license exceptions. The [spdx-license-ids](https://www.npmjs.com/package/spdx-exceptions) and [spdx-exceptions](https://www.npmjs.com/package/spdx-license-ids) packages implement the license list. `spdx-expression-parse` depends on and `require()`s them. +1. The [license list](https://spdx.org/licenses), a mapping from specific string identifiers, like `Apache-2.0`, to standard form license texts and bolt-on license exceptions. The [spdx-license-ids](https://www.npmjs.com/package/spdx-license-ids) and [spdx-exceptions](https://www.npmjs.com/package/spdx-exceptions) packages implement the license list. `spdx-expression-parse` depends on and `require()`s them. Any license identifier from the license list is a valid license expression: diff --git a/node_modules/spdx-expression-parse/package.json b/node_modules/spdx-expression-parse/package.json index 959aac015..7329066e1 100644 --- a/node_modules/spdx-expression-parse/package.json +++ b/node_modules/spdx-expression-parse/package.json @@ -1,42 +1,37 @@ { - "_args": [ - [ - "spdx-expression-parse@3.0.0", - "/Users/drew.heavner/Documents/Github/sign-android-release" - ] - ], - "_development": true, - "_from": "spdx-expression-parse@3.0.0", - "_id": "spdx-expression-parse@3.0.0", + "_from": "spdx-expression-parse@^3.0.0", + "_id": "spdx-expression-parse@3.0.1", "_inBundle": false, - "_integrity": "sha512-Yg6D3XpRD4kkOmTpdgbUiEJFKghJH03fiC1OPll5h/0sO6neh2jqRDVHOQ4o/LMea0tgCkbMgea5ip/e+MkWyg==", + "_integrity": "sha512-cbqHunsQWnJNE6KhVSMsMeH5H/L9EpymbzqTQ3uLwNCLZ1Q481oWaofqH7nO6V07xlXwY6PhQdQ2IedWx/ZK4Q==", "_location": "/spdx-expression-parse", "_phantomChildren": {}, "_requested": { - "type": "version", + "type": "range", "registry": true, - "raw": "spdx-expression-parse@3.0.0", + "raw": "spdx-expression-parse@^3.0.0", "name": "spdx-expression-parse", "escapedName": "spdx-expression-parse", - "rawSpec": "3.0.0", + "rawSpec": "^3.0.0", "saveSpec": null, - "fetchSpec": "3.0.0" + "fetchSpec": "^3.0.0" }, "_requiredBy": [ "/spdx-correct", "/validate-npm-package-license" ], - "_resolved": "https://registry.npmjs.org/spdx-expression-parse/-/spdx-expression-parse-3.0.0.tgz", - "_spec": "3.0.0", - "_where": "/Users/drew.heavner/Documents/Github/sign-android-release", + "_resolved": "https://registry.npmjs.org/spdx-expression-parse/-/spdx-expression-parse-3.0.1.tgz", + "_shasum": "cf70f50482eefdc98e3ce0a6833e4a53ceeba679", + "_spec": "spdx-expression-parse@^3.0.0", + "_where": "/Users/drew.heavner/Documents/Github/sign-android-release/node_modules/validate-npm-package-license", "author": { "name": "Kyle E. Mitchell", "email": "kyle@kemitchell.com", - "url": "http://kemitchell.com" + "url": "https://kemitchell.com" }, "bugs": { "url": "https://github.com/jslicense/spdx-expression-parse.js/issues" }, + "bundleDependencies": false, "contributors": [ { "name": "C. Scott Ananian", @@ -61,12 +56,12 @@ "spdx-exceptions": "^2.1.0", "spdx-license-ids": "^3.0.0" }, + "deprecated": false, "description": "parse SPDX license expressions", "devDependencies": { - "defence-cli": "^2.0.1", - "mocha": "^3.4.2", + "defence-cli": "^3.0.1", "replace-require-self": "^1.0.0", - "standard": "^10.0.2" + "standard": "^14.1.0" }, "files": [ "AUTHORS", @@ -93,9 +88,9 @@ }, "scripts": { "lint": "standard", - "test": "npm run test:mocha && npm run test:readme", - "test:mocha": "mocha test/index.js", - "test:readme": "defence -i javascript README.md | replace-require-self | node" + "test": "npm run test:suite && npm run test:readme", + "test:readme": "defence -i javascript README.md | replace-require-self | node", + "test:suite": "node test.js" }, - "version": "3.0.0" + "version": "3.0.1" } diff --git a/node_modules/spdx-expression-parse/parse.js b/node_modules/spdx-expression-parse/parse.js index a4a52ce93..5a00b45c5 100644 --- a/node_modules/spdx-expression-parse/parse.js +++ b/node_modules/spdx-expression-parse/parse.js @@ -60,7 +60,7 @@ module.exports = function (tokens) { if (t.type === 'LICENSEREF') { next() string += 'LicenseRef-' + t.string - return {license: string} + return { license: string } } index = begin } @@ -69,7 +69,7 @@ module.exports = function (tokens) { var t = token() if (t && t.type === 'LICENSE') { next() - var node = {license: t.string} + var node = { license: t.string } if (parseOperator('+')) { node.plus = true } diff --git a/node_modules/spdx-expression-parse/scan.js b/node_modules/spdx-expression-parse/scan.js index d0567f494..b74fce2e2 100644 --- a/node_modules/spdx-expression-parse/scan.js +++ b/node_modules/spdx-expression-parse/scan.js @@ -70,14 +70,14 @@ module.exports = function (source) { function documentRef () { if (read('DocumentRef-')) { var string = expectIdstring() - return {type: 'DOCUMENTREF', string: string} + return { type: 'DOCUMENTREF', string: string } } } function licenseRef () { if (read('LicenseRef-')) { var string = expectIdstring() - return {type: 'LICENSEREF', string: string} + return { type: 'LICENSEREF', string: string } } } diff --git a/node_modules/spdx-license-ids/deprecated.json b/node_modules/spdx-license-ids/deprecated.json index 1681f4870..c7de09858 100644 --- a/node_modules/spdx-license-ids/deprecated.json +++ b/node_modules/spdx-license-ids/deprecated.json @@ -1,6 +1,8 @@ [ "AGPL-1.0", "AGPL-3.0", + "BSD-2-Clause-FreeBSD", + "BSD-2-Clause-NetBSD", "GFDL-1.1", "GFDL-1.2", "GFDL-1.3", diff --git a/node_modules/spdx-license-ids/index.json b/node_modules/spdx-license-ids/index.json index 5283c78dc..de2047329 100644 --- a/node_modules/spdx-license-ids/index.json +++ b/node_modules/spdx-license-ids/index.json @@ -35,9 +35,8 @@ "Artistic-2.0", "BSD-1-Clause", "BSD-2-Clause", - "BSD-2-Clause-FreeBSD", - "BSD-2-Clause-NetBSD", "BSD-2-Clause-Patent", + "BSD-2-Clause-Views", "BSD-3-Clause", "BSD-3-Clause-Attribution", "BSD-3-Clause-Clear", @@ -58,11 +57,14 @@ "BitTorrent-1.1", "BlueOak-1.0.0", "Borceux", + "CAL-1.0", + "CAL-1.0-Combined-Work-Exception", "CATOSL-1.1", "CC-BY-1.0", "CC-BY-2.0", "CC-BY-2.5", "CC-BY-3.0", + "CC-BY-3.0-AT", "CC-BY-4.0", "CC-BY-NC-1.0", "CC-BY-NC-2.0", @@ -73,6 +75,7 @@ "CC-BY-NC-ND-2.0", "CC-BY-NC-ND-2.5", "CC-BY-NC-ND-3.0", + "CC-BY-NC-ND-3.0-IGO", "CC-BY-NC-ND-4.0", "CC-BY-NC-SA-1.0", "CC-BY-NC-SA-2.0", @@ -88,6 +91,7 @@ "CC-BY-SA-2.0", "CC-BY-SA-2.5", "CC-BY-SA-3.0", + "CC-BY-SA-3.0-AT", "CC-BY-SA-4.0", "CC-PDDC", "CC0-1.0", @@ -103,6 +107,9 @@ "CECILL-C", "CERN-OHL-1.1", "CERN-OHL-1.2", + "CERN-OHL-P-2.0", + "CERN-OHL-S-2.0", + "CERN-OHL-W-2.0", "CNRI-Jython", "CNRI-Python", "CNRI-Python-GPL-Compatible", @@ -124,6 +131,7 @@ "ECL-2.0", "EFL-1.0", "EFL-2.0", + "EPICS", "EPL-1.0", "EPL-2.0", "EUDatagrid", @@ -140,13 +148,26 @@ "Fair", "Frameworx-1.0", "FreeImage", + "GFDL-1.1-invariants-only", + "GFDL-1.1-invariants-or-later", + "GFDL-1.1-no-invariants-only", + "GFDL-1.1-no-invariants-or-later", "GFDL-1.1-only", "GFDL-1.1-or-later", + "GFDL-1.2-invariants-only", + "GFDL-1.2-invariants-or-later", + "GFDL-1.2-no-invariants-only", + "GFDL-1.2-no-invariants-or-later", "GFDL-1.2-only", "GFDL-1.2-or-later", + "GFDL-1.3-invariants-only", + "GFDL-1.3-invariants-or-later", + "GFDL-1.3-no-invariants-only", + "GFDL-1.3-no-invariants-or-later", "GFDL-1.3-only", "GFDL-1.3-or-later", "GL2PS", + "GLWTPL", "GPL-1.0-only", "GPL-1.0-or-later", "GPL-2.0-only", @@ -159,6 +180,7 @@ "HPND", "HPND-sell-variant", "HaskellReport", + "Hippocratic-2.1", "IBM-pibs", "ICU", "IJG", @@ -214,12 +236,17 @@ "MakeIndex", "MirOS", "Motosoto", + "MulanPSL-1.0", + "MulanPSL-2.0", "Multics", "Mup", "NASA-1.3", "NBPL-1.0", + "NCGL-UK-2.0", "NCSA", "NGPL", + "NIST-PD", + "NIST-PD-fallback", "NLOD-1.0", "NLPL", "NOSL", @@ -228,18 +255,26 @@ "NPOSL-3.0", "NRL", "NTP", + "NTP-0", "Naumen", "Net-SNMP", "NetCDF", "Newsletr", "Nokia", "Noweb", + "O-UDA-1.0", "OCCT-PL", "OCLC-2.0", "ODC-By-1.0", "ODbL-1.0", "OFL-1.0", + "OFL-1.0-RFN", + "OFL-1.0-no-RFN", "OFL-1.1", + "OFL-1.1-RFN", + "OFL-1.1-no-RFN", + "OGC-1.0", + "OGL-Canada-2.0", "OGL-UK-1.0", "OGL-UK-2.0", "OGL-UK-3.0", @@ -272,8 +307,12 @@ "PDDL-1.0", "PHP-3.0", "PHP-3.01", + "PSF-2.0", "Parity-6.0.0", + "Parity-7.0.0", "Plexus", + "PolyForm-Noncommercial-1.0.0", + "PolyForm-Small-Business-1.0.0", "PostgreSQL", "Python-2.0", "QPL-1.0", @@ -299,6 +338,8 @@ "SMPPL", "SNIA", "SPL-1.0", + "SSH-OpenSSH", + "SSH-short", "SSPL-1.0", "SWL", "Saxpath", @@ -318,6 +359,7 @@ "TOSL", "TU-Berlin-1.0", "TU-Berlin-2.0", + "UCL-1.0", "UPL-1.0", "Unicode-DFS-2015", "Unicode-DFS-2016", @@ -356,10 +398,12 @@ "diffmark", "dvipdfm", "eGenix", + "etalab-2.0", "gSOAP-1.3b", "gnuplot", "iMatix", "libpng-2.0", + "libselinux-1.0", "libtiff", "mpich2", "psfrag", diff --git a/node_modules/spdx-license-ids/package.json b/node_modules/spdx-license-ids/package.json index 54e9d0016..9194b1440 100644 --- a/node_modules/spdx-license-ids/package.json +++ b/node_modules/spdx-license-ids/package.json @@ -1,41 +1,37 @@ { - "_args": [ - [ - "spdx-license-ids@3.0.5", - "/Users/drew.heavner/Documents/Github/sign-android-release" - ] - ], - "_development": true, - "_from": "spdx-license-ids@3.0.5", - "_id": "spdx-license-ids@3.0.5", + "_from": "spdx-license-ids@^3.0.0", + "_id": "spdx-license-ids@3.0.6", "_inBundle": false, - "_integrity": "sha512-J+FWzZoynJEXGphVIS+XEh3kFSjZX/1i9gFBaWQcB+/tmpe2qUsSBABpcxqxnAxFdiUFEgAX1bjYGQvIZmoz9Q==", + "_integrity": "sha512-+orQK83kyMva3WyPf59k1+Y525csj5JejicWut55zeTWANuN17qSiSLUXWtzHeNWORSvT7GLDJ/E/XiIWoXBTw==", "_location": "/spdx-license-ids", "_phantomChildren": {}, "_requested": { - "type": "version", + "type": "range", "registry": true, - "raw": "spdx-license-ids@3.0.5", + "raw": "spdx-license-ids@^3.0.0", "name": "spdx-license-ids", "escapedName": "spdx-license-ids", - "rawSpec": "3.0.5", + "rawSpec": "^3.0.0", "saveSpec": null, - "fetchSpec": "3.0.5" + "fetchSpec": "^3.0.0" }, "_requiredBy": [ "/spdx-correct", "/spdx-expression-parse" ], - "_resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.5.tgz", - "_spec": "3.0.5", - "_where": "/Users/drew.heavner/Documents/Github/sign-android-release", + "_resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.6.tgz", + "_shasum": "c80757383c28abf7296744998cbc106ae8b854ce", + "_spec": "spdx-license-ids@^3.0.0", + "_where": "/Users/drew.heavner/Documents/Github/sign-android-release/node_modules/spdx-correct", "author": { "name": "Shinnosuke Watanabe", "url": "https://github.com/shinnn" }, "bugs": { - "url": "https://github.com/shinnn/spdx-license-ids/issues" + "url": "https://github.com/jslicense/spdx-license-ids/issues" }, + "bundleDependencies": false, + "deprecated": false, "description": "A list of SPDX license identifiers", "devDependencies": { "@shinnn/eslint-config": "^6.8.7", @@ -52,7 +48,7 @@ "deprecated.json", "index.json" ], - "homepage": "https://github.com/shinnn/spdx-license-ids#readme", + "homepage": "https://github.com/jslicense/spdx-license-ids#readme", "keywords": [ "spdx", "license", @@ -68,12 +64,12 @@ "name": "spdx-license-ids", "repository": { "type": "git", - "url": "git+https://github.com/shinnn/spdx-license-ids.git" + "url": "git+https://github.com/jslicense/spdx-license-ids.git" }, "scripts": { "build": "node build.js", "pretest": "eslint .", "test": "node test.js" }, - "version": "3.0.5" + "version": "3.0.6" } diff --git a/node_modules/string-width/index.js b/node_modules/string-width/index.js index bbc49d29b..33c9d6c06 100644 --- a/node_modules/string-width/index.js +++ b/node_modules/string-width/index.js @@ -1,18 +1,21 @@ 'use strict'; const stripAnsi = require('strip-ansi'); const isFullwidthCodePoint = require('is-fullwidth-code-point'); +const emojiRegex = require('emoji-regex')(); -module.exports = str => { - if (typeof str !== 'string' || str.length === 0) { +module.exports = input => { + input = input.replace(emojiRegex, ' '); + + if (typeof input !== 'string' || input.length === 0) { return 0; } - str = stripAnsi(str); + input = stripAnsi(input); let width = 0; - for (let i = 0; i < str.length; i++) { - const code = str.codePointAt(i); + for (let i = 0; i < input.length; i++) { + const code = input.codePointAt(i); // Ignore control characters if (code <= 0x1F || (code >= 0x7F && code <= 0x9F)) { diff --git a/node_modules/string-width/node_modules/ansi-regex/index.js b/node_modules/string-width/node_modules/ansi-regex/index.js deleted file mode 100644 index c4aaecf50..000000000 --- a/node_modules/string-width/node_modules/ansi-regex/index.js +++ /dev/null @@ -1,10 +0,0 @@ -'use strict'; - -module.exports = () => { - const pattern = [ - '[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:[a-zA-Z\\d]*(?:;[a-zA-Z\\d]*)*)?\\u0007)', - '(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PRZcf-ntqry=><~]))' - ].join('|'); - - return new RegExp(pattern, 'g'); -}; diff --git a/node_modules/string-width/node_modules/ansi-regex/license b/node_modules/string-width/node_modules/ansi-regex/license deleted file mode 100644 index e7af2f771..000000000 --- a/node_modules/string-width/node_modules/ansi-regex/license +++ /dev/null @@ -1,9 +0,0 @@ -MIT License - -Copyright (c) Sindre Sorhus (sindresorhus.com) - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/string-width/node_modules/ansi-regex/package.json b/node_modules/string-width/node_modules/ansi-regex/package.json deleted file mode 100644 index ba132a248..000000000 --- a/node_modules/string-width/node_modules/ansi-regex/package.json +++ /dev/null @@ -1,89 +0,0 @@ -{ - "_args": [ - [ - "ansi-regex@3.0.0", - "/Users/drew.heavner/Documents/Github/sign-android-release" - ] - ], - "_development": true, - "_from": "ansi-regex@3.0.0", - "_id": "ansi-regex@3.0.0", - "_inBundle": false, - "_integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=", - "_location": "/string-width/ansi-regex", - "_phantomChildren": {}, - "_requested": { - "type": "version", - "registry": true, - "raw": "ansi-regex@3.0.0", - "name": "ansi-regex", - "escapedName": "ansi-regex", - "rawSpec": "3.0.0", - "saveSpec": null, - "fetchSpec": "3.0.0" - }, - "_requiredBy": [ - "/string-width/strip-ansi" - ], - "_resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", - "_spec": "3.0.0", - "_where": "/Users/drew.heavner/Documents/Github/sign-android-release", - "author": { - "name": "Sindre Sorhus", - "email": "sindresorhus@gmail.com", - "url": "sindresorhus.com" - }, - "bugs": { - "url": "https://github.com/chalk/ansi-regex/issues" - }, - "description": "Regular expression for matching ANSI escape codes", - "devDependencies": { - "ava": "*", - "xo": "*" - }, - "engines": { - "node": ">=4" - }, - "files": [ - "index.js" - ], - "homepage": "https://github.com/chalk/ansi-regex#readme", - "keywords": [ - "ansi", - "styles", - "color", - "colour", - "colors", - "terminal", - "console", - "cli", - "string", - "tty", - "escape", - "formatting", - "rgb", - "256", - "shell", - "xterm", - "command-line", - "text", - "regex", - "regexp", - "re", - "match", - "test", - "find", - "pattern" - ], - "license": "MIT", - "name": "ansi-regex", - "repository": { - "type": "git", - "url": "git+https://github.com/chalk/ansi-regex.git" - }, - "scripts": { - "test": "xo && ava", - "view-supported": "node fixtures/view-codes.js" - }, - "version": "3.0.0" -} diff --git a/node_modules/string-width/node_modules/ansi-regex/readme.md b/node_modules/string-width/node_modules/ansi-regex/readme.md deleted file mode 100644 index 22db1c340..000000000 --- a/node_modules/string-width/node_modules/ansi-regex/readme.md +++ /dev/null @@ -1,46 +0,0 @@ -# ansi-regex [![Build Status](https://travis-ci.org/chalk/ansi-regex.svg?branch=master)](https://travis-ci.org/chalk/ansi-regex) - -> Regular expression for matching [ANSI escape codes](https://en.wikipedia.org/wiki/ANSI_escape_code) - - -## Install - -``` -$ npm install ansi-regex -``` - - -## Usage - -```js -const ansiRegex = require('ansi-regex'); - -ansiRegex().test('\u001B[4mcake\u001B[0m'); -//=> true - -ansiRegex().test('cake'); -//=> false - -'\u001B[4mcake\u001B[0m'.match(ansiRegex()); -//=> ['\u001B[4m', '\u001B[0m'] -``` - - -## FAQ - -### Why do you test for codes not in the ECMA 48 standard? - -Some of the codes we run as a test are codes that we acquired finding various lists of non-standard or manufacturer specific codes. We test for both standard and non-standard codes, as most of them follow the same or similar format and can be safely matched in strings without the risk of removing actual string content. There are a few non-standard control codes that do not follow the traditional format (i.e. they end in numbers) thus forcing us to exclude them from the test because we cannot reliably match them. - -On the historical side, those ECMA standards were established in the early 90's whereas the VT100, for example, was designed in the mid/late 70's. At that point in time, control codes were still pretty ungoverned and engineers used them for a multitude of things, namely to activate hardware ports that may have been proprietary. Somewhere else you see a similar 'anarchy' of codes is in the x86 architecture for processors; there are a ton of "interrupts" that can mean different things on certain brands of processors, most of which have been phased out. - - -## Maintainers - -- [Sindre Sorhus](https://github.com/sindresorhus) -- [Josh Junon](https://github.com/qix-) - - -## License - -MIT diff --git a/node_modules/string-width/node_modules/strip-ansi/index.js b/node_modules/string-width/node_modules/strip-ansi/index.js deleted file mode 100644 index 96e0292c8..000000000 --- a/node_modules/string-width/node_modules/strip-ansi/index.js +++ /dev/null @@ -1,4 +0,0 @@ -'use strict'; -const ansiRegex = require('ansi-regex'); - -module.exports = input => typeof input === 'string' ? input.replace(ansiRegex(), '') : input; diff --git a/node_modules/string-width/node_modules/strip-ansi/license b/node_modules/string-width/node_modules/strip-ansi/license deleted file mode 100644 index e7af2f771..000000000 --- a/node_modules/string-width/node_modules/strip-ansi/license +++ /dev/null @@ -1,9 +0,0 @@ -MIT License - -Copyright (c) Sindre Sorhus (sindresorhus.com) - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/string-width/node_modules/strip-ansi/package.json b/node_modules/string-width/node_modules/strip-ansi/package.json deleted file mode 100644 index e2e8fe2a4..000000000 --- a/node_modules/string-width/node_modules/strip-ansi/package.json +++ /dev/null @@ -1,88 +0,0 @@ -{ - "_args": [ - [ - "strip-ansi@4.0.0", - "/Users/drew.heavner/Documents/Github/sign-android-release" - ] - ], - "_development": true, - "_from": "strip-ansi@4.0.0", - "_id": "strip-ansi@4.0.0", - "_inBundle": false, - "_integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", - "_location": "/string-width/strip-ansi", - "_phantomChildren": {}, - "_requested": { - "type": "version", - "registry": true, - "raw": "strip-ansi@4.0.0", - "name": "strip-ansi", - "escapedName": "strip-ansi", - "rawSpec": "4.0.0", - "saveSpec": null, - "fetchSpec": "4.0.0" - }, - "_requiredBy": [ - "/string-width" - ], - "_resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", - "_spec": "4.0.0", - "_where": "/Users/drew.heavner/Documents/Github/sign-android-release", - "author": { - "name": "Sindre Sorhus", - "email": "sindresorhus@gmail.com", - "url": "sindresorhus.com" - }, - "bugs": { - "url": "https://github.com/chalk/strip-ansi/issues" - }, - "dependencies": { - "ansi-regex": "^3.0.0" - }, - "description": "Strip ANSI escape codes", - "devDependencies": { - "ava": "*", - "xo": "*" - }, - "engines": { - "node": ">=4" - }, - "files": [ - "index.js" - ], - "homepage": "https://github.com/chalk/strip-ansi#readme", - "keywords": [ - "strip", - "trim", - "remove", - "ansi", - "styles", - "color", - "colour", - "colors", - "terminal", - "console", - "string", - "tty", - "escape", - "formatting", - "rgb", - "256", - "shell", - "xterm", - "log", - "logging", - "command-line", - "text" - ], - "license": "MIT", - "name": "strip-ansi", - "repository": { - "type": "git", - "url": "git+https://github.com/chalk/strip-ansi.git" - }, - "scripts": { - "test": "xo && ava" - }, - "version": "4.0.0" -} diff --git a/node_modules/string-width/node_modules/strip-ansi/readme.md b/node_modules/string-width/node_modules/strip-ansi/readme.md deleted file mode 100644 index dc76f0cb1..000000000 --- a/node_modules/string-width/node_modules/strip-ansi/readme.md +++ /dev/null @@ -1,39 +0,0 @@ -# strip-ansi [![Build Status](https://travis-ci.org/chalk/strip-ansi.svg?branch=master)](https://travis-ci.org/chalk/strip-ansi) - -> Strip [ANSI escape codes](https://en.wikipedia.org/wiki/ANSI_escape_code) - - -## Install - -``` -$ npm install strip-ansi -``` - - -## Usage - -```js -const stripAnsi = require('strip-ansi'); - -stripAnsi('\u001B[4mUnicorn\u001B[0m'); -//=> 'Unicorn' -``` - - -## Related - -- [strip-ansi-cli](https://github.com/chalk/strip-ansi-cli) - CLI for this module -- [has-ansi](https://github.com/chalk/has-ansi) - Check if a string has ANSI escape codes -- [ansi-regex](https://github.com/chalk/ansi-regex) - Regular expression for matching ANSI escape codes -- [chalk](https://github.com/chalk/chalk) - Terminal string styling done right - - -## Maintainers - -- [Sindre Sorhus](https://github.com/sindresorhus) -- [Josh Junon](https://github.com/qix-) - - -## License - -MIT diff --git a/node_modules/string-width/package.json b/node_modules/string-width/package.json index c6372af51..0cdffa1bd 100644 --- a/node_modules/string-width/package.json +++ b/node_modules/string-width/package.json @@ -1,34 +1,30 @@ { - "_args": [ - [ - "string-width@2.1.1", - "/Users/drew.heavner/Documents/Github/sign-android-release" - ] - ], - "_development": true, - "_from": "string-width@2.1.1", - "_id": "string-width@2.1.1", + "_from": "string-width@^3.0.0", + "_id": "string-width@3.1.0", "_inBundle": false, - "_integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==", + "_integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==", "_location": "/string-width", "_phantomChildren": {}, "_requested": { - "type": "version", + "type": "range", "registry": true, - "raw": "string-width@2.1.1", + "raw": "string-width@^3.0.0", "name": "string-width", "escapedName": "string-width", - "rawSpec": "2.1.1", + "rawSpec": "^3.0.0", "saveSpec": null, - "fetchSpec": "2.1.1" + "fetchSpec": "^3.0.0" }, "_requiredBy": [ "/cliui", + "/jest/jest-cli/yargs", + "/wrap-ansi", "/yargs" ], - "_resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz", - "_spec": "2.1.1", - "_where": "/Users/drew.heavner/Documents/Github/sign-android-release", + "_resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz", + "_shasum": "22767be21b62af1081574306f69ac51b62203961", + "_spec": "string-width@^3.0.0", + "_where": "/Users/drew.heavner/Documents/Github/sign-android-release/node_modules/yargs", "author": { "name": "Sindre Sorhus", "email": "sindresorhus@gmail.com", @@ -37,17 +33,20 @@ "bugs": { "url": "https://github.com/sindresorhus/string-width/issues" }, + "bundleDependencies": false, "dependencies": { + "emoji-regex": "^7.0.1", "is-fullwidth-code-point": "^2.0.0", - "strip-ansi": "^4.0.0" + "strip-ansi": "^5.1.0" }, + "deprecated": false, "description": "Get the visual width of a string - the number of columns required to display it", "devDependencies": { - "ava": "*", - "xo": "*" + "ava": "^1.0.1", + "xo": "^0.23.0" }, "engines": { - "node": ">=4" + "node": ">=6" }, "files": [ "index.js" @@ -88,5 +87,5 @@ "scripts": { "test": "xo && ava" }, - "version": "2.1.1" + "version": "3.1.0" } diff --git a/node_modules/string-width/readme.md b/node_modules/string-width/readme.md index df5b7199f..d39d95f56 100644 --- a/node_modules/string-width/readme.md +++ b/node_modules/string-width/readme.md @@ -27,6 +27,9 @@ stringWidth('\u001b[1m古\u001b[22m'); stringWidth('a'); //=> 1 + +stringWidth('\u001B]8;;https://github.com\u0007Click\u001B]8;;\u0007'); +// => 5 ``` diff --git a/node_modules/string_decoder/.travis.yml b/node_modules/string_decoder/.travis.yml deleted file mode 100644 index 3347a7254..000000000 --- a/node_modules/string_decoder/.travis.yml +++ /dev/null @@ -1,50 +0,0 @@ -sudo: false -language: node_js -before_install: - - npm install -g npm@2 - - test $NPM_LEGACY && npm install -g npm@latest-3 || npm install npm -g -notifications: - email: false -matrix: - fast_finish: true - include: - - node_js: '0.8' - env: - - TASK=test - - NPM_LEGACY=true - - node_js: '0.10' - env: - - TASK=test - - NPM_LEGACY=true - - node_js: '0.11' - env: - - TASK=test - - NPM_LEGACY=true - - node_js: '0.12' - env: - - TASK=test - - NPM_LEGACY=true - - node_js: 1 - env: - - TASK=test - - NPM_LEGACY=true - - node_js: 2 - env: - - TASK=test - - NPM_LEGACY=true - - node_js: 3 - env: - - TASK=test - - NPM_LEGACY=true - - node_js: 4 - env: TASK=test - - node_js: 5 - env: TASK=test - - node_js: 6 - env: TASK=test - - node_js: 7 - env: TASK=test - - node_js: 8 - env: TASK=test - - node_js: 9 - env: TASK=test diff --git a/node_modules/string_decoder/LICENSE b/node_modules/string_decoder/LICENSE deleted file mode 100644 index 778edb207..000000000 --- a/node_modules/string_decoder/LICENSE +++ /dev/null @@ -1,48 +0,0 @@ -Node.js is licensed for use as follows: - -""" -Copyright Node.js contributors. All rights reserved. - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to -deal in the Software without restriction, including without limitation the -rights to use, copy, modify, merge, publish, distribute, sublicense, and/or -sell copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS -IN THE SOFTWARE. -""" - -This license applies to parts of Node.js originating from the -https://github.com/joyent/node repository: - -""" -Copyright Joyent, Inc. and other Node contributors. All rights reserved. -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to -deal in the Software without restriction, including without limitation the -rights to use, copy, modify, merge, publish, distribute, sublicense, and/or -sell copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS -IN THE SOFTWARE. -""" - diff --git a/node_modules/string_decoder/README.md b/node_modules/string_decoder/README.md deleted file mode 100644 index 5fd58315e..000000000 --- a/node_modules/string_decoder/README.md +++ /dev/null @@ -1,47 +0,0 @@ -# string_decoder - -***Node-core v8.9.4 string_decoder for userland*** - - -[![NPM](https://nodei.co/npm/string_decoder.png?downloads=true&downloadRank=true)](https://nodei.co/npm/string_decoder/) -[![NPM](https://nodei.co/npm-dl/string_decoder.png?&months=6&height=3)](https://nodei.co/npm/string_decoder/) - - -```bash -npm install --save string_decoder -``` - -***Node-core string_decoder for userland*** - -This package is a mirror of the string_decoder implementation in Node-core. - -Full documentation may be found on the [Node.js website](https://nodejs.org/dist/v8.9.4/docs/api/). - -As of version 1.0.0 **string_decoder** uses semantic versioning. - -## Previous versions - -Previous version numbers match the versions found in Node core, e.g. 0.10.24 matches Node 0.10.24, likewise 0.11.10 matches Node 0.11.10. - -## Update - -The *build/* directory contains a build script that will scrape the source from the [nodejs/node](https://github.com/nodejs/node) repo given a specific Node version. - -## Streams Working Group - -`string_decoder` is maintained by the Streams Working Group, which -oversees the development and maintenance of the Streams API within -Node.js. The responsibilities of the Streams Working Group include: - -* Addressing stream issues on the Node.js issue tracker. -* Authoring and editing stream documentation within the Node.js project. -* Reviewing changes to stream subclasses within the Node.js project. -* Redirecting changes to streams from the Node.js project to this - project. -* Assisting in the implementation of stream providers within Node.js. -* Recommending versions of `readable-stream` to be included in Node.js. -* Messaging about the future of streams to give the community advance - notice of changes. - -See [readable-stream](https://github.com/nodejs/readable-stream) for -more details. diff --git a/node_modules/string_decoder/lib/string_decoder.js b/node_modules/string_decoder/lib/string_decoder.js deleted file mode 100644 index 2e89e63f7..000000000 --- a/node_modules/string_decoder/lib/string_decoder.js +++ /dev/null @@ -1,296 +0,0 @@ -// Copyright Joyent, Inc. and other Node contributors. -// -// Permission is hereby granted, free of charge, to any person obtaining a -// copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to permit -// persons to whom the Software is furnished to do so, subject to the -// following conditions: -// -// The above copyright notice and this permission notice shall be included -// in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN -// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE -// USE OR OTHER DEALINGS IN THE SOFTWARE. - -'use strict'; - -/**/ - -var Buffer = require('safe-buffer').Buffer; -/**/ - -var isEncoding = Buffer.isEncoding || function (encoding) { - encoding = '' + encoding; - switch (encoding && encoding.toLowerCase()) { - case 'hex':case 'utf8':case 'utf-8':case 'ascii':case 'binary':case 'base64':case 'ucs2':case 'ucs-2':case 'utf16le':case 'utf-16le':case 'raw': - return true; - default: - return false; - } -}; - -function _normalizeEncoding(enc) { - if (!enc) return 'utf8'; - var retried; - while (true) { - switch (enc) { - case 'utf8': - case 'utf-8': - return 'utf8'; - case 'ucs2': - case 'ucs-2': - case 'utf16le': - case 'utf-16le': - return 'utf16le'; - case 'latin1': - case 'binary': - return 'latin1'; - case 'base64': - case 'ascii': - case 'hex': - return enc; - default: - if (retried) return; // undefined - enc = ('' + enc).toLowerCase(); - retried = true; - } - } -}; - -// Do not cache `Buffer.isEncoding` when checking encoding names as some -// modules monkey-patch it to support additional encodings -function normalizeEncoding(enc) { - var nenc = _normalizeEncoding(enc); - if (typeof nenc !== 'string' && (Buffer.isEncoding === isEncoding || !isEncoding(enc))) throw new Error('Unknown encoding: ' + enc); - return nenc || enc; -} - -// StringDecoder provides an interface for efficiently splitting a series of -// buffers into a series of JS strings without breaking apart multi-byte -// characters. -exports.StringDecoder = StringDecoder; -function StringDecoder(encoding) { - this.encoding = normalizeEncoding(encoding); - var nb; - switch (this.encoding) { - case 'utf16le': - this.text = utf16Text; - this.end = utf16End; - nb = 4; - break; - case 'utf8': - this.fillLast = utf8FillLast; - nb = 4; - break; - case 'base64': - this.text = base64Text; - this.end = base64End; - nb = 3; - break; - default: - this.write = simpleWrite; - this.end = simpleEnd; - return; - } - this.lastNeed = 0; - this.lastTotal = 0; - this.lastChar = Buffer.allocUnsafe(nb); -} - -StringDecoder.prototype.write = function (buf) { - if (buf.length === 0) return ''; - var r; - var i; - if (this.lastNeed) { - r = this.fillLast(buf); - if (r === undefined) return ''; - i = this.lastNeed; - this.lastNeed = 0; - } else { - i = 0; - } - if (i < buf.length) return r ? r + this.text(buf, i) : this.text(buf, i); - return r || ''; -}; - -StringDecoder.prototype.end = utf8End; - -// Returns only complete characters in a Buffer -StringDecoder.prototype.text = utf8Text; - -// Attempts to complete a partial non-UTF-8 character using bytes from a Buffer -StringDecoder.prototype.fillLast = function (buf) { - if (this.lastNeed <= buf.length) { - buf.copy(this.lastChar, this.lastTotal - this.lastNeed, 0, this.lastNeed); - return this.lastChar.toString(this.encoding, 0, this.lastTotal); - } - buf.copy(this.lastChar, this.lastTotal - this.lastNeed, 0, buf.length); - this.lastNeed -= buf.length; -}; - -// Checks the type of a UTF-8 byte, whether it's ASCII, a leading byte, or a -// continuation byte. If an invalid byte is detected, -2 is returned. -function utf8CheckByte(byte) { - if (byte <= 0x7F) return 0;else if (byte >> 5 === 0x06) return 2;else if (byte >> 4 === 0x0E) return 3;else if (byte >> 3 === 0x1E) return 4; - return byte >> 6 === 0x02 ? -1 : -2; -} - -// Checks at most 3 bytes at the end of a Buffer in order to detect an -// incomplete multi-byte UTF-8 character. The total number of bytes (2, 3, or 4) -// needed to complete the UTF-8 character (if applicable) are returned. -function utf8CheckIncomplete(self, buf, i) { - var j = buf.length - 1; - if (j < i) return 0; - var nb = utf8CheckByte(buf[j]); - if (nb >= 0) { - if (nb > 0) self.lastNeed = nb - 1; - return nb; - } - if (--j < i || nb === -2) return 0; - nb = utf8CheckByte(buf[j]); - if (nb >= 0) { - if (nb > 0) self.lastNeed = nb - 2; - return nb; - } - if (--j < i || nb === -2) return 0; - nb = utf8CheckByte(buf[j]); - if (nb >= 0) { - if (nb > 0) { - if (nb === 2) nb = 0;else self.lastNeed = nb - 3; - } - return nb; - } - return 0; -} - -// Validates as many continuation bytes for a multi-byte UTF-8 character as -// needed or are available. If we see a non-continuation byte where we expect -// one, we "replace" the validated continuation bytes we've seen so far with -// a single UTF-8 replacement character ('\ufffd'), to match v8's UTF-8 decoding -// behavior. The continuation byte check is included three times in the case -// where all of the continuation bytes for a character exist in the same buffer. -// It is also done this way as a slight performance increase instead of using a -// loop. -function utf8CheckExtraBytes(self, buf, p) { - if ((buf[0] & 0xC0) !== 0x80) { - self.lastNeed = 0; - return '\ufffd'; - } - if (self.lastNeed > 1 && buf.length > 1) { - if ((buf[1] & 0xC0) !== 0x80) { - self.lastNeed = 1; - return '\ufffd'; - } - if (self.lastNeed > 2 && buf.length > 2) { - if ((buf[2] & 0xC0) !== 0x80) { - self.lastNeed = 2; - return '\ufffd'; - } - } - } -} - -// Attempts to complete a multi-byte UTF-8 character using bytes from a Buffer. -function utf8FillLast(buf) { - var p = this.lastTotal - this.lastNeed; - var r = utf8CheckExtraBytes(this, buf, p); - if (r !== undefined) return r; - if (this.lastNeed <= buf.length) { - buf.copy(this.lastChar, p, 0, this.lastNeed); - return this.lastChar.toString(this.encoding, 0, this.lastTotal); - } - buf.copy(this.lastChar, p, 0, buf.length); - this.lastNeed -= buf.length; -} - -// Returns all complete UTF-8 characters in a Buffer. If the Buffer ended on a -// partial character, the character's bytes are buffered until the required -// number of bytes are available. -function utf8Text(buf, i) { - var total = utf8CheckIncomplete(this, buf, i); - if (!this.lastNeed) return buf.toString('utf8', i); - this.lastTotal = total; - var end = buf.length - (total - this.lastNeed); - buf.copy(this.lastChar, 0, end); - return buf.toString('utf8', i, end); -} - -// For UTF-8, a replacement character is added when ending on a partial -// character. -function utf8End(buf) { - var r = buf && buf.length ? this.write(buf) : ''; - if (this.lastNeed) return r + '\ufffd'; - return r; -} - -// UTF-16LE typically needs two bytes per character, but even if we have an even -// number of bytes available, we need to check if we end on a leading/high -// surrogate. In that case, we need to wait for the next two bytes in order to -// decode the last character properly. -function utf16Text(buf, i) { - if ((buf.length - i) % 2 === 0) { - var r = buf.toString('utf16le', i); - if (r) { - var c = r.charCodeAt(r.length - 1); - if (c >= 0xD800 && c <= 0xDBFF) { - this.lastNeed = 2; - this.lastTotal = 4; - this.lastChar[0] = buf[buf.length - 2]; - this.lastChar[1] = buf[buf.length - 1]; - return r.slice(0, -1); - } - } - return r; - } - this.lastNeed = 1; - this.lastTotal = 2; - this.lastChar[0] = buf[buf.length - 1]; - return buf.toString('utf16le', i, buf.length - 1); -} - -// For UTF-16LE we do not explicitly append special replacement characters if we -// end on a partial character, we simply let v8 handle that. -function utf16End(buf) { - var r = buf && buf.length ? this.write(buf) : ''; - if (this.lastNeed) { - var end = this.lastTotal - this.lastNeed; - return r + this.lastChar.toString('utf16le', 0, end); - } - return r; -} - -function base64Text(buf, i) { - var n = (buf.length - i) % 3; - if (n === 0) return buf.toString('base64', i); - this.lastNeed = 3 - n; - this.lastTotal = 3; - if (n === 1) { - this.lastChar[0] = buf[buf.length - 1]; - } else { - this.lastChar[0] = buf[buf.length - 2]; - this.lastChar[1] = buf[buf.length - 1]; - } - return buf.toString('base64', i, buf.length - n); -} - -function base64End(buf) { - var r = buf && buf.length ? this.write(buf) : ''; - if (this.lastNeed) return r + this.lastChar.toString('base64', 0, 3 - this.lastNeed); - return r; -} - -// Pass bytes on through for single-byte encodings (e.g. ascii, latin1, hex) -function simpleWrite(buf) { - return buf.toString(this.encoding); -} - -function simpleEnd(buf) { - return buf && buf.length ? this.write(buf) : ''; -} \ No newline at end of file diff --git a/node_modules/string_decoder/package.json b/node_modules/string_decoder/package.json deleted file mode 100644 index 2d9389f35..000000000 --- a/node_modules/string_decoder/package.json +++ /dev/null @@ -1,63 +0,0 @@ -{ - "_args": [ - [ - "string_decoder@1.1.1", - "/Users/drew.heavner/Documents/Github/sign-android-release" - ] - ], - "_development": true, - "_from": "string_decoder@1.1.1", - "_id": "string_decoder@1.1.1", - "_inBundle": false, - "_integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", - "_location": "/string_decoder", - "_phantomChildren": {}, - "_requested": { - "type": "version", - "registry": true, - "raw": "string_decoder@1.1.1", - "name": "string_decoder", - "escapedName": "string_decoder", - "rawSpec": "1.1.1", - "saveSpec": null, - "fetchSpec": "1.1.1" - }, - "_requiredBy": [ - "/readable-stream" - ], - "_resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", - "_spec": "1.1.1", - "_where": "/Users/drew.heavner/Documents/Github/sign-android-release", - "bugs": { - "url": "https://github.com/nodejs/string_decoder/issues" - }, - "dependencies": { - "safe-buffer": "~5.1.0" - }, - "description": "The string_decoder module from Node core", - "devDependencies": { - "babel-polyfill": "^6.23.0", - "core-util-is": "^1.0.2", - "inherits": "^2.0.3", - "tap": "~0.4.8" - }, - "homepage": "https://github.com/nodejs/string_decoder", - "keywords": [ - "string", - "decoder", - "browser", - "browserify" - ], - "license": "MIT", - "main": "lib/string_decoder.js", - "name": "string_decoder", - "repository": { - "type": "git", - "url": "git://github.com/nodejs/string_decoder.git" - }, - "scripts": { - "ci": "tap test/parallel/*.js test/ours/*.js --tap | tee test.tap && node test/verify-dependencies.js", - "test": "tap test/parallel/*.js && node test/verify-dependencies" - }, - "version": "1.1.1" -} diff --git a/node_modules/ts-jest/.gitattributes b/node_modules/ts-jest/.gitattributes deleted file mode 100644 index 1addbfe52..000000000 --- a/node_modules/ts-jest/.gitattributes +++ /dev/null @@ -1,2 +0,0 @@ -package-lock.json -diff -merge -package-lock.json linguist-generated=true diff --git a/node_modules/ts-jest/.ts-jest-digest b/node_modules/ts-jest/.ts-jest-digest index 31654a4f2..9d71c512d 100644 --- a/node_modules/ts-jest/.ts-jest-digest +++ b/node_modules/ts-jest/.ts-jest-digest @@ -1 +1 @@ -0aceab77a1f613fedb22a0395a65327e834ef35c \ No newline at end of file +a9a5dc2939780dca25d373663e916519b0ac2dfb \ No newline at end of file diff --git a/node_modules/ts-jest/CHANGELOG.md b/node_modules/ts-jest/CHANGELOG.md index 904b6529f..521fc6ee5 100644 --- a/node_modules/ts-jest/CHANGELOG.md +++ b/node_modules/ts-jest/CHANGELOG.md @@ -1,3 +1,433 @@ +## [26.4.4](https://github.com/kulshekhar/ts-jest/compare/v26.4.3...v26.4.4) (2020-11-08) + + +### Bug Fixes + +* revert usage of `@jest/create-cache-key-function` ([#2108](https://github.com/kulshekhar/ts-jest/issues/2108)) ([dee8231](https://github.com/kulshekhar/ts-jest/commit/dee823172ce1e8eb9e0b2dd3aeed1ab4033bd0d9)), closes [#2080](https://github.com/kulshekhar/ts-jest/issues/2080) [#2090](https://github.com/kulshekhar/ts-jest/issues/2090) [#2104](https://github.com/kulshekhar/ts-jest/issues/2104) + + +### Features + +* **testing:** expose all types for util `mocked` ([#2096](https://github.com/kulshekhar/ts-jest/issues/2096)) ([b1d072b](https://github.com/kulshekhar/ts-jest/commit/b1d072b52b9a7665b3a6914b0895f84f6ee3f8c0)), closes [#2086](https://github.com/kulshekhar/ts-jest/issues/2086) + + + +## [26.4.3](https://github.com/kulshekhar/ts-jest/compare/v26.4.2...v26.4.3) (2020-10-26) + + +### Bug Fixes + +* **compiler:** only exclude test files when initializing compiler ([#2062](https://github.com/kulshekhar/ts-jest/issues/2062)) ([7264c13](https://github.com/kulshekhar/ts-jest/commit/7264c137114b6dd895624e3476dd7ec57b64ee13)), closes [#2061](https://github.com/kulshekhar/ts-jest/issues/2061), [#2068](https://github.com/kulshekhar/ts-jest/issues/2068), [#2072](https://github.com/kulshekhar/ts-jest/issues/2072), [#2073](https://github.com/kulshekhar/ts-jest/issues/2073) +* **config:** resolve `.babelrc` file path before attempting to read it ([#2071](https://github.com/kulshekhar/ts-jest/issues/2071)) ([681bfef](https://github.com/kulshekhar/ts-jest/commit/681bfef41744f09cd50b71072f4d001cb58da82e)), closes [#2064](https://github.com/kulshekhar/ts-jest/issues/2064) + + +### Features + +* **config:** allow to override resolve tsconfig behavior ([#2063](https://github.com/kulshekhar/ts-jest/issues/2063)) ([9f46ace](https://github.com/kulshekhar/ts-jest/commit/9f46acefceb1fa71ee2e8b3b3c172ceb0544b4c4)) + + + +## [26.4.2](https://github.com/kulshekhar/ts-jest/compare/v26.4.1...v26.4.2) (2020-10-23) + + +### Features + +* **config:** expose several typings as public apis ([#2054](https://github.com/kulshekhar/ts-jest/issues/2054)) ([3b6b705](https://github.com/kulshekhar/ts-jest/commit/3b6b7055e2b9c74e81fb91596c807ace02ab77a1)) + + +### Performance Improvements + +* **compiler:** speed up bootstrap time for `isolatedModules:false` ([#2055](https://github.com/kulshekhar/ts-jest/issues/2055)) ([230b5dd](https://github.com/kulshekhar/ts-jest/commit/230b5ddbee55357d25dd190cd45aa8a30d7f31e0)) + + +### DEPRECATIONS + +* **config**: deprecate `tsConfig` in favor of `tsconfig` ([#1997](https://github.com/kulshekhar/ts-jest/pull/1997)) +* **config**: deprecate `packageJson` since internal codes don't use it anymore ([#2034](https://github.com/kulshekhar/ts-jest/pull/2034)) + + + +## [26.4.1](https://github.com/kulshekhar/ts-jest/compare/v26.4.0...v26.4.1) (2020-09-29) + + +### Bug Fixes + +* **utils:** `MaybeMockedConstructor` returns T ([#1976](https://github.com/kulshekhar/ts-jest/issues/1976)) ([b7712b2](https://github.com/kulshekhar/ts-jest/commit/b7712b2055d8f32dd97999de1d94e8f3515d79e8)) +* **utils:** revert `path.join` and add check on prefix ends with `/` ([#1989](https://github.com/kulshekhar/ts-jest/issues/1989)) ([3d9035b](https://github.com/kulshekhar/ts-jest/commit/3d9035bd70dc087d4c5a943bb2fe2af2d0822875)), closes [#1982](https://github.com/kulshekhar/ts-jest/issues/1982) + + + +# [26.4.0](https://github.com/kulshekhar/ts-jest/compare/v26.3.0...v26.4.0) (2020-09-20) + + +### Bug Fixes + +* **utils:** `pathsToModuleNameMapper` resolve path mapping with `path.join` ([#1969](https://github.com/kulshekhar/ts-jest/issues/1969)) ([81fce4c](https://github.com/kulshekhar/ts-jest/commit/81fce4c090811a1cc071579a99dc193fb976b117)), closes [#1968](https://github.com/kulshekhar/ts-jest/issues/1968) +* set minimum `jest-util` version at 26.1.0 ([#1914](https://github.com/kulshekhar/ts-jest/issues/1914)) ([f00414c](https://github.com/kulshekhar/ts-jest/commit/f00414c6fbf8fc5413fd33d0a271c4a164c50d45)), closes [#1913](https://github.com/kulshekhar/ts-jest/issues/1913) + + +### Features + +* **config:** allow custom options in custom transformers ([#1966](https://github.com/kulshekhar/ts-jest/issues/1966)) ([1452ce4](https://github.com/kulshekhar/ts-jest/commit/1452ce4afcd36049cddd0db0861f1ac26b66f8c1)), closes [#1942](https://github.com/kulshekhar/ts-jest/issues/1942) +* **transformers:** support hoisting when using `@jest/globals` ([#1937](https://github.com/kulshekhar/ts-jest/issues/1937)) ([0e5be15](https://github.com/kulshekhar/ts-jest/commit/0e5be1597d755fed11869f67df05eeea54b3106f)), closes [#1593](https://github.com/kulshekhar/ts-jest/issues/1593) +* **transformers:** add `path-mapping` custom AST transformer ([#1927](https://github.com/kulshekhar/ts-jest/issues/1927)) ([3325186](https://github.com/kulshekhar/ts-jest/commit/3325186b6e55f41eb9bf7d81e092a358fc402b13)) + + +### Performance Improvements + +* **compiler:** remove `createProgram` for `isolatedModules: true` to boost startup speed ([#1941](https://github.com/kulshekhar/ts-jest/issues/1941)) ([dd84534](https://github.com/kulshekhar/ts-jest/commit/dd8453401840862186f991e2d514e0d328a67987)) + + + +# [26.3.0](https://github.com/kulshekhar/ts-jest/compare/v26.2.0...v26.3.0) (2020-08-25) + + +### Bug Fixes + +* **config:** compute cache key without reading `package.json` ([#1893](https://github.com/kulshekhar/ts-jest/issues/1893)) ([4875a58](https://github.com/kulshekhar/ts-jest/commit/4875a58345666e0407f9f5b3f95049ae2c9d056d)), closes [#1892](https://github.com/kulshekhar/ts-jest/issues/1892) + + +### Features + +* support TypeScript 4.0 ([#1889](https://github.com/kulshekhar/ts-jest/issues/1889)) ([f070e93](https://github.com/kulshekhar/ts-jest/commit/f070e9334a9cf31fa6f0d73b3f69d805be72601d)) + + + +# [26.2.0](https://github.com/kulshekhar/ts-jest/compare/v26.1.4...v26.2.0) (2020-08-11) + + +### Bug Fixes + +* move `@types/jest` to dependencies to work well with yarn 2 ([#1859](https://github.com/kulshekhar/ts-jest/issues/1859)) ([5eb1389](https://github.com/kulshekhar/ts-jest/commit/5eb1389caaa0431e49ae6ca26b18e290208e0a0a)), closes [#1857](https://github.com/kulshekhar/ts-jest/issues/1857) + + +### Features + +* **config:** support `after` and `afterDeclarations` AST transformers ([#1831](https://github.com/kulshekhar/ts-jest/issues/1831)) ([be20a7c](https://github.com/kulshekhar/ts-jest/commit/be20a7c78c97027b33aec178da0f533095790871)) +* allow opt-out version warning message by environment variable `TS_JEST_DISABLE_VER_CHECKER` ([#1821](https://github.com/kulshekhar/ts-jest/issues/1821)) ([e6b42fc](https://github.com/kulshekhar/ts-jest/commit/e6b42fcd7a75c7b14e636a45cda04de18a46908b)), closes [#1774](https://github.com/kulshekhar/ts-jest/issues/1774) + + + +## [26.1.4](https://github.com/kulshekhar/ts-jest/compare/v26.1.3...v26.1.4) (2020-07-28) + + +### Bug Fixes + +* **compiler:** check if test file exists before doing type check ([#1827](https://github.com/kulshekhar/ts-jest/issues/1827)) ([cc89d5b](https://github.com/kulshekhar/ts-jest/commit/cc89d5b1f912975cd29114c5b3b0bf18426816da)), closes [#1506](https://github.com/kulshekhar/ts-jest/issues/1506) + + + +## [26.1.3](https://github.com/kulshekhar/ts-jest/compare/v26.1.2...v26.1.3) (2020-07-16) + + +### Bug Fixes + +* revert [#1793](https://github.com/kulshekhar/ts-jest/issues/1793) ([#1804](https://github.com/kulshekhar/ts-jest/issues/1804)) ([5095525](https://github.com/kulshekhar/ts-jest/commit/5095525333c8579c9c5e7f3149294b31f28d6774)) + + + +## [26.1.2](https://github.com/kulshekhar/ts-jest/compare/v26.1.1...v26.1.2) (2020-07-13) + + +### Bug Fixes + +* **compiler:** use `resolveModuleNames` TypeScript API to get resolved modules for test files ([#1784](https://github.com/kulshekhar/ts-jest/issues/1784)) ([5f26054](https://github.com/kulshekhar/ts-jest/commit/5f2605457e94b548bd7b9b28fc968554f7eefa91)), closes [#1747](https://github.com/kulshekhar/ts-jest/issues/1747) +* **config:** invalidate cache when other options in `tsconfig` change ([#1788](https://github.com/kulshekhar/ts-jest/issues/1788)) ([6948855](https://github.com/kulshekhar/ts-jest/commit/69488552eca2846f3fc6ba86ab49d7893caaf521)) + + +### Performance Improvements + +* **compiler:** cache module resolution for `isolatedModules: false` ([#1786](https://github.com/kulshekhar/ts-jest/issues/1786)) ([7f731ed](https://github.com/kulshekhar/ts-jest/commit/7f731ed8a02755aeb41ecb27df4eaf16db2ddd95)) +* **compiler:** use `globsToMatcher` from `jest-util` ([#1754](https://github.com/kulshekhar/ts-jest/issues/1754)) ([44f3913](https://github.com/kulshekhar/ts-jest/commit/44f3913c2a017734ed87346b1c5fbec639d02062)) + + + + +## [26.1.1](https://github.com/kulshekhar/ts-jest/compare/v26.1.0...v26.1.1) (2020-06-21) + + +### Bug Fixes + +* **compiler:** generate source map correctly when tsconfig `mapRoot` is set ([#1741](https://github.com/kulshekhar/ts-jest/issues/1741)) ([01ac417](https://github.com/kulshekhar/ts-jest/commit/01ac417)), closes [#1718](https://github.com/kulshekhar/ts-jest/issues/1718) +* **config:** show version warning when using ts-jest without babel ([#1729](https://github.com/kulshekhar/ts-jest/issues/1729)) ([e512bc0](https://github.com/kulshekhar/ts-jest/commit/e512bc0)), fixes [#1678-issuecomment-641930332](https://github.com//github.com/kulshekhar/ts-jest/pull/1678/issues/issuecomment-641930332), [#1678-issuecomment-639528993](https://github.com//github.com/kulshekhar/ts-jest/pull/1678/issues/issuecomment-639528993) + + + + +# [26.1.0](https://github.com/kulshekhar/ts-jest/compare/v26.0.0...v26.1.0) (2020-05-30) + + +### Bug Fixes + +* **typing:** don't mark `BabelConfig` as internal type ([#1667](https://github.com/kulshekhar/ts-jest/issues/1667)) ([558c307](https://github.com/kulshekhar/ts-jest/commit/558c307)), closes [#1666](https://github.com/kulshekhar/ts-jest/issues/1666) + + +### Features + +* **config:** show a warning message when TypeScript `target` version doesn't match with recommended NodeJs version ([#1678](https://github.com/kulshekhar/ts-jest/issues/1678)) ([085bdf5](https://github.com/kulshekhar/ts-jest/commit/085bdf5)) +* **config:** support multiple paths for `pathsToModuleNameMapper` ([#1690](https://github.com/kulshekhar/ts-jest/issues/1690)) ([a727bd5](https://github.com/kulshekhar/ts-jest/commit/a727bd5)) +* support TypeScript 3.9 ([#1653](https://github.com/kulshekhar/ts-jest/issues/1653)) ([fc3d5ad](https://github.com/kulshekhar/ts-jest/commit/fc3d5ad)) + + + + +# [26.0.0](https://github.com/kulshekhar/ts-jest/compare/v25.5.1...v26.0.0) (2020-05-15) + + +### Bug Fixes + +* **compiler:** return `undefined` for `getScriptVersion` when a file doesn't exist in memory cache ([#1641](https://github.com/kulshekhar/ts-jest/issues/1641)) ([6851b8e](https://github.com/kulshekhar/ts-jest/commit/6851b8e)) + + +### Features + +* support Jest v26 ([#1602](https://github.com/kulshekhar/ts-jest/issues/1602)) ([23b7741](https://github.com/kulshekhar/ts-jest/commit/23b7741)) + + +### BREAKING CHANGES + +* Requires a minimum of TypeScript v3.8 +* Drop support for Node 8 + + + +## [25.5.1](https://github.com/kulshekhar/ts-jest/compare/v25.5.0...v25.5.1) (2020-05-09) + + +### Bug Fixes + +* **compiler:** don't resolve files from build folder for `projectReferences` ([#1614](https://github.com/kulshekhar/ts-jest/issues/1614)) ([74b92d3](https://github.com/kulshekhar/ts-jest/commit/74b92d3)) +* **config:** don't set `include` value of `tsconfig` to empty array ([#1606](https://github.com/kulshekhar/ts-jest/issues/1606)) ([8a29aaa](https://github.com/kulshekhar/ts-jest/commit/8a29aaa)) + + + + +# [25.5.0](https://github.com/kulshekhar/ts-jest/compare/v25.4.0...v25.5.0) (2020-05-05) + + +### Bug Fixes + +* **compiler:** make `projectReferences` work with `isolatedModules: false` ([#1541](https://github.com/kulshekhar/ts-jest/issues/1541)) ([3e8efbe](https://github.com/kulshekhar/ts-jest/commit/3e8efbe)) +* **compiler:** allow using `files` provided by `tsconfig` ([#1562](https://github.com/kulshekhar/ts-jest/issues/1562)) ([a9f02bd](https://github.com/kulshekhar/ts-jest/commit/a9f02bd)) +* **config:** verify `testMatchPatterns` contain RegExp instance or string type values ([#1569](https://github.com/kulshekhar/ts-jest/issues/1569)) ([7f85bab](https://github.com/kulshekhar/ts-jest/commit/7f85bab)) + + +### Features + +* **config:** add `tsconfig` alias to `tsConfig` option ([#1565](https://github.com/kulshekhar/ts-jest/issues/1565)) ([c10eb6d](https://github.com/kulshekhar/ts-jest/commit/c10eb6d)) +* **config:** define 'ts-jest' on `ConfigGlobals` interface of `@jest/types` ([#1592](https://github.com/kulshekhar/ts-jest/issues/1592)) ([4526392](https://github.com/kulshekhar/ts-jest/commit/4526392)) + + +### Performance Improvements + +* **compiler:** don’t write compile output to file system but rely on jest cache ([#1561](https://github.com/kulshekhar/ts-jest/issues/1561)) ([d11a4ea](https://github.com/kulshekhar/ts-jest/commit/d11a4ea)) +* **compiler:** improve performance for `isolatedModules: false` ([#1558](https://github.com/kulshekhar/ts-jest/issues/1558)) ([85c09e3](https://github.com/kulshekhar/ts-jest/commit/85c09e3)) + + +### BREAKING CHANGES + +* Any custom typing files or files which are needed to be compiled and intended to use with `jest` need to be defined in `files` option of `tsconfig`. + +For example: +``` +// tsconfig.json +{ + // ...other configs + "files": [ + "my-custom-typings.d.ts", + "my-global-module.ts" + ] +} +``` +* **compiler:** `incremental` and `compilerHost` options are no longer available. Please remove it from your `ts-jest` config. + + + + +# [25.5.0-beta.0](https://github.com/kulshekhar/ts-jest/compare/v25.5.0-alpha.0...v25.5.0-beta.0) (2020-04-29) + + +### Bug Fixes + +* **compiler:** allow using `files` provided by `tsconfig` ([#1562](https://github.com/kulshekhar/ts-jest/issues/1562)) ([907a280](https://github.com/kulshekhar/ts-jest/commit/907a280)) +* **config:** verify `testMatchPatterns` contain `RegExp` instance or `string` type values ([#1569](https://github.com/kulshekhar/ts-jest/issues/1569)) ([7f85bab](https://github.com/kulshekhar/ts-jest/commit/7f85bab)) + + +### Features + +* **config:** add `tsconfig` alias to `tsConfig` option ([#1565](https://github.com/kulshekhar/ts-jest/issues/1565)) ([c10eb6d](https://github.com/kulshekhar/ts-jest/commit/c10eb6d)) + + +### Performance Improvements + +* **compiler:** don’t write compile output to file system but rely on `jest` cache ([#1561](https://github.com/kulshekhar/ts-jest/issues/1561)) ([07b5f62](https://github.com/kulshekhar/ts-jest/commit/07b5f62)) + + +### BREAKING CHANGES + +* Any custom typing files or files which are needed to be compiled and intended to use with `jest` need to be defined in `files` option of `tsconfig`. + +For example +``` +// tsconfig.json +{ + // ...other configs + "files": [ + "my-custom-typings.d.ts". + "my-global-module.ts" + ] +} +``` + + + + +# [25.5.0-alpha.0](https://github.com/kulshekhar/ts-jest/compare/v25.4.0...v25.5.0-alpha.0) (2020-04-22) + + +### Bug Fixes + +* **compiler:** make `projectReferences` work with `isolatedModules: false` ([#1541](https://github.com/kulshekhar/ts-jest/issues/1541)) ([3e8efbe](https://github.com/kulshekhar/ts-jest/commit/3e8efbe)) + +### Performance + +* **compiler:** improve performance for `isolatedModules: false` ([#1558](https://github.com/kulshekhar/ts-jest/issues/1558)) ([85c09e3](https://github.com/kulshekhar/ts-jest/commit/85c09e3)) + +### BREAKING CHANGES + +* **config:** `compilerHost` and `incremental` options are no longer available + + + + +# [25.4.0](https://github.com/kulshekhar/ts-jest/compare/v25.3.1...v25.4.0) (2020-04-17) + + +### Bug Fixes + +* **compiler:** make `projectReferences` work with `isolatedModules: true` ([#1527](https://github.com/kulshekhar/ts-jest/issues/1527)) ([aa6b74c](https://github.com/kulshekhar/ts-jest/commit/aa6b74c)) +* **compiler:** make sure `LanguageService` updated with test file information before getting diagnostics for test file ([#1507](https://github.com/kulshekhar/ts-jest/issues/1507)) ([311eaeb](https://github.com/kulshekhar/ts-jest/commit/311eaeb)) +* **config:** set default `outDir` when `allowJs` is true and no `outDir` in `tsconfig` ([#1502](https://github.com/kulshekhar/ts-jest/issues/1502)) ([1a287ad](https://github.com/kulshekhar/ts-jest/commit/1a287ad)) +* **config:** use original jest config object instead of stringified config ([#1511](https://github.com/kulshekhar/ts-jest/issues/1511)) ([4f0bb33](https://github.com/kulshekhar/ts-jest/commit/4f0bb33)) + + + + +## [25.3.1](https://github.com/kulshekhar/ts-jest/compare/v25.3.0...v25.3.1) (2020-04-03) + + +### Bug Fixes + +* only do type checking while compiling file ([#1483](https://github.com/kulshekhar/ts-jest/issues/1483)) ([dbc0a08](https://github.com/kulshekhar/ts-jest/commit/dbc0a08)) +* **config:** set default outDir for enabled allowJs without outDir ([#1472](https://github.com/kulshekhar/ts-jest/issues/1472)) ([57c7af0](https://github.com/kulshekhar/ts-jest/commit/57c7af0)) + + + + +# [25.3.0](https://github.com/kulshekhar/ts-jest/compare/25.2.1...v25.3.0) (2020-03-30) + + +### Bug Fixes + +* add `jest-config` to dependencies list ([6d9e0d8](https://github.com/kulshekhar/ts-jest/commit/6d9e0d8)) +* always do type check for all files provided to ts-jest transformer for non-watch mode ([#1450](https://github.com/kulshekhar/ts-jest/issues/1450)) ([107e062](https://github.com/kulshekhar/ts-jest/commit/107e062)) + + +### Chores + +* **docs:** add `TROUBLESHOOTING` ([96cd9b3](https://github.com/kulshekhar/ts-jest/commit/b8ebf36)) + + +### Features + +* **compiler:** expose internal ts `Program` via ConfigSet `TsCompiler` ([#1433](https://github.com/kulshekhar/ts-jest/issues/1433)) ([7153246](https://github.com/kulshekhar/ts-jest/commit/7153246)) +* **config:** add incremental option ([#1418](https://github.com/kulshekhar/ts-jest/issues/1418)) ([5a69bce](https://github.com/kulshekhar/ts-jest/commit/5a69bce)) + + +### BREAKING CHANGES + +* **config:** improve diagnostics message ([#1444](https://github.com/kulshekhar/ts-jest/issues/1444)) ([96cd9b3](https://github.com/kulshekhar/ts-jest/commit/96cd9b3)). This will affect to any snapshots or assertion against diagnostics messages + + + + +# [25.2.1](https://github.com/kulshekhar/ts-jest/compare/25.2.0...25.2.1) (2020-02-21) + + +### Bug Fixes + +* **compiler:** allow transformation of typescript files in node_modules ([#1385](https://github.com/kulshekhar/ts-jest/issues/1385)) ([814405e](https://github.com/kulshekhar/ts-jest/commit/814405e)) +* **docs:** fixing slack link and some minor typos in documenation ([#1404](https://github.com/kulshekhar/ts-jest/issues/1404)) ([3e2e008](https://github.com/kulshekhar/ts-jest/commit/3e2e008)) +* **transformer:** add deepUnmock to hoist method list ([#1372](https://github.com/kulshekhar/ts-jest/issues/1372)) ([0fbbc00](https://github.com/kulshekhar/ts-jest/commit/0fbbc00)) +* **util:** use resolve package typescript package in yarn workspaces ([#1377](https://github.com/kulshekhar/ts-jest/issues/1377)) ([a63808c](https://github.com/kulshekhar/ts-jest/commit/a63808c)) + + + + +# [25.2.0](https://github.com/kulshekhar/ts-jest/compare/v25.1.0...v25.2.0) (2020-02-03) + + +### Bug Fixes + +* **config:** let babel-jest handle loading babel config ([#1370](https://github.com/kulshekhar/ts-jest/issues/1370)) + + + + +# [25.1.0](https://github.com/kulshekhar/ts-jest/compare/v25.0.0...v25.1.0) (2020-01-30) + + +### Bug Fixes + +* jest 25 type definitions ([#1363](https://github.com/kulshekhar/ts-jest/issues/1363)) ([ba82a9e](https://github.com/kulshekhar/ts-jest/commit/ba82a9e)) + + + + +# [25.0.0](https://github.com/kulshekhar/ts-jest/compare/v24.3.0...v25.0.0) (2020-01-23) + + +### Features + +* support Jest 25 ([#1355](https://github.com/kulshekhar/ts-jest/issues/1355)) + + + + +# [24.3.0](https://github.com/kulshekhar/ts-jest/compare/v24.2.0...v24.3.0) (2020-01-07) + + +### Bug Fixes + +* **config:** support babel config file path as string ([#1332](https://github.com/kulshekhar/ts-jest/issues/1332)) ([78a53c2](https://github.com/kulshekhar/ts-jest/commit/78a53c2)) + + + + +# [24.2.0](https://github.com/kulshekhar/ts-jest/compare/v24.1.0...v24.2.0) (2019-11-22) + + +### Bug Fixes + +* **compiler:** pass filename to sha function instead of file extension ([ac1ac97](https://github.com/kulshekhar/ts-jest/commit/ac1ac97)) +* **transformers:** hoist jest.enableAutomock and jest.disableAutomock ([ac50bc3](https://github.com/kulshekhar/ts-jest/commit/ac50bc3)) +* typescript serviceHost cache miss on Windows operating systems ([26ee731](https://github.com/kulshekhar/ts-jest/commit/26ee731)) + + + + +# [24.1.0](https://github.com/kulshekhar/ts-jest/compare/v24.0.2...v24.1.0) (2019-09-12) + + +### Bug Fixes + +* **perf:** add cache for fs calls ([#908](https://github.com/kulshekhar/ts-jest/issues/908)) ([3dada81](https://github.com/kulshekhar/ts-jest/commit/3dada81)) +* [#825](https://github.com/kulshekhar/ts-jest/issues/825) handle symlinked modules (ala pnpm) correctly ([e190b23](https://github.com/kulshekhar/ts-jest/commit/e190b23)) +* handle tsBuildInfoFile option ([f9583e9](https://github.com/kulshekhar/ts-jest/commit/f9583e9)), closes [#1095](https://github.com/kulshekhar/ts-jest/issues/1095) +* **types:** unforce esModuleInterop in tsconfig.json ([c2d39b6](https://github.com/kulshekhar/ts-jest/commit/c2d39b6)) + + + ## [24.0.2](https://github.com/kulshekhar/ts-jest/compare/v24.0.1...v24.0.2) (2019-04-05) @@ -205,23 +635,26 @@ ### Bug Fixes -* typos + node 6 compat ([0ed1587](https://github.com/kulshekhar/ts-jest/commit/0ed1587)) * **ci:** can't use runInBand for e2e: cache collision ([db650f4](https://github.com/kulshekhar/ts-jest/commit/db650f4)) -* jest 22 did not have default config ([cbaddc3](https://github.com/kulshekhar/ts-jest/commit/cbaddc3)) * **ci:** do not run e2e sub-tests in band ([18ad865](https://github.com/kulshekhar/ts-jest/commit/18ad865)) * **ci:** ensure npm is present with ci ([edb6eda](https://github.com/kulshekhar/ts-jest/commit/edb6eda)) * **logger:** removes cyclic imports ([5ef980f](https://github.com/kulshekhar/ts-jest/commit/5ef980f)) * babel-config + adds test ([12146c3](https://github.com/kulshekhar/ts-jest/commit/12146c3)) -* **tests:** CI fixes ([34a41ea](https://github.com/kulshekhar/ts-jest/commit/34a41ea)) * fixes js style to be node < 10 compatible ([83d7517](https://github.com/kulshekhar/ts-jest/commit/83d7517)) * hoisting per level + memoize fix ([31847b0](https://github.com/kulshekhar/ts-jest/commit/31847b0)) +* jest 22 did not have default config ([cbaddc3](https://github.com/kulshekhar/ts-jest/commit/cbaddc3)) +* makes node 6 happy ([f6f82b8](https://github.com/kulshekhar/ts-jest/commit/f6f82b8)) * makes node6 happy ([f170285](https://github.com/kulshekhar/ts-jest/commit/f170285)) +* makes window happy ([36fbebe](https://github.com/kulshekhar/ts-jest/commit/36fbebe)) * node 6 unhappy again... ([703ad0b](https://github.com/kulshekhar/ts-jest/commit/703ad0b)) * normalizes bundle hash on any node version ([ce7afaf](https://github.com/kulshekhar/ts-jest/commit/ce7afaf)) +* npm coming with node 6 doesn't talk `ci` ([b87198d](https://github.com/kulshekhar/ts-jest/commit/b87198d)) * source maps ([89a30c9](https://github.com/kulshekhar/ts-jest/commit/89a30c9)) +* typos + node 6 compat ([0ed1587](https://github.com/kulshekhar/ts-jest/commit/0ed1587)) * updates templates ([f2e1da2](https://github.com/kulshekhar/ts-jest/commit/f2e1da2)) * uses cross-platform spawn + fix pkg versions ([ac1599c](https://github.com/kulshekhar/ts-jest/commit/ac1599c)) * we are not writing files, use normalized EOL ([47fff43](https://github.com/kulshekhar/ts-jest/commit/47fff43)) +* **tests:** CI fixes ([34a41ea](https://github.com/kulshekhar/ts-jest/commit/34a41ea)) * **tests:** detect npm version to use or not ci ([683a1e5](https://github.com/kulshekhar/ts-jest/commit/683a1e5)) * **tests:** do not use babel in our tests + new API for simple ([3e4de3e](https://github.com/kulshekhar/ts-jest/commit/3e4de3e)) * **tests:** more sanitizing for windows compat ([faae274](https://github.com/kulshekhar/ts-jest/commit/faae274)) @@ -229,32 +662,33 @@ ### Features -* diagnostics, different compilers, ... ([f26ebf0](https://github.com/kulshekhar/ts-jest/commit/f26ebf0)) * **config:** adds a helper to build moduleNameMapper from paths ([7b8598e](https://github.com/kulshekhar/ts-jest/commit/7b8598e)), closes [#364](https://github.com/kulshekhar/ts-jest/issues/364) * **logging:** improves log messages + tests ([5d03c4d](https://github.com/kulshekhar/ts-jest/commit/5d03c4d)) -* jest preset ([beb50b5](https://github.com/kulshekhar/ts-jest/commit/beb50b5)) -* **test:** jest serializers ([dfa9c0f](https://github.com/kulshekhar/ts-jest/commit/dfa9c0f)) * adds logging + better hashing ([4322701](https://github.com/kulshekhar/ts-jest/commit/4322701)) -* **tests:** more test tools + adds test related to debuggin issues ([8dcafca](https://github.com/kulshekhar/ts-jest/commit/8dcafca)) * allow env var to add diagnostic codes to ignore ([777edf5](https://github.com/kulshekhar/ts-jest/commit/777edf5)) * cache key + tests ([bd55448](https://github.com/kulshekhar/ts-jest/commit/bd55448)) +* diagnostics, different compilers, ... ([f26ebf0](https://github.com/kulshekhar/ts-jest/commit/f26ebf0)) * directly writes to stdio so jest does not swallow ([6a7f01f](https://github.com/kulshekhar/ts-jest/commit/6a7f01f)) * handles stringifyContentPathRegex ([3fcb4bd](https://github.com/kulshekhar/ts-jest/commit/3fcb4bd)) * hoisting + tests + many other things ([6186e84](https://github.com/kulshekhar/ts-jest/commit/6186e84)) * io serializer + other test utils ([d03e0e7](https://github.com/kulshekhar/ts-jest/commit/d03e0e7)) +* jest preset ([beb50b5](https://github.com/kulshekhar/ts-jest/commit/beb50b5)) * warn about unsupported versions ([1103071](https://github.com/kulshekhar/ts-jest/commit/1103071)) +* **test:** jest serializers ([dfa9c0f](https://github.com/kulshekhar/ts-jest/commit/dfa9c0f)) +* **tests:** more test tools + adds test related to debuggin issues ([8dcafca](https://github.com/kulshekhar/ts-jest/commit/8dcafca)) ### Performance Improvements -* detects changes in templates and bundle ([2a3da21](https://github.com/kulshekhar/ts-jest/commit/2a3da21)) * **babel:** uses babel-jest cache key as part of ours ([f51c4a7](https://github.com/kulshekhar/ts-jest/commit/f51c4a7)) +* **cache:** share config-sets for parallel test running ([090ca7b](https://github.com/kulshekhar/ts-jest/commit/090ca7b)) +* **tests:** run e2e tests in band ([b3e94ff](https://github.com/kulshekhar/ts-jest/commit/b3e94ff)) +* detects changes in templates and bundle ([2a3da21](https://github.com/kulshekhar/ts-jest/commit/2a3da21)) * do not type check if fileName doesn't match ([cc45adc](https://github.com/kulshekhar/ts-jest/commit/cc45adc)) * faster tests ([37a0187](https://github.com/kulshekhar/ts-jest/commit/37a0187)) +* improves speed of local test after 1st run ([cc04021](https://github.com/kulshekhar/ts-jest/commit/cc04021)) * more cleaning ([c48f7b8](https://github.com/kulshekhar/ts-jest/commit/c48f7b8)) * trying to improve travis-ci conf ([e4b4d95](https://github.com/kulshekhar/ts-jest/commit/e4b4d95)) -* **cache:** share config-sets for parallel test running ([090ca7b](https://github.com/kulshekhar/ts-jest/commit/090ca7b)) -* **tests:** run e2e tests in band ([b3e94ff](https://github.com/kulshekhar/ts-jest/commit/b3e94ff)) @@ -264,30 +698,26 @@ ### Bug Fixes -* **html:** correctly transforms html source when needed ([9a2d74f](https://github.com/kulshekhar/ts-jest/commit/9a2d74f)) -* **lint:** fixes tslint script & lint issues ([60ab36e](https://github.com/kulshekhar/ts-jest/commit/60ab36e)) -* **package:** update fs-extra to version 6.0.1 ([7e73536](https://github.com/kulshekhar/ts-jest/commit/7e73536)) -* **package:** update pkg-dir to version 3.0.0 ([3fb8f9f](https://github.com/kulshekhar/ts-jest/commit/3fb8f9f)) -* **package:** update yargs to version 12.0.1 ([390ffcd](https://github.com/kulshekhar/ts-jest/commit/390ffcd)) -* **source-maps:** fix source maps options/calls ([76e27c1](https://github.com/kulshekhar/ts-jest/commit/76e27c1)) * allow (but deprecate) use of old preprocessor.js ([a65079f](https://github.com/kulshekhar/ts-jest/commit/a65079f)) * big refactor + fixes (mainly cache key + coverage) ([e46caae](https://github.com/kulshekhar/ts-jest/commit/e46caae)) * fixes coverage and tests ([09500c2](https://github.com/kulshekhar/ts-jest/commit/09500c2)) * gracefully load [@babel](https://github.com/babel)/core or babel-core ([98b2410](https://github.com/kulshekhar/ts-jest/commit/98b2410)) * hack for babel < 6 so that breakpoints do work ([90c74ef](https://github.com/kulshekhar/ts-jest/commit/90c74ef)), closes [#627](https://github.com/kulshekhar/ts-jest/issues/627) -* makes node 6 happy ([f6f82b8](https://github.com/kulshekhar/ts-jest/commit/f6f82b8)) -* makes window happy ([36fbebe](https://github.com/kulshekhar/ts-jest/commit/36fbebe)) -* npm coming with node 6 doesn't talk `ci` ([b87198d](https://github.com/kulshekhar/ts-jest/commit/b87198d)) * resolves correctly config file path (fix [#636](https://github.com/kulshekhar/ts-jest/issues/636)) ([5ab100c](https://github.com/kulshekhar/ts-jest/commit/5ab100c)) * test rootDir to handle preset-angular ([8a6a8f7](https://github.com/kulshekhar/ts-jest/commit/8a6a8f7)) -* Typo in utils.ts ([#534](https://github.com/kulshekhar/ts-jest/issues/534)) ([a650260](https://github.com/kulshekhar/ts-jest/commit/a650260)) * wrong error message ([c955083](https://github.com/kulshekhar/ts-jest/commit/c955083)) +* **html:** correctly transforms html source when needed ([9a2d74f](https://github.com/kulshekhar/ts-jest/commit/9a2d74f)) +* **lint:** fixes tslint script & lint issues ([60ab36e](https://github.com/kulshekhar/ts-jest/commit/60ab36e)) +* **package:** update fs-extra to version 6.0.1 ([7e73536](https://github.com/kulshekhar/ts-jest/commit/7e73536)) +* **package:** update pkg-dir to version 3.0.0 ([3fb8f9f](https://github.com/kulshekhar/ts-jest/commit/3fb8f9f)) +* **package:** update yargs to version 12.0.1 ([390ffcd](https://github.com/kulshekhar/ts-jest/commit/390ffcd)) +* **source-maps:** fix source maps options/calls ([76e27c1](https://github.com/kulshekhar/ts-jest/commit/76e27c1)) +* Typo in utils.ts ([#534](https://github.com/kulshekhar/ts-jest/issues/534)) ([a650260](https://github.com/kulshekhar/ts-jest/commit/a650260)) ### Performance Improvements * do not hash cache key, jest does it underneath ([fbe4f1f](https://github.com/kulshekhar/ts-jest/commit/fbe4f1f)) -* improves speed of local test after 1st run ([cc04021](https://github.com/kulshekhar/ts-jest/commit/cc04021)) @@ -303,9 +733,9 @@ ### Bug Fixes * **package:** update source-map-support to version 0.5.0 ([f0aab12](https://github.com/kulshekhar/ts-jest/commit/f0aab12)) -* add startDir to if-clause ([eed5311](https://github.com/kulshekhar/ts-jest/commit/eed5311)) * **package:** update yargs to version 10.0.3 ([5cdf969](https://github.com/kulshekhar/ts-jest/commit/5cdf969)) * **package:** update yargs to version 11.0.0 ([7e9ce40](https://github.com/kulshekhar/ts-jest/commit/7e9ce40)) +* add startDir to if-clause ([eed5311](https://github.com/kulshekhar/ts-jest/commit/eed5311)) * **package:** update yargs to version 9.0.1 ([#326](https://github.com/kulshekhar/ts-jest/issues/326)) ([8bf9924](https://github.com/kulshekhar/ts-jest/commit/8bf9924)) @@ -361,10 +791,10 @@ ### Bug Fixes -* **package:** update fs-extra to version 3.0.0 ([906be12](https://github.com/kulshekhar/ts-jest/commit/906be12)) -* **package:** update yargs to version 8.0.1 ([0b2ea98](https://github.com/kulshekhar/ts-jest/commit/0b2ea98)) * peer dependency against Typescript 2.x ([cb08128](https://github.com/kulshekhar/ts-jest/commit/cb08128)) * remove outDir when collecting coverage ([c076956](https://github.com/kulshekhar/ts-jest/commit/c076956)) +* **package:** update fs-extra to version 3.0.0 ([906be12](https://github.com/kulshekhar/ts-jest/commit/906be12)) +* **package:** update yargs to version 8.0.1 ([0b2ea98](https://github.com/kulshekhar/ts-jest/commit/0b2ea98)) ### Features diff --git a/node_modules/ts-jest/CONTRIBUTING.md b/node_modules/ts-jest/CONTRIBUTING.md index b9d8cf8cc..60da47721 100644 --- a/node_modules/ts-jest/CONTRIBUTING.md +++ b/node_modules/ts-jest/CONTRIBUTING.md @@ -1,6 +1,6 @@ # Contributing -When contributing to this repository, please first discuss the change you wish to make via [slack](https://bit.ly/ts-jest-slack) or [issue](https://github.com/kulshekhar/ts-jest/issues) with the owners of this repository before making a change. +When contributing to this repository, please first discuss the change you wish to make via [slack](https://bit.ly/3bRHFPQ) or [issue](https://github.com/kulshekhar/ts-jest/issues) with the owners of this repository before making a change. Please note we have a code of conduct, please follow it in all your interactions with the project. diff --git a/node_modules/ts-jest/README.md b/node_modules/ts-jest/README.md index a70e6a592..51e3bdd52 100644 --- a/node_modules/ts-jest/README.md +++ b/node_modules/ts-jest/README.md @@ -1,8 +1,18 @@ -# ts-jest [![npm version](https://badge.fury.io/js/ts-jest.svg)](https://badge.fury.io/js/ts-jest) [![NPM downloads](https://img.shields.io/npm/dm/ts-jest.svg?style=flat)](https://npmjs.org/package/ts-jest) [![Known Vulnerabilities](https://snyk.io/test/github/kulshekhar/ts-jest/badge.svg)](https://snyk.io/test/github/kulshekhar/ts-jest) [![Coverage Status](https://coveralls.io/repos/github/kulshekhar/ts-jest/badge.svg?branch=master)](https://coveralls.io/github/kulshekhar/ts-jest?branch=master) [![Dependabot Status](https://api.dependabot.com/badges/status?host=github&repo=kulshekhar/ts-jest)](https://dependabot.com) [![Build Status for linux](https://travis-ci.org/kulshekhar/ts-jest.svg?branch=master)](https://travis-ci.org/kulshekhar/ts-jest) [![Build Status for Windows](https://ci.appveyor.com/api/projects/status/g8tt9qd7usv0tolb/branch/master?svg=true)](https://ci.appveyor.com/project/kulshekhar/ts-jest/branch/master) +

ts-jest

- +

A TypeScript preprocessor with source map support for Jest that lets you use Jest to test projects written in TypeScript.

+ +

+ NPM version + NPM downloads + Known vulnerabilities + Coverage status + Build status + GitHub actions + GitHub license +

-**`ts-jest`** is a TypeScript preprocessor with source map support for Jest that lets you use Jest to test projects written in TypeScript. + It supports all features of TypeScript including type-checking. [Read more about Babel7 + `preset-typescript` **vs** TypeScript (and `ts-jest`)](https://kulshekhar.github.io/ts-jest/user/babel7-or-ts). @@ -13,11 +23,9 @@ It supports all features of TypeScript including type-checking. [Read more about [ View the online documentation (usage & technical)](https://kulshekhar.github.io/ts-jest) -[ Ask for some help in the `ts-jest` community of Slack](https://bit.ly/ts-jest-slack) +[ Ask for some help in the `ts-jest` community of Slack](https://bit.ly/3bRHFPQ) - +[ Before reporting any issue, be sure to check the troubleshooting page](TROUBLESHOOTING.md) [ We're looking for collaborators! Want to help improve `ts-jest`?](https://github.com/kulshekhar/ts-jest/issues/223) @@ -46,7 +54,7 @@ Please read [CONTRIBUTING.md](CONTRIBUTING.md) for details on our code of conduc ## Versioning -We **DO NOT** use [SemVer](http://semver.org/) for versioning. Tho you can think about SemVer when reading our version, except our major number follows the one of Jest. For the versions available, see the [tags on this repository](https://github.com/kulshekhar/ts-jest/tags). +We **DO NOT** use [SemVer](http://semver.org/) for versioning. Though you can think about SemVer when reading our version, except our major number follows the one of Jest. For the versions available, see the [tags on this repository](https://github.com/kulshekhar/ts-jest/tags). ## Authors/maintainers @@ -57,6 +65,10 @@ We **DO NOT** use [SemVer](http://semver.org/) for versioning. Tho you can think See also the list of [contributors](https://github.com/kulshekhar/ts-jest/contributors) who participated in this project. +## Supporters + +- [JetBrains](https://www.jetbrains.com/?from=ts-jest) has been kind enough to support ts-jest with an [open source license](https://www.jetbrains.com/community/opensource/?from=ts-jest). + ## License This project is licensed under the MIT License - see the [LICENSE.md](LICENSE.md) file for details diff --git a/node_modules/ts-jest/dist/cli/config/init.js b/node_modules/ts-jest/dist/cli/config/init.js index ef6b4191e..bff50032c 100644 --- a/node_modules/ts-jest/dist/cli/config/init.js +++ b/node_modules/ts-jest/dist/cli/config/init.js @@ -11,10 +11,11 @@ var __assign = (this && this.__assign) || function () { return __assign.apply(this, arguments); }; var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { + function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } return new (P || (P = Promise))(function (resolve, reject) { function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } - function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); } + function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } step((generator = generator.apply(thisArg, _arguments || [])).next()); }); }; @@ -45,13 +46,13 @@ var __generator = (this && this.__generator) || function (thisArg, body) { if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; } }; -var _this = this; Object.defineProperty(exports, "__esModule", { value: true }); +exports.help = exports.run = void 0; var fs_1 = require("fs"); var json5_1 = require("json5"); var path_1 = require("path"); var presets_1 = require("../helpers/presets"); -exports.run = function (args) { return __awaiter(_this, void 0, void 0, function () { +exports.run = function (args) { return __awaiter(void 0, void 0, void 0, function () { var file, filePath, name, isPackage, exists, pkgFile, hasPackage, _a, jestPreset, askedTsconfig, force, jsdom, tsconfig, pkgJson, jsFilesProcessor, shouldPostProcessWithBabel, preset, body, base, tsJestConf, content; return __generator(this, function (_b) { file = args._[0] || 'jest.config.js'; @@ -110,7 +111,7 @@ exports.run = function (args) { return __awaiter(_this, void 0, void 0, function if (shouldPostProcessWithBabel) tsJestConf.babelConfig = true; } - body = JSON.stringify(__assign({}, pkgJson, { jest: base }), undefined, ' '); + body = JSON.stringify(__assign(__assign({}, pkgJson), { jest: base }), undefined, ' '); } else { content = []; @@ -122,19 +123,19 @@ exports.run = function (args) { return __awaiter(_this, void 0, void 0, function content.push(" preset: '" + preset.name + "',"); } else { - content.push(" ...tsjPreset,"); + content.push(' ...tsjPreset,'); } if (!jsdom) content.push(" testEnvironment: 'node',"); if (tsconfig || shouldPostProcessWithBabel) { - content.push(" globals: {"); + content.push(' globals: {'); content.push(" 'ts-jest': {"); if (tsconfig) content.push(" tsconfig: " + json5_1.stringify(tsconfig) + ","); if (shouldPostProcessWithBabel) - content.push(" babelConfig: true,"); - content.push(" },"); - content.push(" },"); + content.push(' babelConfig: true,'); + content.push(' },'); + content.push(' },'); } content.push('};'); body = content.join('\n'); @@ -144,7 +145,7 @@ exports.run = function (args) { return __awaiter(_this, void 0, void 0, function return [2]; }); }); }; -exports.help = function () { return __awaiter(_this, void 0, void 0, function () { +exports.help = function () { return __awaiter(void 0, void 0, void 0, function () { return __generator(this, function (_a) { process.stdout.write("\nUsage:\n ts-jest config:init [options] []\n\nArguments:\n Can be a js or json Jest config file. If it is a\n package.json file, the configuration will be read from\n the \"jest\" property.\n Default: jest.config.js\n\nOptions:\n --force Discard any existing Jest config\n --js ts|babel Process .js files with ts-jest if 'ts' or with\n babel-jest if 'babel'\n --no-jest-preset Disable the use of Jest presets\n --tsconfig Path to the tsconfig.json file\n --babel Pipe babel-jest after ts-jest\n --jsdom Use jsdom as test environment instead of node\n"); return [2]; diff --git a/node_modules/ts-jest/dist/cli/config/migrate.js b/node_modules/ts-jest/dist/cli/config/migrate.js index 6a57252fa..7fba412e4 100644 --- a/node_modules/ts-jest/dist/cli/config/migrate.js +++ b/node_modules/ts-jest/dist/cli/config/migrate.js @@ -1,9 +1,10 @@ "use strict"; var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { + function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } return new (P || (P = Promise))(function (resolve, reject) { function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } - function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); } + function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } step((generator = generator.apply(thisArg, _arguments || [])).next()); }); }; @@ -54,19 +55,16 @@ var __spread = (this && this.__spread) || function () { for (var ar = [], i = 0; i < arguments.length; i++) ar = ar.concat(__read(arguments[i])); return ar; }; -var __importDefault = (this && this.__importDefault) || function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; -}; -var _this = this; Object.defineProperty(exports, "__esModule", { value: true }); +exports.help = exports.run = void 0; var bs_logger_1 = require("bs-logger"); -var fast_json_stable_stringify_1 = __importDefault(require("fast-json-stable-stringify")); +var stableStringify = require("fast-json-stable-stringify"); var fs_1 = require("fs"); var json5_1 = require("json5"); var path_1 = require("path"); -var backports_1 = require("../../util/backports"); +var backports_1 = require("../../utils/backports"); var presets_1 = require("../helpers/presets"); -exports.run = function (args) { return __awaiter(_this, void 0, void 0, function () { +exports.run = function (args) { return __awaiter(void 0, void 0, void 0, function () { var nullLogger, file, filePath, footNotes, name, isPackage, actualConfig, migratedConfig, presetName, preset, jsTransformers, jsWithTs, jsWithBabel, presetValue, migratedValue, presetValue, migratedValue, before, after, stringify, prefix; return __generator(this, function (_a) { nullLogger = bs_logger_1.createLogger({ targets: [] }); @@ -90,7 +88,7 @@ exports.run = function (args) { return __awaiter(_this, void 0, void 0, function migratedConfig = backports_1.backportJestConfig(nullLogger, actualConfig); if (!migratedConfig.preset && args.jestPreset) { if (args.js) { - presetName = args.js === 'babel' ? presets_1.JestPresetNames.jsWIthBabel : presets_1.JestPresetNames.jsWithTs; + presetName = args.js === 'babel' ? "ts-jest/presets/js-with-babel" : "ts-jest/presets/js-with-ts"; } else { jsTransformers = Object.keys(migratedConfig.transform || {}).reduce(function (list, pattern) { @@ -107,16 +105,16 @@ exports.run = function (args) { return __awaiter(_this, void 0, void 0, function jsWithTs = jsTransformers.includes('ts-jest'); jsWithBabel = jsTransformers.includes('babel-jest'); if (jsWithBabel && !jsWithTs) { - presetName = presets_1.JestPresetNames.jsWIthBabel; + presetName = "ts-jest/presets/js-with-babel"; } else if (jsWithTs && !jsWithBabel) { - presetName = presets_1.JestPresetNames.jsWithTs; + presetName = "ts-jest/presets/js-with-ts"; } else { - presetName = presets_1.JestPresetNames.default; + presetName = "ts-jest/presets/default"; } } - presetName = presetName || presets_1.JestPresetNames.default; + presetName = presetName || "ts-jest/presets/default"; preset = presets_1.allPresets[presetName]; footNotes.push("Detected preset '" + preset.label + "' as the best matching preset for your configuration.\nVisit https://kulshekhar.github.io/ts-jest/user/config/#jest-preset for more information about presets.\n"); } @@ -158,19 +156,19 @@ exports.run = function (args) { return __awaiter(_this, void 0, void 0, function } if (preset && migratedConfig.transform && - fast_json_stable_stringify_1.default(migratedConfig.transform) === fast_json_stable_stringify_1.default(preset.value.transform)) { + stableStringify(migratedConfig.transform) === stableStringify(preset.value.transform)) { delete migratedConfig.transform; } cleanupConfig(actualConfig); cleanupConfig(migratedConfig); - before = fast_json_stable_stringify_1.default(actualConfig); - after = fast_json_stable_stringify_1.default(migratedConfig); + before = stableStringify(actualConfig); + after = stableStringify(migratedConfig); if (after === before) { process.stderr.write("\nNo migration needed for given Jest configuration\n "); return [2]; } - stringify = /\.json$/.test(file) ? JSON.stringify : json5_1.stringify; - prefix = /\.json$/.test(file) ? '"jest": ' : 'module.exports = '; + stringify = file.endsWith('.json') ? JSON.stringify : json5_1.stringify; + prefix = file.endsWith('.json') ? '"jest": ' : 'module.exports = '; if (preset && migratedConfig.transform) { footNotes.push("\nI couldn't check if your \"transform\" value is the same as mine which is: " + stringify(preset.value.transform, undefined, ' ') + "\nIf it is the case, you can safely remove the \"transform\" from what I've migrated.\n"); } @@ -204,7 +202,7 @@ function cleanupConfig(config) { if (config.testMatch.length === 0) delete config.testMatch; } - if (config.preset === presets_1.JestPresetNames.default) + if (config.preset === "ts-jest/presets/default") config.preset = presets_1.defaults.name; } function dedupSort(arr) { @@ -212,7 +210,7 @@ function dedupSort(arr) { .filter(function (s, i, a) { return a.findIndex(function (e) { return s.toString() === e.toString(); }) === i; }) .sort(function (a, b) { return (a.toString() > b.toString() ? 1 : a.toString() < b.toString() ? -1 : 0); }); } -exports.help = function () { return __awaiter(_this, void 0, void 0, function () { +exports.help = function () { return __awaiter(void 0, void 0, void 0, function () { return __generator(this, function (_a) { process.stdout.write("\nUsage:\n ts-jest config:migrate [options] \n\nArguments:\n Can be a js or json Jest config file. If it is a\n package.json file, the configuration will be read from\n the \"jest\" property.\n\nOptions:\n --js ts|babel Process .js files with ts-jest if 'ts' or with\n babel-jest if 'babel'\n --no-jest-preset Disable the use of Jest presets\n"); return [2]; diff --git a/node_modules/ts-jest/dist/cli/help.js b/node_modules/ts-jest/dist/cli/help.js index 42ec33810..1cfb111e0 100644 --- a/node_modules/ts-jest/dist/cli/help.js +++ b/node_modules/ts-jest/dist/cli/help.js @@ -1,9 +1,10 @@ "use strict"; var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { + function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } return new (P || (P = Promise))(function (resolve, reject) { function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } - function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); } + function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } step((generator = generator.apply(thisArg, _arguments || [])).next()); }); }; @@ -34,9 +35,9 @@ var __generator = (this && this.__generator) || function (thisArg, body) { if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; } }; -var _this = this; Object.defineProperty(exports, "__esModule", { value: true }); -exports.run = function (_) { return __awaiter(_this, void 0, void 0, function () { +exports.help = exports.run = void 0; +exports.run = function (_) { return __awaiter(void 0, void 0, void 0, function () { return __generator(this, function (_a) { process.stdout.write("\nUsage:\n ts-jest command [options] [...args]\n\nCommands:\n config:init Creates initial Jest configuration\n config:migrate Migrates a given Jest configuration\n help [command] Show this help, or help about a command\n\nExample:\n ts-jest help config:migrate\n"); return [2]; diff --git a/node_modules/ts-jest/dist/cli/helpers/presets.js b/node_modules/ts-jest/dist/cli/helpers/presets.js index 3343c09bb..e425b58ed 100644 --- a/node_modules/ts-jest/dist/cli/helpers/presets.js +++ b/node_modules/ts-jest/dist/cli/helpers/presets.js @@ -1,11 +1,6 @@ "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); -var JestPresetNames; -(function (JestPresetNames) { - JestPresetNames["default"] = "ts-jest/presets/default"; - JestPresetNames["jsWithTs"] = "ts-jest/presets/js-with-ts"; - JestPresetNames["jsWIthBabel"] = "ts-jest/presets/js-with-babel"; -})(JestPresetNames = exports.JestPresetNames || (exports.JestPresetNames = {})); +exports.jsWIthBabel = exports.jsWithTs = exports.defaults = exports.allPresets = void 0; var definePreset = function (fullName) { return ({ fullName: fullName, get name() { @@ -17,10 +12,11 @@ var definePreset = function (fullName) { return ({ get jsVarName() { return this.isDefault ? 'defaults' - : fullName - .split('/') - .pop() - .replace(/\-([a-z])/g, function (_, l) { return l.toUpperCase(); }); + : + fullName + .split('/') + .pop() + .replace(/\-([a-z])/g, function (_, l) { return l.toUpperCase(); }); }, get value() { return require("../../../" + fullName.replace(/^ts-jest\//, '') + "/jest-preset"); @@ -30,10 +26,10 @@ var definePreset = function (fullName) { return ({ return "const { " + this.jsVarName + ": " + varName + " } = require('ts-jest/presets')"; }, get isDefault() { - return fullName === JestPresetNames.default; + return fullName === "ts-jest/presets/default"; }, }); }; exports.allPresets = {}; -exports.defaults = (exports.allPresets[JestPresetNames.default] = definePreset(JestPresetNames.default)); -exports.jsWithTs = (exports.allPresets[JestPresetNames.jsWithTs] = definePreset(JestPresetNames.jsWithTs)); -exports.jsWIthBabel = (exports.allPresets[JestPresetNames.jsWIthBabel] = definePreset(JestPresetNames.jsWIthBabel)); +exports.defaults = (exports.allPresets["ts-jest/presets/default"] = definePreset("ts-jest/presets/default")); +exports.jsWithTs = (exports.allPresets["ts-jest/presets/js-with-ts"] = definePreset("ts-jest/presets/js-with-ts")); +exports.jsWIthBabel = (exports.allPresets["ts-jest/presets/js-with-babel"] = definePreset("ts-jest/presets/js-with-babel")); diff --git a/node_modules/ts-jest/dist/cli/index.js b/node_modules/ts-jest/dist/cli/index.js index c00e743a3..0ddbc2f76 100644 --- a/node_modules/ts-jest/dist/cli/index.js +++ b/node_modules/ts-jest/dist/cli/index.js @@ -1,9 +1,10 @@ "use strict"; var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { + function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } return new (P || (P = Promise))(function (resolve, reject) { function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } - function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); } + function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } step((generator = generator.apply(thisArg, _arguments || [])).next()); }); }; @@ -37,11 +38,12 @@ var __generator = (this && this.__generator) || function (thisArg, body) { var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; -Object.defineProperty(exports, "__esModule", { value: true }); var _a; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.processArgv = void 0; var bs_logger_1 = require("bs-logger"); var yargs_parser_1 = __importDefault(require("yargs-parser")); -var logger_1 = require("../util/logger"); +var logger_1 = require("../utils/logger"); var VALID_COMMANDS = ['help', 'config:migrate', 'config:init']; var logger = logger_1.rootLogger.child((_a = {}, _a[bs_logger_1.LogContexts.namespace] = 'cli', _a[bs_logger_1.LogContexts.application] = 'ts-jest', _a)); function cli(args) { diff --git a/node_modules/ts-jest/dist/compiler.d.ts b/node_modules/ts-jest/dist/compiler.d.ts deleted file mode 100644 index cb0ff5c3b..000000000 --- a/node_modules/ts-jest/dist/compiler.d.ts +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/node_modules/ts-jest/dist/compiler.js b/node_modules/ts-jest/dist/compiler.js deleted file mode 100644 index 22535cf06..000000000 --- a/node_modules/ts-jest/dist/compiler.js +++ /dev/null @@ -1,233 +0,0 @@ -"use strict"; -var __assign = (this && this.__assign) || function () { - __assign = Object.assign || function(t) { - for (var s, i = 1, n = arguments.length; i < n; i++) { - s = arguments[i]; - for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) - t[p] = s[p]; - } - return t; - }; - return __assign.apply(this, arguments); -}; -var __values = (this && this.__values) || function (o) { - var m = typeof Symbol === "function" && o[Symbol.iterator], i = 0; - if (m) return m.call(o); - return { - next: function () { - if (o && i >= o.length) o = void 0; - return { value: o && o[i++], done: !o }; - } - }; -}; -var __read = (this && this.__read) || function (o, n) { - var m = typeof Symbol === "function" && o[Symbol.iterator]; - if (!m) return o; - var i = m.call(o), r, ar = [], e; - try { - while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value); - } - catch (error) { e = { error: error }; } - finally { - try { - if (r && !r.done && (m = i["return"])) m.call(i); - } - finally { if (e) throw e.error; } - } - return ar; -}; -var __importDefault = (this && this.__importDefault) || function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; -}; -Object.defineProperty(exports, "__esModule", { value: true }); -var bs_logger_1 = require("bs-logger"); -var buffer_from_1 = __importDefault(require("buffer-from")); -var stableStringify = require("fast-json-stable-stringify"); -var fs_1 = require("fs"); -var mkdirp = require("mkdirp"); -var path_1 = require("path"); -var messages_1 = require("./util/messages"); -var sha1_1 = require("./util/sha1"); -var hasOwn = Object.prototype.hasOwnProperty; -function createCompiler(configs) { - var e_1, _a, _b, _c; - var logger = configs.logger.child({ namespace: 'ts-compiler' }); - logger.debug('creating typescript compiler', configs.tsJest.isolatedModules ? '(isolated modules)' : '(language service)'); - var cachedir = configs.tsCacheDir; - var memoryCache = { - contents: Object.create(null), - versions: Object.create(null), - outputs: Object.create(null), - }; - var ts = configs.compilerModule; - var cwd = configs.cwd; - var extensions = ['.ts', '.tsx']; - var _d = configs.typescript, compilerOptions = _d.options, fileNames = _d.fileNames; - if (compilerOptions.allowJs) { - extensions.push('.js'); - extensions.push('.jsx'); - } - try { - for (var fileNames_1 = __values(fileNames), fileNames_1_1 = fileNames_1.next(); !fileNames_1_1.done; fileNames_1_1 = fileNames_1.next()) { - var path = fileNames_1_1.value; - memoryCache.versions[path] = 1; - } - } - catch (e_1_1) { e_1 = { error: e_1_1 }; } - finally { - try { - if (fileNames_1_1 && !fileNames_1_1.done && (_a = fileNames_1.return)) _a.call(fileNames_1); - } - finally { if (e_1) throw e_1.error; } - } - var getExtension = compilerOptions.jsx === ts.JsxEmit.Preserve - ? function (path) { return (/\.[tj]sx$/.test(path) ? '.jsx' : '.js'); } - : function (_) { return '.js'; }; - var transformers = configs.tsCustomTransformers; - var getOutput = function (code, fileName) { - logger.debug({ fileName: fileName }, 'getOutput(): compiling as isolated module'); - var result = ts.transpileModule(code, { - fileName: fileName, - transformers: transformers, - compilerOptions: compilerOptions, - reportDiagnostics: configs.shouldReportDiagnostic(fileName), - }); - if (result.diagnostics) - configs.raiseDiagnostics(result.diagnostics, fileName, logger); - return [result.outputText, result.sourceMapText]; - }; - var getTypeInfo = function (_code, _fileName, _position) { - throw new TypeError(messages_1.Errors.TypesUnavailableWithoutTypeCheck); - }; - if (!configs.tsJest.isolatedModules) { - var updateMemoryCache_1 = function (code, fileName) { - logger.debug({ fileName: fileName }, "updateMemoryCache()"); - if (memoryCache.contents[fileName] !== code) { - memoryCache.contents[fileName] = code; - memoryCache.versions[fileName] = (memoryCache.versions[fileName] || 0) + 1; - } - }; - var serviceHostDebugCtx = (_b = {}, - _b[bs_logger_1.LogContexts.logLevel] = bs_logger_1.LogLevels.debug, - _b.namespace = 'ts:serviceHost', - _b.call = null, - _b); - var serviceHostTraceCtx = __assign({}, serviceHostDebugCtx, (_c = {}, _c[bs_logger_1.LogContexts.logLevel] = bs_logger_1.LogLevels.trace, _c)); - var serviceHost = { - getScriptFileNames: function () { return Object.keys(memoryCache.versions); }, - getScriptVersion: function (fileName) { - var version = memoryCache.versions[fileName]; - return version === undefined ? undefined : String(version); - }, - getScriptSnapshot: function (fileName) { - var hit = hasOwn.call(memoryCache.contents, fileName); - logger.trace({ fileName: fileName, cacheHit: hit }, "getScriptSnapshot():", 'cache', hit ? 'hit' : 'miss'); - if (!hit) { - memoryCache.contents[fileName] = ts.sys.readFile(fileName); - } - var contents = memoryCache.contents[fileName]; - if (contents === undefined) { - return; - } - return ts.ScriptSnapshot.fromString(contents); - }, - fileExists: ts.sys.fileExists, - readFile: logger.wrap(serviceHostTraceCtx, 'readFile', ts.sys.readFile), - readDirectory: ts.sys.readDirectory, - getDirectories: ts.sys.getDirectories, - directoryExists: ts.sys.directoryExists, - getNewLine: function () { return '\n'; }, - getCurrentDirectory: function () { return cwd; }, - getCompilationSettings: function () { return compilerOptions; }, - getDefaultLibFileName: function () { return ts.getDefaultLibFilePath(compilerOptions); }, - getCustomTransformers: function () { return transformers; }, - }; - logger.debug('creating language service'); - var service_1 = ts.createLanguageService(serviceHost); - getOutput = function (code, fileName) { - logger.debug({ fileName: fileName }, 'getOutput(): compiling using language service'); - updateMemoryCache_1(code, fileName); - var output = service_1.getEmitOutput(fileName); - if (configs.shouldReportDiagnostic(fileName)) { - logger.debug({ fileName: fileName }, 'getOutput(): computing diagnostics'); - var diagnostics = service_1 - .getCompilerOptionsDiagnostics() - .concat(service_1.getSyntacticDiagnostics(fileName)) - .concat(service_1.getSemanticDiagnostics(fileName)); - configs.raiseDiagnostics(diagnostics, fileName, logger); - } - if (output.emitSkipped) { - throw new TypeError(path_1.relative(cwd, fileName) + ": Emit skipped"); - } - if (output.outputFiles.length === 0) { - throw new TypeError(messages_1.interpolate(messages_1.Errors.UnableToRequireDefinitionFile, { - file: path_1.basename(fileName), - })); - } - return [output.outputFiles[1].text, output.outputFiles[0].text]; - }; - getTypeInfo = function (code, fileName, position) { - updateMemoryCache_1(code, fileName); - var info = service_1.getQuickInfoAtPosition(fileName, position); - var name = ts.displayPartsToString(info ? info.displayParts : []); - var comment = ts.displayPartsToString(info ? info.documentation : []); - return { name: name, comment: comment }; - }; - } - var compile = readThrough(cachedir, memoryCache, getOutput, getExtension, cwd, logger); - return { cwd: cwd, compile: compile, getTypeInfo: getTypeInfo, extensions: extensions, cachedir: cachedir, ts: ts }; -} -exports.createCompiler = createCompiler; -function readThrough(cachedir, memoryCache, compile, getExtension, cwd, logger) { - if (!cachedir) { - return function (code, fileName, lineOffset) { - logger.debug({ fileName: fileName }, 'readThrough(): no cache'); - var _a = __read(compile(code, fileName, lineOffset), 2), value = _a[0], sourceMap = _a[1]; - var output = updateOutput(value, fileName, sourceMap, getExtension, cwd); - memoryCache.outputs[fileName] = output; - return output; - }; - } - mkdirp.sync(cachedir); - return function (code, fileName, lineOffset) { - var cachePath = path_1.join(cachedir, getCacheName(code, fileName)); - var extension = getExtension(fileName); - var outputPath = "" + cachePath + extension; - try { - var output_1 = fs_1.readFileSync(outputPath, 'utf8'); - if (isValidCacheContent(output_1)) { - logger.debug({ fileName: fileName }, 'readThrough(): cache hit'); - memoryCache.outputs[fileName] = output_1; - return output_1; - } - } - catch (err) { } - logger.debug({ fileName: fileName }, 'readThrough(): cache miss'); - var _a = __read(compile(code, fileName, lineOffset), 2), value = _a[0], sourceMap = _a[1]; - var output = updateOutput(value, fileName, sourceMap, getExtension, cwd); - logger.debug({ fileName: fileName, outputPath: outputPath }, 'readThrough(): writing caches'); - memoryCache.outputs[fileName] = output; - fs_1.writeFileSync(outputPath, output); - return output; - }; -} -function updateOutput(outputText, fileName, sourceMap, getExtension, sourceRoot) { - var base = path_1.basename(fileName); - var base64Map = buffer_from_1.default(updateSourceMap(sourceMap, fileName, sourceRoot), 'utf8').toString('base64'); - var sourceMapContent = "data:application/json;charset=utf-8;base64," + base64Map; - var sourceMapLength = (base + ".map").length + (getExtension(fileName).length - path_1.extname(fileName).length); - return outputText.slice(0, -sourceMapLength) + sourceMapContent; -} -function updateSourceMap(sourceMapText, fileName, _sourceRoot) { - var sourceMap = JSON.parse(sourceMapText); - sourceMap.file = fileName; - sourceMap.sources = [fileName]; - delete sourceMap.sourceRoot; - return stableStringify(sourceMap); -} -function getCacheName(sourceCode, fileName) { - return sha1_1.sha1(path_1.extname(fileName), '\x00', sourceCode); -} -function isValidCacheContent(contents) { - return /(?:9|0=|Q==)$/.test(contents.slice(-3)); -} diff --git a/node_modules/ts-jest/dist/config/config-set.d.ts b/node_modules/ts-jest/dist/config/config-set.d.ts index 97271cbd5..ffbd6fe30 100644 --- a/node_modules/ts-jest/dist/config/config-set.d.ts +++ b/node_modules/ts-jest/dist/config/config-set.d.ts @@ -1,34 +1,24 @@ -/// +import type { Config } from '@jest/types'; import { Logger } from 'bs-logger'; -import { CompilerOptions, CustomTransformers, ParsedCommandLine } from 'typescript'; -import { AstTransformerDesc, BabelConfig, BabelJestTransformer, TTypeScript, TsCompiler, TsJestConfig, TsJestGlobalOptions, TsJestHooksMap } from '../types'; +import { CompilerOptions, CustomTransformers, Diagnostic, ParsedCommandLine } from 'typescript'; +import type { TTypeScript } from '../types'; export declare class ConfigSet { - readonly parentOptions?: TsJestGlobalOptions | undefined; - readonly projectPackageJson: Record; - readonly projectDependencies: Record; - readonly jest: jest.ProjectConfig; - readonly tsJest: TsJestConfig; - readonly typescript: ParsedCommandLine; - readonly tsconfig: any; - readonly versions: Record; - private static loadConfig; - readonly babel: BabelConfig | undefined; + readonly logger: Logger; readonly compilerModule: TTypeScript; - readonly babelJestTransformer: BabelJestTransformer | undefined; - readonly tsCompiler: TsCompiler; - readonly astTransformers: AstTransformerDesc[]; - readonly tsCustomTransformers: CustomTransformers; - readonly hooks: TsJestHooksMap; - readonly shouldReportDiagnostic: (filePath: string) => boolean; - readonly shouldStringifyContent: (filePath: string) => boolean; - readonly tsCacheDir: string | undefined; - readonly overriddenCompilerOptions: Partial; - readonly rootDir: string; + readonly isolatedModules: boolean; readonly cwd: string; - readonly tsJestDigest: string; - readonly cacheKey: string; - readonly logger: Logger; - constructor(jestConfig: jest.ProjectConfig, parentOptions?: TsJestGlobalOptions | undefined, parentLogger?: Logger); + tsCacheDir: string | undefined; + parsedTsConfig: ParsedCommandLine | Record; + customTransformers: CustomTransformers; + readonly rootDir: string; + protected _overriddenCompilerOptions: Partial; + constructor(jestConfig: Config.ProjectConfig, parentLogger?: Logger | undefined); + protected _resolveTsConfig(compilerOptions?: CompilerOptions, resolvedConfigFile?: string): Record; + get tsJestDigest(): string; + get isTestFile(): (fileName: string) => boolean; + shouldStringifyContent(filePath: string): boolean; + raiseDiagnostics(diagnostics: Diagnostic[], filePath?: string, logger?: Logger): void; + shouldReportDiagnostics(filePath: string): boolean; resolvePath(inputPath: string, { throwIfMissing, nodeResolve }?: { throwIfMissing?: boolean; nodeResolve?: boolean; diff --git a/node_modules/ts-jest/dist/config/config-set.js b/node_modules/ts-jest/dist/config/config-set.js index a4153d359..1b1dd7cdc 100644 --- a/node_modules/ts-jest/dist/config/config-set.js +++ b/node_modules/ts-jest/dist/config/config-set.js @@ -16,15 +16,16 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key, else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; return c > 3 && r && Object.defineProperty(target, key, r), r; }; -var __values = (this && this.__values) || function (o) { - var m = typeof Symbol === "function" && o[Symbol.iterator], i = 0; +var __values = (this && this.__values) || function(o) { + var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0; if (m) return m.call(o); - return { + if (o && typeof o.length === "number") return { next: function () { if (o && i >= o.length) o = void 0; return { value: o && o[i++], done: !o }; } }; + throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); }; var __read = (this && this.__read) || function (o, n) { var m = typeof Symbol === "function" && o[Symbol.iterator]; @@ -46,62 +47,51 @@ var __spread = (this && this.__spread) || function () { for (var ar = [], i = 0; i < arguments.length; i++) ar = ar.concat(__read(arguments[i])); return ar; }; -var __importDefault = (this && this.__importDefault) || function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; -}; +var _a; Object.defineProperty(exports, "__esModule", { value: true }); +exports.ConfigSet = exports.TS_JEST_OUT_DIR = exports.IGNORE_DIAGNOSTIC_CODES = exports.MY_DIGEST = void 0; var bs_logger_1 = require("bs-logger"); var fs_1 = require("fs"); -var json5_1 = __importDefault(require("json5")); +var jest_util_1 = require("jest-util"); +var json5 = require("json5"); var path_1 = require("path"); -var semver_1 = __importDefault(require("semver")); -var __1 = require(".."); -var compiler_1 = require("../compiler"); -var transformers_1 = require("../transformers"); -var backports_1 = require("../util/backports"); -var get_package_version_1 = require("../util/get-package-version"); -var importer_1 = require("../util/importer"); -var json_1 = require("../util/json"); -var jsonable_value_1 = require("../util/jsonable-value"); -var logger_1 = require("../util/logger"); -var memoize_1 = require("../util/memoize"); -var messages_1 = require("../util/messages"); -var normalize_slashes_1 = require("../util/normalize-slashes"); -var sha1_1 = require("../util/sha1"); -var ts_error_1 = require("../util/ts-error"); -var logger = logger_1.rootLogger.child({ namespace: 'config' }); -exports.MATCH_NOTHING = /a^/; +var typescript_1 = require("typescript"); +var instance_1 = require("../compiler/instance"); +var constants_1 = require("../constants"); +var hoist_jest_1 = require("../transformers/hoist-jest"); +var backports_1 = require("../utils/backports"); +var importer_1 = require("../utils/importer"); +var json_1 = require("../utils/json"); +var logger_1 = require("../utils/logger"); +var memoize_1 = require("../utils/memoize"); +var messages_1 = require("../utils/messages"); +var normalize_slashes_1 = require("../utils/normalize-slashes"); +var sha1_1 = require("../utils/sha1"); +var ts_error_1 = require("../utils/ts-error"); +exports.MY_DIGEST = fs_1.readFileSync(path_1.resolve(__dirname, '..', '..', '.ts-jest-digest'), 'utf8'); exports.IGNORE_DIAGNOSTIC_CODES = [ 6059, 18002, 18003, ]; -var DiagnosticCodes; -(function (DiagnosticCodes) { - DiagnosticCodes[DiagnosticCodes["TsJest"] = 151000] = "TsJest"; - DiagnosticCodes[DiagnosticCodes["ConfigModuleOption"] = 151001] = "ConfigModuleOption"; -})(DiagnosticCodes = exports.DiagnosticCodes || (exports.DiagnosticCodes = {})); +exports.TS_JEST_OUT_DIR = '$$ts-jest$$'; +var TARGET_TO_VERSION_MAPPING = (_a = {}, + _a[typescript_1.ScriptTarget.ES2018] = 'es2018', + _a[typescript_1.ScriptTarget.ES2019] = 'es2019', + _a[typescript_1.ScriptTarget.ES2020] = 'es2020', + _a[typescript_1.ScriptTarget.ESNext] = 'ESNext', + _a); var normalizeRegex = function (pattern) { return pattern ? (typeof pattern === 'string' ? pattern : pattern.source) : undefined; }; -var toDiagnosticCode = function (code) { - return code ? parseInt(("" + code).trim().replace(/^TS/, ''), 10) || undefined : undefined; -}; +var toDiagnosticCode = function (code) { var _a; return code ? (_a = parseInt(("" + code).trim().replace(/^TS/, ''), 10)) !== null && _a !== void 0 ? _a : undefined : undefined; }; var toDiagnosticCodeList = function (items, into) { - if (into === void 0) { into = []; } var e_1, _a; - if (!Array.isArray(items)) - items = [items]; + if (into === void 0) { into = []; } try { for (var items_1 = __values(items), items_1_1 = items_1.next(); !items_1_1.done; items_1_1 = items_1.next()) { var item = items_1_1.value; - if (!item) - continue; - if (Array.isArray(item)) { - toDiagnosticCodeList(item, into); - continue; - } - else if (typeof item === 'string') { + if (typeof item === 'string') { var children = item.trim().split(/\s*,\s*/g); if (children.length > 1) { toDiagnosticCodeList(children, into); @@ -126,296 +116,287 @@ var toDiagnosticCodeList = function (items, into) { return into; }; var ConfigSet = (function () { - function ConfigSet(jestConfig, parentOptions, parentLogger) { + function ConfigSet(jestConfig, parentLogger) { var _a; - this.parentOptions = parentOptions; - this._jestConfig = jestConfig; - this.logger = parentLogger ? parentLogger.child((_a = {}, _a[bs_logger_1.LogContexts.namespace] = 'config', _a)) : logger; + var _b, _c, _d, _e; + this.jestConfig = jestConfig; + this.parentLogger = parentLogger; + this.customTransformers = Object.create(null); + this._overriddenCompilerOptions = { + sourceMap: true, + inlineSourceMap: false, + inlineSources: true, + declaration: false, + noEmit: false, + removeComments: false, + out: undefined, + outFile: undefined, + composite: undefined, + declarationDir: undefined, + declarationMap: undefined, + emitDeclarationOnly: undefined, + sourceRoot: undefined, + tsBuildInfoFile: undefined, + }; + this.logger = this.parentLogger + ? this.parentLogger.child((_a = {}, _a[bs_logger_1.LogContexts.namespace] = 'config', _a)) + : logger_1.rootLogger.child({ namespace: 'config' }); + this.cwd = path_1.normalize((_b = this.jestConfig.cwd) !== null && _b !== void 0 ? _b : process.cwd()); + this.rootDir = path_1.normalize((_c = this.jestConfig.rootDir) !== null && _c !== void 0 ? _c : this.cwd); + var tsJestCfg = this.jestConfig.globals && this.jestConfig.globals['ts-jest']; + var options = tsJestCfg !== null && tsJestCfg !== void 0 ? tsJestCfg : Object.create(null); + this.compilerModule = importer_1.importer.typescript("Using \"ts-jest\" requires this package to be installed.", (_d = options.compiler) !== null && _d !== void 0 ? _d : 'typescript'); + this.isolatedModules = (_e = options.isolatedModules) !== null && _e !== void 0 ? _e : false; + this.logger.debug({ compilerModule: this.compilerModule }, 'normalized compiler module config via ts-jest option'); + this._backportJestCfg(); + this._setupTsJestCfg(options); + this._resolveTsCacheDir(); } - Object.defineProperty(ConfigSet.prototype, "projectPackageJson", { - get: function () { - var packageJson = this.tsJest.packageJson; - if (packageJson && packageJson.kind === 'inline') { - return packageJson.value; - } - if (packageJson && packageJson.kind === 'file' && packageJson.value) { - var path = this.resolvePath(packageJson.value); - if (fs_1.existsSync(path)) { - return require(path); + ConfigSet.prototype._backportJestCfg = function () { + var config = backports_1.backportJestConfig(this.logger, this.jestConfig); + this.logger.debug({ jestConfig: config }, 'normalized jest config'); + this._jestCfg = config; + }; + ConfigSet.prototype._setupTsJestCfg = function (options) { + var _this = this; + var _a, _b, _c; + if (options.packageJson) { + this.logger.warn("The option `packageJson` is deprecated and will be removed in ts-jest 27. This option is not used by internal `ts-jest`"); + } + if (!options.babelConfig) { + this.logger.debug('babel is disabled'); + } + else { + var baseBabelCfg = { cwd: this.cwd }; + if (typeof options.babelConfig === 'string') { + var babelCfgPath = this.resolvePath(options.babelConfig); + if (path_1.extname(options.babelConfig) === '.js') { + this._babelConfig = __assign(__assign({}, baseBabelCfg), require(babelCfgPath)); } - this.logger.warn(messages_1.Errors.UnableToFindProjectRoot); - return {}; - } - var tsJestRoot = path_1.resolve(__dirname, '..', '..'); - var pkgPath = path_1.resolve(tsJestRoot, '..', '..', 'package.json'); - if (fs_1.existsSync(pkgPath)) { - return require(pkgPath); - } - if (fs_1.realpathSync(this.rootDir) === fs_1.realpathSync(tsJestRoot)) { - pkgPath = path_1.resolve(tsJestRoot, 'package.json'); - if (fs_1.existsSync(pkgPath)) { - return require(pkgPath); + else { + this._babelConfig = __assign(__assign({}, baseBabelCfg), json5.parse(fs_1.readFileSync(babelCfgPath, 'utf-8'))); } } - this.logger.warn(messages_1.Errors.UnableToFindProjectRoot); - return {}; - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(ConfigSet.prototype, "projectDependencies", { - get: function () { - var pkg = this.projectPackageJson; - var names = Object.keys(__assign({}, pkg.optionalDependencies, pkg.peerDependencies, pkg.devDependencies, pkg.dependencies)); - return names.reduce(function (map, name) { - var version = get_package_version_1.getPackageVersion(name); - if (version) - map[name] = version; - return map; - }, {}); - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(ConfigSet.prototype, "jest", { - get: function () { - var config = backports_1.backportJestConfig(this.logger, this._jestConfig); - if (this.parentOptions) { - var globals = config.globals || (config.globals = {}); - globals['ts-jest'] = __assign({}, this.parentOptions, globals['ts-jest']); - } - this.logger.debug({ jestConfig: config }, 'normalized jest config'); - return config; - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(ConfigSet.prototype, "tsJest", { - get: function () { - var _this = this; - var parsedConfig = this.jest; - var _a = parsedConfig.globals, globals = _a === void 0 ? {} : _a; - var options = __assign({}, globals['ts-jest']); - var tsConfigOpt = options.tsConfig; - var tsConfig; - if (typeof tsConfigOpt === 'string' || tsConfigOpt == null || tsConfigOpt === true) { - tsConfig = { - kind: 'file', - value: typeof tsConfigOpt === 'string' ? this.resolvePath(tsConfigOpt) : undefined, - }; - } - else if (typeof tsConfigOpt === 'object') { - tsConfig = { - kind: 'inline', - value: tsConfigOpt, - }; - } - var packageJsonOpt = options.packageJson; - var packageJson; - if (typeof packageJsonOpt === 'string' || packageJsonOpt == null || packageJsonOpt === true) { - packageJson = { - kind: 'file', - value: typeof packageJsonOpt === 'string' ? this.resolvePath(packageJsonOpt) : undefined, - }; - } - else if (typeof packageJsonOpt === 'object') { - packageJson = { - kind: 'inline', - value: packageJsonOpt, - }; - } - var transformers = (options.astTransformers || []).map(function (mod) { return _this.resolvePath(mod, { nodeResolve: true }); }); - var babelConfigOpt = options.babelConfig; - var babelConfig; - if (typeof babelConfigOpt === 'string' || babelConfigOpt === true) { - babelConfig = { - kind: 'file', - value: babelConfigOpt === true ? undefined : this.resolvePath(babelConfigOpt), - }; + else if (typeof options.babelConfig === 'object') { + this._babelConfig = __assign(__assign({}, baseBabelCfg), options.babelConfig); } - else if (babelConfigOpt) { - babelConfig = { - kind: 'inline', - value: babelConfigOpt, - }; - } - var diagnostics; - var _b = options.diagnostics, diagnosticsOpt = _b === void 0 ? true : _b; - var ignoreList = [exports.IGNORE_DIAGNOSTIC_CODES, process.env.TS_JEST_IGNORE_DIAGNOSTICS]; - if (diagnosticsOpt === true || diagnosticsOpt == null) { - diagnostics = { ignoreCodes: [], pretty: true, throws: true }; + else { + this._babelConfig = baseBabelCfg; } - else if (diagnosticsOpt === false) { - diagnostics = { - throws: false, - pretty: true, - ignoreCodes: [], - pathRegex: exports.MATCH_NOTHING.source, + this.logger.debug({ babelConfig: this._babelConfig }, 'normalized babel config via ts-jest option'); + } + if (!this._babelConfig) { + this._overriddenCompilerOptions.module = this.compilerModule.ModuleKind.CommonJS; + } + else { + this._babelJestTransformers = importer_1.importer + .babelJest("Using \"babel-jest\" requires this package to be installed.") + .createTransformer(this._babelConfig); + this.logger.debug('created babel-jest transformer'); + } + var diagnosticsOpt = (_a = options.diagnostics) !== null && _a !== void 0 ? _a : true; + var ignoreList = __spread(exports.IGNORE_DIAGNOSTIC_CODES); + if (typeof diagnosticsOpt === 'object') { + var ignoreCodes = diagnosticsOpt.ignoreCodes; + if (ignoreCodes) { + Array.isArray(ignoreCodes) ? ignoreList.push.apply(ignoreList, __spread(ignoreCodes)) : ignoreList.push(ignoreCodes); + } + this._diagnostics = { + pretty: (_b = diagnosticsOpt.pretty) !== null && _b !== void 0 ? _b : true, + ignoreCodes: toDiagnosticCodeList(ignoreList), + pathRegex: normalizeRegex(diagnosticsOpt.pathRegex), + throws: !diagnosticsOpt.warnOnly, + }; + } + else { + this._diagnostics = { + ignoreCodes: diagnosticsOpt ? toDiagnosticCodeList(ignoreList) : [], + pretty: true, + throws: diagnosticsOpt, + }; + } + this.logger.debug({ diagnostics: this._diagnostics }, 'normalized diagnostics config via ts-jest option'); + if (options.tsConfig) { + this.logger.warn("The option `tsConfig` is deprecated and will be removed in ts-jest 27, use `tsconfig` instead"); + } + var tsconfigOpt = (_c = options.tsConfig) !== null && _c !== void 0 ? _c : options.tsconfig; + var configFilePath = typeof tsconfigOpt === 'string' ? this.resolvePath(tsconfigOpt) : undefined; + this.parsedTsConfig = this._resolveTsConfig(typeof tsconfigOpt === 'object' ? tsconfigOpt : undefined, configFilePath); + this.raiseDiagnostics(this.parsedTsConfig.errors, configFilePath); + this.logger.debug({ tsconfig: this.parsedTsConfig }, 'normalized typescript config via ts-jest option'); + var astTransformers = options.astTransformers; + this.customTransformers = { + before: [hoist_jest_1.factory(this)], + }; + if (astTransformers) { + if (Array.isArray(astTransformers)) { + this.logger.warn("The configuration for astTransformers as string[] is deprecated and will be removed in ts-jest 27. Please define your custom AST transformers in a form of an object. More information you can check online documentation https://kulshekhar.github.io/ts-jest/user/config/astTransformers"); + this.customTransformers = { + before: __spread(this.customTransformers.before, astTransformers.map(function (transformer) { + var transformerPath = _this.resolvePath(transformer, { nodeResolve: true }); + return require(transformerPath).factory(_this); + })), }; } else { - ignoreList.push(diagnosticsOpt.ignoreCodes); - diagnostics = { - pretty: diagnosticsOpt.pretty == null ? true : !!diagnosticsOpt.pretty, - ignoreCodes: [], - pathRegex: normalizeRegex(diagnosticsOpt.pathRegex), - throws: !diagnosticsOpt.warnOnly, + var resolveTransformers = function (transformers) { + return transformers.map(function (transformer) { + var transformerPath; + if (typeof transformer === 'string') { + transformerPath = _this.resolvePath(transformer, { nodeResolve: true }); + return require(transformerPath).factory(_this); + } + else { + transformerPath = _this.resolvePath(transformer.path, { nodeResolve: true }); + return require(transformerPath).factory(_this, transformer.options); + } + }); }; - } - diagnostics.ignoreCodes = toDiagnosticCodeList(ignoreList); - var stringifyContentPathRegex = normalizeRegex(options.stringifyContentPathRegex); - var res = { - tsConfig: tsConfig, - packageJson: packageJson, - babelConfig: babelConfig, - diagnostics: diagnostics, - isolatedModules: !!options.isolatedModules, - compiler: options.compiler || 'typescript', - transformers: transformers, - stringifyContentPathRegex: stringifyContentPathRegex, - }; - this.logger.debug({ tsJestConfig: res }, 'normalized ts-jest config'); - return res; - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(ConfigSet.prototype, "typescript", { - get: function () { - return this._typescript.resolved; - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(ConfigSet.prototype, "tsconfig", { - get: function () { - return this._typescript.input; - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(ConfigSet.prototype, "versions", { - get: function () { - var modules = ['jest', this.tsJest.compiler]; - if (this.tsJest.babelConfig) { - modules.push('@babel/core', 'babel-jest'); - } - return modules.reduce(function (map, name) { - map[name] = get_package_version_1.getPackageVersion(name) || '-'; - return map; - }, { 'ts-jest': __1.version }); - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(ConfigSet.prototype, "_typescript", { - get: function () { - var tsConfig = this.tsJest.tsConfig; - var configFilePath = tsConfig && tsConfig.kind === 'file' ? tsConfig.value : undefined; - var result = this.readTsConfig(tsConfig && tsConfig.kind === 'inline' ? tsConfig.value : undefined, configFilePath, tsConfig == null); - this.raiseDiagnostics(result.resolved.errors, configFilePath); - this.logger.debug({ tsconfig: result }, 'normalized typescript config'); - return result; - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(ConfigSet.prototype, "raiseDiagnostics", { - get: function () { - var _this = this; - var _a = this, createTsError = _a.createTsError, filterDiagnostics = _a.filterDiagnostics, throws = _a.tsJest.diagnostics.throws, DiagnosticCategory = _a.compilerModule.DiagnosticCategory; - return function (diagnostics, filePath, logger) { - if (logger === void 0) { logger = _this.logger; } - var filteredDiagnostics = filterDiagnostics(diagnostics, filePath); - if (filteredDiagnostics.length === 0) - return; - var error = createTsError(filteredDiagnostics); - var importantCategories = [DiagnosticCategory.Warning, DiagnosticCategory.Error]; - if (throws && filteredDiagnostics.some(function (d) { return importantCategories.includes(d.category); })) { - throw error; + if (astTransformers.before) { + this.customTransformers = { + before: __spread(this.customTransformers.before, resolveTransformers(astTransformers.before)), + }; + } + if (astTransformers.after) { + this.customTransformers = __assign(__assign({}, this.customTransformers), { after: resolveTransformers(astTransformers.after) }); + } + if (astTransformers.afterDeclarations) { + this.customTransformers = __assign(__assign({}, this.customTransformers), { afterDeclarations: resolveTransformers(astTransformers.afterDeclarations) }); } - logger.warn({ error: error }, error.message); - }; - }, - enumerable: true, - configurable: true - }); - ConfigSet.loadConfig = function (base) { - var _a = importer_1.importer.babelCore(messages_1.ImportReasons.BabelJest), OptionManager = _a.OptionManager, loadPartialConfig = _a.loadPartialConfig, version = _a.version; - if (version && semver_1.default.satisfies(version, '>=6 <7')) { - delete base.cwd; - } - if (typeof loadPartialConfig === 'function') { - var partialConfig = loadPartialConfig(base); - if (partialConfig) { - return partialConfig.options; } } - return new OptionManager().init(base); + this.logger.debug({ customTransformers: this.customTransformers }, 'normalized custom AST transformers via ts-jest option'); + if (options.stringifyContentPathRegex) { + this._stringifyContentRegExp = + typeof options.stringifyContentPathRegex === 'string' + ? new RegExp(normalizeRegex(options.stringifyContentPathRegex)) + : options.stringifyContentPathRegex; + this.logger.debug({ stringifyContentPathRegex: this._stringifyContentRegExp }, 'normalized stringifyContentPathRegex config via ts-jest option'); + } }; - Object.defineProperty(ConfigSet.prototype, "babel", { - get: function () { - var babelConfig = this.tsJest.babelConfig; - if (babelConfig == null) { - this.logger.debug('babel is disabled'); - return; + ConfigSet.prototype._resolveTsCacheDir = function () { + if (!this._jestCfg.cache) { + this.logger.debug('file caching disabled'); + return undefined; + } + var cacheSuffix = sha1_1.sha1(json_1.stringify({ + version: this.compilerModule.version, + digest: this.tsJestDigest, + compilerModule: this.compilerModule, + compilerOptions: this.parsedTsConfig.options, + isolatedModules: this.isolatedModules, + diagnostics: this._diagnostics, + })); + var res = path_1.join(this._jestCfg.cacheDirectory, 'ts-jest', cacheSuffix.substr(0, 2), cacheSuffix.substr(2)); + this.logger.debug({ cacheDirectory: res }, 'will use file caching'); + this.tsCacheDir = res; + }; + ConfigSet.prototype._resolveTsConfig = function (compilerOptions, resolvedConfigFile) { + var e_2, _a; + var _b; + var config = { compilerOptions: Object.create(null) }; + var basePath = normalize_slashes_1.normalizeSlashes(this.rootDir); + var ts = this.compilerModule; + var configFileName = resolvedConfigFile + ? normalize_slashes_1.normalizeSlashes(resolvedConfigFile) + : ts.findConfigFile(normalize_slashes_1.normalizeSlashes(this.rootDir), ts.sys.fileExists); + if (configFileName) { + this.logger.debug({ tsConfigFileName: configFileName }, 'readTsConfig(): reading', configFileName); + var result_1 = ts.readConfigFile(configFileName, ts.sys.readFile); + if (result_1.error) { + return { errors: [result_1.error], fileNames: [], options: {} }; + } + config = result_1.config; + basePath = normalize_slashes_1.normalizeSlashes(path_1.dirname(configFileName)); + } + config.compilerOptions = __assign(__assign({}, config.compilerOptions), compilerOptions); + var result = ts.parseJsonConfigFileContent(config, ts.sys, basePath, undefined, configFileName); + var forcedOptions = this._overriddenCompilerOptions; + var finalOptions = result.options; + if (finalOptions.target === undefined) { + finalOptions.target = ts.ScriptTarget.ES5; + } + var target = finalOptions.target; + var defaultModule = [ts.ScriptTarget.ES3, ts.ScriptTarget.ES5].includes(target) + ? ts.ModuleKind.CommonJS + : ts.ModuleKind.ESNext; + var moduleValue = finalOptions.module == null ? defaultModule : finalOptions.module; + if ('module' in forcedOptions && + moduleValue !== forcedOptions.module && + !(finalOptions.esModuleInterop || finalOptions.allowSyntheticDefaultImports)) { + result.errors.push({ + code: 151001, + messageText: "If you have issues related to imports, you should consider setting `esModuleInterop` to `true` in your TypeScript configuration file (usually `tsconfig.json`). See https://blogs.msdn.microsoft.com/typescript/2018/01/31/announcing-typescript-2-7/#easier-ecmascript-module-interoperability for more information.", + category: ts.DiagnosticCategory.Message, + file: undefined, + start: undefined, + length: undefined, + }); + if (!('allowSyntheticDefaultImports' in config.compilerOptions)) { + finalOptions.allowSyntheticDefaultImports = true; } - var base = { cwd: this.cwd }; - if (babelConfig.kind === 'file') { - if (babelConfig.value) { - base = __assign({}, base, json5_1.default.parse(fs_1.readFileSync(babelConfig.value, 'utf8'))); + } + if (finalOptions.allowJs && !finalOptions.outDir) { + finalOptions.outDir = exports.TS_JEST_OUT_DIR; + } + try { + for (var _c = __values(Object.keys(forcedOptions)), _d = _c.next(); !_d.done; _d = _c.next()) { + var key = _d.value; + var val = forcedOptions[key]; + if (val === undefined) { + delete finalOptions[key]; + } + else { + finalOptions[key] = val; } } - else if (babelConfig.kind === 'inline') { - base = __assign({}, base, babelConfig.value); + } + catch (e_2_1) { e_2 = { error: e_2_1 }; } + finally { + try { + if (_d && !_d.done && (_a = _c.return)) _a.call(_c); } - var config = ConfigSet.loadConfig(base); - this.logger.debug({ babelConfig: config }, 'normalized babel config'); - return config; - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(ConfigSet.prototype, "compilerModule", { - get: function () { - return importer_1.importer.typescript(messages_1.ImportReasons.TsJest, this.tsJest.compiler); - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(ConfigSet.prototype, "babelJestTransformer", { + finally { if (e_2) throw e_2.error; } + } + var nodeJsVer = process.version; + var compilationTarget = result.options.target; + if (!this._babelConfig && + ((nodeJsVer.startsWith('v10') && compilationTarget > typescript_1.ScriptTarget.ES2018) || + (nodeJsVer.startsWith('v12') && compilationTarget > typescript_1.ScriptTarget.ES2019))) { + var message = messages_1.interpolate("There is a mismatch between your NodeJs version {{nodeJsVer}} and your TypeScript target {{compilationTarget}}. This might lead to some unexpected errors when running tests with `ts-jest`. To fix this, you can check https://github.com/microsoft/TypeScript/wiki/Node-Target-Mapping", { + nodeJsVer: process.version, + compilationTarget: (_b = config.compilerOptions.target) !== null && _b !== void 0 ? _b : TARGET_TO_VERSION_MAPPING[compilationTarget], + }); + this.logger.warn(message); + } + return result; + }; + Object.defineProperty(ConfigSet.prototype, "tsCompiler", { get: function () { - var babel = this.babel; - if (!babel) - return; - this.logger.debug('creating babel-jest transformer'); - return importer_1.importer.babelJest(messages_1.ImportReasons.BabelJest).createTransformer(babel); + return instance_1.createCompilerInstance(this); }, - enumerable: true, + enumerable: false, configurable: true }); - Object.defineProperty(ConfigSet.prototype, "tsCompiler", { + Object.defineProperty(ConfigSet.prototype, "babelConfig", { get: function () { - return compiler_1.createCompiler(this); + return this._babelConfig; }, - enumerable: true, + enumerable: false, configurable: true }); - Object.defineProperty(ConfigSet.prototype, "astTransformers", { + Object.defineProperty(ConfigSet.prototype, "babelJestTransformer", { get: function () { - return __spread(transformers_1.internals, this.tsJest.transformers.map(function (m) { return require(m); })); + return this._babelJestTransformers; }, - enumerable: true, + enumerable: false, configurable: true }); - Object.defineProperty(ConfigSet.prototype, "tsCustomTransformers", { + Object.defineProperty(ConfigSet.prototype, "tsJestDigest", { get: function () { - var _this = this; - return { - before: this.astTransformers.map(function (t) { return t.factory(_this); }), - }; + return exports.MY_DIGEST; }, - enumerable: true, + enumerable: false, configurable: true }); Object.defineProperty(ConfigSet.prototype, "hooks", { @@ -427,260 +408,74 @@ var ConfigSet = (function () { } return {}; }, - enumerable: true, + enumerable: false, configurable: true }); - Object.defineProperty(ConfigSet.prototype, "filterDiagnostics", { + Object.defineProperty(ConfigSet.prototype, "isTestFile", { get: function () { - var _a = this, ignoreCodes = _a.tsJest.diagnostics.ignoreCodes, shouldReportDiagnostic = _a.shouldReportDiagnostic; - return function (diagnostics, filePath) { - if (filePath && !shouldReportDiagnostic(filePath)) - return []; - return diagnostics.filter(function (diagnostic) { - if (diagnostic.file && diagnostic.file.fileName && !shouldReportDiagnostic(diagnostic.file.fileName)) { - return false; - } - return ignoreCodes.indexOf(diagnostic.code) === -1; - }); - }; - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(ConfigSet.prototype, "shouldReportDiagnostic", { - get: function () { - var pathRegex = this.tsJest.diagnostics.pathRegex; - if (pathRegex) { - var regex_1 = new RegExp(pathRegex); - return function (file) { return regex_1.test(file); }; - } - else { - return function () { return true; }; - } - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(ConfigSet.prototype, "shouldStringifyContent", { - get: function () { - var stringifyContentPathRegex = this.tsJest.stringifyContentPathRegex; - if (stringifyContentPathRegex) { - var regex_2 = new RegExp(stringifyContentPathRegex); - return function (file) { return regex_2.test(file); }; - } - else { - return function () { return false; }; - } - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(ConfigSet.prototype, "createTsError", { - get: function () { - var _this = this; - var pretty = this.tsJest.diagnostics.pretty; - var formatDiagnostics = pretty - ? this.compilerModule.formatDiagnosticsWithColorAndContext - : this.compilerModule.formatDiagnostics; - var diagnosticHost = { - getNewLine: function () { return '\n'; }, - getCurrentDirectory: function () { return _this.cwd; }, - getCanonicalFileName: function (path) { return path; }, - }; - return function (diagnostics) { - var diagnosticText = formatDiagnostics(diagnostics, diagnosticHost); - var diagnosticCodes = diagnostics.map(function (x) { return x.code; }); - return new ts_error_1.TSError(diagnosticText, diagnosticCodes); - }; - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(ConfigSet.prototype, "tsCacheDir", { - get: function () { - if (!this.jest.cache) { - logger.debug('file caching disabled'); - return; + var matchablePatterns = __spread(this._jestCfg.testMatch, this._jestCfg.testRegex).filter(function (pattern) { + return pattern instanceof RegExp || typeof pattern === 'string'; + }); + if (!matchablePatterns.length) { + matchablePatterns.push.apply(matchablePatterns, __spread(constants_1.DEFAULT_JEST_TEST_MATCH)); } - var cacheSuffix = sha1_1.sha1(json_1.stringify({ - version: this.compilerModule.version, - digest: this.tsJestDigest, - dependencies: this.projectDependencies, - compiler: this.tsJest.compiler, - compilerOptions: this.typescript.options, - isolatedModules: this.tsJest.isolatedModules, - diagnostics: this.tsJest.diagnostics, - })); - var res = path_1.join(this.jest.cacheDirectory, 'ts-jest', cacheSuffix.substr(0, 2), cacheSuffix.substr(2)); - logger.debug({ cacheDirectory: res }, 'will use file caching'); - return res; - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(ConfigSet.prototype, "overriddenCompilerOptions", { - get: function () { - var options = { - sourceMap: true, - inlineSourceMap: false, - inlineSources: true, - declaration: false, - noEmit: false, - outDir: '$$ts-jest$$', - removeComments: false, - out: undefined, - outFile: undefined, - composite: undefined, - declarationDir: undefined, - declarationMap: undefined, - emitDeclarationOnly: undefined, - sourceRoot: undefined, + var stringPatterns = matchablePatterns.filter(function (pattern) { return typeof pattern === 'string'; }); + var isMatch = jest_util_1.globsToMatcher(stringPatterns); + return function (fileName) { + return matchablePatterns.some(function (pattern) { return (typeof pattern === 'string' ? isMatch(fileName) : pattern.test(fileName)); }); }; - if (!this.tsJest.babelConfig) { - options.module = this.compilerModule.ModuleKind.CommonJS; - } - return options; - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(ConfigSet.prototype, "rootDir", { - get: function () { - return path_1.normalize(this.jest.rootDir || this.cwd); - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(ConfigSet.prototype, "cwd", { - get: function () { - return path_1.normalize(this.jest.cwd || process.cwd()); - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(ConfigSet.prototype, "isDoctoring", { - get: function () { - return !!process.env.TS_JEST_DOCTOR; - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(ConfigSet.prototype, "tsJestDigest", { - get: function () { - return __1.digest; - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(ConfigSet.prototype, "jsonValue", { - get: function () { - var jest = __assign({}, this.jest); - var globals = (jest.globals = __assign({}, jest.globals)); - delete jest.name; - delete jest.cacheDirectory; - delete globals['ts-jest']; - return new jsonable_value_1.JsonableValue({ - versions: this.versions, - projectDepVersions: this.projectDependencies, - digest: this.tsJestDigest, - transformers: this.astTransformers.map(function (t) { return t.name + "@" + t.version; }), - jest: jest, - tsJest: this.tsJest, - babel: this.babel, - tsconfig: this.typescript.options, - }); - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(ConfigSet.prototype, "cacheKey", { - get: function () { - return this.jsonValue.serialized; }, - enumerable: true, + enumerable: false, configurable: true }); - ConfigSet.prototype.makeDiagnostic = function (code, messageText, options) { - if (options === void 0) { options = {}; } - var _a = options.category, category = _a === void 0 ? this.compilerModule.DiagnosticCategory.Warning : _a, file = options.file, start = options.start, length = options.length; - return { - code: code, - messageText: messageText, - category: category, - file: file, - start: start, - length: length, - }; + ConfigSet.prototype.shouldStringifyContent = function (filePath) { + return this._stringifyContentRegExp ? this._stringifyContentRegExp.test(filePath) : false; }; - ConfigSet.prototype.readTsConfig = function (compilerOptions, resolvedConfigFile, noProject) { - var e_2, _a; - var config = { compilerOptions: {} }; - var basePath = normalize_slashes_1.normalizeSlashes(this.rootDir); - var configFileName; - var ts = this.compilerModule; - var input; - if (noProject) { - input = { compilerOptions: __assign({}, compilerOptions) }; - } - else { - configFileName = resolvedConfigFile - ? normalize_slashes_1.normalizeSlashes(resolvedConfigFile) - : ts.findConfigFile(normalize_slashes_1.normalizeSlashes(this.rootDir), ts.sys.fileExists); - if (configFileName) { - this.logger.debug({ tsConfigFileName: configFileName }, 'readTsConfig(): reading', configFileName); - var result_1 = ts.readConfigFile(configFileName, ts.sys.readFile); - if (result_1.error) { - return { - resolved: { errors: [result_1.error], fileNames: [], options: {} }, - }; + ConfigSet.prototype.raiseDiagnostics = function (diagnostics, filePath, logger) { + var _this = this; + var ignoreCodes = this._diagnostics.ignoreCodes; + var DiagnosticCategory = this.compilerModule.DiagnosticCategory; + var filteredDiagnostics = filePath && !this.shouldReportDiagnostics(filePath) + ? [] + : diagnostics.filter(function (diagnostic) { + var _a; + if (((_a = diagnostic.file) === null || _a === void 0 ? void 0 : _a.fileName) && !_this.shouldReportDiagnostics(diagnostic.file.fileName)) { + return false; } - config = result_1.config; - input = __assign({}, result_1.config, { compilerOptions: __assign({}, (result_1.config && result_1.config.compilerOptions), compilerOptions) }); - basePath = normalize_slashes_1.normalizeSlashes(path_1.dirname(configFileName)); - } - } - config.compilerOptions = __assign({}, config.compilerOptions, compilerOptions); - var result = ts.parseJsonConfigFileContent(config, ts.sys, basePath, undefined, configFileName); - var forcedOptions = this.overriddenCompilerOptions; - var finalOptions = result.options; - if (finalOptions.target === undefined) { - finalOptions.target = ts.ScriptTarget.ES5; - } - var target = finalOptions.target; - var defaultModule = [ts.ScriptTarget.ES3, ts.ScriptTarget.ES5].includes(target) - ? ts.ModuleKind.CommonJS - : ts.ModuleKind.ESNext; - var moduleValue = finalOptions.module == null ? defaultModule : finalOptions.module; - if ('module' in forcedOptions && - moduleValue !== forcedOptions.module && - !(finalOptions.esModuleInterop || finalOptions.allowSyntheticDefaultImports)) { - result.errors.push(this.makeDiagnostic(DiagnosticCodes.ConfigModuleOption, messages_1.Errors.ConfigNoModuleInterop, { - category: ts.DiagnosticCategory.Message, - })); - if (!('allowSyntheticDefaultImports' in config.compilerOptions)) { - finalOptions.allowSyntheticDefaultImports = true; - } + return !ignoreCodes.includes(diagnostic.code); + }); + if (!filteredDiagnostics.length) + return; + var error = this._createTsError(filteredDiagnostics); + var importantCategories = [DiagnosticCategory.Warning, DiagnosticCategory.Error]; + if (this._diagnostics.throws && filteredDiagnostics.some(function (d) { return importantCategories.includes(d.category); })) { + throw error; } - try { - for (var _b = __values(Object.keys(forcedOptions)), _c = _b.next(); !_c.done; _c = _b.next()) { - var key = _c.value; - var val = forcedOptions[key]; - if (val === undefined) { - delete finalOptions[key]; - } - else { - finalOptions[key] = val; - } - } + logger ? logger.warn({ error: error }, error.message) : this.logger.warn({ error: error }, error.message); + }; + ConfigSet.prototype.shouldReportDiagnostics = function (filePath) { + var pathRegex = this._diagnostics.pathRegex; + if (pathRegex) { + var regex = new RegExp(pathRegex); + return regex.test(filePath); } - catch (e_2_1) { e_2 = { error: e_2_1 }; } - finally { - try { - if (_c && !_c.done && (_a = _b.return)) _a.call(_b); - } - finally { if (e_2) throw e_2.error; } + else { + return true; } - return { input: input, resolved: result }; + }; + ConfigSet.prototype._createTsError = function (diagnostics) { + var _this = this; + var formatDiagnostics = this._diagnostics.pretty + ? this.compilerModule.formatDiagnosticsWithColorAndContext + : this.compilerModule.formatDiagnostics; + var diagnosticHost = { + getNewLine: function () { return '\n'; }, + getCurrentDirectory: function () { return _this.cwd; }, + getCanonicalFileName: function (path) { return path; }, + }; + var diagnosticText = formatDiagnostics(diagnostics, diagnosticHost); + var diagnosticCodes = diagnostics.map(function (x) { return x.code; }); + return new ts_error_1.TSError(diagnosticText, diagnosticCodes); }; ConfigSet.prototype.resolvePath = function (inputPath, _a) { var _b = _a === void 0 ? {} : _a, _c = _b.throwIfMissing, throwIfMissing = _c === void 0 ? true : _c, _d = _b.nodeResolve, nodeResolve = _d === void 0 ? false : _d; @@ -709,86 +504,23 @@ var ConfigSet = (function () { catch (_) { } } if (throwIfMissing && !fs_1.existsSync(path)) { - throw new Error(messages_1.interpolate(messages_1.Errors.FileNotFound, { inputPath: inputPath, resolvedPath: path })); + throw new Error(messages_1.interpolate("File not found: {{inputPath}} (resolved as: {{resolvedPath}})", { inputPath: inputPath, resolvedPath: path })); } this.logger.debug({ fromPath: inputPath, toPath: path }, 'resolved path from', inputPath, 'to', path); return path; }; - ConfigSet.prototype.toJSON = function () { - return this.jsonValue.value; - }; - __decorate([ - memoize_1.Memoize() - ], ConfigSet.prototype, "projectPackageJson", null); - __decorate([ - memoize_1.Memoize() - ], ConfigSet.prototype, "projectDependencies", null); - __decorate([ - memoize_1.Memoize() - ], ConfigSet.prototype, "jest", null); - __decorate([ - memoize_1.Memoize() - ], ConfigSet.prototype, "tsJest", null); - __decorate([ - memoize_1.Memoize() - ], ConfigSet.prototype, "versions", null); - __decorate([ - memoize_1.Memoize() - ], ConfigSet.prototype, "_typescript", null); - __decorate([ - memoize_1.Memoize() - ], ConfigSet.prototype, "raiseDiagnostics", null); - __decorate([ - memoize_1.Memoize() - ], ConfigSet.prototype, "babel", null); - __decorate([ - memoize_1.Memoize() - ], ConfigSet.prototype, "compilerModule", null); - __decorate([ - memoize_1.Memoize() - ], ConfigSet.prototype, "babelJestTransformer", null); __decorate([ memoize_1.Memoize() ], ConfigSet.prototype, "tsCompiler", null); __decorate([ memoize_1.Memoize() - ], ConfigSet.prototype, "astTransformers", null); - __decorate([ - memoize_1.Memoize() - ], ConfigSet.prototype, "tsCustomTransformers", null); + ], ConfigSet.prototype, "tsJestDigest", null); __decorate([ memoize_1.Memoize() ], ConfigSet.prototype, "hooks", null); __decorate([ memoize_1.Memoize() - ], ConfigSet.prototype, "filterDiagnostics", null); - __decorate([ - memoize_1.Memoize() - ], ConfigSet.prototype, "shouldReportDiagnostic", null); - __decorate([ - memoize_1.Memoize() - ], ConfigSet.prototype, "shouldStringifyContent", null); - __decorate([ - memoize_1.Memoize() - ], ConfigSet.prototype, "createTsError", null); - __decorate([ - memoize_1.Memoize() - ], ConfigSet.prototype, "tsCacheDir", null); - __decorate([ - memoize_1.Memoize() - ], ConfigSet.prototype, "overriddenCompilerOptions", null); - __decorate([ - memoize_1.Memoize() - ], ConfigSet.prototype, "rootDir", null); - __decorate([ - memoize_1.Memoize() - ], ConfigSet.prototype, "cwd", null); - __decorate([ - memoize_1.Memoize() - ], ConfigSet.prototype, "tsJestDigest", null); - __decorate([ - memoize_1.Memoize() - ], ConfigSet.prototype, "jsonValue", null); + ], ConfigSet.prototype, "isTestFile", null); return ConfigSet; }()); exports.ConfigSet = ConfigSet; diff --git a/node_modules/ts-jest/dist/config/create-jest-preset.d.ts b/node_modules/ts-jest/dist/config/create-jest-preset.d.ts deleted file mode 100644 index 4765173fc..000000000 --- a/node_modules/ts-jest/dist/config/create-jest-preset.d.ts +++ /dev/null @@ -1,10 +0,0 @@ -/// -export interface TsJestPresets { - transform: Record; - testMatch?: string[]; - moduleFileExtensions?: string[]; -} -export interface CreateJestPresetOptions { - allowJs?: boolean; -} -export declare function createJestPreset({ allowJs }?: CreateJestPresetOptions, from?: jest.InitialOptions): TsJestPresets; diff --git a/node_modules/ts-jest/dist/config/create-jest-preset.js b/node_modules/ts-jest/dist/config/create-jest-preset.js deleted file mode 100644 index b80ebe626..000000000 --- a/node_modules/ts-jest/dist/config/create-jest-preset.js +++ /dev/null @@ -1,23 +0,0 @@ -"use strict"; -var __assign = (this && this.__assign) || function () { - __assign = Object.assign || function(t) { - for (var s, i = 1, n = arguments.length; i < n; i++) { - s = arguments[i]; - for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) - t[p] = s[p]; - } - return t; - }; - return __assign.apply(this, arguments); -}; -Object.defineProperty(exports, "__esModule", { value: true }); -var logger_1 = require("../util/logger"); -var logger = logger_1.rootLogger.child({ namespace: 'jest-preset' }); -function createJestPreset(_a, from) { - var _b = (_a === void 0 ? {} : _a).allowJs, allowJs = _b === void 0 ? false : _b; - if (from === void 0) { from = {}; } - var _c; - logger.debug({ allowJs: allowJs }, 'creating jest presets', allowJs ? 'handling' : 'not handling', 'JavaScript files'); - return __assign({ transform: __assign({}, from.transform, (_c = {}, _c[allowJs ? '^.+\\.[tj]sx?$' : '^.+\\.tsx?$'] = 'ts-jest', _c)) }, (from.testMatch ? { testMatch: from.testMatch } : undefined), (from.moduleFileExtensions ? { moduleFileExtensions: from.moduleFileExtensions } : undefined)); -} -exports.createJestPreset = createJestPreset; diff --git a/node_modules/ts-jest/dist/config/paths-to-module-name-mapper.d.ts b/node_modules/ts-jest/dist/config/paths-to-module-name-mapper.d.ts index db8af8e53..f10e5fe0e 100644 --- a/node_modules/ts-jest/dist/config/paths-to-module-name-mapper.d.ts +++ b/node_modules/ts-jest/dist/config/paths-to-module-name-mapper.d.ts @@ -1,5 +1,6 @@ +import type { Config } from '@jest/types'; +declare type JestPathMapping = Config.InitialOptions['moduleNameMapper']; export declare const pathsToModuleNameMapper: (mapping: import("typescript").MapLike, { prefix }?: { - prefix?: string | undefined; -}) => { - [key: string]: string; -} | undefined; + prefix: string; +}) => JestPathMapping; +export {}; diff --git a/node_modules/ts-jest/dist/config/paths-to-module-name-mapper.js b/node_modules/ts-jest/dist/config/paths-to-module-name-mapper.js index 4dec33705..18c9b8cdf 100644 --- a/node_modules/ts-jest/dist/config/paths-to-module-name-mapper.js +++ b/node_modules/ts-jest/dist/config/paths-to-module-name-mapper.js @@ -1,24 +1,26 @@ "use strict"; -var __values = (this && this.__values) || function (o) { - var m = typeof Symbol === "function" && o[Symbol.iterator], i = 0; +var __values = (this && this.__values) || function(o) { + var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0; if (m) return m.call(o); - return { + if (o && typeof o.length === "number") return { next: function () { if (o && i >= o.length) o = void 0; return { value: o && o[i++], done: !o }; } }; + throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); }; -Object.defineProperty(exports, "__esModule", { value: true }); var _a; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.pathsToModuleNameMapper = void 0; var bs_logger_1 = require("bs-logger"); -var logger_1 = require("../util/logger"); -var messages_1 = require("../util/messages"); +var logger_1 = require("../utils/logger"); +var messages_1 = require("../utils/messages"); var escapeRegex = function (str) { return str.replace(/[-\\^$*+?.()|[\]{}]/g, '\\$&'); }; var logger = logger_1.rootLogger.child((_a = {}, _a[bs_logger_1.LogContexts.namespace] = 'path-mapper', _a)); exports.pathsToModuleNameMapper = function (mapping, _a) { - var _b = (_a === void 0 ? {} : _a).prefix, prefix = _b === void 0 ? '' : _b; - var e_1, _c; + var e_1, _b; + var _c = (_a === void 0 ? Object.create(null) : _a).prefix, prefix = _c === void 0 ? '' : _c; var jestMap = {}; try { for (var _d = __values(Object.keys(mapping)), _e = _d.next(); !_e.done; _e = _d.next()) { @@ -26,35 +28,35 @@ exports.pathsToModuleNameMapper = function (mapping, _a) { var pattern = void 0; var toPaths = mapping[fromPath]; if (toPaths.length === 0) { - logger.warn(messages_1.interpolate(messages_1.Errors.NotMappingPathWithEmptyMap, { path: fromPath })); + logger.warn(messages_1.interpolate("Not mapping \"{{path}}\" because it has no target.", { path: fromPath })); continue; } - else if (toPaths.length > 1) { - logger.warn(messages_1.interpolate(messages_1.Errors.MappingOnlyFirstTargetOfPath, { - path: fromPath, - count: toPaths.length, - })); - } - var target = toPaths[0]; var segments = fromPath.split(/\*/g); if (segments.length === 1) { + var paths = toPaths.map(function (target) { + var enrichedPrefix = prefix !== '' && !prefix.endsWith('/') ? prefix + "/" : prefix; + return "" + enrichedPrefix + target; + }); pattern = "^" + escapeRegex(fromPath) + "$"; - jestMap[pattern] = "" + prefix + target; + jestMap[pattern] = paths.length === 1 ? paths[0] : paths; } else if (segments.length === 2) { + var paths = toPaths.map(function (target) { + var enrichedPrefix = prefix !== '' && !prefix.endsWith('/') ? prefix + "/" : prefix; + return "" + enrichedPrefix + target.replace(/\*/g, '$1'); + }); pattern = "^" + escapeRegex(segments[0]) + "(.*)" + escapeRegex(segments[1]) + "$"; - jestMap[pattern] = "" + prefix + target.replace(/\*/g, '$1'); + jestMap[pattern] = paths.length === 1 ? paths[0] : paths; } else { - logger.warn(messages_1.interpolate(messages_1.Errors.NotMappingMultiStarPath, { path: fromPath })); - continue; + logger.warn(messages_1.interpolate("Not mapping \"{{path}}\" because it has more than one star (`*`).", { path: fromPath })); } } } catch (e_1_1) { e_1 = { error: e_1_1 }; } finally { try { - if (_e && !_e.done && (_c = _d.return)) _c.call(_d); + if (_e && !_e.done && (_b = _d.return)) _b.call(_d); } finally { if (e_1) throw e_1.error; } } diff --git a/node_modules/ts-jest/dist/index.d.ts b/node_modules/ts-jest/dist/index.d.ts index 7612cc8f4..712f1f478 100644 --- a/node_modules/ts-jest/dist/index.d.ts +++ b/node_modules/ts-jest/dist/index.d.ts @@ -1,16 +1,19 @@ -import { createJestPreset as createJestPresetCore } from './config/create-jest-preset'; +import { createJestPreset as createJestPresetCore } from './presets/create-jest-preset'; import { TsJestTransformer } from './ts-jest-transformer'; -import { TsJestGlobalOptions } from './types'; -import { mocked as mockedCore } from './util/testing'; +import type { TsJestGlobalOptions } from './types'; +import { mocked as mockedCore } from './utils/testing'; +declare module '@jest/types' { + namespace Config { + interface ConfigGlobals { + 'ts-jest': TsJestGlobalOptions; + } + } +} export declare const mocked: typeof mockedCore; export declare const createJestPreset: typeof createJestPresetCore; export declare const pathsToModuleNameMapper: (mapping: import("typescript").MapLike, { prefix }?: { - prefix?: string | undefined; + prefix: string; }) => { - [key: string]: string; + [key: string]: string | string[]; } | undefined; -export declare const version: string; -export declare const digest: string; -export declare function createTransformer(baseConfig?: TsJestGlobalOptions): TsJestTransformer; -declare const jestPreset: import("./config/create-jest-preset").TsJestPresets; -export { jestPreset, }; +export declare function createTransformer(): TsJestTransformer; diff --git a/node_modules/ts-jest/dist/index.js b/node_modules/ts-jest/dist/index.js index 2dd09d56a..c60234612 100644 --- a/node_modules/ts-jest/dist/index.js +++ b/node_modules/ts-jest/dist/index.js @@ -1,74 +1,24 @@ "use strict"; -var __read = (this && this.__read) || function (o, n) { - var m = typeof Symbol === "function" && o[Symbol.iterator]; - if (!m) return o; - var i = m.call(o), r, ar = [], e; - try { - while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value); - } - catch (error) { e = { error: error }; } - finally { - try { - if (r && !r.done && (m = i["return"])) m.call(i); - } - finally { if (e) throw e.error; } - } - return ar; -}; -var __spread = (this && this.__spread) || function () { - for (var ar = [], i = 0; i < arguments.length; i++) ar = ar.concat(__read(arguments[i])); - return ar; -}; -Object.defineProperty(exports, "__esModule", { value: true }); var _a; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.createTransformer = exports.pathsToModuleNameMapper = exports.createJestPreset = exports.mocked = void 0; var bs_logger_1 = require("bs-logger"); -var fs_1 = require("fs"); -var path_1 = require("path"); -var create_jest_preset_1 = require("./config/create-jest-preset"); +var create_jest_preset_1 = require("./presets/create-jest-preset"); var paths_to_module_name_mapper_1 = require("./config/paths-to-module-name-mapper"); var ts_jest_transformer_1 = require("./ts-jest-transformer"); -var logger_1 = require("./util/logger"); -var messages_1 = require("./util/messages"); -var testing_1 = require("./util/testing"); -var version_checkers_1 = require("./util/version-checkers"); +var logger_1 = require("./utils/logger"); +var messages_1 = require("./utils/messages"); +var testing_1 = require("./utils/testing"); +var version_checkers_1 = require("./utils/version-checkers"); var warn = logger_1.rootLogger.child((_a = {}, _a[bs_logger_1.LogContexts.logLevel] = bs_logger_1.LogLevels.warn, _a)); var helperMoved = function (name, helper) { - return warn.wrap(messages_1.interpolate(messages_1.Deprecateds.HelperMovedToUtils, { helper: name }), helper); + return warn.wrap(messages_1.interpolate("The `{{helper}}` helper has been moved to `ts-jest/utils`. Use `import { {{helper}} } from 'ts-jest/utils'` instead.", { helper: name }), helper); }; exports.mocked = helperMoved('mocked', testing_1.mocked); exports.createJestPreset = helperMoved('createJestPreset', create_jest_preset_1.createJestPreset); exports.pathsToModuleNameMapper = helperMoved('pathsToModuleNameMapper', paths_to_module_name_mapper_1.pathsToModuleNameMapper); -exports.version = require('../package.json').version; -exports.digest = fs_1.readFileSync(path_1.resolve(__dirname, '..', '.ts-jest-digest'), 'utf8'); -var transformer; -function defaultTransformer() { - return transformer || (transformer = createTransformer()); -} -function createTransformer(baseConfig) { +function createTransformer() { version_checkers_1.VersionCheckers.jest.warn(); - return new ts_jest_transformer_1.TsJestTransformer(baseConfig); + return new ts_jest_transformer_1.TsJestTransformer(); } exports.createTransformer = createTransformer; -function process() { - var args = []; - for (var _i = 0; _i < arguments.length; _i++) { - args[_i] = arguments[_i]; - } - var _a; - return (_a = defaultTransformer()).process.apply(_a, __spread(args)); -} -exports.process = process; -function getCacheKey() { - var args = []; - for (var _i = 0; _i < arguments.length; _i++) { - args[_i] = arguments[_i]; - } - var _a; - return (_a = defaultTransformer()).getCacheKey.apply(_a, __spread(args)); -} -exports.getCacheKey = getCacheKey; -exports.canInstrument = false; -var jestPreset = create_jest_preset_1.createJestPreset(); -exports.jestPreset = jestPreset; -exports.__singleton = function () { return transformer; }; -exports.__resetModule = function () { return (transformer = undefined); }; diff --git a/node_modules/ts-jest/dist/transformers/hoist-jest.js b/node_modules/ts-jest/dist/transformers/hoist-jest.js index 6b5817a76..9353bbec8 100644 --- a/node_modules/ts-jest/dist/transformers/hoist-jest.js +++ b/node_modules/ts-jest/dist/transformers/hoist-jest.js @@ -1,4 +1,15 @@ "use strict"; +var __assign = (this && this.__assign) || function () { + __assign = Object.assign || function(t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) + t[p] = s[p]; + } + return t; + }; + return __assign.apply(this, arguments); +}; var __read = (this && this.__read) || function (o, n) { var m = typeof Symbol === "function" && o[Symbol.iterator]; if (!m) return o; @@ -20,21 +31,43 @@ var __spread = (this && this.__spread) || function () { return ar; }; Object.defineProperty(exports, "__esModule", { value: true }); +exports.factory = exports.version = exports.name = void 0; var bs_logger_1 = require("bs-logger"); -var HOIST_METHODS = ['mock', 'unmock']; +var HOIST_METHODS = ['mock', 'unmock', 'enableAutomock', 'disableAutomock', 'deepUnmock']; +var JEST_GLOBALS_MODULE_NAME = '@jest/globals'; +var JEST_GLOBAL_NAME = 'jest'; +var ROOT_LEVEL_AST = 1; exports.name = 'hoisting-jest-mock'; -exports.version = 1; +exports.version = 4; function factory(cs) { var logger = cs.logger.child({ namespace: 'ts-hoisting' }); var ts = cs.compilerModule; + var importNames = []; + function shouldHoistExpression(node) { + if (ts.isCallExpression(node) && + ts.isPropertyAccessExpression(node.expression) && + HOIST_METHODS.includes(node.expression.name.text)) { + if (importNames.length) { + return ((ts.isIdentifier(node.expression.expression) && importNames.includes(node.expression.expression.text)) || + (ts.isPropertyAccessExpression(node.expression.expression) && + ts.isIdentifier(node.expression.expression.expression) && + importNames.includes(node.expression.expression.expression.text)) || + shouldHoistExpression(node.expression.expression)); + } + else { + return ((ts.isIdentifier(node.expression.expression) && node.expression.expression.text === JEST_GLOBAL_NAME) || + shouldHoistExpression(node.expression.expression)); + } + } + return false; + } function shouldHoistNode(node) { - return (ts.isExpressionStatement(node) && - ts.isCallExpression(node.expression) && - ts.isPropertyAccessExpression(node.expression.expression) && - ts.isIdentifier(node.expression.expression.expression) && - node.expression.expression.expression.text === 'jest' && - ts.isIdentifier(node.expression.expression.name) && - HOIST_METHODS.includes(node.expression.expression.name.text)); + return ts.isExpressionStatement(node) && shouldHoistExpression(node.expression); + } + function isJestGlobalImport(node) { + return (ts.isImportDeclaration(node) && + ts.isStringLiteral(node.moduleSpecifier) && + node.moduleSpecifier.text === JEST_GLOBALS_MODULE_NAME); } function createVisitor(ctx, _) { var level = 0; @@ -55,14 +88,32 @@ function factory(cs) { } }; var visitor = function (node) { + var _a, _b; enter(); var resultNode = ts.visitEachChild(node, visitor, ctx); + if (isJestGlobalImport(resultNode) && ((_a = resultNode.importClause) === null || _a === void 0 ? void 0 : _a.namedBindings) && + (ts.isNamespaceImport(resultNode.importClause.namedBindings) || + ts.isNamedImports(resultNode.importClause.namedBindings))) { + var namedBindings = resultNode.importClause.namedBindings; + var jestImportName = ts.isNamespaceImport(namedBindings) + ? namedBindings.name.text + : (_b = namedBindings.elements.find(function (element) { var _a; return element.name.text === JEST_GLOBAL_NAME || ((_a = element.propertyName) === null || _a === void 0 ? void 0 : _a.text) === JEST_GLOBAL_NAME; })) === null || _b === void 0 ? void 0 : _b.name.text; + if (jestImportName) { + importNames.push(jestImportName); + } + } if (hoisted[level] && hoisted[level].length) { var hoistedStmts_1 = hoisted[level]; - var otherStmts = resultNode.statements.filter(function (s) { return !hoistedStmts_1.includes(s); }); + var otherStmts = resultNode.statements.filter(function (s) { return !hoistedStmts_1.includes(s) && !isJestGlobalImport(s); }); var newNode = ts.getMutableClone(resultNode); - newNode.statements = ts.createNodeArray(__spread(hoistedStmts_1, otherStmts)); - resultNode = newNode; + var newStatements = __spread(hoistedStmts_1, otherStmts); + if (level === ROOT_LEVEL_AST) { + var jestGlobalsImportStmts = resultNode.statements.filter(function (s) { return isJestGlobalImport(s); }); + resultNode = __assign(__assign({}, newNode), { statements: ts.createNodeArray(__spread(jestGlobalsImportStmts, newStatements)) }); + } + else { + resultNode = __assign(__assign({}, newNode), { statements: ts.createNodeArray(newStatements) }); + } } exit(); if (shouldHoistNode(resultNode)) { diff --git a/node_modules/ts-jest/dist/transformers/index.js b/node_modules/ts-jest/dist/transformers/index.js index bbfb9af59..863c6753a 100644 --- a/node_modules/ts-jest/dist/transformers/index.js +++ b/node_modules/ts-jest/dist/transformers/index.js @@ -1,11 +1,24 @@ "use strict"; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); var __importStar = (this && this.__importStar) || function (mod) { if (mod && mod.__esModule) return mod; var result = {}; - if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k]; - result["default"] = mod; + if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + __setModuleDefault(result, mod); return result; }; Object.defineProperty(exports, "__esModule", { value: true }); +exports.internals = void 0; var hoisting = __importStar(require("./hoist-jest")); exports.internals = [hoisting]; diff --git a/node_modules/ts-jest/dist/ts-jest-transformer.d.ts b/node_modules/ts-jest/dist/ts-jest-transformer.d.ts index 2c5698d5e..23bb612d3 100644 --- a/node_modules/ts-jest/dist/ts-jest-transformer.d.ts +++ b/node_modules/ts-jest/dist/ts-jest-transformer.d.ts @@ -1,17 +1,12 @@ -/// -import { Logger } from 'bs-logger'; +import type { CacheKeyOptions, TransformedSource, Transformer, TransformOptions } from '@jest/transform'; +import type { Config } from '@jest/types'; +import type { Logger } from 'bs-logger'; import { ConfigSet } from './config/config-set'; -import { TsJestGlobalOptions } from './types'; -export declare class TsJestTransformer implements jest.Transformer { - static readonly lastTransformerId: number; - readonly logger: Logger; - readonly id: number; - readonly options: TsJestGlobalOptions; - constructor(baseOptions?: TsJestGlobalOptions); - configsFor(jestConfig: jest.ProjectConfig | string): ConfigSet; - process(input: string, filePath: jest.Path, jestConfig: jest.ProjectConfig, transformOptions?: jest.TransformOptions): jest.TransformedSource | string; - getCacheKey(fileContent: string, filePath: string, jestConfigStr: string, transformOptions?: { - instrument?: boolean; - rootDir?: string; - }): string; +export declare class TsJestTransformer implements Transformer { + protected readonly logger: Logger; + protected _transformCfgStr: string; + constructor(); + configsFor(jestConfig: Config.ProjectConfig): ConfigSet; + process(input: string, filePath: Config.Path, jestConfig: Config.ProjectConfig, transformOptions?: TransformOptions): TransformedSource | string; + getCacheKey(fileContent: string, filePath: string, _jestConfigStr: string, transformOptions: CacheKeyOptions): string; } diff --git a/node_modules/ts-jest/dist/ts-jest-transformer.js b/node_modules/ts-jest/dist/ts-jest-transformer.js index 61e6e242f..182d39211 100644 --- a/node_modules/ts-jest/dist/ts-jest-transformer.js +++ b/node_modules/ts-jest/dist/ts-jest-transformer.js @@ -11,69 +11,53 @@ var __assign = (this && this.__assign) || function () { return __assign.apply(this, arguments); }; Object.defineProperty(exports, "__esModule", { value: true }); -var util_1 = require("util"); +exports.TsJestTransformer = void 0; var config_set_1 = require("./config/config-set"); -var json_1 = require("./util/json"); -var jsonable_value_1 = require("./util/jsonable-value"); -var logger_1 = require("./util/logger"); -var messages_1 = require("./util/messages"); -var sha1_1 = require("./util/sha1"); -exports.INSPECT_CUSTOM = util_1.inspect.custom || 'inspect'; +var constants_1 = require("./constants"); +var json_1 = require("./utils/json"); +var jsonable_value_1 = require("./utils/jsonable-value"); +var logger_1 = require("./utils/logger"); +var messages_1 = require("./utils/messages"); +var sha1_1 = require("./utils/sha1"); var TsJestTransformer = (function () { - function TsJestTransformer(baseOptions) { - if (baseOptions === void 0) { baseOptions = {}; } - this.options = __assign({}, baseOptions); - this.id = TsJestTransformer._nextTransformerId; - this.logger = logger_1.rootLogger.child({ - transformerId: this.id, - namespace: 'jest-transformer', - }); - this.logger.debug({ baseOptions: baseOptions }, 'created new transformer'); + function TsJestTransformer() { + this.logger = logger_1.rootLogger.child({ namespace: 'ts-jest-transformer' }); + this.logger.debug('created new transformer'); } - Object.defineProperty(TsJestTransformer, "lastTransformerId", { - get: function () { - return TsJestTransformer._lastTransformerId; - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(TsJestTransformer, "_nextTransformerId", { - get: function () { - return ++TsJestTransformer._lastTransformerId; - }, - enumerable: true, - configurable: true - }); - TsJestTransformer.prototype[exports.INSPECT_CUSTOM] = function () { - return "[object TsJestTransformer<#" + this.id + ">]"; - }; TsJestTransformer.prototype.configsFor = function (jestConfig) { - var csi; - var jestConfigObj; - if (typeof jestConfig === 'string') { - csi = TsJestTransformer._configSetsIndex.find(function (cs) { return cs.jestConfig.serialized === jestConfig; }); - if (csi) - return csi.configSet; - jestConfigObj = json_1.parse(jestConfig); + var ccs = TsJestTransformer._cachedConfigSets.find(function (cs) { return cs.jestConfig.value === jestConfig; }); + var configSet; + if (ccs) { + this._transformCfgStr = ccs.transformerCfgStr; + configSet = ccs.configSet; } else { - csi = TsJestTransformer._configSetsIndex.find(function (cs) { return cs.jestConfig.value === jestConfig; }); - if (csi) - return csi.configSet; - var serialized_1 = json_1.stringify(jestConfig); - csi = TsJestTransformer._configSetsIndex.find(function (cs) { return cs.jestConfig.serialized === serialized_1; }); - if (csi) { - csi.jestConfig.value = jestConfig; - return csi.configSet; + var serializedJestCfg_1 = json_1.stringify(jestConfig); + var serializedCcs = TsJestTransformer._cachedConfigSets.find(function (cs) { return cs.jestConfig.serialized === serializedJestCfg_1; }); + if (serializedCcs) { + serializedCcs.jestConfig.value = jestConfig; + this._transformCfgStr = serializedCcs.transformerCfgStr; + configSet = serializedCcs.configSet; + } + else { + this.logger.info('no matching config-set found, creating a new one'); + configSet = new config_set_1.ConfigSet(jestConfig); + var jest_1 = __assign({}, jestConfig); + var globals = (jest_1.globals = __assign({}, jest_1.globals)); + jest_1.name = undefined; + jest_1.cacheDirectory = undefined; + delete globals['ts-jest']; + this._transformCfgStr = new jsonable_value_1.JsonableValue(__assign(__assign({ digest: configSet.tsJestDigest, babel: configSet.babelConfig }, jest_1), { tsconfig: { + options: configSet.parsedTsConfig.options, + raw: configSet.parsedTsConfig.raw, + } })).serialized; + TsJestTransformer._cachedConfigSets.push({ + jestConfig: new jsonable_value_1.JsonableValue(jestConfig), + configSet: configSet, + transformerCfgStr: this._transformCfgStr, + }); } - jestConfigObj = jestConfig; } - this.logger.info("no matching config-set found, creating a new one"); - var configSet = new config_set_1.ConfigSet(jestConfigObj, this.options, this.logger); - TsJestTransformer._configSetsIndex.push({ - jestConfig: new jsonable_value_1.JsonableValue(jestConfigObj), - configSet: configSet, - }); return configSet; }; TsJestTransformer.prototype.process = function (input, filePath, jestConfig, transformOptions) { @@ -82,32 +66,32 @@ var TsJestTransformer = (function () { var source = input; var configs = this.configsFor(jestConfig); var hooks = configs.hooks; - var stringify = configs.shouldStringifyContent(filePath); - var babelJest = stringify ? undefined : configs.babelJestTransformer; - var isDefinitionFile = filePath.endsWith('.d.ts'); - var isJsFile = !isDefinitionFile && /\.jsx?$/.test(filePath); - var isTsFile = isDefinitionFile || /\.tsx?$/.test(filePath); - if (stringify) { - result = "module.exports=" + JSON.stringify(source); + var shouldStringifyContent = configs.shouldStringifyContent(filePath); + var babelJest = shouldStringifyContent ? undefined : configs.babelJestTransformer; + var isDefinitionFile = filePath.endsWith(constants_1.DECLARATION_TYPE_EXT); + var isJsFile = constants_1.JS_JSX_REGEX.test(filePath); + var isTsFile = !isDefinitionFile && constants_1.TS_TSX_REGEX.test(filePath); + if (shouldStringifyContent) { + result = "module.exports=" + json_1.stringify(source); } else if (isDefinitionFile) { result = ''; } - else if (!configs.typescript.options.allowJs && isJsFile) { - this.logger.warn({ fileName: filePath }, messages_1.interpolate(messages_1.Errors.GotJsFileButAllowJsFalse, { path: filePath })); + else if (!configs.parsedTsConfig.options.allowJs && isJsFile) { + this.logger.warn({ fileName: filePath }, messages_1.interpolate("Got a `.js` file to compile while `allowJs` option is not set to `true` (file: {{path}}). To fix this:\n - if you want TypeScript to process JS files, set `allowJs` to `true` in your TypeScript config (usually tsconfig.json)\n - if you do not want TypeScript to process your `.js` files, in your Jest config change the `transform` key which value is `ts-jest` so that it does not match `.js` files anymore", { path: filePath })); result = source; } else if (isJsFile || isTsFile) { result = configs.tsCompiler.compile(source, filePath); } else { - var message = babelJest ? messages_1.Errors.GotUnknownFileTypeWithBabel : messages_1.Errors.GotUnknownFileTypeWithoutBabel; + var message = babelJest ? "Got a unknown file type to compile (file: {{path}}). To fix this, in your Jest config change the `transform` key which value is `ts-jest` so that it does not match this kind of files anymore. If you still want Babel to process it, add another entry to the `transform` option with value `babel-jest` which key matches this type of files." : "Got a unknown file type to compile (file: {{path}}). To fix this, in your Jest config change the `transform` key which value is `ts-jest` so that it does not match this kind of files anymore."; this.logger.warn({ fileName: filePath }, messages_1.interpolate(message, { path: filePath })); result = source; } if (babelJest) { this.logger.debug({ fileName: filePath }, 'calling babel-jest processor'); - result = babelJest.process(result, filePath, jestConfig, __assign({}, transformOptions, { instrument: false })); + result = babelJest.process(result, filePath, jestConfig, __assign(__assign({}, transformOptions), { instrument: false })); } if (hooks.afterProcess) { this.logger.debug({ fileName: filePath, hookName: 'afterProcess' }, 'calling afterProcess hook'); @@ -118,15 +102,13 @@ var TsJestTransformer = (function () { } return result; }; - TsJestTransformer.prototype.getCacheKey = function (fileContent, filePath, jestConfigStr, transformOptions) { - if (transformOptions === void 0) { transformOptions = {}; } + TsJestTransformer.prototype.getCacheKey = function (fileContent, filePath, _jestConfigStr, transformOptions) { + var configs = this.configsFor(transformOptions.config); this.logger.debug({ fileName: filePath, transformOptions: transformOptions }, 'computing cache key for', filePath); - var configs = this.configsFor(jestConfigStr); var _a = transformOptions.instrument, instrument = _a === void 0 ? false : _a, _b = transformOptions.rootDir, rootDir = _b === void 0 ? configs.rootDir : _b; - return sha1_1.sha1(configs.cacheKey, '\x00', rootDir, '\x00', "instrument:" + (instrument ? 'on' : 'off'), '\x00', fileContent, '\x00', filePath); + return sha1_1.sha1(this._transformCfgStr, '\x00', rootDir, '\x00', "instrument:" + (instrument ? 'on' : 'off'), '\x00', fileContent, '\x00', filePath); }; - TsJestTransformer._configSetsIndex = []; - TsJestTransformer._lastTransformerId = 0; + TsJestTransformer._cachedConfigSets = []; return TsJestTransformer; }()); exports.TsJestTransformer = TsJestTransformer; diff --git a/node_modules/ts-jest/dist/types.d.ts b/node_modules/ts-jest/dist/types.d.ts index 22c16331f..8ce7a62f1 100644 --- a/node_modules/ts-jest/dist/types.d.ts +++ b/node_modules/ts-jest/dist/types.d.ts @@ -1,112 +1,39 @@ -/// -import * as _babel from 'babel__core'; -import _ts, { CompilerOptions, SourceFile, TransformerFactory } from 'typescript'; -import { ConfigSet } from './config/config-set'; -export declare type TBabelCore = typeof _babel; +import type * as _babel from 'babel__core'; +import type * as _ts from 'typescript'; export declare type TTypeScript = typeof _ts; -export declare type TBabelJest = Required; -export declare type BabelJestTransformer = { - [K in Exclude]: Exclude; -}; export declare type BabelConfig = _babel.TransformOptions; +export interface AstTransformer> { + path: string; + options?: T; +} +export interface ConfigCustomTransformer { + before?: (string | AstTransformer)[]; + after?: (string | AstTransformer)[]; + afterDeclarations?: (string | AstTransformer)[]; +} export interface TsJestGlobalOptions { - tsConfig?: boolean | string | CompilerOptions; - packageJson?: boolean | string | object; + tsConfig?: boolean | string | _ts.CompilerOptions; + tsconfig?: boolean | string | _ts.CompilerOptions; + packageJson?: boolean | string | Record; isolatedModules?: boolean; compiler?: string; - astTransformers?: string[]; + astTransformers?: string[] | ConfigCustomTransformer; diagnostics?: boolean | { pretty?: boolean; - ignoreCodes?: number | string | Array; + ignoreCodes?: number | string | (number | string)[]; pathRegex?: RegExp | string; warnOnly?: boolean; }; babelConfig?: boolean | string | BabelConfig; stringifyContentPathRegex?: string | RegExp; } -interface TsJestConfig$tsConfig$file { - kind: 'file'; - value: string | undefined; -} -interface TsJestConfig$tsConfig$inline { - kind: 'inline'; - value: CompilerOptions; -} -declare type TsJestConfig$tsConfig = TsJestConfig$tsConfig$file | TsJestConfig$tsConfig$inline | undefined; -interface TsJestConfig$diagnostics { +export interface TsJestDiagnosticsCfg { pretty: boolean; ignoreCodes: number[]; pathRegex?: string | undefined; throws: boolean; -} -interface TsJestConfig$babelConfig$file { - kind: 'file'; - value: string | undefined; -} -interface TsJestConfig$babelConfig$inline { - kind: 'inline'; - value: BabelConfig; -} -declare type TsJestConfig$babelConfig = TsJestConfig$babelConfig$file | TsJestConfig$babelConfig$inline | undefined; -interface TsJestConfig$packageJson$file { - kind: 'file'; - value: string | undefined; -} -interface TsJestConfig$packageJson$inline { - kind: 'inline'; - value: any; -} -declare type TsJestConfig$packageJson = TsJestConfig$packageJson$file | TsJestConfig$packageJson$inline | undefined; -declare type TsJestConfig$stringifyContentPathRegex = string | undefined; -export interface TsJestConfig { - tsConfig: TsJestConfig$tsConfig; - packageJson: TsJestConfig$packageJson; - isolatedModules: boolean; - compiler: string; - diagnostics: TsJestConfig$diagnostics; - babelConfig: TsJestConfig$babelConfig; - transformers: string[]; - stringifyContentPathRegex: TsJestConfig$stringifyContentPathRegex; -} -export interface TsJestHooksMap { - afterProcess?(args: any[], result: string | jest.TransformedSource): string | jest.TransformedSource | void; -} -export interface TSCommon { - version: typeof _ts.version; - sys: typeof _ts.sys; - ScriptSnapshot: typeof _ts.ScriptSnapshot; - displayPartsToString: typeof _ts.displayPartsToString; - createLanguageService: typeof _ts.createLanguageService; - getDefaultLibFilePath: typeof _ts.getDefaultLibFilePath; - getPreEmitDiagnostics: typeof _ts.getPreEmitDiagnostics; - flattenDiagnosticMessageText: typeof _ts.flattenDiagnosticMessageText; - transpileModule: typeof _ts.transpileModule; - ModuleKind: typeof _ts.ModuleKind; - ScriptTarget: typeof _ts.ScriptTarget; - findConfigFile: typeof _ts.findConfigFile; - readConfigFile: typeof _ts.readConfigFile; - parseJsonConfigFileContent: typeof _ts.parseJsonConfigFileContent; - formatDiagnostics: typeof _ts.formatDiagnostics; - formatDiagnosticsWithColorAndContext: typeof _ts.formatDiagnosticsWithColorAndContext; -} -export interface TypeInfo { - name: string; - comment: string; + warnOnly?: boolean; } export interface TsCompiler { - cwd: string; - extensions: string[]; - cachedir: string | undefined; - ts: TSCommon; - compile(code: string, fileName: string, lineOffset?: number): string; - getTypeInfo(code: string, fileName: string, position: number): TypeInfo; -} -export interface AstTransformerDesc { - name: string; - version: number; - factory(cs: ConfigSet): TransformerFactory; -} -export interface IPackageJson { - main: string; + program: _ts.Program | undefined; } -export {}; diff --git a/node_modules/ts-jest/dist/util/backports.d.ts b/node_modules/ts-jest/dist/util/backports.d.ts deleted file mode 100644 index cb0ff5c3b..000000000 --- a/node_modules/ts-jest/dist/util/backports.d.ts +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/node_modules/ts-jest/dist/util/backports.js b/node_modules/ts-jest/dist/util/backports.js deleted file mode 100644 index 428171137..000000000 --- a/node_modules/ts-jest/dist/util/backports.js +++ /dev/null @@ -1,101 +0,0 @@ -"use strict"; -var __assign = (this && this.__assign) || function () { - __assign = Object.assign || function(t) { - for (var s, i = 1, n = arguments.length; i < n; i++) { - s = arguments[i]; - for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) - t[p] = s[p]; - } - return t; - }; - return __assign.apply(this, arguments); -}; -Object.defineProperty(exports, "__esModule", { value: true }); -var _a; -var bs_logger_1 = require("bs-logger"); -var messages_1 = require("./messages"); -var context = (_a = {}, _a[bs_logger_1.LogContexts.namespace] = 'backports', _a); -exports.backportJestConfig = function (logger, config) { - logger.debug(__assign({}, context, { config: config }), 'backporting config'); - var _a = (config || {}).globals, globals = _a === void 0 ? {} : _a; - var _b = globals["ts-jest"], tsJest = _b === void 0 ? {} : _b; - var mergeTsJest = {}; - var hadWarnings = false; - var warnConfig = function (oldPath, newPath, note) { - hadWarnings = true; - logger.warn(context, messages_1.interpolate(note ? messages_1.Deprecateds.ConfigOptionWithNote : messages_1.Deprecateds.ConfigOption, { - oldPath: oldPath, - newPath: newPath, - note: note, - })); - }; - if ('__TS_CONFIG__' in globals) { - warnConfig('globals.__TS_CONFIG__', 'globals.ts-jest.tsConfig'); - if (typeof globals.__TS_CONFIG__ === 'object') { - mergeTsJest.tsConfig = globals.__TS_CONFIG__; - } - delete globals.__TS_CONFIG__; - } - if ('__TRANSFORM_HTML__' in globals) { - warnConfig('globals.__TRANSFORM_HTML__', 'globals.ts-jest.stringifyContentPathRegex'); - if (globals.__TRANSFORM_HTML__) { - mergeTsJest.stringifyContentPathRegex = '\\.html?$'; - } - delete globals.__TRANSFORM_HTML__; - } - if ('typeCheck' in tsJest) { - warnConfig('globals.ts-jest.typeCheck', 'globals.ts-jest.isolatedModules'); - mergeTsJest.isolatedModules = !tsJest.typeCheck; - delete tsJest.typeCheck; - } - if ('tsConfigFile' in tsJest) { - warnConfig('globals.ts-jest.tsConfigFile', 'globals.ts-jest.tsConfig'); - if (tsJest.tsConfigFile) { - mergeTsJest.tsConfig = tsJest.tsConfigFile; - } - delete tsJest.tsConfigFile; - } - if ('enableTsDiagnostics' in tsJest) { - warnConfig('globals.ts-jest.enableTsDiagnostics', 'globals.ts-jest.diagnostics'); - if (tsJest.enableTsDiagnostics) { - mergeTsJest.diagnostics = { warnOnly: true }; - if (typeof tsJest.enableTsDiagnostics === 'string') - mergeTsJest.diagnostics.pathRegex = tsJest.enableTsDiagnostics; - } - else { - mergeTsJest.diagnostics = false; - } - delete tsJest.enableTsDiagnostics; - } - if ('useBabelrc' in tsJest) { - warnConfig('globals.ts-jest.useBabelrc', 'globals.ts-jest.babelConfig', messages_1.Deprecateds.ConfigOptionUseBabelRcNote); - if (tsJest.useBabelrc != null) { - mergeTsJest.babelConfig = tsJest.useBabelrc ? true : {}; - } - delete tsJest.useBabelrc; - } - if ('skipBabel' in tsJest) { - warnConfig('globals.ts-jest.skipBabel', 'globals.ts-jest.babelConfig'); - if (tsJest.skipBabel === false && !mergeTsJest.babelConfig) { - mergeTsJest.babelConfig = true; - } - delete tsJest.skipBabel; - } - if (hadWarnings) { - logger.warn(context, messages_1.Helps.MigrateConfigUsingCLI); - } - return __assign({}, config, { globals: __assign({}, globals, { 'ts-jest': __assign({}, mergeTsJest, tsJest) }) }); -}; -exports.backportTsJestDebugEnvVar = function (logger) { - if ('TS_JEST_DEBUG' in process.env) { - var shouldLog = !/^\s*(?:0|f(?:alse)?|no?|disabled?|off|)\s*$/i.test(process.env.TS_JEST_DEBUG || ''); - delete process.env.TS_JEST_DEBUG; - if (shouldLog) { - process.env.TS_JEST_LOG = "ts-jest.log,stderr:warn"; - } - logger.warn(context, messages_1.interpolate(messages_1.Deprecateds.EnvVar, { - old: 'TS_JEST_DEBUG', - new: 'TS_JEST_LOG', - })); - } -}; diff --git a/node_modules/ts-jest/dist/util/exported.d.ts b/node_modules/ts-jest/dist/util/exported.d.ts deleted file mode 100644 index 8136f287a..000000000 --- a/node_modules/ts-jest/dist/util/exported.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -export { mocked } from './testing'; -export { createJestPreset } from '../config/create-jest-preset'; -export { pathsToModuleNameMapper } from '../config/paths-to-module-name-mapper'; diff --git a/node_modules/ts-jest/dist/util/exported.js b/node_modules/ts-jest/dist/util/exported.js deleted file mode 100644 index e6bc877d9..000000000 --- a/node_modules/ts-jest/dist/util/exported.js +++ /dev/null @@ -1,8 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -var testing_1 = require("./testing"); -exports.mocked = testing_1.mocked; -var create_jest_preset_1 = require("../config/create-jest-preset"); -exports.createJestPreset = create_jest_preset_1.createJestPreset; -var paths_to_module_name_mapper_1 = require("../config/paths-to-module-name-mapper"); -exports.pathsToModuleNameMapper = paths_to_module_name_mapper_1.pathsToModuleNameMapper; diff --git a/node_modules/ts-jest/dist/util/get-package-version.d.ts b/node_modules/ts-jest/dist/util/get-package-version.d.ts deleted file mode 100644 index cb0ff5c3b..000000000 --- a/node_modules/ts-jest/dist/util/get-package-version.d.ts +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/node_modules/ts-jest/dist/util/get-package-version.js b/node_modules/ts-jest/dist/util/get-package-version.js deleted file mode 100644 index 52e13d79a..000000000 --- a/node_modules/ts-jest/dist/util/get-package-version.js +++ /dev/null @@ -1,10 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -function getPackageVersion(moduleName) { - try { - return require(moduleName + "/package.json").version; - } - catch (err) { } - return; -} -exports.getPackageVersion = getPackageVersion; diff --git a/node_modules/ts-jest/dist/util/importer.d.ts b/node_modules/ts-jest/dist/util/importer.d.ts deleted file mode 100644 index cb0ff5c3b..000000000 --- a/node_modules/ts-jest/dist/util/importer.d.ts +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/node_modules/ts-jest/dist/util/importer.js b/node_modules/ts-jest/dist/util/importer.js deleted file mode 100644 index 669f69b2f..000000000 --- a/node_modules/ts-jest/dist/util/importer.js +++ /dev/null @@ -1,193 +0,0 @@ -"use strict"; -var __assign = (this && this.__assign) || function () { - __assign = Object.assign || function(t) { - for (var s, i = 1, n = arguments.length; i < n; i++) { - s = arguments[i]; - for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) - t[p] = s[p]; - } - return t; - }; - return __assign.apply(this, arguments); -}; -var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { - var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; - if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); - else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; - return c > 3 && r && Object.defineProperty(target, key, r), r; -}; -var __read = (this && this.__read) || function (o, n) { - var m = typeof Symbol === "function" && o[Symbol.iterator]; - if (!m) return o; - var i = m.call(o), r, ar = [], e; - try { - while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value); - } - catch (error) { e = { error: error }; } - finally { - try { - if (r && !r.done && (m = i["return"])) m.call(i); - } - finally { if (e) throw e.error; } - } - return ar; -}; -var __spread = (this && this.__spread) || function () { - for (var ar = [], i = 0; i < arguments.length; i++) ar = ar.concat(__read(arguments[i])); - return ar; -}; -Object.defineProperty(exports, "__esModule", { value: true }); -var logger_1 = require("./logger"); -var memoize_1 = require("./memoize"); -var messages_1 = require("./messages"); -var version_checkers_1 = require("./version-checkers"); -var logger = logger_1.rootLogger.child({ namespace: 'Importer' }); -var passThru = function (action) { return function (input) { - action(); - return input; -}; }; -var Importer = (function () { - function Importer(_patches) { - if (_patches === void 0) { _patches = {}; } - this._patches = _patches; - } - Object.defineProperty(Importer, "instance", { - get: function () { - logger.debug('creating Importer singleton'); - return new Importer({ - '@babel/core': [passThru(version_checkers_1.VersionCheckers.babelCore.warn)], - 'babel-jest': [passThru(version_checkers_1.VersionCheckers.babelJest.warn)], - typescript: [passThru(version_checkers_1.VersionCheckers.typescript.warn)], - jest: [passThru(version_checkers_1.VersionCheckers.jest.warn)], - }); - }, - enumerable: true, - configurable: true - }); - Importer.prototype.babelJest = function (why) { - return this._import(why, 'babel-jest'); - }; - Importer.prototype.babelCore = function (why) { - return this._import(why, '@babel/core'); - }; - Importer.prototype.typescript = function (why, which) { - return this._import(why, which); - }; - Importer.prototype.tryThese = function (moduleName) { - var fallbacks = []; - for (var _i = 1; _i < arguments.length; _i++) { - fallbacks[_i - 1] = arguments[_i]; - } - var name; - var loaded; - var tries = __spread([moduleName], fallbacks); - while ((name = tries.shift()) !== undefined) { - var req = requireWrapper(name); - var contextReq = __assign({}, req); - delete contextReq.exports; - if (req.exists) { - loaded = req; - if (loaded.error) { - logger.error({ requireResult: contextReq }, "failed loading module '" + name + "'", loaded.error.message); - } - else { - logger.debug({ requireResult: contextReq }, 'loaded module', name); - loaded.exports = this._patch(name, loaded.exports); - } - break; - } - else { - logger.debug({ requireResult: contextReq }, "module '" + name + "' not found"); - continue; - } - } - return loaded; - }; - Importer.prototype.tryTheseOr = function (moduleNames, missingResult, allowLoadError) { - if (allowLoadError === void 0) { allowLoadError = false; } - var args = Array.isArray(moduleNames) ? moduleNames : [moduleNames]; - var result = this.tryThese.apply(this, __spread(args)); - if (!result) - return missingResult; - if (!result.error) - return result.exports; - if (allowLoadError) - return missingResult; - throw result.error; - }; - Importer.prototype._patch = function (name, unpatched) { - if (name in this._patches) { - logger.debug('patching', name); - return this._patches[name].reduce(function (mod, patcher) { return patcher(mod); }, unpatched); - } - return unpatched; - }; - Importer.prototype._import = function (why, moduleName, _a) { - var _b = _a === void 0 ? {} : _a, _c = _b.alternatives, alternatives = _c === void 0 ? [] : _c, _d = _b.installTip, installTip = _d === void 0 ? moduleName : _d; - var res = this.tryThese.apply(this, __spread([moduleName], alternatives)); - if (res && res.exists) { - if (!res.error) - return res.exports; - throw new Error(messages_1.interpolate(messages_1.Errors.LoadingModuleFailed, { module: res.given, error: res.error.message })); - } - var msg = alternatives.length ? messages_1.Errors.UnableToLoadAnyModule : messages_1.Errors.UnableToLoadOneModule; - var loadModule = __spread([moduleName], alternatives).map(function (m) { return "\"" + m + "\""; }).join(', '); - if (typeof installTip === 'string') { - installTip = [{ module: installTip, label: "install \"" + installTip + "\"" }]; - } - var fix = installTip - .map(function (tip) { - return " " + (installTip.length === 1 ? '↳' : '•') + " " + messages_1.interpolate(messages_1.Helps.FixMissingModule, tip); - }) - .join('\n'); - throw new Error(messages_1.interpolate(msg, { - module: loadModule, - reason: why, - fix: fix, - })); - }; - __decorate([ - memoize_1.Memoize(function () { - var args = []; - for (var _i = 0; _i < arguments.length; _i++) { - args[_i] = arguments[_i]; - } - return args.join(':'); - }) - ], Importer.prototype, "tryThese", null); - __decorate([ - memoize_1.Memoize(function (name) { return name; }) - ], Importer.prototype, "_patch", null); - __decorate([ - memoize_1.Memoize() - ], Importer, "instance", null); - return Importer; -}()); -exports.Importer = Importer; -exports.importer = Importer.instance; -function requireWrapper(moduleName) { - var path; - var exists = false; - try { - path = resolveModule(moduleName); - exists = true; - } - catch (error) { - return { error: error, exists: exists, given: moduleName }; - } - var result = { exists: exists, path: path, given: moduleName }; - try { - result.exports = requireModule(moduleName); - } - catch (error) { - result.error = error; - } - return result; -} -var requireModule = function (mod) { return require(mod); }; -var resolveModule = function (mod) { return require.resolve(mod); }; -function __requireModule(localRequire, localResolve) { - requireModule = localRequire; - resolveModule = localResolve; -} -exports.__requireModule = __requireModule; diff --git a/node_modules/ts-jest/dist/util/json.d.ts b/node_modules/ts-jest/dist/util/json.d.ts deleted file mode 100644 index cb0ff5c3b..000000000 --- a/node_modules/ts-jest/dist/util/json.d.ts +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/node_modules/ts-jest/dist/util/json.js b/node_modules/ts-jest/dist/util/json.js deleted file mode 100644 index 3b058c6e2..000000000 --- a/node_modules/ts-jest/dist/util/json.js +++ /dev/null @@ -1,31 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -var stableStringify = require("fast-json-stable-stringify"); -var UNDEFINED = 'undefined'; -function stringify(input) { - return input === undefined ? UNDEFINED : stableStringify(input); -} -exports.stringify = stringify; -function parse(input) { - return input === UNDEFINED ? undefined : JSON.parse(input); -} -exports.parse = parse; -function normalize(input, _a) { - var _b = (_a === void 0 ? {} : _a).parse, parser = _b === void 0 ? parse : _b; - var result; - if (normalize.cache.has(input)) { - result = normalize.cache.get(input); - } - else { - var data = parser(input); - result = stringify(data); - if (result === input) - result = undefined; - normalize.cache.set(input, result); - } - return result === undefined ? input : result; -} -exports.normalize = normalize; -(function (normalize) { - normalize.cache = new Map(); -})(normalize = exports.normalize || (exports.normalize = {})); diff --git a/node_modules/ts-jest/dist/util/jsonable-value.d.ts b/node_modules/ts-jest/dist/util/jsonable-value.d.ts deleted file mode 100644 index cb0ff5c3b..000000000 --- a/node_modules/ts-jest/dist/util/jsonable-value.d.ts +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/node_modules/ts-jest/dist/util/jsonable-value.js b/node_modules/ts-jest/dist/util/jsonable-value.js deleted file mode 100644 index f2d0d5389..000000000 --- a/node_modules/ts-jest/dist/util/jsonable-value.js +++ /dev/null @@ -1,34 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -var json_1 = require("./json"); -var JsonableValue = (function () { - function JsonableValue(value) { - this.value = value; - } - Object.defineProperty(JsonableValue.prototype, "value", { - get: function () { - return this._value; - }, - set: function (value) { - this._value = value; - this._serialized = json_1.stringify(value); - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(JsonableValue.prototype, "serialized", { - get: function () { - return this._serialized; - }, - enumerable: true, - configurable: true - }); - JsonableValue.prototype.valueOf = function () { - return this._value; - }; - JsonableValue.prototype.toString = function () { - return this._serialized; - }; - return JsonableValue; -}()); -exports.JsonableValue = JsonableValue; diff --git a/node_modules/ts-jest/dist/util/logger.d.ts b/node_modules/ts-jest/dist/util/logger.d.ts deleted file mode 100644 index cb0ff5c3b..000000000 --- a/node_modules/ts-jest/dist/util/logger.d.ts +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/node_modules/ts-jest/dist/util/logger.js b/node_modules/ts-jest/dist/util/logger.js deleted file mode 100644 index 4a03e4625..000000000 --- a/node_modules/ts-jest/dist/util/logger.js +++ /dev/null @@ -1,21 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -var bs_logger_1 = require("bs-logger"); -var backports_1 = require("./backports"); -var original = process.env.TS_JEST_LOG; -var buildOptions = function () { - var _a; - return ({ - context: (_a = {}, - _a[bs_logger_1.LogContexts.package] = 'ts-jest', - _a[bs_logger_1.LogContexts.logLevel] = bs_logger_1.LogLevels.trace, - _a.version = require('../../package.json').version, - _a), - targets: process.env.TS_JEST_LOG || undefined, - }); -}; -exports.rootLogger = bs_logger_1.createLogger(buildOptions()); -backports_1.backportTsJestDebugEnvVar(exports.rootLogger); -if (original !== process.env.TS_JEST_LOG) { - exports.rootLogger = bs_logger_1.createLogger(buildOptions()); -} diff --git a/node_modules/ts-jest/dist/util/memoize.d.ts b/node_modules/ts-jest/dist/util/memoize.d.ts deleted file mode 100644 index cb0ff5c3b..000000000 --- a/node_modules/ts-jest/dist/util/memoize.d.ts +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/node_modules/ts-jest/dist/util/memoize.js b/node_modules/ts-jest/dist/util/memoize.js deleted file mode 100644 index 91e307e53..000000000 --- a/node_modules/ts-jest/dist/util/memoize.js +++ /dev/null @@ -1,47 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -var cacheProp = Symbol.for('[memoize]'); -function Memoize(keyBuilder) { - return function (_, propertyKey, descriptor) { - if (descriptor.value != null) { - descriptor.value = memoize(propertyKey, descriptor.value, keyBuilder || (function (v) { return v; })); - } - else if (descriptor.get != null) { - descriptor.get = memoize(propertyKey, descriptor.get, keyBuilder || (function () { return propertyKey; })); - } - }; -} -exports.Memoize = Memoize; -function ensureCache(target, reset) { - if (reset === void 0) { reset = false; } - if (reset || !target[cacheProp]) { - Object.defineProperty(target, cacheProp, { - value: Object.create(null), - configurable: true, - }); - } - return target[cacheProp]; -} -function ensureChildCache(target, key, reset) { - if (reset === void 0) { reset = false; } - var dict = ensureCache(target); - if (reset || !dict[key]) { - dict[key] = new Map(); - } - return dict[key]; -} -function memoize(namespace, func, keyBuilder) { - return function () { - var args = []; - for (var _i = 0; _i < arguments.length; _i++) { - args[_i] = arguments[_i]; - } - var cache = ensureChildCache(this, namespace); - var key = keyBuilder.apply(this, args); - if (cache.has(key)) - return cache.get(key); - var res = func.apply(this, args); - cache.set(key, res); - return res; - }; -} diff --git a/node_modules/ts-jest/dist/util/messages.d.ts b/node_modules/ts-jest/dist/util/messages.d.ts deleted file mode 100644 index cb0ff5c3b..000000000 --- a/node_modules/ts-jest/dist/util/messages.d.ts +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/node_modules/ts-jest/dist/util/messages.js b/node_modules/ts-jest/dist/util/messages.js deleted file mode 100644 index f868913ce..000000000 --- a/node_modules/ts-jest/dist/util/messages.js +++ /dev/null @@ -1,47 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -var Errors; -(function (Errors) { - Errors["LoadingModuleFailed"] = "Loading module {{module}} failed with error: {{error}}"; - Errors["UnableToLoadOneModule"] = "Unable to load the module {{module}}. {{reason}} To fix it:\n{{fix}}"; - Errors["UnableToLoadAnyModule"] = "Unable to load any of these modules: {{module}}. {{reason}}. To fix it:\n{{fix}}"; - Errors["TypesUnavailableWithoutTypeCheck"] = "Type information is unavailable with \"isolatedModules\""; - Errors["UnableToRequireDefinitionFile"] = "Unable to require `.d.ts` file.\nThis is usually the result of a faulty configuration or import. Make sure there is a `.js`, `.json` or another executable extension available alongside `{{file}}`."; - Errors["FileNotFound"] = "File not found: {{inputPath}} (resolved as: {{resolvedPath}})"; - Errors["UntestedDependencyVersion"] = "Version {{actualVersion}} of {{module}} installed has not been tested with ts-jest. If you're experiencing issues, consider using a supported version ({{expectedVersion}}). Please do not report issues in ts-jest if you are using unsupported versions."; - Errors["MissingDependency"] = "Module {{module}} is not installed. If you're experiencing issues, consider installing a supported version ({{expectedVersion}})."; - Errors["UnableToCompileTypeScript"] = "TypeScript diagnostics ({{help}}):\n{{diagnostics}}"; - Errors["NotMappingMultiStarPath"] = "Not mapping \"{{path}}\" because it has more than one star (`*`)."; - Errors["NotMappingPathWithEmptyMap"] = "Not mapping \"{{path}}\" because it has no target."; - Errors["MappingOnlyFirstTargetOfPath"] = "Mapping only to first target of \"{{path}}\" because it has more than one ({{count}})."; - Errors["GotJsFileButAllowJsFalse"] = "Got a `.js` file to compile while `allowJs` option is not set to `true` (file: {{path}}). To fix this:\n - if you want TypeScript to process JS files, set `allowJs` to `true` in your TypeScript config (usually tsconfig.json)\n - if you do not want TypeScript to process your `.js` files, in your Jest config change the `transform` key which value is `ts-jest` so that it does not match `.js` files anymore"; - Errors["GotUnknownFileTypeWithoutBabel"] = "Got a unknown file type to compile (file: {{path}}). To fix this, in your Jest config change the `transform` key which value is `ts-jest` so that it does not match this kind of files anymore."; - Errors["GotUnknownFileTypeWithBabel"] = "Got a unknown file type to compile (file: {{path}}). To fix this, in your Jest config change the `transform` key which value is `ts-jest` so that it does not match this kind of files anymore. If you still want Babel to process it, add another entry to the `transform` option with value `babel-jest` which key matches this type of files."; - Errors["ConfigNoModuleInterop"] = "If you have issues related to imports, you should consider setting `esModuleInterop` to `true` in your TypeScript configuration file (usually `tsconfig.json`). See https://blogs.msdn.microsoft.com/typescript/2018/01/31/announcing-typescript-2-7/#easier-ecmascript-module-interoperability for more information."; - Errors["UnableToFindProjectRoot"] = "Unable to find the root of the project where ts-jest has been installed."; - Errors["UnableToResolveJestConfig"] = "Unable to resolve jest-config. Ensure Jest is properly installed."; -})(Errors = exports.Errors || (exports.Errors = {})); -var Helps; -(function (Helps) { - Helps["FixMissingModule"] = "{{label}}: `npm i -D {{module}}` (or `yarn add --dev {{module}}`)"; - Helps["IgnoreDiagnosticCode"] = "customize using `[jest-config].globals.ts-jest.diagnostics` option"; - Helps["MigrateConfigUsingCLI"] = "Your Jest configuration is outdated. Use the CLI to help migrating it: ts-jest config:migrate ."; -})(Helps = exports.Helps || (exports.Helps = {})); -var Deprecateds; -(function (Deprecateds) { - Deprecateds["EnvVar"] = "Using env. var \"{{old}}\" is deprecated, use \"{{new}}\" instead."; - Deprecateds["ConfigOption"] = "\"[jest-config].{{oldPath}}\" is deprecated, use \"[jest-config].{{newPath}}\" instead."; - Deprecateds["ConfigOptionWithNote"] = "\"[jest-config].{{oldPath}}\" is deprecated, use \"[jest-config].{{newPath}}\" instead.\n \u21B3 {{note}}"; - Deprecateds["ConfigOptionUseBabelRcNote"] = "See `babel-jest` related issue: https://github.com/facebook/jest/issues/3845"; - Deprecateds["HelperMovedToUtils"] = "The `{{helper}}` helper has been moved to `ts-jest/utils`. Use `import { {{helper}} } from 'ts-jest/utils'` instead."; -})(Deprecateds = exports.Deprecateds || (exports.Deprecateds = {})); -var ImportReasons; -(function (ImportReasons) { - ImportReasons["TsJest"] = "Using \"ts-jest\" requires this package to be installed."; - ImportReasons["BabelJest"] = "Using \"babel-jest\" requires this package to be installed."; -})(ImportReasons = exports.ImportReasons || (exports.ImportReasons = {})); -function interpolate(msg, vars) { - if (vars === void 0) { vars = {}; } - return msg.replace(/\{\{([^\}]+)\}\}/g, function (_, key) { return (key in vars ? vars[key] : _); }); -} -exports.interpolate = interpolate; diff --git a/node_modules/ts-jest/dist/util/normalize-slashes.d.ts b/node_modules/ts-jest/dist/util/normalize-slashes.d.ts deleted file mode 100644 index cb0ff5c3b..000000000 --- a/node_modules/ts-jest/dist/util/normalize-slashes.d.ts +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/node_modules/ts-jest/dist/util/normalize-slashes.js b/node_modules/ts-jest/dist/util/normalize-slashes.js deleted file mode 100644 index b6ed66775..000000000 --- a/node_modules/ts-jest/dist/util/normalize-slashes.js +++ /dev/null @@ -1,6 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -function normalizeSlashes(value) { - return value.replace(/\\/g, '/'); -} -exports.normalizeSlashes = normalizeSlashes; diff --git a/node_modules/ts-jest/dist/util/sha1.d.ts b/node_modules/ts-jest/dist/util/sha1.d.ts deleted file mode 100644 index cb0ff5c3b..000000000 --- a/node_modules/ts-jest/dist/util/sha1.d.ts +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/node_modules/ts-jest/dist/util/sha1.js b/node_modules/ts-jest/dist/util/sha1.js deleted file mode 100644 index ea8606f62..000000000 --- a/node_modules/ts-jest/dist/util/sha1.js +++ /dev/null @@ -1,31 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -var crypto_1 = require("crypto"); -exports.cache = Object.create(null); -function sha1() { - var data = []; - for (var _i = 0; _i < arguments.length; _i++) { - data[_i] = arguments[_i]; - } - var canCache = data.length === 1 && typeof data[0] === 'string'; - var cacheKey; - if (canCache) { - cacheKey = data[0]; - if (cacheKey in exports.cache) { - return exports.cache[cacheKey]; - } - } - var hash = crypto_1.createHash('sha1'); - data.forEach(function (item) { - if (typeof item === 'string') - hash.update(item, 'utf8'); - else - hash.update(item); - }); - var res = hash.digest('hex').toString(); - if (canCache) { - exports.cache[cacheKey] = res; - } - return res; -} -exports.sha1 = sha1; diff --git a/node_modules/ts-jest/dist/util/testing.d.ts b/node_modules/ts-jest/dist/util/testing.d.ts deleted file mode 100644 index e39127cf0..000000000 --- a/node_modules/ts-jest/dist/util/testing.d.ts +++ /dev/null @@ -1,34 +0,0 @@ -/// -declare type MockableFunction = (...args: any[]) => any; -declare type MethodKeysOf = { - [K in keyof T]: T[K] extends MockableFunction ? K : never; -}[keyof T]; -declare type PropertyKeysOf = { - [K in keyof T]: T[K] extends MockableFunction ? never : K; -}[keyof T]; -declare type ArgumentsOf = T extends (...args: infer A) => any ? A : never; -declare type ConstructorArgumentsOf = T extends new (...args: infer A) => any ? A : never; -interface MockWithArgs extends jest.MockInstance, ArgumentsOf> { - new (...args: ConstructorArgumentsOf): T; - (...args: ArgumentsOf): ReturnType; -} -declare type MaybeMockedConstructor = T extends new (...args: any[]) => infer R ? jest.MockInstance> : {}; -declare type MockedFunction = MockWithArgs & { - [K in keyof T]: T[K]; -}; -declare type MockedFunctionDeep = MockWithArgs & MockedObjectDeep; -declare type MockedObject = MaybeMockedConstructor & { - [K in MethodKeysOf]: T[K] extends MockableFunction ? MockedFunction : T[K]; -} & { - [K in PropertyKeysOf]: T[K]; -}; -declare type MockedObjectDeep = MaybeMockedConstructor & { - [K in MethodKeysOf]: T[K] extends MockableFunction ? MockedFunctionDeep : T[K]; -} & { - [K in PropertyKeysOf]: MaybeMockedDeep; -}; -export declare type MaybeMockedDeep = T extends MockableFunction ? MockedFunctionDeep : T extends object ? MockedObjectDeep : T; -export declare type MaybeMocked = T extends MockableFunction ? MockedFunction : T extends object ? MockedObject : T; -export declare function mocked(item: T, deep?: false): MaybeMocked; -export declare function mocked(item: T, deep: true): MaybeMockedDeep; -export {}; diff --git a/node_modules/ts-jest/dist/util/testing.js b/node_modules/ts-jest/dist/util/testing.js deleted file mode 100644 index b5eae9f04..000000000 --- a/node_modules/ts-jest/dist/util/testing.js +++ /dev/null @@ -1,7 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -function mocked(item, _deep) { - if (_deep === void 0) { _deep = false; } - return item; -} -exports.mocked = mocked; diff --git a/node_modules/ts-jest/dist/util/ts-error.d.ts b/node_modules/ts-jest/dist/util/ts-error.d.ts deleted file mode 100644 index cb0ff5c3b..000000000 --- a/node_modules/ts-jest/dist/util/ts-error.d.ts +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/node_modules/ts-jest/dist/util/ts-error.js b/node_modules/ts-jest/dist/util/ts-error.js deleted file mode 100644 index 215f59c40..000000000 --- a/node_modules/ts-jest/dist/util/ts-error.js +++ /dev/null @@ -1,41 +0,0 @@ -"use strict"; -var __extends = (this && this.__extends) || (function () { - var extendStatics = function (d, b) { - extendStatics = Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; - return extendStatics(d, b); - } - return function (d, b) { - extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); - }; -})(); -Object.defineProperty(exports, "__esModule", { value: true }); -var make_error_1 = require("make-error"); -var util_1 = require("util"); -var logger_1 = require("./logger"); -var messages_1 = require("./messages"); -var logger = logger_1.rootLogger.child({ namespace: 'TSError' }); -exports.INSPECT_CUSTOM = util_1.inspect.custom || 'inspect'; -var TSError = (function (_super) { - __extends(TSError, _super); - function TSError(diagnosticText, diagnosticCodes) { - var _this = _super.call(this, messages_1.interpolate(messages_1.Errors.UnableToCompileTypeScript, { - diagnostics: diagnosticText.trim(), - help: messages_1.Helps.IgnoreDiagnosticCode, - })) || this; - _this.diagnosticText = diagnosticText; - _this.diagnosticCodes = diagnosticCodes; - _this.name = 'TSError'; - logger.debug({ diagnosticCodes: diagnosticCodes, diagnosticText: diagnosticText }, 'created new TSError'); - Object.defineProperty(_this, 'stack', { value: '' }); - return _this; - } - TSError.prototype[exports.INSPECT_CUSTOM] = function () { - return this.diagnosticText; - }; - return TSError; -}(make_error_1.BaseError)); -exports.TSError = TSError; diff --git a/node_modules/ts-jest/dist/util/version-checkers.d.ts b/node_modules/ts-jest/dist/util/version-checkers.d.ts deleted file mode 100644 index cb0ff5c3b..000000000 --- a/node_modules/ts-jest/dist/util/version-checkers.d.ts +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/node_modules/ts-jest/dist/util/version-checkers.js b/node_modules/ts-jest/dist/util/version-checkers.js deleted file mode 100644 index ead55dc3b..000000000 --- a/node_modules/ts-jest/dist/util/version-checkers.js +++ /dev/null @@ -1,63 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -var semver_1 = require("semver"); -var get_package_version_1 = require("./get-package-version"); -var logger_1 = require("./logger"); -var messages_1 = require("./messages"); -var logger = logger_1.rootLogger.child({ namespace: 'versions' }); -var ExpectedVersions; -(function (ExpectedVersions) { - ExpectedVersions["Jest"] = ">=24 <25"; - ExpectedVersions["TypeScript"] = ">=2.7 <4"; - ExpectedVersions["BabelJest"] = ">=24 <25"; - ExpectedVersions["BabelCore"] = ">=7.0.0-beta.0 <8"; -})(ExpectedVersions = exports.ExpectedVersions || (exports.ExpectedVersions = {})); -exports.VersionCheckers = { - jest: createVersionChecker('jest', ExpectedVersions.Jest), - typescript: createVersionChecker('typescript', ExpectedVersions.TypeScript), - babelJest: createVersionChecker('babel-jest', ExpectedVersions.BabelJest), - babelCore: createVersionChecker('@babel/core', ExpectedVersions.BabelCore), -}; -function checkVersion(name, expectedRange, action) { - if (action === void 0) { action = 'warn'; } - var version = get_package_version_1.getPackageVersion(name); - var success = !!version && semver_1.satisfies(version, expectedRange); - logger.debug({ - actualVersion: version, - expectedVersion: expectedRange, - }, 'checking version of %s: %s', name, success ? 'OK' : 'NOT OK'); - if (!action || success) - return success; - var message = messages_1.interpolate(version ? messages_1.Errors.UntestedDependencyVersion : messages_1.Errors.MissingDependency, { - module: name, - actualVersion: version || '??', - expectedVersion: rangeToHumanString(expectedRange), - }); - if (action === 'warn') { - logger.warn(message); - } - else if (action === 'throw') { - logger.fatal(message); - throw new RangeError(message); - } - return success; -} -function rangeToHumanString(versionRange) { - return new semver_1.Range(versionRange).toString(); -} -function createVersionChecker(moduleName, expectedVersion) { - var memo; - var warn = function () { - if (memo !== undefined) - return memo; - return (memo = checkVersion(moduleName, expectedVersion, 'warn')); - }; - var raise = function () { return checkVersion(moduleName, expectedVersion, 'throw'); }; - return { - raise: raise, - warn: warn, - forget: function () { - memo = undefined; - }, - }; -} diff --git a/node_modules/ts-jest/icon.png b/node_modules/ts-jest/icon.png deleted file mode 100644 index 678393086..000000000 Binary files a/node_modules/ts-jest/icon.png and /dev/null differ diff --git a/node_modules/ts-jest/jest-preset.js b/node_modules/ts-jest/jest-preset.js index 54b108e34..41d20c967 100644 --- a/node_modules/ts-jest/jest-preset.js +++ b/node_modules/ts-jest/jest-preset.js @@ -1 +1 @@ -module.exports = require('./presets/default/jest-preset') +module.exports = require('./presets').defaults diff --git a/node_modules/ts-jest/node_modules/.bin/semver b/node_modules/ts-jest/node_modules/.bin/semver index 317eb293d..5aaadf42c 120000 --- a/node_modules/ts-jest/node_modules/.bin/semver +++ b/node_modules/ts-jest/node_modules/.bin/semver @@ -1 +1 @@ -../semver/bin/semver \ No newline at end of file +../semver/bin/semver.js \ No newline at end of file diff --git a/node_modules/ts-jest/node_modules/camelcase/index.js b/node_modules/ts-jest/node_modules/camelcase/index.js deleted file mode 100644 index c8492a228..000000000 --- a/node_modules/ts-jest/node_modules/camelcase/index.js +++ /dev/null @@ -1,64 +0,0 @@ -'use strict'; - -function preserveCamelCase(str) { - let isLastCharLower = false; - let isLastCharUpper = false; - let isLastLastCharUpper = false; - - for (let i = 0; i < str.length; i++) { - const c = str[i]; - - if (isLastCharLower && /[a-zA-Z]/.test(c) && c.toUpperCase() === c) { - str = str.substr(0, i) + '-' + str.substr(i); - isLastCharLower = false; - isLastLastCharUpper = isLastCharUpper; - isLastCharUpper = true; - i++; - } else if (isLastCharUpper && isLastLastCharUpper && /[a-zA-Z]/.test(c) && c.toLowerCase() === c) { - str = str.substr(0, i - 1) + '-' + str.substr(i - 1); - isLastLastCharUpper = isLastCharUpper; - isLastCharUpper = false; - isLastCharLower = true; - } else { - isLastCharLower = c.toLowerCase() === c; - isLastLastCharUpper = isLastCharUpper; - isLastCharUpper = c.toUpperCase() === c; - } - } - - return str; -} - -module.exports = function (str) { - if (arguments.length > 1) { - str = Array.from(arguments) - .map(x => x.trim()) - .filter(x => x.length) - .join('-'); - } else { - str = str.trim(); - } - - if (str.length === 0) { - return ''; - } - - if (str.length === 1) { - return str.toLowerCase(); - } - - if (/^[a-z0-9]+$/.test(str)) { - return str; - } - - const hasUpperCase = str !== str.toLowerCase(); - - if (hasUpperCase) { - str = preserveCamelCase(str); - } - - return str - .replace(/^[_.\- ]+/, '') - .toLowerCase() - .replace(/[_.\- ]+(\w|$)/g, (m, p1) => p1.toUpperCase()); -}; diff --git a/node_modules/ts-jest/node_modules/camelcase/license b/node_modules/ts-jest/node_modules/camelcase/license deleted file mode 100644 index 654d0bfe9..000000000 --- a/node_modules/ts-jest/node_modules/camelcase/license +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) Sindre Sorhus (sindresorhus.com) - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/node_modules/ts-jest/node_modules/camelcase/package.json b/node_modules/ts-jest/node_modules/camelcase/package.json deleted file mode 100644 index 5fcf28760..000000000 --- a/node_modules/ts-jest/node_modules/camelcase/package.json +++ /dev/null @@ -1,78 +0,0 @@ -{ - "_args": [ - [ - "camelcase@4.1.0", - "/Users/drew.heavner/Documents/Github/sign-android-release" - ] - ], - "_development": true, - "_from": "camelcase@4.1.0", - "_id": "camelcase@4.1.0", - "_inBundle": false, - "_integrity": "sha1-1UVjW+HjPFQmScaRc+Xeas+uNN0=", - "_location": "/ts-jest/camelcase", - "_phantomChildren": {}, - "_requested": { - "type": "version", - "registry": true, - "raw": "camelcase@4.1.0", - "name": "camelcase", - "escapedName": "camelcase", - "rawSpec": "4.1.0", - "saveSpec": null, - "fetchSpec": "4.1.0" - }, - "_requiredBy": [ - "/ts-jest/yargs-parser" - ], - "_resolved": "https://registry.npmjs.org/camelcase/-/camelcase-4.1.0.tgz", - "_spec": "4.1.0", - "_where": "/Users/drew.heavner/Documents/Github/sign-android-release", - "author": { - "name": "Sindre Sorhus", - "email": "sindresorhus@gmail.com", - "url": "sindresorhus.com" - }, - "bugs": { - "url": "https://github.com/sindresorhus/camelcase/issues" - }, - "description": "Convert a dash/dot/underscore/space separated string to camelCase: foo-bar → fooBar", - "devDependencies": { - "ava": "*", - "xo": "*" - }, - "engines": { - "node": ">=4" - }, - "files": [ - "index.js" - ], - "homepage": "https://github.com/sindresorhus/camelcase#readme", - "keywords": [ - "camelcase", - "camel-case", - "camel", - "case", - "dash", - "hyphen", - "dot", - "underscore", - "separator", - "string", - "text", - "convert" - ], - "license": "MIT", - "name": "camelcase", - "repository": { - "type": "git", - "url": "git+https://github.com/sindresorhus/camelcase.git" - }, - "scripts": { - "test": "xo && ava" - }, - "version": "4.1.0", - "xo": { - "esnext": true - } -} diff --git a/node_modules/ts-jest/node_modules/camelcase/readme.md b/node_modules/ts-jest/node_modules/camelcase/readme.md deleted file mode 100644 index 0610dc627..000000000 --- a/node_modules/ts-jest/node_modules/camelcase/readme.md +++ /dev/null @@ -1,57 +0,0 @@ -# camelcase [![Build Status](https://travis-ci.org/sindresorhus/camelcase.svg?branch=master)](https://travis-ci.org/sindresorhus/camelcase) - -> Convert a dash/dot/underscore/space separated string to camelCase: `foo-bar` → `fooBar` - - -## Install - -``` -$ npm install --save camelcase -``` - - -## Usage - -```js -const camelCase = require('camelcase'); - -camelCase('foo-bar'); -//=> 'fooBar' - -camelCase('foo_bar'); -//=> 'fooBar' - -camelCase('Foo-Bar'); -//=> 'fooBar' - -camelCase('--foo.bar'); -//=> 'fooBar' - -camelCase('__foo__bar__'); -//=> 'fooBar' - -camelCase('foo bar'); -//=> 'fooBar' - -console.log(process.argv[3]); -//=> '--foo-bar' -camelCase(process.argv[3]); -//=> 'fooBar' - -camelCase('foo', 'bar'); -//=> 'fooBar' - -camelCase('__foo__', '--bar'); -//=> 'fooBar' -``` - - -## Related - -- [decamelize](https://github.com/sindresorhus/decamelize) - The inverse of this module -- [uppercamelcase](https://github.com/SamVerschueren/uppercamelcase) - Like this module, but to PascalCase instead of camelCase - - -## License - -MIT © [Sindre Sorhus](https://sindresorhus.com) diff --git a/node_modules/ts-jest/node_modules/semver/CHANGELOG.md b/node_modules/ts-jest/node_modules/semver/CHANGELOG.md index 66304fdd2..220af176f 100644 --- a/node_modules/ts-jest/node_modules/semver/CHANGELOG.md +++ b/node_modules/ts-jest/node_modules/semver/CHANGELOG.md @@ -1,5 +1,77 @@ # changes log +## 7.3.0 + +* Add `subset(r1, r2)` method to determine if `r1` range is entirely + contained by `r2` range. + +## 7.2.3 + +* Fix handling of `includePrelease` mode where version ranges like `1.0.0 - + 2.0.0` would include `3.0.0-pre` and not `1.0.0-pre`. + +## 7.2.2 + +* Fix bug where `2.0.0-pre` would be included in `^1.0.0` if + `includePrerelease` was set to true. + +## 7.2.0 + +* Add `simplifyRange` method to attempt to generate a more human-readable + range expression that is equivalent to a supplied range, for a given set + of versions. + +## 7.1.2 + +* Remove fancy lazy-loading logic, as it was causing problems for webpack + users. + +## 7.1.0 + +* Add `require('semver/preload')` to load the entire module without using + lazy getter methods. + +## 7.0.0 + +* Refactor module into separate files for better tree-shaking +* Drop support for very old node versions, use const/let, `=>` functions, + and classes. + +## 6.3.0 + +* Expose the token enum on the exports + +## 6.2.0 + +* Coerce numbers to strings when passed to semver.coerce() +* Add `rtl` option to coerce from right to left + +## 6.1.3 + +* Handle X-ranges properly in includePrerelease mode + +## 6.1.2 + +* Do not throw when testing invalid version strings + +## 6.1.1 + +* Add options support for semver.coerce() +* Handle undefined version passed to Range.test + +## 6.1.0 + +* Add semver.compareBuild function +* Support `*` in semver.intersects + +## 6.0 + +* Fix `intersects` logic. + + This is technically a bug fix, but since it is also a change to behavior + that may require users updating their code, it is marked as a major + version increment. + ## 5.7 * Add `minVersion` method diff --git a/node_modules/ts-jest/node_modules/semver/README.md b/node_modules/ts-jest/node_modules/semver/README.md index e5ccececf..9bef045af 100644 --- a/node_modules/ts-jest/node_modules/semver/README.md +++ b/node_modules/ts-jest/node_modules/semver/README.md @@ -4,7 +4,7 @@ semver(1) -- The semantic versioner for npm ## Install ```bash -npm install --save semver +npm install semver ```` ## Usage @@ -25,6 +25,63 @@ semver.valid(semver.coerce('v2')) // '2.0.0' semver.valid(semver.coerce('42.6.7.9.3-alpha')) // '42.6.7' ``` +You can also just load the module for the function that you care about, if +you'd like to minimize your footprint. + +```js +// load the whole API at once in a single object +const semver = require('semver') + +// or just load the bits you need +// all of them listed here, just pick and choose what you want + +// classes +const SemVer = require('semver/classes/semver') +const Comparator = require('semver/classes/comparator') +const Range = require('semver/classes/range') + +// functions for working with versions +const semverParse = require('semver/functions/parse') +const semverValid = require('semver/functions/valid') +const semverClean = require('semver/functions/clean') +const semverInc = require('semver/functions/inc') +const semverDiff = require('semver/functions/diff') +const semverMajor = require('semver/functions/major') +const semverMinor = require('semver/functions/minor') +const semverPatch = require('semver/functions/patch') +const semverPrerelease = require('semver/functions/prerelease') +const semverCompare = require('semver/functions/compare') +const semverRcompare = require('semver/functions/rcompare') +const semverCompareLoose = require('semver/functions/compare-loose') +const semverCompareBuild = require('semver/functions/compare-build') +const semverSort = require('semver/functions/sort') +const semverRsort = require('semver/functions/rsort') + +// low-level comparators between versions +const semverGt = require('semver/functions/gt') +const semverLt = require('semver/functions/lt') +const semverEq = require('semver/functions/eq') +const semverNeq = require('semver/functions/neq') +const semverGte = require('semver/functions/gte') +const semverLte = require('semver/functions/lte') +const semverCmp = require('semver/functions/cmp') +const semverCoerce = require('semver/functions/coerce') + +// working with ranges +const semverSatisfies = require('semver/functions/satisfies') +const semverMaxSatisfying = require('semver/ranges/max-satisfying') +const semverMinSatisfying = require('semver/ranges/min-satisfying') +const semverToComparators = require('semver/ranges/to-comparators') +const semverMinVersion = require('semver/ranges/min-version') +const semverValidRange = require('semver/ranges/valid') +const semverOutside = require('semver/ranges/outside') +const semverGtr = require('semver/ranges/gtr') +const semverLtr = require('semver/ranges/ltr') +const semverIntersects = require('semver/ranges/intersects') +const simplifyRange = require('semver/ranges/simplify') +const rangeSubset = require('semver/ranges/subset') +``` + As a command-line utility: ``` @@ -60,6 +117,12 @@ Options: Coerce a string into SemVer if possible (does not imply --loose) +--rtl + Coerce version strings right to left + +--ltr + Coerce version strings left to right (default) + Program exits successfully if any valid version satisfies all supplied ranges, and prints all satisfying versions. @@ -193,8 +256,8 @@ inclusive range, then all versions that start with the supplied parts of the tuple are accepted, but nothing that would be greater than the provided tuple parts. -* `1.2.3 - 2.3` := `>=1.2.3 <2.4.0` -* `1.2.3 - 2` := `>=1.2.3 <3.0.0` +* `1.2.3 - 2.3` := `>=1.2.3 <2.4.0-0` +* `1.2.3 - 2` := `>=1.2.3 <3.0.0-0` #### X-Ranges `1.2.x` `1.X` `1.2.*` `*` @@ -202,28 +265,28 @@ Any of `X`, `x`, or `*` may be used to "stand in" for one of the numeric values in the `[major, minor, patch]` tuple. * `*` := `>=0.0.0` (Any version satisfies) -* `1.x` := `>=1.0.0 <2.0.0` (Matching major version) -* `1.2.x` := `>=1.2.0 <1.3.0` (Matching major and minor versions) +* `1.x` := `>=1.0.0 <2.0.0-0` (Matching major version) +* `1.2.x` := `>=1.2.0 <1.3.0-0` (Matching major and minor versions) A partial version range is treated as an X-Range, so the special character is in fact optional. * `""` (empty string) := `*` := `>=0.0.0` -* `1` := `1.x.x` := `>=1.0.0 <2.0.0` -* `1.2` := `1.2.x` := `>=1.2.0 <1.3.0` +* `1` := `1.x.x` := `>=1.0.0 <2.0.0-0` +* `1.2` := `1.2.x` := `>=1.2.0 <1.3.0-0` #### Tilde Ranges `~1.2.3` `~1.2` `~1` Allows patch-level changes if a minor version is specified on the comparator. Allows minor-level changes if not. -* `~1.2.3` := `>=1.2.3 <1.(2+1).0` := `>=1.2.3 <1.3.0` -* `~1.2` := `>=1.2.0 <1.(2+1).0` := `>=1.2.0 <1.3.0` (Same as `1.2.x`) -* `~1` := `>=1.0.0 <(1+1).0.0` := `>=1.0.0 <2.0.0` (Same as `1.x`) -* `~0.2.3` := `>=0.2.3 <0.(2+1).0` := `>=0.2.3 <0.3.0` -* `~0.2` := `>=0.2.0 <0.(2+1).0` := `>=0.2.0 <0.3.0` (Same as `0.2.x`) -* `~0` := `>=0.0.0 <(0+1).0.0` := `>=0.0.0 <1.0.0` (Same as `0.x`) -* `~1.2.3-beta.2` := `>=1.2.3-beta.2 <1.3.0` Note that prereleases in +* `~1.2.3` := `>=1.2.3 <1.(2+1).0` := `>=1.2.3 <1.3.0-0` +* `~1.2` := `>=1.2.0 <1.(2+1).0` := `>=1.2.0 <1.3.0-0` (Same as `1.2.x`) +* `~1` := `>=1.0.0 <(1+1).0.0` := `>=1.0.0 <2.0.0-0` (Same as `1.x`) +* `~0.2.3` := `>=0.2.3 <0.(2+1).0` := `>=0.2.3 <0.3.0-0` +* `~0.2` := `>=0.2.0 <0.(2+1).0` := `>=0.2.0 <0.3.0-0` (Same as `0.2.x`) +* `~0` := `>=0.0.0 <(0+1).0.0` := `>=0.0.0 <1.0.0-0` (Same as `0.x`) +* `~1.2.3-beta.2` := `>=1.2.3-beta.2 <1.3.0-0` Note that prereleases in the `1.2.3` version will be allowed, if they are greater than or equal to `beta.2`. So, `1.2.3-beta.4` would be allowed, but `1.2.4-beta.2` would not, because it is a prerelease of a @@ -231,7 +294,7 @@ comparator. Allows minor-level changes if not. #### Caret Ranges `^1.2.3` `^0.2.5` `^0.0.4` -Allows changes that do not modify the left-most non-zero digit in the +Allows changes that do not modify the left-most non-zero element in the `[major, minor, patch]` tuple. In other words, this allows patch and minor updates for versions `1.0.0` and above, patch updates for versions `0.X >=0.1.0`, and *no* updates for versions `0.0.X`. @@ -245,15 +308,15 @@ However, it presumes that there will *not* be breaking changes between `0.2.4` and `0.2.5`. It allows for changes that are presumed to be additive (but non-breaking), according to commonly observed practices. -* `^1.2.3` := `>=1.2.3 <2.0.0` -* `^0.2.3` := `>=0.2.3 <0.3.0` -* `^0.0.3` := `>=0.0.3 <0.0.4` -* `^1.2.3-beta.2` := `>=1.2.3-beta.2 <2.0.0` Note that prereleases in +* `^1.2.3` := `>=1.2.3 <2.0.0-0` +* `^0.2.3` := `>=0.2.3 <0.3.0-0` +* `^0.0.3` := `>=0.0.3 <0.0.4-0` +* `^1.2.3-beta.2` := `>=1.2.3-beta.2 <2.0.0-0` Note that prereleases in the `1.2.3` version will be allowed, if they are greater than or equal to `beta.2`. So, `1.2.3-beta.4` would be allowed, but `1.2.4-beta.2` would not, because it is a prerelease of a different `[major, minor, patch]` tuple. -* `^0.0.3-beta` := `>=0.0.3-beta <0.0.4` Note that prereleases in the +* `^0.0.3-beta` := `>=0.0.3-beta <0.0.4-0` Note that prereleases in the `0.0.3` version *only* will be allowed, if they are greater than or equal to `beta`. So, `0.0.3-pr.2` would be allowed. @@ -261,16 +324,16 @@ When parsing caret ranges, a missing `patch` value desugars to the number `0`, but will allow flexibility within that value, even if the major and minor versions are both `0`. -* `^1.2.x` := `>=1.2.0 <2.0.0` -* `^0.0.x` := `>=0.0.0 <0.1.0` -* `^0.0` := `>=0.0.0 <0.1.0` +* `^1.2.x` := `>=1.2.0 <2.0.0-0` +* `^0.0.x` := `>=0.0.0 <0.1.0-0` +* `^0.0` := `>=0.0.0 <0.1.0-0` A missing `minor` and `patch` values will desugar to zero, but also allow flexibility within those values, even if the major version is zero. -* `^1.x` := `>=1.0.0 <2.0.0` -* `^0.x` := `>=0.0.0 <1.0.0` +* `^1.x` := `>=1.0.0 <2.0.0-0` +* `^0.x` := `>=0.0.0 <1.0.0-0` ### Range Grammar @@ -354,6 +417,9 @@ strings that they parse. `v2` is greater. Sorts in ascending order if passed to `Array.sort()`. * `rcompare(v1, v2)`: The reverse of compare. Sorts an array of versions in descending order when passed to `Array.sort()`. +* `compareBuild(v1, v2)`: The same as `compare` but considers `build` when two versions + are equal. Sorts in ascending order if passed to `Array.sort()`. + `v2` is greater. Sorts in ascending order if passed to `Array.sort()`. * `diff(v1, v2)`: Returns difference between two versions by the release type (`major`, `premajor`, `minor`, `preminor`, `patch`, `prepatch`, or `prerelease`), or null if the versions are the same. @@ -382,6 +448,16 @@ strings that they parse. `hilo` argument must be either the string `'>'` or `'<'`. (This is the function called by `gtr` and `ltr`.) * `intersects(range)`: Return true if any of the ranges comparators intersect +* `simplifyRange(versions, range)`: Return a "simplified" range that + matches the same items in `versions` list as the range specified. Note + that it does *not* guarantee that it would match the same versions in all + cases, only for the set of versions provided. This is useful when + generating ranges by joining together multiple versions with `||` + programmatically, to provide the user with something a bit more + ergonomic. If the provided range is shorter in string-length than the + generated range, then that is returned. +* `subset(subRange, superRange)`: Return `true` if the `subRange` range is + entirely contained by the `superRange` range. Note that, since ranges may be non-contiguous, a version might not be greater than a range, less than a range, *or* satisfy a range! For @@ -396,16 +472,95 @@ range, use the `satisfies(version, range)` function. ### Coercion -* `coerce(version)`: Coerces a string to semver if possible - -This aims to provide a very forgiving translation of a non-semver -string to semver. It looks for the first digit in a string, and -consumes all remaining characters which satisfy at least a partial semver -(e.g., `1`, `1.2`, `1.2.3`) up to the max permitted length (256 characters). -Longer versions are simply truncated (`4.6.3.9.2-alpha2` becomes `4.6.3`). -All surrounding text is simply ignored (`v3.4 replaces v3.3.1` becomes `3.4.0`). -Only text which lacks digits will fail coercion (`version one` is not valid). -The maximum length for any semver component considered for coercion is 16 characters; -longer components will be ignored (`10000000000000000.4.7.4` becomes `4.7.4`). -The maximum value for any semver component is `Integer.MAX_SAFE_INTEGER || (2**53 - 1)`; -higher value components are invalid (`9999999999999999.4.7.4` is likely invalid). +* `coerce(version, options)`: Coerces a string to semver if possible + +This aims to provide a very forgiving translation of a non-semver string to +semver. It looks for the first digit in a string, and consumes all +remaining characters which satisfy at least a partial semver (e.g., `1`, +`1.2`, `1.2.3`) up to the max permitted length (256 characters). Longer +versions are simply truncated (`4.6.3.9.2-alpha2` becomes `4.6.3`). All +surrounding text is simply ignored (`v3.4 replaces v3.3.1` becomes +`3.4.0`). Only text which lacks digits will fail coercion (`version one` +is not valid). The maximum length for any semver component considered for +coercion is 16 characters; longer components will be ignored +(`10000000000000000.4.7.4` becomes `4.7.4`). The maximum value for any +semver component is `Number.MAX_SAFE_INTEGER || (2**53 - 1)`; higher value +components are invalid (`9999999999999999.4.7.4` is likely invalid). + +If the `options.rtl` flag is set, then `coerce` will return the right-most +coercible tuple that does not share an ending index with a longer coercible +tuple. For example, `1.2.3.4` will return `2.3.4` in rtl mode, not +`4.0.0`. `1.2.3/4` will return `4.0.0`, because the `4` is not a part of +any other overlapping SemVer tuple. + +### Clean + +* `clean(version)`: Clean a string to be a valid semver if possible + +This will return a cleaned and trimmed semver version. If the provided +version is not valid a null will be returned. This does not work for +ranges. + +ex. +* `s.clean(' = v 2.1.5foo')`: `null` +* `s.clean(' = v 2.1.5foo', { loose: true })`: `'2.1.5-foo'` +* `s.clean(' = v 2.1.5-foo')`: `null` +* `s.clean(' = v 2.1.5-foo', { loose: true })`: `'2.1.5-foo'` +* `s.clean('=v2.1.5')`: `'2.1.5'` +* `s.clean(' =v2.1.5')`: `2.1.5` +* `s.clean(' 2.1.5 ')`: `'2.1.5'` +* `s.clean('~1.0.0')`: `null` + +## Exported Modules + + + +You may pull in just the part of this semver utility that you need, if you +are sensitive to packing and tree-shaking concerns. The main +`require('semver')` export uses getter functions to lazily load the parts +of the API that are used. + +The following modules are available: + +* `require('semver')` +* `require('semver/classes')` +* `require('semver/classes/comparator')` +* `require('semver/classes/range')` +* `require('semver/classes/semver')` +* `require('semver/functions/clean')` +* `require('semver/functions/cmp')` +* `require('semver/functions/coerce')` +* `require('semver/functions/compare')` +* `require('semver/functions/compare-build')` +* `require('semver/functions/compare-loose')` +* `require('semver/functions/diff')` +* `require('semver/functions/eq')` +* `require('semver/functions/gt')` +* `require('semver/functions/gte')` +* `require('semver/functions/inc')` +* `require('semver/functions/lt')` +* `require('semver/functions/lte')` +* `require('semver/functions/major')` +* `require('semver/functions/minor')` +* `require('semver/functions/neq')` +* `require('semver/functions/parse')` +* `require('semver/functions/patch')` +* `require('semver/functions/prerelease')` +* `require('semver/functions/rcompare')` +* `require('semver/functions/rsort')` +* `require('semver/functions/satisfies')` +* `require('semver/functions/sort')` +* `require('semver/functions/valid')` +* `require('semver/ranges/gtr')` +* `require('semver/ranges/intersects')` +* `require('semver/ranges/ltr')` +* `require('semver/ranges/max-satisfying')` +* `require('semver/ranges/min-satisfying')` +* `require('semver/ranges/min-version')` +* `require('semver/ranges/outside')` +* `require('semver/ranges/to-comparators')` +* `require('semver/ranges/valid')` diff --git a/node_modules/ts-jest/node_modules/semver/bin/semver b/node_modules/ts-jest/node_modules/semver/bin/semver deleted file mode 100755 index 801e77f13..000000000 --- a/node_modules/ts-jest/node_modules/semver/bin/semver +++ /dev/null @@ -1,160 +0,0 @@ -#!/usr/bin/env node -// Standalone semver comparison program. -// Exits successfully and prints matching version(s) if -// any supplied version is valid and passes all tests. - -var argv = process.argv.slice(2) - -var versions = [] - -var range = [] - -var inc = null - -var version = require('../package.json').version - -var loose = false - -var includePrerelease = false - -var coerce = false - -var identifier - -var semver = require('../semver') - -var reverse = false - -var options = {} - -main() - -function main () { - if (!argv.length) return help() - while (argv.length) { - var a = argv.shift() - var indexOfEqualSign = a.indexOf('=') - if (indexOfEqualSign !== -1) { - a = a.slice(0, indexOfEqualSign) - argv.unshift(a.slice(indexOfEqualSign + 1)) - } - switch (a) { - case '-rv': case '-rev': case '--rev': case '--reverse': - reverse = true - break - case '-l': case '--loose': - loose = true - break - case '-p': case '--include-prerelease': - includePrerelease = true - break - case '-v': case '--version': - versions.push(argv.shift()) - break - case '-i': case '--inc': case '--increment': - switch (argv[0]) { - case 'major': case 'minor': case 'patch': case 'prerelease': - case 'premajor': case 'preminor': case 'prepatch': - inc = argv.shift() - break - default: - inc = 'patch' - break - } - break - case '--preid': - identifier = argv.shift() - break - case '-r': case '--range': - range.push(argv.shift()) - break - case '-c': case '--coerce': - coerce = true - break - case '-h': case '--help': case '-?': - return help() - default: - versions.push(a) - break - } - } - - var options = { loose: loose, includePrerelease: includePrerelease } - - versions = versions.map(function (v) { - return coerce ? (semver.coerce(v) || { version: v }).version : v - }).filter(function (v) { - return semver.valid(v) - }) - if (!versions.length) return fail() - if (inc && (versions.length !== 1 || range.length)) { return failInc() } - - for (var i = 0, l = range.length; i < l; i++) { - versions = versions.filter(function (v) { - return semver.satisfies(v, range[i], options) - }) - if (!versions.length) return fail() - } - return success(versions) -} - -function failInc () { - console.error('--inc can only be used on a single version with no range') - fail() -} - -function fail () { process.exit(1) } - -function success () { - var compare = reverse ? 'rcompare' : 'compare' - versions.sort(function (a, b) { - return semver[compare](a, b, options) - }).map(function (v) { - return semver.clean(v, options) - }).map(function (v) { - return inc ? semver.inc(v, inc, options, identifier) : v - }).forEach(function (v, i, _) { console.log(v) }) -} - -function help () { - console.log(['SemVer ' + version, - '', - 'A JavaScript implementation of the https://semver.org/ specification', - 'Copyright Isaac Z. Schlueter', - '', - 'Usage: semver [options] [ [...]]', - 'Prints valid versions sorted by SemVer precedence', - '', - 'Options:', - '-r --range ', - ' Print versions that match the specified range.', - '', - '-i --increment []', - ' Increment a version by the specified level. Level can', - ' be one of: major, minor, patch, premajor, preminor,', - " prepatch, or prerelease. Default level is 'patch'.", - ' Only one version may be specified.', - '', - '--preid ', - ' Identifier to be used to prefix premajor, preminor,', - ' prepatch or prerelease version increments.', - '', - '-l --loose', - ' Interpret versions and ranges loosely', - '', - '-p --include-prerelease', - ' Always include prerelease versions in range matching', - '', - '-c --coerce', - ' Coerce a string into SemVer if possible', - ' (does not imply --loose)', - '', - 'Program exits successfully if any valid version satisfies', - 'all supplied ranges, and prints all satisfying versions.', - '', - 'If no satisfying versions are found, then exits failure.', - '', - 'Versions are printed in ascending order, so supplying', - 'multiple versions to the utility will just sort them.' - ].join('\n')) -} diff --git a/node_modules/ts-jest/node_modules/semver/package.json b/node_modules/ts-jest/node_modules/semver/package.json index cc6a3a319..9897accfe 100644 --- a/node_modules/ts-jest/node_modules/semver/package.json +++ b/node_modules/ts-jest/node_modules/semver/package.json @@ -1,64 +1,70 @@ { - "_args": [ - [ - "semver@5.7.0", - "/Users/drew.heavner/Documents/Github/sign-android-release" - ] - ], - "_development": true, - "_from": "semver@5.7.0", - "_id": "semver@5.7.0", + "_from": "semver@7.x", + "_id": "semver@7.3.2", "_inBundle": false, - "_integrity": "sha512-Ya52jSX2u7QKghxeoFGpLwCtGlt7j0oY9DYb5apt9nPlJ42ID+ulTXESnt/qAQcoSERyZ5sl3LDIOw0nAn/5DA==", + "_integrity": "sha512-OrOb32TeeambH6UrhtShmF7CRDqhL6/5XpPNp2DuRH6+9QLw/orhp72j87v8Qa1ScDkvrrBNpZcDejAirJmfXQ==", "_location": "/ts-jest/semver", "_phantomChildren": {}, "_requested": { - "type": "version", + "type": "range", "registry": true, - "raw": "semver@5.7.0", + "raw": "semver@7.x", "name": "semver", "escapedName": "semver", - "rawSpec": "5.7.0", + "rawSpec": "7.x", "saveSpec": null, - "fetchSpec": "5.7.0" + "fetchSpec": "7.x" }, "_requiredBy": [ "/ts-jest" ], - "_resolved": "https://registry.npmjs.org/semver/-/semver-5.7.0.tgz", - "_spec": "5.7.0", - "_where": "/Users/drew.heavner/Documents/Github/sign-android-release", + "_resolved": "https://registry.npmjs.org/semver/-/semver-7.3.2.tgz", + "_shasum": "604962b052b81ed0786aae84389ffba70ffd3938", + "_spec": "semver@7.x", + "_where": "/Users/drew.heavner/Documents/Github/sign-android-release/node_modules/ts-jest", "bin": { - "semver": "./bin/semver" + "semver": "bin/semver.js" }, "bugs": { "url": "https://github.com/npm/node-semver/issues" }, + "bundleDependencies": false, + "deprecated": false, "description": "The semantic version parser used by npm.", "devDependencies": { - "tap": "^13.0.0-rc.18" + "tap": "^14.10.7" + }, + "engines": { + "node": ">=10" }, "files": [ - "bin", + "bin/**/*.js", "range.bnf", - "semver.js" + "classes/**/*.js", + "functions/**/*.js", + "internal/**/*.js", + "ranges/**/*.js", + "index.js", + "preload.js" ], "homepage": "https://github.com/npm/node-semver#readme", "license": "ISC", - "main": "semver.js", + "main": "index.js", "name": "semver", "repository": { "type": "git", "url": "git+https://github.com/npm/node-semver.git" }, "scripts": { - "postpublish": "git push origin --all; git push origin --tags", + "postpublish": "git push origin --follow-tags", "postversion": "npm publish", "preversion": "npm test", + "snap": "tap", "test": "tap" }, "tap": { - "check-coverage": true + "check-coverage": true, + "coverage-map": "map.js" }, - "version": "5.7.0" + "version": "7.3.2" } diff --git a/node_modules/ts-jest/node_modules/semver/semver.js b/node_modules/ts-jest/node_modules/semver/semver.js deleted file mode 100644 index d315d5d68..000000000 --- a/node_modules/ts-jest/node_modules/semver/semver.js +++ /dev/null @@ -1,1483 +0,0 @@ -exports = module.exports = SemVer - -var debug -/* istanbul ignore next */ -if (typeof process === 'object' && - process.env && - process.env.NODE_DEBUG && - /\bsemver\b/i.test(process.env.NODE_DEBUG)) { - debug = function () { - var args = Array.prototype.slice.call(arguments, 0) - args.unshift('SEMVER') - console.log.apply(console, args) - } -} else { - debug = function () {} -} - -// Note: this is the semver.org version of the spec that it implements -// Not necessarily the package version of this code. -exports.SEMVER_SPEC_VERSION = '2.0.0' - -var MAX_LENGTH = 256 -var MAX_SAFE_INTEGER = Number.MAX_SAFE_INTEGER || - /* istanbul ignore next */ 9007199254740991 - -// Max safe segment length for coercion. -var MAX_SAFE_COMPONENT_LENGTH = 16 - -// The actual regexps go on exports.re -var re = exports.re = [] -var src = exports.src = [] -var R = 0 - -// The following Regular Expressions can be used for tokenizing, -// validating, and parsing SemVer version strings. - -// ## Numeric Identifier -// A single `0`, or a non-zero digit followed by zero or more digits. - -var NUMERICIDENTIFIER = R++ -src[NUMERICIDENTIFIER] = '0|[1-9]\\d*' -var NUMERICIDENTIFIERLOOSE = R++ -src[NUMERICIDENTIFIERLOOSE] = '[0-9]+' - -// ## Non-numeric Identifier -// Zero or more digits, followed by a letter or hyphen, and then zero or -// more letters, digits, or hyphens. - -var NONNUMERICIDENTIFIER = R++ -src[NONNUMERICIDENTIFIER] = '\\d*[a-zA-Z-][a-zA-Z0-9-]*' - -// ## Main Version -// Three dot-separated numeric identifiers. - -var MAINVERSION = R++ -src[MAINVERSION] = '(' + src[NUMERICIDENTIFIER] + ')\\.' + - '(' + src[NUMERICIDENTIFIER] + ')\\.' + - '(' + src[NUMERICIDENTIFIER] + ')' - -var MAINVERSIONLOOSE = R++ -src[MAINVERSIONLOOSE] = '(' + src[NUMERICIDENTIFIERLOOSE] + ')\\.' + - '(' + src[NUMERICIDENTIFIERLOOSE] + ')\\.' + - '(' + src[NUMERICIDENTIFIERLOOSE] + ')' - -// ## Pre-release Version Identifier -// A numeric identifier, or a non-numeric identifier. - -var PRERELEASEIDENTIFIER = R++ -src[PRERELEASEIDENTIFIER] = '(?:' + src[NUMERICIDENTIFIER] + - '|' + src[NONNUMERICIDENTIFIER] + ')' - -var PRERELEASEIDENTIFIERLOOSE = R++ -src[PRERELEASEIDENTIFIERLOOSE] = '(?:' + src[NUMERICIDENTIFIERLOOSE] + - '|' + src[NONNUMERICIDENTIFIER] + ')' - -// ## Pre-release Version -// Hyphen, followed by one or more dot-separated pre-release version -// identifiers. - -var PRERELEASE = R++ -src[PRERELEASE] = '(?:-(' + src[PRERELEASEIDENTIFIER] + - '(?:\\.' + src[PRERELEASEIDENTIFIER] + ')*))' - -var PRERELEASELOOSE = R++ -src[PRERELEASELOOSE] = '(?:-?(' + src[PRERELEASEIDENTIFIERLOOSE] + - '(?:\\.' + src[PRERELEASEIDENTIFIERLOOSE] + ')*))' - -// ## Build Metadata Identifier -// Any combination of digits, letters, or hyphens. - -var BUILDIDENTIFIER = R++ -src[BUILDIDENTIFIER] = '[0-9A-Za-z-]+' - -// ## Build Metadata -// Plus sign, followed by one or more period-separated build metadata -// identifiers. - -var BUILD = R++ -src[BUILD] = '(?:\\+(' + src[BUILDIDENTIFIER] + - '(?:\\.' + src[BUILDIDENTIFIER] + ')*))' - -// ## Full Version String -// A main version, followed optionally by a pre-release version and -// build metadata. - -// Note that the only major, minor, patch, and pre-release sections of -// the version string are capturing groups. The build metadata is not a -// capturing group, because it should not ever be used in version -// comparison. - -var FULL = R++ -var FULLPLAIN = 'v?' + src[MAINVERSION] + - src[PRERELEASE] + '?' + - src[BUILD] + '?' - -src[FULL] = '^' + FULLPLAIN + '$' - -// like full, but allows v1.2.3 and =1.2.3, which people do sometimes. -// also, 1.0.0alpha1 (prerelease without the hyphen) which is pretty -// common in the npm registry. -var LOOSEPLAIN = '[v=\\s]*' + src[MAINVERSIONLOOSE] + - src[PRERELEASELOOSE] + '?' + - src[BUILD] + '?' - -var LOOSE = R++ -src[LOOSE] = '^' + LOOSEPLAIN + '$' - -var GTLT = R++ -src[GTLT] = '((?:<|>)?=?)' - -// Something like "2.*" or "1.2.x". -// Note that "x.x" is a valid xRange identifer, meaning "any version" -// Only the first item is strictly required. -var XRANGEIDENTIFIERLOOSE = R++ -src[XRANGEIDENTIFIERLOOSE] = src[NUMERICIDENTIFIERLOOSE] + '|x|X|\\*' -var XRANGEIDENTIFIER = R++ -src[XRANGEIDENTIFIER] = src[NUMERICIDENTIFIER] + '|x|X|\\*' - -var XRANGEPLAIN = R++ -src[XRANGEPLAIN] = '[v=\\s]*(' + src[XRANGEIDENTIFIER] + ')' + - '(?:\\.(' + src[XRANGEIDENTIFIER] + ')' + - '(?:\\.(' + src[XRANGEIDENTIFIER] + ')' + - '(?:' + src[PRERELEASE] + ')?' + - src[BUILD] + '?' + - ')?)?' - -var XRANGEPLAINLOOSE = R++ -src[XRANGEPLAINLOOSE] = '[v=\\s]*(' + src[XRANGEIDENTIFIERLOOSE] + ')' + - '(?:\\.(' + src[XRANGEIDENTIFIERLOOSE] + ')' + - '(?:\\.(' + src[XRANGEIDENTIFIERLOOSE] + ')' + - '(?:' + src[PRERELEASELOOSE] + ')?' + - src[BUILD] + '?' + - ')?)?' - -var XRANGE = R++ -src[XRANGE] = '^' + src[GTLT] + '\\s*' + src[XRANGEPLAIN] + '$' -var XRANGELOOSE = R++ -src[XRANGELOOSE] = '^' + src[GTLT] + '\\s*' + src[XRANGEPLAINLOOSE] + '$' - -// Coercion. -// Extract anything that could conceivably be a part of a valid semver -var COERCE = R++ -src[COERCE] = '(?:^|[^\\d])' + - '(\\d{1,' + MAX_SAFE_COMPONENT_LENGTH + '})' + - '(?:\\.(\\d{1,' + MAX_SAFE_COMPONENT_LENGTH + '}))?' + - '(?:\\.(\\d{1,' + MAX_SAFE_COMPONENT_LENGTH + '}))?' + - '(?:$|[^\\d])' - -// Tilde ranges. -// Meaning is "reasonably at or greater than" -var LONETILDE = R++ -src[LONETILDE] = '(?:~>?)' - -var TILDETRIM = R++ -src[TILDETRIM] = '(\\s*)' + src[LONETILDE] + '\\s+' -re[TILDETRIM] = new RegExp(src[TILDETRIM], 'g') -var tildeTrimReplace = '$1~' - -var TILDE = R++ -src[TILDE] = '^' + src[LONETILDE] + src[XRANGEPLAIN] + '$' -var TILDELOOSE = R++ -src[TILDELOOSE] = '^' + src[LONETILDE] + src[XRANGEPLAINLOOSE] + '$' - -// Caret ranges. -// Meaning is "at least and backwards compatible with" -var LONECARET = R++ -src[LONECARET] = '(?:\\^)' - -var CARETTRIM = R++ -src[CARETTRIM] = '(\\s*)' + src[LONECARET] + '\\s+' -re[CARETTRIM] = new RegExp(src[CARETTRIM], 'g') -var caretTrimReplace = '$1^' - -var CARET = R++ -src[CARET] = '^' + src[LONECARET] + src[XRANGEPLAIN] + '$' -var CARETLOOSE = R++ -src[CARETLOOSE] = '^' + src[LONECARET] + src[XRANGEPLAINLOOSE] + '$' - -// A simple gt/lt/eq thing, or just "" to indicate "any version" -var COMPARATORLOOSE = R++ -src[COMPARATORLOOSE] = '^' + src[GTLT] + '\\s*(' + LOOSEPLAIN + ')$|^$' -var COMPARATOR = R++ -src[COMPARATOR] = '^' + src[GTLT] + '\\s*(' + FULLPLAIN + ')$|^$' - -// An expression to strip any whitespace between the gtlt and the thing -// it modifies, so that `> 1.2.3` ==> `>1.2.3` -var COMPARATORTRIM = R++ -src[COMPARATORTRIM] = '(\\s*)' + src[GTLT] + - '\\s*(' + LOOSEPLAIN + '|' + src[XRANGEPLAIN] + ')' - -// this one has to use the /g flag -re[COMPARATORTRIM] = new RegExp(src[COMPARATORTRIM], 'g') -var comparatorTrimReplace = '$1$2$3' - -// Something like `1.2.3 - 1.2.4` -// Note that these all use the loose form, because they'll be -// checked against either the strict or loose comparator form -// later. -var HYPHENRANGE = R++ -src[HYPHENRANGE] = '^\\s*(' + src[XRANGEPLAIN] + ')' + - '\\s+-\\s+' + - '(' + src[XRANGEPLAIN] + ')' + - '\\s*$' - -var HYPHENRANGELOOSE = R++ -src[HYPHENRANGELOOSE] = '^\\s*(' + src[XRANGEPLAINLOOSE] + ')' + - '\\s+-\\s+' + - '(' + src[XRANGEPLAINLOOSE] + ')' + - '\\s*$' - -// Star ranges basically just allow anything at all. -var STAR = R++ -src[STAR] = '(<|>)?=?\\s*\\*' - -// Compile to actual regexp objects. -// All are flag-free, unless they were created above with a flag. -for (var i = 0; i < R; i++) { - debug(i, src[i]) - if (!re[i]) { - re[i] = new RegExp(src[i]) - } -} - -exports.parse = parse -function parse (version, options) { - if (!options || typeof options !== 'object') { - options = { - loose: !!options, - includePrerelease: false - } - } - - if (version instanceof SemVer) { - return version - } - - if (typeof version !== 'string') { - return null - } - - if (version.length > MAX_LENGTH) { - return null - } - - var r = options.loose ? re[LOOSE] : re[FULL] - if (!r.test(version)) { - return null - } - - try { - return new SemVer(version, options) - } catch (er) { - return null - } -} - -exports.valid = valid -function valid (version, options) { - var v = parse(version, options) - return v ? v.version : null -} - -exports.clean = clean -function clean (version, options) { - var s = parse(version.trim().replace(/^[=v]+/, ''), options) - return s ? s.version : null -} - -exports.SemVer = SemVer - -function SemVer (version, options) { - if (!options || typeof options !== 'object') { - options = { - loose: !!options, - includePrerelease: false - } - } - if (version instanceof SemVer) { - if (version.loose === options.loose) { - return version - } else { - version = version.version - } - } else if (typeof version !== 'string') { - throw new TypeError('Invalid Version: ' + version) - } - - if (version.length > MAX_LENGTH) { - throw new TypeError('version is longer than ' + MAX_LENGTH + ' characters') - } - - if (!(this instanceof SemVer)) { - return new SemVer(version, options) - } - - debug('SemVer', version, options) - this.options = options - this.loose = !!options.loose - - var m = version.trim().match(options.loose ? re[LOOSE] : re[FULL]) - - if (!m) { - throw new TypeError('Invalid Version: ' + version) - } - - this.raw = version - - // these are actually numbers - this.major = +m[1] - this.minor = +m[2] - this.patch = +m[3] - - if (this.major > MAX_SAFE_INTEGER || this.major < 0) { - throw new TypeError('Invalid major version') - } - - if (this.minor > MAX_SAFE_INTEGER || this.minor < 0) { - throw new TypeError('Invalid minor version') - } - - if (this.patch > MAX_SAFE_INTEGER || this.patch < 0) { - throw new TypeError('Invalid patch version') - } - - // numberify any prerelease numeric ids - if (!m[4]) { - this.prerelease = [] - } else { - this.prerelease = m[4].split('.').map(function (id) { - if (/^[0-9]+$/.test(id)) { - var num = +id - if (num >= 0 && num < MAX_SAFE_INTEGER) { - return num - } - } - return id - }) - } - - this.build = m[5] ? m[5].split('.') : [] - this.format() -} - -SemVer.prototype.format = function () { - this.version = this.major + '.' + this.minor + '.' + this.patch - if (this.prerelease.length) { - this.version += '-' + this.prerelease.join('.') - } - return this.version -} - -SemVer.prototype.toString = function () { - return this.version -} - -SemVer.prototype.compare = function (other) { - debug('SemVer.compare', this.version, this.options, other) - if (!(other instanceof SemVer)) { - other = new SemVer(other, this.options) - } - - return this.compareMain(other) || this.comparePre(other) -} - -SemVer.prototype.compareMain = function (other) { - if (!(other instanceof SemVer)) { - other = new SemVer(other, this.options) - } - - return compareIdentifiers(this.major, other.major) || - compareIdentifiers(this.minor, other.minor) || - compareIdentifiers(this.patch, other.patch) -} - -SemVer.prototype.comparePre = function (other) { - if (!(other instanceof SemVer)) { - other = new SemVer(other, this.options) - } - - // NOT having a prerelease is > having one - if (this.prerelease.length && !other.prerelease.length) { - return -1 - } else if (!this.prerelease.length && other.prerelease.length) { - return 1 - } else if (!this.prerelease.length && !other.prerelease.length) { - return 0 - } - - var i = 0 - do { - var a = this.prerelease[i] - var b = other.prerelease[i] - debug('prerelease compare', i, a, b) - if (a === undefined && b === undefined) { - return 0 - } else if (b === undefined) { - return 1 - } else if (a === undefined) { - return -1 - } else if (a === b) { - continue - } else { - return compareIdentifiers(a, b) - } - } while (++i) -} - -// preminor will bump the version up to the next minor release, and immediately -// down to pre-release. premajor and prepatch work the same way. -SemVer.prototype.inc = function (release, identifier) { - switch (release) { - case 'premajor': - this.prerelease.length = 0 - this.patch = 0 - this.minor = 0 - this.major++ - this.inc('pre', identifier) - break - case 'preminor': - this.prerelease.length = 0 - this.patch = 0 - this.minor++ - this.inc('pre', identifier) - break - case 'prepatch': - // If this is already a prerelease, it will bump to the next version - // drop any prereleases that might already exist, since they are not - // relevant at this point. - this.prerelease.length = 0 - this.inc('patch', identifier) - this.inc('pre', identifier) - break - // If the input is a non-prerelease version, this acts the same as - // prepatch. - case 'prerelease': - if (this.prerelease.length === 0) { - this.inc('patch', identifier) - } - this.inc('pre', identifier) - break - - case 'major': - // If this is a pre-major version, bump up to the same major version. - // Otherwise increment major. - // 1.0.0-5 bumps to 1.0.0 - // 1.1.0 bumps to 2.0.0 - if (this.minor !== 0 || - this.patch !== 0 || - this.prerelease.length === 0) { - this.major++ - } - this.minor = 0 - this.patch = 0 - this.prerelease = [] - break - case 'minor': - // If this is a pre-minor version, bump up to the same minor version. - // Otherwise increment minor. - // 1.2.0-5 bumps to 1.2.0 - // 1.2.1 bumps to 1.3.0 - if (this.patch !== 0 || this.prerelease.length === 0) { - this.minor++ - } - this.patch = 0 - this.prerelease = [] - break - case 'patch': - // If this is not a pre-release version, it will increment the patch. - // If it is a pre-release it will bump up to the same patch version. - // 1.2.0-5 patches to 1.2.0 - // 1.2.0 patches to 1.2.1 - if (this.prerelease.length === 0) { - this.patch++ - } - this.prerelease = [] - break - // This probably shouldn't be used publicly. - // 1.0.0 "pre" would become 1.0.0-0 which is the wrong direction. - case 'pre': - if (this.prerelease.length === 0) { - this.prerelease = [0] - } else { - var i = this.prerelease.length - while (--i >= 0) { - if (typeof this.prerelease[i] === 'number') { - this.prerelease[i]++ - i = -2 - } - } - if (i === -1) { - // didn't increment anything - this.prerelease.push(0) - } - } - if (identifier) { - // 1.2.0-beta.1 bumps to 1.2.0-beta.2, - // 1.2.0-beta.fooblz or 1.2.0-beta bumps to 1.2.0-beta.0 - if (this.prerelease[0] === identifier) { - if (isNaN(this.prerelease[1])) { - this.prerelease = [identifier, 0] - } - } else { - this.prerelease = [identifier, 0] - } - } - break - - default: - throw new Error('invalid increment argument: ' + release) - } - this.format() - this.raw = this.version - return this -} - -exports.inc = inc -function inc (version, release, loose, identifier) { - if (typeof (loose) === 'string') { - identifier = loose - loose = undefined - } - - try { - return new SemVer(version, loose).inc(release, identifier).version - } catch (er) { - return null - } -} - -exports.diff = diff -function diff (version1, version2) { - if (eq(version1, version2)) { - return null - } else { - var v1 = parse(version1) - var v2 = parse(version2) - var prefix = '' - if (v1.prerelease.length || v2.prerelease.length) { - prefix = 'pre' - var defaultResult = 'prerelease' - } - for (var key in v1) { - if (key === 'major' || key === 'minor' || key === 'patch') { - if (v1[key] !== v2[key]) { - return prefix + key - } - } - } - return defaultResult // may be undefined - } -} - -exports.compareIdentifiers = compareIdentifiers - -var numeric = /^[0-9]+$/ -function compareIdentifiers (a, b) { - var anum = numeric.test(a) - var bnum = numeric.test(b) - - if (anum && bnum) { - a = +a - b = +b - } - - return a === b ? 0 - : (anum && !bnum) ? -1 - : (bnum && !anum) ? 1 - : a < b ? -1 - : 1 -} - -exports.rcompareIdentifiers = rcompareIdentifiers -function rcompareIdentifiers (a, b) { - return compareIdentifiers(b, a) -} - -exports.major = major -function major (a, loose) { - return new SemVer(a, loose).major -} - -exports.minor = minor -function minor (a, loose) { - return new SemVer(a, loose).minor -} - -exports.patch = patch -function patch (a, loose) { - return new SemVer(a, loose).patch -} - -exports.compare = compare -function compare (a, b, loose) { - return new SemVer(a, loose).compare(new SemVer(b, loose)) -} - -exports.compareLoose = compareLoose -function compareLoose (a, b) { - return compare(a, b, true) -} - -exports.rcompare = rcompare -function rcompare (a, b, loose) { - return compare(b, a, loose) -} - -exports.sort = sort -function sort (list, loose) { - return list.sort(function (a, b) { - return exports.compare(a, b, loose) - }) -} - -exports.rsort = rsort -function rsort (list, loose) { - return list.sort(function (a, b) { - return exports.rcompare(a, b, loose) - }) -} - -exports.gt = gt -function gt (a, b, loose) { - return compare(a, b, loose) > 0 -} - -exports.lt = lt -function lt (a, b, loose) { - return compare(a, b, loose) < 0 -} - -exports.eq = eq -function eq (a, b, loose) { - return compare(a, b, loose) === 0 -} - -exports.neq = neq -function neq (a, b, loose) { - return compare(a, b, loose) !== 0 -} - -exports.gte = gte -function gte (a, b, loose) { - return compare(a, b, loose) >= 0 -} - -exports.lte = lte -function lte (a, b, loose) { - return compare(a, b, loose) <= 0 -} - -exports.cmp = cmp -function cmp (a, op, b, loose) { - switch (op) { - case '===': - if (typeof a === 'object') - a = a.version - if (typeof b === 'object') - b = b.version - return a === b - - case '!==': - if (typeof a === 'object') - a = a.version - if (typeof b === 'object') - b = b.version - return a !== b - - case '': - case '=': - case '==': - return eq(a, b, loose) - - case '!=': - return neq(a, b, loose) - - case '>': - return gt(a, b, loose) - - case '>=': - return gte(a, b, loose) - - case '<': - return lt(a, b, loose) - - case '<=': - return lte(a, b, loose) - - default: - throw new TypeError('Invalid operator: ' + op) - } -} - -exports.Comparator = Comparator -function Comparator (comp, options) { - if (!options || typeof options !== 'object') { - options = { - loose: !!options, - includePrerelease: false - } - } - - if (comp instanceof Comparator) { - if (comp.loose === !!options.loose) { - return comp - } else { - comp = comp.value - } - } - - if (!(this instanceof Comparator)) { - return new Comparator(comp, options) - } - - debug('comparator', comp, options) - this.options = options - this.loose = !!options.loose - this.parse(comp) - - if (this.semver === ANY) { - this.value = '' - } else { - this.value = this.operator + this.semver.version - } - - debug('comp', this) -} - -var ANY = {} -Comparator.prototype.parse = function (comp) { - var r = this.options.loose ? re[COMPARATORLOOSE] : re[COMPARATOR] - var m = comp.match(r) - - if (!m) { - throw new TypeError('Invalid comparator: ' + comp) - } - - this.operator = m[1] - if (this.operator === '=') { - this.operator = '' - } - - // if it literally is just '>' or '' then allow anything. - if (!m[2]) { - this.semver = ANY - } else { - this.semver = new SemVer(m[2], this.options.loose) - } -} - -Comparator.prototype.toString = function () { - return this.value -} - -Comparator.prototype.test = function (version) { - debug('Comparator.test', version, this.options.loose) - - if (this.semver === ANY) { - return true - } - - if (typeof version === 'string') { - version = new SemVer(version, this.options) - } - - return cmp(version, this.operator, this.semver, this.options) -} - -Comparator.prototype.intersects = function (comp, options) { - if (!(comp instanceof Comparator)) { - throw new TypeError('a Comparator is required') - } - - if (!options || typeof options !== 'object') { - options = { - loose: !!options, - includePrerelease: false - } - } - - var rangeTmp - - if (this.operator === '') { - rangeTmp = new Range(comp.value, options) - return satisfies(this.value, rangeTmp, options) - } else if (comp.operator === '') { - rangeTmp = new Range(this.value, options) - return satisfies(comp.semver, rangeTmp, options) - } - - var sameDirectionIncreasing = - (this.operator === '>=' || this.operator === '>') && - (comp.operator === '>=' || comp.operator === '>') - var sameDirectionDecreasing = - (this.operator === '<=' || this.operator === '<') && - (comp.operator === '<=' || comp.operator === '<') - var sameSemVer = this.semver.version === comp.semver.version - var differentDirectionsInclusive = - (this.operator === '>=' || this.operator === '<=') && - (comp.operator === '>=' || comp.operator === '<=') - var oppositeDirectionsLessThan = - cmp(this.semver, '<', comp.semver, options) && - ((this.operator === '>=' || this.operator === '>') && - (comp.operator === '<=' || comp.operator === '<')) - var oppositeDirectionsGreaterThan = - cmp(this.semver, '>', comp.semver, options) && - ((this.operator === '<=' || this.operator === '<') && - (comp.operator === '>=' || comp.operator === '>')) - - return sameDirectionIncreasing || sameDirectionDecreasing || - (sameSemVer && differentDirectionsInclusive) || - oppositeDirectionsLessThan || oppositeDirectionsGreaterThan -} - -exports.Range = Range -function Range (range, options) { - if (!options || typeof options !== 'object') { - options = { - loose: !!options, - includePrerelease: false - } - } - - if (range instanceof Range) { - if (range.loose === !!options.loose && - range.includePrerelease === !!options.includePrerelease) { - return range - } else { - return new Range(range.raw, options) - } - } - - if (range instanceof Comparator) { - return new Range(range.value, options) - } - - if (!(this instanceof Range)) { - return new Range(range, options) - } - - this.options = options - this.loose = !!options.loose - this.includePrerelease = !!options.includePrerelease - - // First, split based on boolean or || - this.raw = range - this.set = range.split(/\s*\|\|\s*/).map(function (range) { - return this.parseRange(range.trim()) - }, this).filter(function (c) { - // throw out any that are not relevant for whatever reason - return c.length - }) - - if (!this.set.length) { - throw new TypeError('Invalid SemVer Range: ' + range) - } - - this.format() -} - -Range.prototype.format = function () { - this.range = this.set.map(function (comps) { - return comps.join(' ').trim() - }).join('||').trim() - return this.range -} - -Range.prototype.toString = function () { - return this.range -} - -Range.prototype.parseRange = function (range) { - var loose = this.options.loose - range = range.trim() - // `1.2.3 - 1.2.4` => `>=1.2.3 <=1.2.4` - var hr = loose ? re[HYPHENRANGELOOSE] : re[HYPHENRANGE] - range = range.replace(hr, hyphenReplace) - debug('hyphen replace', range) - // `> 1.2.3 < 1.2.5` => `>1.2.3 <1.2.5` - range = range.replace(re[COMPARATORTRIM], comparatorTrimReplace) - debug('comparator trim', range, re[COMPARATORTRIM]) - - // `~ 1.2.3` => `~1.2.3` - range = range.replace(re[TILDETRIM], tildeTrimReplace) - - // `^ 1.2.3` => `^1.2.3` - range = range.replace(re[CARETTRIM], caretTrimReplace) - - // normalize spaces - range = range.split(/\s+/).join(' ') - - // At this point, the range is completely trimmed and - // ready to be split into comparators. - - var compRe = loose ? re[COMPARATORLOOSE] : re[COMPARATOR] - var set = range.split(' ').map(function (comp) { - return parseComparator(comp, this.options) - }, this).join(' ').split(/\s+/) - if (this.options.loose) { - // in loose mode, throw out any that are not valid comparators - set = set.filter(function (comp) { - return !!comp.match(compRe) - }) - } - set = set.map(function (comp) { - return new Comparator(comp, this.options) - }, this) - - return set -} - -Range.prototype.intersects = function (range, options) { - if (!(range instanceof Range)) { - throw new TypeError('a Range is required') - } - - return this.set.some(function (thisComparators) { - return thisComparators.every(function (thisComparator) { - return range.set.some(function (rangeComparators) { - return rangeComparators.every(function (rangeComparator) { - return thisComparator.intersects(rangeComparator, options) - }) - }) - }) - }) -} - -// Mostly just for testing and legacy API reasons -exports.toComparators = toComparators -function toComparators (range, options) { - return new Range(range, options).set.map(function (comp) { - return comp.map(function (c) { - return c.value - }).join(' ').trim().split(' ') - }) -} - -// comprised of xranges, tildes, stars, and gtlt's at this point. -// already replaced the hyphen ranges -// turn into a set of JUST comparators. -function parseComparator (comp, options) { - debug('comp', comp, options) - comp = replaceCarets(comp, options) - debug('caret', comp) - comp = replaceTildes(comp, options) - debug('tildes', comp) - comp = replaceXRanges(comp, options) - debug('xrange', comp) - comp = replaceStars(comp, options) - debug('stars', comp) - return comp -} - -function isX (id) { - return !id || id.toLowerCase() === 'x' || id === '*' -} - -// ~, ~> --> * (any, kinda silly) -// ~2, ~2.x, ~2.x.x, ~>2, ~>2.x ~>2.x.x --> >=2.0.0 <3.0.0 -// ~2.0, ~2.0.x, ~>2.0, ~>2.0.x --> >=2.0.0 <2.1.0 -// ~1.2, ~1.2.x, ~>1.2, ~>1.2.x --> >=1.2.0 <1.3.0 -// ~1.2.3, ~>1.2.3 --> >=1.2.3 <1.3.0 -// ~1.2.0, ~>1.2.0 --> >=1.2.0 <1.3.0 -function replaceTildes (comp, options) { - return comp.trim().split(/\s+/).map(function (comp) { - return replaceTilde(comp, options) - }).join(' ') -} - -function replaceTilde (comp, options) { - var r = options.loose ? re[TILDELOOSE] : re[TILDE] - return comp.replace(r, function (_, M, m, p, pr) { - debug('tilde', comp, _, M, m, p, pr) - var ret - - if (isX(M)) { - ret = '' - } else if (isX(m)) { - ret = '>=' + M + '.0.0 <' + (+M + 1) + '.0.0' - } else if (isX(p)) { - // ~1.2 == >=1.2.0 <1.3.0 - ret = '>=' + M + '.' + m + '.0 <' + M + '.' + (+m + 1) + '.0' - } else if (pr) { - debug('replaceTilde pr', pr) - ret = '>=' + M + '.' + m + '.' + p + '-' + pr + - ' <' + M + '.' + (+m + 1) + '.0' - } else { - // ~1.2.3 == >=1.2.3 <1.3.0 - ret = '>=' + M + '.' + m + '.' + p + - ' <' + M + '.' + (+m + 1) + '.0' - } - - debug('tilde return', ret) - return ret - }) -} - -// ^ --> * (any, kinda silly) -// ^2, ^2.x, ^2.x.x --> >=2.0.0 <3.0.0 -// ^2.0, ^2.0.x --> >=2.0.0 <3.0.0 -// ^1.2, ^1.2.x --> >=1.2.0 <2.0.0 -// ^1.2.3 --> >=1.2.3 <2.0.0 -// ^1.2.0 --> >=1.2.0 <2.0.0 -function replaceCarets (comp, options) { - return comp.trim().split(/\s+/).map(function (comp) { - return replaceCaret(comp, options) - }).join(' ') -} - -function replaceCaret (comp, options) { - debug('caret', comp, options) - var r = options.loose ? re[CARETLOOSE] : re[CARET] - return comp.replace(r, function (_, M, m, p, pr) { - debug('caret', comp, _, M, m, p, pr) - var ret - - if (isX(M)) { - ret = '' - } else if (isX(m)) { - ret = '>=' + M + '.0.0 <' + (+M + 1) + '.0.0' - } else if (isX(p)) { - if (M === '0') { - ret = '>=' + M + '.' + m + '.0 <' + M + '.' + (+m + 1) + '.0' - } else { - ret = '>=' + M + '.' + m + '.0 <' + (+M + 1) + '.0.0' - } - } else if (pr) { - debug('replaceCaret pr', pr) - if (M === '0') { - if (m === '0') { - ret = '>=' + M + '.' + m + '.' + p + '-' + pr + - ' <' + M + '.' + m + '.' + (+p + 1) - } else { - ret = '>=' + M + '.' + m + '.' + p + '-' + pr + - ' <' + M + '.' + (+m + 1) + '.0' - } - } else { - ret = '>=' + M + '.' + m + '.' + p + '-' + pr + - ' <' + (+M + 1) + '.0.0' - } - } else { - debug('no pr') - if (M === '0') { - if (m === '0') { - ret = '>=' + M + '.' + m + '.' + p + - ' <' + M + '.' + m + '.' + (+p + 1) - } else { - ret = '>=' + M + '.' + m + '.' + p + - ' <' + M + '.' + (+m + 1) + '.0' - } - } else { - ret = '>=' + M + '.' + m + '.' + p + - ' <' + (+M + 1) + '.0.0' - } - } - - debug('caret return', ret) - return ret - }) -} - -function replaceXRanges (comp, options) { - debug('replaceXRanges', comp, options) - return comp.split(/\s+/).map(function (comp) { - return replaceXRange(comp, options) - }).join(' ') -} - -function replaceXRange (comp, options) { - comp = comp.trim() - var r = options.loose ? re[XRANGELOOSE] : re[XRANGE] - return comp.replace(r, function (ret, gtlt, M, m, p, pr) { - debug('xRange', comp, ret, gtlt, M, m, p, pr) - var xM = isX(M) - var xm = xM || isX(m) - var xp = xm || isX(p) - var anyX = xp - - if (gtlt === '=' && anyX) { - gtlt = '' - } - - if (xM) { - if (gtlt === '>' || gtlt === '<') { - // nothing is allowed - ret = '<0.0.0' - } else { - // nothing is forbidden - ret = '*' - } - } else if (gtlt && anyX) { - // we know patch is an x, because we have any x at all. - // replace X with 0 - if (xm) { - m = 0 - } - p = 0 - - if (gtlt === '>') { - // >1 => >=2.0.0 - // >1.2 => >=1.3.0 - // >1.2.3 => >= 1.2.4 - gtlt = '>=' - if (xm) { - M = +M + 1 - m = 0 - p = 0 - } else { - m = +m + 1 - p = 0 - } - } else if (gtlt === '<=') { - // <=0.7.x is actually <0.8.0, since any 0.7.x should - // pass. Similarly, <=7.x is actually <8.0.0, etc. - gtlt = '<' - if (xm) { - M = +M + 1 - } else { - m = +m + 1 - } - } - - ret = gtlt + M + '.' + m + '.' + p - } else if (xm) { - ret = '>=' + M + '.0.0 <' + (+M + 1) + '.0.0' - } else if (xp) { - ret = '>=' + M + '.' + m + '.0 <' + M + '.' + (+m + 1) + '.0' - } - - debug('xRange return', ret) - - return ret - }) -} - -// Because * is AND-ed with everything else in the comparator, -// and '' means "any version", just remove the *s entirely. -function replaceStars (comp, options) { - debug('replaceStars', comp, options) - // Looseness is ignored here. star is always as loose as it gets! - return comp.trim().replace(re[STAR], '') -} - -// This function is passed to string.replace(re[HYPHENRANGE]) -// M, m, patch, prerelease, build -// 1.2 - 3.4.5 => >=1.2.0 <=3.4.5 -// 1.2.3 - 3.4 => >=1.2.0 <3.5.0 Any 3.4.x will do -// 1.2 - 3.4 => >=1.2.0 <3.5.0 -function hyphenReplace ($0, - from, fM, fm, fp, fpr, fb, - to, tM, tm, tp, tpr, tb) { - if (isX(fM)) { - from = '' - } else if (isX(fm)) { - from = '>=' + fM + '.0.0' - } else if (isX(fp)) { - from = '>=' + fM + '.' + fm + '.0' - } else { - from = '>=' + from - } - - if (isX(tM)) { - to = '' - } else if (isX(tm)) { - to = '<' + (+tM + 1) + '.0.0' - } else if (isX(tp)) { - to = '<' + tM + '.' + (+tm + 1) + '.0' - } else if (tpr) { - to = '<=' + tM + '.' + tm + '.' + tp + '-' + tpr - } else { - to = '<=' + to - } - - return (from + ' ' + to).trim() -} - -// if ANY of the sets match ALL of its comparators, then pass -Range.prototype.test = function (version) { - if (!version) { - return false - } - - if (typeof version === 'string') { - version = new SemVer(version, this.options) - } - - for (var i = 0; i < this.set.length; i++) { - if (testSet(this.set[i], version, this.options)) { - return true - } - } - return false -} - -function testSet (set, version, options) { - for (var i = 0; i < set.length; i++) { - if (!set[i].test(version)) { - return false - } - } - - if (version.prerelease.length && !options.includePrerelease) { - // Find the set of versions that are allowed to have prereleases - // For example, ^1.2.3-pr.1 desugars to >=1.2.3-pr.1 <2.0.0 - // That should allow `1.2.3-pr.2` to pass. - // However, `1.2.4-alpha.notready` should NOT be allowed, - // even though it's within the range set by the comparators. - for (i = 0; i < set.length; i++) { - debug(set[i].semver) - if (set[i].semver === ANY) { - continue - } - - if (set[i].semver.prerelease.length > 0) { - var allowed = set[i].semver - if (allowed.major === version.major && - allowed.minor === version.minor && - allowed.patch === version.patch) { - return true - } - } - } - - // Version has a -pre, but it's not one of the ones we like. - return false - } - - return true -} - -exports.satisfies = satisfies -function satisfies (version, range, options) { - try { - range = new Range(range, options) - } catch (er) { - return false - } - return range.test(version) -} - -exports.maxSatisfying = maxSatisfying -function maxSatisfying (versions, range, options) { - var max = null - var maxSV = null - try { - var rangeObj = new Range(range, options) - } catch (er) { - return null - } - versions.forEach(function (v) { - if (rangeObj.test(v)) { - // satisfies(v, range, options) - if (!max || maxSV.compare(v) === -1) { - // compare(max, v, true) - max = v - maxSV = new SemVer(max, options) - } - } - }) - return max -} - -exports.minSatisfying = minSatisfying -function minSatisfying (versions, range, options) { - var min = null - var minSV = null - try { - var rangeObj = new Range(range, options) - } catch (er) { - return null - } - versions.forEach(function (v) { - if (rangeObj.test(v)) { - // satisfies(v, range, options) - if (!min || minSV.compare(v) === 1) { - // compare(min, v, true) - min = v - minSV = new SemVer(min, options) - } - } - }) - return min -} - -exports.minVersion = minVersion -function minVersion (range, loose) { - range = new Range(range, loose) - - var minver = new SemVer('0.0.0') - if (range.test(minver)) { - return minver - } - - minver = new SemVer('0.0.0-0') - if (range.test(minver)) { - return minver - } - - minver = null - for (var i = 0; i < range.set.length; ++i) { - var comparators = range.set[i] - - comparators.forEach(function (comparator) { - // Clone to avoid manipulating the comparator's semver object. - var compver = new SemVer(comparator.semver.version) - switch (comparator.operator) { - case '>': - if (compver.prerelease.length === 0) { - compver.patch++ - } else { - compver.prerelease.push(0) - } - compver.raw = compver.format() - /* fallthrough */ - case '': - case '>=': - if (!minver || gt(minver, compver)) { - minver = compver - } - break - case '<': - case '<=': - /* Ignore maximum versions */ - break - /* istanbul ignore next */ - default: - throw new Error('Unexpected operation: ' + comparator.operator) - } - }) - } - - if (minver && range.test(minver)) { - return minver - } - - return null -} - -exports.validRange = validRange -function validRange (range, options) { - try { - // Return '*' instead of '' so that truthiness works. - // This will throw if it's invalid anyway - return new Range(range, options).range || '*' - } catch (er) { - return null - } -} - -// Determine if version is less than all the versions possible in the range -exports.ltr = ltr -function ltr (version, range, options) { - return outside(version, range, '<', options) -} - -// Determine if version is greater than all the versions possible in the range. -exports.gtr = gtr -function gtr (version, range, options) { - return outside(version, range, '>', options) -} - -exports.outside = outside -function outside (version, range, hilo, options) { - version = new SemVer(version, options) - range = new Range(range, options) - - var gtfn, ltefn, ltfn, comp, ecomp - switch (hilo) { - case '>': - gtfn = gt - ltefn = lte - ltfn = lt - comp = '>' - ecomp = '>=' - break - case '<': - gtfn = lt - ltefn = gte - ltfn = gt - comp = '<' - ecomp = '<=' - break - default: - throw new TypeError('Must provide a hilo val of "<" or ">"') - } - - // If it satisifes the range it is not outside - if (satisfies(version, range, options)) { - return false - } - - // From now on, variable terms are as if we're in "gtr" mode. - // but note that everything is flipped for the "ltr" function. - - for (var i = 0; i < range.set.length; ++i) { - var comparators = range.set[i] - - var high = null - var low = null - - comparators.forEach(function (comparator) { - if (comparator.semver === ANY) { - comparator = new Comparator('>=0.0.0') - } - high = high || comparator - low = low || comparator - if (gtfn(comparator.semver, high.semver, options)) { - high = comparator - } else if (ltfn(comparator.semver, low.semver, options)) { - low = comparator - } - }) - - // If the edge version comparator has a operator then our version - // isn't outside it - if (high.operator === comp || high.operator === ecomp) { - return false - } - - // If the lowest version comparator has an operator and our version - // is less than it then it isn't higher than the range - if ((!low.operator || low.operator === comp) && - ltefn(version, low.semver)) { - return false - } else if (low.operator === ecomp && ltfn(version, low.semver)) { - return false - } - } - return true -} - -exports.prerelease = prerelease -function prerelease (version, options) { - var parsed = parse(version, options) - return (parsed && parsed.prerelease.length) ? parsed.prerelease : null -} - -exports.intersects = intersects -function intersects (r1, r2, options) { - r1 = new Range(r1, options) - r2 = new Range(r2, options) - return r1.intersects(r2) -} - -exports.coerce = coerce -function coerce (version) { - if (version instanceof SemVer) { - return version - } - - if (typeof version !== 'string') { - return null - } - - var match = version.match(re[COERCE]) - - if (match == null) { - return null - } - - return parse(match[1] + - '.' + (match[2] || '0') + - '.' + (match[3] || '0')) -} diff --git a/node_modules/ts-jest/node_modules/yargs-parser/CHANGELOG.md b/node_modules/ts-jest/node_modules/yargs-parser/CHANGELOG.md index 45bb0e4c4..c85e4d84a 100644 --- a/node_modules/ts-jest/node_modules/yargs-parser/CHANGELOG.md +++ b/node_modules/ts-jest/node_modules/yargs-parser/CHANGELOG.md @@ -1,353 +1,226 @@ -# Change Log +# Changelog All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines. - -# [10.1.0](https://github.com/yargs/yargs-parser/compare/v10.0.0...v10.1.0) (2018-06-29) - - -### Features - -* add `set-placeholder-key` configuration ([#123](https://github.com/yargs/yargs-parser/issues/123)) ([19386ee](https://github.com/yargs/yargs-parser/commit/19386ee)) - - - - -# [10.0.0](https://github.com/yargs/yargs-parser/compare/v9.0.2...v10.0.0) (2018-04-04) +### [20.2.4](https://www.github.com/yargs/yargs-parser/compare/v20.2.3...v20.2.4) (2020-11-09) ### Bug Fixes -* do not set boolean flags if not defined in `argv` ([#119](https://github.com/yargs/yargs-parser/issues/119)) ([f6e6599](https://github.com/yargs/yargs-parser/commit/f6e6599)) - - -### BREAKING CHANGES - -* `boolean` flags defined without a `default` value will now behave like other option type and won't be set in the parsed results when the user doesn't set the corresponding CLI arg. - -Previous behavior: -```js -var parse = require('yargs-parser'); +* **deno:** address import issues in Deno ([#339](https://www.github.com/yargs/yargs-parser/issues/339)) ([3b54e5e](https://www.github.com/yargs/yargs-parser/commit/3b54e5eef6e9a7b7c6eec7c12bab3ba3b8ba8306)) -parse('--flag', {boolean: ['flag']}); -// => { _: [], flag: true } +### [20.2.3](https://www.github.com/yargs/yargs-parser/compare/v20.2.2...v20.2.3) (2020-10-16) -parse('--no-flag', {boolean: ['flag']}); -// => { _: [], flag: false } - -parse('', {boolean: ['flag']}); -// => { _: [], flag: false } -``` - -New behavior: -```js -var parse = require('yargs-parser'); - -parse('--flag', {boolean: ['flag']}); -// => { _: [], flag: true } - -parse('--no-flag', {boolean: ['flag']}); -// => { _: [], flag: false } - -parse('', {boolean: ['flag']}); -// => { _: [] } => flag not set similarly to other option type -``` +### Bug Fixes +* **exports:** node 13.0 and 13.1 require the dotted object form _with_ a string fallback ([#336](https://www.github.com/yargs/yargs-parser/issues/336)) ([3ae7242](https://www.github.com/yargs/yargs-parser/commit/3ae7242040ff876d28dabded60ac226e00150c88)) - -## [9.0.2](https://github.com/yargs/yargs-parser/compare/v9.0.1...v9.0.2) (2018-01-20) +### [20.2.2](https://www.github.com/yargs/yargs-parser/compare/v20.2.1...v20.2.2) (2020-10-14) ### Bug Fixes -* nargs was still aggressively consuming too many arguments ([9b28aad](https://github.com/yargs/yargs-parser/commit/9b28aad)) +* **exports:** node 13.0-13.6 require a string fallback ([#333](https://www.github.com/yargs/yargs-parser/issues/333)) ([291aeda](https://www.github.com/yargs/yargs-parser/commit/291aeda06b685b7a015d83bdf2558e180b37388d)) - - - -## [9.0.1](https://github.com/yargs/yargs-parser/compare/v9.0.0...v9.0.1) (2018-01-20) +### [20.2.1](https://www.github.com/yargs/yargs-parser/compare/v20.2.0...v20.2.1) (2020-10-01) ### Bug Fixes -* nargs was consuming too many arguments ([4fef206](https://github.com/yargs/yargs-parser/commit/4fef206)) - +* **deno:** update types for deno ^1.4.0 ([#330](https://www.github.com/yargs/yargs-parser/issues/330)) ([0ab92e5](https://www.github.com/yargs/yargs-parser/commit/0ab92e50b090f11196334c048c9c92cecaddaf56)) - - -# [9.0.0](https://github.com/yargs/yargs-parser/compare/v8.1.0...v9.0.0) (2018-01-20) +## [20.2.0](https://www.github.com/yargs/yargs-parser/compare/v20.1.0...v20.2.0) (2020-09-21) ### Features -* narg arguments no longer consume flag arguments ([#114](https://github.com/yargs/yargs-parser/issues/114)) ([60bb9b3](https://github.com/yargs/yargs-parser/commit/60bb9b3)) - - -### BREAKING CHANGES - -* arguments of form --foo, -abc, will no longer be consumed by nargs - - - - -# [8.1.0](https://github.com/yargs/yargs-parser/compare/v8.0.0...v8.1.0) (2017-12-20) +* **string-utils:** export looksLikeNumber helper ([#324](https://www.github.com/yargs/yargs-parser/issues/324)) ([c8580a2](https://www.github.com/yargs/yargs-parser/commit/c8580a2327b55f6342acecb6e72b62963d506750)) ### Bug Fixes -* allow null config values ([#108](https://github.com/yargs/yargs-parser/issues/108)) ([d8b14f9](https://github.com/yargs/yargs-parser/commit/d8b14f9)) -* ensure consistent parsing of dot-notation arguments ([#102](https://github.com/yargs/yargs-parser/issues/102)) ([c9bd79c](https://github.com/yargs/yargs-parser/commit/c9bd79c)) -* implement [@antoniom](https://github.com/antoniom)'s fix for camel-case expansion ([3087e1d](https://github.com/yargs/yargs-parser/commit/3087e1d)) -* only run coercion functions once, despite aliases. ([#76](https://github.com/yargs/yargs-parser/issues/76)) ([#103](https://github.com/yargs/yargs-parser/issues/103)) ([507aaef](https://github.com/yargs/yargs-parser/commit/507aaef)) -* scientific notation circumvented bounds check ([#110](https://github.com/yargs/yargs-parser/issues/110)) ([3571f57](https://github.com/yargs/yargs-parser/commit/3571f57)) -* tokenizer should ignore spaces at the beginning of the argString ([#106](https://github.com/yargs/yargs-parser/issues/106)) ([f34ead9](https://github.com/yargs/yargs-parser/commit/f34ead9)) +* **unknown-options-as-args:** convert positionals that look like numbers ([#326](https://www.github.com/yargs/yargs-parser/issues/326)) ([f85ebb4](https://www.github.com/yargs/yargs-parser/commit/f85ebb4face9d4b0f56147659404cbe0002f3dad)) - -### Features - -* make combining arrays a configurable option ([#111](https://github.com/yargs/yargs-parser/issues/111)) ([c8bf536](https://github.com/yargs/yargs-parser/commit/c8bf536)) -* merge array from arguments with array from config ([#83](https://github.com/yargs/yargs-parser/issues/83)) ([806ddd6](https://github.com/yargs/yargs-parser/commit/806ddd6)) +## [20.1.0](https://www.github.com/yargs/yargs-parser/compare/v20.0.0...v20.1.0) (2020-09-20) +### Features - -# [8.0.0](https://github.com/yargs/yargs-parser/compare/v7.0.0...v8.0.0) (2017-10-05) +* adds parse-positional-numbers configuration ([#321](https://www.github.com/yargs/yargs-parser/issues/321)) ([9cec00a](https://www.github.com/yargs/yargs-parser/commit/9cec00a622251292ffb7dce6f78f5353afaa0d4c)) ### Bug Fixes -* Ignore multiple spaces between arguments. ([#100](https://github.com/yargs/yargs-parser/issues/100)) ([d137227](https://github.com/yargs/yargs-parser/commit/d137227)) +* **build:** update release-please; make labels kick off builds ([#323](https://www.github.com/yargs/yargs-parser/issues/323)) ([09f448b](https://www.github.com/yargs/yargs-parser/commit/09f448b4cd66e25d2872544718df46dab8af062a)) +## [20.0.0](https://www.github.com/yargs/yargs-parser/compare/v19.0.4...v20.0.0) (2020-09-09) -### Features -* allow configuration of prefix for boolean negation ([#94](https://github.com/yargs/yargs-parser/issues/94)) ([00bde7d](https://github.com/yargs/yargs-parser/commit/00bde7d)) -* reworking how numbers are parsed ([#104](https://github.com/yargs/yargs-parser/issues/104)) ([fba00eb](https://github.com/yargs/yargs-parser/commit/fba00eb)) +### ⚠ BREAKING CHANGES +* do not ship type definitions (#318) -### BREAKING CHANGES +### Bug Fixes -* strings that fail `Number.isSafeInteger()` are no longer coerced into numbers. +* only strip camel case if hyphenated ([#316](https://www.github.com/yargs/yargs-parser/issues/316)) ([95a9e78](https://www.github.com/yargs/yargs-parser/commit/95a9e785127b9bbf2d1db1f1f808ca1fb100e82a)), closes [#315](https://www.github.com/yargs/yargs-parser/issues/315) +### Code Refactoring - -# [7.0.0](https://github.com/yargs/yargs-parser/compare/v6.0.1...v7.0.0) (2017-05-02) +* do not ship type definitions ([#318](https://www.github.com/yargs/yargs-parser/issues/318)) ([8fbd56f](https://www.github.com/yargs/yargs-parser/commit/8fbd56f1d0b6c44c30fca62708812151ca0ce330)) +### [19.0.4](https://www.github.com/yargs/yargs-parser/compare/v19.0.3...v19.0.4) (2020-08-27) -### Chores -* revert populate-- logic ([#91](https://github.com/yargs/yargs-parser/issues/91)) ([6003e6d](https://github.com/yargs/yargs-parser/commit/6003e6d)) +### Bug Fixes +* **build:** fixing publication ([#310](https://www.github.com/yargs/yargs-parser/issues/310)) ([5d3c6c2](https://www.github.com/yargs/yargs-parser/commit/5d3c6c29a9126248ba601920d9cf87c78e161ff5)) -### BREAKING CHANGES +### [19.0.3](https://www.github.com/yargs/yargs-parser/compare/v19.0.2...v19.0.3) (2020-08-27) -* populate-- now defaults to false. +### Bug Fixes +* **build:** switch to action for publish ([#308](https://www.github.com/yargs/yargs-parser/issues/308)) ([5c2f305](https://www.github.com/yargs/yargs-parser/commit/5c2f30585342bcd8aaf926407c863099d256d174)) - -## [6.0.1](https://github.com/yargs/yargs-parser/compare/v6.0.0...v6.0.1) (2017-05-01) +### [19.0.2](https://www.github.com/yargs/yargs-parser/compare/v19.0.1...v19.0.2) (2020-08-27) ### Bug Fixes -* default '--' to undefined when not provided; this is closer to the array API ([#90](https://github.com/yargs/yargs-parser/issues/90)) ([4e739cc](https://github.com/yargs/yargs-parser/commit/4e739cc)) - +* **types:** envPrefix should be optional ([#305](https://www.github.com/yargs/yargs-parser/issues/305)) ([ae3f180](https://www.github.com/yargs/yargs-parser/commit/ae3f180e14df2de2fd962145f4518f9aa0e76523)) - - -# [6.0.0](https://github.com/yargs/yargs-parser/compare/v4.2.1...v6.0.0) (2017-05-01) +### [19.0.1](https://www.github.com/yargs/yargs-parser/compare/v19.0.0...v19.0.1) (2020-08-09) ### Bug Fixes -* environment variables should take precedence over config file ([#81](https://github.com/yargs/yargs-parser/issues/81)) ([76cee1f](https://github.com/yargs/yargs-parser/commit/76cee1f)) -* parsing hints should apply for dot notation keys ([#86](https://github.com/yargs/yargs-parser/issues/86)) ([3e47d62](https://github.com/yargs/yargs-parser/commit/3e47d62)) +* **build:** push tag created for deno ([2186a14](https://www.github.com/yargs/yargs-parser/commit/2186a14989749887d56189867602e39e6679f8b0)) +## [19.0.0](https://www.github.com/yargs/yargs-parser/compare/v18.1.3...v19.0.0) (2020-08-09) -### Chores -* upgrade to newest version of camelcase ([#87](https://github.com/yargs/yargs-parser/issues/87)) ([f1903aa](https://github.com/yargs/yargs-parser/commit/f1903aa)) +### ⚠ BREAKING CHANGES +* adds support for ESM and Deno (#295) +* **ts:** projects using `@types/yargs-parser` may see variations in type definitions. +* drops Node 6. begin following Node.js LTS schedule (#278) ### Features -* add -- option which allows arguments after the -- flag to be returned separated from positional arguments ([#84](https://github.com/yargs/yargs-parser/issues/84)) ([2572ca8](https://github.com/yargs/yargs-parser/commit/2572ca8)) -* when parsing stops, we now populate "--" by default ([#88](https://github.com/yargs/yargs-parser/issues/88)) ([cd666db](https://github.com/yargs/yargs-parser/commit/cd666db)) - - -### BREAKING CHANGES - -* rather than placing arguments in "_", when parsing is stopped via "--"; we now populate an array called "--" by default. -* camelcase now requires Node 4+. -* environment variables will now override config files (args, env, config-file, config-object) - - - - -# [5.0.0](https://github.com/yargs/yargs-parser/compare/v4.2.1...v5.0.0) (2017-02-18) +* adds support for ESM and Deno ([#295](https://www.github.com/yargs/yargs-parser/issues/295)) ([195bc4a](https://www.github.com/yargs/yargs-parser/commit/195bc4a7f20c2a8f8e33fbb6ba96ef6e9a0120a1)) +* expose camelCase and decamelize helpers ([#296](https://www.github.com/yargs/yargs-parser/issues/296)) ([39154ce](https://www.github.com/yargs/yargs-parser/commit/39154ceb5bdcf76b5f59a9219b34cedb79b67f26)) +* **deps:** update to latest camelcase/decamelize ([#281](https://www.github.com/yargs/yargs-parser/issues/281)) ([8931ab0](https://www.github.com/yargs/yargs-parser/commit/8931ab08f686cc55286f33a95a83537da2be5516)) ### Bug Fixes -* environment variables should take precedence over config file ([#81](https://github.com/yargs/yargs-parser/issues/81)) ([76cee1f](https://github.com/yargs/yargs-parser/commit/76cee1f)) - +* boolean numeric short option ([#294](https://www.github.com/yargs/yargs-parser/issues/294)) ([f600082](https://www.github.com/yargs/yargs-parser/commit/f600082c959e092076caf420bbbc9d7a231e2418)) +* raise permission error for Deno if config load fails ([#298](https://www.github.com/yargs/yargs-parser/issues/298)) ([1174e2b](https://www.github.com/yargs/yargs-parser/commit/1174e2b3f0c845a1cd64e14ffc3703e730567a84)) +* **deps:** update dependency decamelize to v3 ([#274](https://www.github.com/yargs/yargs-parser/issues/274)) ([4d98698](https://www.github.com/yargs/yargs-parser/commit/4d98698bc6767e84ec54a0842908191739be73b7)) +* **types:** switch back to using Partial types ([#293](https://www.github.com/yargs/yargs-parser/issues/293)) ([bdc80ba](https://www.github.com/yargs/yargs-parser/commit/bdc80ba59fa13bc3025ce0a85e8bad9f9da24ea7)) -### BREAKING CHANGES -* environment variables will now override config files (args, env, config-file, config-object) +### Build System +* drops Node 6. begin following Node.js LTS schedule ([#278](https://www.github.com/yargs/yargs-parser/issues/278)) ([9014ed7](https://www.github.com/yargs/yargs-parser/commit/9014ed722a32768b96b829e65a31705db5c1458a)) - -## [4.2.1](https://github.com/yargs/yargs-parser/compare/v4.2.0...v4.2.1) (2017-01-02) +### Code Refactoring +* **ts:** move index.js to TypeScript ([#292](https://www.github.com/yargs/yargs-parser/issues/292)) ([f78d2b9](https://www.github.com/yargs/yargs-parser/commit/f78d2b97567ac4828624406e420b4047c710b789)) -### Bug Fixes - -* flatten/duplicate regression ([#75](https://github.com/yargs/yargs-parser/issues/75)) ([68d68a0](https://github.com/yargs/yargs-parser/commit/68d68a0)) - - - - -# [4.2.0](https://github.com/yargs/yargs-parser/compare/v4.1.0...v4.2.0) (2016-12-01) +### [18.1.3](https://www.github.com/yargs/yargs-parser/compare/v18.1.2...v18.1.3) (2020-04-16) ### Bug Fixes -* inner objects in configs had their keys appended to top-level key when dot-notation was disabled ([#72](https://github.com/yargs/yargs-parser/issues/72)) ([0b1b5f9](https://github.com/yargs/yargs-parser/commit/0b1b5f9)) - - -### Features - -* allow multiple arrays to be provided, rather than always combining ([#71](https://github.com/yargs/yargs-parser/issues/71)) ([0f0fb2d](https://github.com/yargs/yargs-parser/commit/0f0fb2d)) - - +* **setArg:** options using camel-case and dot-notation populated twice ([#268](https://www.github.com/yargs/yargs-parser/issues/268)) ([f7e15b9](https://www.github.com/yargs/yargs-parser/commit/f7e15b9800900b9856acac1a830a5f35847be73e)) - -# [4.1.0](https://github.com/yargs/yargs-parser/compare/v4.0.2...v4.1.0) (2016-11-07) - - -### Features - -* apply coercions to default options ([#65](https://github.com/yargs/yargs-parser/issues/65)) ([c79052b](https://github.com/yargs/yargs-parser/commit/c79052b)) -* handle dot notation boolean options ([#63](https://github.com/yargs/yargs-parser/issues/63)) ([02c3545](https://github.com/yargs/yargs-parser/commit/02c3545)) - - - - -## [4.0.2](https://github.com/yargs/yargs-parser/compare/v4.0.1...v4.0.2) (2016-09-30) +### [18.1.2](https://www.github.com/yargs/yargs-parser/compare/v18.1.1...v18.1.2) (2020-03-26) ### Bug Fixes -* whoops, let's make the assign not change the Object key order ([29d069a](https://github.com/yargs/yargs-parser/commit/29d069a)) - - +* **array, nargs:** support -o=--value and --option=--value format ([#262](https://www.github.com/yargs/yargs-parser/issues/262)) ([41d3f81](https://www.github.com/yargs/yargs-parser/commit/41d3f8139e116706b28de9b0de3433feb08d2f13)) - -## [4.0.1](https://github.com/yargs/yargs-parser/compare/v4.0.0...v4.0.1) (2016-09-30) +### [18.1.1](https://www.github.com/yargs/yargs-parser/compare/v18.1.0...v18.1.1) (2020-03-16) ### Bug Fixes -* lodash.assign was deprecated ([#59](https://github.com/yargs/yargs-parser/issues/59)) ([5e7eb11](https://github.com/yargs/yargs-parser/commit/5e7eb11)) - - +* \_\_proto\_\_ will now be replaced with \_\_\_proto\_\_\_ in parse ([#258](https://www.github.com/yargs/yargs-parser/issues/258)), patching a potential +prototype pollution vulnerability. This was reported by the Snyk Security Research Team.([63810ca](https://www.github.com/yargs/yargs-parser/commit/63810ca1ae1a24b08293a4d971e70e058c7a41e2)) - -# [4.0.0](https://github.com/yargs/yargs-parser/compare/v3.2.0...v4.0.0) (2016-09-26) +## [18.1.0](https://www.github.com/yargs/yargs-parser/compare/v18.0.0...v18.1.0) (2020-03-07) -### Bug Fixes - -* coerce should be applied to the final objects and arrays created ([#57](https://github.com/yargs/yargs-parser/issues/57)) ([4ca69da](https://github.com/yargs/yargs-parser/commit/4ca69da)) - - -### BREAKING CHANGES +### Features -* coerce is no longer applied to individual arguments in an implicit array. +* introduce single-digit boolean aliases ([#255](https://www.github.com/yargs/yargs-parser/issues/255)) ([9c60265](https://www.github.com/yargs/yargs-parser/commit/9c60265fd7a03cb98e6df3e32c8c5e7508d9f56f)) +## [18.0.0](https://www.github.com/yargs/yargs-parser/compare/v17.1.0...v18.0.0) (2020-03-02) - -# [3.2.0](https://github.com/yargs/yargs-parser/compare/v3.1.0...v3.2.0) (2016-08-13) +### ⚠ BREAKING CHANGES +* the narg count is now enforced when parsing arrays. ### Features -* coerce full array instead of each element ([#51](https://github.com/yargs/yargs-parser/issues/51)) ([cc4dc56](https://github.com/yargs/yargs-parser/commit/cc4dc56)) - - - - -# [3.1.0](https://github.com/yargs/yargs-parser/compare/v3.0.0...v3.1.0) (2016-08-09) - - -### Bug Fixes +* NaN can now be provided as a value for nargs, indicating "at least" one value is expected for array ([#251](https://www.github.com/yargs/yargs-parser/issues/251)) ([9db4be8](https://www.github.com/yargs/yargs-parser/commit/9db4be81417a2c7097128db34d86fe70ef4af70c)) -* address pkgConf parsing bug outlined in [#37](https://github.com/yargs/yargs-parser/issues/37) ([#45](https://github.com/yargs/yargs-parser/issues/45)) ([be76ee6](https://github.com/yargs/yargs-parser/commit/be76ee6)) -* better parsing of negative values ([#44](https://github.com/yargs/yargs-parser/issues/44)) ([2e43692](https://github.com/yargs/yargs-parser/commit/2e43692)) -* check aliases when guessing defaults for arguments fixes [#41](https://github.com/yargs/yargs-parser/issues/41) ([#43](https://github.com/yargs/yargs-parser/issues/43)) ([f3e4616](https://github.com/yargs/yargs-parser/commit/f3e4616)) +## [17.1.0](https://www.github.com/yargs/yargs-parser/compare/v17.0.1...v17.1.0) (2020-03-01) ### Features -* added coerce option, for providing specialized argument parsing ([#42](https://github.com/yargs/yargs-parser/issues/42)) ([7b49cd2](https://github.com/yargs/yargs-parser/commit/7b49cd2)) +* introduce greedy-arrays config, for specifying whether arrays consume multiple positionals ([#249](https://www.github.com/yargs/yargs-parser/issues/249)) ([60e880a](https://www.github.com/yargs/yargs-parser/commit/60e880a837046314d89fa4725f923837fd33a9eb)) - - - -# [3.0.0](https://github.com/yargs/yargs-parser/compare/v2.4.1...v3.0.0) (2016-08-07) +### [17.0.1](https://www.github.com/yargs/yargs-parser/compare/v17.0.0...v17.0.1) (2020-02-29) ### Bug Fixes -* parsing issue with numeric character in group of options ([#19](https://github.com/yargs/yargs-parser/issues/19)) ([f743236](https://github.com/yargs/yargs-parser/commit/f743236)) -* upgraded lodash.assign ([5d7fdf4](https://github.com/yargs/yargs-parser/commit/5d7fdf4)) +* normalized keys were not enumerable ([#247](https://www.github.com/yargs/yargs-parser/issues/247)) ([57119f9](https://www.github.com/yargs/yargs-parser/commit/57119f9f17cf27499bd95e61c2f72d18314f11ba)) + +## [17.0.0](https://www.github.com/yargs/yargs-parser/compare/v16.1.0...v17.0.0) (2020-02-10) -### BREAKING CHANGES -* subtle change to how values are parsed in a group of single-character arguments. -* _first released in 3.1.0, better handling of negative values should be considered a breaking change._ +### ⚠ BREAKING CHANGES +* this reverts parsing behavior of booleans to that of yargs@14 +* objects used during parsing are now created with a null +prototype. There may be some scenarios where this change in behavior +leaks externally. +### Features - -## [2.4.1](https://github.com/yargs/yargs-parser/compare/v2.4.0...v2.4.1) (2016-07-16) +* boolean arguments will not be collected into an implicit array ([#236](https://www.github.com/yargs/yargs-parser/issues/236)) ([34c4e19](https://www.github.com/yargs/yargs-parser/commit/34c4e19bae4e7af63e3cb6fa654a97ed476e5eb5)) +* introduce nargs-eats-options config option ([#246](https://www.github.com/yargs/yargs-parser/issues/246)) ([d50822a](https://www.github.com/yargs/yargs-parser/commit/d50822ac10e1b05f2e9643671ca131ac251b6732)) ### Bug Fixes -* **count:** do not increment a default value ([#39](https://github.com/yargs/yargs-parser/issues/39)) ([b04a189](https://github.com/yargs/yargs-parser/commit/b04a189)) +* address bugs with "uknown-options-as-args" ([bc023e3](https://www.github.com/yargs/yargs-parser/commit/bc023e3b13e20a118353f9507d1c999bf388a346)) +* array should take precedence over nargs, but enforce nargs ([#243](https://www.github.com/yargs/yargs-parser/issues/243)) ([4cbc188](https://www.github.com/yargs/yargs-parser/commit/4cbc188b7abb2249529a19c090338debdad2fe6c)) +* support keys that collide with object prototypes ([#234](https://www.github.com/yargs/yargs-parser/issues/234)) ([1587b6d](https://www.github.com/yargs/yargs-parser/commit/1587b6d91db853a9109f1be6b209077993fee4de)) +* unknown options terminated with digits now handled by unknown-options-as-args ([#238](https://www.github.com/yargs/yargs-parser/issues/238)) ([d36cdfa](https://www.github.com/yargs/yargs-parser/commit/d36cdfa854254d7c7e0fe1d583818332ac46c2a5)) +## [16.1.0](https://www.github.com/yargs/yargs-parser/compare/v16.0.0...v16.1.0) (2019-11-01) - -# [2.4.0](https://github.com/yargs/yargs-parser/compare/v2.3.0...v2.4.0) (2016-04-11) +### ⚠ BREAKING CHANGES +* populate error if incompatible narg/count or array/count options are used (#191) ### Features -* **environment:** Support nested options in environment variables ([#26](https://github.com/yargs/yargs-parser/issues/26)) thanks [@elas7](https://github.com/elas7) \o/ ([020778b](https://github.com/yargs/yargs-parser/commit/020778b)) - - +* options that have had their default value used are now tracked ([#211](https://www.github.com/yargs/yargs-parser/issues/211)) ([a525234](https://www.github.com/yargs/yargs-parser/commit/a525234558c847deedd73f8792e0a3b77b26e2c0)) +* populate error if incompatible narg/count or array/count options are used ([#191](https://www.github.com/yargs/yargs-parser/issues/191)) ([84a401f](https://www.github.com/yargs/yargs-parser/commit/84a401f0fa3095e0a19661670d1570d0c3b9d3c9)) - -# [2.3.0](https://github.com/yargs/yargs-parser/compare/v2.2.0...v2.3.0) (2016-04-09) +### Reverts -### Bug Fixes - -* **boolean:** fix for boolean options with non boolean defaults (#20) ([2dbe86b](https://github.com/yargs/yargs-parser/commit/2dbe86b)), closes [(#20](https://github.com/(/issues/20) -* **package:** remove tests from tarball ([0353c0d](https://github.com/yargs/yargs-parser/commit/0353c0d)) -* **parsing:** handle calling short option with an empty string as the next value. ([a867165](https://github.com/yargs/yargs-parser/commit/a867165)) -* boolean flag when next value contains the strings 'true' or 'false'. ([69941a6](https://github.com/yargs/yargs-parser/commit/69941a6)) -* update dependencies; add standard-version bin for next release (#24) ([822d9d5](https://github.com/yargs/yargs-parser/commit/822d9d5)) - -### Features - -* **configuration:** Allow to pass configuration objects to yargs-parser ([0780900](https://github.com/yargs/yargs-parser/commit/0780900)) -* **normalize:** allow normalize to work with arrays ([e0eaa1a](https://github.com/yargs/yargs-parser/commit/e0eaa1a)) +* revert 16.0.0 CHANGELOG entry ([920320a](https://www.github.com/yargs/yargs-parser/commit/920320ad9861bbfd58eda39221ae211540fc1daf)) diff --git a/node_modules/ts-jest/node_modules/yargs-parser/README.md b/node_modules/ts-jest/node_modules/yargs-parser/README.md index 9c4333843..fbb8927a4 100644 --- a/node_modules/ts-jest/node_modules/yargs-parser/README.md +++ b/node_modules/ts-jest/node_modules/yargs-parser/README.md @@ -1,11 +1,9 @@ # yargs-parser -[![Build Status](https://travis-ci.org/yargs/yargs-parser.png)](https://travis-ci.org/yargs/yargs-parser) -[![Coverage Status](https://coveralls.io/repos/yargs/yargs-parser/badge.svg?branch=)](https://coveralls.io/r/yargs/yargs-parser?branch=master) +![ci](https://github.com/yargs/yargs-parser/workflows/ci/badge.svg) [![NPM version](https://img.shields.io/npm/v/yargs-parser.svg)](https://www.npmjs.com/package/yargs-parser) -[![Windows Tests](https://img.shields.io/appveyor/ci/bcoe/yargs-parser/master.svg?label=Windows%20Tests)](https://ci.appveyor.com/project/bcoe/yargs-parser) -[![Standard Version](https://img.shields.io/badge/release-standard%20version-brightgreen.svg)](https://github.com/conventional-changelog/standard-version) - +[![Conventional Commits](https://img.shields.io/badge/Conventional%20Commits-1.0.0-yellow.svg)](https://conventionalcommits.org) +![nycrc config on GitHub](https://img.shields.io/nycrc/yargs/yargs-parser) The mighty option parser used by [yargs](https://github.com/yargs/yargs). @@ -20,7 +18,7 @@ npm i yargs-parser --save ``` ```js -var argv = require('yargs-parser')(process.argv.slice(2)) +const argv = require('yargs-parser')(process.argv.slice(2)) console.log(argv) ``` @@ -32,7 +30,7 @@ node example.js --foo=33 --bar hello _or parse a string!_ ```js -var argv = require('./')('--foo=99 --bar=33') +const argv = require('yargs-parser')('--foo=99 --bar=33') console.log(argv) ``` @@ -43,14 +41,58 @@ console.log(argv) Convert an array of mixed types before passing to `yargs-parser`: ```js -var parse = require('yargs-parser') +const parse = require('yargs-parser') parse(['-f', 11, '--zoom', 55].join(' ')) // <-- array to string parse(['-f', 11, '--zoom', 55].map(String)) // <-- array of strings ``` +## Deno Example + +As of `v19` `yargs-parser` supports [Deno](https://github.com/denoland/deno): + +```typescript +import parser from "https://deno.land/x/yargs_parser/deno.ts"; + +const argv = parser('--foo=99 --bar=9987930', { + string: ['bar'] +}) +console.log(argv) +``` + +## ESM Example + +As of `v19` `yargs-parser` supports ESM (_both in Node.js and in the browser_): + +**Node.js:** + +```js +import parser from 'yargs-parser' + +const argv = parser('--foo=99 --bar=9987930', { + string: ['bar'] +}) +console.log(argv) +``` + +**Browsers:** + +```html + + + + +``` + ## API -### require('yargs-parser')(args, opts={}) +### parser(args, opts={}) Parses command line arguments returning a simple mapping of keys and values. @@ -59,20 +101,24 @@ Parses command line arguments returning a simple mapping of keys and values. * `args`: a string or array of strings representing the options to parse. * `opts`: provide a set of hints indicating how `args` should be parsed: * `opts.alias`: an object representing the set of aliases for a key: `{alias: {foo: ['f']}}`. - * `opts.array`: indicate that keys should be parsed as an array: `{array: ['foo', 'bar']}`. + * `opts.array`: indicate that keys should be parsed as an array: `{array: ['foo', 'bar']}`.
+ Indicate that keys should be parsed as an array and coerced to booleans / numbers:
+ `{array: [{ key: 'foo', boolean: true }, {key: 'bar', number: true}]}`. * `opts.boolean`: arguments should be parsed as booleans: `{boolean: ['x', 'y']}`. - * `opts.config`: indicate a key that represents a path to a configuration file (this file will be loaded and parsed). * `opts.coerce`: provide a custom synchronous function that returns a coerced value from the argument provided - (or throws an error), e.g. `{coerce: {foo: function (arg) {return modifiedArg}}}`. + (or throws an error). For arrays the function is called only once for the entire array:
+ `{coerce: {foo: function (arg) {return modifiedArg}}}`. + * `opts.config`: indicate a key that represents a path to a configuration file (this file will be loaded and parsed). + * `opts.configObjects`: configuration objects to parse, their properties will be set as arguments:
+ `{configObjects: [{'x': 5, 'y': 33}, {'z': 44}]}`. + * `opts.configuration`: provide configuration options to the yargs-parser (see: [configuration](#configuration)). * `opts.count`: indicate a key that should be used as a counter, e.g., `-vvv` = `{v: 3}`. * `opts.default`: provide default values for keys: `{default: {x: 33, y: 'hello world!'}}`. * `opts.envPrefix`: environment variables (`process.env`) with the prefix provided should be parsed. * `opts.narg`: specify that a key requires `n` arguments: `{narg: {x: 2}}`. * `opts.normalize`: `path.normalize()` will be applied to values set to this key. - * `opts.string`: keys should be treated as strings (even if they resemble a number `-x 33`). - * `opts.configuration`: provide configuration options to the yargs-parser (see: [configuration](#configuration)). * `opts.number`: keys should be treated as numbers. - * `opts['--']`: arguments after the end-of-options flag `--` will be set to the `argv.['--']` array instead of being set to the `argv._` array. + * `opts.string`: keys should be treated as strings (even if they resemble a number `-x 33`). **returns:** @@ -96,10 +142,14 @@ yargs engine. * `argv`: an object representing the parsed value of `args` * `key/value`: key value pairs for each argument and their aliases. * `_`: an array representing the positional arguments. + * [optional] `--`: an array with arguments after the end-of-options flag `--`. * `error`: populated with an error object if an exception occurred during parsing. * `aliases`: the inferred list of aliases built by combining lists in `opts.alias`. -* `newAliases`: any new aliases added via camel-case expansion. -* `configuration`: the configuration loaded from the `yargs` stanza in package.json. +* `newAliases`: any new aliases added via camel-case expansion: + * `boolean`: `{ fooBar: true }` +* `defaulted`: any new argument created by `opts.default`, no aliases included. + * `boolean`: `{ foo: true }` +* `configuration`: given by default settings and `opts.configuration`. @@ -193,6 +243,25 @@ node example.js --foo=99.3 { _: [], foo: "99.3" } ``` +### parse positional numbers + +* default: `true` +* key: `parse-positional-numbers` + +Should positional keys that look like numbers be treated as such. + +```sh +node example.js 99.3 +{ _: [99] } +``` + +_if disabled:_ + +```sh +node example.js 99.3 +{ _: ['99.3'] } +``` + ### boolean negation * default: `true` @@ -258,6 +327,34 @@ node example.js -x 1 2 -x 3 4 { _: [], x: [[1, 2], [3, 4]] } ``` +### greedy arrays + +* default: `true` +* key: `greedy-arrays` + +Should arrays consume more than one positional argument following their flag. + +```sh +node example --arr 1 2 +{ _[], arr: [1, 2] } +``` + +_if disabled:_ + +```sh +node example --arr 1 2 +{ _[2], arr: [1] } +``` + +**Note: in `v18.0.0` we are considering defaulting greedy arrays to `false`.** + +### nargs eats options + +* default: `false` +* key: `nargs-eats-options` + +Should nargs consume dash options as well as positional arguments. + ### negation prefix * default: `no-` @@ -319,6 +416,98 @@ node example.js -a 1 -c 2 { _: [], a: 1, b: undefined, c: 2 } ``` +### halt at non-option + +* default: `false`. +* key: `halt-at-non-option`. + +Should parsing stop at the first positional argument? This is similar to how e.g. `ssh` parses its command line. + +_If disabled:_ + +```sh +node example.js -a run b -x y +{ _: [ 'b' ], a: 'run', x: 'y' } +``` + +_If enabled:_ + +```sh +node example.js -a run b -x y +{ _: [ 'b', '-x', 'y' ], a: 'run' } +``` + +### strip aliased + +* default: `false` +* key: `strip-aliased` + +Should aliases be removed before returning results? + +_If disabled:_ + +```sh +node example.js --test-field 1 +{ _: [], 'test-field': 1, testField: 1, 'test-alias': 1, testAlias: 1 } +``` + +_If enabled:_ + +```sh +node example.js --test-field 1 +{ _: [], 'test-field': 1, testField: 1 } +``` + +### strip dashed + +* default: `false` +* key: `strip-dashed` + +Should dashed keys be removed before returning results? This option has no effect if +`camel-case-expansion` is disabled. + +_If disabled:_ + +```sh +node example.js --test-field 1 +{ _: [], 'test-field': 1, testField: 1 } +``` + +_If enabled:_ + +```sh +node example.js --test-field 1 +{ _: [], testField: 1 } +``` + +### unknown options as args + +* default: `false` +* key: `unknown-options-as-args` + +Should unknown options be treated like regular arguments? An unknown option is one that is not +configured in `opts`. + +_If disabled_ + +```sh +node example.js --unknown-option --known-option 2 --string-option --unknown-option2 +{ _: [], unknownOption: true, knownOption: 2, stringOption: '', unknownOption2: true } +``` + +_If enabled_ + +```sh +node example.js --unknown-option --known-option 2 --string-option --unknown-option2 +{ _: ['--unknown-option'], knownOption: 2, stringOption: '--unknown-option2' } +``` + +## Supported Node.js Versions + +Libraries in this ecosystem make a best effort to track +[Node.js' release schedule](https://nodejs.org/en/about/releases/). Here's [a +post on why we think this is important](https://medium.com/the-node-js-collection/maintainers-should-consider-following-node-js-release-schedule-ab08ed4de71a). + ## Special Thanks The yargs project evolves from optimist and minimist. It owes its diff --git a/node_modules/ts-jest/node_modules/yargs-parser/index.js b/node_modules/ts-jest/node_modules/yargs-parser/index.js deleted file mode 100644 index a3849bce6..000000000 --- a/node_modules/ts-jest/node_modules/yargs-parser/index.js +++ /dev/null @@ -1,833 +0,0 @@ -var camelCase = require('camelcase') -var path = require('path') -var tokenizeArgString = require('./lib/tokenize-arg-string') -var util = require('util') - -function parse (args, opts) { - if (!opts) opts = {} - // allow a string argument to be passed in rather - // than an argv array. - args = tokenizeArgString(args) - // aliases might have transitive relationships, normalize this. - var aliases = combineAliases(opts.alias || {}) - var configuration = assign({ - 'short-option-groups': true, - 'camel-case-expansion': true, - 'dot-notation': true, - 'parse-numbers': true, - 'boolean-negation': true, - 'negation-prefix': 'no-', - 'duplicate-arguments-array': true, - 'flatten-duplicate-arrays': true, - 'populate--': false, - 'combine-arrays': false, - 'set-placeholder-key': false - }, opts.configuration) - var defaults = opts.default || {} - var configObjects = opts.configObjects || [] - var envPrefix = opts.envPrefix - var notFlagsOption = configuration['populate--'] - var notFlagsArgv = notFlagsOption ? '--' : '_' - var newAliases = {} - // allow a i18n handler to be passed in, default to a fake one (util.format). - var __ = opts.__ || function (str) { - return util.format.apply(util, Array.prototype.slice.call(arguments)) - } - var error = null - var flags = { - aliases: {}, - arrays: {}, - bools: {}, - strings: {}, - numbers: {}, - counts: {}, - normalize: {}, - configs: {}, - defaulted: {}, - nargs: {}, - coercions: {}, - keys: [] - } - var negative = /^-[0-9]+(\.[0-9]+)?/ - var negatedBoolean = new RegExp('^--' + configuration['negation-prefix'] + '(.+)') - - ;[].concat(opts.array).filter(Boolean).forEach(function (key) { - flags.arrays[key] = true - flags.keys.push(key) - }) - - ;[].concat(opts.boolean).filter(Boolean).forEach(function (key) { - flags.bools[key] = true - flags.keys.push(key) - }) - - ;[].concat(opts.string).filter(Boolean).forEach(function (key) { - flags.strings[key] = true - flags.keys.push(key) - }) - - ;[].concat(opts.number).filter(Boolean).forEach(function (key) { - flags.numbers[key] = true - flags.keys.push(key) - }) - - ;[].concat(opts.count).filter(Boolean).forEach(function (key) { - flags.counts[key] = true - flags.keys.push(key) - }) - - ;[].concat(opts.normalize).filter(Boolean).forEach(function (key) { - flags.normalize[key] = true - flags.keys.push(key) - }) - - Object.keys(opts.narg || {}).forEach(function (k) { - flags.nargs[k] = opts.narg[k] - flags.keys.push(k) - }) - - Object.keys(opts.coerce || {}).forEach(function (k) { - flags.coercions[k] = opts.coerce[k] - flags.keys.push(k) - }) - - if (Array.isArray(opts.config) || typeof opts.config === 'string') { - ;[].concat(opts.config).filter(Boolean).forEach(function (key) { - flags.configs[key] = true - }) - } else { - Object.keys(opts.config || {}).forEach(function (k) { - flags.configs[k] = opts.config[k] - }) - } - - // create a lookup table that takes into account all - // combinations of aliases: {f: ['foo'], foo: ['f']} - extendAliases(opts.key, aliases, opts.default, flags.arrays) - - // apply default values to all aliases. - Object.keys(defaults).forEach(function (key) { - (flags.aliases[key] || []).forEach(function (alias) { - defaults[alias] = defaults[key] - }) - }) - - var argv = { _: [] } - - Object.keys(flags.bools).forEach(function (key) { - if (Object.prototype.hasOwnProperty.call(defaults, key)) { - setArg(key, defaults[key]) - setDefaulted(key) - } - }) - - var notFlags = [] - if (args.indexOf('--') !== -1) { - notFlags = args.slice(args.indexOf('--') + 1) - args = args.slice(0, args.indexOf('--')) - } - - for (var i = 0; i < args.length; i++) { - var arg = args[i] - var broken - var key - var letters - var m - var next - var value - - // -- seperated by = - if (arg.match(/^--.+=/) || ( - !configuration['short-option-groups'] && arg.match(/^-.+=/) - )) { - // Using [\s\S] instead of . because js doesn't support the - // 'dotall' regex modifier. See: - // http://stackoverflow.com/a/1068308/13216 - m = arg.match(/^--?([^=]+)=([\s\S]*)$/) - - // nargs format = '--f=monkey washing cat' - if (checkAllAliases(m[1], flags.nargs)) { - args.splice(i + 1, 0, m[2]) - i = eatNargs(i, m[1], args) - // arrays format = '--f=a b c' - } else if (checkAllAliases(m[1], flags.arrays) && args.length > i + 1) { - args.splice(i + 1, 0, m[2]) - i = eatArray(i, m[1], args) - } else { - setArg(m[1], m[2]) - } - } else if (arg.match(negatedBoolean) && configuration['boolean-negation']) { - key = arg.match(negatedBoolean)[1] - setArg(key, false) - - // -- seperated by space. - } else if (arg.match(/^--.+/) || ( - !configuration['short-option-groups'] && arg.match(/^-.+/) - )) { - key = arg.match(/^--?(.+)/)[1] - - // nargs format = '--foo a b c' - if (checkAllAliases(key, flags.nargs)) { - i = eatNargs(i, key, args) - // array format = '--foo a b c' - } else if (checkAllAliases(key, flags.arrays) && args.length > i + 1) { - i = eatArray(i, key, args) - } else { - next = args[i + 1] - - if (next !== undefined && (!next.match(/^-/) || - next.match(negative)) && - !checkAllAliases(key, flags.bools) && - !checkAllAliases(key, flags.counts)) { - setArg(key, next) - i++ - } else if (/^(true|false)$/.test(next)) { - setArg(key, next) - i++ - } else { - setArg(key, defaultForType(guessType(key, flags))) - } - } - - // dot-notation flag seperated by '='. - } else if (arg.match(/^-.\..+=/)) { - m = arg.match(/^-([^=]+)=([\s\S]*)$/) - setArg(m[1], m[2]) - - // dot-notation flag seperated by space. - } else if (arg.match(/^-.\..+/)) { - next = args[i + 1] - key = arg.match(/^-(.\..+)/)[1] - - if (next !== undefined && !next.match(/^-/) && - !checkAllAliases(key, flags.bools) && - !checkAllAliases(key, flags.counts)) { - setArg(key, next) - i++ - } else { - setArg(key, defaultForType(guessType(key, flags))) - } - } else if (arg.match(/^-[^-]+/) && !arg.match(negative)) { - letters = arg.slice(1, -1).split('') - broken = false - - for (var j = 0; j < letters.length; j++) { - next = arg.slice(j + 2) - - if (letters[j + 1] && letters[j + 1] === '=') { - value = arg.slice(j + 3) - key = letters[j] - - // nargs format = '-f=monkey washing cat' - if (checkAllAliases(key, flags.nargs)) { - args.splice(i + 1, 0, value) - i = eatNargs(i, key, args) - // array format = '-f=a b c' - } else if (checkAllAliases(key, flags.arrays) && args.length > i + 1) { - args.splice(i + 1, 0, value) - i = eatArray(i, key, args) - } else { - setArg(key, value) - } - - broken = true - break - } - - if (next === '-') { - setArg(letters[j], next) - continue - } - - // current letter is an alphabetic character and next value is a number - if (/[A-Za-z]/.test(letters[j]) && - /^-?\d+(\.\d*)?(e-?\d+)?$/.test(next)) { - setArg(letters[j], next) - broken = true - break - } - - if (letters[j + 1] && letters[j + 1].match(/\W/)) { - setArg(letters[j], next) - broken = true - break - } else { - setArg(letters[j], defaultForType(guessType(letters[j], flags))) - } - } - - key = arg.slice(-1)[0] - - if (!broken && key !== '-') { - // nargs format = '-f a b c' - if (checkAllAliases(key, flags.nargs)) { - i = eatNargs(i, key, args) - // array format = '-f a b c' - } else if (checkAllAliases(key, flags.arrays) && args.length > i + 1) { - i = eatArray(i, key, args) - } else { - next = args[i + 1] - - if (next !== undefined && (!/^(-|--)[^-]/.test(next) || - next.match(negative)) && - !checkAllAliases(key, flags.bools) && - !checkAllAliases(key, flags.counts)) { - setArg(key, next) - i++ - } else if (/^(true|false)$/.test(next)) { - setArg(key, next) - i++ - } else { - setArg(key, defaultForType(guessType(key, flags))) - } - } - } - } else { - argv._.push(maybeCoerceNumber('_', arg)) - } - } - - // order of precedence: - // 1. command line arg - // 2. value from env var - // 3. value from config file - // 4. value from config objects - // 5. configured default value - applyEnvVars(argv, true) // special case: check env vars that point to config file - applyEnvVars(argv, false) - setConfig(argv) - setConfigObjects() - applyDefaultsAndAliases(argv, flags.aliases, defaults) - applyCoercions(argv) - if (configuration['set-placeholder-key']) setPlaceholderKeys(argv) - - // for any counts either not in args or without an explicit default, set to 0 - Object.keys(flags.counts).forEach(function (key) { - if (!hasKey(argv, key.split('.'))) setArg(key, 0) - }) - - // '--' defaults to undefined. - if (notFlagsOption && notFlags.length) argv[notFlagsArgv] = [] - notFlags.forEach(function (key) { - argv[notFlagsArgv].push(key) - }) - - // how many arguments should we consume, based - // on the nargs option? - function eatNargs (i, key, args) { - var ii - const toEat = checkAllAliases(key, flags.nargs) - - // nargs will not consume flag arguments, e.g., -abc, --foo, - // and terminates when one is observed. - var available = 0 - for (ii = i + 1; ii < args.length; ii++) { - if (!args[ii].match(/^-[^0-9]/)) available++ - else break - } - - if (available < toEat) error = Error(__('Not enough arguments following: %s', key)) - - const consumed = Math.min(available, toEat) - for (ii = i + 1; ii < (consumed + i + 1); ii++) { - setArg(key, args[ii]) - } - - return (i + consumed) - } - - // if an option is an array, eat all non-hyphenated arguments - // following it... YUM! - // e.g., --foo apple banana cat becomes ["apple", "banana", "cat"] - function eatArray (i, key, args) { - var start = i + 1 - var argsToSet = [] - var multipleArrayFlag = i > 0 - for (var ii = i + 1; ii < args.length; ii++) { - if (/^-/.test(args[ii]) && !negative.test(args[ii])) { - if (ii === start) { - setArg(key, defaultForType('array')) - } - multipleArrayFlag = true - break - } - i = ii - argsToSet.push(args[ii]) - } - if (multipleArrayFlag) { - setArg(key, argsToSet.map(function (arg) { - return processValue(key, arg) - })) - } else { - argsToSet.forEach(function (arg) { - setArg(key, arg) - }) - } - - return i - } - - function setArg (key, val) { - unsetDefaulted(key) - - if (/-/.test(key) && configuration['camel-case-expansion']) { - addNewAlias(key, camelCase(key)) - } - - var value = processValue(key, val) - - var splitKey = key.split('.') - setKey(argv, splitKey, value) - - // handle populating aliases of the full key - if (flags.aliases[key]) { - flags.aliases[key].forEach(function (x) { - x = x.split('.') - setKey(argv, x, value) - }) - } - - // handle populating aliases of the first element of the dot-notation key - if (splitKey.length > 1 && configuration['dot-notation']) { - ;(flags.aliases[splitKey[0]] || []).forEach(function (x) { - x = x.split('.') - - // expand alias with nested objects in key - var a = [].concat(splitKey) - a.shift() // nuke the old key. - x = x.concat(a) - - setKey(argv, x, value) - }) - } - - // Set normalize getter and setter when key is in 'normalize' but isn't an array - if (checkAllAliases(key, flags.normalize) && !checkAllAliases(key, flags.arrays)) { - var keys = [key].concat(flags.aliases[key] || []) - keys.forEach(function (key) { - argv.__defineSetter__(key, function (v) { - val = path.normalize(v) - }) - - argv.__defineGetter__(key, function () { - return typeof val === 'string' ? path.normalize(val) : val - }) - }) - } - } - - function addNewAlias (key, alias) { - if (!(flags.aliases[key] && flags.aliases[key].length)) { - flags.aliases[key] = [alias] - newAliases[alias] = true - } - if (!(flags.aliases[alias] && flags.aliases[alias].length)) { - addNewAlias(alias, key) - } - } - - function processValue (key, val) { - // handle parsing boolean arguments --foo=true --bar false. - if (checkAllAliases(key, flags.bools) || checkAllAliases(key, flags.counts)) { - if (typeof val === 'string') val = val === 'true' - } - - var value = maybeCoerceNumber(key, val) - - // increment a count given as arg (either no value or value parsed as boolean) - if (checkAllAliases(key, flags.counts) && (isUndefined(value) || typeof value === 'boolean')) { - value = increment - } - - // Set normalized value when key is in 'normalize' and in 'arrays' - if (checkAllAliases(key, flags.normalize) && checkAllAliases(key, flags.arrays)) { - if (Array.isArray(val)) value = val.map(path.normalize) - else value = path.normalize(val) - } - return value - } - - function maybeCoerceNumber (key, value) { - if (!checkAllAliases(key, flags.strings) && !checkAllAliases(key, flags.coercions)) { - const shouldCoerceNumber = isNumber(value) && configuration['parse-numbers'] && ( - Number.isSafeInteger(Math.floor(value)) - ) - if (shouldCoerceNumber || (!isUndefined(value) && checkAllAliases(key, flags.numbers))) value = Number(value) - } - return value - } - - // set args from config.json file, this should be - // applied last so that defaults can be applied. - function setConfig (argv) { - var configLookup = {} - - // expand defaults/aliases, in-case any happen to reference - // the config.json file. - applyDefaultsAndAliases(configLookup, flags.aliases, defaults) - - Object.keys(flags.configs).forEach(function (configKey) { - var configPath = argv[configKey] || configLookup[configKey] - if (configPath) { - try { - var config = null - var resolvedConfigPath = path.resolve(process.cwd(), configPath) - - if (typeof flags.configs[configKey] === 'function') { - try { - config = flags.configs[configKey](resolvedConfigPath) - } catch (e) { - config = e - } - if (config instanceof Error) { - error = config - return - } - } else { - config = require(resolvedConfigPath) - } - - setConfigObject(config) - } catch (ex) { - if (argv[configKey]) error = Error(__('Invalid JSON config file: %s', configPath)) - } - } - }) - } - - // set args from config object. - // it recursively checks nested objects. - function setConfigObject (config, prev) { - Object.keys(config).forEach(function (key) { - var value = config[key] - var fullKey = prev ? prev + '.' + key : key - - // if the value is an inner object and we have dot-notation - // enabled, treat inner objects in config the same as - // heavily nested dot notations (foo.bar.apple). - if (typeof value === 'object' && value !== null && !Array.isArray(value) && configuration['dot-notation']) { - // if the value is an object but not an array, check nested object - setConfigObject(value, fullKey) - } else { - // setting arguments via CLI takes precedence over - // values within the config file. - if (!hasKey(argv, fullKey.split('.')) || (flags.defaulted[fullKey]) || (flags.arrays[fullKey] && configuration['combine-arrays'])) { - setArg(fullKey, value) - } - } - }) - } - - // set all config objects passed in opts - function setConfigObjects () { - if (typeof configObjects === 'undefined') return - configObjects.forEach(function (configObject) { - setConfigObject(configObject) - }) - } - - function applyEnvVars (argv, configOnly) { - if (typeof envPrefix === 'undefined') return - - var prefix = typeof envPrefix === 'string' ? envPrefix : '' - Object.keys(process.env).forEach(function (envVar) { - if (prefix === '' || envVar.lastIndexOf(prefix, 0) === 0) { - // get array of nested keys and convert them to camel case - var keys = envVar.split('__').map(function (key, i) { - if (i === 0) { - key = key.substring(prefix.length) - } - return camelCase(key) - }) - - if (((configOnly && flags.configs[keys.join('.')]) || !configOnly) && (!hasKey(argv, keys) || flags.defaulted[keys.join('.')])) { - setArg(keys.join('.'), process.env[envVar]) - } - } - }) - } - - function applyCoercions (argv) { - var coerce - var applied = {} - Object.keys(argv).forEach(function (key) { - if (!applied.hasOwnProperty(key)) { // If we haven't already coerced this option via one of its aliases - coerce = checkAllAliases(key, flags.coercions) - if (typeof coerce === 'function') { - try { - var value = coerce(argv[key]) - ;([].concat(flags.aliases[key] || [], key)).forEach(ali => { - applied[ali] = argv[ali] = value - }) - } catch (err) { - error = err - } - } - } - }) - } - - function setPlaceholderKeys (argv) { - flags.keys.forEach((key) => { - // don't set placeholder keys for dot notation options 'foo.bar'. - if (~key.indexOf('.')) return - if (typeof argv[key] === 'undefined') argv[key] = undefined - }) - return argv - } - - function applyDefaultsAndAliases (obj, aliases, defaults) { - Object.keys(defaults).forEach(function (key) { - if (!hasKey(obj, key.split('.'))) { - setKey(obj, key.split('.'), defaults[key]) - - ;(aliases[key] || []).forEach(function (x) { - if (hasKey(obj, x.split('.'))) return - setKey(obj, x.split('.'), defaults[key]) - }) - } - }) - } - - function hasKey (obj, keys) { - var o = obj - - if (!configuration['dot-notation']) keys = [keys.join('.')] - - keys.slice(0, -1).forEach(function (key) { - o = (o[key] || {}) - }) - - var key = keys[keys.length - 1] - - if (typeof o !== 'object') return false - else return key in o - } - - function setKey (obj, keys, value) { - var o = obj - - if (!configuration['dot-notation']) keys = [keys.join('.')] - - keys.slice(0, -1).forEach(function (key, index) { - if (typeof o === 'object' && o[key] === undefined) { - o[key] = {} - } - - if (typeof o[key] !== 'object' || Array.isArray(o[key])) { - // ensure that o[key] is an array, and that the last item is an empty object. - if (Array.isArray(o[key])) { - o[key].push({}) - } else { - o[key] = [o[key], {}] - } - - // we want to update the empty object at the end of the o[key] array, so set o to that object - o = o[key][o[key].length - 1] - } else { - o = o[key] - } - }) - - var key = keys[keys.length - 1] - - var isTypeArray = checkAllAliases(keys.join('.'), flags.arrays) - var isValueArray = Array.isArray(value) - var duplicate = configuration['duplicate-arguments-array'] - - if (value === increment) { - o[key] = increment(o[key]) - } else if (Array.isArray(o[key])) { - if (duplicate && isTypeArray && isValueArray) { - o[key] = configuration['flatten-duplicate-arrays'] ? o[key].concat(value) : [o[key]].concat([value]) - } else if (!duplicate && Boolean(isTypeArray) === Boolean(isValueArray)) { - o[key] = value - } else { - o[key] = o[key].concat([value]) - } - } else if (o[key] === undefined && isTypeArray) { - o[key] = isValueArray ? value : [value] - } else if (duplicate && !(o[key] === undefined || checkAllAliases(key, flags.bools) || checkAllAliases(keys.join('.'), flags.bools) || checkAllAliases(key, flags.counts))) { - o[key] = [ o[key], value ] - } else { - o[key] = value - } - } - - // extend the aliases list with inferred aliases. - function extendAliases () { - Array.prototype.slice.call(arguments).forEach(function (obj) { - Object.keys(obj || {}).forEach(function (key) { - // short-circuit if we've already added a key - // to the aliases array, for example it might - // exist in both 'opts.default' and 'opts.key'. - if (flags.aliases[key]) return - - flags.aliases[key] = [].concat(aliases[key] || []) - // For "--option-name", also set argv.optionName - flags.aliases[key].concat(key).forEach(function (x) { - if (/-/.test(x) && configuration['camel-case-expansion']) { - var c = camelCase(x) - if (c !== key && flags.aliases[key].indexOf(c) === -1) { - flags.aliases[key].push(c) - newAliases[c] = true - } - } - }) - flags.aliases[key].forEach(function (x) { - flags.aliases[x] = [key].concat(flags.aliases[key].filter(function (y) { - return x !== y - })) - }) - }) - }) - } - - // check if a flag is set for any of a key's aliases. - function checkAllAliases (key, flag) { - var isSet = false - var toCheck = [].concat(flags.aliases[key] || [], key) - - toCheck.forEach(function (key) { - if (flag[key]) isSet = flag[key] - }) - - return isSet - } - - function setDefaulted (key) { - [].concat(flags.aliases[key] || [], key).forEach(function (k) { - flags.defaulted[k] = true - }) - } - - function unsetDefaulted (key) { - [].concat(flags.aliases[key] || [], key).forEach(function (k) { - delete flags.defaulted[k] - }) - } - - // return a default value, given the type of a flag., - // e.g., key of type 'string' will default to '', rather than 'true'. - function defaultForType (type) { - var def = { - boolean: true, - string: '', - number: undefined, - array: [] - } - - return def[type] - } - - // given a flag, enforce a default type. - function guessType (key, flags) { - var type = 'boolean' - - if (checkAllAliases(key, flags.strings)) type = 'string' - else if (checkAllAliases(key, flags.numbers)) type = 'number' - else if (checkAllAliases(key, flags.arrays)) type = 'array' - - return type - } - - function isNumber (x) { - if (typeof x === 'number') return true - if (/^0x[0-9a-f]+$/i.test(x)) return true - return /^[-+]?(?:\d+(?:\.\d*)?|\.\d+)(e[-+]?\d+)?$/.test(x) - } - - function isUndefined (num) { - return num === undefined - } - - return { - argv: argv, - error: error, - aliases: flags.aliases, - newAliases: newAliases, - configuration: configuration - } -} - -// if any aliases reference each other, we should -// merge them together. -function combineAliases (aliases) { - var aliasArrays = [] - var change = true - var combined = {} - - // turn alias lookup hash {key: ['alias1', 'alias2']} into - // a simple array ['key', 'alias1', 'alias2'] - Object.keys(aliases).forEach(function (key) { - aliasArrays.push( - [].concat(aliases[key], key) - ) - }) - - // combine arrays until zero changes are - // made in an iteration. - while (change) { - change = false - for (var i = 0; i < aliasArrays.length; i++) { - for (var ii = i + 1; ii < aliasArrays.length; ii++) { - var intersect = aliasArrays[i].filter(function (v) { - return aliasArrays[ii].indexOf(v) !== -1 - }) - - if (intersect.length) { - aliasArrays[i] = aliasArrays[i].concat(aliasArrays[ii]) - aliasArrays.splice(ii, 1) - change = true - break - } - } - } - } - - // map arrays back to the hash-lookup (de-dupe while - // we're at it). - aliasArrays.forEach(function (aliasArray) { - aliasArray = aliasArray.filter(function (v, i, self) { - return self.indexOf(v) === i - }) - combined[aliasArray.pop()] = aliasArray - }) - - return combined -} - -function assign (defaults, configuration) { - var o = {} - configuration = configuration || {} - - Object.keys(defaults).forEach(function (k) { - o[k] = defaults[k] - }) - Object.keys(configuration).forEach(function (k) { - o[k] = configuration[k] - }) - - return o -} - -// this function should only be called when a count is given as an arg -// it is NOT called to set a default value -// thus we can start the count at 1 instead of 0 -function increment (orig) { - return orig !== undefined ? orig + 1 : 1 -} - -function Parser (args, opts) { - var result = parse(args.slice(), opts) - - return result.argv -} - -// parse arguments and return detailed -// meta information, aliases, etc. -Parser.detailed = function (args, opts) { - return parse(args.slice(), opts) -} - -module.exports = Parser diff --git a/node_modules/ts-jest/node_modules/yargs-parser/lib/tokenize-arg-string.js b/node_modules/ts-jest/node_modules/yargs-parser/lib/tokenize-arg-string.js deleted file mode 100644 index 6c8d23ef2..000000000 --- a/node_modules/ts-jest/node_modules/yargs-parser/lib/tokenize-arg-string.js +++ /dev/null @@ -1,40 +0,0 @@ -// take an un-split argv string and tokenize it. -module.exports = function (argString) { - if (Array.isArray(argString)) return argString - - argString = argString.trim() - - var i = 0 - var prevC = null - var c = null - var opening = null - var args = [] - - for (var ii = 0; ii < argString.length; ii++) { - prevC = c - c = argString.charAt(ii) - - // split on spaces unless we're in quotes. - if (c === ' ' && !opening) { - if (!(prevC === ' ')) { - i++ - } - continue - } - - // don't split the string if we're in matching - // opening or closing single and double quotes. - if (c === opening) { - opening = null - continue - } else if ((c === "'" || c === '"') && !opening) { - opening = c - continue - } - - if (!args[i]) args[i] = '' - args[i] += c - } - - return args -} diff --git a/node_modules/ts-jest/node_modules/yargs-parser/package.json b/node_modules/ts-jest/node_modules/yargs-parser/package.json index fac3610f9..ff89ea7ca 100644 --- a/node_modules/ts-jest/node_modules/yargs-parser/package.json +++ b/node_modules/ts-jest/node_modules/yargs-parser/package.json @@ -1,33 +1,27 @@ { - "_args": [ - [ - "yargs-parser@10.1.0", - "/Users/drew.heavner/Documents/Github/sign-android-release" - ] - ], - "_development": true, - "_from": "yargs-parser@10.1.0", - "_id": "yargs-parser@10.1.0", + "_from": "yargs-parser@20.x", + "_id": "yargs-parser@20.2.4", "_inBundle": false, - "_integrity": "sha512-VCIyR1wJoEBZUqk5PA+oOBF6ypbwh5aNB3I50guxAL/quggdfs4TtNHQrSazFA3fYZ+tEqfs0zIGlv0c/rgjbQ==", + "_integrity": "sha512-WOkpgNhPTlE73h4VFAFsOnomJVaovO8VqLDzy5saChRBFQFBoMYirowyW+Q9HB4HFF4Z7VZTiG3iSzJJA29yRA==", "_location": "/ts-jest/yargs-parser", "_phantomChildren": {}, "_requested": { - "type": "version", + "type": "range", "registry": true, - "raw": "yargs-parser@10.1.0", + "raw": "yargs-parser@20.x", "name": "yargs-parser", "escapedName": "yargs-parser", - "rawSpec": "10.1.0", + "rawSpec": "20.x", "saveSpec": null, - "fetchSpec": "10.1.0" + "fetchSpec": "20.x" }, "_requiredBy": [ "/ts-jest" ], - "_resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-10.1.0.tgz", - "_spec": "10.1.0", - "_where": "/Users/drew.heavner/Documents/Github/sign-android-release", + "_resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.4.tgz", + "_shasum": "b42890f14566796f85ae8e3a25290d205f154a54", + "_spec": "yargs-parser@20.x", + "_where": "/Users/drew.heavner/Documents/Github/sign-android-release/node_modules/ts-jest", "author": { "name": "Ben Coe", "email": "ben@npmjs.com" @@ -35,21 +29,50 @@ "bugs": { "url": "https://github.com/yargs/yargs-parser/issues" }, - "dependencies": { - "camelcase": "^4.1.0" - }, + "bundleDependencies": false, + "deprecated": false, "description": "the mighty option parser used by yargs", "devDependencies": { - "chai": "^3.5.0", - "coveralls": "^2.11.12", - "mocha": "^3.0.1", - "nyc": "^11.4.1", - "standard": "^10.0.2", - "standard-version": "^4.3.0" + "@types/chai": "^4.2.11", + "@types/mocha": "^8.0.0", + "@types/node": "^10.0.3", + "@typescript-eslint/eslint-plugin": "^3.10.1", + "@typescript-eslint/parser": "^3.10.1", + "@wessberg/rollup-plugin-ts": "^1.2.28", + "c8": "^7.3.0", + "chai": "^4.2.0", + "cross-env": "^7.0.2", + "eslint": "^7.0.0", + "eslint-plugin-import": "^2.20.1", + "eslint-plugin-node": "^11.0.0", + "gts": "^3.0.0", + "mocha": "^8.0.0", + "puppeteer": "^5.2.1", + "rimraf": "^3.0.2", + "rollup": "^2.22.1", + "rollup-plugin-cleanup": "^3.1.1", + "serve": "^11.3.2", + "standardx": "^7.0.0", + "start-server-and-test": "^1.11.2", + "ts-transform-default-export": "^1.0.2", + "typescript": "^4.0.0" + }, + "engines": { + "node": ">=10" + }, + "exports": { + ".": [ + { + "import": "./build/lib/index.js", + "require": "./build/index.cjs" + }, + "./build/index.cjs" + ] }, "files": [ - "lib", - "index.js" + "browser.js", + "build", + "!*.d.ts" ], "homepage": "https://github.com/yargs/yargs-parser#readme", "keywords": [ @@ -64,16 +87,33 @@ "argument" ], "license": "ISC", - "main": "index.js", + "main": "build/index.cjs", + "module": "./build/lib/index.js", "name": "yargs-parser", "repository": { - "url": "git+ssh://git@github.com/yargs/yargs-parser.git" + "type": "git", + "url": "git+https://github.com/yargs/yargs-parser.git" }, "scripts": { - "coverage": "nyc report --reporter=text-lcov | coveralls", - "posttest": "standard", - "release": "standard-version", - "test": "nyc mocha test/*.js" + "build:cjs": "rollup -c", + "check": "standardx '**/*.ts' && standardx '**/*.js' && standardx '**/*.cjs'", + "compile": "tsc", + "coverage": "c8 report --check-coverage", + "fix": "standardx --fix '**/*.ts' && standardx --fix '**/*.js' && standardx --fix '**/*.cjs'", + "postcompile": "npm run build:cjs", + "precompile": "rimraf build", + "prepare": "npm run compile", + "pretest": "rimraf build && tsc -p tsconfig.test.json && cross-env NODE_ENV=test npm run build:cjs", + "pretest:typescript": "npm run pretest", + "test": "c8 --reporter=text --reporter=html mocha test/*.cjs", + "test:browser": "start-server-and-test 'serve ./ -p 8080' http://127.0.0.1:8080/package.json 'node ./test/browser/yargs-test.cjs'", + "test:typescript": "c8 mocha ./build/test/typescript/*.js" + }, + "standardx": { + "ignore": [ + "build" + ] }, - "version": "10.1.0" + "type": "module", + "version": "20.2.4" } diff --git a/node_modules/ts-jest/package.json b/node_modules/ts-jest/package.json index 7bb3874bc..413ee5cd4 100644 --- a/node_modules/ts-jest/package.json +++ b/node_modules/ts-jest/package.json @@ -1,32 +1,34 @@ { - "_args": [ - [ - "ts-jest@24.0.2", - "/Users/drew.heavner/Documents/Github/sign-android-release" - ] - ], - "_development": true, - "_from": "ts-jest@24.0.2", - "_id": "ts-jest@24.0.2", + "_from": "ts-jest@26.4.4", + "_id": "ts-jest@26.4.4", "_inBundle": false, - "_integrity": "sha512-h6ZCZiA1EQgjczxq+uGLXQlNgeg02WWJBbeT8j6nyIBRQdglqbvzDoHahTEIiS6Eor6x8mK6PfZ7brQ9Q6tzHw==", + "_integrity": "sha512-3lFWKbLxJm34QxyVNNCgXX1u4o/RV0myvA2y2Bxm46iGIjKlaY0own9gIckbjZJPn+WaJEnfPPJ20HHGpoq4yg==", "_location": "/ts-jest", - "_phantomChildren": {}, + "_phantomChildren": { + "@types/istanbul-lib-coverage": "2.0.1", + "@types/istanbul-lib-report": "1.1.1", + "@types/node": "12.6.9", + "@types/yargs-parser": "15.0.0", + "is-ci": "2.0.0", + "picomatch": "2.2.2" + }, "_requested": { "type": "version", "registry": true, - "raw": "ts-jest@24.0.2", + "raw": "ts-jest@26.4.4", "name": "ts-jest", "escapedName": "ts-jest", - "rawSpec": "24.0.2", + "rawSpec": "26.4.4", "saveSpec": null, - "fetchSpec": "24.0.2" + "fetchSpec": "26.4.4" }, "_requiredBy": [ - "#DEV:/" + "#DEV:/", + "#USER" ], - "_resolved": "https://registry.npmjs.org/ts-jest/-/ts-jest-24.0.2.tgz", - "_spec": "24.0.2", + "_resolved": "https://registry.npmjs.org/ts-jest/-/ts-jest-26.4.4.tgz", + "_shasum": "61f13fb21ab400853c532270e52cc0ed7e502c49", + "_spec": "ts-jest@26.4.4", "_where": "/Users/drew.heavner/Documents/Github/sign-android-release", "author": { "name": "Kulshekhar Kabra", @@ -39,65 +41,85 @@ "bugs": { "url": "https://github.com/kulshekhar/ts-jest/issues" }, + "bundleDependencies": false, "contributors": [ { "name": "Huafu Gandon", "email": "huafu.gandon@gmail.com", "url": "https://github.com/huafu" + }, + { + "name": "Anh Pham", + "email": "anhpnnd@gmail.com", + "url": "https://github.com/ahnpnl" + }, + { + "name": "Gustav Wengel", + "email": "gustavwengel@gmail.com", + "url": "https://github.com/GeeWee" } ], "dependencies": { + "@types/jest": "26.x", "bs-logger": "0.x", "buffer-from": "1.x", "fast-json-stable-stringify": "2.x", + "jest-util": "^26.1.0", "json5": "2.x", + "lodash.memoize": "4.x", "make-error": "1.x", - "mkdirp": "0.x", - "resolve": "1.x", - "semver": "^5.5", - "yargs-parser": "10.x" + "mkdirp": "1.x", + "semver": "7.x", + "yargs-parser": "20.x" }, + "deprecated": false, "description": "A preprocessor with source maps support to help use TypeScript with Jest", "devDependencies": { - "@commitlint/cli": "7.x", - "@commitlint/config-conventional": "7.x", + "@commitlint/cli": "11.x", + "@commitlint/config-angular": "^11.0.0", + "@jest/transform": "26.x", + "@jest/types": "26.x", "@types/babel__core": "7.x", "@types/buffer-from": "latest", "@types/cross-spawn": "latest", "@types/fs-extra": "latest", - "@types/jest": "23.x", "@types/js-yaml": "latest", "@types/json5": "latest", "@types/lodash.memoize": "4.x", "@types/lodash.merge": "4.x", "@types/lodash.set": "4.x", + "@types/micromatch": "4.x", "@types/mkdirp": "latest", - "@types/node": "10.x", - "@types/resolve": "latest", + "@types/node": "14.x", + "@types/react": "16.x", "@types/semver": "latest", "@types/yargs": "latest", + "@types/yargs-parser": "15.x", + "@typescript-eslint/eslint-plugin": "4.x", + "@typescript-eslint/parser": "4.x", "conventional-changelog-cli": "2.x", "cross-spawn": "latest", - "eslint": "latest", - "fs-extra": "latest", + "eslint": "7.x", + "eslint-config-prettier": "latest", + "eslint-plugin-jest": "latest", + "eslint-plugin-jsdoc": "latest", + "eslint-plugin-prettier": "latest", + "execa": "latest", + "fs-extra": "9.x", "glob-gitignore": "latest", - "husky": "1.x", - "jest": "24.x", + "husky": "4.x", + "jest": "26.x", "js-yaml": "latest", "lint-staged": "latest", - "lodash.memoize": "4.x", "lodash.merge": "4.x", "lodash.set": "4.x", "npm-run-all": "latest", - "prettier": "latest", + "prettier": "2.x", "source-map": "latest", - "tslint": "latest", - "tslint-config-prettier": "latest", - "tslint-plugin-prettier": "latest", - "typescript": "3.x" + "typescript": "4.x" }, "engines": { - "node": ">= 6" + "node": ">= 10" }, "homepage": "https://kulshekhar.github.io/ts-jest", "husky": { @@ -116,21 +138,16 @@ ], "license": "MIT", "lint-staged": { - "linters": { - "*.{ts,tsx}": [ - "tslint --fix", - "git add" - ], - "*.{js,jsx}": [ - "eslint --fix", - "git add" - ] - } + "*.{ts,tsx,js,jsx}": [ + "eslint --fix", + "git add" + ] }, "main": "dist/index.js", "name": "ts-jest", "peerDependencies": { - "jest": ">=24 <25" + "jest": ">=26 <27", + "typescript": ">=3.8 <5.0" }, "repository": { "type": "git", @@ -138,34 +155,31 @@ }, "scripts": { "build": "tsc -p tsconfig.build.json", - "build:watch": "tsc -p tsconfig.build.json -w", - "changelog": "conventional-changelog -p angular -i CHANGELOG.md -s -r 0", + "changelog": "conventional-changelog -p angular -i CHANGELOG.md -s -r 1", "clean": "node scripts/clean.js", "doc": "cd docs && bundle exec jekyll serve --livereload", "doc:build": "cd docs && bundle exec jekyll build", "doc:build-commit": "npm run doc:build && cd docs/_site && git add --all && git commit -m \"Updates github pages\"", "doc:link": "git worktree add docs/_site gh-pages", "doc:unlink": "git worktree prune", - "lint": "run-s lint:ts lint:js", - "lint:fix": "run-s lint:fix:ts lint:fix:js", - "lint:fix:js": "eslint . --fix", - "lint:fix:ts": "tslint --fix --project .", - "lint:js": "eslint . -f stylish", - "lint:ts": "tslint -t stylish --project .", + "lint": "eslint --ext .js,.ts .", + "lint:fix": "eslint --fix --ext .js,.ts .", "postbuild": "node scripts/post-build.js", "prebuild": "node scripts/clean-dist.js", "prepare": "npm run build", "prepublishOnly": "npm run test", - "pretest": "npm run lint", "preversion": "npm run test", "test": "run-s -s test:e2e \"test:unit -- {@}\" --", "test:e2e": "node scripts/e2e.js", + "test:e2e:update-snaphots": "node scripts/e2e.js --updateSnapshot", "test:external": "node scripts/test-external-project.js", + "test:external-repos": "npm run test:external external-repos", "test:prepare": "npm run test:e2e -- --prepareOnly", "test:unit": "jest", "typecheck": "tsc -p .", + "update:e2e": "node scripts/update-e2e-templates.js", "version": "npm run changelog && git add CHANGELOG.md" }, "types": "dist/index.d.ts", - "version": "24.0.2" + "version": "26.4.4" } diff --git a/node_modules/ts-jest/preprocessor.js b/node_modules/ts-jest/preprocessor.js index 19a071d4b..c23a1d0f2 100644 --- a/node_modules/ts-jest/preprocessor.js +++ b/node_modules/ts-jest/preprocessor.js @@ -1,3 +1,4 @@ +// eslint-disable-next-line no-console console.warn( 'ts-jest[main] (WARN) Replace any occurrences of "ts-jest/dist/preprocessor.js" or ' + ' "/node_modules/ts-jest/preprocessor.js"' + diff --git a/node_modules/ts-jest/presets/create.js b/node_modules/ts-jest/presets/create.js deleted file mode 100644 index 50c361c35..000000000 --- a/node_modules/ts-jest/presets/create.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('../dist/config/create-jest-preset').createJestPreset diff --git a/node_modules/ts-jest/presets/index.d.ts b/node_modules/ts-jest/presets/index.d.ts deleted file mode 100644 index b1e0e57b6..000000000 --- a/node_modules/ts-jest/presets/index.d.ts +++ /dev/null @@ -1,5 +0,0 @@ -import { TsJestPresets } from '../dist/config/create-jest-preset' - -export const defaults: TsJestPresets -export const jsWithTs: TsJestPresets -export const jsWithBabel: TsJestPresets diff --git a/node_modules/ts-jest/presets/index.js b/node_modules/ts-jest/presets/index.js index 95cca6d7b..2d67bb225 100644 --- a/node_modules/ts-jest/presets/index.js +++ b/node_modules/ts-jest/presets/index.js @@ -1,13 +1,20 @@ -const create = require('./create') +const { createJestPreset } = require('../dist/presets/create-jest-preset') module.exports = { - get defaults() { return create() }, - get jsWithTs() { return create({ allowJs: true }) }, + get defaults() { + return createJestPreset() + }, + get jsWithTs() { + return createJestPreset({ allowJs: true }) + }, get jsWithBabel() { - return create({ allowJs: false }, { - transform: { - '^.+\\.jsx?$': 'babel-jest', - }, - }) + return createJestPreset( + { allowJs: false }, + { + transform: { + '^.+\\.jsx?$': 'babel-jest', + }, + } + ) }, } diff --git a/node_modules/ts-jest/utils/index.d.ts b/node_modules/ts-jest/utils/index.d.ts index 10294287c..85bc9e02a 100644 --- a/node_modules/ts-jest/utils/index.d.ts +++ b/node_modules/ts-jest/utils/index.d.ts @@ -1 +1,3 @@ -export * from '../dist/util/exported' +export { pathsToModuleNameMapper } from '../dist/config/paths-to-module-name-mapper' +export { createJestPreset } from '../dist/presets/create-jest-preset' +export { mocked } from '../dist/utils/testing' diff --git a/node_modules/ts-jest/utils/index.js b/node_modules/ts-jest/utils/index.js index 11c963bb8..00dce911e 100644 --- a/node_modules/ts-jest/utils/index.js +++ b/node_modules/ts-jest/utils/index.js @@ -1 +1,15 @@ -module.exports = require('../dist/util/exported') +const { createJestPreset } = require('../dist/presets/create-jest-preset') +const { mocked } = require('../dist/utils/testing') +const { pathsToModuleNameMapper } = require('../dist/config/paths-to-module-name-mapper') + +module.exports = { + get mocked() { + return mocked + }, + get createJestPreset() { + return createJestPreset + }, + get pathsToModuleNameMapper() { + return pathsToModuleNameMapper + }, +} diff --git a/node_modules/uglify-js/LICENSE b/node_modules/uglify-js/LICENSE deleted file mode 100644 index 122e8fb97..000000000 --- a/node_modules/uglify-js/LICENSE +++ /dev/null @@ -1,29 +0,0 @@ -UglifyJS is released under the BSD license: - -Copyright 2012-2019 (c) Mihai Bazon - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: - - * Redistributions of source code must retain the above - copyright notice, this list of conditions and the following - disclaimer. - - * Redistributions in binary form must reproduce the above - copyright notice, this list of conditions and the following - disclaimer in the documentation and/or other materials - provided with the distribution. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER “AS IS” AND ANY -EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER BE -LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, -OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, -PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR -TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF -THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF -SUCH DAMAGE. diff --git a/node_modules/uglify-js/README.md b/node_modules/uglify-js/README.md deleted file mode 100644 index f686889d3..000000000 --- a/node_modules/uglify-js/README.md +++ /dev/null @@ -1,1140 +0,0 @@ -UglifyJS 3 -========== - -UglifyJS is a JavaScript parser, minifier, compressor and beautifier toolkit. - -#### Note: -- **`uglify-js@3` has a simplified [API](#api-reference) and [CLI](#command-line-usage) that is not backwards compatible with [`uglify-js@2`](https://github.com/mishoo/UglifyJS2/tree/v2.x)**. -- **Documentation for UglifyJS `2.x` releases can be found [here](https://github.com/mishoo/UglifyJS2/tree/v2.x)**. -- `uglify-js` only supports JavaScript (ECMAScript 5). -- To minify ECMAScript 2015 or above, transpile using tools like [Babel](https://babeljs.io/). - -Install -------- - -First make sure you have installed the latest version of [node.js](http://nodejs.org/) -(You may need to restart your computer after this step). - -From NPM for use as a command line app: - - npm install uglify-js -g - -From NPM for programmatic use: - - npm install uglify-js - -# Command line usage - - uglifyjs [input files] [options] - -UglifyJS can take multiple input files. It's recommended that you pass the -input files first, then pass the options. UglifyJS will parse input files -in sequence and apply any compression options. The files are parsed in the -same global scope, that is, a reference from a file to some -variable/function declared in another file will be matched properly. - -If no input file is specified, UglifyJS will read from STDIN. - -If you wish to pass your options before the input files, separate the two with -a double dash to prevent input files being used as option arguments: - - uglifyjs --compress --mangle -- input.js - -### Command line options - -``` - -h, --help Print usage information. - `--help options` for details on available options. - -V, --version Print version number. - -p, --parse Specify parser options: - `acorn` Use Acorn for parsing. - `bare_returns` Allow return outside of functions. - Useful when minifying CommonJS - modules and Userscripts that may - be anonymous function wrapped (IIFE) - by the .user.js engine `caller`. - `expression` Parse a single expression, rather than - a program (for parsing JSON). - `spidermonkey` Assume input files are SpiderMonkey - AST format (as JSON). - -c, --compress [options] Enable compressor/specify compressor options: - `pure_funcs` List of functions that can be safely - removed when their return values are - not used. - -m, --mangle [options] Mangle names/specify mangler options: - `reserved` List of names that should not be mangled. - --mangle-props [options] Mangle properties/specify mangler options: - `builtins` Mangle property names that overlaps - with standard JavaScript globals. - `debug` Add debug prefix and suffix. - `domprops` Mangle property names that overlaps - with DOM properties. - `keep_quoted` Only mangle unquoted properties. - `regex` Only mangle matched property names. - `reserved` List of names that should not be mangled. - -b, --beautify [options] Beautify output/specify output options: - `beautify` Enabled with `--beautify` by default. - `preamble` Preamble to prepend to the output. You - can use this to insert a comment, for - example for licensing information. - This will not be parsed, but the source - map will adjust for its presence. - `quote_style` Quote style: - 0 - auto - 1 - single - 2 - double - 3 - original - `wrap_iife` Wrap IIFEs in parenthesis. Note: you may - want to disable `negate_iife` under - compressor options. - -o, --output Output file path (default STDOUT). Specify `ast` or - `spidermonkey` to write UglifyJS or SpiderMonkey AST - as JSON to STDOUT respectively. - --comments [filter] Preserve copyright comments in the output. By - default this works like Google Closure, keeping - JSDoc-style comments that contain "@license" or - "@preserve". You can optionally pass one of the - following arguments to this flag: - - "all" to keep all comments - - a valid JS RegExp like `/foo/` or `/^!/` to - keep only matching comments. - Note that currently not *all* comments can be - kept when compression is on, because of dead - code removal or cascading statements into - sequences. - --config-file Read `minify()` options from JSON file. - -d, --define [=value] Global definitions. - -e, --enclose [arg[:value]] Embed everything in a big function, with configurable - argument(s) & value(s). - --ie8 Support non-standard Internet Explorer 8. - Equivalent to setting `ie8: true` in `minify()` - for `compress`, `mangle` and `output` options. - By default UglifyJS will not try to be IE-proof. - --keep-fnames Do not mangle/drop function names. Useful for - code relying on Function.prototype.name. - --name-cache File to hold mangled name mappings. - --self Build UglifyJS as a library (implies --wrap UglifyJS) - --source-map [options] Enable source map/specify source map options: - `base` Path to compute relative paths from input files. - `content` Input source map, useful if you're compressing - JS that was generated from some other original - code. Specify "inline" if the source map is - included within the sources. - `filename` Filename and/or location of the output source - (sets `file` attribute in source map). - `includeSources` Pass this flag if you want to include - the content of source files in the - source map as sourcesContent property. - `root` Path to the original source to be included in - the source map. - `url` If specified, path to the source map to append in - `//# sourceMappingURL`. - --timings Display operations run time on STDERR. - --toplevel Compress and/or mangle variables in top level scope. - --verbose Print diagnostic messages. - --warn Print warning messages. - --wrap Embed everything in a big function, making the - “exports” and “global” variables available. You - need to pass an argument to this option to - specify the name that your module will take - when included in, say, a browser. -``` - -Specify `--output` (`-o`) to declare the output file. Otherwise the output -goes to STDOUT. - -## CLI source map options - -UglifyJS can generate a source map file, which is highly useful for -debugging your compressed JavaScript. To get a source map, pass -`--source-map --output output.js` (source map will be written out to -`output.js.map`). - -Additional options: - -- `--source-map "filename=''"` to specify the name of the source map. The value of - `filename` is only used to set `file` attribute (see [the spec][sm-spec]) - in source map file. - -- `--source-map "root=''"` to pass the URL where the original files can be found. - -- `--source-map "url=''"` to specify the URL where the source map can be found. - Otherwise UglifyJS assumes HTTP `X-SourceMap` is being used and will omit the - `//# sourceMappingURL=` directive. - -For example: - - uglifyjs js/file1.js js/file2.js \ - -o foo.min.js -c -m \ - --source-map "root='http://foo.com/src',url='foo.min.js.map'" - -The above will compress and mangle `file1.js` and `file2.js`, will drop the -output in `foo.min.js` and the source map in `foo.min.js.map`. The source -mapping will refer to `http://foo.com/src/js/file1.js` and -`http://foo.com/src/js/file2.js` (in fact it will list `http://foo.com/src` -as the source map root, and the original files as `js/file1.js` and -`js/file2.js`). - -### Composed source map - -When you're compressing JS code that was output by a compiler such as -CoffeeScript, mapping to the JS code won't be too helpful. Instead, you'd -like to map back to the original code (i.e. CoffeeScript). UglifyJS has an -option to take an input source map. Assuming you have a mapping from -CoffeeScript → compiled JS, UglifyJS can generate a map from CoffeeScript → -compressed JS by mapping every token in the compiled JS to its original -location. - -To use this feature pass `--source-map "content='/path/to/input/source.map'"` -or `--source-map "content=inline"` if the source map is included inline with -the sources. - -## CLI compress options - -You need to pass `--compress` (`-c`) to enable the compressor. Optionally -you can pass a comma-separated list of [compress options](#compress-options). - -Options are in the form `foo=bar`, or just `foo` (the latter implies -a boolean option that you want to set `true`; it's effectively a -shortcut for `foo=true`). - -Example: - - uglifyjs file.js -c toplevel,sequences=false - -## CLI mangle options - -To enable the mangler you need to pass `--mangle` (`-m`). The following -(comma-separated) options are supported: - -- `toplevel` (default `false`) -- mangle names declared in the top level scope. - -- `eval` (default `false`) -- mangle names visible in scopes where `eval` or `with` are used. - -When mangling is enabled but you want to prevent certain names from being -mangled, you can declare those names with `--mangle reserved` — pass a -comma-separated list of names. For example: - - uglifyjs ... -m reserved=['$','require','exports'] - -to prevent the `require`, `exports` and `$` names from being changed. - -### CLI mangling property names (`--mangle-props`) - -**Note:** THIS WILL PROBABLY BREAK YOUR CODE. Mangling property names -is a separate step, different from variable name mangling. Pass -`--mangle-props` to enable it. It will mangle all properties in the -input code with the exception of built in DOM properties and properties -in core JavaScript classes. For example: - -```javascript -// example.js -var x = { - baz_: 0, - foo_: 1, - calc: function() { - return this.foo_ + this.baz_; - } -}; -x.bar_ = 2; -x["baz_"] = 3; -console.log(x.calc()); -``` -Mangle all properties (except for JavaScript `builtins`): -```bash -$ uglifyjs example.js -c -m --mangle-props -``` -```javascript -var x={o:0,_:1,l:function(){return this._+this.o}};x.t=2,x.o=3,console.log(x.l()); -``` -Mangle all properties except for `reserved` properties: -```bash -$ uglifyjs example.js -c -m --mangle-props reserved=[foo_,bar_] -``` -```javascript -var x={o:0,foo_:1,_:function(){return this.foo_+this.o}};x.bar_=2,x.o=3,console.log(x._()); -``` -Mangle all properties matching a `regex`: -```bash -$ uglifyjs example.js -c -m --mangle-props regex=/_$/ -``` -```javascript -var x={o:0,_:1,calc:function(){return this._+this.o}};x.l=2,x.o=3,console.log(x.calc()); -``` - -Combining mangle properties options: -```bash -$ uglifyjs example.js -c -m --mangle-props regex=/_$/,reserved=[bar_] -``` -```javascript -var x={o:0,_:1,calc:function(){return this._+this.o}};x.bar_=2,x.o=3,console.log(x.calc()); -``` - -In order for this to be of any use, we avoid mangling standard JS names by -default (`--mangle-props builtins` to override). - -A default exclusion file is provided in `tools/domprops.json` which should -cover most standard JS and DOM properties defined in various browsers. Pass -`--mangle-props domprops` to disable this feature. - -A regular expression can be used to define which property names should be -mangled. For example, `--mangle-props regex=/^_/` will only mangle property -names that start with an underscore. - -When you compress multiple files using this option, in order for them to -work together in the end we need to ensure somehow that one property gets -mangled to the same name in all of them. For this, pass `--name-cache filename.json` -and UglifyJS will maintain these mappings in a file which can then be reused. -It should be initially empty. Example: - -```bash -$ rm -f /tmp/cache.json # start fresh -$ uglifyjs file1.js file2.js --mangle-props --name-cache /tmp/cache.json -o part1.js -$ uglifyjs file3.js file4.js --mangle-props --name-cache /tmp/cache.json -o part2.js -``` - -Now, `part1.js` and `part2.js` will be consistent with each other in terms -of mangled property names. - -Using the name cache is not necessary if you compress all your files in a -single call to UglifyJS. - -### Mangling unquoted names (`--mangle-props keep_quoted`) - -Using quoted property name (`o["foo"]`) reserves the property name (`foo`) -so that it is not mangled throughout the entire script even when used in an -unquoted style (`o.foo`). Example: - -```javascript -// stuff.js -var o = { - "foo": 1, - bar: 3 -}; -o.foo += o.bar; -console.log(o.foo); -``` -```bash -$ uglifyjs stuff.js --mangle-props keep_quoted -c -m -``` -```javascript -var o={foo:1,o:3};o.foo+=o.o,console.log(o.foo); -``` - -### Debugging property name mangling - -You can also pass `--mangle-props debug` in order to mangle property names -without completely obscuring them. For example the property `o.foo` -would mangle to `o._$foo$_` with this option. This allows property mangling -of a large codebase while still being able to debug the code and identify -where mangling is breaking things. - -```bash -$ uglifyjs stuff.js --mangle-props debug -c -m -``` -```javascript -var o={_$foo$_:1,_$bar$_:3};o._$foo$_+=o._$bar$_,console.log(o._$foo$_); -``` - -You can also pass a custom suffix using `--mangle-props debug=XYZ`. This would then -mangle `o.foo` to `o._$foo$XYZ_`. You can change this each time you compile a -script to identify how a property got mangled. One technique is to pass a -random number on every compile to simulate mangling changing with different -inputs (e.g. as you update the input script with new properties), and to help -identify mistakes like writing mangled keys to storage. - - -# API Reference - -Assuming installation via NPM, you can load UglifyJS in your application -like this: -```javascript -var UglifyJS = require("uglify-js"); -``` - -There is a single high level function, **`minify(code, options)`**, -which will perform all minification [phases](#minify-options) in a configurable -manner. By default `minify()` will enable the options [`compress`](#compress-options) -and [`mangle`](#mangle-options). Example: -```javascript -var code = "function add(first, second) { return first + second; }"; -var result = UglifyJS.minify(code); -console.log(result.error); // runtime error, or `undefined` if no error -console.log(result.code); // minified output: function add(n,d){return n+d} -``` - -You can `minify` more than one JavaScript file at a time by using an object -for the first argument where the keys are file names and the values are source -code: -```javascript -var code = { - "file1.js": "function add(first, second) { return first + second; }", - "file2.js": "console.log(add(1 + 2, 3 + 4));" -}; -var result = UglifyJS.minify(code); -console.log(result.code); -// function add(d,n){return d+n}console.log(add(3,7)); -``` - -The `toplevel` option: -```javascript -var code = { - "file1.js": "function add(first, second) { return first + second; }", - "file2.js": "console.log(add(1 + 2, 3 + 4));" -}; -var options = { toplevel: true }; -var result = UglifyJS.minify(code, options); -console.log(result.code); -// console.log(3+7); -``` - -The `nameCache` option: -```javascript -var options = { - mangle: { - toplevel: true, - }, - nameCache: {} -}; -var result1 = UglifyJS.minify({ - "file1.js": "function add(first, second) { return first + second; }" -}, options); -var result2 = UglifyJS.minify({ - "file2.js": "console.log(add(1 + 2, 3 + 4));" -}, options); -console.log(result1.code); -// function n(n,r){return n+r} -console.log(result2.code); -// console.log(n(3,7)); -``` - -You may persist the name cache to the file system in the following way: -```javascript -var cacheFileName = "/tmp/cache.json"; -var options = { - mangle: { - properties: true, - }, - nameCache: JSON.parse(fs.readFileSync(cacheFileName, "utf8")) -}; -fs.writeFileSync("part1.js", UglifyJS.minify({ - "file1.js": fs.readFileSync("file1.js", "utf8"), - "file2.js": fs.readFileSync("file2.js", "utf8") -}, options).code, "utf8"); -fs.writeFileSync("part2.js", UglifyJS.minify({ - "file3.js": fs.readFileSync("file3.js", "utf8"), - "file4.js": fs.readFileSync("file4.js", "utf8") -}, options).code, "utf8"); -fs.writeFileSync(cacheFileName, JSON.stringify(options.nameCache), "utf8"); -``` - -An example of a combination of `minify()` options: -```javascript -var code = { - "file1.js": "function add(first, second) { return first + second; }", - "file2.js": "console.log(add(1 + 2, 3 + 4));" -}; -var options = { - toplevel: true, - compress: { - global_defs: { - "@console.log": "alert" - }, - passes: 2 - }, - output: { - beautify: false, - preamble: "/* uglified */" - } -}; -var result = UglifyJS.minify(code, options); -console.log(result.code); -// /* uglified */ -// alert(10);" -``` - -To produce warnings: -```javascript -var code = "function f(){ var u; return 2 + 3; }"; -var options = { warnings: true }; -var result = UglifyJS.minify(code, options); -console.log(result.error); // runtime error, `undefined` in this case -console.log(result.warnings); // [ 'Dropping unused variable u [0:1,18]' ] -console.log(result.code); // function f(){return 5} -``` - -An error example: -```javascript -var result = UglifyJS.minify({"foo.js" : "if (0) else console.log(1);"}); -console.log(JSON.stringify(result.error)); -// {"message":"Unexpected token: keyword (else)","filename":"foo.js","line":1,"col":7,"pos":7} -``` -Note: unlike `uglify-js@2.x`, the `3.x` API does not throw errors. To -achieve a similar effect one could do the following: -```javascript -var result = UglifyJS.minify(code, options); -if (result.error) throw result.error; -``` - -## Minify options - -- `compress` (default `{}`) — pass `false` to skip compressing entirely. - Pass an object to specify custom [compress options](#compress-options). - -- `ie8` (default `false`) -- set to `true` to support IE8. - -- `keep_fnames` (default: `false`) -- pass `true` to prevent discarding or mangling - of function names. Useful for code relying on `Function.prototype.name`. - -- `mangle` (default `true`) — pass `false` to skip mangling names, or pass - an object to specify [mangle options](#mangle-options) (see below). - - - `mangle.properties` (default `false`) — a subcategory of the mangle option. - Pass an object to specify custom [mangle property options](#mangle-properties-options). - -- `nameCache` (default `null`) -- pass an empty object `{}` or a previously - used `nameCache` object if you wish to cache mangled variable and - property names across multiple invocations of `minify()`. Note: this is - a read/write property. `minify()` will read the name cache state of this - object and update it during minification so that it may be - reused or externally persisted by the user. - -- `output` (default `null`) — pass an object if you wish to specify - additional [output options](#output-options). The defaults are optimized - for best compression. - -- `parse` (default `{}`) — pass an object if you wish to specify some - additional [parse options](#parse-options). - -- `sourceMap` (default `false`) -- pass an object if you wish to specify - [source map options](#source-map-options). - -- `toplevel` (default `false`) -- set to `true` if you wish to enable top level - variable and function name mangling and to drop unused variables and functions. - -- `warnings` (default `false`) — pass `true` to return compressor warnings - in `result.warnings`. Use the value `"verbose"` for more detailed warnings. - -## Minify options structure - -```javascript -{ - parse: { - // parse options - }, - compress: { - // compress options - }, - mangle: { - // mangle options - - properties: { - // mangle property options - } - }, - output: { - // output options - }, - sourceMap: { - // source map options - }, - nameCache: null, // or specify a name cache object - toplevel: false, - ie8: false, - warnings: false, -} -``` - -### Source map options - -To generate a source map: -```javascript -var result = UglifyJS.minify({"file1.js": "var a = function() {};"}, { - sourceMap: { - filename: "out.js", - url: "out.js.map" - } -}); -console.log(result.code); // minified output -console.log(result.map); // source map -``` - -Note that the source map is not saved in a file, it's just returned in -`result.map`. The value passed for `sourceMap.url` is only used to set -`//# sourceMappingURL=out.js.map` in `result.code`. The value of -`filename` is only used to set `file` attribute (see [the spec][sm-spec]) -in source map file. - -You can set option `sourceMap.url` to be `"inline"` and source map will -be appended to code. - -You can also specify sourceRoot property to be included in source map: -```javascript -var result = UglifyJS.minify({"file1.js": "var a = function() {};"}, { - sourceMap: { - root: "http://example.com/src", - url: "out.js.map" - } -}); -``` - -If you're compressing compiled JavaScript and have a source map for it, you -can use `sourceMap.content`: -```javascript -var result = UglifyJS.minify({"compiled.js": "compiled code"}, { - sourceMap: { - content: "content from compiled.js.map", - url: "minified.js.map" - } -}); -// same as before, it returns `code` and `map` -``` - -If you're using the `X-SourceMap` header instead, you can just omit `sourceMap.url`. - -## Parse options - -- `bare_returns` (default `false`) -- support top level `return` statements - -- `html5_comments` (default `true`) - -- `shebang` (default `true`) -- support `#!command` as the first line - -## Compress options - -- `arguments` (default: `true`) -- replace `arguments[index]` with function - parameter name whenever possible. - -- `assignments` (default: `true`) -- apply optimizations to assignment expressions. - -- `booleans` (default: `true`) -- various optimizations for boolean context, - for example `!!a ? b : c → a ? b : c` - -- `collapse_vars` (default: `true`) -- Collapse single-use non-constant variables, - side effects permitting. - -- `comparisons` (default: `true`) -- apply certain optimizations to binary nodes, - e.g. `!(a <= b) → a > b`, attempts to negate binary nodes, e.g. - `a = !b && !c && !d && !e → a=!(b||c||d||e)` etc. - -- `conditionals` (default: `true`) -- apply optimizations for `if`-s and conditional - expressions - -- `dead_code` (default: `true`) -- remove unreachable code - -- `directives` (default: `true`) -- remove redundant or non-standard directives - -- `drop_console` (default: `false`) -- Pass `true` to discard calls to - `console.*` functions. If you wish to drop a specific function call - such as `console.info` and/or retain side effects from function arguments - after dropping the function call then use `pure_funcs` instead. - -- `drop_debugger` (default: `true`) -- remove `debugger;` statements - -- `evaluate` (default: `true`) -- attempt to evaluate constant expressions - -- `expression` (default: `false`) -- Pass `true` to preserve completion values - from terminal statements without `return`, e.g. in bookmarklets. - -- `functions` (default: `true`) -- convert declarations from `var`to `function` - whenever possible. - -- `global_defs` (default: `{}`) -- see [conditional compilation](#conditional-compilation) - -- `hoist_funs` (default: `false`) -- hoist function declarations - -- `hoist_props` (default: `true`) -- hoist properties from constant object and - array literals into regular variables subject to a set of constraints. For example: - `var o={p:1, q:2}; f(o.p, o.q);` is converted to `f(1, 2);`. Note: `hoist_props` - works best with `mangle` enabled, the `compress` option `passes` set to `2` or higher, - and the `compress` option `toplevel` enabled. - -- `hoist_vars` (default: `false`) -- hoist `var` declarations (this is `false` - by default because it seems to increase the size of the output in general) - -- `if_return` (default: `true`) -- optimizations for if/return and if/continue - -- `inline` (default: `true`) -- inline calls to function with simple/`return` statement: - - `false` -- same as `0` - - `0` -- disabled inlining - - `1` -- inline simple functions - - `2` -- inline functions with arguments - - `3` -- inline functions with arguments and variables - - `true` -- same as `3` - -- `join_vars` (default: `true`) -- join consecutive `var` statements - -- `keep_fargs` (default: `strict`) -- Discard unused function arguments. Code - which relies on `Function.length` will break if this is done indiscriminately, - i.e. when passing `true`. Pass `false` to always retain function arguments. - -- `keep_fnames` (default: `false`) -- Pass `true` to prevent the - compressor from discarding function names. Useful for code relying on - `Function.prototype.name`. See also: the `keep_fnames` [mangle option](#mangle-options). - -- `keep_infinity` (default: `false`) -- Pass `true` to prevent `Infinity` from - being compressed into `1/0`, which may cause performance issues on Chrome. - -- `loops` (default: `true`) -- optimizations for `do`, `while` and `for` loops - when we can statically determine the condition. - -- `negate_iife` (default: `true`) -- negate "Immediately-Called Function Expressions" - where the return value is discarded, to avoid the parens that the - code generator would insert. - -- `objects` (default: `true`) -- compact duplicate keys in object literals. - -- `passes` (default: `1`) -- The maximum number of times to run compress. - In some cases more than one pass leads to further compressed code. Keep in - mind more passes will take more time. - -- `properties` (default: `true`) -- rewrite property access using the dot notation, for - example `foo["bar"] → foo.bar` - -- `pure_funcs` (default: `null`) -- You can pass an array of names and - UglifyJS will assume that those functions do not produce side - effects. DANGER: will not check if the name is redefined in scope. - An example case here, for instance `var q = Math.floor(a/b)`. If - variable `q` is not used elsewhere, UglifyJS will drop it, but will - still keep the `Math.floor(a/b)`, not knowing what it does. You can - pass `pure_funcs: [ 'Math.floor' ]` to let it know that this - function won't produce any side effect, in which case the whole - statement would get discarded. The current implementation adds some - overhead (compression will be slower). Make sure symbols under `pure_funcs` - are also under `mangle.reserved` to avoid mangling. - -- `pure_getters` (default: `"strict"`) -- If you pass `true` for - this, UglifyJS will assume that object property access - (e.g. `foo.bar` or `foo["bar"]`) doesn't have any side effects. - Specify `"strict"` to treat `foo.bar` as side-effect-free only when - `foo` is certain to not throw, i.e. not `null` or `undefined`. - -- `reduce_funcs` (default: `true`) -- Allows single-use functions to be - inlined as function expressions when permissible allowing further - optimization. Enabled by default. Option depends on `reduce_vars` - being enabled. Some code runs faster in the Chrome V8 engine if this - option is disabled. Does not negatively impact other major browsers. - -- `reduce_vars` (default: `true`) -- Improve optimization on variables assigned with and - used as constant values. - -- `sequences` (default: `true`) -- join consecutive simple statements using the - comma operator. May be set to a positive integer to specify the maximum number - of consecutive comma sequences that will be generated. If this option is set to - `true` then the default `sequences` limit is `200`. Set option to `false` or `0` - to disable. The smallest `sequences` length is `2`. A `sequences` value of `1` - is grandfathered to be equivalent to `true` and as such means `200`. On rare - occasions the default sequences limit leads to very slow compress times in which - case a value of `20` or less is recommended. - -- `side_effects` (default: `true`) -- Pass `false` to disable potentially dropping - functions marked as "pure". A function call is marked as "pure" if a comment - annotation `/*@__PURE__*/` or `/*#__PURE__*/` immediately precedes the call. For - example: `/*@__PURE__*/foo();` - -- `switches` (default: `true`) -- de-duplicate and remove unreachable `switch` branches - -- `toplevel` (default: `false`) -- drop unreferenced functions (`"funcs"`) and/or - variables (`"vars"`) in the top level scope (`false` by default, `true` to drop - both unreferenced functions and variables) - -- `top_retain` (default: `null`) -- prevent specific toplevel functions and - variables from `unused` removal (can be array, comma-separated, RegExp or - function. Implies `toplevel`) - -- `typeofs` (default: `true`) -- Transforms `typeof foo == "undefined"` into - `foo === void 0`. Note: recommend to set this value to `false` for IE10 and - earlier versions due to known issues. - -- `unsafe` (default: `false`) -- apply "unsafe" transformations (discussion below) - -- `unsafe_comps` (default: `false`) -- compress expressions like `a <= b` assuming - none of the operands can be (coerced to) `NaN`. - -- `unsafe_Function` (default: `false`) -- compress and mangle `Function(args, code)` - when both `args` and `code` are string literals. - -- `unsafe_math` (default: `false`) -- optimize numerical expressions like - `2 * x * 3` into `6 * x`, which may give imprecise floating point results. - -- `unsafe_proto` (default: `false`) -- optimize expressions like - `Array.prototype.slice.call(a)` into `[].slice.call(a)` - -- `unsafe_regexp` (default: `false`) -- enable substitutions of variables with - `RegExp` values the same way as if they are constants. - -- `unsafe_undefined` (default: `false`) -- substitute `void 0` if there is a - variable named `undefined` in scope (variable name will be mangled, typically - reduced to a single character) - -- `unused` (default: `true`) -- drop unreferenced functions and variables (simple - direct variable assignments do not count as references unless set to `"keep_assign"`) - -## Mangle options - -- `eval` (default `false`) -- Pass `true` to mangle names visible in scopes - where `eval` or `with` are used. - -- `keep_fnames` (default `false`) -- Pass `true` to not mangle function names. - Useful for code relying on `Function.prototype.name`. See also: the `keep_fnames` - [compress option](#compress-options). - -- `reserved` (default `[]`) -- Pass an array of identifiers that should be - excluded from mangling. Example: `["foo", "bar"]`. - -- `toplevel` (default `false`) -- Pass `true` to mangle names declared in the - top level scope. - -Examples: - -```javascript -// test.js -var globalVar; -function funcName(firstLongName, anotherLongName) { - var myVariable = firstLongName + anotherLongName; -} -``` -```javascript -var code = fs.readFileSync("test.js", "utf8"); - -UglifyJS.minify(code).code; -// 'function funcName(a,n){}var globalVar;' - -UglifyJS.minify(code, { mangle: { reserved: ['firstLongName'] } }).code; -// 'function funcName(firstLongName,a){}var globalVar;' - -UglifyJS.minify(code, { mangle: { toplevel: true } }).code; -// 'function n(n,a){}var a;' -``` - -### Mangle properties options - -- `builtins` (default: `false`) -- Use `true` to allow the mangling of builtin - DOM properties. Not recommended to override this setting. - -- `debug` (default: `false`) -— Mangle names with the original name still present. - Pass an empty string `""` to enable, or a non-empty string to set the debug suffix. - -- `keep_quoted` (default: `false`) -— Only mangle unquoted property names. - -- `regex` (default: `null`) -— Pass a RegExp literal to only mangle property - names matching the regular expression. - -- `reserved` (default: `[]`) -- Do not mangle property names listed in the - `reserved` array. - -## Output options - -The code generator tries to output shortest code possible by default. In -case you want beautified output, pass `--beautify` (`-b`). Optionally you -can pass additional arguments that control the code output: - -- `ascii_only` (default `false`) -- escape Unicode characters in strings and - regexps (affects directives with non-ascii characters becoming invalid) - -- `beautify` (default `true`) -- whether to actually beautify the output. - Passing `-b` will set this to true, but you might need to pass `-b` even - when you want to generate minified code, in order to specify additional - arguments, so you can use `-b beautify=false` to override it. - -- `braces` (default `false`) -- always insert braces in `if`, `for`, - `do`, `while` or `with` statements, even if their body is a single - statement. - -- `comments` (default `false`) -- pass `true` or `"all"` to preserve all - comments, `"some"` to preserve some comments, a regular expression string - (e.g. `/^!/`) or a function. - -- `indent_level` (default `4`) - -- `indent_start` (default `0`) -- prefix all lines by that many spaces - -- `inline_script` (default `true`) -- escape HTML comments and the slash in - occurrences of `` in strings - -- `keep_quoted_props` (default `false`) -- when turned on, prevents stripping - quotes from property names in object literals. - -- `max_line_len` (default `false`) -- maximum line length (for uglified code) - -- `preamble` (default `null`) -- when passed it must be a string and - it will be prepended to the output literally. The source map will - adjust for this text. Can be used to insert a comment containing - licensing information, for example. - -- `preserve_line` (default `false`) -- pass `true` to retain line numbering on - a best effort basis. - -- `quote_keys` (default `false`) -- pass `true` to quote all keys in literal - objects - -- `quote_style` (default `0`) -- preferred quote style for strings (affects - quoted property names and directives as well): - - `0` -- prefers double quotes, switches to single quotes when there are - more double quotes in the string itself. `0` is best for gzip size. - - `1` -- always use single quotes - - `2` -- always use double quotes - - `3` -- always use the original quotes - -- `semicolons` (default `true`) -- separate statements with semicolons. If - you pass `false` then whenever possible we will use a newline instead of a - semicolon, leading to more readable output of uglified code (size before - gzip could be smaller; size after gzip insignificantly larger). - -- `shebang` (default `true`) -- preserve shebang `#!` in preamble (bash scripts) - -- `webkit` (default `false`) -- enable workarounds for WebKit bugs. - PhantomJS users should set this option to `true`. - -- `width` (default `80`) -- only takes effect when beautification is on, this - specifies an (orientative) line width that the beautifier will try to - obey. It refers to the width of the line text (excluding indentation). - It doesn't work very well currently, but it does make the code generated - by UglifyJS more readable. - -- `wrap_iife` (default `false`) -- pass `true` to wrap immediately invoked - function expressions. See - [#640](https://github.com/mishoo/UglifyJS2/issues/640) for more details. - -# Miscellaneous - -### Keeping copyright notices or other comments - -You can pass `--comments` to retain certain comments in the output. By -default it will keep JSDoc-style comments that contain "@preserve", -"@license" or "@cc_on" (conditional compilation for IE). You can pass -`--comments all` to keep all the comments, or a valid JavaScript regexp to -keep only comments that match this regexp. For example `--comments /^!/` -will keep comments like `/*! Copyright Notice */`. - -Note, however, that there might be situations where comments are lost. For -example: -```javascript -function f() { - /** @preserve Foo Bar */ - function g() { - // this function is never called - } - return something(); -} -``` - -Even though it has "@preserve", the comment will be lost because the inner -function `g` (which is the AST node to which the comment is attached to) is -discarded by the compressor as not referenced. - -The safest comments where to place copyright information (or other info that -needs to be kept in the output) are comments attached to toplevel nodes. - -### The `unsafe` `compress` option - -It enables some transformations that *might* break code logic in certain -contrived cases, but should be fine for most code. You might want to try it -on your own code, it should reduce the minified size. Here's what happens -when this flag is on: - -- `new Array(1, 2, 3)` or `Array(1, 2, 3)` → `[ 1, 2, 3 ]` -- `new Object()` → `{}` -- `String(exp)` or `exp.toString()` → `"" + exp` -- `new Object/RegExp/Function/Error/Array (...)` → we discard the `new` - -### Conditional compilation - -You can use the `--define` (`-d`) switch in order to declare global -variables that UglifyJS will assume to be constants (unless defined in -scope). For example if you pass `--define DEBUG=false` then, coupled with -dead code removal UglifyJS will discard the following from the output: -```javascript -if (DEBUG) { - console.log("debug stuff"); -} -``` - -You can specify nested constants in the form of `--define env.DEBUG=false`. - -UglifyJS will warn about the condition being always false and about dropping -unreachable code; for now there is no option to turn off only this specific -warning, you can pass `warnings=false` to turn off *all* warnings. - -Another way of doing that is to declare your globals as constants in a -separate file and include it into the build. For example you can have a -`build/defines.js` file with the following: -```javascript -var DEBUG = false; -var PRODUCTION = true; -// etc. -``` - -and build your code like this: - - uglifyjs build/defines.js js/foo.js js/bar.js... -c - -UglifyJS will notice the constants and, since they cannot be altered, it -will evaluate references to them to the value itself and drop unreachable -code as usual. The build will contain the `const` declarations if you use -them. If you are targeting < ES6 environments which does not support `const`, -using `var` with `reduce_vars` (enabled by default) should suffice. - -### Conditional compilation API - -You can also use conditional compilation via the programmatic API. With the difference that the -property name is `global_defs` and is a compressor property: - -```javascript -var result = UglifyJS.minify(fs.readFileSync("input.js", "utf8"), { - compress: { - dead_code: true, - global_defs: { - DEBUG: false - } - } -}); -``` - -To replace an identifier with an arbitrary non-constant expression it is -necessary to prefix the `global_defs` key with `"@"` to instruct UglifyJS -to parse the value as an expression: -```javascript -UglifyJS.minify("alert('hello');", { - compress: { - global_defs: { - "@alert": "console.log" - } - } -}).code; -// returns: 'console.log("hello");' -``` - -Otherwise it would be replaced as string literal: -```javascript -UglifyJS.minify("alert('hello');", { - compress: { - global_defs: { - "alert": "console.log" - } - } -}).code; -// returns: '"console.log"("hello");' -``` - -### Using native Uglify AST with `minify()` -```javascript -// example: parse only, produce native Uglify AST - -var result = UglifyJS.minify(code, { - parse: {}, - compress: false, - mangle: false, - output: { - ast: true, - code: false // optional - faster if false - } -}); - -// result.ast contains native Uglify AST -``` -```javascript -// example: accept native Uglify AST input and then compress and mangle -// to produce both code and native AST. - -var result = UglifyJS.minify(ast, { - compress: {}, - mangle: {}, - output: { - ast: true, - code: true // optional - faster if false - } -}); - -// result.ast contains native Uglify AST -// result.code contains the minified code in string form. -``` - -### Working with Uglify AST - -Transversal and transformation of the native AST can be performed through -[`TreeWalker`](https://github.com/mishoo/UglifyJS2/blob/master/lib/ast.js) and -[`TreeTransformer`](https://github.com/mishoo/UglifyJS2/blob/master/lib/transform.js) -respectively. - -### ESTree / SpiderMonkey AST - -UglifyJS has its own abstract syntax tree format; for -[practical reasons](http://lisperator.net/blog/uglifyjs-why-not-switching-to-spidermonkey-ast/) -we can't easily change to using the SpiderMonkey AST internally. However, -UglifyJS now has a converter which can import a SpiderMonkey AST. - -For example [Acorn][acorn] is a super-fast parser that produces a -SpiderMonkey AST. It has a small CLI utility that parses one file and dumps -the AST in JSON on the standard output. To use UglifyJS to mangle and -compress that: - - acorn file.js | uglifyjs -p spidermonkey -m -c - -The `-p spidermonkey` option tells UglifyJS that all input files are not -JavaScript, but JS code described in SpiderMonkey AST in JSON. Therefore we -don't use our own parser in this case, but just transform that AST into our -internal AST. - -### Use Acorn for parsing - -More for fun, I added the `-p acorn` option which will use Acorn to do all -the parsing. If you pass this option, UglifyJS will `require("acorn")`. - -Acorn is really fast (e.g. 250ms instead of 380ms on some 650K code), but -converting the SpiderMonkey tree that Acorn produces takes another 150ms so -in total it's a bit more than just using UglifyJS's own parser. - -[acorn]: https://github.com/ternjs/acorn -[sm-spec]: https://docs.google.com/document/d/1U1RGAehQwRypUTovF1KRlpiOFze0b-_2gc6fAH0KY0k - -### Uglify Fast Minify Mode - -It's not well known, but whitespace removal and symbol mangling accounts -for 95% of the size reduction in minified code for most JavaScript - not -elaborate code transforms. One can simply disable `compress` to speed up -Uglify builds by 3 to 4 times. In this fast `mangle`-only mode Uglify has -comparable minify speeds and gzip sizes to -[`butternut`](https://www.npmjs.com/package/butternut): - -| d3.js | minify size | gzip size | minify time (seconds) | -| --- | ---: | ---: | ---: | -| original | 451,131 | 108,733 | - | -| uglify-js@3.0.24 mangle=false, compress=false | 316,600 | 85,245 | 0.70 | -| uglify-js@3.0.24 mangle=true, compress=false | 220,216 | 72,730 | 1.13 | -| butternut@0.4.6 | 217,568 | 72,738 | 1.41 | -| uglify-js@3.0.24 mangle=true, compress=true | 212,511 | 71,560 | 3.36 | -| babili@0.1.4 | 210,713 | 72,140 | 12.64 | - -To enable fast minify mode from the CLI use: -``` -uglifyjs file.js -m -``` -To enable fast minify mode with the API use: -```js -UglifyJS.minify(code, { compress: false, mangle: true }); -``` - -#### Source maps and debugging - -Various `compress` transforms that simplify, rearrange, inline and remove code -are known to have an adverse effect on debugging with source maps. This is -expected as code is optimized and mappings are often simply not possible as -some code no longer exists. For highest fidelity in source map debugging -disable the Uglify `compress` option and just use `mangle`. - -### Compiler assumptions - -To allow for better optimizations, the compiler makes various assumptions: - -- `.toString()` and `.valueOf()` don't have side effects, and for built-in - objects they have not been overridden. -- `undefined`, `NaN` and `Infinity` have not been externally redefined. -- `arguments.callee`, `arguments.caller` and `Function.prototype.caller` are not used. -- The code doesn't expect the contents of `Function.prototype.toString()` or - `Error.prototype.stack` to be anything in particular. -- Getting and setting properties on a plain object does not cause other side effects - (using `.watch()` or `Proxy`). -- Object properties can be added, removed and modified (not prevented with - `Object.defineProperty()`, `Object.defineProperties()`, `Object.freeze()`, - `Object.preventExtensions()` or `Object.seal()`). diff --git a/node_modules/uglify-js/bin/uglifyjs b/node_modules/uglify-js/bin/uglifyjs deleted file mode 100755 index ace94e7e1..000000000 --- a/node_modules/uglify-js/bin/uglifyjs +++ /dev/null @@ -1,419 +0,0 @@ -#! /usr/bin/env node -// -*- js -*- - -"use strict"; - -require("../tools/exit"); - -var fs = require("fs"); -var info = require("../package.json"); -var path = require("path"); -var program = require("commander"); -var UglifyJS = require("../tools/node"); - -var skip_keys = [ "cname", "inlined", "parent_scope", "scope", "uses_eval", "uses_with" ]; -var files = {}; -var options = { - compress: false, - mangle: false -}; -program.version(info.name + " " + info.version); -program.parseArgv = program.parse; -program.parse = undefined; -if (process.argv.indexOf("ast") >= 0) program.helpInformation = UglifyJS.describe_ast; -else if (process.argv.indexOf("options") >= 0) program.helpInformation = function() { - var text = []; - var options = UglifyJS.default_options(); - for (var option in options) { - text.push("--" + (option == "output" ? "beautify" : option == "sourceMap" ? "source-map" : option) + " options:"); - text.push(format_object(options[option])); - text.push(""); - } - return text.join("\n"); -}; -program.option("-p, --parse ", "Specify parser options.", parse_js()); -program.option("-c, --compress [options]", "Enable compressor/specify compressor options.", parse_js()); -program.option("-m, --mangle [options]", "Mangle names/specify mangler options.", parse_js()); -program.option("--mangle-props [options]", "Mangle properties/specify mangler options.", parse_js()); -program.option("-b, --beautify [options]", "Beautify output/specify output options.", parse_js()); -program.option("-o, --output ", "Output file (default STDOUT)."); -program.option("--comments [filter]", "Preserve copyright comments in the output."); -program.option("--config-file ", "Read minify() options from JSON file."); -program.option("-d, --define [=value]", "Global definitions.", parse_js("define")); -program.option("-e, --enclose [arg[,...][:value[,...]]]", "Embed everything in a big function, with configurable argument(s) & value(s)."); -program.option("--ie8", "Support non-standard Internet Explorer 8."); -program.option("--keep-fnames", "Do not mangle/drop function names. Useful for code relying on Function.prototype.name."); -program.option("--name-cache ", "File to hold mangled name mappings."); -program.option("--rename", "Force symbol expansion."); -program.option("--no-rename", "Disable symbol expansion."); -program.option("--self", "Build UglifyJS as a library (implies --wrap UglifyJS)"); -program.option("--source-map [options]", "Enable source map/specify source map options.", parse_js()); -program.option("--timings", "Display operations run time on STDERR."); -program.option("--toplevel", "Compress and/or mangle variables in toplevel scope."); -program.option("--verbose", "Print diagnostic messages."); -program.option("--warn", "Print warning messages."); -program.option("--wrap ", "Embed everything as a function with “exports” corresponding to “name” globally."); -program.arguments("[files...]").parseArgv(process.argv); -if (program.configFile) { - options = JSON.parse(read_file(program.configFile)); - if (options.mangle && options.mangle.properties && options.mangle.properties.regex) { - options.mangle.properties.regex = UglifyJS.parse(options.mangle.properties.regex, { - expression: true - }).getValue(); - } -} -if (!program.output && program.sourceMap && program.sourceMap.url != "inline") { - fatal("cannot write source map to STDOUT"); -} -[ - "compress", - "enclose", - "ie8", - "mangle", - "sourceMap", - "toplevel", - "wrap" -].forEach(function(name) { - if (name in program) { - options[name] = program[name]; - } -}); -if (program.verbose) { - options.warnings = "verbose"; -} else if (program.warn) { - options.warnings = true; -} -if (options.warnings) { - UglifyJS.AST_Node.log_function(print_error, options.warnings == "verbose"); - delete options.warnings; -} -if (program.beautify) { - options.output = typeof program.beautify == "object" ? program.beautify : {}; - if (!("beautify" in options.output)) { - options.output.beautify = true; - } -} -if (program.comments) { - if (typeof options.output != "object") options.output = {}; - options.output.comments = typeof program.comments == "string" ? program.comments : "some"; -} -if (program.define) { - if (typeof options.compress != "object") options.compress = {}; - if (typeof options.compress.global_defs != "object") options.compress.global_defs = {}; - for (var expr in program.define) { - options.compress.global_defs[expr] = program.define[expr]; - } -} -if (program.keepFnames) { - options.keep_fnames = true; -} -if (program.mangleProps) { - if (program.mangleProps.domprops) { - delete program.mangleProps.domprops; - } else { - if (typeof program.mangleProps != "object") program.mangleProps = {}; - if (!Array.isArray(program.mangleProps.reserved)) program.mangleProps.reserved = []; - require("../tools/domprops").forEach(function(name) { - UglifyJS.push_uniq(program.mangleProps.reserved, name); - }); - } - if (typeof options.mangle != "object") options.mangle = {}; - options.mangle.properties = program.mangleProps; -} -if (program.nameCache) { - options.nameCache = JSON.parse(read_file(program.nameCache, "{}")); -} -if (program.output == "ast") { - options.output = { - ast: true, - code: false - }; -} -if (program.parse) { - if (!program.parse.acorn && !program.parse.spidermonkey) { - options.parse = program.parse; - } else if (program.sourceMap && program.sourceMap.content == "inline") { - fatal("inline source map only works with built-in parser"); - } -} -if (~program.rawArgs.indexOf("--rename")) { - options.rename = true; -} else if (!program.rename) { - options.rename = false; -} -var convert_path = function(name) { - return name; -}; -if (typeof program.sourceMap == "object" && "base" in program.sourceMap) { - convert_path = function() { - var base = program.sourceMap.base; - delete options.sourceMap.base; - return function(name) { - return path.relative(base, name); - }; - }(); -} -if (program.self) { - if (program.args.length) UglifyJS.AST_Node.warn("Ignoring input files since --self was passed"); - if (!options.wrap) options.wrap = "UglifyJS"; - simple_glob(UglifyJS.FILES).forEach(function(name) { - files[convert_path(name)] = read_file(name); - }); - run(); -} else if (program.args.length) { - simple_glob(program.args).forEach(function(name) { - files[convert_path(name)] = read_file(name); - }); - run(); -} else { - var chunks = []; - process.stdin.setEncoding("utf8"); - process.stdin.on("data", function(chunk) { - chunks.push(chunk); - }).on("end", function() { - files = [ chunks.join("") ]; - run(); - }); - process.stdin.resume(); -} - -function convert_ast(fn) { - return UglifyJS.AST_Node.from_mozilla_ast(Object.keys(files).reduce(fn, null)); -} - -function run() { - var content = program.sourceMap && program.sourceMap.content; - if (content && content != "inline") { - UglifyJS.AST_Node.info("Using input source map: " + content); - options.sourceMap.content = read_file(content, content); - } - if (program.timings) options.timings = true; - try { - if (program.parse) { - if (program.parse.acorn) { - files = convert_ast(function(toplevel, name) { - return require("acorn").parse(files[name], { - locations: true, - program: toplevel, - sourceFile: name - }); - }); - } else if (program.parse.spidermonkey) { - files = convert_ast(function(toplevel, name) { - var obj = JSON.parse(files[name]); - if (!toplevel) return obj; - toplevel.body = toplevel.body.concat(obj.body); - return toplevel; - }); - } - } - } catch (ex) { - fatal(ex); - } - var result = UglifyJS.minify(files, options); - if (result.error) { - var ex = result.error; - if (ex.name == "SyntaxError") { - print_error("Parse error at " + ex.filename + ":" + ex.line + "," + ex.col); - var file = files[ex.filename]; - if (file) { - var col = ex.col; - var lines = file.split(/\r?\n/); - var line = lines[ex.line - 1]; - if (!line && !col) { - line = lines[ex.line - 2]; - col = line.length; - } - if (line) { - var limit = 70; - if (col > limit) { - line = line.slice(col - limit); - col = limit; - } - print_error(line.slice(0, 80)); - print_error(line.slice(0, col).replace(/\S/g, " ") + "^"); - } - } - } else if (ex.defs) { - print_error("Supported options:"); - print_error(format_object(ex.defs)); - } - fatal(ex); - } else if (program.output == "ast") { - if (!options.compress && !options.mangle) { - result.ast.figure_out_scope({}); - } - print(JSON.stringify(result.ast, function(key, value) { - if (value) switch (key) { - case "thedef": - return symdef(value); - case "enclosed": - return value.length ? value.map(symdef) : undefined; - case "variables": - case "functions": - case "globals": - return value.size() ? value.map(symdef) : undefined; - } - if (skip_key(key)) return; - if (value instanceof UglifyJS.AST_Token) return; - if (value instanceof UglifyJS.Dictionary) return; - if (value instanceof UglifyJS.AST_Node) { - var result = { - _class: "AST_" + value.TYPE - }; - value.CTOR.PROPS.forEach(function(prop) { - result[prop] = value[prop]; - }); - return result; - } - return value; - }, 2)); - } else if (program.output == "spidermonkey") { - print(JSON.stringify(UglifyJS.minify(result.code, { - compress: false, - mangle: false, - output: { - ast: true, - code: false - } - }).ast.to_mozilla_ast(), null, 2)); - } else if (program.output) { - fs.writeFileSync(program.output, result.code); - if (result.map) { - fs.writeFileSync(program.output + ".map", result.map); - } - } else { - print(result.code); - } - if (program.nameCache) { - fs.writeFileSync(program.nameCache, JSON.stringify(options.nameCache)); - } - if (result.timings) for (var phase in result.timings) { - print_error("- " + phase + ": " + result.timings[phase].toFixed(3) + "s"); - } -} - -function fatal(message) { - if (message instanceof Error) { - message = message.stack.replace(/^\S*?Error:/, "ERROR:") - } else { - message = "ERROR: " + message; - } - print_error(message); - process.exit(1); -} - -// A file glob function that only supports "*" and "?" wildcards in the basename. -// Example: "foo/bar/*baz??.*.js" -// Argument `glob` may be a string or an array of strings. -// Returns an array of strings. Garbage in, garbage out. -function simple_glob(glob) { - if (Array.isArray(glob)) { - return [].concat.apply([], glob.map(simple_glob)); - } - if (glob.match(/\*|\?/)) { - var dir = path.dirname(glob); - try { - var entries = fs.readdirSync(dir); - } catch (ex) {} - if (entries) { - var pattern = "^" + path.basename(glob) - .replace(/[.+^$[\]\\(){}]/g, "\\$&") - .replace(/\*/g, "[^/\\\\]*") - .replace(/\?/g, "[^/\\\\]") + "$"; - var mod = process.platform === "win32" ? "i" : ""; - var rx = new RegExp(pattern, mod); - var results = entries.filter(function(name) { - return rx.test(name); - }).map(function(name) { - return path.join(dir, name); - }); - if (results.length) return results; - } - } - return [ glob ]; -} - -function read_file(path, default_value) { - try { - return fs.readFileSync(path, "utf8"); - } catch (ex) { - if (ex.code == "ENOENT" && default_value != null) return default_value; - fatal(ex); - } -} - -function parse_js(flag) { - return function(value, options) { - options = options || {}; - try { - UglifyJS.parse(value, { - expression: true - }).walk(new UglifyJS.TreeWalker(function(node) { - if (node instanceof UglifyJS.AST_Assign) { - var name = node.left.print_to_string(); - var value = node.right; - if (flag) { - options[name] = value; - } else if (value instanceof UglifyJS.AST_Array) { - options[name] = value.elements.map(to_string); - } else { - options[name] = to_string(value); - } - return true; - } - if (node instanceof UglifyJS.AST_Symbol || node instanceof UglifyJS.AST_PropAccess) { - var name = node.print_to_string(); - options[name] = true; - return true; - } - if (!(node instanceof UglifyJS.AST_Sequence)) throw node; - - function to_string(value) { - return value instanceof UglifyJS.AST_Constant ? value.getValue() : value.print_to_string({ - quote_keys: true - }); - } - })); - } catch (ex) { - if (flag) { - fatal("cannot parse arguments for '" + flag + "': " + value); - } else { - options[value] = null; - } - } - return options; - } -} - -function skip_key(key) { - return skip_keys.indexOf(key) >= 0; -} - -function symdef(def) { - var ret = (1e6 + def.id) + " " + def.name; - if (def.mangled_name) ret += " " + def.mangled_name; - return ret; -} - -function format_object(obj) { - var lines = []; - var padding = ""; - Object.keys(obj).map(function(name) { - if (padding.length < name.length) padding = Array(name.length + 1).join(" "); - return [ name, JSON.stringify(obj[name]) ]; - }).forEach(function(tokens) { - lines.push(" " + tokens[0] + padding.slice(tokens[0].length - 2) + tokens[1]); - }); - return lines.join("\n"); -} - -function print_error(msg) { - process.stderr.write(msg); - process.stderr.write("\n"); -} - -function print(txt) { - process.stdout.write(txt); - process.stdout.write("\n"); -} diff --git a/node_modules/uglify-js/lib/ast.js b/node_modules/uglify-js/lib/ast.js deleted file mode 100644 index b17049152..000000000 --- a/node_modules/uglify-js/lib/ast.js +++ /dev/null @@ -1,996 +0,0 @@ -/*********************************************************************** - - A JavaScript tokenizer / parser / beautifier / compressor. - https://github.com/mishoo/UglifyJS2 - - -------------------------------- (C) --------------------------------- - - Author: Mihai Bazon - - http://mihai.bazon.net/blog - - Distributed under the BSD license: - - Copyright 2012 (c) Mihai Bazon - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions - are met: - - * Redistributions of source code must retain the above - copyright notice, this list of conditions and the following - disclaimer. - - * Redistributions in binary form must reproduce the above - copyright notice, this list of conditions and the following - disclaimer in the documentation and/or other materials - provided with the distribution. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER “AS IS” AND ANY - EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER BE - LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, - OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR - TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF - THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - SUCH DAMAGE. - - ***********************************************************************/ - -"use strict"; - -function DEFNODE(type, props, methods, base) { - if (typeof base === "undefined") base = AST_Node; - props = props ? props.split(/\s+/) : []; - var self_props = props; - if (base && base.PROPS) props = props.concat(base.PROPS); - var code = [ - "return function AST_", type, "(props){", - "if(props){", - ]; - props.forEach(function(prop) { - code.push("this.", prop, "=props.", prop, ";"); - }); - var proto = base && new base; - if (proto && proto.initialize || methods && methods.initialize) code.push("this.initialize();"); - code.push("}}"); - var ctor = new Function(code.join(""))(); - if (proto) { - ctor.prototype = proto; - ctor.BASE = base; - } - if (base) base.SUBCLASSES.push(ctor); - ctor.prototype.CTOR = ctor; - ctor.PROPS = props || null; - ctor.SELF_PROPS = self_props; - ctor.SUBCLASSES = []; - if (type) { - ctor.prototype.TYPE = ctor.TYPE = type; - } - if (methods) for (var name in methods) if (HOP(methods, name)) { - if (/^\$/.test(name)) { - ctor[name.substr(1)] = methods[name]; - } else { - ctor.prototype[name] = methods[name]; - } - } - ctor.DEFMETHOD = function(name, method) { - this.prototype[name] = method; - }; - if (typeof exports !== "undefined") { - exports["AST_" + type] = ctor; - } - return ctor; -} - -var AST_Token = DEFNODE("Token", "type value line col pos endline endcol endpos nlb comments_before comments_after file raw", { -}, null); - -var AST_Node = DEFNODE("Node", "start end", { - _clone: function(deep) { - if (deep) { - var self = this.clone(); - return self.transform(new TreeTransformer(function(node) { - if (node !== self) { - return node.clone(true); - } - })); - } - return new this.CTOR(this); - }, - clone: function(deep) { - return this._clone(deep); - }, - $documentation: "Base class of all AST nodes", - $propdoc: { - start: "[AST_Token] The first token of this node", - end: "[AST_Token] The last token of this node" - }, - _walk: function(visitor) { - return visitor._visit(this); - }, - walk: function(visitor) { - return this._walk(visitor); // not sure the indirection will be any help - } -}, null); - -(AST_Node.log_function = function(fn, verbose) { - var printed = Object.create(null); - if (fn) { - AST_Node.info = verbose ? function(text, props) { - log("INFO: " + string_template(text, props)); - } : noop; - AST_Node.warn = function(text, props) { - log("WARN: " + string_template(text, props)); - }; - } else { - AST_Node.info = AST_Node.warn = noop; - } - - function log(msg) { - if (printed[msg]) return; - printed[msg] = true; - fn(msg); - } -})(); - -/* -----[ statements ]----- */ - -var AST_Statement = DEFNODE("Statement", null, { - $documentation: "Base class of all statements", -}); - -var AST_Debugger = DEFNODE("Debugger", null, { - $documentation: "Represents a debugger statement", -}, AST_Statement); - -var AST_Directive = DEFNODE("Directive", "value quote", { - $documentation: "Represents a directive, like \"use strict\";", - $propdoc: { - value: "[string] The value of this directive as a plain string (it's not an AST_String!)", - quote: "[string] the original quote character" - }, -}, AST_Statement); - -var AST_SimpleStatement = DEFNODE("SimpleStatement", "body", { - $documentation: "A statement consisting of an expression, i.e. a = 1 + 2", - $propdoc: { - body: "[AST_Node] an expression node (should not be instanceof AST_Statement)" - }, - _walk: function(visitor) { - return visitor._visit(this, function() { - this.body._walk(visitor); - }); - } -}, AST_Statement); - -function walk_body(node, visitor) { - var body = node.body; - if (body instanceof AST_Statement) { - body._walk(visitor); - } else body.forEach(function(node) { - node._walk(visitor); - }); -} - -var AST_Block = DEFNODE("Block", "body", { - $documentation: "A body of statements (usually braced)", - $propdoc: { - body: "[AST_Statement*] an array of statements" - }, - _walk: function(visitor) { - return visitor._visit(this, function() { - walk_body(this, visitor); - }); - } -}, AST_Statement); - -var AST_BlockStatement = DEFNODE("BlockStatement", null, { - $documentation: "A block statement", -}, AST_Block); - -var AST_EmptyStatement = DEFNODE("EmptyStatement", null, { - $documentation: "The empty statement (empty block or simply a semicolon)" -}, AST_Statement); - -var AST_StatementWithBody = DEFNODE("StatementWithBody", "body", { - $documentation: "Base class for all statements that contain one nested body: `For`, `ForIn`, `Do`, `While`, `With`", - $propdoc: { - body: "[AST_Statement] the body; this should always be present, even if it's an AST_EmptyStatement" - } -}, AST_Statement); - -var AST_LabeledStatement = DEFNODE("LabeledStatement", "label", { - $documentation: "Statement with a label", - $propdoc: { - label: "[AST_Label] a label definition" - }, - _walk: function(visitor) { - return visitor._visit(this, function() { - this.label._walk(visitor); - this.body._walk(visitor); - }); - }, - clone: function(deep) { - var node = this._clone(deep); - if (deep) { - var label = node.label; - var def = this.label; - node.walk(new TreeWalker(function(node) { - if (node instanceof AST_LoopControl && node.label && node.label.thedef === def) { - node.label.thedef = label; - label.references.push(node); - } - })); - } - return node; - } -}, AST_StatementWithBody); - -var AST_IterationStatement = DEFNODE("IterationStatement", null, { - $documentation: "Internal class. All loops inherit from it." -}, AST_StatementWithBody); - -var AST_DWLoop = DEFNODE("DWLoop", "condition", { - $documentation: "Base class for do/while statements", - $propdoc: { - condition: "[AST_Node] the loop condition. Should not be instanceof AST_Statement" - } -}, AST_IterationStatement); - -var AST_Do = DEFNODE("Do", null, { - $documentation: "A `do` statement", - _walk: function(visitor) { - return visitor._visit(this, function() { - this.body._walk(visitor); - this.condition._walk(visitor); - }); - } -}, AST_DWLoop); - -var AST_While = DEFNODE("While", null, { - $documentation: "A `while` statement", - _walk: function(visitor) { - return visitor._visit(this, function() { - this.condition._walk(visitor); - this.body._walk(visitor); - }); - } -}, AST_DWLoop); - -var AST_For = DEFNODE("For", "init condition step", { - $documentation: "A `for` statement", - $propdoc: { - init: "[AST_Node?] the `for` initialization code, or null if empty", - condition: "[AST_Node?] the `for` termination clause, or null if empty", - step: "[AST_Node?] the `for` update clause, or null if empty" - }, - _walk: function(visitor) { - return visitor._visit(this, function() { - if (this.init) this.init._walk(visitor); - if (this.condition) this.condition._walk(visitor); - if (this.step) this.step._walk(visitor); - this.body._walk(visitor); - }); - } -}, AST_IterationStatement); - -var AST_ForIn = DEFNODE("ForIn", "init object", { - $documentation: "A `for ... in` statement", - $propdoc: { - init: "[AST_Node] the `for/in` initialization code", - object: "[AST_Node] the object that we're looping through" - }, - _walk: function(visitor) { - return visitor._visit(this, function() { - this.init._walk(visitor); - this.object._walk(visitor); - this.body._walk(visitor); - }); - } -}, AST_IterationStatement); - -var AST_With = DEFNODE("With", "expression", { - $documentation: "A `with` statement", - $propdoc: { - expression: "[AST_Node] the `with` expression" - }, - _walk: function(visitor) { - return visitor._visit(this, function() { - this.expression._walk(visitor); - this.body._walk(visitor); - }); - } -}, AST_StatementWithBody); - -/* -----[ scope and functions ]----- */ - -var AST_Scope = DEFNODE("Scope", "variables functions uses_with uses_eval parent_scope enclosed cname", { - $documentation: "Base class for all statements introducing a lexical scope", - $propdoc: { - variables: "[Object/S] a map of name -> SymbolDef for all variables/functions defined in this scope", - functions: "[Object/S] like `variables`, but only lists function declarations", - uses_with: "[boolean/S] tells whether this scope uses the `with` statement", - uses_eval: "[boolean/S] tells whether this scope contains a direct call to the global `eval`", - parent_scope: "[AST_Scope?/S] link to the parent scope", - enclosed: "[SymbolDef*/S] a list of all symbol definitions that are accessed from this scope or any subscopes", - cname: "[integer/S] current index for mangling variables (used internally by the mangler)", - }, - clone: function(deep) { - var node = this._clone(deep); - if (this.variables) node.variables = this.variables.clone(); - if (this.functions) node.functions = this.functions.clone(); - if (this.enclosed) node.enclosed = this.enclosed.slice(); - return node; - }, - pinned: function() { - return this.uses_eval || this.uses_with; - } -}, AST_Block); - -var AST_Toplevel = DEFNODE("Toplevel", "globals", { - $documentation: "The toplevel scope", - $propdoc: { - globals: "[Object/S] a map of name -> SymbolDef for all undeclared names", - }, - wrap: function(name) { - var body = this.body; - return parse([ - "(function(exports){'$ORIG';})(typeof ", - name, - "=='undefined'?(", - name, - "={}):", - name, - ");" - ].join(""), { - filename: "wrap=" + JSON.stringify(name) - }).transform(new TreeTransformer(function(node) { - if (node instanceof AST_Directive && node.value == "$ORIG") { - return MAP.splice(body); - } - })); - }, - enclose: function(args_values) { - if (typeof args_values != "string") args_values = ""; - var index = args_values.indexOf(":"); - if (index < 0) index = args_values.length; - var body = this.body; - return parse([ - "(function(", - args_values.slice(0, index), - '){"$ORIG"})(', - args_values.slice(index + 1), - ")" - ].join(""), { - filename: "enclose=" + JSON.stringify(args_values) - }).transform(new TreeTransformer(function(node) { - if (node instanceof AST_Directive && node.value == "$ORIG") { - return MAP.splice(body); - } - })); - } -}, AST_Scope); - -var AST_Lambda = DEFNODE("Lambda", "name argnames uses_arguments length_read", { - $documentation: "Base class for functions", - $propdoc: { - name: "[AST_SymbolDeclaration?] the name of this function", - argnames: "[AST_SymbolFunarg*] array of function arguments", - uses_arguments: "[boolean/S] tells whether this function accesses the arguments array" - }, - _walk: function(visitor) { - return visitor._visit(this, function() { - if (this.name) this.name._walk(visitor); - this.argnames.forEach(function(argname) { - argname._walk(visitor); - }); - walk_body(this, visitor); - }); - } -}, AST_Scope); - -var AST_Accessor = DEFNODE("Accessor", null, { - $documentation: "A setter/getter function. The `name` property is always null." -}, AST_Lambda); - -var AST_Function = DEFNODE("Function", "inlined", { - $documentation: "A function expression" -}, AST_Lambda); - -var AST_Defun = DEFNODE("Defun", "inlined", { - $documentation: "A function definition" -}, AST_Lambda); - -/* -----[ JUMPS ]----- */ - -var AST_Jump = DEFNODE("Jump", null, { - $documentation: "Base class for “jumps” (for now that's `return`, `throw`, `break` and `continue`)" -}, AST_Statement); - -var AST_Exit = DEFNODE("Exit", "value", { - $documentation: "Base class for “exits” (`return` and `throw`)", - $propdoc: { - value: "[AST_Node?] the value returned or thrown by this statement; could be null for AST_Return" - }, - _walk: function(visitor) { - return visitor._visit(this, this.value && function() { - this.value._walk(visitor); - }); - } -}, AST_Jump); - -var AST_Return = DEFNODE("Return", null, { - $documentation: "A `return` statement" -}, AST_Exit); - -var AST_Throw = DEFNODE("Throw", null, { - $documentation: "A `throw` statement" -}, AST_Exit); - -var AST_LoopControl = DEFNODE("LoopControl", "label", { - $documentation: "Base class for loop control statements (`break` and `continue`)", - $propdoc: { - label: "[AST_LabelRef?] the label, or null if none", - }, - _walk: function(visitor) { - return visitor._visit(this, this.label && function() { - this.label._walk(visitor); - }); - } -}, AST_Jump); - -var AST_Break = DEFNODE("Break", null, { - $documentation: "A `break` statement" -}, AST_LoopControl); - -var AST_Continue = DEFNODE("Continue", null, { - $documentation: "A `continue` statement" -}, AST_LoopControl); - -/* -----[ IF ]----- */ - -var AST_If = DEFNODE("If", "condition alternative", { - $documentation: "A `if` statement", - $propdoc: { - condition: "[AST_Node] the `if` condition", - alternative: "[AST_Statement?] the `else` part, or null if not present" - }, - _walk: function(visitor) { - return visitor._visit(this, function() { - this.condition._walk(visitor); - this.body._walk(visitor); - if (this.alternative) this.alternative._walk(visitor); - }); - } -}, AST_StatementWithBody); - -/* -----[ SWITCH ]----- */ - -var AST_Switch = DEFNODE("Switch", "expression", { - $documentation: "A `switch` statement", - $propdoc: { - expression: "[AST_Node] the `switch` “discriminant”" - }, - _walk: function(visitor) { - return visitor._visit(this, function() { - this.expression._walk(visitor); - walk_body(this, visitor); - }); - } -}, AST_Block); - -var AST_SwitchBranch = DEFNODE("SwitchBranch", null, { - $documentation: "Base class for `switch` branches", -}, AST_Block); - -var AST_Default = DEFNODE("Default", null, { - $documentation: "A `default` switch branch", -}, AST_SwitchBranch); - -var AST_Case = DEFNODE("Case", "expression", { - $documentation: "A `case` switch branch", - $propdoc: { - expression: "[AST_Node] the `case` expression" - }, - _walk: function(visitor) { - return visitor._visit(this, function() { - this.expression._walk(visitor); - walk_body(this, visitor); - }); - } -}, AST_SwitchBranch); - -/* -----[ EXCEPTIONS ]----- */ - -var AST_Try = DEFNODE("Try", "bcatch bfinally", { - $documentation: "A `try` statement", - $propdoc: { - bcatch: "[AST_Catch?] the catch block, or null if not present", - bfinally: "[AST_Finally?] the finally block, or null if not present" - }, - _walk: function(visitor) { - return visitor._visit(this, function() { - walk_body(this, visitor); - if (this.bcatch) this.bcatch._walk(visitor); - if (this.bfinally) this.bfinally._walk(visitor); - }); - } -}, AST_Block); - -var AST_Catch = DEFNODE("Catch", "argname", { - $documentation: "A `catch` node; only makes sense as part of a `try` statement", - $propdoc: { - argname: "[AST_SymbolCatch] symbol for the exception" - }, - _walk: function(visitor) { - return visitor._visit(this, function() { - this.argname._walk(visitor); - walk_body(this, visitor); - }); - } -}, AST_Block); - -var AST_Finally = DEFNODE("Finally", null, { - $documentation: "A `finally` node; only makes sense as part of a `try` statement" -}, AST_Block); - -/* -----[ VAR ]----- */ - -var AST_Definitions = DEFNODE("Definitions", "definitions", { - $documentation: "Base class for `var` nodes (variable declarations/initializations)", - $propdoc: { - definitions: "[AST_VarDef*] array of variable definitions" - }, - _walk: function(visitor) { - return visitor._visit(this, function() { - this.definitions.forEach(function(defn) { - defn._walk(visitor); - }); - }); - } -}, AST_Statement); - -var AST_Var = DEFNODE("Var", null, { - $documentation: "A `var` statement" -}, AST_Definitions); - -var AST_VarDef = DEFNODE("VarDef", "name value", { - $documentation: "A variable declaration; only appears in a AST_Definitions node", - $propdoc: { - name: "[AST_SymbolVar] name of the variable", - value: "[AST_Node?] initializer, or null of there's no initializer" - }, - _walk: function(visitor) { - return visitor._visit(this, function() { - this.name._walk(visitor); - if (this.value) this.value._walk(visitor); - }); - } -}); - -/* -----[ OTHER ]----- */ - -var AST_Call = DEFNODE("Call", "expression args", { - $documentation: "A function call expression", - $propdoc: { - expression: "[AST_Node] expression to invoke as function", - args: "[AST_Node*] array of arguments" - }, - _walk: function(visitor) { - return visitor._visit(this, function() { - this.expression._walk(visitor); - this.args.forEach(function(node) { - node._walk(visitor); - }); - }); - } -}); - -var AST_New = DEFNODE("New", null, { - $documentation: "An object instantiation. Derives from a function call since it has exactly the same properties" -}, AST_Call); - -var AST_Sequence = DEFNODE("Sequence", "expressions", { - $documentation: "A sequence expression (comma-separated expressions)", - $propdoc: { - expressions: "[AST_Node*] array of expressions (at least two)" - }, - _walk: function(visitor) { - return visitor._visit(this, function() { - this.expressions.forEach(function(node) { - node._walk(visitor); - }); - }); - } -}); - -var AST_PropAccess = DEFNODE("PropAccess", "expression property", { - $documentation: "Base class for property access expressions, i.e. `a.foo` or `a[\"foo\"]`", - $propdoc: { - expression: "[AST_Node] the “container” expression", - property: "[AST_Node|string] the property to access. For AST_Dot this is always a plain string, while for AST_Sub it's an arbitrary AST_Node" - }, - getProperty: function() { - var p = this.property; - if (p instanceof AST_Constant) { - return p.getValue(); - } - if (p instanceof AST_UnaryPrefix - && p.operator == "void" - && p.expression instanceof AST_Constant) { - return; - } - return p; - } -}); - -var AST_Dot = DEFNODE("Dot", null, { - $documentation: "A dotted property access expression", - _walk: function(visitor) { - return visitor._visit(this, function() { - this.expression._walk(visitor); - }); - } -}, AST_PropAccess); - -var AST_Sub = DEFNODE("Sub", null, { - $documentation: "Index-style property access, i.e. `a[\"foo\"]`", - _walk: function(visitor) { - return visitor._visit(this, function() { - this.expression._walk(visitor); - this.property._walk(visitor); - }); - } -}, AST_PropAccess); - -var AST_Unary = DEFNODE("Unary", "operator expression", { - $documentation: "Base class for unary expressions", - $propdoc: { - operator: "[string] the operator", - expression: "[AST_Node] expression that this unary operator applies to" - }, - _walk: function(visitor) { - return visitor._visit(this, function() { - this.expression._walk(visitor); - }); - } -}); - -var AST_UnaryPrefix = DEFNODE("UnaryPrefix", null, { - $documentation: "Unary prefix expression, i.e. `typeof i` or `++i`" -}, AST_Unary); - -var AST_UnaryPostfix = DEFNODE("UnaryPostfix", null, { - $documentation: "Unary postfix expression, i.e. `i++`" -}, AST_Unary); - -var AST_Binary = DEFNODE("Binary", "operator left right", { - $documentation: "Binary expression, i.e. `a + b`", - $propdoc: { - left: "[AST_Node] left-hand side expression", - operator: "[string] the operator", - right: "[AST_Node] right-hand side expression" - }, - _walk: function(visitor) { - return visitor._visit(this, function() { - this.left._walk(visitor); - this.right._walk(visitor); - }); - } -}); - -var AST_Conditional = DEFNODE("Conditional", "condition consequent alternative", { - $documentation: "Conditional expression using the ternary operator, i.e. `a ? b : c`", - $propdoc: { - condition: "[AST_Node]", - consequent: "[AST_Node]", - alternative: "[AST_Node]" - }, - _walk: function(visitor) { - return visitor._visit(this, function() { - this.condition._walk(visitor); - this.consequent._walk(visitor); - this.alternative._walk(visitor); - }); - } -}); - -var AST_Assign = DEFNODE("Assign", null, { - $documentation: "An assignment expression — `a = b + 5`", -}, AST_Binary); - -/* -----[ LITERALS ]----- */ - -var AST_Array = DEFNODE("Array", "elements", { - $documentation: "An array literal", - $propdoc: { - elements: "[AST_Node*] array of elements" - }, - _walk: function(visitor) { - return visitor._visit(this, function() { - this.elements.forEach(function(element) { - element._walk(visitor); - }); - }); - } -}); - -var AST_Object = DEFNODE("Object", "properties", { - $documentation: "An object literal", - $propdoc: { - properties: "[AST_ObjectProperty*] array of properties" - }, - _walk: function(visitor) { - return visitor._visit(this, function() { - this.properties.forEach(function(prop) { - prop._walk(visitor); - }); - }); - } -}); - -var AST_ObjectProperty = DEFNODE("ObjectProperty", "key value", { - $documentation: "Base class for literal object properties", - $propdoc: { - key: "[string|AST_SymbolAccessor] property name. For ObjectKeyVal this is a string. For getters and setters this is an AST_SymbolAccessor.", - value: "[AST_Node] property value. For getters and setters this is an AST_Accessor." - }, - _walk: function(visitor) { - return visitor._visit(this, function() { - this.value._walk(visitor); - }); - } -}); - -var AST_ObjectKeyVal = DEFNODE("ObjectKeyVal", "quote", { - $documentation: "A key: value object property", - $propdoc: { - quote: "[string] the original quote character" - } -}, AST_ObjectProperty); - -var AST_ObjectSetter = DEFNODE("ObjectSetter", null, { - $documentation: "An object setter property", -}, AST_ObjectProperty); - -var AST_ObjectGetter = DEFNODE("ObjectGetter", null, { - $documentation: "An object getter property", -}, AST_ObjectProperty); - -var AST_Symbol = DEFNODE("Symbol", "scope name thedef", { - $propdoc: { - name: "[string] name of this symbol", - scope: "[AST_Scope/S] the current scope (not necessarily the definition scope)", - thedef: "[SymbolDef/S] the definition of this symbol" - }, - $documentation: "Base class for all symbols", -}); - -var AST_SymbolAccessor = DEFNODE("SymbolAccessor", null, { - $documentation: "The name of a property accessor (setter/getter function)" -}, AST_Symbol); - -var AST_SymbolDeclaration = DEFNODE("SymbolDeclaration", "init", { - $documentation: "A declaration symbol (symbol in var, function name or argument, symbol in catch)", -}, AST_Symbol); - -var AST_SymbolVar = DEFNODE("SymbolVar", null, { - $documentation: "Symbol defining a variable", -}, AST_SymbolDeclaration); - -var AST_SymbolFunarg = DEFNODE("SymbolFunarg", null, { - $documentation: "Symbol naming a function argument", -}, AST_SymbolVar); - -var AST_SymbolDefun = DEFNODE("SymbolDefun", null, { - $documentation: "Symbol defining a function", -}, AST_SymbolDeclaration); - -var AST_SymbolLambda = DEFNODE("SymbolLambda", null, { - $documentation: "Symbol naming a function expression", -}, AST_SymbolDeclaration); - -var AST_SymbolCatch = DEFNODE("SymbolCatch", null, { - $documentation: "Symbol naming the exception in catch", -}, AST_SymbolDeclaration); - -var AST_Label = DEFNODE("Label", "references", { - $documentation: "Symbol naming a label (declaration)", - $propdoc: { - references: "[AST_LoopControl*] a list of nodes referring to this label" - }, - initialize: function() { - this.references = []; - this.thedef = this; - } -}, AST_Symbol); - -var AST_SymbolRef = DEFNODE("SymbolRef", "fixed", { - $documentation: "Reference to some symbol (not definition/declaration)", -}, AST_Symbol); - -var AST_LabelRef = DEFNODE("LabelRef", null, { - $documentation: "Reference to a label symbol", -}, AST_Symbol); - -var AST_This = DEFNODE("This", null, { - $documentation: "The `this` symbol", -}, AST_Symbol); - -var AST_Constant = DEFNODE("Constant", null, { - $documentation: "Base class for all constants", - getValue: function() { - return this.value; - } -}); - -var AST_String = DEFNODE("String", "value quote", { - $documentation: "A string literal", - $propdoc: { - value: "[string] the contents of this string", - quote: "[string] the original quote character" - } -}, AST_Constant); - -var AST_Number = DEFNODE("Number", "value", { - $documentation: "A number literal", - $propdoc: { - value: "[number] the numeric value", - } -}, AST_Constant); - -var AST_RegExp = DEFNODE("RegExp", "value", { - $documentation: "A regexp literal", - $propdoc: { - value: "[RegExp] the actual regexp" - } -}, AST_Constant); - -var AST_Atom = DEFNODE("Atom", null, { - $documentation: "Base class for atoms", -}, AST_Constant); - -var AST_Null = DEFNODE("Null", null, { - $documentation: "The `null` atom", - value: null -}, AST_Atom); - -var AST_NaN = DEFNODE("NaN", null, { - $documentation: "The impossible value", - value: 0/0 -}, AST_Atom); - -var AST_Undefined = DEFNODE("Undefined", null, { - $documentation: "The `undefined` value", - value: function(){}() -}, AST_Atom); - -var AST_Hole = DEFNODE("Hole", null, { - $documentation: "A hole in an array", - value: function(){}() -}, AST_Atom); - -var AST_Infinity = DEFNODE("Infinity", null, { - $documentation: "The `Infinity` value", - value: 1/0 -}, AST_Atom); - -var AST_Boolean = DEFNODE("Boolean", null, { - $documentation: "Base class for booleans", -}, AST_Atom); - -var AST_False = DEFNODE("False", null, { - $documentation: "The `false` atom", - value: false -}, AST_Boolean); - -var AST_True = DEFNODE("True", null, { - $documentation: "The `true` atom", - value: true -}, AST_Boolean); - -/* -----[ TreeWalker ]----- */ - -function TreeWalker(callback) { - this.visit = callback; - this.stack = []; - this.directives = Object.create(null); -} -TreeWalker.prototype = { - _visit: function(node, descend) { - this.push(node); - var ret = this.visit(node, descend ? function() { - descend.call(node); - } : noop); - if (!ret && descend) { - descend.call(node); - } - this.pop(); - return ret; - }, - parent: function(n) { - return this.stack[this.stack.length - 2 - (n || 0)]; - }, - push: function(node) { - if (node instanceof AST_Lambda) { - this.directives = Object.create(this.directives); - } else if (node instanceof AST_Directive && !this.directives[node.value]) { - this.directives[node.value] = node; - } - this.stack.push(node); - }, - pop: function() { - if (this.stack.pop() instanceof AST_Lambda) { - this.directives = Object.getPrototypeOf(this.directives); - } - }, - self: function() { - return this.stack[this.stack.length - 1]; - }, - find_parent: function(type) { - var stack = this.stack; - for (var i = stack.length; --i >= 0;) { - var x = stack[i]; - if (x instanceof type) return x; - } - }, - has_directive: function(type) { - var dir = this.directives[type]; - if (dir) return dir; - var node = this.stack[this.stack.length - 1]; - if (node instanceof AST_Scope) { - for (var i = 0; i < node.body.length; ++i) { - var st = node.body[i]; - if (!(st instanceof AST_Directive)) break; - if (st.value == type) return st; - } - } - }, - loopcontrol_target: function(node) { - var stack = this.stack; - if (node.label) for (var i = stack.length; --i >= 0;) { - var x = stack[i]; - if (x instanceof AST_LabeledStatement && x.label.name == node.label.name) - return x.body; - } else for (var i = stack.length; --i >= 0;) { - var x = stack[i]; - if (x instanceof AST_IterationStatement - || node instanceof AST_Break && x instanceof AST_Switch) - return x; - } - }, - in_boolean_context: function() { - var self = this.self(); - for (var i = 0, p; p = this.parent(i); i++) { - if (p instanceof AST_SimpleStatement - || p instanceof AST_Conditional && p.condition === self - || p instanceof AST_DWLoop && p.condition === self - || p instanceof AST_For && p.condition === self - || p instanceof AST_If && p.condition === self - || p instanceof AST_UnaryPrefix && p.operator == "!" && p.expression === self) { - return true; - } - if (p instanceof AST_Binary && (p.operator == "&&" || p.operator == "||") - || p instanceof AST_Conditional - || p.tail_node() === self) { - self = p; - } else if (p instanceof AST_Return) { - var fn; - do { - fn = this.parent(++i); - if (!fn) return false; - } while (!(fn instanceof AST_Lambda)); - if (fn.name) return false; - self = this.parent(++i); - if (!self || self.TYPE != "Call" || self.expression !== fn) return false; - } else { - return false; - } - } - } -}; diff --git a/node_modules/uglify-js/lib/compress.js b/node_modules/uglify-js/lib/compress.js deleted file mode 100644 index ba789816d..000000000 --- a/node_modules/uglify-js/lib/compress.js +++ /dev/null @@ -1,7179 +0,0 @@ -/*********************************************************************** - - A JavaScript tokenizer / parser / beautifier / compressor. - https://github.com/mishoo/UglifyJS2 - - -------------------------------- (C) --------------------------------- - - Author: Mihai Bazon - - http://mihai.bazon.net/blog - - Distributed under the BSD license: - - Copyright 2012 (c) Mihai Bazon - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions - are met: - - * Redistributions of source code must retain the above - copyright notice, this list of conditions and the following - disclaimer. - - * Redistributions in binary form must reproduce the above - copyright notice, this list of conditions and the following - disclaimer in the documentation and/or other materials - provided with the distribution. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER “AS IS” AND ANY - EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER BE - LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, - OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR - TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF - THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - SUCH DAMAGE. - - ***********************************************************************/ - -"use strict"; - -function Compressor(options, false_by_default) { - if (!(this instanceof Compressor)) - return new Compressor(options, false_by_default); - TreeTransformer.call(this, this.before, this.after); - this.options = defaults(options, { - arguments : !false_by_default, - assignments : !false_by_default, - booleans : !false_by_default, - collapse_vars : !false_by_default, - comparisons : !false_by_default, - conditionals : !false_by_default, - dead_code : !false_by_default, - directives : !false_by_default, - drop_console : false, - drop_debugger : !false_by_default, - evaluate : !false_by_default, - expression : false, - functions : !false_by_default, - global_defs : false, - hoist_funs : false, - hoist_props : !false_by_default, - hoist_vars : false, - ie8 : false, - if_return : !false_by_default, - inline : !false_by_default, - join_vars : !false_by_default, - keep_fargs : false_by_default || "strict", - keep_fnames : false, - keep_infinity : false, - loops : !false_by_default, - negate_iife : !false_by_default, - objects : !false_by_default, - passes : 1, - properties : !false_by_default, - pure_getters : !false_by_default && "strict", - pure_funcs : null, - reduce_funcs : !false_by_default, - reduce_vars : !false_by_default, - sequences : !false_by_default, - side_effects : !false_by_default, - switches : !false_by_default, - top_retain : null, - toplevel : !!(options && options["top_retain"]), - typeofs : !false_by_default, - unsafe : false, - unsafe_comps : false, - unsafe_Function : false, - unsafe_math : false, - unsafe_proto : false, - unsafe_regexp : false, - unsafe_undefined: false, - unused : !false_by_default, - }, true); - var global_defs = this.options["global_defs"]; - if (typeof global_defs == "object") for (var key in global_defs) { - if (/^@/.test(key) && HOP(global_defs, key)) { - global_defs[key.slice(1)] = parse(global_defs[key], { - expression: true - }); - } - } - if (this.options["inline"] === true) this.options["inline"] = 3; - var keep_fargs = this.options["keep_fargs"]; - this.drop_fargs = keep_fargs == "strict" ? function(lambda, parent) { - if (lambda.length_read) return false; - var name = lambda.name; - if (!name) return parent && parent.TYPE == "Call" && parent.expression === lambda; - if (name.fixed_value() !== lambda) return false; - var def = name.definition(); - if (def.direct_access) return false; - var escaped = def.escaped; - return escaped && escaped.depth != 1; - } : keep_fargs ? return_false : return_true; - var pure_funcs = this.options["pure_funcs"]; - if (typeof pure_funcs == "function") { - this.pure_funcs = pure_funcs; - } else if (typeof pure_funcs == "string") { - this.pure_funcs = function(node) { - return pure_funcs !== node.expression.print_to_string(); - }; - } else if (Array.isArray(pure_funcs)) { - this.pure_funcs = function(node) { - return !member(node.expression.print_to_string(), pure_funcs); - }; - } else { - this.pure_funcs = return_true; - } - var sequences = this.options["sequences"]; - this.sequences_limit = sequences == 1 ? 800 : sequences | 0; - var top_retain = this.options["top_retain"]; - if (top_retain instanceof RegExp) { - this.top_retain = function(def) { - return top_retain.test(def.name); - }; - } else if (typeof top_retain == "function") { - this.top_retain = top_retain; - } else if (top_retain) { - if (typeof top_retain == "string") { - top_retain = top_retain.split(/,/); - } - this.top_retain = function(def) { - return member(def.name, top_retain); - }; - } - var toplevel = this.options["toplevel"]; - this.toplevel = typeof toplevel == "string" ? { - funcs: /funcs/.test(toplevel), - vars: /vars/.test(toplevel) - } : { - funcs: toplevel, - vars: toplevel - }; -} - -Compressor.prototype = new TreeTransformer; -merge(Compressor.prototype, { - option: function(key) { return this.options[key] }, - exposed: function(def) { - if (def.global) for (var i = 0; i < def.orig.length; i++) - if (!this.toplevel[def.orig[i] instanceof AST_SymbolDefun ? "funcs" : "vars"]) - return true; - return false; - }, - compress: function(node) { - node = node.resolve_defines(this); - if (this.option("expression")) { - node.process_expression(true); - } - var passes = +this.options.passes || 1; - var min_count = 1 / 0; - var stopping = false; - var mangle = { ie8: this.option("ie8") }; - for (var pass = 0; pass < passes; pass++) { - node.figure_out_scope(mangle); - if (pass > 0 || this.option("reduce_vars")) - node.reset_opt_flags(this); - node = node.transform(this); - if (passes > 1) { - var count = 0; - node.walk(new TreeWalker(function() { - count++; - })); - AST_Node.info("pass " + pass + ": last_count: " + min_count + ", count: " + count); - if (count < min_count) { - min_count = count; - stopping = false; - } else if (stopping) { - break; - } else { - stopping = true; - } - } - } - if (this.option("expression")) { - node.process_expression(false); - } - return node; - }, - before: function(node, descend, in_list) { - if (node._squeezed) return node; - var is_scope = node instanceof AST_Scope; - if (is_scope) { - node.hoist_properties(this); - node.hoist_declarations(this); - } - // Before https://github.com/mishoo/UglifyJS2/pull/1602 AST_Node.optimize() - // would call AST_Node.transform() if a different instance of AST_Node is - // produced after OPT(). - // This corrupts TreeWalker.stack, which cause AST look-ups to malfunction. - // Migrate and defer all children's AST_Node.transform() to below, which - // will now happen after this parent AST_Node has been properly substituted - // thus gives a consistent AST snapshot. - descend(node, this); - // Existing code relies on how AST_Node.optimize() worked, and omitting the - // following replacement call would result in degraded efficiency of both - // output and performance. - descend(node, this); - var opt = node.optimize(this); - if (is_scope) { - opt.drop_unused(this); - descend(opt, this); - } - if (opt === node) opt._squeezed = true; - return opt; - } -}); - -(function(OPT) { - OPT(AST_Node, function(self, compressor) { - return self; - }); - - AST_Node.DEFMETHOD("equivalent_to", function(node) { - return this.TYPE == node.TYPE && this.print_to_string() == node.print_to_string(); - }); - - AST_Scope.DEFMETHOD("process_expression", function(insert, compressor) { - var self = this; - var tt = new TreeTransformer(function(node) { - if (insert && node instanceof AST_SimpleStatement) { - return make_node(AST_Return, node, { - value: node.body - }); - } - if (!insert && node instanceof AST_Return) { - if (compressor) { - var value = node.value && node.value.drop_side_effect_free(compressor, true); - return value ? make_node(AST_SimpleStatement, node, { - body: value - }) : make_node(AST_EmptyStatement, node); - } - return make_node(AST_SimpleStatement, node, { - body: node.value || make_node(AST_UnaryPrefix, node, { - operator: "void", - expression: make_node(AST_Number, node, { - value: 0 - }) - }) - }); - } - if (node instanceof AST_Lambda && node !== self) { - return node; - } - if (node instanceof AST_Block) { - var index = node.body.length - 1; - if (index >= 0) { - node.body[index] = node.body[index].transform(tt); - } - } else if (node instanceof AST_If) { - node.body = node.body.transform(tt); - if (node.alternative) { - node.alternative = node.alternative.transform(tt); - } - } else if (node instanceof AST_With) { - node.body = node.body.transform(tt); - } - return node; - }); - self.transform(tt); - }); - - function read_property(obj, node) { - var key = node.getProperty(); - if (key instanceof AST_Node) return; - var value; - if (obj instanceof AST_Array) { - var elements = obj.elements; - if (key == "length") return make_node_from_constant(elements.length, obj); - if (typeof key == "number" && key in elements) value = elements[key]; - } else if (obj instanceof AST_Lambda) { - if (key == "length") { - obj.length_read = true; - return make_node_from_constant(obj.argnames.length, obj); - } - } else if (obj instanceof AST_Object) { - key = "" + key; - var props = obj.properties; - for (var i = props.length; --i >= 0;) { - var prop = props[i]; - if (!(prop instanceof AST_ObjectKeyVal)) return; - if (!value && props[i].key === key) value = props[i].value; - } - } - return value instanceof AST_SymbolRef && value.fixed_value() || value; - } - - function is_read_only_fn(value, name) { - if (value instanceof AST_Boolean) return native_fns.Boolean[name]; - if (value instanceof AST_Number) return native_fns.Number[name]; - if (value instanceof AST_String) return native_fns.String[name]; - if (name == "valueOf") return false; - if (value instanceof AST_Array) return native_fns.Array[name]; - if (value instanceof AST_Function) return native_fns.Function[name]; - if (value instanceof AST_Object) return native_fns.Object[name]; - if (value instanceof AST_RegExp) return native_fns.RegExp[name]; - } - - function is_modified(compressor, tw, node, value, level, immutable) { - var parent = tw.parent(level); - if (compressor.option("unsafe") && parent instanceof AST_Dot && is_read_only_fn(value, parent.property)) { - return; - } - var lhs = is_lhs(node, parent); - if (lhs) return lhs; - if (!immutable - && parent instanceof AST_Call - && parent.expression === node - && !parent.is_expr_pure(compressor) - && (!(value instanceof AST_Function) - || !(parent instanceof AST_New) && value.contains_this())) { - return true; - } - if (parent instanceof AST_Array) { - return is_modified(compressor, tw, parent, parent, level + 1); - } - if (parent instanceof AST_ObjectKeyVal && node === parent.value) { - var obj = tw.parent(level + 1); - return is_modified(compressor, tw, obj, obj, level + 2); - } - if (parent instanceof AST_PropAccess && parent.expression === node) { - var prop = read_property(value, parent); - return !immutable && is_modified(compressor, tw, parent, prop, level + 1); - } - } - - function is_arguments(def) { - if (def.name != "arguments") return false; - var orig = def.orig; - return orig.length == 1 && orig[0] instanceof AST_SymbolFunarg; - } - - (function(def) { - def(AST_Node, noop); - - function reset_def(tw, compressor, def) { - def.assignments = 0; - def.chained = false; - def.direct_access = false; - def.escaped = []; - def.fixed = !def.scope.pinned() - && !compressor.exposed(def) - && !(def.init instanceof AST_Function && def.init !== def.scope) - && def.init; - if (def.fixed instanceof AST_Defun && !all(def.references, function(ref) { - var scope = ref.scope; - do { - if (def.scope === scope) return true; - } while (scope instanceof AST_Function && (scope = scope.parent_scope)); - })) { - tw.defun_ids[def.id] = false; - } - def.recursive_refs = 0; - def.references = []; - def.should_replace = undefined; - def.single_use = undefined; - } - - function reset_variables(tw, compressor, scope) { - scope.variables.each(function(def) { - reset_def(tw, compressor, def); - if (def.fixed === null) { - def.safe_ids = tw.safe_ids; - mark(tw, def, true); - } else if (def.fixed) { - tw.loop_ids[def.id] = tw.in_loop; - mark(tw, def, true); - } - }); - scope.may_call_this = function() { - scope.may_call_this = noop; - if (!scope.contains_this()) return; - scope.functions.each(function(def) { - if (def.init instanceof AST_Defun && !(def.id in tw.defun_ids)) { - tw.defun_ids[def.id] = false; - } - }); - }; - } - - function mark_defun(tw, def) { - if (def.id in tw.defun_ids) { - var marker = tw.defun_ids[def.id]; - if (!marker) return; - var visited = tw.defun_visited[def.id]; - if (marker === tw.safe_ids) { - if (!visited) return def.fixed; - } else if (visited) { - def.init.enclosed.forEach(function(d) { - if (def.init.variables.get(d.name) === d) return; - if (!safe_to_read(tw, d)) d.fixed = false; - }); - } else { - tw.defun_ids[def.id] = false; - } - } else { - if (!tw.in_loop) { - tw.defun_ids[def.id] = tw.safe_ids; - return def.fixed; - } - tw.defun_ids[def.id] = false; - } - } - - function walk_defuns(tw, scope) { - scope.functions.each(function(def) { - if (def.init instanceof AST_Defun && !tw.defun_visited[def.id]) { - tw.defun_ids[def.id] = tw.safe_ids; - def.init.walk(tw); - } - }); - } - - function push(tw) { - tw.safe_ids = Object.create(tw.safe_ids); - } - - function pop(tw) { - tw.safe_ids = Object.getPrototypeOf(tw.safe_ids); - } - - function mark(tw, def, safe) { - tw.safe_ids[def.id] = safe; - } - - function safe_to_read(tw, def) { - if (def.single_use == "m") return false; - if (tw.safe_ids[def.id]) { - if (def.fixed == null) { - if (is_arguments(def)) return false; - if (def.global && def.name == "arguments") return false; - def.fixed = make_node(AST_Undefined, def.orig); - } - return true; - } - return def.fixed instanceof AST_Defun; - } - - function safe_to_assign(tw, def, scope, value) { - if (def.fixed === undefined) return true; - if (def.fixed === null && def.safe_ids) { - def.safe_ids[def.id] = false; - delete def.safe_ids; - return true; - } - if (!HOP(tw.safe_ids, def.id)) return false; - if (!safe_to_read(tw, def)) return false; - if (def.fixed === false) return false; - if (def.fixed != null && (!value || def.references.length > def.assignments)) return false; - if (def.fixed instanceof AST_Defun) { - return value instanceof AST_Node && def.fixed.parent_scope === scope; - } - return all(def.orig, function(sym) { - return !(sym instanceof AST_SymbolDefun || sym instanceof AST_SymbolLambda); - }); - } - - function ref_once(tw, compressor, def) { - return compressor.option("unused") - && !def.scope.pinned() - && def.references.length - def.recursive_refs == 1 - && tw.loop_ids[def.id] === tw.in_loop; - } - - function is_immutable(value) { - if (!value) return false; - return value.is_constant() - || value instanceof AST_Lambda - || value instanceof AST_This; - } - - function mark_escaped(tw, d, scope, node, value, level, depth) { - var parent = tw.parent(level); - if (value && value.is_constant()) return; - if (parent instanceof AST_Assign && parent.operator == "=" && node === parent.right - || parent instanceof AST_Call && (node !== parent.expression || parent instanceof AST_New) - || parent instanceof AST_Exit && node === parent.value && node.scope !== d.scope - || parent instanceof AST_VarDef && node === parent.value) { - d.escaped.push(parent); - if (depth > 1 && !(value && value.is_constant_expression(scope))) depth = 1; - if (!d.escaped.depth || d.escaped.depth > depth) d.escaped.depth = depth; - return; - } else if (parent instanceof AST_Array - || parent instanceof AST_Binary && lazy_op[parent.operator] - || parent instanceof AST_Conditional && node !== parent.condition - || parent instanceof AST_Sequence && node === parent.tail_node()) { - mark_escaped(tw, d, scope, parent, parent, level + 1, depth); - } else if (parent instanceof AST_ObjectKeyVal && node === parent.value) { - var obj = tw.parent(level + 1); - mark_escaped(tw, d, scope, obj, obj, level + 2, depth); - } else if (parent instanceof AST_PropAccess && node === parent.expression) { - value = read_property(value, parent); - mark_escaped(tw, d, scope, parent, value, level + 1, depth + 1); - if (value) return; - } - if (level > 0) return; - if (parent instanceof AST_Call && node === parent.expression) return; - if (parent instanceof AST_Sequence && node !== parent.tail_node()) return; - if (parent instanceof AST_SimpleStatement) return; - if (parent instanceof AST_Unary && !unary_side_effects[parent.operator]) return; - d.direct_access = true; - } - - function mark_assignment_to_arguments(node) { - if (!(node instanceof AST_Sub)) return; - var expr = node.expression; - if (!(expr instanceof AST_SymbolRef)) return; - var def = expr.definition(); - if (is_arguments(def) && node.property instanceof AST_Number) def.reassigned = true; - } - - var suppressor = new TreeWalker(function(node) { - if (!(node instanceof AST_Symbol)) return; - var d = node.definition(); - if (!d) return; - if (node instanceof AST_SymbolRef) d.references.push(node); - d.fixed = false; - }); - def(AST_Accessor, function(tw, descend, compressor) { - push(tw); - reset_variables(tw, compressor, this); - descend(); - pop(tw); - walk_defuns(tw, this); - return true; - }); - def(AST_Assign, function(tw, descend, compressor) { - var node = this; - var sym = node.left; - if (!(sym instanceof AST_SymbolRef)) { - mark_assignment_to_arguments(sym); - return; - } - if (sym.fixed) delete sym.fixed; - var d = sym.definition(); - var safe = safe_to_assign(tw, d, sym.scope, node.right); - d.assignments++; - var fixed = d.fixed; - if (!fixed && node.operator != "=") return; - var eq = node.operator == "="; - var value = eq ? node.right : node; - if (is_modified(compressor, tw, node, value, 0)) return; - if (!eq) d.chained = true; - sym.fixed = d.fixed = eq ? function() { - return node.right; - } : function() { - return make_node(AST_Binary, node, { - operator: node.operator.slice(0, -1), - left: fixed instanceof AST_Node ? fixed : fixed(), - right: node.right - }); - }; - if (!safe) return; - d.references.push(sym); - mark(tw, d, false); - node.right.walk(tw); - mark(tw, d, true); - if (eq) mark_escaped(tw, d, sym.scope, node, value, 0, 1); - return true; - }); - def(AST_Binary, function(tw) { - if (!lazy_op[this.operator]) return; - this.left.walk(tw); - push(tw); - this.right.walk(tw); - pop(tw); - return true; - }); - def(AST_Call, function(tw, descend) { - tw.find_parent(AST_Scope).may_call_this(); - var exp = this.expression; - if (!(exp instanceof AST_SymbolRef)) return; - var def = exp.definition(); - if (!(def.fixed instanceof AST_Defun)) return; - var defun = mark_defun(tw, def); - if (!defun) return; - descend(); - defun.walk(tw); - return true; - }); - def(AST_Case, function(tw) { - push(tw); - this.expression.walk(tw); - pop(tw); - push(tw); - walk_body(this, tw); - pop(tw); - return true; - }); - def(AST_Conditional, function(tw) { - this.condition.walk(tw); - push(tw); - this.consequent.walk(tw); - pop(tw); - push(tw); - this.alternative.walk(tw); - pop(tw); - return true; - }); - def(AST_Default, function(tw, descend) { - push(tw); - descend(); - pop(tw); - return true; - }); - def(AST_Defun, function(tw, descend, compressor) { - var id = this.name.definition().id; - if (tw.defun_visited[id]) return true; - if (tw.defun_ids[id] !== tw.safe_ids) return true; - tw.defun_visited[id] = true; - this.inlined = false; - push(tw); - reset_variables(tw, compressor, this); - descend(); - pop(tw); - walk_defuns(tw, this); - return true; - }); - def(AST_Do, function(tw) { - var saved_loop = tw.in_loop; - tw.in_loop = this; - push(tw); - this.body.walk(tw); - if (has_break_or_continue(this)) { - pop(tw); - push(tw); - } - this.condition.walk(tw); - pop(tw); - tw.in_loop = saved_loop; - return true; - }); - def(AST_For, function(tw) { - if (this.init) this.init.walk(tw); - var saved_loop = tw.in_loop; - tw.in_loop = this; - push(tw); - if (this.condition) this.condition.walk(tw); - this.body.walk(tw); - if (this.step) { - if (has_break_or_continue(this)) { - pop(tw); - push(tw); - } - this.step.walk(tw); - } - pop(tw); - tw.in_loop = saved_loop; - return true; - }); - def(AST_ForIn, function(tw) { - this.init.walk(suppressor); - this.object.walk(tw); - var saved_loop = tw.in_loop; - tw.in_loop = this; - push(tw); - this.body.walk(tw); - pop(tw); - tw.in_loop = saved_loop; - return true; - }); - def(AST_Function, function(tw, descend, compressor) { - var node = this; - node.inlined = false; - push(tw); - reset_variables(tw, compressor, node); - var iife; - if (!node.name - && (iife = tw.parent()) instanceof AST_Call - && iife.expression === node) { - // Virtually turn IIFE parameters into variable definitions: - // (function(a,b) {...})(c,d) => (function() {var a=c,b=d; ...})() - // So existing transformation rules can work on them. - node.argnames.forEach(function(arg, i) { - var d = arg.definition(); - if (d.fixed === undefined && (!node.uses_arguments || tw.has_directive("use strict"))) { - d.fixed = function() { - return iife.args[i] || make_node(AST_Undefined, iife); - }; - tw.loop_ids[d.id] = tw.in_loop; - mark(tw, d, true); - } else { - d.fixed = false; - } - }); - } - descend(); - pop(tw); - walk_defuns(tw, node); - return true; - }); - def(AST_If, function(tw) { - this.condition.walk(tw); - push(tw); - this.body.walk(tw); - pop(tw); - if (this.alternative) { - push(tw); - this.alternative.walk(tw); - pop(tw); - } - return true; - }); - def(AST_LabeledStatement, function(tw) { - push(tw); - this.body.walk(tw); - pop(tw); - return true; - }); - def(AST_SymbolCatch, function() { - this.definition().fixed = false; - }); - def(AST_SymbolRef, function(tw, descend, compressor) { - if (this.fixed) delete this.fixed; - var d = this.definition(); - d.references.push(this); - if (d.references.length == 1 - && !d.fixed - && d.orig[0] instanceof AST_SymbolDefun) { - tw.loop_ids[d.id] = tw.in_loop; - } - var value; - if (d.fixed === undefined || !safe_to_read(tw, d)) { - d.fixed = false; - } else if (d.fixed) { - value = this.fixed_value(); - if (recursive_ref(tw, d)) { - d.recursive_refs++; - } else if (value && ref_once(tw, compressor, d)) { - d.single_use = value instanceof AST_Lambda && !value.pinned() - || d.scope === this.scope && value.is_constant_expression(); - } else { - d.single_use = false; - } - if (is_modified(compressor, tw, this, value, 0, is_immutable(value))) { - if (d.single_use) { - d.single_use = "m"; - } else { - d.fixed = false; - } - } - mark_escaped(tw, d, this.scope, this, value, 0, 1); - } - var parent; - if (d.fixed instanceof AST_Defun - && !((parent = tw.parent()) instanceof AST_Call && parent.expression === this)) { - var defun = mark_defun(tw, d); - if (defun) defun.walk(tw); - } - }); - def(AST_Toplevel, function(tw, descend, compressor) { - this.globals.each(function(def) { - reset_def(tw, compressor, def); - }); - push(tw); - reset_variables(tw, compressor, this); - descend(); - pop(tw); - walk_defuns(tw, this); - return true; - }); - def(AST_Try, function(tw) { - push(tw); - walk_body(this, tw); - pop(tw); - if (this.bcatch) { - push(tw); - this.bcatch.walk(tw); - pop(tw); - } - if (this.bfinally) this.bfinally.walk(tw); - return true; - }); - def(AST_Unary, function(tw, descend) { - var node = this; - if (!unary_arithmetic[node.operator]) return; - var exp = node.expression; - if (!(exp instanceof AST_SymbolRef)) { - mark_assignment_to_arguments(exp); - return; - } - if (exp.fixed) delete exp.fixed; - var d = exp.definition(); - var safe = safe_to_assign(tw, d, exp.scope, true); - d.assignments++; - var fixed = d.fixed; - if (!fixed) return; - d.chained = true; - exp.fixed = d.fixed = function() { - return make_node(AST_Binary, node, { - operator: node.operator.slice(0, -1), - left: make_node(AST_UnaryPrefix, node, { - operator: "+", - expression: fixed instanceof AST_Node ? fixed : fixed() - }), - right: make_node(AST_Number, node, { - value: 1 - }) - }); - }; - if (!safe) return; - d.references.push(exp); - mark(tw, d, true); - return true; - }); - def(AST_VarDef, function(tw, descend) { - var node = this; - var d = node.name.definition(); - if (node.value) { - if (safe_to_assign(tw, d, node.name.scope, node.value)) { - d.fixed = function() { - return node.value; - }; - tw.loop_ids[d.id] = tw.in_loop; - mark(tw, d, false); - descend(); - mark(tw, d, true); - return true; - } else { - d.fixed = false; - } - } - }); - def(AST_While, function(tw, descend) { - var saved_loop = tw.in_loop; - tw.in_loop = this; - push(tw); - descend(); - pop(tw); - tw.in_loop = saved_loop; - return true; - }); - })(function(node, func) { - node.DEFMETHOD("reduce_vars", func); - }); - - AST_Toplevel.DEFMETHOD("reset_opt_flags", function(compressor) { - var tw = new TreeWalker(compressor.option("reduce_vars") ? function(node, descend) { - node._squeezed = false; - node._optimized = false; - return node.reduce_vars(tw, descend, compressor); - } : function(node) { - node._squeezed = false; - node._optimized = false; - }); - // Flow control for visiting `AST_Defun`s - tw.defun_ids = Object.create(null); - tw.defun_visited = Object.create(null); - // Record the loop body in which `AST_SymbolDeclaration` is first encountered - tw.in_loop = null; - tw.loop_ids = Object.create(null); - // Stack of look-up tables to keep track of whether a `SymbolDef` has been - // properly assigned before use: - // - `push()` & `pop()` when visiting conditional branches - // - backup & restore via `save_ids` when visiting out-of-order sections - tw.safe_ids = Object.create(null); - this.walk(tw); - }); - - AST_Symbol.DEFMETHOD("fixed_value", function(final) { - var fixed = this.definition().fixed; - if (!fixed) return fixed; - if (!final && this.fixed) fixed = this.fixed; - return fixed instanceof AST_Node ? fixed : fixed(); - }); - - AST_SymbolRef.DEFMETHOD("is_immutable", function() { - var def = this.definition(); - if (def.orig.length != 1) return false; - var sym = def.orig[0]; - return sym instanceof AST_SymbolLambda && def.scope.name === sym; - }); - - function is_lhs_read_only(lhs, compressor) { - if (lhs instanceof AST_This) return true; - if (lhs instanceof AST_SymbolRef) { - var def = lhs.definition(); - return def.lambda || compressor.exposed(def) && identifier_atom[def.name]; - } - if (lhs instanceof AST_PropAccess) { - lhs = lhs.expression; - if (lhs instanceof AST_SymbolRef) { - if (lhs.is_immutable()) return false; - lhs = lhs.fixed_value(); - } - if (!lhs) return true; - if (lhs.is_constant()) return true; - return is_lhs_read_only(lhs, compressor); - } - return false; - } - - function find_variable(compressor, name) { - var scope, i = 0; - while (scope = compressor.parent(i++)) { - if (scope instanceof AST_Scope) break; - if (scope instanceof AST_Catch) { - scope = scope.argname.definition().scope; - break; - } - } - return scope.find_variable(name); - } - - function make_node(ctor, orig, props) { - if (!props) props = {}; - if (orig) { - if (!props.start) props.start = orig.start; - if (!props.end) props.end = orig.end; - } - return new ctor(props); - } - - function make_sequence(orig, expressions) { - if (expressions.length == 1) return expressions[0]; - return make_node(AST_Sequence, orig, { - expressions: expressions.reduce(merge_sequence, []) - }); - } - - function make_node_from_constant(val, orig) { - switch (typeof val) { - case "string": - return make_node(AST_String, orig, { - value: val - }); - case "number": - if (isNaN(val)) return make_node(AST_NaN, orig); - if (isFinite(val)) { - return 1 / val < 0 ? make_node(AST_UnaryPrefix, orig, { - operator: "-", - expression: make_node(AST_Number, orig, { value: -val }) - }) : make_node(AST_Number, orig, { value: val }); - } - return val < 0 ? make_node(AST_UnaryPrefix, orig, { - operator: "-", - expression: make_node(AST_Infinity, orig) - }) : make_node(AST_Infinity, orig); - case "boolean": - return make_node(val ? AST_True : AST_False, orig); - case "undefined": - return make_node(AST_Undefined, orig); - default: - if (val === null) { - return make_node(AST_Null, orig, { value: null }); - } - if (val instanceof RegExp) { - return make_node(AST_RegExp, orig, { value: val }); - } - throw new Error(string_template("Can't handle constant of type: {type}", { - type: typeof val - })); - } - } - - function needs_unbinding(compressor, val) { - return val instanceof AST_PropAccess - || compressor.has_directive("use strict") - && is_undeclared_ref(val) - && val.name == "eval"; - } - - // we shouldn't compress (1,func)(something) to - // func(something) because that changes the meaning of - // the func (becomes lexical instead of global). - function maintain_this_binding(compressor, parent, orig, val) { - if (parent instanceof AST_UnaryPrefix && parent.operator == "delete" - || parent.TYPE == "Call" && parent.expression === orig && needs_unbinding(compressor, val)) { - return make_sequence(orig, [ make_node(AST_Number, orig, { value: 0 }), val ]); - } - return val; - } - - function merge_sequence(array, node) { - if (node instanceof AST_Sequence) { - array.push.apply(array, node.expressions); - } else { - array.push(node); - } - return array; - } - - function as_statement_array(thing) { - if (thing === null) return []; - if (thing instanceof AST_BlockStatement) return thing.body; - if (thing instanceof AST_EmptyStatement) return []; - if (thing instanceof AST_Statement) return [ thing ]; - throw new Error("Can't convert thing to statement array"); - } - - function is_empty(thing) { - if (thing === null) return true; - if (thing instanceof AST_EmptyStatement) return true; - if (thing instanceof AST_BlockStatement) return thing.body.length == 0; - return false; - } - - function loop_body(x) { - if (x instanceof AST_IterationStatement) { - return x.body instanceof AST_BlockStatement ? x.body : x; - } - return x; - } - - function root_expr(prop) { - while (prop instanceof AST_PropAccess) prop = prop.expression; - return prop; - } - - function is_iife_call(node) { - if (node.TYPE != "Call") return false; - return node.expression instanceof AST_Function || is_iife_call(node.expression); - } - - function is_undeclared_ref(node) { - return node instanceof AST_SymbolRef && node.definition().undeclared; - } - - var global_names = makePredicate("Array Boolean clearInterval clearTimeout console Date decodeURI decodeURIComponent encodeURI encodeURIComponent Error escape eval EvalError Function isFinite isNaN JSON Math Number parseFloat parseInt RangeError ReferenceError RegExp Object setInterval setTimeout String SyntaxError TypeError unescape URIError"); - AST_SymbolRef.DEFMETHOD("is_declared", function(compressor) { - return this.defined - || !this.definition().undeclared - || compressor.option("unsafe") && global_names[this.name]; - }); - - var identifier_atom = makePredicate("Infinity NaN undefined"); - function is_identifier_atom(node) { - return node instanceof AST_Infinity - || node instanceof AST_NaN - || node instanceof AST_Undefined; - } - - function tighten_body(statements, compressor) { - var in_loop, in_try, scope; - find_loop_scope_try(); - var CHANGED, max_iter = 10; - do { - CHANGED = false; - eliminate_spurious_blocks(statements); - if (compressor.option("dead_code")) { - eliminate_dead_code(statements, compressor); - } - if (compressor.option("if_return")) { - handle_if_return(statements, compressor); - } - if (compressor.sequences_limit > 0) { - sequencesize(statements, compressor); - sequencesize_2(statements, compressor); - } - if (compressor.option("join_vars")) { - join_consecutive_vars(statements); - } - if (compressor.option("collapse_vars")) { - collapse(statements, compressor); - } - } while (CHANGED && max_iter-- > 0); - - function find_loop_scope_try() { - var node = compressor.self(), level = 0; - do { - if (node instanceof AST_Catch || node instanceof AST_Finally) { - level++; - } else if (node instanceof AST_IterationStatement) { - in_loop = true; - } else if (node instanceof AST_Scope) { - scope = node; - break; - } else if (node instanceof AST_Try) { - in_try = true; - } - } while (node = compressor.parent(level++)); - } - - // Search from right to left for assignment-like expressions: - // - `var a = x;` - // - `a = x;` - // - `++a` - // For each candidate, scan from left to right for first usage, then try - // to fold assignment into the site for compression. - // Will not attempt to collapse assignments into or past code blocks - // which are not sequentially executed, e.g. loops and conditionals. - function collapse(statements, compressor) { - if (scope.pinned()) return statements; - var args; - var candidates = []; - var stat_index = statements.length; - var scanner = new TreeTransformer(function(node) { - if (abort) return node; - // Skip nodes before `candidate` as quickly as possible - if (!hit) { - if (node !== hit_stack[hit_index]) return node; - hit_index++; - if (hit_index < hit_stack.length) return handle_custom_scan_order(node); - hit = true; - stop_after = find_stop(node, 0); - if (stop_after === node) abort = true; - return node; - } - // Stop immediately if these node types are encountered - var parent = scanner.parent(); - if (should_stop(node, parent)) { - abort = true; - return node; - } - // Stop only if candidate is found within conditional branches - if (!stop_if_hit && in_conditional(node, parent)) { - stop_if_hit = parent; - } - // Skip transient nodes caused by single-use variable replacement - if (node.single_use && parent instanceof AST_VarDef && parent.value === node) return node; - // Replace variable with assignment when found - var hit_rhs; - if (can_replace - && !(node instanceof AST_SymbolDeclaration) - && (scan_lhs && lhs.equivalent_to(node) - || scan_rhs && (hit_rhs = scan_rhs(node, this)))) { - if (stop_if_hit && (hit_rhs || !lhs_local || !replace_all)) { - abort = true; - return node; - } - if (is_lhs(node, parent)) { - if (value_def) replaced++; - return node; - } else { - replaced++; - if (value_def && candidate instanceof AST_VarDef) return node; - } - CHANGED = abort = true; - AST_Node.info("Collapsing {name} [{file}:{line},{col}]", { - name: node.print_to_string(), - file: node.start.file, - line: node.start.line, - col: node.start.col - }); - if (candidate instanceof AST_UnaryPostfix) { - return make_node(AST_UnaryPrefix, candidate, candidate); - } - if (candidate instanceof AST_VarDef) { - var def = candidate.name.definition(); - if (def.references.length - def.replaced == 1 && !compressor.exposed(def)) { - def.replaced++; - return maintain_this_binding(compressor, parent, node, candidate.value); - } - return make_node(AST_Assign, candidate, { - operator: "=", - left: make_node(AST_SymbolRef, candidate.name, candidate.name), - right: candidate.value - }); - } - candidate.write_only = false; - return candidate; - } - // These node types have child nodes that execute sequentially, - // but are otherwise not safe to scan into or beyond them. - var sym; - if (is_last_node(node, parent) || may_throw(node)) { - stop_after = node; - if (node instanceof AST_Scope) abort = true; - } - return handle_custom_scan_order(node); - }, function(node) { - if (abort) return; - if (stop_after === node) abort = true; - if (stop_if_hit === node) stop_if_hit = null; - }); - var multi_replacer = new TreeTransformer(function(node) { - if (abort) return node; - // Skip nodes before `candidate` as quickly as possible - if (!hit) { - if (node !== hit_stack[hit_index]) return node; - hit_index++; - if (hit_index < hit_stack.length) return; - hit = true; - return node; - } - // Replace variable when found - if (node instanceof AST_SymbolRef - && node.name == def.name) { - if (!--replaced) abort = true; - if (is_lhs(node, multi_replacer.parent())) return node; - def.replaced++; - value_def.replaced--; - return candidate.value.clone(); - } - // Skip (non-executed) functions and (leading) default case in switch statements - if (node instanceof AST_Default || node instanceof AST_Scope) return node; - }); - while (--stat_index >= 0) { - // Treat parameters as collapsible in IIFE, i.e. - // function(a, b){ ... }(x()); - // would be translated into equivalent assignments: - // var a = x(), b = undefined; - if (stat_index == 0 && compressor.option("unused")) extract_args(); - // Find collapsible assignments - var hit_stack = []; - extract_candidates(statements[stat_index]); - while (candidates.length > 0) { - hit_stack = candidates.pop(); - var hit_index = 0; - var candidate = hit_stack[hit_stack.length - 1]; - var value_def = null; - var stop_after = null; - var stop_if_hit = null; - var lhs = get_lhs(candidate); - var side_effects = lhs && lhs.has_side_effects(compressor); - var scan_lhs = lhs && !side_effects && !is_lhs_read_only(lhs, compressor); - var scan_rhs = foldable(get_rhs(candidate)); - if (!scan_lhs && !scan_rhs) continue; - var modify_toplevel = false; - // Locate symbols which may execute code outside of scanning range - var lvalues = get_lvalues(candidate); - var lhs_local = is_lhs_local(lhs); - if (!side_effects) side_effects = value_has_side_effects(candidate); - var replace_all = replace_all_symbols(candidate); - var may_throw = candidate.may_throw(compressor) ? in_try ? function(node) { - return node.has_side_effects(compressor); - } : side_effects_external : return_false; - var funarg = candidate.name instanceof AST_SymbolFunarg; - var hit = funarg; - var abort = false, replaced = 0, can_replace = !args || !hit; - if (!can_replace) { - for (var j = compressor.self().argnames.lastIndexOf(candidate.name) + 1; !abort && j < args.length; j++) { - args[j].transform(scanner); - } - can_replace = true; - } - for (var i = stat_index; !abort && i < statements.length; i++) { - statements[i].transform(scanner); - } - if (value_def) { - var def = candidate.name.definition(); - if (abort && def.references.length - def.replaced > replaced) replaced = false; - else { - abort = false; - hit_index = 0; - hit = funarg; - for (var i = stat_index; !abort && i < statements.length; i++) { - statements[i].transform(multi_replacer); - } - value_def.single_use = false; - } - } - if (replaced && !remove_candidate(candidate)) statements.splice(stat_index, 1); - } - } - - function handle_custom_scan_order(node) { - // Skip (non-executed) functions - if (node instanceof AST_Scope) return node; - // Scan case expressions first in a switch statement - if (node instanceof AST_Switch) { - node.expression = node.expression.transform(scanner); - for (var i = 0; !abort && i < node.body.length; i++) { - var branch = node.body[i]; - if (branch instanceof AST_Case) { - if (!hit) { - if (branch !== hit_stack[hit_index]) continue; - hit_index++; - } - branch.expression = branch.expression.transform(scanner); - if (!replace_all) break; - } - } - abort = true; - return node; - } - } - - function should_stop(node, parent) { - if (parent instanceof AST_For) return node !== parent.init; - if (node instanceof AST_Assign) { - return node.operator != "=" && lhs.equivalent_to(node.left); - } - if (node instanceof AST_Call) { - return lhs instanceof AST_PropAccess && lhs.equivalent_to(node.expression); - } - if (node instanceof AST_Debugger) return true; - if (node instanceof AST_Defun) return funarg && lhs.name === node.name.name; - if (node instanceof AST_IterationStatement) return !(node instanceof AST_For); - if (node instanceof AST_LoopControl) return true; - if (node instanceof AST_Try) return true; - if (node instanceof AST_With) return true; - if (replace_all) return false; - return node instanceof AST_SymbolRef - && !node.is_declared(compressor) - && !(parent instanceof AST_Assign && parent.left === node); - } - - function in_conditional(node, parent) { - if (parent instanceof AST_Binary) return lazy_op[parent.operator] && parent.left !== node; - if (parent instanceof AST_Case) return parent.expression !== node; - if (parent instanceof AST_Conditional) return parent.condition !== node; - return parent instanceof AST_If && parent.condition !== node; - } - - function is_last_node(node, parent) { - if (node instanceof AST_Call) return true; - if (node instanceof AST_Exit) { - return side_effects || lhs instanceof AST_PropAccess || may_modify(lhs); - } - if (node instanceof AST_Function) { - return compressor.option("ie8") && node.name && node.name.name in lvalues; - } - if (node instanceof AST_PropAccess) { - return side_effects || node.expression.may_throw_on_access(compressor); - } - if (node instanceof AST_SymbolRef) { - if (symbol_in_lvalues(node, parent)) { - return !parent || parent.operator != "=" || parent.left !== node; - } - return side_effects && may_modify(node); - } - if (node instanceof AST_This) return symbol_in_lvalues(node, parent); - if (node instanceof AST_VarDef) { - if (!node.value) return false; - return node.name.name in lvalues || side_effects && may_modify(node.name); - } - var sym = is_lhs(node.left, node); - if (sym && sym.name in lvalues) return true; - if (sym instanceof AST_PropAccess) return true; - } - - function extract_args() { - var iife, fn = compressor.self(); - if (fn instanceof AST_Function - && !fn.name - && !fn.uses_arguments - && !fn.pinned() - && (iife = compressor.parent()) instanceof AST_Call - && iife.expression === fn) { - var fn_strict = compressor.has_directive("use strict"); - if (fn_strict && !member(fn_strict, fn.body)) fn_strict = false; - var len = fn.argnames.length; - args = iife.args.slice(len); - var names = Object.create(null); - for (var i = len; --i >= 0;) { - var sym = fn.argnames[i]; - var arg = iife.args[i]; - args.unshift(make_node(AST_VarDef, sym, { - name: sym, - value: arg - })); - if (sym.name in names) continue; - names[sym.name] = true; - if (!arg) { - arg = make_node(AST_Undefined, sym).transform(compressor); - } else if (arg instanceof AST_Lambda && arg.pinned()) { - arg = null; - } else { - arg.walk(new TreeWalker(function(node) { - if (!arg) return true; - if (node instanceof AST_SymbolRef && fn.variables.has(node.name)) { - var s = node.definition().scope; - if (s !== scope) while (s = s.parent_scope) { - if (s === scope) return true; - } - arg = null; - } - if (node instanceof AST_This && (fn_strict || !this.find_parent(AST_Scope))) { - arg = null; - return true; - } - })); - } - if (arg) candidates.unshift([ make_node(AST_VarDef, sym, { - name: sym, - value: arg - }) ]); - } - } - } - - function extract_candidates(expr) { - hit_stack.push(expr); - if (expr instanceof AST_Assign) { - candidates.push(hit_stack.slice()); - extract_candidates(expr.left); - extract_candidates(expr.right); - } else if (expr instanceof AST_Binary) { - extract_candidates(expr.left); - extract_candidates(expr.right); - } else if (expr instanceof AST_Call) { - extract_candidates(expr.expression); - expr.args.forEach(extract_candidates); - } else if (expr instanceof AST_Case) { - extract_candidates(expr.expression); - } else if (expr instanceof AST_Conditional) { - extract_candidates(expr.condition); - extract_candidates(expr.consequent); - extract_candidates(expr.alternative); - } else if (expr instanceof AST_Definitions) { - expr.definitions.forEach(extract_candidates); - } else if (expr instanceof AST_Dot) { - extract_candidates(expr.expression); - } else if (expr instanceof AST_DWLoop) { - extract_candidates(expr.condition); - if (!(expr.body instanceof AST_Block)) { - extract_candidates(expr.body); - } - } else if (expr instanceof AST_Exit) { - if (expr.value) extract_candidates(expr.value); - } else if (expr instanceof AST_For) { - if (expr.init) extract_candidates(expr.init); - if (expr.condition) extract_candidates(expr.condition); - if (expr.step) extract_candidates(expr.step); - if (!(expr.body instanceof AST_Block)) { - extract_candidates(expr.body); - } - } else if (expr instanceof AST_ForIn) { - extract_candidates(expr.object); - if (!(expr.body instanceof AST_Block)) { - extract_candidates(expr.body); - } - } else if (expr instanceof AST_If) { - extract_candidates(expr.condition); - if (!(expr.body instanceof AST_Block)) { - extract_candidates(expr.body); - } - if (expr.alternative && !(expr.alternative instanceof AST_Block)) { - extract_candidates(expr.alternative); - } - } else if (expr instanceof AST_Sequence) { - expr.expressions.forEach(extract_candidates); - } else if (expr instanceof AST_SimpleStatement) { - extract_candidates(expr.body); - } else if (expr instanceof AST_Sub) { - extract_candidates(expr.expression); - extract_candidates(expr.property); - } else if (expr instanceof AST_Switch) { - extract_candidates(expr.expression); - expr.body.forEach(extract_candidates); - } else if (expr instanceof AST_Unary) { - if (unary_arithmetic[expr.operator]) { - candidates.push(hit_stack.slice()); - } else { - extract_candidates(expr.expression); - } - } else if (expr instanceof AST_VarDef) { - if (expr.value) { - var def = expr.name.definition(); - if (def.references.length > def.replaced) { - candidates.push(hit_stack.slice()); - } - extract_candidates(expr.value); - } - } - hit_stack.pop(); - } - - function find_stop(node, level) { - var parent = scanner.parent(level); - if (parent instanceof AST_Assign) return node; - if (parent instanceof AST_Binary) return node; - if (parent instanceof AST_Call) return node; - if (parent instanceof AST_Case) return node; - if (parent instanceof AST_Conditional) return node; - if (parent instanceof AST_Definitions) return find_stop_unused(parent, level + 1); - if (parent instanceof AST_Exit) return node; - if (parent instanceof AST_If) return node; - if (parent instanceof AST_IterationStatement) return node; - if (parent instanceof AST_PropAccess) return node; - if (parent instanceof AST_Sequence) { - return (parent.tail_node() === node ? find_stop : find_stop_unused)(parent, level + 1); - } - if (parent instanceof AST_SimpleStatement) return find_stop_unused(parent, level + 1); - if (parent instanceof AST_Switch) return node; - if (parent instanceof AST_Unary) return node; - if (parent instanceof AST_VarDef) return node; - return null; - } - - function find_stop_unused(node, level) { - var parent = scanner.parent(level); - if (is_last_node(node, parent)) return node; - if (in_conditional(node, parent)) return node; - if (parent instanceof AST_Assign) return find_stop_unused(parent, level + 1); - if (parent instanceof AST_Binary) return find_stop_unused(parent, level + 1); - if (parent instanceof AST_Call) return find_stop_unused(parent, level + 1); - if (parent instanceof AST_Case) return find_stop_unused(parent, level + 1); - if (parent instanceof AST_Conditional) return find_stop_unused(parent, level + 1); - if (parent instanceof AST_Definitions) return find_stop_unused(parent, level + 1); - if (parent instanceof AST_Exit) return find_stop_unused(parent, level + 1); - if (parent instanceof AST_If) return find_stop_unused(parent, level + 1); - if (parent instanceof AST_IterationStatement) return node; - if (parent instanceof AST_PropAccess) return find_stop_unused(parent, level + 1); - if (parent instanceof AST_Sequence) return find_stop_unused(parent, level + 1); - if (parent instanceof AST_SimpleStatement) return find_stop_unused(parent, level + 1); - if (parent instanceof AST_Switch) return find_stop_unused(parent, level + 1); - if (parent instanceof AST_Unary) return find_stop_unused(parent, level + 1); - if (parent instanceof AST_VarDef) return find_stop_unused(parent, level + 1); - return null; - } - - function mangleable_var(var_def) { - var value = var_def.value; - if (!(value instanceof AST_SymbolRef)) return; - var def = value.definition(); - if (def.undeclared) return; - if (is_arguments(def)) return; - return value_def = def; - } - - function get_lhs(expr) { - if (expr instanceof AST_VarDef) { - var def = expr.name.definition(); - if (!member(expr.name, def.orig)) return; - var referenced = def.references.length - def.replaced; - var declared = def.orig.length - def.eliminated; - if (declared > 1 && !(expr.name instanceof AST_SymbolFunarg) - || (referenced > 1 ? mangleable_var(expr) : !compressor.exposed(def))) { - return make_node(AST_SymbolRef, expr.name, expr.name); - } - } else { - return expr[expr instanceof AST_Assign ? "left" : "expression"]; - } - } - - function get_rhs(expr) { - return candidate instanceof AST_Assign && candidate.operator == "=" && candidate.right; - } - - function get_rvalue(expr) { - return expr[expr instanceof AST_Assign ? "right" : "value"]; - } - - function invariant(expr) { - if (expr instanceof AST_Array) return false; - if (expr instanceof AST_Binary && lazy_op[expr.operator]) { - return invariant(expr.left) && invariant(expr.right); - } - if (expr instanceof AST_Call) return false; - if (expr instanceof AST_Conditional) { - return invariant(expr.consequent) && invariant(expr.alternative); - } - if (expr instanceof AST_Object) return false; - return !expr.has_side_effects(compressor); - } - - function foldable(expr) { - if (!expr) return false; - if (expr instanceof AST_SymbolRef) { - var value = expr.evaluate(compressor); - if (value === expr) return rhs_exact_match; - return rhs_fuzzy_match(value, rhs_exact_match); - } - if (expr instanceof AST_This) return rhs_exact_match; - if (expr.is_truthy()) return rhs_fuzzy_match(true, return_false); - if (expr.is_constant()) { - return rhs_fuzzy_match(expr.evaluate(compressor), rhs_exact_match); - } - if (!(lhs instanceof AST_SymbolRef)) return false; - if (!invariant(expr)) return false; - var circular; - var def = lhs.definition(); - expr.walk(new TreeWalker(function(node) { - if (circular) return true; - if (node instanceof AST_SymbolRef && node.definition() === def) { - circular = true; - } - })); - return !circular && rhs_exact_match; - - function rhs_exact_match(node) { - return expr.equivalent_to(node); - } - } - - function rhs_fuzzy_match(value, fallback) { - return function(node, tw) { - if (tw.in_boolean_context()) { - if (value && node.is_truthy() && !node.has_side_effects(compressor)) { - return true; - } - if (node.is_constant()) { - return !node.evaluate(compressor) == !value; - } - } - return fallback(node); - }; - } - - function get_lvalues(expr) { - var lvalues = Object.create(null); - if (candidate instanceof AST_VarDef) { - lvalues[candidate.name.name] = lhs; - } - var scan_iife = scope instanceof AST_Toplevel; - var tw = new TreeWalker(function(node) { - if (scan_iife && node.TYPE == "Call") { - var exp = node.expression; - if (exp instanceof AST_PropAccess) return; - if (exp instanceof AST_Function && !exp.contains_this()) return; - modify_toplevel = true; - scan_iife = false; - return; - } - var value; - if (node instanceof AST_SymbolRef) { - value = node.fixed_value() || node; - } else if (node instanceof AST_This) { - value = node; - } - if (value && !lvalues[node.name]) { - lvalues[node.name] = is_modified(compressor, tw, node, value, 0); - } - }); - expr.walk(tw); - return lvalues; - } - - function remove_candidate(expr) { - if (expr.name instanceof AST_SymbolFunarg) { - var index = compressor.self().argnames.indexOf(expr.name); - var args = compressor.parent().args; - if (args[index]) args[index] = make_node(AST_Number, args[index], { - value: 0 - }); - return true; - } - var found = false; - return statements[stat_index].transform(new TreeTransformer(function(node, descend, in_list) { - if (found) return node; - if (node !== expr && node.body !== expr) return; - if (node instanceof AST_VarDef) { - found = true; - node.value = null; - return node; - } - if (in_list) { - found = true; - return MAP.skip; - } - if (!this.parent()) { - found = true; - return null; - } - }, function(node) { - if (node instanceof AST_Sequence) switch (node.expressions.length) { - case 0: return null; - case 1: return node.expressions[0]; - } - })); - } - - function is_lhs_local(lhs) { - var sym = root_expr(lhs); - return sym instanceof AST_SymbolRef - && sym.definition().scope === scope - && !(in_loop - && (sym.name in lvalues && lvalues[sym.name] !== lhs - || candidate instanceof AST_Unary - || candidate instanceof AST_Assign && candidate.operator != "=")); - } - - function value_has_side_effects(expr) { - if (expr instanceof AST_Unary) return false; - return get_rvalue(expr).has_side_effects(compressor); - } - - function replace_all_symbols(expr) { - if (expr instanceof AST_Unary) return false; - if (side_effects) return false; - if (value_def) return true; - if (lhs instanceof AST_SymbolRef) { - var def = lhs.definition(); - if (def.references.length - def.replaced == (candidate instanceof AST_VarDef ? 1 : 2)) { - return true; - } - } - return false; - } - - function symbol_in_lvalues(sym, parent) { - var lvalue = lvalues[sym.name]; - if (!lvalue) return; - if (lvalue !== lhs) return true; - scan_rhs = false; - } - - function may_modify(sym) { - var def = sym.definition(); - if (def.orig.length == 1 && def.orig[0] instanceof AST_SymbolDefun) return false; - if (def.scope !== scope) return true; - if (modify_toplevel && compressor.exposed(def)) return true; - return !all(def.references, function(ref) { - return ref.scope.resolve() === scope; - }); - } - - function side_effects_external(node, lhs) { - if (node instanceof AST_Assign) return side_effects_external(node.left, true); - if (node instanceof AST_Unary) return side_effects_external(node.expression, true); - if (node instanceof AST_VarDef) return node.value && side_effects_external(node.value); - if (lhs) { - if (node instanceof AST_Dot) return side_effects_external(node.expression, true); - if (node instanceof AST_Sub) return side_effects_external(node.expression, true); - if (node instanceof AST_SymbolRef) return node.definition().scope !== scope; - } - return false; - } - } - - function eliminate_spurious_blocks(statements) { - var seen_dirs = []; - for (var i = 0; i < statements.length;) { - var stat = statements[i]; - if (stat instanceof AST_BlockStatement) { - CHANGED = true; - eliminate_spurious_blocks(stat.body); - [].splice.apply(statements, [i, 1].concat(stat.body)); - i += stat.body.length; - } else if (stat instanceof AST_EmptyStatement) { - CHANGED = true; - statements.splice(i, 1); - } else if (stat instanceof AST_Directive) { - if (!member(stat.value, seen_dirs)) { - i++; - seen_dirs.push(stat.value); - } else { - CHANGED = true; - statements.splice(i, 1); - } - } else i++; - } - } - - function handle_if_return(statements, compressor) { - var self = compressor.self(); - var multiple_if_returns = has_multiple_if_returns(statements); - var in_lambda = self instanceof AST_Lambda; - for (var i = statements.length; --i >= 0;) { - var stat = statements[i]; - var j = next_index(i); - var next = statements[j]; - - if (in_lambda && !next && stat instanceof AST_Return) { - if (!stat.value) { - CHANGED = true; - statements.splice(i, 1); - continue; - } - if (stat.value instanceof AST_UnaryPrefix && stat.value.operator == "void") { - CHANGED = true; - statements[i] = make_node(AST_SimpleStatement, stat, { - body: stat.value.expression - }); - continue; - } - } - - if (stat instanceof AST_If) { - var ab = aborts(stat.body); - if (can_merge_flow(ab)) { - if (ab.label) remove(ab.label.thedef.references, ab); - CHANGED = true; - stat = stat.clone(); - stat.condition = stat.condition.negate(compressor); - var body = as_statement_array_with_return(stat.body, ab); - stat.body = make_node(AST_BlockStatement, stat, { - body: as_statement_array(stat.alternative).concat(extract_functions()) - }); - stat.alternative = make_node(AST_BlockStatement, stat, { - body: body - }); - statements[i] = stat.transform(compressor); - continue; - } - - if (ab && !stat.alternative && stat.body instanceof AST_BlockStatement && next instanceof AST_Jump) { - var negated = stat.condition.negate(compressor); - if (negated.print_to_string().length <= stat.condition.print_to_string().length) { - CHANGED = true; - stat = stat.clone(); - stat.condition = negated; - statements[j] = stat.body; - stat.body = next; - statements[i] = stat.transform(compressor); - continue; - } - } - - var alt = aborts(stat.alternative); - if (can_merge_flow(alt)) { - if (alt.label) remove(alt.label.thedef.references, alt); - CHANGED = true; - stat = stat.clone(); - stat.body = make_node(AST_BlockStatement, stat.body, { - body: as_statement_array(stat.body).concat(extract_functions()) - }); - var body = as_statement_array_with_return(stat.alternative, alt); - stat.alternative = make_node(AST_BlockStatement, stat.alternative, { - body: body - }); - statements[i] = stat.transform(compressor); - continue; - } - - if (compressor.option("typeofs")) { - if (ab && !alt) { - mark_locally_defined(stat.condition, null, make_node(AST_BlockStatement, self, { - body: statements.slice(i + 1) - })); - } - if (!ab && alt) { - mark_locally_defined(stat.condition, make_node(AST_BlockStatement, self, { - body: statements.slice(i + 1) - })); - } - } - } - - if (stat instanceof AST_If && stat.body instanceof AST_Return) { - var value = stat.body.value; - //--- - // pretty silly case, but: - // if (foo()) return; return; ==> foo(); return; - if (!value && !stat.alternative - && (in_lambda && !next || next instanceof AST_Return && !next.value)) { - CHANGED = true; - statements[i] = make_node(AST_SimpleStatement, stat.condition, { - body: stat.condition - }); - continue; - } - //--- - // if (foo()) return x; return y; ==> return foo() ? x : y; - if (value && !stat.alternative && next instanceof AST_Return && next.value) { - CHANGED = true; - stat = stat.clone(); - stat.alternative = next; - statements.splice(i, 1, stat.transform(compressor)); - statements.splice(j, 1); - continue; - } - //--- - // if (foo()) return x; [ return ; ] ==> return foo() ? x : undefined; - if (value && !stat.alternative - && (!next && in_lambda && multiple_if_returns - || next instanceof AST_Return)) { - CHANGED = true; - stat = stat.clone(); - stat.alternative = next || make_node(AST_Return, stat, { - value: null - }); - statements.splice(i, 1, stat.transform(compressor)); - if (next) statements.splice(j, 1); - continue; - } - //--- - // if (a) return b; if (c) return d; e; ==> return a ? b : c ? d : void e; - // - // if sequences is not enabled, this can lead to an endless loop (issue #866). - // however, with sequences on this helps producing slightly better output for - // the example code. - var prev = statements[prev_index(i)]; - if (compressor.option("sequences") && in_lambda && !stat.alternative - && prev instanceof AST_If && prev.body instanceof AST_Return - && next_index(j) == statements.length && next instanceof AST_SimpleStatement) { - CHANGED = true; - stat = stat.clone(); - stat.alternative = make_node(AST_BlockStatement, next, { - body: [ - next, - make_node(AST_Return, next, { - value: null - }) - ] - }); - statements.splice(i, 1, stat.transform(compressor)); - statements.splice(j, 1); - continue; - } - } - } - - function has_multiple_if_returns(statements) { - var n = 0; - for (var i = statements.length; --i >= 0;) { - var stat = statements[i]; - if (stat instanceof AST_If && stat.body instanceof AST_Return) { - if (++n > 1) return true; - } - } - return false; - } - - function is_return_void(value) { - return !value || value instanceof AST_UnaryPrefix && value.operator == "void"; - } - - function can_merge_flow(ab) { - if (!ab) return false; - var lct = ab instanceof AST_LoopControl ? compressor.loopcontrol_target(ab) : null; - return ab instanceof AST_Return && in_lambda && is_return_void(ab.value) - || ab instanceof AST_Continue && self === loop_body(lct) - || ab instanceof AST_Break && lct instanceof AST_BlockStatement && self === lct; - } - - function extract_functions() { - var tail = statements.slice(i + 1); - statements.length = i + 1; - return tail.filter(function(stat) { - if (stat instanceof AST_Defun) { - statements.push(stat); - return false; - } - return true; - }); - } - - function as_statement_array_with_return(node, ab) { - var body = as_statement_array(node).slice(0, -1); - if (ab.value) { - body.push(make_node(AST_SimpleStatement, ab.value, { - body: ab.value.expression - })); - } - return body; - } - - function next_index(i) { - for (var j = i + 1; j < statements.length; j++) { - var stat = statements[j]; - if (!(stat instanceof AST_Var && declarations_only(stat))) { - break; - } - } - return j; - } - - function prev_index(i) { - for (var j = i; --j >= 0;) { - var stat = statements[j]; - if (!(stat instanceof AST_Var && declarations_only(stat))) { - break; - } - } - return j; - } - } - - function eliminate_dead_code(statements, compressor) { - var has_quit; - var self = compressor.self(); - for (var i = 0, n = 0, len = statements.length; i < len; i++) { - var stat = statements[i]; - if (stat instanceof AST_LoopControl) { - var lct = compressor.loopcontrol_target(stat); - if (stat instanceof AST_Break - && !(lct instanceof AST_IterationStatement) - && loop_body(lct) === self - || stat instanceof AST_Continue - && loop_body(lct) === self) { - if (stat.label) remove(stat.label.thedef.references, stat); - } else { - statements[n++] = stat; - } - } else { - statements[n++] = stat; - } - if (aborts(stat)) { - has_quit = statements.slice(i + 1); - break; - } - } - statements.length = n; - CHANGED = n != len; - if (has_quit) has_quit.forEach(function(stat) { - extract_declarations_from_unreachable_code(stat, statements); - }); - } - - function declarations_only(node) { - return all(node.definitions, function(var_def) { - return !var_def.value; - }); - } - - function sequencesize(statements, compressor) { - if (statements.length < 2) return; - var seq = [], n = 0; - function push_seq() { - if (!seq.length) return; - var body = make_sequence(seq[0], seq); - statements[n++] = make_node(AST_SimpleStatement, body, { body: body }); - seq = []; - } - for (var i = 0, len = statements.length; i < len; i++) { - var stat = statements[i]; - if (stat instanceof AST_SimpleStatement) { - if (seq.length >= compressor.sequences_limit) push_seq(); - var body = stat.body; - if (seq.length > 0) body = body.drop_side_effect_free(compressor); - if (body) merge_sequence(seq, body); - } else if (stat instanceof AST_Definitions && declarations_only(stat) - || stat instanceof AST_Defun) { - statements[n++] = stat; - } else { - push_seq(); - statements[n++] = stat; - } - } - push_seq(); - statements.length = n; - if (n != len) CHANGED = true; - } - - function to_simple_statement(block, decls) { - if (!(block instanceof AST_BlockStatement)) return block; - var stat = null; - for (var i = 0; i < block.body.length; i++) { - var line = block.body[i]; - if (line instanceof AST_Var && declarations_only(line)) { - decls.push(line); - } else if (stat) { - return false; - } else { - stat = line; - } - } - return stat; - } - - function sequencesize_2(statements, compressor) { - function cons_seq(right) { - n--; - CHANGED = true; - var left = prev.body; - return make_sequence(left, [ left, right ]); - } - var n = 0, prev; - for (var i = 0; i < statements.length; i++) { - var stat = statements[i]; - if (prev) { - if (stat instanceof AST_Exit) { - stat.value = cons_seq(stat.value || make_node(AST_Undefined, stat)).transform(compressor); - } else if (stat instanceof AST_For) { - if (!(stat.init instanceof AST_Definitions)) { - var abort = false; - prev.body.walk(new TreeWalker(function(node) { - if (abort || node instanceof AST_Scope) return true; - if (node instanceof AST_Binary && node.operator == "in") { - abort = true; - return true; - } - })); - if (!abort) { - if (stat.init) stat.init = cons_seq(stat.init); - else { - stat.init = prev.body; - n--; - CHANGED = true; - } - } - } - } else if (stat instanceof AST_ForIn) { - stat.object = cons_seq(stat.object); - } else if (stat instanceof AST_If) { - stat.condition = cons_seq(stat.condition); - } else if (stat instanceof AST_Switch) { - stat.expression = cons_seq(stat.expression); - } else if (stat instanceof AST_With) { - stat.expression = cons_seq(stat.expression); - } - } - if (compressor.option("conditionals") && stat instanceof AST_If) { - var decls = []; - var body = to_simple_statement(stat.body, decls); - var alt = to_simple_statement(stat.alternative, decls); - if (body !== false && alt !== false && decls.length > 0) { - var len = decls.length; - decls.push(make_node(AST_If, stat, { - condition: stat.condition, - body: body || make_node(AST_EmptyStatement, stat.body), - alternative: alt - })); - decls.unshift(n, 1); - [].splice.apply(statements, decls); - i += len; - n += len + 1; - prev = null; - CHANGED = true; - continue; - } - } - statements[n++] = stat; - prev = stat instanceof AST_SimpleStatement ? stat : null; - } - statements.length = n; - } - - function join_assigns(defn, body) { - var exprs; - if (body instanceof AST_Assign) { - exprs = [ body ]; - } else if (body instanceof AST_Sequence) { - exprs = body.expressions.slice(); - } - if (!exprs) return; - if (defn instanceof AST_Definitions) { - var def = defn.definitions[defn.definitions.length - 1]; - if (trim_assigns(def.name, def.value, exprs)) return exprs; - } - for (var i = exprs.length - 1; --i >= 0;) { - var expr = exprs[i]; - if (!(expr instanceof AST_Assign)) continue; - if (expr.operator != "=") continue; - if (!(expr.left instanceof AST_SymbolRef)) continue; - var tail = exprs.slice(i + 1); - if (!trim_assigns(expr.left, expr.right, tail)) continue; - return exprs.slice(0, i + 1).concat(tail); - } - } - - function trim_assigns(name, value, exprs) { - if (!(value instanceof AST_Object)) return; - var trimmed = false; - do { - var node = exprs[0]; - if (!(node instanceof AST_Assign)) break; - if (node.operator != "=") break; - if (!(node.left instanceof AST_PropAccess)) break; - var sym = node.left.expression; - if (!(sym instanceof AST_SymbolRef)) break; - if (name.name != sym.name) break; - if (!node.right.is_constant_expression(scope)) break; - var prop = node.left.property; - if (prop instanceof AST_Node) { - prop = prop.evaluate(compressor); - } - if (prop instanceof AST_Node) break; - prop = "" + prop; - var diff = compressor.has_directive("use strict") ? function(node) { - return node.key != prop && node.key.name != prop; - } : function(node) { - return node.key.name != prop; - }; - if (!all(value.properties, diff)) break; - value.properties.push(make_node(AST_ObjectKeyVal, node, { - key: prop, - value: node.right - })); - exprs.shift(); - trimmed = true; - } while (exprs.length); - return trimmed; - } - - function join_consecutive_vars(statements) { - var defs; - for (var i = 0, j = -1; i < statements.length; i++) { - var stat = statements[i]; - var prev = statements[j]; - if (stat instanceof AST_Definitions) { - if (prev && prev.TYPE == stat.TYPE) { - prev.definitions = prev.definitions.concat(stat.definitions); - CHANGED = true; - } else if (defs && defs.TYPE == stat.TYPE && declarations_only(stat)) { - defs.definitions = defs.definitions.concat(stat.definitions); - CHANGED = true; - } else { - statements[++j] = stat; - defs = stat; - } - } else if (stat instanceof AST_Exit) { - stat.value = join_assigns_expr(stat.value); - } else if (stat instanceof AST_For) { - var exprs = join_assigns(prev, stat.init); - if (exprs) { - CHANGED = true; - stat.init = exprs.length ? make_sequence(stat.init, exprs) : null; - statements[++j] = stat; - } else if (prev instanceof AST_Var && (!stat.init || stat.init.TYPE == prev.TYPE)) { - if (stat.init) { - prev.definitions = prev.definitions.concat(stat.init.definitions); - } - stat.init = prev; - statements[j] = stat; - CHANGED = true; - } else if (defs && stat.init && defs.TYPE == stat.init.TYPE && declarations_only(stat.init)) { - defs.definitions = defs.definitions.concat(stat.init.definitions); - stat.init = null; - statements[++j] = stat; - CHANGED = true; - } else { - statements[++j] = stat; - } - } else if (stat instanceof AST_ForIn) { - stat.object = join_assigns_expr(stat.object); - } else if (stat instanceof AST_If) { - stat.condition = join_assigns_expr(stat.condition); - } else if (stat instanceof AST_SimpleStatement) { - var exprs = join_assigns(prev, stat.body); - if (exprs) { - CHANGED = true; - if (!exprs.length) continue; - stat.body = make_sequence(stat.body, exprs); - } - statements[++j] = stat; - } else if (stat instanceof AST_Switch) { - stat.expression = join_assigns_expr(stat.expression); - } else if (stat instanceof AST_With) { - stat.expression = join_assigns_expr(stat.expression); - } else { - statements[++j] = stat; - } - } - statements.length = j + 1; - - function join_assigns_expr(value) { - statements[++j] = stat; - var exprs = join_assigns(prev, value); - if (!exprs) return value; - CHANGED = true; - var tail = value.tail_node(); - if (exprs[exprs.length - 1] !== tail) exprs.push(tail.left); - return make_sequence(value, exprs); - } - } - } - - function extract_declarations_from_unreachable_code(stat, target) { - if (!(stat instanceof AST_Defun)) { - AST_Node.warn("Dropping unreachable code [{file}:{line},{col}]", stat.start); - } - stat.walk(new TreeWalker(function(node) { - if (node instanceof AST_Definitions) { - AST_Node.warn("Declarations in unreachable code! [{file}:{line},{col}]", node.start); - node.remove_initializers(); - target.push(node); - return true; - } - if (node instanceof AST_Defun) { - target.push(node); - return true; - } - if (node instanceof AST_Scope) { - return true; - } - })); - } - - function is_undefined(node, compressor) { - return node.is_undefined - || node instanceof AST_Undefined - || node instanceof AST_UnaryPrefix - && node.operator == "void" - && !node.expression.has_side_effects(compressor); - } - - // is_truthy() - // return true if `!!node === true` - (function(def) { - def(AST_Node, return_false); - def(AST_Array, return_true); - def(AST_Assign, function() { - return this.operator == "=" && this.right.is_truthy(); - }); - def(AST_Lambda, return_true); - def(AST_Object, return_true); - def(AST_RegExp, return_true); - def(AST_Sequence, function() { - return this.tail_node().is_truthy(); - }); - def(AST_SymbolRef, function() { - var fixed = this.fixed_value(); - if (!fixed) return false; - this.is_truthy = return_false; - var result = fixed.is_truthy(); - delete this.is_truthy; - return result; - }); - })(function(node, func) { - node.DEFMETHOD("is_truthy", func); - }); - - // may_throw_on_access() - // returns true if this node may be null, undefined or contain `AST_Accessor` - (function(def) { - AST_Node.DEFMETHOD("may_throw_on_access", function(compressor) { - return !compressor.option("pure_getters") || this._dot_throw(compressor); - }); - function is_strict(compressor) { - return /strict/.test(compressor.option("pure_getters")); - } - def(AST_Node, is_strict); - def(AST_Array, return_false); - def(AST_Assign, function(compressor) { - if (this.operator != "=") return false; - var rhs = this.right; - if (!rhs._dot_throw(compressor)) return false; - var sym = this.left; - if (!(sym instanceof AST_SymbolRef)) return true; - if (rhs instanceof AST_Binary && rhs.operator == "||" && sym.name == rhs.left.name) { - return rhs.right._dot_throw(compressor); - } - return true; - }); - def(AST_Binary, function(compressor) { - switch (this.operator) { - case "&&": - return this.left._dot_throw(compressor) || this.right._dot_throw(compressor); - case "||": - return this.right._dot_throw(compressor); - default: - return false; - } - }); - def(AST_Conditional, function(compressor) { - return this.consequent._dot_throw(compressor) || this.alternative._dot_throw(compressor); - }); - def(AST_Constant, return_false); - def(AST_Dot, function(compressor) { - if (!is_strict(compressor)) return false; - var exp = this.expression; - if (exp instanceof AST_SymbolRef) exp = exp.fixed_value(); - return !(exp instanceof AST_Lambda && this.property == "prototype"); - }); - def(AST_Lambda, return_false); - def(AST_Null, return_true); - def(AST_Object, function(compressor) { - if (!is_strict(compressor)) return false; - for (var i = this.properties.length; --i >=0;) - if (this.properties[i].value instanceof AST_Accessor) return true; - return false; - }); - def(AST_Sequence, function(compressor) { - return this.tail_node()._dot_throw(compressor); - }); - def(AST_SymbolRef, function(compressor) { - if (this.is_undefined) return true; - if (!is_strict(compressor)) return false; - if (is_undeclared_ref(this) && this.is_declared(compressor)) return false; - if (this.is_immutable()) return false; - if (is_arguments(this.definition())) return false; - var fixed = this.fixed_value(); - if (!fixed) return true; - this._dot_throw = return_true; - var result = fixed._dot_throw(compressor); - delete this._dot_throw; - return result; - }); - def(AST_UnaryPrefix, function() { - return this.operator == "void"; - }); - def(AST_UnaryPostfix, return_false); - def(AST_Undefined, return_true); - })(function(node, func) { - node.DEFMETHOD("_dot_throw", func); - }); - - (function(def) { - def(AST_Node, return_false); - def(AST_Array, return_true); - def(AST_Assign, function(compressor) { - return this.operator != "=" || this.right.is_defined(compressor); - }); - def(AST_Binary, function(compressor) { - switch (this.operator) { - case "&&": - return this.left.is_defined(compressor) && this.right.is_defined(compressor); - case "||": - return this.left.is_truthy() || this.right.is_defined(compressor); - default: - return true; - } - }); - def(AST_Conditional, function(compressor) { - return this.consequent.is_defined(compressor) && this.alternative.is_defined(compressor); - }); - def(AST_Constant, return_true); - def(AST_Lambda, return_true); - def(AST_Object, return_true); - def(AST_Sequence, function(compressor) { - return this.tail_node().is_defined(compressor); - }); - def(AST_SymbolRef, function(compressor) { - if (this.is_undefined) return false; - if (is_undeclared_ref(this) && this.is_declared(compressor)) return true; - if (this.is_immutable()) return true; - var fixed = this.fixed_value(); - if (!fixed) return false; - this.is_defined = return_false; - var result = fixed.is_defined(compressor); - delete this.is_defined; - return result; - }); - def(AST_UnaryPrefix, function() { - return this.operator != "void"; - }); - def(AST_UnaryPostfix, return_true); - def(AST_Undefined, return_false); - })(function(node, func) { - node.DEFMETHOD("is_defined", func); - }); - - /* -----[ boolean/negation helpers ]----- */ - - // methods to determine whether an expression has a boolean result type - (function(def) { - def(AST_Node, return_false); - def(AST_Assign, function(compressor) { - return this.operator == "=" && this.right.is_boolean(compressor); - }); - var binary = makePredicate("in instanceof == != === !== < <= >= >"); - def(AST_Binary, function(compressor) { - return binary[this.operator] || lazy_op[this.operator] - && this.left.is_boolean(compressor) - && this.right.is_boolean(compressor); - }); - def(AST_Boolean, return_true); - var fn = makePredicate("every hasOwnProperty isPrototypeOf propertyIsEnumerable some"); - def(AST_Call, function(compressor) { - if (!compressor.option("unsafe")) return false; - var exp = this.expression; - return exp instanceof AST_Dot && (fn[exp.property] - || exp.property == "test" && exp.expression instanceof AST_RegExp); - }); - def(AST_Conditional, function(compressor) { - return this.consequent.is_boolean(compressor) && this.alternative.is_boolean(compressor); - }); - def(AST_New, return_false); - def(AST_Sequence, function(compressor) { - return this.tail_node().is_boolean(compressor); - }); - def(AST_SymbolRef, function(compressor) { - var fixed = this.fixed_value(); - if (!fixed) return false; - this.is_boolean = return_false; - var result = fixed.is_boolean(compressor); - delete this.is_boolean; - return result; - }); - var unary = makePredicate("! delete"); - def(AST_UnaryPrefix, function() { - return unary[this.operator]; - }); - })(function(node, func) { - node.DEFMETHOD("is_boolean", func); - }); - - // methods to determine if an expression has a numeric result type - (function(def) { - def(AST_Node, return_false); - var binary = makePredicate("- * / % & | ^ << >> >>>"); - def(AST_Assign, function(compressor) { - return binary[this.operator.slice(0, -1)] - || this.operator == "=" && this.right.is_number(compressor); - }); - def(AST_Binary, function(compressor) { - if (binary[this.operator]) return true; - if (this.operator != "+") return false; - return (this.left.is_boolean(compressor) || this.left.is_number(compressor)) - && (this.right.is_boolean(compressor) || this.right.is_number(compressor)); - }); - var fn = makePredicate([ - "charCodeAt", - "getDate", - "getDay", - "getFullYear", - "getHours", - "getMilliseconds", - "getMinutes", - "getMonth", - "getSeconds", - "getTime", - "getTimezoneOffset", - "getUTCDate", - "getUTCDay", - "getUTCFullYear", - "getUTCHours", - "getUTCMilliseconds", - "getUTCMinutes", - "getUTCMonth", - "getUTCSeconds", - "getYear", - "indexOf", - "lastIndexOf", - "localeCompare", - "push", - "search", - "setDate", - "setFullYear", - "setHours", - "setMilliseconds", - "setMinutes", - "setMonth", - "setSeconds", - "setTime", - "setUTCDate", - "setUTCFullYear", - "setUTCHours", - "setUTCMilliseconds", - "setUTCMinutes", - "setUTCMonth", - "setUTCSeconds", - "setYear", - "toExponential", - "toFixed", - "toPrecision", - ]); - def(AST_Call, function(compressor) { - if (!compressor.option("unsafe")) return false; - var exp = this.expression; - return exp instanceof AST_Dot && (fn[exp.property] - || is_undeclared_ref(exp.expression) && exp.expression.name == "Math"); - }); - def(AST_Conditional, function(compressor) { - return this.consequent.is_number(compressor) && this.alternative.is_number(compressor); - }); - def(AST_New, return_false); - def(AST_Number, return_true); - def(AST_Sequence, function(compressor) { - return this.tail_node().is_number(compressor); - }); - def(AST_SymbolRef, function(compressor) { - var fixed = this.fixed_value(); - if (!fixed) return false; - this.is_number = return_false; - var result = fixed.is_number(compressor); - delete this.is_number; - return result; - }); - var unary = makePredicate("+ - ~ ++ --"); - def(AST_Unary, function() { - return unary[this.operator]; - }); - })(function(node, func) { - node.DEFMETHOD("is_number", func); - }); - - // methods to determine if an expression has a string result type - (function(def) { - def(AST_Node, return_false); - def(AST_Assign, function(compressor) { - return (this.operator == "=" || this.operator == "+=") && this.right.is_string(compressor); - }); - def(AST_Binary, function(compressor) { - return this.operator == "+" && - (this.left.is_string(compressor) || this.right.is_string(compressor)); - }); - var fn = makePredicate([ - "charAt", - "substr", - "substring", - "toLowerCase", - "toString", - "toUpperCase", - "trim", - ]); - def(AST_Call, function(compressor) { - if (!compressor.option("unsafe")) return false; - var exp = this.expression; - return exp instanceof AST_Dot && fn[exp.property]; - }); - def(AST_Conditional, function(compressor) { - return this.consequent.is_string(compressor) && this.alternative.is_string(compressor); - }); - def(AST_Sequence, function(compressor) { - return this.tail_node().is_string(compressor); - }); - def(AST_String, return_true); - def(AST_SymbolRef, function(compressor) { - var fixed = this.fixed_value(); - if (!fixed) return false; - this.is_string = return_false; - var result = fixed.is_string(compressor); - delete this.is_string; - return result; - }); - def(AST_UnaryPrefix, function() { - return this.operator == "typeof"; - }); - })(function(node, func) { - node.DEFMETHOD("is_string", func); - }); - - var lazy_op = makePredicate("&& ||"); - var unary_arithmetic = makePredicate("++ --"); - var unary_side_effects = makePredicate("delete ++ --"); - - function is_lhs(node, parent) { - if (parent instanceof AST_Unary && unary_side_effects[parent.operator]) return parent.expression; - if (parent instanceof AST_Assign && parent.left === node) return node; - } - - (function(def) { - function to_node(value, orig) { - if (value instanceof AST_Node) return make_node(value.CTOR, orig, value); - if (Array.isArray(value)) return make_node(AST_Array, orig, { - elements: value.map(function(value) { - return to_node(value, orig); - }) - }); - if (value && typeof value == "object") { - var props = []; - for (var key in value) if (HOP(value, key)) { - props.push(make_node(AST_ObjectKeyVal, orig, { - key: key, - value: to_node(value[key], orig) - })); - } - return make_node(AST_Object, orig, { - properties: props - }); - } - return make_node_from_constant(value, orig); - } - - function warn(node) { - AST_Node.warn("global_defs " + node.print_to_string() + " redefined [{file}:{line},{col}]", node.start); - } - - AST_Toplevel.DEFMETHOD("resolve_defines", function(compressor) { - if (!compressor.option("global_defs")) return this; - this.figure_out_scope({ ie8: compressor.option("ie8") }); - return this.transform(new TreeTransformer(function(node) { - var def = node._find_defs(compressor, ""); - if (!def) return; - var level = 0, child = node, parent; - while (parent = this.parent(level++)) { - if (!(parent instanceof AST_PropAccess)) break; - if (parent.expression !== child) break; - child = parent; - } - if (is_lhs(child, parent)) { - warn(node); - return; - } - return def; - })); - }); - def(AST_Node, noop); - def(AST_Dot, function(compressor, suffix) { - return this.expression._find_defs(compressor, "." + this.property + suffix); - }); - def(AST_SymbolDeclaration, function(compressor) { - if (!this.global()) return; - if (HOP(compressor.option("global_defs"), this.name)) warn(this); - }); - def(AST_SymbolRef, function(compressor, suffix) { - if (!this.global()) return; - var defines = compressor.option("global_defs"); - var name = this.name + suffix; - if (HOP(defines, name)) return to_node(defines[name], this); - }); - })(function(node, func) { - node.DEFMETHOD("_find_defs", func); - }); - - function best_of_expression(ast1, ast2) { - return ast1.print_to_string().length > - ast2.print_to_string().length - ? ast2 : ast1; - } - - function best_of_statement(ast1, ast2) { - return best_of_expression(make_node(AST_SimpleStatement, ast1, { - body: ast1 - }), make_node(AST_SimpleStatement, ast2, { - body: ast2 - })).body; - } - - function best_of(compressor, ast1, ast2) { - return (first_in_statement(compressor) ? best_of_statement : best_of_expression)(ast1, ast2); - } - - function convert_to_predicate(obj) { - Object.keys(obj).forEach(function(key) { - obj[key] = makePredicate(obj[key]); - }); - } - - var object_fns = [ - "constructor", - "toString", - "valueOf", - ]; - var native_fns = { - Array: [ - "indexOf", - "join", - "lastIndexOf", - "slice", - ].concat(object_fns), - Boolean: object_fns, - Function: object_fns, - Number: [ - "toExponential", - "toFixed", - "toPrecision", - ].concat(object_fns), - Object: object_fns, - RegExp: [ - "test", - ].concat(object_fns), - String: [ - "charAt", - "charCodeAt", - "concat", - "indexOf", - "italics", - "lastIndexOf", - "match", - "replace", - "search", - "slice", - "split", - "substr", - "substring", - "toLowerCase", - "toUpperCase", - "trim", - ].concat(object_fns), - }; - convert_to_predicate(native_fns); - var static_fns = { - Array: [ - "isArray", - ], - Math: [ - "abs", - "acos", - "asin", - "atan", - "ceil", - "cos", - "exp", - "floor", - "log", - "round", - "sin", - "sqrt", - "tan", - "atan2", - "pow", - "max", - "min", - ], - Number: [ - "isFinite", - "isNaN", - ], - Object: [ - "create", - "getOwnPropertyDescriptor", - "getOwnPropertyNames", - "getPrototypeOf", - "isExtensible", - "isFrozen", - "isSealed", - "keys", - ], - String: [ - "fromCharCode", - ], - }; - convert_to_predicate(static_fns); - - // methods to evaluate a constant expression - (function(def) { - // If the node has been successfully reduced to a constant, - // then its value is returned; otherwise the element itself - // is returned. - // They can be distinguished as constant value is never a - // descendant of AST_Node. - AST_Node.DEFMETHOD("evaluate", function(compressor) { - if (!compressor.option("evaluate")) return this; - var cached = []; - var val = this._eval(compressor, cached, 1); - cached.forEach(function(node) { - delete node._eval; - }); - if (!val || val instanceof RegExp) return val; - if (typeof val == "function" || typeof val == "object") return this; - return val; - }); - var unaryPrefix = makePredicate("! ~ - + void"); - AST_Node.DEFMETHOD("is_constant", function() { - // Accomodate when compress option evaluate=false - // as well as the common constant expressions !0 and -1 - if (this instanceof AST_Constant) { - return !(this instanceof AST_RegExp); - } else { - return this instanceof AST_UnaryPrefix - && this.expression instanceof AST_Constant - && unaryPrefix[this.operator]; - } - }); - def(AST_Statement, function() { - throw new Error(string_template("Cannot evaluate a statement [{file}:{line},{col}]", this.start)); - }); - def(AST_Lambda, return_this); - def(AST_Node, return_this); - def(AST_Constant, function() { - return this.getValue(); - }); - def(AST_Function, function(compressor) { - if (compressor.option("unsafe")) { - var fn = function() {}; - fn.node = this; - fn.toString = function() { - return "function(){}"; - }; - return fn; - } - return this; - }); - def(AST_Array, function(compressor, cached, depth) { - if (compressor.option("unsafe")) { - var elements = []; - for (var i = 0; i < this.elements.length; i++) { - var element = this.elements[i]; - var value = element._eval(compressor, cached, depth); - if (element === value) return this; - elements.push(value); - } - return elements; - } - return this; - }); - def(AST_Object, function(compressor, cached, depth) { - if (compressor.option("unsafe")) { - var val = {}; - for (var i = 0; i < this.properties.length; i++) { - var prop = this.properties[i]; - var key = prop.key; - if (key instanceof AST_Symbol) { - key = key.name; - } else if (key instanceof AST_Node) { - key = key._eval(compressor, cached, depth); - if (key === prop.key) return this; - } - if (typeof Object.prototype[key] === 'function') { - return this; - } - if (prop.value instanceof AST_Function) continue; - val[key] = prop.value._eval(compressor, cached, depth); - if (val[key] === prop.value) return this; - } - return val; - } - return this; - }); - var non_converting_unary = makePredicate("! typeof void"); - def(AST_UnaryPrefix, function(compressor, cached, depth) { - var e = this.expression; - // Function would be evaluated to an array and so typeof would - // incorrectly return 'object'. Hence making is a special case. - if (compressor.option("typeofs") - && this.operator == "typeof" - && (e instanceof AST_Lambda - || e instanceof AST_SymbolRef - && e.fixed_value() instanceof AST_Lambda)) { - return typeof function(){}; - } - if (!non_converting_unary[this.operator]) depth++; - var v = e._eval(compressor, cached, depth); - if (v === this.expression) return this; - switch (this.operator) { - case "!": return !v; - case "typeof": - // typeof returns "object" or "function" on different platforms - // so cannot evaluate reliably - if (v instanceof RegExp) return this; - return typeof v; - case "void": return void v; - case "~": return ~v; - case "-": return -v; - case "+": return +v; - case "++": - case "--": - if (!(e instanceof AST_SymbolRef)) return this; - var refs = e.definition().references; - if (refs[refs.length - 1] !== e) return this; - return HOP(e, "_eval") ? +(this.operator[0] + 1) + +v : v; - } - return this; - }); - var non_converting_binary = makePredicate("&& || === !=="); - def(AST_Binary, function(compressor, cached, depth) { - if (!non_converting_binary[this.operator]) depth++; - var left = this.left._eval(compressor, cached, depth); - if (left === this.left) return this; - if (this.operator == (left ? "||" : "&&")) return left; - var right = this.right._eval(compressor, cached, depth); - if (right === this.right) return this; - var result; - switch (this.operator) { - case "&&" : result = left && right; break; - case "||" : result = left || right; break; - case "|" : result = left | right; break; - case "&" : result = left & right; break; - case "^" : result = left ^ right; break; - case "+" : result = left + right; break; - case "*" : result = left * right; break; - case "/" : result = left / right; break; - case "%" : result = left % right; break; - case "-" : result = left - right; break; - case "<<" : result = left << right; break; - case ">>" : result = left >> right; break; - case ">>>": result = left >>> right; break; - case "==" : result = left == right; break; - case "===": result = left === right; break; - case "!=" : result = left != right; break; - case "!==": result = left !== right; break; - case "<" : result = left < right; break; - case "<=" : result = left <= right; break; - case ">" : result = left > right; break; - case ">=" : result = left >= right; break; - default : return this; - } - if (isNaN(result)) return compressor.find_parent(AST_With) ? this : result; - if (compressor.option("unsafe_math") - && result - && typeof result == "number" - && (this.operator == "+" || this.operator == "-")) { - var digits = Math.max(0, decimals(left), decimals(right)); - if (digits < 21) return +result.toFixed(digits); - } - return result; - - function decimals(operand) { - var match = /(\.[0-9]*)?(e.+)?$/.exec(+operand); - return (match[1] || ".").length - 1 - (match[2] || "").slice(1); - } - }); - def(AST_Conditional, function(compressor, cached, depth) { - var condition = this.condition._eval(compressor, cached, depth); - if (condition === this.condition) return this; - var node = condition ? this.consequent : this.alternative; - var value = node._eval(compressor, cached, depth); - return value === node ? this : value; - }); - def(AST_SymbolRef, function(compressor, cached, depth) { - var fixed = this.fixed_value(); - if (!fixed) return this; - var value; - if (member(fixed, cached)) { - value = fixed._eval(); - } else { - this._eval = return_this; - value = fixed._eval(compressor, cached, depth); - delete this._eval; - if (value === fixed) return this; - fixed._eval = function() { - return value; - }; - cached.push(fixed); - } - if (value && typeof value == "object") { - var escaped = this.definition().escaped; - switch (escaped.length) { - case 0: - break; - case 1: - if (contains_ref(escaped[0], this)) break; - default: - if (depth > escaped.depth) return this; - } - } - return value; - - function contains_ref(expr, ref) { - var found = false; - expr.walk(new TreeWalker(function(node) { - if (found) return true; - if (node === ref) return found = true; - })); - return found; - } - }); - var global_objs = { - Array: Array, - Math: Math, - Number: Number, - Object: Object, - String: String, - }; - var static_values = { - Math: [ - "E", - "LN10", - "LN2", - "LOG2E", - "LOG10E", - "PI", - "SQRT1_2", - "SQRT2", - ], - Number: [ - "MAX_VALUE", - "MIN_VALUE", - "NaN", - "NEGATIVE_INFINITY", - "POSITIVE_INFINITY", - ], - }; - convert_to_predicate(static_values); - var regexp_props = makePredicate("global ignoreCase multiline source"); - def(AST_PropAccess, function(compressor, cached, depth) { - if (compressor.option("unsafe")) { - var key = this.property; - if (key instanceof AST_Node) { - key = key._eval(compressor, cached, depth); - if (key === this.property) return this; - } - var exp = this.expression; - var val; - if (is_undeclared_ref(exp)) { - var static_value = static_values[exp.name]; - if (!static_value || !static_value[key]) return this; - val = global_objs[exp.name]; - } else { - val = exp._eval(compressor, cached, depth + 1); - if (val == null || val === exp) return this; - if (val instanceof RegExp) { - if (!regexp_props[key]) return this; - } else if (typeof val == "object") { - if (!HOP(val, key)) return this; - } else if (typeof val == "function") switch (key) { - case "name": - return val.node.name ? val.node.name.name : ""; - case "length": - return val.node.argnames.length; - default: - return this; - } - } - return val[key]; - } - return this; - }); - def(AST_Call, function(compressor, cached, depth) { - var exp = this.expression; - if (exp instanceof AST_SymbolRef) { - var fn = exp.fixed_value(); - if (!(fn instanceof AST_Lambda)) return this; - if (fn.name && fn.name.definition().recursive_refs > 0) return this; - if (fn.body.length != 1 || !fn.is_constant_expression()) return this; - var stat = fn.body[0]; - if (!(stat instanceof AST_Return)) return this; - var args = eval_args(this.args); - if (!args) return this; - fn.argnames.forEach(function(sym, i) { - var value = args[i]; - sym.definition().references.forEach(function(node) { - node._eval = function() { - return value; - }; - cached.push(node); - }); - }); - if (!stat.value) return undefined; - var val = stat.value._eval(compressor, cached, depth); - if (val === stat.value) return this; - return val; - } else if (compressor.option("unsafe") && exp instanceof AST_PropAccess) { - var key = exp.property; - if (key instanceof AST_Node) { - key = key._eval(compressor, cached, depth); - if (key === exp.property) return this; - } - var val; - var e = exp.expression; - if (is_undeclared_ref(e)) { - var static_fn = static_fns[e.name]; - if (!static_fn || !static_fn[key]) return this; - val = global_objs[e.name]; - } else { - val = e._eval(compressor, cached, depth + 1); - if (val == null || val === e) return this; - var native_fn = native_fns[val.constructor.name]; - if (!native_fn || !native_fn[key]) return this; - } - var args = eval_args(this.args); - if (!args) return this; - if (key == "replace" && typeof args[1] == "function") return this; - try { - return val[key].apply(val, args); - } catch (ex) { - AST_Node.warn("Error evaluating {code} [{file}:{line},{col}]", { - code: this.print_to_string(), - file: this.start.file, - line: this.start.line, - col: this.start.col - }); - } - } - return this; - - function eval_args(args) { - var values = []; - for (var i = 0; i < args.length; i++) { - var arg = args[i]; - var value = arg._eval(compressor, cached, depth); - if (arg === value) return; - values.push(value); - } - return values; - } - }); - def(AST_New, return_this); - })(function(node, func) { - node.DEFMETHOD("_eval", func); - }); - - // method to negate an expression - (function(def) { - function basic_negation(exp) { - return make_node(AST_UnaryPrefix, exp, { - operator: "!", - expression: exp - }); - } - function best(orig, alt, first_in_statement) { - var negated = basic_negation(orig); - if (first_in_statement) { - var stat = make_node(AST_SimpleStatement, alt, { - body: alt - }); - return best_of_expression(negated, stat) === stat ? alt : negated; - } - return best_of_expression(negated, alt); - } - def(AST_Node, function() { - return basic_negation(this); - }); - def(AST_Statement, function() { - throw new Error("Cannot negate a statement"); - }); - def(AST_Function, function() { - return basic_negation(this); - }); - def(AST_UnaryPrefix, function() { - if (this.operator == "!") - return this.expression; - return basic_negation(this); - }); - def(AST_Sequence, function(compressor) { - var expressions = this.expressions.slice(); - expressions.push(expressions.pop().negate(compressor)); - return make_sequence(this, expressions); - }); - def(AST_Conditional, function(compressor, first_in_statement) { - var self = this.clone(); - self.consequent = self.consequent.negate(compressor); - self.alternative = self.alternative.negate(compressor); - return best(this, self, first_in_statement); - }); - def(AST_Binary, function(compressor, first_in_statement) { - var self = this.clone(), op = this.operator; - if (compressor.option("unsafe_comps")) { - switch (op) { - case "<=" : self.operator = ">" ; return self; - case "<" : self.operator = ">=" ; return self; - case ">=" : self.operator = "<" ; return self; - case ">" : self.operator = "<=" ; return self; - } - } - switch (op) { - case "==" : self.operator = "!="; return self; - case "!=" : self.operator = "=="; return self; - case "===": self.operator = "!=="; return self; - case "!==": self.operator = "==="; return self; - case "&&": - self.operator = "||"; - self.left = self.left.negate(compressor, first_in_statement); - self.right = self.right.negate(compressor); - return best(this, self, first_in_statement); - case "||": - self.operator = "&&"; - self.left = self.left.negate(compressor, first_in_statement); - self.right = self.right.negate(compressor); - return best(this, self, first_in_statement); - } - return basic_negation(this); - }); - })(function(node, func) { - node.DEFMETHOD("negate", function(compressor, first_in_statement) { - return func.call(this, compressor, first_in_statement); - }); - }); - - var global_pure_fns = makePredicate("Boolean decodeURI decodeURIComponent Date encodeURI encodeURIComponent Error escape EvalError isFinite isNaN Number Object parseFloat parseInt RangeError ReferenceError String SyntaxError TypeError unescape URIError"); - AST_Call.DEFMETHOD("is_expr_pure", function(compressor) { - if (compressor.option("unsafe")) { - var expr = this.expression; - if (is_undeclared_ref(expr) && global_pure_fns[expr.name]) return true; - if (expr instanceof AST_Dot && is_undeclared_ref(expr.expression)) { - var static_fn = static_fns[expr.expression.name]; - return static_fn && static_fn[expr.property]; - } - } - return this.pure || !compressor.pure_funcs(this); - }); - AST_Node.DEFMETHOD("is_call_pure", return_false); - AST_Call.DEFMETHOD("is_call_pure", function(compressor) { - if (!compressor.option("unsafe")) return false; - var dot = this.expression; - if (!(dot instanceof AST_Dot)) return false; - var exp = dot.expression; - var map; - var prop = dot.property; - if (exp instanceof AST_Array) { - map = native_fns.Array; - } else if (exp.is_boolean(compressor)) { - map = native_fns.Boolean; - } else if (exp.is_number(compressor)) { - map = native_fns.Number; - } else if (exp instanceof AST_RegExp) { - map = native_fns.RegExp; - } else if (exp.is_string(compressor)) { - map = native_fns.String; - if (prop == "replace") { - var arg = this.args[1]; - if (arg && !arg.is_string(compressor)) return false; - } - } else if (!dot.may_throw_on_access(compressor)) { - map = native_fns.Object; - } - return map && map[prop]; - }); - - // determine if expression has side effects - (function(def) { - function any(list, compressor) { - for (var i = list.length; --i >= 0;) - if (list[i].has_side_effects(compressor)) - return true; - return false; - } - def(AST_Node, return_true); - def(AST_Array, function(compressor) { - return any(this.elements, compressor); - }); - def(AST_Assign, return_true); - def(AST_Binary, function(compressor) { - return this.left.has_side_effects(compressor) - || this.right.has_side_effects(compressor); - }); - def(AST_Block, function(compressor) { - return any(this.body, compressor); - }); - def(AST_Call, function(compressor) { - if (!this.is_expr_pure(compressor) - && (!this.is_call_pure(compressor) || this.expression.has_side_effects(compressor))) { - return true; - } - return any(this.args, compressor); - }); - def(AST_Case, function(compressor) { - return this.expression.has_side_effects(compressor) - || any(this.body, compressor); - }); - def(AST_Conditional, function(compressor) { - return this.condition.has_side_effects(compressor) - || this.consequent.has_side_effects(compressor) - || this.alternative.has_side_effects(compressor); - }); - def(AST_Constant, return_false); - def(AST_Definitions, function(compressor) { - return any(this.definitions, compressor); - }); - def(AST_Dot, function(compressor) { - return this.expression.may_throw_on_access(compressor) - || this.expression.has_side_effects(compressor); - }); - def(AST_EmptyStatement, return_false); - def(AST_If, function(compressor) { - return this.condition.has_side_effects(compressor) - || this.body && this.body.has_side_effects(compressor) - || this.alternative && this.alternative.has_side_effects(compressor); - }); - def(AST_LabeledStatement, function(compressor) { - return this.body.has_side_effects(compressor); - }); - def(AST_Lambda, return_false); - def(AST_Object, function(compressor) { - return any(this.properties, compressor); - }); - def(AST_ObjectProperty, function(compressor) { - return this.value.has_side_effects(compressor); - }); - def(AST_Sub, function(compressor) { - return this.expression.may_throw_on_access(compressor) - || this.expression.has_side_effects(compressor) - || this.property.has_side_effects(compressor); - }); - def(AST_Sequence, function(compressor) { - return any(this.expressions, compressor); - }); - def(AST_SimpleStatement, function(compressor) { - return this.body.has_side_effects(compressor); - }); - def(AST_Switch, function(compressor) { - return this.expression.has_side_effects(compressor) - || any(this.body, compressor); - }); - def(AST_SymbolDeclaration, return_false); - def(AST_SymbolRef, function(compressor) { - return !this.is_declared(compressor); - }); - def(AST_This, return_false); - def(AST_Try, function(compressor) { - return any(this.body, compressor) - || this.bcatch && this.bcatch.has_side_effects(compressor) - || this.bfinally && this.bfinally.has_side_effects(compressor); - }); - def(AST_Unary, function(compressor) { - return unary_side_effects[this.operator] - || this.expression.has_side_effects(compressor); - }); - def(AST_VarDef, function(compressor) { - return this.value; - }); - })(function(node, func) { - node.DEFMETHOD("has_side_effects", func); - }); - - // determine if expression may throw - (function(def) { - def(AST_Node, return_true); - - def(AST_Constant, return_false); - def(AST_EmptyStatement, return_false); - def(AST_Lambda, return_false); - def(AST_SymbolDeclaration, return_false); - def(AST_This, return_false); - - function any(list, compressor) { - for (var i = list.length; --i >= 0;) - if (list[i].may_throw(compressor)) - return true; - return false; - } - - def(AST_Array, function(compressor) { - return any(this.elements, compressor); - }); - def(AST_Assign, function(compressor) { - if (this.right.may_throw(compressor)) return true; - if (!compressor.has_directive("use strict") - && this.operator == "=" - && this.left instanceof AST_SymbolRef) { - return false; - } - return this.left.may_throw(compressor); - }); - def(AST_Binary, function(compressor) { - return this.left.may_throw(compressor) - || this.right.may_throw(compressor); - }); - def(AST_Block, function(compressor) { - return any(this.body, compressor); - }); - def(AST_Call, function(compressor) { - if (any(this.args, compressor)) return true; - if (this.is_expr_pure(compressor)) return false; - if (this.expression.may_throw(compressor)) return true; - return !(this.expression instanceof AST_Lambda) - || any(this.expression.body, compressor); - }); - def(AST_Case, function(compressor) { - return this.expression.may_throw(compressor) - || any(this.body, compressor); - }); - def(AST_Conditional, function(compressor) { - return this.condition.may_throw(compressor) - || this.consequent.may_throw(compressor) - || this.alternative.may_throw(compressor); - }); - def(AST_Definitions, function(compressor) { - return any(this.definitions, compressor); - }); - def(AST_Dot, function(compressor) { - return this.expression.may_throw_on_access(compressor) - || this.expression.may_throw(compressor); - }); - def(AST_If, function(compressor) { - return this.condition.may_throw(compressor) - || this.body && this.body.may_throw(compressor) - || this.alternative && this.alternative.may_throw(compressor); - }); - def(AST_LabeledStatement, function(compressor) { - return this.body.may_throw(compressor); - }); - def(AST_Object, function(compressor) { - return any(this.properties, compressor); - }); - def(AST_ObjectProperty, function(compressor) { - return this.value.may_throw(compressor); - }); - def(AST_Return, function(compressor) { - return this.value && this.value.may_throw(compressor); - }); - def(AST_Sequence, function(compressor) { - return any(this.expressions, compressor); - }); - def(AST_SimpleStatement, function(compressor) { - return this.body.may_throw(compressor); - }); - def(AST_Sub, function(compressor) { - return this.expression.may_throw_on_access(compressor) - || this.expression.may_throw(compressor) - || this.property.may_throw(compressor); - }); - def(AST_Switch, function(compressor) { - return this.expression.may_throw(compressor) - || any(this.body, compressor); - }); - def(AST_SymbolRef, function(compressor) { - return !this.is_declared(compressor); - }); - def(AST_Try, function(compressor) { - return this.bcatch ? this.bcatch.may_throw(compressor) : any(this.body, compressor) - || this.bfinally && this.bfinally.may_throw(compressor); - }); - def(AST_Unary, function(compressor) { - if (this.operator == "typeof" && this.expression instanceof AST_SymbolRef) - return false; - return this.expression.may_throw(compressor); - }); - def(AST_VarDef, function(compressor) { - if (!this.value) return false; - return this.value.may_throw(compressor); - }); - })(function(node, func) { - node.DEFMETHOD("may_throw", func); - }); - - // determine if expression is constant - (function(def) { - function all(list) { - for (var i = list.length; --i >= 0;) - if (!list[i].is_constant_expression()) - return false; - return true; - } - def(AST_Node, return_false); - def(AST_Array, function() { - return all(this.elements); - }); - def(AST_Binary, function() { - return this.left.is_constant_expression() && this.right.is_constant_expression(); - }); - def(AST_Constant, return_true); - def(AST_Lambda, function(scope) { - var self = this; - var result = true; - var scopes = []; - self.walk(new TreeWalker(function(node, descend) { - if (!result) return true; - if (node instanceof AST_Catch) { - scopes.push(node.argname.scope); - descend(); - scopes.pop(); - return true; - } - if (node instanceof AST_Scope) { - if (node === self) return; - scopes.push(node); - descend(); - scopes.pop(); - return true; - } - if (node instanceof AST_SymbolRef) { - if (self.inlined) { - result = false; - return true; - } - if (self.variables.has(node.name)) return true; - var def = node.definition(); - if (member(def.scope, scopes)) return true; - if (scope) { - var scope_def = scope.find_variable(node); - if (def.undeclared ? !scope_def : scope_def === def) { - result = "f"; - return true; - } - } - result = false; - return true; - } - })); - return result; - }); - def(AST_Object, function() { - return all(this.properties); - }); - def(AST_ObjectProperty, function() { - return this.value.is_constant_expression(); - }); - def(AST_Unary, function() { - return this.expression.is_constant_expression(); - }); - })(function(node, func) { - node.DEFMETHOD("is_constant_expression", func); - }); - - // tell me if a statement aborts - function aborts(thing) { - return thing && thing.aborts(); - } - (function(def) { - def(AST_Statement, return_null); - def(AST_Jump, return_this); - function block_aborts() { - var n = this.body.length; - return n > 0 && aborts(this.body[n - 1]); - } - def(AST_BlockStatement, block_aborts); - def(AST_SwitchBranch, block_aborts); - def(AST_If, function() { - return this.alternative && aborts(this.body) && aborts(this.alternative) && this; - }); - })(function(node, func) { - node.DEFMETHOD("aborts", func); - }); - - /* -----[ optimizers ]----- */ - - var directives = makePredicate(["use asm", "use strict"]); - OPT(AST_Directive, function(self, compressor) { - if (compressor.option("directives") - && (!directives[self.value] || compressor.has_directive(self.value) !== self)) { - return make_node(AST_EmptyStatement, self); - } - return self; - }); - - OPT(AST_Debugger, function(self, compressor) { - if (compressor.option("drop_debugger")) - return make_node(AST_EmptyStatement, self); - return self; - }); - - OPT(AST_LabeledStatement, function(self, compressor) { - if (self.body instanceof AST_Break - && compressor.loopcontrol_target(self.body) === self.body) { - return make_node(AST_EmptyStatement, self); - } - return self.label.references.length == 0 ? self.body : self; - }); - - OPT(AST_Block, function(self, compressor) { - tighten_body(self.body, compressor); - return self; - }); - - OPT(AST_BlockStatement, function(self, compressor) { - tighten_body(self.body, compressor); - switch (self.body.length) { - case 1: return self.body[0]; - case 0: return make_node(AST_EmptyStatement, self); - } - return self; - }); - - OPT(AST_Lambda, function(self, compressor) { - tighten_body(self.body, compressor); - if (compressor.option("side_effects") - && self.body.length == 1 - && self.body[0] === compressor.has_directive("use strict")) { - self.body.length = 0; - } - return self; - }); - - AST_Scope.DEFMETHOD("drop_unused", function(compressor) { - if (!compressor.option("unused")) return; - if (compressor.has_directive("use asm")) return; - var self = this; - if (self.pinned()) return; - var drop_funcs = !(self instanceof AST_Toplevel) || compressor.toplevel.funcs; - var drop_vars = !(self instanceof AST_Toplevel) || compressor.toplevel.vars; - var assign_as_unused = /keep_assign/.test(compressor.option("unused")) ? return_false : function(node, props) { - var sym; - if (node instanceof AST_Assign) { - if (node.write_only || node.operator == "=") sym = node.left; - } else if (node instanceof AST_Unary) { - if (node.write_only) sym = node.expression; - } - if (!/strict/.test(compressor.option("pure_getters"))) return sym instanceof AST_SymbolRef && sym; - while (sym instanceof AST_PropAccess && !sym.expression.may_throw_on_access(compressor)) { - if (sym instanceof AST_Sub) props.unshift(sym.property); - sym = sym.expression; - } - return sym instanceof AST_SymbolRef && all(sym.definition().orig, function(sym) { - return !(sym instanceof AST_SymbolLambda); - }) && sym; - }; - var in_use = []; - var in_use_ids = Object.create(null); // avoid expensive linear scans of in_use - var fixed_ids = Object.create(null); - var value_read = Object.create(null); - var value_modified = Object.create(null); - if (self instanceof AST_Toplevel && compressor.top_retain) { - self.variables.each(function(def) { - if (compressor.top_retain(def) && !(def.id in in_use_ids)) { - in_use_ids[def.id] = true; - in_use.push(def); - } - }); - } - var var_defs_by_id = new Dictionary(); - var initializations = new Dictionary(); - // pass 1: find out which symbols are directly used in - // this scope (not in nested scopes). - var scope = this; - var tw = new TreeWalker(function(node, descend) { - if (node instanceof AST_Lambda && node.uses_arguments && !tw.has_directive("use strict")) { - node.argnames.forEach(function(argname) { - var def = argname.definition(); - if (!(def.id in in_use_ids)) { - in_use_ids[def.id] = true; - in_use.push(def); - } - }); - } - if (node === self) return; - if (node instanceof AST_Defun) { - var node_def = node.name.definition(); - if (!drop_funcs && scope === self) { - if (!(node_def.id in in_use_ids)) { - in_use_ids[node_def.id] = true; - in_use.push(node_def); - } - } - initializations.add(node_def.id, node); - return true; // don't go in nested scopes - } - if (node instanceof AST_SymbolFunarg && scope === self) { - var_defs_by_id.add(node.definition().id, node); - } - if (node instanceof AST_Definitions && scope === self) { - node.definitions.forEach(function(def) { - var node_def = def.name.definition(); - var_defs_by_id.add(node_def.id, def); - if (!drop_vars) { - if (!(node_def.id in in_use_ids)) { - in_use_ids[node_def.id] = true; - in_use.push(node_def); - } - } - if (def.value) { - initializations.add(node_def.id, def.value); - if (def.value.has_side_effects(compressor)) { - def.value.walk(tw); - } - if (!node_def.chained && def.name.fixed_value(true) === def.value) { - fixed_ids[node_def.id] = def; - } - } - }); - return true; - } - return scan_ref_scoped(node, descend); - }); - self.walk(tw); - // pass 2: for every used symbol we need to walk its - // initialization code to figure out if it uses other - // symbols (that may not be in_use). - tw = new TreeWalker(scan_ref_scoped); - for (var i = 0; i < in_use.length; i++) { - var init = initializations.get(in_use[i].id); - if (init) init.forEach(function(init) { - init.walk(tw); - }); - } - var drop_fn_name = compressor.option("keep_fnames") ? return_false : compressor.option("ie8") ? function(def) { - return !compressor.exposed(def) && !def.references.length; - } : function(def) { - // any declarations with same name will overshadow - // name of this anonymous function and can therefore - // never be used anywhere - return !(def.id in in_use_ids) || def.orig.length > 1; - }; - // pass 3: we should drop declarations not in_use - var unused_fn_names = []; - var tt = new TreeTransformer(function(node, descend, in_list) { - var parent = tt.parent(); - if (drop_vars) { - var props = [], sym = assign_as_unused(node, props); - if (sym) { - var def = sym.definition(); - var in_use = def.id in in_use_ids; - var value; - if (node instanceof AST_Assign) { - if (!in_use || node.left === sym && def.id in fixed_ids && fixed_ids[def.id] !== node) { - value = get_rhs(node); - } - } else if (!in_use) { - value = make_node(AST_Number, node, { - value: 0 - }); - } - if (value) { - props.push(value); - return maintain_this_binding(compressor, parent, node, make_sequence(node, props.map(function(prop) { - return prop.transform(tt); - }))); - } - } - } - if (scope !== self) return; - if (node instanceof AST_Function && node.name && drop_fn_name(node.name.definition())) { - unused_fn_names.push(node); - } - if (node instanceof AST_Lambda && !(node instanceof AST_Accessor)) { - var trim = compressor.drop_fargs(node, parent); - for (var a = node.argnames, i = a.length; --i >= 0;) { - var sym = a[i]; - if (!(sym.definition().id in in_use_ids)) { - sym.__unused = true; - if (trim) { - log(sym, "Dropping unused function argument {name} [{file}:{line},{col}]", template(sym)); - a.pop(); - } - } else { - trim = false; - } - } - } - if (drop_funcs && node instanceof AST_Defun && node !== self) { - var def = node.name.definition(); - if (!(def.id in in_use_ids)) { - log(node.name, "Dropping unused function {name} [{file}:{line},{col}]", template(node.name)); - def.eliminated++; - return make_node(AST_EmptyStatement, node); - } - } - if (node instanceof AST_Definitions && !(parent instanceof AST_ForIn && parent.init === node)) { - // place uninitialized names at the start - var body = [], head = [], tail = []; - // for unused names whose initialization has - // side effects, we can cascade the init. code - // into the next one, or next statement. - var side_effects = []; - node.definitions.forEach(function(def) { - if (def.value) def.value = def.value.transform(tt); - var sym = def.name.definition(); - if (!drop_vars || sym.id in in_use_ids) { - if (def.value && sym.id in fixed_ids && fixed_ids[sym.id] !== def) { - def.value = def.value.drop_side_effect_free(compressor); - } - var var_defs = var_defs_by_id.get(sym.id); - if (var_defs.length > 1 && (!def.value || sym.orig.indexOf(def.name) > sym.eliminated)) { - AST_Node.warn("Dropping duplicated definition of variable {name} [{file}:{line},{col}]", template(def.name)); - if (def.value) { - var ref = make_node(AST_SymbolRef, def.name, def.name); - sym.references.push(ref); - var assign = make_node(AST_Assign, def, { - operator: "=", - left: ref, - right: def.value - }); - if (fixed_ids[sym.id] === def) { - fixed_ids[sym.id] = assign; - } - side_effects.push(assign.transform(tt)); - } - remove(var_defs, def); - sym.eliminated++; - return; - } - if (!def.value) { - head.push(def); - } else if (compressor.option("functions") - && !compressor.option("ie8") - && def.value === def.name.fixed_value() - && def.value instanceof AST_Function - && !(def.value.name && def.value.name.definition().assignments) - && can_rename(def.value, def.name.name) - && (!compressor.has_directive("use strict") || parent instanceof AST_Scope)) { - AST_Node.warn("Declaring {name} as function [{file}:{line},{col}]", template(def.name)); - var defun = make_node(AST_Defun, def, def.value); - defun.name = make_node(AST_SymbolDefun, def.name, def.name); - var name_def = def.name.scope.resolve().def_function(defun.name); - if (def.value.name) { - var old_def = def.value.name.definition(); - def.value.walk(new TreeWalker(function(node) { - if (node instanceof AST_SymbolRef && node.definition() === old_def) { - node.name = name_def.name; - node.thedef = name_def; - node.reference({}); - } - })); - } - body.push(defun); - } else { - if (side_effects.length > 0) { - if (tail.length > 0) { - side_effects.push(def.value); - def.value = make_sequence(def.value, side_effects); - } else { - body.push(make_node(AST_SimpleStatement, node, { - body: make_sequence(node, side_effects) - })); - } - side_effects = []; - } - tail.push(def); - } - } else if (sym.orig[0] instanceof AST_SymbolCatch) { - var value = def.value && def.value.drop_side_effect_free(compressor); - if (value) side_effects.push(value); - def.value = null; - head.push(def); - } else { - var value = def.value && def.value.drop_side_effect_free(compressor); - if (value) { - AST_Node.warn("Side effects in initialization of unused variable {name} [{file}:{line},{col}]", template(def.name)); - side_effects.push(value); - } else { - log(def.name, "Dropping unused variable {name} [{file}:{line},{col}]", template(def.name)); - } - sym.eliminated++; - } - - function can_rename(fn, name) { - var def = fn.variables.get(name); - return !def || fn.name && def === fn.name.definition(); - } - }); - if (head.length > 0 || tail.length > 0) { - node.definitions = head.concat(tail); - body.push(node); - } - if (side_effects.length > 0) { - body.push(make_node(AST_SimpleStatement, node, { - body: make_sequence(node, side_effects) - })); - } - switch (body.length) { - case 0: - return in_list ? MAP.skip : make_node(AST_EmptyStatement, node); - case 1: - return body[0]; - default: - return in_list ? MAP.splice(body) : make_node(AST_BlockStatement, node, { - body: body - }); - } - } - // certain combination of unused name + side effect leads to: - // https://github.com/mishoo/UglifyJS2/issues/44 - // https://github.com/mishoo/UglifyJS2/issues/1830 - // https://github.com/mishoo/UglifyJS2/issues/1838 - // https://github.com/mishoo/UglifyJS2/issues/3371 - // that's an invalid AST. - // We fix it at this stage by moving the `var` outside the `for`. - if (node instanceof AST_For) { - descend(node, this); - var block; - if (node.init instanceof AST_BlockStatement) { - block = node.init; - node.init = block.body.pop(); - block.body.push(node); - } - if (node.init instanceof AST_Defun) { - if (!block) { - block = make_node(AST_BlockStatement, node, { - body: [ node ] - }); - } - block.body.splice(-1, 0, node.init); - node.init = null; - } else if (node.init instanceof AST_SimpleStatement) { - node.init = node.init.body; - } else if (is_empty(node.init)) { - node.init = null; - } - return !block ? node : in_list ? MAP.splice(block.body) : block; - } - if (node instanceof AST_LabeledStatement && node.body instanceof AST_For) { - descend(node, this); - if (node.body instanceof AST_BlockStatement) { - var block = node.body; - node.body = block.body.pop(); - block.body.push(node); - return in_list ? MAP.splice(block.body) : block; - } - return node; - } - if (node instanceof AST_Scope) { - var save_scope = scope; - scope = node; - descend(node, this); - scope = save_scope; - return node; - } - - function log(sym, text, props) { - AST_Node[sym.unreferenced() ? "warn" : "info"](text, props); - } - - function template(sym) { - return { - name : sym.name, - file : sym.start.file, - line : sym.start.line, - col : sym.start.col - }; - } - }); - tt.push(compressor.parent()); - self.transform(tt); - unused_fn_names.forEach(function(fn) { - fn.name = null; - }); - - function verify_safe_usage(def, read, modified) { - if (def.id in in_use_ids) return; - if (read && modified) { - in_use_ids[def.id] = true; - in_use.push(def); - } else { - value_read[def.id] = read; - value_modified[def.id] = modified; - } - } - - function get_rhs(assign) { - var rhs = assign.right; - if (!assign.write_only) return rhs; - if (!(rhs instanceof AST_Binary && lazy_op[rhs.operator])) return rhs; - var sym = assign.left; - if (!(sym instanceof AST_SymbolRef) || sym.name != rhs.left.name) return rhs; - return rhs.right.has_side_effects(compressor) ? rhs : rhs.right; - } - - function scan_ref_scoped(node, descend) { - var node_def, props = [], sym = assign_as_unused(node, props); - if (sym && self.variables.get(sym.name) === (node_def = sym.definition())) { - props.forEach(function(prop) { - prop.walk(tw); - }); - if (node instanceof AST_Assign) { - if (node.write_only === "p" && node.right.may_throw_on_access(compressor)) return; - var right = get_rhs(node); - right.walk(tw); - if (node.left === sym) { - if (!node_def.chained && sym.fixed_value(true) === right) { - fixed_ids[node_def.id] = node; - } - if (!node.write_only) { - verify_safe_usage(node_def, true, value_modified[node_def.id]); - } - } else { - var fixed = sym.fixed_value(); - if (!fixed || !fixed.is_constant()) { - verify_safe_usage(node_def, value_read[node_def.id], true); - } - } - } - return true; - } - if (node instanceof AST_SymbolRef) { - node_def = node.definition(); - if (!(node_def.id in in_use_ids)) { - in_use_ids[node_def.id] = true; - in_use.push(node_def); - } - return true; - } - if (node instanceof AST_Scope) { - var save_scope = scope; - scope = node; - descend(); - scope = save_scope; - return true; - } - } - }); - - AST_Scope.DEFMETHOD("hoist_declarations", function(compressor) { - if (compressor.has_directive("use asm")) return; - var hoist_funs = compressor.option("hoist_funs"); - var hoist_vars = compressor.option("hoist_vars"); - var self = this; - if (hoist_vars) { - // let's count var_decl first, we seem to waste a lot of - // space if we hoist `var` when there's only one. - var var_decl = 0; - self.walk(new TreeWalker(function(node) { - if (var_decl > 1) return true; - if (node instanceof AST_Scope && node !== self) return true; - if (node instanceof AST_Var) { - var_decl++; - return true; - } - })); - if (var_decl <= 1) hoist_vars = false; - } - if (!hoist_funs && !hoist_vars) return; - var dirs = []; - var hoisted = []; - var vars = new Dictionary(), vars_found = 0; - var tt = new TreeTransformer(function(node) { - if (node === self) return; - if (node instanceof AST_Directive) { - dirs.push(node); - return make_node(AST_EmptyStatement, node); - } - if (hoist_funs && node instanceof AST_Defun - && (tt.parent() === self || !compressor.has_directive("use strict"))) { - hoisted.push(node); - return make_node(AST_EmptyStatement, node); - } - if (hoist_vars && node instanceof AST_Var) { - node.definitions.forEach(function(def) { - vars.set(def.name.name, def); - ++vars_found; - }); - var seq = node.to_assignments(compressor); - var p = tt.parent(); - if (p instanceof AST_ForIn && p.init === node) { - if (seq) return seq; - var def = node.definitions[0].name; - return make_node(AST_SymbolRef, def, def); - } - if (p instanceof AST_For && p.init === node) return seq; - if (!seq) return make_node(AST_EmptyStatement, node); - return make_node(AST_SimpleStatement, node, { - body: seq - }); - } - if (node instanceof AST_Scope) return node; - }); - self.transform(tt); - if (vars_found > 0) { - // collect only vars which don't show up in self's arguments list - var defs = []; - vars.each(function(def, name) { - if (self instanceof AST_Lambda - && !all(self.argnames, function(argname) { - return argname.name != name; - })) { - vars.del(name); - } else { - def = def.clone(); - def.value = null; - defs.push(def); - vars.set(name, def); - } - }); - if (defs.length > 0) { - // try to merge in assignments - for (var i = 0; i < self.body.length;) { - if (self.body[i] instanceof AST_SimpleStatement) { - var expr = self.body[i].body, sym, assign; - if (expr instanceof AST_Assign - && expr.operator == "=" - && (sym = expr.left) instanceof AST_Symbol - && vars.has(sym.name)) - { - var def = vars.get(sym.name); - if (def.value) break; - def.value = expr.right; - remove(defs, def); - defs.push(def); - self.body.splice(i, 1); - continue; - } - if (expr instanceof AST_Sequence - && (assign = expr.expressions[0]) instanceof AST_Assign - && assign.operator == "=" - && (sym = assign.left) instanceof AST_Symbol - && vars.has(sym.name)) - { - var def = vars.get(sym.name); - if (def.value) break; - def.value = assign.right; - remove(defs, def); - defs.push(def); - self.body[i].body = make_sequence(expr, expr.expressions.slice(1)); - continue; - } - } - if (self.body[i] instanceof AST_EmptyStatement) { - self.body.splice(i, 1); - continue; - } - if (self.body[i] instanceof AST_BlockStatement) { - var tmp = [ i, 1 ].concat(self.body[i].body); - self.body.splice.apply(self.body, tmp); - continue; - } - break; - } - defs = make_node(AST_Var, self, { - definitions: defs - }); - hoisted.push(defs); - } - } - self.body = dirs.concat(hoisted, self.body); - }); - - AST_Scope.DEFMETHOD("var_names", function() { - var var_names = this._var_names; - if (!var_names) { - this._var_names = var_names = Object.create(null); - this.enclosed.forEach(function(def) { - var_names[def.name] = true; - }); - this.variables.each(function(def, name) { - var_names[name] = true; - }); - } - return var_names; - }); - - AST_Scope.DEFMETHOD("make_var_name", function(prefix) { - var var_names = this.var_names(); - prefix = prefix.replace(/(?:^[^a-z_$]|[^a-z0-9_$])/ig, "_"); - var name = prefix; - for (var i = 0; var_names[name]; i++) name = prefix + "$" + i; - var_names[name] = true; - return name; - }); - - AST_Scope.DEFMETHOD("hoist_properties", function(compressor) { - if (!compressor.option("hoist_props") || compressor.has_directive("use asm")) return; - var self = this; - var top_retain = self instanceof AST_Toplevel && compressor.top_retain || return_false; - var defs_by_id = Object.create(null); - self.transform(new TreeTransformer(function(node, descend) { - if (node instanceof AST_Assign) { - if (node.operator != "=") return; - if (!node.write_only) return; - if (node.left.scope !== self) return; - if (!can_hoist(node.left, node.right, 1)) return; - descend(node, this); - var defs = new Dictionary(); - var assignments = []; - var decls = []; - node.right.properties.forEach(function(prop) { - var decl = make_sym(node.left, prop.key); - decls.push(make_node(AST_VarDef, node, { - name: decl, - value: null - })); - var sym = make_node(AST_SymbolRef, node, { - name: decl.name, - scope: self, - thedef: decl.definition() - }); - sym.reference({}); - assignments.push(make_node(AST_Assign, node, { - operator: "=", - left: sym, - right: prop.value - })); - }); - defs_by_id[node.left.definition().id] = defs; - self.body.splice(self.body.indexOf(this.stack[1]) + 1, 0, make_node(AST_Var, node, { - definitions: decls - })); - return make_sequence(node, assignments); - } - if (node instanceof AST_Scope) return node === self ? undefined : node; - if (node instanceof AST_VarDef) { - if (!can_hoist(node.name, node.value, 0)) return; - descend(node, this); - var defs = new Dictionary(); - var var_defs = []; - node.value.properties.forEach(function(prop) { - var_defs.push(make_node(AST_VarDef, node, { - name: make_sym(node.name, prop.key), - value: prop.value - })); - }); - defs_by_id[node.name.definition().id] = defs; - return MAP.splice(var_defs); - } - - function make_sym(sym, key) { - var new_var = make_node(AST_SymbolVar, sym, { - name: self.make_var_name(sym.name + "_" + key), - scope: self - }); - var def = self.def_variable(new_var); - defs.set(key, def); - self.enclosed.push(def); - return new_var; - } - })); - self.transform(new TreeTransformer(function(node, descend) { - if (node instanceof AST_PropAccess) { - if (!(node.expression instanceof AST_SymbolRef)) return; - var defs = defs_by_id[node.expression.definition().id]; - if (!defs) return; - var def = defs.get(node.getProperty()); - var sym = make_node(AST_SymbolRef, node, { - name: def.name, - scope: node.expression.scope, - thedef: def - }); - sym.reference({}); - return sym; - } - if (node instanceof AST_Unary) { - if (unary_side_effects[node.operator]) return; - if (!(node.expression instanceof AST_SymbolRef)) return; - if (!(node.expression.definition().id in defs_by_id)) return; - var opt = node.clone(); - opt.expression = make_node(AST_Object, node, { - properties: [] - }); - return opt; - } - })); - - function can_hoist(sym, right, count) { - var def = sym.definition(); - if (def.assignments != count) return; - if (def.direct_access) return; - if (def.escaped.depth == 1) return; - if (def.references.length == count) return; - if (def.single_use) return; - if (top_retain(def)) return; - if (sym.fixed_value() !== right) return; - return right instanceof AST_Object; - } - }); - - function safe_to_drop(fn, compressor) { - if (!fn.name || !compressor.option("ie8")) return true; - var def = fn.name.definition(); - if (compressor.exposed(def)) return false; - return all(def.references, function(sym) { - return !(sym instanceof AST_SymbolRef); - }); - } - - // drop_side_effect_free() - // remove side-effect-free parts which only affects return value - (function(def) { - // Drop side-effect-free elements from an array of expressions. - // Returns an array of expressions with side-effects or null - // if all elements were dropped. Note: original array may be - // returned if nothing changed. - function trim(nodes, compressor, first_in_statement) { - var len = nodes.length; - if (!len) return null; - var ret = [], changed = false; - for (var i = 0; i < len; i++) { - var node = nodes[i].drop_side_effect_free(compressor, first_in_statement); - changed |= node !== nodes[i]; - if (node) { - ret.push(node); - first_in_statement = false; - } - } - return changed ? ret.length ? ret : null : nodes; - } - - def(AST_Node, return_this); - def(AST_Accessor, return_null); - def(AST_Array, function(compressor, first_in_statement) { - var values = trim(this.elements, compressor, first_in_statement); - return values && make_sequence(this, values); - }); - def(AST_Assign, function(compressor) { - var left = this.left; - if (left instanceof AST_PropAccess) { - var expr = left.expression; - if (expr instanceof AST_Assign && expr.operator == "=" && !expr.may_throw_on_access(compressor)) { - expr.write_only = "p"; - } - if (compressor.has_directive("use strict") && expr.is_constant()) return this; - } - if (left.has_side_effects(compressor)) return this; - this.write_only = true; - if (root_expr(left).is_constant_expression(compressor.find_parent(AST_Scope))) { - return this.right.drop_side_effect_free(compressor); - } - return this; - }); - def(AST_Binary, function(compressor, first_in_statement) { - var right = this.right.drop_side_effect_free(compressor, first_in_statement); - if (!right) return this.left.drop_side_effect_free(compressor, first_in_statement); - if (lazy_op[this.operator] && !(right instanceof AST_Function)) { - var node = this; - if (right !== node.right) { - node = this.clone(); - node.right = right.drop_side_effect_free(compressor); - } - return (first_in_statement ? best_of_statement : best_of_expression)(node, make_node(AST_Binary, this, { - operator: node.operator == "&&" ? "||" : "&&", - left: node.left.negate(compressor, first_in_statement), - right: node.right - })); - } else { - var left = this.left.drop_side_effect_free(compressor, first_in_statement); - if (!left) return right; - return make_sequence(this, [ left, right.drop_side_effect_free(compressor) ]); - } - }); - def(AST_Call, function(compressor, first_in_statement) { - if (!this.is_expr_pure(compressor)) { - var exp = this.expression; - if (this.is_call_pure(compressor)) { - var exprs = this.args.slice(); - exprs.unshift(exp.expression); - exprs = trim(exprs, compressor, first_in_statement); - return exprs && make_sequence(this, exprs); - } - if (exp instanceof AST_Function && (!exp.name || !exp.name.definition().references.length)) { - var node = this.clone(); - exp.process_expression(false, compressor); - exp.walk(new TreeWalker(function(node) { - if (node instanceof AST_Return && node.value) { - node.value = node.value.drop_side_effect_free(compressor); - return true; - } - if (node instanceof AST_Scope && node !== exp) return true; - })); - return node; - } - return this; - } - if (this.pure) AST_Node.warn("Dropping __PURE__ call [{file}:{line},{col}]", this.start); - var args = trim(this.args, compressor, first_in_statement); - return args && make_sequence(this, args); - }); - def(AST_Conditional, function(compressor) { - var consequent = this.consequent.drop_side_effect_free(compressor); - var alternative = this.alternative.drop_side_effect_free(compressor); - if (consequent === this.consequent && alternative === this.alternative) return this; - if (!consequent) return alternative ? make_node(AST_Binary, this, { - operator: "||", - left: this.condition, - right: alternative - }) : this.condition.drop_side_effect_free(compressor); - if (!alternative) return make_node(AST_Binary, this, { - operator: "&&", - left: this.condition, - right: consequent - }); - var node = this.clone(); - node.consequent = consequent; - node.alternative = alternative; - return node; - }); - def(AST_Constant, return_null); - def(AST_Dot, function(compressor, first_in_statement) { - var expr = this.expression; - if (expr.may_throw_on_access(compressor)) return this; - return expr.drop_side_effect_free(compressor, first_in_statement); - }); - def(AST_Function, function(compressor) { - return safe_to_drop(this, compressor) ? null : this; - }); - def(AST_Object, function(compressor, first_in_statement) { - var values = trim(this.properties, compressor, first_in_statement); - return values && make_sequence(this, values); - }); - def(AST_ObjectProperty, function(compressor, first_in_statement) { - return this.value.drop_side_effect_free(compressor, first_in_statement); - }); - def(AST_Sequence, function(compressor, first_in_statement) { - var expressions = trim(this.expressions, compressor, first_in_statement); - if (expressions === this.expressions) return this; - if (!expressions) return null; - return make_sequence(this, expressions); - }); - def(AST_Sub, function(compressor, first_in_statement) { - if (this.expression.may_throw_on_access(compressor)) return this; - var expression = this.expression.drop_side_effect_free(compressor, first_in_statement); - if (!expression) return this.property.drop_side_effect_free(compressor, first_in_statement); - var property = this.property.drop_side_effect_free(compressor); - if (!property) return expression; - return make_sequence(this, [ expression, property ]); - }); - def(AST_SymbolRef, function(compressor) { - if (!this.is_declared(compressor)) return this; - this.definition().replaced++; - return null; - }); - def(AST_This, return_null); - def(AST_Unary, function(compressor, first_in_statement) { - if (unary_side_effects[this.operator]) { - this.write_only = !this.expression.has_side_effects(compressor); - return this; - } - if (this.operator == "typeof" && this.expression instanceof AST_SymbolRef) { - this.expression.definition().replaced++; - return null; - } - var expression = this.expression.drop_side_effect_free(compressor, first_in_statement); - if (first_in_statement && expression && is_iife_call(expression)) { - if (expression === this.expression && this.operator == "!") return this; - return expression.negate(compressor, first_in_statement); - } - return expression; - }); - })(function(node, func) { - node.DEFMETHOD("drop_side_effect_free", func); - }); - - OPT(AST_SimpleStatement, function(self, compressor) { - if (compressor.option("side_effects")) { - var body = self.body; - var node = body.drop_side_effect_free(compressor, true); - if (!node) { - AST_Node.warn("Dropping side-effect-free statement [{file}:{line},{col}]", self.start); - return make_node(AST_EmptyStatement, self); - } - if (node !== body) { - return make_node(AST_SimpleStatement, self, { body: node }); - } - } - return self; - }); - - OPT(AST_While, function(self, compressor) { - return compressor.option("loops") ? make_node(AST_For, self, self).optimize(compressor) : self; - }); - - function has_break_or_continue(loop, parent) { - var found = false; - var tw = new TreeWalker(function(node) { - if (found || node instanceof AST_Scope) return true; - if (node instanceof AST_LoopControl && tw.loopcontrol_target(node) === loop) { - return found = true; - } - }); - if (parent instanceof AST_LabeledStatement) tw.push(parent); - tw.push(loop); - loop.body.walk(tw); - return found; - } - - OPT(AST_Do, function(self, compressor) { - if (!compressor.option("loops")) return self; - var cond = self.condition.is_truthy() || self.condition.tail_node().evaluate(compressor); - if (!(cond instanceof AST_Node)) { - if (cond) return make_node(AST_For, self, { - body: make_node(AST_BlockStatement, self.body, { - body: [ - self.body, - make_node(AST_SimpleStatement, self.condition, { - body: self.condition - }) - ] - }) - }).optimize(compressor); - if (!has_break_or_continue(self, compressor.parent())) { - return make_node(AST_BlockStatement, self.body, { - body: [ - self.body, - make_node(AST_SimpleStatement, self.condition, { - body: self.condition - }) - ] - }).optimize(compressor); - } - } - if (self.body instanceof AST_SimpleStatement) return make_node(AST_For, self, { - condition: make_sequence(self.condition, [ - self.body.body, - self.condition - ]), - body: make_node(AST_EmptyStatement, self) - }).optimize(compressor); - return self; - }); - - function if_break_in_loop(self, compressor) { - var first = self.body instanceof AST_BlockStatement ? self.body.body[0] : self.body; - if (compressor.option("dead_code") && is_break(first)) { - var body = []; - if (self.init instanceof AST_Statement) { - body.push(self.init); - } else if (self.init) { - body.push(make_node(AST_SimpleStatement, self.init, { - body: self.init - })); - } - if (self.condition) { - body.push(make_node(AST_SimpleStatement, self.condition, { - body: self.condition - })); - } - extract_declarations_from_unreachable_code(self.body, body); - return make_node(AST_BlockStatement, self, { - body: body - }); - } - if (first instanceof AST_If) { - if (is_break(first.body)) { - if (self.condition) { - self.condition = make_node(AST_Binary, self.condition, { - left: self.condition, - operator: "&&", - right: first.condition.negate(compressor), - }); - } else { - self.condition = first.condition.negate(compressor); - } - drop_it(first.alternative); - } else if (is_break(first.alternative)) { - if (self.condition) { - self.condition = make_node(AST_Binary, self.condition, { - left: self.condition, - operator: "&&", - right: first.condition, - }); - } else { - self.condition = first.condition; - } - drop_it(first.body); - } - } - return self; - - function is_break(node) { - return node instanceof AST_Break - && compressor.loopcontrol_target(node) === compressor.self(); - } - - function drop_it(rest) { - rest = as_statement_array(rest); - if (self.body instanceof AST_BlockStatement) { - self.body = self.body.clone(); - self.body.body = rest.concat(self.body.body.slice(1)); - self.body = self.body.transform(compressor); - } else { - self.body = make_node(AST_BlockStatement, self.body, { - body: rest - }).transform(compressor); - } - self = if_break_in_loop(self, compressor); - } - } - - OPT(AST_For, function(self, compressor) { - if (!compressor.option("loops")) return self; - if (compressor.option("side_effects")) { - if (self.init) self.init = self.init.drop_side_effect_free(compressor); - if (self.step) self.step = self.step.drop_side_effect_free(compressor); - } - if (self.condition) { - var cond = self.condition.evaluate(compressor); - if (!(cond instanceof AST_Node)) { - if (cond) self.condition = null; - else if (!compressor.option("dead_code")) { - var orig = self.condition; - self.condition = make_node_from_constant(cond, self.condition); - self.condition = best_of_expression(self.condition.transform(compressor), orig); - } - } - if (cond instanceof AST_Node) { - cond = self.condition.is_truthy() || self.condition.tail_node().evaluate(compressor); - } - if (!cond) { - if (compressor.option("dead_code")) { - var body = []; - extract_declarations_from_unreachable_code(self.body, body); - if (self.init instanceof AST_Statement) { - body.push(self.init); - } else if (self.init) { - body.push(make_node(AST_SimpleStatement, self.init, { - body: self.init - })); - } - body.push(make_node(AST_SimpleStatement, self.condition, { - body: self.condition - })); - return make_node(AST_BlockStatement, self, { body: body }).optimize(compressor); - } - } else if (self.condition && !(cond instanceof AST_Node)) { - self.body = make_node(AST_BlockStatement, self.body, { - body: [ - make_node(AST_SimpleStatement, self.condition, { - body: self.condition - }), - self.body - ] - }); - self.condition = null; - } - } - return if_break_in_loop(self, compressor); - }); - - function mark_locally_defined(condition, consequent, alternative, operator) { - if (!(condition instanceof AST_Binary)) return; - if (!(condition.left instanceof AST_String)) { - if (!operator) operator = condition.operator; - if (condition.operator != operator) return; - switch (operator) { - case "&&": - case "||": - mark_locally_defined(condition.left, consequent, alternative, operator); - mark_locally_defined(condition.right, consequent, alternative, operator); - break; - } - return; - } - if (!(condition.right instanceof AST_UnaryPrefix)) return; - if (condition.right.operator != "typeof") return; - var sym = condition.right.expression; - if (!is_undeclared_ref(sym)) return; - var body; - var undef = condition.left.getValue() == "undefined"; - switch (condition.operator) { - case "==": - body = undef ? alternative : consequent; - break; - case "!=": - body = undef ? consequent : alternative; - break; - default: - return; - } - if (!body) return; - var def = sym.definition(); - var tw = new TreeWalker(function(node) { - if (node instanceof AST_Scope) { - var parent = tw.parent(); - if (parent instanceof AST_Call && parent.expression === node) return; - return true; - } - if (node instanceof AST_SymbolRef && node.definition() === def) node.defined = true; - }); - body.walk(tw); - } - - OPT(AST_If, function(self, compressor) { - if (is_empty(self.alternative)) self.alternative = null; - - if (!compressor.option("conditionals")) return self; - // if condition can be statically determined, warn and drop - // one of the blocks. note, statically determined implies - // “has no side effects”; also it doesn't work for cases like - // `x && true`, though it probably should. - var cond = self.condition.evaluate(compressor); - if (!compressor.option("dead_code") && !(cond instanceof AST_Node)) { - var orig = self.condition; - self.condition = make_node_from_constant(cond, orig); - self.condition = best_of_expression(self.condition.transform(compressor), orig); - } - if (compressor.option("dead_code")) { - if (cond instanceof AST_Node) { - cond = self.condition.is_truthy() || self.condition.tail_node().evaluate(compressor); - } - if (!cond) { - AST_Node.warn("Condition always false [{file}:{line},{col}]", self.condition.start); - var body = []; - extract_declarations_from_unreachable_code(self.body, body); - body.push(make_node(AST_SimpleStatement, self.condition, { - body: self.condition - })); - if (self.alternative) body.push(self.alternative); - return make_node(AST_BlockStatement, self, { body: body }).optimize(compressor); - } else if (!(cond instanceof AST_Node)) { - AST_Node.warn("Condition always true [{file}:{line},{col}]", self.condition.start); - var body = []; - if (self.alternative) extract_declarations_from_unreachable_code(self.alternative, body); - body.push(make_node(AST_SimpleStatement, self.condition, { - body: self.condition - })); - body.push(self.body); - return make_node(AST_BlockStatement, self, { body: body }).optimize(compressor); - } - } - var negated = self.condition.negate(compressor); - var self_condition_length = self.condition.print_to_string().length; - var negated_length = negated.print_to_string().length; - var negated_is_best = negated_length < self_condition_length; - if (self.alternative && negated_is_best) { - negated_is_best = false; // because we already do the switch here. - // no need to swap values of self_condition_length and negated_length - // here because they are only used in an equality comparison later on. - self.condition = negated; - var tmp = self.body; - self.body = self.alternative || make_node(AST_EmptyStatement, self); - self.alternative = tmp; - } - if (self.body instanceof AST_SimpleStatement - && self.alternative instanceof AST_SimpleStatement) { - return make_node(AST_SimpleStatement, self, { - body: make_node(AST_Conditional, self, { - condition : self.condition, - consequent : self.body.body, - alternative : self.alternative.body - }) - }).optimize(compressor); - } - if (is_empty(self.alternative) && self.body instanceof AST_SimpleStatement) { - if (self_condition_length === negated_length && !negated_is_best - && self.condition instanceof AST_Binary && self.condition.operator == "||") { - // although the code length of self.condition and negated are the same, - // negated does not require additional surrounding parentheses. - // see https://github.com/mishoo/UglifyJS2/issues/979 - negated_is_best = true; - } - if (negated_is_best) return make_node(AST_SimpleStatement, self, { - body: make_node(AST_Binary, self, { - operator : "||", - left : negated, - right : self.body.body - }).transform(compressor) - }).optimize(compressor); - return make_node(AST_SimpleStatement, self, { - body: make_node(AST_Binary, self, { - operator : "&&", - left : self.condition, - right : self.body.body - }).transform(compressor) - }).optimize(compressor); - } - if (is_empty(self.body)) { - if (is_empty(self.alternative)) return make_node(AST_SimpleStatement, self.condition, { - body: self.condition.clone() - }).optimize(compressor); - if (self.alternative instanceof AST_SimpleStatement) return make_node(AST_SimpleStatement, self, { - body: make_node(AST_Binary, self, { - operator : "||", - left : self.condition, - right : self.alternative.body - }).transform(compressor) - }).optimize(compressor); - self = make_node(AST_If, self, { - condition: negated, - body: self.alternative, - alternative: null - }); - } - if (self.body instanceof AST_Exit - && self.alternative instanceof AST_Exit - && self.body.TYPE == self.alternative.TYPE) { - return make_node(self.body.CTOR, self, { - value: make_node(AST_Conditional, self, { - condition : self.condition, - consequent : self.body.value || make_node(AST_Undefined, self.body), - alternative : self.alternative.value || make_node(AST_Undefined, self.alternative) - }).transform(compressor) - }).optimize(compressor); - } - if (self.body instanceof AST_If - && !self.body.alternative - && !self.alternative) { - self = make_node(AST_If, self, { - condition: make_node(AST_Binary, self.condition, { - operator: "&&", - left: self.condition, - right: self.body.condition - }), - body: self.body.body, - alternative: null - }); - } - if (aborts(self.body)) { - if (self.alternative) { - var alt = self.alternative; - self.alternative = null; - return make_node(AST_BlockStatement, self, { - body: [ self, alt ] - }).optimize(compressor); - } - } - if (aborts(self.alternative)) { - var body = self.body; - self.body = self.alternative; - self.condition = negated_is_best ? negated : self.condition.negate(compressor); - self.alternative = null; - return make_node(AST_BlockStatement, self, { - body: [ self, body ] - }).optimize(compressor); - } - if (compressor.option("typeofs")) mark_locally_defined(self.condition, self.body, self.alternative); - return self; - }); - - OPT(AST_Switch, function(self, compressor) { - if (!compressor.option("switches")) return self; - var branch; - var value = self.expression.evaluate(compressor); - if (!(value instanceof AST_Node)) { - var orig = self.expression; - self.expression = make_node_from_constant(value, orig); - self.expression = best_of_expression(self.expression.transform(compressor), orig); - } - if (!compressor.option("dead_code")) return self; - if (value instanceof AST_Node) { - value = self.expression.tail_node().evaluate(compressor); - } - var decl = []; - var body = []; - var default_branch; - var exact_match; - for (var i = 0, len = self.body.length; i < len && !exact_match; i++) { - branch = self.body[i]; - if (branch instanceof AST_Default) { - if (!default_branch) { - default_branch = branch; - } else { - eliminate_branch(branch, body[body.length - 1]); - } - } else if (!(value instanceof AST_Node)) { - var exp = branch.expression.evaluate(compressor); - if (!(exp instanceof AST_Node) && exp !== value) { - eliminate_branch(branch, body[body.length - 1]); - continue; - } - if (exp instanceof AST_Node) exp = branch.expression.tail_node().evaluate(compressor); - if (exp === value) { - exact_match = branch; - if (default_branch) { - var default_index = body.indexOf(default_branch); - body.splice(default_index, 1); - eliminate_branch(default_branch, body[default_index - 1]); - default_branch = null; - } - } - } - if (aborts(branch)) { - var prev = body[body.length - 1]; - if (aborts(prev) && prev.body.length == branch.body.length - && make_node(AST_BlockStatement, prev, prev).equivalent_to(make_node(AST_BlockStatement, branch, branch))) { - prev.body = []; - } - } - body.push(branch); - } - while (i < len) eliminate_branch(self.body[i++], body[body.length - 1]); - if (body.length > 0) { - body[0].body = decl.concat(body[0].body); - } - self.body = body; - while (branch = body[body.length - 1]) { - var stat = branch.body[branch.body.length - 1]; - if (stat instanceof AST_Break && compressor.loopcontrol_target(stat) === self) - branch.body.pop(); - if (branch.body.length || branch instanceof AST_Case - && (default_branch || branch.expression.has_side_effects(compressor))) break; - if (body.pop() === default_branch) default_branch = null; - } - if (body.length == 0) { - return make_node(AST_BlockStatement, self, { - body: decl.concat(make_node(AST_SimpleStatement, self.expression, { - body: self.expression - })) - }).optimize(compressor); - } - if (body.length == 1 && (body[0] === exact_match || body[0] === default_branch)) { - var has_break = false; - var tw = new TreeWalker(function(node) { - if (has_break - || node instanceof AST_Lambda - || node instanceof AST_SimpleStatement) return true; - if (node instanceof AST_Break && tw.loopcontrol_target(node) === self) - has_break = true; - }); - self.walk(tw); - if (!has_break) { - var statements = body[0].body.slice(); - var exp = body[0].expression; - if (exp) statements.unshift(make_node(AST_SimpleStatement, exp, { - body: exp - })); - statements.unshift(make_node(AST_SimpleStatement, self.expression, { - body:self.expression - })); - return make_node(AST_BlockStatement, self, { - body: statements - }).optimize(compressor); - } - } - return self; - - function eliminate_branch(branch, prev) { - if (prev && !aborts(prev)) { - prev.body = prev.body.concat(branch.body); - } else { - extract_declarations_from_unreachable_code(branch, decl); - } - } - }); - - OPT(AST_Try, function(self, compressor) { - tighten_body(self.body, compressor); - if (self.bcatch && self.bfinally && all(self.bfinally.body, is_empty)) self.bfinally = null; - if (compressor.option("dead_code") && all(self.body, is_empty)) { - var body = []; - if (self.bcatch) { - extract_declarations_from_unreachable_code(self.bcatch, body); - body.forEach(function(stat) { - if (!(stat instanceof AST_Definitions)) return; - stat.definitions.forEach(function(var_def) { - var def = var_def.name.definition().redefined(); - if (!def) return; - var_def.name = var_def.name.clone(); - var_def.name.thedef = def; - }); - }); - } - if (self.bfinally) body = body.concat(self.bfinally.body); - return make_node(AST_BlockStatement, self, { - body: body - }).optimize(compressor); - } - return self; - }); - - AST_Definitions.DEFMETHOD("remove_initializers", function() { - this.definitions.forEach(function(def) { - def.value = null; - }); - }); - - AST_Definitions.DEFMETHOD("to_assignments", function(compressor) { - var reduce_vars = compressor.option("reduce_vars"); - var assignments = this.definitions.reduce(function(a, def) { - if (def.value) { - var name = make_node(AST_SymbolRef, def.name, def.name); - a.push(make_node(AST_Assign, def, { - operator : "=", - left : name, - right : def.value - })); - if (reduce_vars) name.definition().fixed = false; - } - def = def.name.definition(); - def.eliminated++; - def.replaced--; - return a; - }, []); - if (assignments.length == 0) return null; - return make_sequence(this, assignments); - }); - - OPT(AST_Definitions, function(self, compressor) { - return self.definitions.length ? self : make_node(AST_EmptyStatement, self); - }); - - AST_Call.DEFMETHOD("lift_sequences", function(compressor) { - if (!compressor.option("sequences")) return this; - var exp = this.expression; - if (!(exp instanceof AST_Sequence)) return this; - var tail = exp.tail_node(); - if (needs_unbinding(compressor, tail) && !(this instanceof AST_New)) return this; - var expressions = exp.expressions.slice(0, -1); - var node = this.clone(); - node.expression = tail; - expressions.push(node); - return make_sequence(this, expressions).optimize(compressor); - }); - - OPT(AST_Call, function(self, compressor) { - var seq = self.lift_sequences(compressor); - if (seq !== self) { - return seq; - } - var exp = self.expression; - var fn = exp; - if (compressor.option("reduce_vars") && fn instanceof AST_SymbolRef) { - fn = fn.fixed_value(); - } - var is_func = fn instanceof AST_Lambda; - if (compressor.option("unused") - && is_func - && !fn.uses_arguments - && !fn.pinned()) { - var pos = 0, last = 0; - for (var i = 0; i < self.args.length; i++) { - var trim = i >= fn.argnames.length; - if (trim || fn.argnames[i].__unused) { - var node = self.args[i].drop_side_effect_free(compressor); - if (node) { - self.args[pos++] = node; - } else if (!trim) { - self.args[pos++] = make_node(AST_Number, self.args[i], { - value: 0 - }); - continue; - } - } else { - self.args[pos++] = self.args[i]; - } - last = pos; - } - self.args.length = last; - } - if (compressor.option("unsafe")) { - if (is_undeclared_ref(exp)) switch (exp.name) { - case "Array": - if (self.args.length == 1) { - var first = self.args[0]; - if (first instanceof AST_Number) try { - var length = first.getValue(); - if (length > 6) break; - var elements = Array(length); - for (var i = 0; i < length; i++) elements[i] = make_node(AST_Hole, self); - return make_node(AST_Array, self, { - elements: elements - }); - } catch (ex) { - AST_Node.warn("Invalid array length: {length} [{file}:{line},{col}]", { - length: length, - file: self.start.file, - line: self.start.line, - col: self.start.col - }); - break; - } - if (!first.is_boolean(compressor) && !first.is_string(compressor)) break; - } - return make_node(AST_Array, self, { - elements: self.args - }); - case "Object": - if (self.args.length == 0) { - return make_node(AST_Object, self, { - properties: [] - }); - } - break; - case "String": - if (self.args.length == 0) return make_node(AST_String, self, { - value: "" - }); - if (self.args.length <= 1) return make_node(AST_Binary, self, { - left: self.args[0], - operator: "+", - right: make_node(AST_String, self, { value: "" }) - }).optimize(compressor); - break; - case "Number": - if (self.args.length == 0) return make_node(AST_Number, self, { - value: 0 - }); - if (self.args.length == 1) return make_node(AST_UnaryPrefix, self, { - expression: self.args[0], - operator: "+" - }).optimize(compressor); - case "Boolean": - if (self.args.length == 0) return make_node(AST_False, self); - if (self.args.length == 1) return make_node(AST_UnaryPrefix, self, { - expression: make_node(AST_UnaryPrefix, self, { - expression: self.args[0], - operator: "!" - }), - operator: "!" - }).optimize(compressor); - break; - case "RegExp": - var params = []; - if (all(self.args, function(arg) { - var value = arg.evaluate(compressor); - params.unshift(value); - return arg !== value; - })) { - try { - return best_of(compressor, self, make_node(AST_RegExp, self, { - value: RegExp.apply(RegExp, params), - })); - } catch (ex) { - AST_Node.warn("Error converting {expr} [{file}:{line},{col}]", { - expr: self.print_to_string(), - file: self.start.file, - line: self.start.line, - col: self.start.col - }); - } - } - break; - } else if (exp instanceof AST_Dot) switch(exp.property) { - case "toString": - if (self.args.length == 0 && !exp.expression.may_throw_on_access(compressor)) { - return make_node(AST_Binary, self, { - left: make_node(AST_String, self, { value: "" }), - operator: "+", - right: exp.expression - }).optimize(compressor); - } - break; - case "join": - if (exp.expression instanceof AST_Array) EXIT: { - var separator; - if (self.args.length > 0) { - separator = self.args[0].evaluate(compressor); - if (separator === self.args[0]) break EXIT; // not a constant - } - var elements = []; - var consts = []; - exp.expression.elements.forEach(function(el) { - var value = el.evaluate(compressor); - if (value !== el) { - consts.push(value); - } else { - if (consts.length > 0) { - elements.push(make_node(AST_String, self, { - value: consts.join(separator) - })); - consts.length = 0; - } - elements.push(el); - } - }); - if (consts.length > 0) { - elements.push(make_node(AST_String, self, { - value: consts.join(separator) - })); - } - if (elements.length == 0) return make_node(AST_String, self, { value: "" }); - if (elements.length == 1) { - if (elements[0].is_string(compressor)) { - return elements[0]; - } - return make_node(AST_Binary, elements[0], { - operator : "+", - left : make_node(AST_String, self, { value: "" }), - right : elements[0] - }); - } - if (separator == "") { - var first; - if (elements[0].is_string(compressor) - || elements[1].is_string(compressor)) { - first = elements.shift(); - } else { - first = make_node(AST_String, self, { value: "" }); - } - return elements.reduce(function(prev, el) { - return make_node(AST_Binary, el, { - operator : "+", - left : prev, - right : el - }); - }, first).optimize(compressor); - } - // need this awkward cloning to not affect original element - // best_of will decide which one to get through. - var node = self.clone(); - node.expression = node.expression.clone(); - node.expression.expression = node.expression.expression.clone(); - node.expression.expression.elements = elements; - return best_of(compressor, self, node); - } - break; - case "charAt": - if (self.args.length < 2) { - var node = make_node(AST_Sub, self, { - expression: exp.expression, - property: self.args.length ? make_node(AST_Binary, self.args[0], { - operator: "|", - left: make_node(AST_Number, self, { - value: 0 - }), - right: self.args[0] - }) : make_node(AST_Number, self, { - value: 0 - }) - }); - node.is_string = return_true; - return node.optimize(compressor); - } - break; - case "apply": - if (self.args.length == 2 && self.args[1] instanceof AST_Array) { - var args = self.args[1].elements.slice(); - args.unshift(self.args[0]); - return make_node(AST_Call, self, { - expression: make_node(AST_Dot, exp, { - expression: exp.expression, - property: "call" - }), - args: args - }).optimize(compressor); - } - break; - case "call": - var func = exp.expression; - if (func instanceof AST_SymbolRef) { - func = func.fixed_value(); - } - if (func instanceof AST_Lambda && !func.contains_this()) { - return (self.args.length ? make_sequence(this, [ - self.args[0], - make_node(AST_Call, self, { - expression: exp.expression, - args: self.args.slice(1) - }) - ]) : make_node(AST_Call, self, { - expression: exp.expression, - args: [] - })).optimize(compressor); - } - break; - } - } - if (compressor.option("unsafe_Function") - && is_undeclared_ref(exp) - && exp.name == "Function") { - // new Function() => function(){} - if (self.args.length == 0) return make_node(AST_Function, self, { - argnames: [], - body: [] - }); - if (all(self.args, function(x) { - return x instanceof AST_String; - })) { - // quite a corner-case, but we can handle it: - // https://github.com/mishoo/UglifyJS2/issues/203 - // if the code argument is a constant, then we can minify it. - try { - var code = "n(function(" + self.args.slice(0, -1).map(function(arg) { - return arg.value; - }).join(",") + "){" + self.args[self.args.length - 1].value + "})"; - var ast = parse(code); - var mangle = { ie8: compressor.option("ie8") }; - ast.figure_out_scope(mangle); - var comp = new Compressor(compressor.options); - ast = ast.transform(comp); - ast.figure_out_scope(mangle); - ast.compute_char_frequency(mangle); - ast.mangle_names(mangle); - var fun; - ast.walk(new TreeWalker(function(node) { - if (fun) return true; - if (node instanceof AST_Lambda) { - fun = node; - return true; - } - })); - var code = OutputStream(); - AST_BlockStatement.prototype._codegen.call(fun, fun, code); - self.args = [ - make_node(AST_String, self, { - value: fun.argnames.map(function(arg) { - return arg.print_to_string(); - }).join(",") - }), - make_node(AST_String, self.args[self.args.length - 1], { - value: code.get().replace(/^\{|\}$/g, "") - }) - ]; - return self; - } catch (ex) { - if (ex instanceof JS_Parse_Error) { - AST_Node.warn("Error parsing code passed to new Function [{file}:{line},{col}]", self.args[self.args.length - 1].start); - AST_Node.warn(ex.toString()); - } else { - throw ex; - } - } - } - } - var stat = is_func && fn.body[0]; - var can_inline = compressor.option("inline") && !self.is_expr_pure(compressor); - if (can_inline && stat instanceof AST_Return) { - var value = stat.value; - if (!value || value.is_constant_expression()) { - if (value) { - value = value.clone(true); - } else { - value = make_node(AST_Undefined, self); - } - var args = self.args.concat(value); - return make_sequence(self, args).optimize(compressor); - } - } - if (is_func) { - var def, value, scope, in_loop, level = -1; - if (can_inline - && !fn.uses_arguments - && !fn.pinned() - && !(fn.name && fn instanceof AST_Function) - && (value = can_flatten_body(stat)) - && (exp === fn - || compressor.option("unused") - && (def = exp.definition()).references.length == 1 - && !recursive_ref(compressor, def) - && fn.is_constant_expression(exp.scope)) - && !self.pure - && !fn.contains_this() - && can_inject_symbols()) { - fn._squeezed = true; - return make_sequence(self, flatten_fn()).optimize(compressor); - } - if (compressor.option("side_effects") - && all(fn.body, is_empty) - && (fn !== exp || safe_to_drop(fn, compressor))) { - var args = self.args.concat(make_node(AST_Undefined, self)); - return make_sequence(self, args).optimize(compressor); - } - } - if (compressor.option("drop_console")) { - if (exp instanceof AST_PropAccess) { - var name = exp.expression; - while (name.expression) { - name = name.expression; - } - if (is_undeclared_ref(name) && name.name == "console") { - return make_node(AST_Undefined, self).optimize(compressor); - } - } - } - if (compressor.option("negate_iife") - && compressor.parent() instanceof AST_SimpleStatement - && is_iife_call(self)) { - return self.negate(compressor, true); - } - var ev = self.evaluate(compressor); - if (ev !== self) { - ev = make_node_from_constant(ev, self).optimize(compressor); - return best_of(compressor, ev, self); - } - return self; - - function return_value(stat) { - if (!stat) return make_node(AST_Undefined, self); - if (stat instanceof AST_Return) { - if (!stat.value) return make_node(AST_Undefined, self); - return stat.value.clone(true); - } - if (stat instanceof AST_SimpleStatement) { - return make_node(AST_UnaryPrefix, stat, { - operator: "void", - expression: stat.body - }); - } - } - - function can_flatten_body(stat) { - var len = fn.body.length; - if (compressor.option("inline") < 3) { - return len == 1 && return_value(stat); - } - stat = null; - for (var i = 0; i < len; i++) { - var line = fn.body[i]; - if (line instanceof AST_Var) { - if (stat && !all(line.definitions, function(var_def) { - return !var_def.value; - })) { - return false; - } - } else if (line instanceof AST_Defun || line instanceof AST_EmptyStatement) { - continue; - } else if (stat) { - return false; - } else { - stat = line; - } - } - return return_value(stat); - } - - function var_exists(defined, name) { - return defined[name] || identifier_atom[name] || scope.var_names()[name]; - } - - function can_inject_args(catches, used, safe_to_inject) { - for (var i = 0; i < fn.argnames.length; i++) { - var arg = fn.argnames[i]; - if (arg.__unused) continue; - if (!safe_to_inject || var_exists(catches, arg.name)) return false; - used[arg.name] = true; - if (in_loop) in_loop.push(arg.definition()); - } - return true; - } - - function can_inject_vars(catches, used, safe_to_inject) { - for (var i = 0; i < fn.body.length; i++) { - var stat = fn.body[i]; - if (stat instanceof AST_Defun) { - if (!safe_to_inject || var_exists(used, stat.name.name)) return false; - continue; - } - if (!(stat instanceof AST_Var)) continue; - if (!safe_to_inject) return false; - for (var j = stat.definitions.length; --j >= 0;) { - var name = stat.definitions[j].name; - if (var_exists(catches, name.name)) return false; - if (in_loop) in_loop.push(name.definition()); - } - } - return true; - } - - function can_inject_symbols() { - var catches = Object.create(null); - do { - scope = compressor.parent(++level); - if (scope instanceof AST_Catch) { - catches[scope.argname.name] = true; - } else if (scope instanceof AST_IterationStatement) { - in_loop = []; - } else if (scope instanceof AST_SymbolRef) { - if (scope.fixed_value() instanceof AST_Scope) return false; - } - } while (!(scope instanceof AST_Scope)); - var safe_to_inject = (!(scope instanceof AST_Toplevel) || compressor.toplevel.vars) - && (exp !== fn || fn.parent_scope === compressor.find_parent(AST_Scope)); - var inline = compressor.option("inline"); - var used = Object.create(catches); - if (!can_inject_args(catches, used, inline >= 2 && safe_to_inject)) return false; - if (!can_inject_vars(catches, used, inline >= 3 && safe_to_inject)) return false; - return !in_loop || in_loop.length == 0 || !is_reachable(fn, in_loop); - } - - function append_var(decls, expressions, name, value) { - var def = name.definition(); - scope.variables.set(name.name, def); - scope.enclosed.push(def); - if (!scope.var_names()[name.name]) { - scope.var_names()[name.name] = true; - decls.push(make_node(AST_VarDef, name, { - name: name, - value: null - })); - } - var sym = make_node(AST_SymbolRef, name, name); - def.references.push(sym); - if (value) expressions.push(make_node(AST_Assign, self, { - operator: "=", - left: sym, - right: value - })); - } - - function flatten_args(decls, expressions) { - var len = fn.argnames.length; - for (var i = self.args.length; --i >= len;) { - expressions.push(self.args[i]); - } - for (i = len; --i >= 0;) { - var name = fn.argnames[i]; - var value = self.args[i]; - if (name.__unused || scope.var_names()[name.name]) { - if (value) expressions.push(value); - } else { - var symbol = make_node(AST_SymbolVar, name, name); - name.definition().orig.push(symbol); - if (!value && in_loop) value = make_node(AST_Undefined, self); - append_var(decls, expressions, symbol, value); - } - } - decls.reverse(); - expressions.reverse(); - } - - function flatten_vars(decls, expressions) { - var pos = expressions.length; - for (var i = 0; i < fn.body.length; i++) { - var stat = fn.body[i]; - if (!(stat instanceof AST_Var)) continue; - for (var j = 0; j < stat.definitions.length; j++) { - var var_def = stat.definitions[j]; - var name = var_def.name; - var redef = name.definition().redefined(); - if (redef) { - name = name.clone(); - name.thedef = redef; - } - append_var(decls, expressions, name, var_def.value); - if (in_loop && all(fn.argnames, function(argname) { - return argname.name != name.name; - })) { - var def = fn.variables.get(name.name); - var sym = make_node(AST_SymbolRef, name, name); - def.references.push(sym); - expressions.splice(pos++, 0, make_node(AST_Assign, var_def, { - operator: "=", - left: sym, - right: make_node(AST_Undefined, name) - })); - } - } - } - } - - function flatten_fn() { - var decls = []; - var expressions = []; - flatten_args(decls, expressions); - flatten_vars(decls, expressions); - expressions.push(value); - var args = fn.body.filter(function(stat) { - if (stat instanceof AST_Defun) { - var def = stat.name.definition(); - scope.functions.set(def.name, def); - scope.variables.set(def.name, def); - scope.enclosed.push(def); - scope.var_names()[def.name] = true; - return true; - } - }); - args.unshift(scope.body.indexOf(compressor.parent(level - 1)) + 1, 0); - if (decls.length) args.push(make_node(AST_Var, fn, { - definitions: decls - })); - [].splice.apply(scope.body, args); - return expressions; - } - }); - - OPT(AST_New, function(self, compressor) { - var seq = self.lift_sequences(compressor); - if (seq !== self) { - return seq; - } - if (compressor.option("unsafe")) { - var exp = self.expression; - if (is_undeclared_ref(exp)) { - switch (exp.name) { - case "Object": - case "RegExp": - case "Function": - case "Error": - case "Array": - return make_node(AST_Call, self, self).transform(compressor); - } - } - } - return self; - }); - - OPT(AST_Sequence, function(self, compressor) { - if (!compressor.option("side_effects")) return self; - var expressions = []; - filter_for_side_effects(); - var end = expressions.length - 1; - trim_right_for_undefined(); - if (end == 0) { - self = maintain_this_binding(compressor, compressor.parent(), compressor.self(), expressions[0]); - if (!(self instanceof AST_Sequence)) self = self.optimize(compressor); - return self; - } - self.expressions = expressions; - return self; - - function filter_for_side_effects() { - var first = first_in_statement(compressor); - var last = self.expressions.length - 1; - self.expressions.forEach(function(expr, index) { - if (index < last) expr = expr.drop_side_effect_free(compressor, first); - if (expr) { - merge_sequence(expressions, expr); - first = false; - } - }); - } - - function trim_right_for_undefined() { - while (end > 0 && is_undefined(expressions[end], compressor)) end--; - if (end < expressions.length - 1) { - expressions[end] = make_node(AST_UnaryPrefix, self, { - operator : "void", - expression : expressions[end] - }); - expressions.length = end + 1; - } - } - }); - - AST_Unary.DEFMETHOD("lift_sequences", function(compressor) { - if (compressor.option("sequences") && this.expression instanceof AST_Sequence) { - var x = this.expression.expressions.slice(); - var e = this.clone(); - e.expression = x.pop(); - x.push(e); - return make_sequence(this, x).optimize(compressor); - } - return this; - }); - - OPT(AST_UnaryPostfix, function(self, compressor) { - return self.lift_sequences(compressor); - }); - - OPT(AST_UnaryPrefix, function(self, compressor) { - var e = self.expression; - if (compressor.option("evaluate") - && self.operator == "delete" - && !(e instanceof AST_SymbolRef - || e instanceof AST_PropAccess - || is_identifier_atom(e))) { - if (e instanceof AST_Sequence) { - e = e.expressions.slice(); - e.push(make_node(AST_True, self)); - return make_sequence(self, e).optimize(compressor); - } - return make_sequence(self, [ e, make_node(AST_True, self) ]).optimize(compressor); - } - var seq = self.lift_sequences(compressor); - if (seq !== self) { - return seq; - } - if (compressor.option("side_effects") && self.operator == "void") { - e = e.drop_side_effect_free(compressor); - if (e) { - self.expression = e; - return self; - } else { - return make_node(AST_Undefined, self).optimize(compressor); - } - } - if (compressor.option("booleans")) { - if (self.operator == "!" && e.is_truthy()) { - return make_sequence(self, [ e, make_node(AST_False, self) ]).optimize(compressor); - } else if (compressor.in_boolean_context()) switch (self.operator) { - case "!": - if (e instanceof AST_UnaryPrefix && e.operator == "!") { - // !!foo ==> foo, if we're in boolean context - return e.expression; - } - if (e instanceof AST_Binary) { - self = best_of(compressor, self, e.negate(compressor, first_in_statement(compressor))); - } - break; - case "typeof": - // typeof always returns a non-empty string, thus it's - // always true in booleans - AST_Node.warn("Boolean expression always true [{file}:{line},{col}]", self.start); - return (e instanceof AST_SymbolRef ? make_node(AST_True, self) : make_sequence(self, [ - e, - make_node(AST_True, self) - ])).optimize(compressor); - } - } - if (self.operator == "-" && e instanceof AST_Infinity) { - e = e.transform(compressor); - } - if (e instanceof AST_Binary - && (self.operator == "+" || self.operator == "-") - && (e.operator == "*" || e.operator == "/" || e.operator == "%")) { - return make_node(AST_Binary, self, { - operator: e.operator, - left: make_node(AST_UnaryPrefix, e.left, { - operator: self.operator, - expression: e.left - }), - right: e.right - }); - } - // avoids infinite recursion of numerals - if (self.operator != "-" - || !(e instanceof AST_Number || e instanceof AST_Infinity)) { - var ev = self.evaluate(compressor); - if (ev !== self) { - ev = make_node_from_constant(ev, self).optimize(compressor); - return best_of(compressor, ev, self); - } - } - return self; - }); - - AST_Binary.DEFMETHOD("lift_sequences", function(compressor) { - if (compressor.option("sequences")) { - if (this.left instanceof AST_Sequence) { - var x = this.left.expressions.slice(); - var e = this.clone(); - e.left = x.pop(); - x.push(e); - return make_sequence(this, x).optimize(compressor); - } - if (this.right instanceof AST_Sequence && !this.left.has_side_effects(compressor)) { - var assign = this.operator == "=" && this.left instanceof AST_SymbolRef; - var x = this.right.expressions; - var last = x.length - 1; - for (var i = 0; i < last; i++) { - if (!assign && x[i].has_side_effects(compressor)) break; - } - if (i == last) { - x = x.slice(); - var e = this.clone(); - e.right = x.pop(); - x.push(e); - return make_sequence(this, x).optimize(compressor); - } else if (i > 0) { - var e = this.clone(); - e.right = make_sequence(this.right, x.slice(i)); - x = x.slice(0, i); - x.push(e); - return make_sequence(this, x).optimize(compressor); - } - } - } - return this; - }); - - var indexFns = makePredicate("indexOf lastIndexOf"); - var commutativeOperators = makePredicate("== === != !== * & | ^"); - function is_object(node) { - return node instanceof AST_Array - || node instanceof AST_Lambda - || node instanceof AST_Object; - } - - OPT(AST_Binary, function(self, compressor) { - function reversible() { - return self.left.is_constant() - || self.right.is_constant() - || !self.left.has_side_effects(compressor) - && !self.right.has_side_effects(compressor); - } - function reverse(op) { - if (reversible()) { - if (op) self.operator = op; - var tmp = self.left; - self.left = self.right; - self.right = tmp; - } - } - if (commutativeOperators[self.operator] && self.right.is_constant() && !self.left.is_constant()) { - // if right is a constant, whatever side effects the - // left side might have could not influence the - // result. hence, force switch. - if (!(self.left instanceof AST_Binary - && PRECEDENCE[self.left.operator] >= PRECEDENCE[self.operator])) { - reverse(); - } - } - self = self.lift_sequences(compressor); - if (compressor.option("assignments") && lazy_op[self.operator]) { - var assign = self.right; - // a || (a = x) => a = a || x - // a && (a = x) => a = a && x - if (self.left instanceof AST_SymbolRef - && assign instanceof AST_Assign - && assign.operator == "=" - && self.left.equivalent_to(assign.left)) { - self.right = assign.right; - assign.right = self; - return assign; - } - } - if (compressor.option("comparisons")) switch (self.operator) { - case "===": - case "!==": - if (is_undefined(self.left, compressor) && self.right.is_defined(compressor)) { - AST_Node.warn("Expression always defined [{file}:{line},{col}]", self.start); - return make_sequence(self, [ - self.right, - make_node(self.operator == "===" ? AST_False : AST_True, self) - ]).optimize(compressor); - } - var is_strict_comparison = true; - if ((self.left.is_string(compressor) && self.right.is_string(compressor)) || - (self.left.is_number(compressor) && self.right.is_number(compressor)) || - (self.left.is_boolean(compressor) && self.right.is_boolean(compressor)) || - self.left.equivalent_to(self.right)) { - self.operator = self.operator.substr(0, 2); - } - // XXX: intentionally falling down to the next case - case "==": - case "!=": - // void 0 == x => null == x - if (!is_strict_comparison && is_undefined(self.left, compressor)) { - self.left = make_node(AST_Null, self.left); - } - // "undefined" == typeof x => undefined === x - else if (compressor.option("typeofs") - && self.left instanceof AST_String - && self.left.getValue() == "undefined" - && self.right instanceof AST_UnaryPrefix - && self.right.operator == "typeof") { - var expr = self.right.expression; - if (expr instanceof AST_SymbolRef ? expr.is_declared(compressor) - : !(expr instanceof AST_PropAccess && compressor.option("ie8"))) { - self.right = expr; - self.left = make_node(AST_Undefined, self.left).optimize(compressor); - if (self.operator.length == 2) self.operator += "="; - } - } - // obj !== obj => false - else if (self.left instanceof AST_SymbolRef - && self.right instanceof AST_SymbolRef - && self.left.definition() === self.right.definition() - && is_object(self.left.fixed_value())) { - return make_node(self.operator[0] == "=" ? AST_True : AST_False, self); - } - break; - case "&&": - case "||": - // void 0 !== x && null !== x => null != x - // void 0 === x || null === x => null == x - var lhs = self.left; - if (lhs.operator == self.operator) { - lhs = lhs.right; - } - if (lhs instanceof AST_Binary - && lhs.operator == (self.operator == "&&" ? "!==" : "===") - && self.right instanceof AST_Binary - && lhs.operator == self.right.operator - && (is_undefined(lhs.left, compressor) && self.right.left instanceof AST_Null - || lhs.left instanceof AST_Null && is_undefined(self.right.left, compressor)) - && !lhs.right.has_side_effects(compressor) - && lhs.right.equivalent_to(self.right.right)) { - var combined = make_node(AST_Binary, self, { - operator: lhs.operator.slice(0, -1), - left: make_node(AST_Null, self), - right: lhs.right - }); - if (lhs !== self.left) { - combined = make_node(AST_Binary, self, { - operator: self.operator, - left: self.left.left, - right: combined - }); - } - return combined; - } - break; - } - var in_bool = compressor.option("booleans") && compressor.in_boolean_context(); - if (in_bool) switch (self.operator) { - case "+": - var ll = self.left.evaluate(compressor); - var rr = self.right.evaluate(compressor); - if (ll && typeof ll == "string") { - AST_Node.warn("+ in boolean context always true [{file}:{line},{col}]", self.start); - return make_sequence(self, [ - self.right, - make_node(AST_True, self) - ]).optimize(compressor); - } - if (rr && typeof rr == "string") { - AST_Node.warn("+ in boolean context always true [{file}:{line},{col}]", self.start); - return make_sequence(self, [ - self.left, - make_node(AST_True, self) - ]).optimize(compressor); - } - break; - case "==": - if (self.left instanceof AST_String && self.left.getValue() == "" && self.right.is_string(compressor)) { - return make_node(AST_UnaryPrefix, self, { - operator: "!", - expression: self.right - }).optimize(compressor); - } - break; - case "!=": - if (self.left instanceof AST_String && self.left.getValue() == "" && self.right.is_string(compressor)) { - return self.right.optimize(compressor); - } - break; - } - var parent = compressor.parent(); - if (compressor.option("comparisons") && self.is_boolean(compressor)) { - if (!(parent instanceof AST_Binary) || parent instanceof AST_Assign) { - var negated = make_node(AST_UnaryPrefix, self, { - operator: "!", - expression: self.negate(compressor, first_in_statement(compressor)) - }); - self = best_of(compressor, self, negated); - } - switch (self.operator) { - case ">": reverse("<"); break; - case ">=": reverse("<="); break; - } - } - if (self.operator == "+") { - if (self.right instanceof AST_String - && self.right.getValue() == "" - && self.left.is_string(compressor)) { - return self.left.optimize(compressor); - } - if (self.left instanceof AST_String - && self.left.getValue() == "" - && self.right.is_string(compressor)) { - return self.right.optimize(compressor); - } - if (self.left instanceof AST_Binary - && self.left.operator == "+" - && self.left.left instanceof AST_String - && self.left.left.getValue() == "" - && self.right.is_string(compressor)) { - self.left = self.left.right; - return self.optimize(compressor); - } - } - if (compressor.option("evaluate")) { - var associative = true; - switch (self.operator) { - case "&&": - var ll = fuzzy_eval(self.left); - if (!ll) { - AST_Node.warn("Condition left of && always false [{file}:{line},{col}]", self.start); - return maintain_this_binding(compressor, parent, compressor.self(), self.left).optimize(compressor); - } else if (!(ll instanceof AST_Node)) { - AST_Node.warn("Condition left of && always true [{file}:{line},{col}]", self.start); - return make_sequence(self, [ self.left, self.right ]).optimize(compressor); - } - var rr = self.right.evaluate(compressor); - if (!rr) { - if (in_bool) { - AST_Node.warn("Boolean && always false [{file}:{line},{col}]", self.start); - return make_sequence(self, [ - self.left, - make_node(AST_False, self) - ]).optimize(compressor); - } else self.falsy = true; - } else if (!(rr instanceof AST_Node)) { - if (in_bool || parent.operator == "&&" && parent.left === compressor.self()) { - AST_Node.warn("Dropping side-effect-free && [{file}:{line},{col}]", self.start); - return self.left.optimize(compressor); - } - } - // x || false && y ---> x ? y : false - if (self.left.operator == "||") { - var lr = self.left.right.evaluate(compressor); - if (!lr) return make_node(AST_Conditional, self, { - condition: self.left.left, - consequent: self.right, - alternative: self.left.right - }).optimize(compressor); - } - break; - case "||": - var ll = fuzzy_eval(self.left); - if (!ll) { - AST_Node.warn("Condition left of || always false [{file}:{line},{col}]", self.start); - return make_sequence(self, [ self.left, self.right ]).optimize(compressor); - } else if (!(ll instanceof AST_Node)) { - AST_Node.warn("Condition left of || always true [{file}:{line},{col}]", self.start); - return maintain_this_binding(compressor, parent, compressor.self(), self.left).optimize(compressor); - } - var rr = self.right.evaluate(compressor); - if (!rr) { - if (in_bool || parent.operator == "||" && parent.left === compressor.self()) { - AST_Node.warn("Dropping side-effect-free || [{file}:{line},{col}]", self.start); - return self.left.optimize(compressor); - } - } else if (!(rr instanceof AST_Node)) { - if (in_bool) { - AST_Node.warn("Boolean || always true [{file}:{line},{col}]", self.start); - return make_sequence(self, [ - self.left, - make_node(AST_True, self) - ]).optimize(compressor); - } else self.truthy = true; - } - if (self.left.operator == "&&") { - var lr = self.left.right.evaluate(compressor); - if (lr && !(lr instanceof AST_Node)) return make_node(AST_Conditional, self, { - condition: self.left.left, - consequent: self.left.right, - alternative: self.right - }).optimize(compressor); - } - break; - case "+": - // "foo" + ("bar" + x) => "foobar" + x - if (self.left instanceof AST_Constant - && self.right instanceof AST_Binary - && self.right.operator == "+" - && self.right.left instanceof AST_Constant - && self.right.is_string(compressor)) { - self = make_node(AST_Binary, self, { - operator: "+", - left: make_node(AST_String, self.left, { - value: "" + self.left.getValue() + self.right.left.getValue(), - start: self.left.start, - end: self.right.left.end - }), - right: self.right.right - }); - } - // (x + "foo") + "bar" => x + "foobar" - if (self.right instanceof AST_Constant - && self.left instanceof AST_Binary - && self.left.operator == "+" - && self.left.right instanceof AST_Constant - && self.left.is_string(compressor)) { - self = make_node(AST_Binary, self, { - operator: "+", - left: self.left.left, - right: make_node(AST_String, self.right, { - value: "" + self.left.right.getValue() + self.right.getValue(), - start: self.left.right.start, - end: self.right.end - }) - }); - } - // (x + "foo") + ("bar" + y) => (x + "foobar") + y - if (self.left instanceof AST_Binary - && self.left.operator == "+" - && self.left.is_string(compressor) - && self.left.right instanceof AST_Constant - && self.right instanceof AST_Binary - && self.right.operator == "+" - && self.right.left instanceof AST_Constant - && self.right.is_string(compressor)) { - self = make_node(AST_Binary, self, { - operator: "+", - left: make_node(AST_Binary, self.left, { - operator: "+", - left: self.left.left, - right: make_node(AST_String, self.left.right, { - value: "" + self.left.right.getValue() + self.right.left.getValue(), - start: self.left.right.start, - end: self.right.left.end - }) - }), - right: self.right.right - }); - } - // a + -b => a - b - if (self.right instanceof AST_UnaryPrefix - && self.right.operator == "-" - && self.left.is_number(compressor)) { - self = make_node(AST_Binary, self, { - operator: "-", - left: self.left, - right: self.right.expression - }); - break; - } - // -a + b => b - a - if (self.left instanceof AST_UnaryPrefix - && self.left.operator == "-" - && reversible() - && self.right.is_number(compressor)) { - self = make_node(AST_Binary, self, { - operator: "-", - left: self.right, - right: self.left.expression - }); - break; - } - case "-": - // a - -b => a + b - if (self.right instanceof AST_UnaryPrefix - && self.right.operator == "-" - && self.left.is_number(compressor) - && self.right.expression.is_number(compressor)) { - self = make_node(AST_Binary, self, { - operator: "+", - left: self.left, - right: self.right.expression - }); - break; - } - case "*": - case "/": - associative = compressor.option("unsafe_math"); - // +a - b => a - b - // a - +b => a - b - if (self.operator != "+") { - if (self.left instanceof AST_UnaryPrefix && self.left.operator == "+") { - self.left = self.left.expression; - } - if (self.right instanceof AST_UnaryPrefix && self.right.operator == "+") { - self.right = self.right.expression; - } - } - case "&": - case "|": - case "^": - // a + +b => +b + a - if (self.operator != "-" - && self.operator != "/" - && self.left.is_number(compressor) - && self.right.is_number(compressor) - && reversible() - && !(self.left instanceof AST_Binary - && self.left.operator != self.operator - && PRECEDENCE[self.left.operator] >= PRECEDENCE[self.operator])) { - var reversed = make_node(AST_Binary, self, { - operator: self.operator, - left: self.right, - right: self.left - }); - if (self.right instanceof AST_Constant - && !(self.left instanceof AST_Constant)) { - self = best_of(compressor, reversed, self); - } else { - self = best_of(compressor, self, reversed); - } - } - if (!associative || !self.is_number(compressor)) break; - // a + (b + c) => (a + b) + c - if (self.right instanceof AST_Binary - && self.right.operator != "%" - && PRECEDENCE[self.right.operator] == PRECEDENCE[self.operator] - && self.right.is_number(compressor) - && (self.operator != "+" - || self.right.left.is_boolean(compressor) - || self.right.left.is_number(compressor))) { - self = make_node(AST_Binary, self, { - operator: align(self.operator, self.right.operator), - left: make_node(AST_Binary, self.left, { - operator: self.operator, - left: self.left, - right: self.right.left, - start: self.left.start, - end: self.right.left.end - }), - right: self.right.right - }); - if (self.operator == "+" - && !self.right.is_boolean(compressor) - && !self.right.is_number(compressor)) { - self.right = make_node(AST_UnaryPrefix, self.right, { - operator: "+", - expression: self.right - }); - } - } - // (2 * n) * 3 => 6 * n - // (n + 2) + 3 => n + 5 - if (self.right instanceof AST_Constant - && self.left instanceof AST_Binary - && self.left.operator != "%" - && PRECEDENCE[self.left.operator] == PRECEDENCE[self.operator] - && self.left.is_number(compressor)) { - if (self.left.left instanceof AST_Constant - && (self.operator != "+" - || self.left.left.is_boolean(compressor) - || self.left.left.is_number(compressor))) { - self = make_node(AST_Binary, self, { - operator: self.left.operator, - left: make_node(AST_Binary, self.left, { - operator: self.operator, - left: self.left.left, - right: self.right, - start: self.left.left.start, - end: self.right.end - }), - right: self.left.right - }); - } else if (self.left.right instanceof AST_Constant) { - var op = align(self.left.operator, self.operator); - if (op != "+" - || self.left.right.is_boolean(compressor) - || self.left.right.is_number(compressor)) { - self = make_node(AST_Binary, self, { - operator: self.left.operator, - left: self.left.left, - right: make_node(AST_Binary, self.left, { - operator: op, - left: self.left.right, - right: self.right, - start: self.left.right.start, - end: self.right.end - }) - }); - } - } - } - break; - } - } - if (compressor.option("typeofs")) switch (self.operator) { - case "&&": - mark_locally_defined(self.left, self.right, null, "&&"); - break; - case "||": - mark_locally_defined(self.left, null, self.right, "||"); - break; - } - if (compressor.option("unsafe")) { - var indexRight = is_indexFn(self.right); - if (in_bool - && indexRight - && (self.operator == "==" || self.operator == "!=") - && self.left instanceof AST_Number - && self.left.getValue() == 0) { - return (self.operator == "==" ? make_node(AST_UnaryPrefix, self, { - operator: "!", - expression: self.right - }) : self.right).optimize(compressor); - } - var indexLeft = is_indexFn(self.left); - if (compressor.option("comparisons") && is_indexOf_match_pattern()) { - var node = make_node(AST_UnaryPrefix, self, { - operator: "!", - expression: make_node(AST_UnaryPrefix, self, { - operator: "~", - expression: indexLeft ? self.left : self.right - }) - }); - switch (self.operator) { - case "<": - if (indexLeft) break; - case "<=": - case "!=": - node = make_node(AST_UnaryPrefix, self, { - operator: "!", - expression: node - }); - break; - } - return node.optimize(compressor); - } - } - // x && (y && z) ==> x && y && z - // x || (y || z) ==> x || y || z - // x + ("y" + z) ==> x + "y" + z - // "x" + (y + "z")==> "x" + y + "z" - if (self.right instanceof AST_Binary - && self.right.operator == self.operator - && (lazy_op[self.operator] - || (self.operator == "+" - && (self.right.left.is_string(compressor) - || (self.left.is_string(compressor) - && self.right.right.is_string(compressor)))))) - { - self.left = make_node(AST_Binary, self.left, { - operator : self.operator, - left : self.left, - right : self.right.left - }); - self.right = self.right.right; - return self.transform(compressor); - } - var ev = self.evaluate(compressor); - if (ev !== self) { - ev = make_node_from_constant(ev, self).optimize(compressor); - return best_of(compressor, ev, self); - } - return self; - - function align(ref, op) { - switch (ref) { - case "-": - return op == "+" ? "-" : "+"; - case "/": - return op == "*" ? "/" : "*"; - default: - return op; - } - } - - function fuzzy_eval(node) { - if (node.truthy) return true; - if (node.falsy) return false; - if (node.is_truthy()) return true; - return node.evaluate(compressor); - } - - function is_indexFn(node) { - return node instanceof AST_Call - && node.expression instanceof AST_Dot - && indexFns[node.expression.property]; - } - - function is_indexOf_match_pattern() { - switch (self.operator) { - case "<=": - // 0 <= array.indexOf(string) => !!~array.indexOf(string) - return indexRight && self.left instanceof AST_Number && self.left.getValue() == 0; - case "<": - // array.indexOf(string) < 0 => !~array.indexOf(string) - if (indexLeft && self.right instanceof AST_Number && self.right.getValue() == 0) return true; - // -1 < array.indexOf(string) => !!~array.indexOf(string) - case "==": - case "!=": - // -1 == array.indexOf(string) => !~array.indexOf(string) - // -1 != array.indexOf(string) => !!~array.indexOf(string) - if (!indexRight) return false; - return self.left instanceof AST_Number && self.left.getValue() == -1 - || self.left instanceof AST_UnaryPrefix && self.left.operator == "-" - && self.left.expression instanceof AST_Number && self.left.expression.getValue() == 1; - } - } - }); - - function recursive_ref(compressor, def) { - var node; - for (var i = 0; node = compressor.parent(i); i++) { - if (node instanceof AST_Lambda) { - var name = node.name; - if (name && name.definition() === def) break; - } - } - return node; - } - - OPT(AST_SymbolRef, function(self, compressor) { - if (!compressor.option("ie8") - && is_undeclared_ref(self) - // testing against `self.scope.uses_with` is an optimization - && !(self.scope.uses_with && compressor.find_parent(AST_With))) { - switch (self.name) { - case "undefined": - return make_node(AST_Undefined, self).optimize(compressor); - case "NaN": - return make_node(AST_NaN, self).optimize(compressor); - case "Infinity": - return make_node(AST_Infinity, self).optimize(compressor); - } - } - var parent = compressor.parent(); - if (compressor.option("reduce_vars") && is_lhs(compressor.self(), parent) !== compressor.self()) { - var def = self.definition(); - var fixed = self.fixed_value(); - var single_use = def.single_use && !(parent instanceof AST_Call && parent.is_expr_pure(compressor)); - if (single_use && fixed instanceof AST_Lambda) { - if (def.scope !== self.scope - && (!compressor.option("reduce_funcs") || def.escaped.depth == 1 || fixed.inlined)) { - single_use = false; - } else if (recursive_ref(compressor, def)) { - single_use = false; - } else if (def.scope !== self.scope || def.orig[0] instanceof AST_SymbolFunarg) { - single_use = fixed.is_constant_expression(self.scope); - if (single_use == "f") { - var scope = self.scope; - do if (scope instanceof AST_Defun || scope instanceof AST_Function) { - scope.inlined = true; - } while (scope = scope.parent_scope); - } - } - } - if (single_use && fixed) { - def.single_use = false; - fixed._squeezed = true; - fixed.single_use = true; - if (fixed instanceof AST_Defun) { - fixed = make_node(AST_Function, fixed, fixed); - fixed.name = make_node(AST_SymbolLambda, fixed.name, fixed.name); - } - var value; - if (def.recursive_refs > 0) { - value = fixed.clone(true); - var defun_def = value.name.definition(); - var lambda_def = value.variables.get(value.name.name); - var name = lambda_def && lambda_def.orig[0]; - if (!(name instanceof AST_SymbolLambda)) { - name = make_node(AST_SymbolLambda, value.name, value.name); - name.scope = value; - value.name = name; - lambda_def = value.def_function(name); - } - value.walk(new TreeWalker(function(node) { - if (!(node instanceof AST_SymbolRef)) return; - var def = node.definition(); - if (def === defun_def) { - node.thedef = lambda_def; - lambda_def.references.push(node); - } else { - def.single_use = false; - var fn = node.fixed_value(); - if (!(fn instanceof AST_Lambda)) return; - if (!fn.name) return; - var fn_def = fn.name.definition(); - if (fn_def.scope !== fn.name.scope) return; - if (fixed.variables.get(fn.name.name) !== fn_def) return; - fn.name = fn.name.clone(); - var value_def = value.variables.get(fn.name.name) || value.def_function(fn.name); - node.thedef = value_def; - value_def.references.push(node); - } - })); - } else { - value = fixed.optimize(compressor); - } - def.replaced++; - return value; - } - if (fixed && def.should_replace === undefined) { - var init; - if (fixed instanceof AST_This) { - if (!(def.orig[0] instanceof AST_SymbolFunarg) && all(def.references, function(ref) { - return def.scope === ref.scope; - })) { - init = fixed; - } - } else { - var ev = fixed.evaluate(compressor); - if (ev !== fixed && (compressor.option("unsafe_regexp") || !(ev instanceof RegExp))) { - init = make_node_from_constant(ev, fixed); - } - } - if (init) { - var value_length = init.optimize(compressor).print_to_string().length; - var fn; - if (has_symbol_ref(fixed)) { - fn = function() { - var result = init.optimize(compressor); - return result === init ? result.clone(true) : result; - }; - } else { - value_length = Math.min(value_length, fixed.print_to_string().length); - fn = function() { - var result = best_of_expression(init.optimize(compressor), fixed); - return result === init || result === fixed ? result.clone(true) : result; - }; - } - var name_length = def.name.length; - var overhead = 0; - if (compressor.option("unused") && !compressor.exposed(def)) { - overhead = (name_length + 2 + value_length) / (def.references.length - def.assignments); - } - def.should_replace = value_length <= name_length + overhead ? fn : false; - } else { - def.should_replace = false; - } - } - if (def.should_replace) { - var value = def.should_replace(); - def.replaced++; - return value; - } - } - return self; - - function has_symbol_ref(value) { - var found; - value.walk(new TreeWalker(function(node) { - if (node instanceof AST_SymbolRef) found = true; - if (found) return true; - })); - return found; - } - }); - - function is_atomic(lhs, self) { - return lhs instanceof AST_SymbolRef || lhs.TYPE === self.TYPE; - } - - OPT(AST_Undefined, function(self, compressor) { - if (compressor.option("unsafe_undefined")) { - var undef = find_variable(compressor, "undefined"); - if (undef) { - var ref = make_node(AST_SymbolRef, self, { - name : "undefined", - scope : undef.scope, - thedef : undef - }); - ref.is_undefined = true; - return ref; - } - } - var lhs = is_lhs(compressor.self(), compressor.parent()); - if (lhs && is_atomic(lhs, self)) return self; - return make_node(AST_UnaryPrefix, self, { - operator: "void", - expression: make_node(AST_Number, self, { - value: 0 - }) - }); - }); - - OPT(AST_Infinity, function(self, compressor) { - var lhs = is_lhs(compressor.self(), compressor.parent()); - if (lhs && is_atomic(lhs, self)) return self; - if (compressor.option("keep_infinity") - && !(lhs && !is_atomic(lhs, self)) - && !find_variable(compressor, "Infinity")) - return self; - return make_node(AST_Binary, self, { - operator: "/", - left: make_node(AST_Number, self, { - value: 1 - }), - right: make_node(AST_Number, self, { - value: 0 - }) - }); - }); - - OPT(AST_NaN, function(self, compressor) { - var lhs = is_lhs(compressor.self(), compressor.parent()); - if (lhs && !is_atomic(lhs, self) - || find_variable(compressor, "NaN")) { - return make_node(AST_Binary, self, { - operator: "/", - left: make_node(AST_Number, self, { - value: 0 - }), - right: make_node(AST_Number, self, { - value: 0 - }) - }); - } - return self; - }); - - function is_reachable(self, defs) { - var reachable = false; - var find_ref = new TreeWalker(function(node) { - if (reachable) return true; - if (node instanceof AST_SymbolRef && member(node.definition(), defs)) { - return reachable = true; - } - }); - var scan_scope = new TreeWalker(function(node) { - if (reachable) return true; - if (node instanceof AST_Scope && node !== self) { - var parent = scan_scope.parent(); - if (parent instanceof AST_Call && parent.expression === node) return; - node.walk(find_ref); - return true; - } - }); - self.walk(scan_scope); - return reachable; - } - - var ASSIGN_OPS = makePredicate("+ - / * % >> << >>> | ^ &"); - var ASSIGN_OPS_COMMUTATIVE = makePredicate("* | ^ &"); - OPT(AST_Assign, function(self, compressor) { - if (compressor.option("dead_code")) { - if (self.left instanceof AST_PropAccess) { - if (self.operator == "=") { - var exp = self.left.expression; - if (exp instanceof AST_Lambda - || !compressor.has_directive("use strict") - && exp instanceof AST_Constant - && !exp.may_throw_on_access(compressor)) { - return self.left instanceof AST_Dot ? self.right : make_sequence(self, [ - self.left.property, - self.right - ]).optimize(compressor); - } - } - } else if (self.left instanceof AST_SymbolRef) { - var def = self.left.definition(); - if (def.scope === compressor.find_parent(AST_Lambda)) { - if (self.left.is_immutable()) return strip_assignment(); - var level = 0, node, parent = self; - do { - node = parent; - parent = compressor.parent(level++); - if (parent instanceof AST_Exit) { - if (in_try(level, parent)) break; - if (is_reachable(def.scope, [ def ])) break; - def.fixed = false; - return strip_assignment(); - } - } while (parent instanceof AST_Binary && parent.right === node - || parent instanceof AST_Sequence && parent.tail_node() === node - || parent instanceof AST_UnaryPrefix); - } - } - } - self = self.lift_sequences(compressor); - if (!compressor.option("assignments")) return self; - if (self.operator == "=" && self.left instanceof AST_SymbolRef && self.right instanceof AST_Binary) { - // x = expr1 OP expr2 - if (self.right.left instanceof AST_SymbolRef - && self.right.left.name == self.left.name - && ASSIGN_OPS[self.right.operator]) { - // x = x - 2 ---> x -= 2 - self.operator = self.right.operator + "="; - self.right = self.right.right; - } - else if (self.right.right instanceof AST_SymbolRef - && self.right.right.name == self.left.name - && ASSIGN_OPS_COMMUTATIVE[self.right.operator] - && !self.right.left.has_side_effects(compressor)) { - // x = 2 & x ---> x &= 2 - self.operator = self.right.operator + "="; - self.right = self.right.left; - } - } - if ((self.operator == "+=" || self.operator == "-=") - && self.left.is_number(compressor) - && self.right instanceof AST_Number - && self.right.getValue() === 1) { - var op = self.operator.slice(0, -1); - return make_node(AST_UnaryPrefix, self, { - operator: op + op, - expression: self.left - }); - } - return self; - - function in_try(level, node) { - var right = self.right; - self.right = make_node(AST_Null, right); - var may_throw = node.may_throw(compressor); - self.right = right; - var scope = self.left.definition().scope; - var parent; - while ((parent = compressor.parent(level++)) !== scope) { - if (parent instanceof AST_Try) { - if (parent.bfinally) return true; - if (may_throw && parent.bcatch) return true; - } - } - } - - function strip_assignment() { - return (self.operator != "=" ? make_node(AST_Binary, self, { - operator: self.operator.slice(0, -1), - left: self.left, - right: self.right - }) : maintain_this_binding(compressor, compressor.parent(), self, self.right)).optimize(compressor); - } - }); - - OPT(AST_Conditional, function(self, compressor) { - if (!compressor.option("conditionals")) return self; - // This looks like lift_sequences(), should probably be under "sequences" - if (self.condition instanceof AST_Sequence) { - var expressions = self.condition.expressions.slice(); - self.condition = expressions.pop(); - expressions.push(self); - return make_sequence(self, expressions); - } - var cond = self.condition.is_truthy() || self.condition.tail_node().evaluate(compressor); - if (!cond) { - AST_Node.warn("Condition always false [{file}:{line},{col}]", self.start); - return make_sequence(self, [ self.condition, self.alternative ]).optimize(compressor); - } else if (!(cond instanceof AST_Node)) { - AST_Node.warn("Condition always true [{file}:{line},{col}]", self.start); - return make_sequence(self, [ self.condition, self.consequent ]).optimize(compressor); - } - var negated = cond.negate(compressor, first_in_statement(compressor)); - if (best_of(compressor, cond, negated) === negated) { - self = make_node(AST_Conditional, self, { - condition: negated, - consequent: self.alternative, - alternative: self.consequent - }); - } - var condition = self.condition; - var consequent = self.consequent; - var alternative = self.alternative; - // x?x:y --> x||y - if (condition instanceof AST_SymbolRef - && consequent instanceof AST_SymbolRef - && condition.definition() === consequent.definition()) { - return make_node(AST_Binary, self, { - operator: "||", - left: condition, - right: alternative - }); - } - // if (foo) exp = something; else exp = something_else; - // | - // v - // exp = foo ? something : something_else; - var seq_tail = consequent.tail_node(); - if (seq_tail instanceof AST_Assign) { - var is_eq = seq_tail.operator == "="; - var alt_tail = is_eq ? alternative.tail_node() : alternative; - if ((is_eq || consequent === seq_tail) - && alt_tail instanceof AST_Assign - && seq_tail.operator == alt_tail.operator - && seq_tail.left.equivalent_to(alt_tail.left) - && (is_eq && !seq_tail.left.has_side_effects(compressor) - || !condition.has_side_effects(compressor) - && can_shift_lhs_of_tail(consequent) - && can_shift_lhs_of_tail(alternative))) { - return make_node(AST_Assign, self, { - operator: seq_tail.operator, - left: seq_tail.left, - right: make_node(AST_Conditional, self, { - condition: condition, - consequent: pop_lhs(consequent), - alternative: pop_lhs(alternative) - }) - }); - } - } - // x ? y(a) : y(b) --> y(x ? a : b) - var arg_index; - if (consequent instanceof AST_Call - && alternative.TYPE === consequent.TYPE - && consequent.args.length > 0 - && consequent.args.length == alternative.args.length - && consequent.expression.equivalent_to(alternative.expression) - && !condition.has_side_effects(compressor) - && !consequent.expression.has_side_effects(compressor) - && typeof (arg_index = single_arg_diff()) == "number") { - var node = consequent.clone(); - node.args[arg_index] = make_node(AST_Conditional, self, { - condition: condition, - consequent: consequent.args[arg_index], - alternative: alternative.args[arg_index] - }); - return node; - } - // x?y?z:a:a --> x&&y?z:a - if (consequent instanceof AST_Conditional - && consequent.alternative.equivalent_to(alternative)) { - return make_node(AST_Conditional, self, { - condition: make_node(AST_Binary, self, { - left: condition, - operator: "&&", - right: consequent.condition - }), - consequent: consequent.consequent, - alternative: alternative - }); - } - // x ? y : y --> x, y - if (consequent.equivalent_to(alternative)) { - return make_sequence(self, [ - condition, - consequent - ]).optimize(compressor); - } - // x ? (y, w) : (z, w) --> x ? y : z, w - if ((consequent instanceof AST_Sequence || alternative instanceof AST_Sequence) - && consequent.tail_node().equivalent_to(alternative.tail_node())) { - return make_sequence(self, [ - make_node(AST_Conditional, self, { - condition: condition, - consequent: pop_seq(consequent), - alternative: pop_seq(alternative) - }), - consequent.tail_node() - ]).optimize(compressor); - } - // x ? y || z : z --> x && y || z - if (consequent instanceof AST_Binary - && consequent.operator == "||" - && consequent.right.equivalent_to(alternative)) { - return make_node(AST_Binary, self, { - operator: "||", - left: make_node(AST_Binary, self, { - operator: "&&", - left: condition, - right: consequent.left - }), - right: alternative - }).optimize(compressor); - } - var in_bool = compressor.option("booleans") && compressor.in_boolean_context(); - if (is_true(consequent)) { - if (is_false(alternative)) { - // c ? true : false ---> !!c - return booleanize(condition); - } - // c ? true : x ---> !!c || x - return make_node(AST_Binary, self, { - operator: "||", - left: booleanize(condition), - right: alternative - }); - } - if (is_false(consequent)) { - if (is_true(alternative)) { - // c ? false : true ---> !c - return booleanize(condition.negate(compressor)); - } - // c ? false : x ---> !c && x - return make_node(AST_Binary, self, { - operator: "&&", - left: booleanize(condition.negate(compressor)), - right: alternative - }); - } - if (is_true(alternative)) { - // c ? x : true ---> !c || x - return make_node(AST_Binary, self, { - operator: "||", - left: booleanize(condition.negate(compressor)), - right: consequent - }); - } - if (is_false(alternative)) { - // c ? x : false ---> !!c && x - return make_node(AST_Binary, self, { - operator: "&&", - left: booleanize(condition), - right: consequent - }); - } - if (compressor.option("typeofs")) mark_locally_defined(condition, consequent, alternative); - return self; - - function booleanize(node) { - if (node.is_boolean(compressor)) return node; - // !!expression - return make_node(AST_UnaryPrefix, node, { - operator: "!", - expression: node.negate(compressor) - }); - } - - // AST_True or !0 - function is_true(node) { - return node instanceof AST_True - || in_bool - && node instanceof AST_Constant - && node.getValue() - || (node instanceof AST_UnaryPrefix - && node.operator == "!" - && node.expression instanceof AST_Constant - && !node.expression.getValue()); - } - // AST_False or !1 - function is_false(node) { - return node instanceof AST_False - || in_bool - && node instanceof AST_Constant - && !node.getValue() - || (node instanceof AST_UnaryPrefix - && node.operator == "!" - && node.expression instanceof AST_Constant - && node.expression.getValue()); - } - - function single_arg_diff() { - var a = consequent.args; - var b = alternative.args; - for (var i = 0, len = a.length; i < len; i++) { - if (!a[i].equivalent_to(b[i])) { - for (var j = i + 1; j < len; j++) { - if (!a[j].equivalent_to(b[j])) return; - } - return i; - } - } - } - - function can_shift_lhs_of_tail(node) { - if (node === node.tail_node()) return true; - var exprs = node.expressions; - for (var i = exprs.length - 1; --i >= 0;) { - var expr = exprs[i]; - if (!(expr instanceof AST_Assign) && expr.has_side_effects(compressor) - || expr.operator != "=" - || expr.left.has_side_effects(compressor) - || expr.right.has_side_effects(compressor)) return false; - } - return true; - } - - function pop_lhs(node) { - if (!(node instanceof AST_Sequence)) return node.right; - var exprs = node.expressions.slice(); - exprs.push(exprs.pop().right); - return make_sequence(node, exprs); - } - - function pop_seq(node) { - if (!(node instanceof AST_Sequence)) return make_node(AST_Number, node, { - value: 0 - }); - return make_sequence(node, node.expressions.slice(0, -1)); - } - }); - - OPT(AST_Boolean, function(self, compressor) { - if (!compressor.option("booleans")) return self; - if (compressor.in_boolean_context()) return make_node(AST_Number, self, { - value: +self.value - }); - var p = compressor.parent(); - if (p instanceof AST_Binary && (p.operator == "==" || p.operator == "!=")) { - AST_Node.warn("Non-strict equality against boolean: {operator} {value} [{file}:{line},{col}]", { - operator : p.operator, - value : self.value, - file : p.start.file, - line : p.start.line, - col : p.start.col, - }); - return make_node(AST_Number, self, { - value: +self.value - }); - } - return make_node(AST_UnaryPrefix, self, { - operator: "!", - expression: make_node(AST_Number, self, { - value: 1 - self.value - }) - }); - }); - - function safe_to_flatten(value, compressor) { - if (value instanceof AST_SymbolRef) { - value = value.fixed_value(); - } - if (!value) return false; - return !(value instanceof AST_Lambda) - || compressor.parent() instanceof AST_New - || !value.contains_this(); - } - - OPT(AST_Sub, function(self, compressor) { - var expr = self.expression; - var prop = self.property; - if (compressor.option("properties")) { - var key = prop.evaluate(compressor); - if (key !== prop) { - if (typeof key == "string") { - if (key == "undefined") { - key = undefined; - } else { - var value = parseFloat(key); - if (value.toString() == key) { - key = value; - } - } - } - prop = self.property = best_of_expression(prop, make_node_from_constant(key, prop).transform(compressor)); - var property = "" + key; - if (is_identifier_string(property) - && property.length <= prop.print_to_string().length + 1) { - return make_node(AST_Dot, self, { - expression: expr, - property: property - }).optimize(compressor); - } - } - } - var parent = compressor.parent(); - var def, fn, fn_parent; - if (compressor.option("arguments") - && expr instanceof AST_SymbolRef - && is_arguments(def = expr.definition()) - && prop instanceof AST_Number - && (fn = expr.scope) === find_lambda()) { - var index = prop.getValue(); - if (parent instanceof AST_UnaryPrefix && parent.operator == "delete") { - if (!def.deleted) def.deleted = []; - def.deleted[index] = true; - } - var argname = fn.argnames[index]; - if (def.deleted && def.deleted[index]) { - argname = null; - } else if (argname && compressor.has_directive("use strict")) { - var arg_def = argname.definition(); - if (!compressor.option("reduce_vars") - || def.reassigned - || arg_def.assignments - || arg_def.orig.length > 1) { - argname = null; - } - } else if (!argname && index < fn.argnames.length + 5 && compressor.drop_fargs(fn, fn_parent)) { - while (index >= fn.argnames.length) { - argname = make_node(AST_SymbolFunarg, fn, { - name: fn.make_var_name("argument_" + fn.argnames.length), - scope: fn - }); - fn.argnames.push(argname); - fn.enclosed.push(fn.def_variable(argname)); - } - } - if (argname && find_if(function(node) { - return node.name === argname.name; - }, fn.argnames) === argname) { - def.reassigned = false; - var sym = make_node(AST_SymbolRef, self, argname); - sym.reference({}); - delete argname.__unused; - return sym; - } - } - if (is_lhs(compressor.self(), parent)) return self; - if (key !== prop) { - var sub = self.flatten_object(property, compressor); - if (sub) { - expr = self.expression = sub.expression; - prop = self.property = sub.property; - } - } - if (compressor.option("properties") && compressor.option("side_effects") - && prop instanceof AST_Number && expr instanceof AST_Array) { - var index = prop.getValue(); - var elements = expr.elements; - var retValue = elements[index]; - if (safe_to_flatten(retValue, compressor)) { - var flatten = true; - var values = []; - for (var i = elements.length; --i > index;) { - var value = elements[i].drop_side_effect_free(compressor); - if (value) { - values.unshift(value); - if (flatten && value.has_side_effects(compressor)) flatten = false; - } - } - retValue = retValue instanceof AST_Hole ? make_node(AST_Undefined, retValue) : retValue; - if (!flatten) values.unshift(retValue); - while (--i >= 0) { - var value = elements[i].drop_side_effect_free(compressor); - if (value) values.unshift(value); - else index--; - } - if (flatten) { - values.push(retValue); - return make_sequence(self, values).optimize(compressor); - } else return make_node(AST_Sub, self, { - expression: make_node(AST_Array, expr, { - elements: values - }), - property: make_node(AST_Number, prop, { - value: index - }) - }); - } - } - var ev = self.evaluate(compressor); - if (ev !== self) { - ev = make_node_from_constant(ev, self).optimize(compressor); - return best_of(compressor, ev, self); - } - return self; - - function find_lambda() { - var i = 0, p; - while (p = compressor.parent(i++)) { - if (p instanceof AST_Lambda) { - fn_parent = compressor.parent(i); - return p; - } - } - } - }); - - AST_Scope.DEFMETHOD("contains_this", function() { - var result; - var self = this; - self.walk(new TreeWalker(function(node) { - if (result) return true; - if (node instanceof AST_This) return result = true; - if (node !== self && node instanceof AST_Scope) return true; - })); - return result; - }); - - AST_PropAccess.DEFMETHOD("flatten_object", function(key, compressor) { - if (!compressor.option("properties")) return; - var expr = this.expression; - if (expr instanceof AST_Object) { - var props = expr.properties; - for (var i = props.length; --i >= 0;) { - var prop = props[i]; - if ("" + prop.key == key) { - if (!all(props, function(prop) { - return prop instanceof AST_ObjectKeyVal; - })) break; - if (!safe_to_flatten(prop.value, compressor)) break; - return make_node(AST_Sub, this, { - expression: make_node(AST_Array, expr, { - elements: props.map(function(prop) { - return prop.value; - }) - }), - property: make_node(AST_Number, this, { - value: i - }) - }); - } - } - } - }); - - OPT(AST_Dot, function(self, compressor) { - if (self.property == "arguments" || self.property == "caller") { - AST_Node.warn("Function.prototype.{prop} not supported [{file}:{line},{col}]", { - prop: self.property, - file: self.start.file, - line: self.start.line, - col: self.start.col - }); - } - if (is_lhs(compressor.self(), compressor.parent())) return self; - if (compressor.option("unsafe_proto") - && self.expression instanceof AST_Dot - && self.expression.property == "prototype") { - var exp = self.expression.expression; - if (is_undeclared_ref(exp)) switch (exp.name) { - case "Array": - self.expression = make_node(AST_Array, self.expression, { - elements: [] - }); - break; - case "Function": - self.expression = make_node(AST_Function, self.expression, { - argnames: [], - body: [] - }); - break; - case "Number": - self.expression = make_node(AST_Number, self.expression, { - value: 0 - }); - break; - case "Object": - self.expression = make_node(AST_Object, self.expression, { - properties: [] - }); - break; - case "RegExp": - self.expression = make_node(AST_RegExp, self.expression, { - value: /t/ - }); - break; - case "String": - self.expression = make_node(AST_String, self.expression, { - value: "" - }); - break; - } - } - var sub = self.flatten_object(self.property, compressor); - if (sub) return sub.optimize(compressor); - var ev = self.evaluate(compressor); - if (ev !== self) { - ev = make_node_from_constant(ev, self).optimize(compressor); - return best_of(compressor, ev, self); - } - return self; - }); - - OPT(AST_Object, function(self, compressor) { - if (!compressor.option("objects") || compressor.has_directive("use strict")) return self; - var props = self.properties; - var keys = new Dictionary(); - var values = []; - self.properties.forEach(function(prop) { - if (typeof prop.key != "string") { - flush(); - values.push(prop); - return; - } - if (prop.value.has_side_effects(compressor)) { - flush(); - } - keys.add(prop.key, prop.value); - }); - flush(); - if (self.properties.length != values.length) { - return make_node(AST_Object, self, { - properties: values - }); - } - return self; - - function flush() { - keys.each(function(expressions, key) { - values.push(make_node(AST_ObjectKeyVal, self, { - key: key, - value: make_sequence(self, expressions) - })); - }); - keys = new Dictionary(); - } - }); - - OPT(AST_Return, function(self, compressor) { - if (self.value && is_undefined(self.value, compressor)) { - self.value = null; - } - return self; - }); -})(function(node, optimizer) { - node.DEFMETHOD("optimize", function(compressor) { - var self = this; - if (self._optimized) return self; - if (compressor.has_directive("use asm")) return self; - var opt = optimizer(self, compressor); - opt._optimized = true; - return opt; - }); -}); diff --git a/node_modules/uglify-js/lib/minify.js b/node_modules/uglify-js/lib/minify.js deleted file mode 100644 index 93f1295eb..000000000 --- a/node_modules/uglify-js/lib/minify.js +++ /dev/null @@ -1,264 +0,0 @@ -"use strict"; - -var to_ascii, to_base64; -if (typeof Buffer == "undefined") { - to_ascii = atob; - to_base64 = btoa; -} else if (typeof Buffer.alloc == "undefined") { - to_ascii = function(b64) { - return new Buffer(b64, "base64").toString(); - }; - to_base64 = function(str) { - return new Buffer(str).toString("base64"); - }; -} else { - to_ascii = function(b64) { - return Buffer.from(b64, "base64").toString(); - }; - to_base64 = function(str) { - return Buffer.from(str).toString("base64"); - }; -} - -function read_source_map(name, toplevel) { - var comments = toplevel.end.comments_after; - for (var i = comments.length; --i >= 0;) { - var comment = comments[i]; - if (comment.type != "comment1") break; - var match = /^# ([^\s=]+)=(\S+)\s*$/.exec(comment.value); - if (!match) break; - if (match[1] == "sourceMappingURL") { - match = /^data:application\/json(;.*?)?;base64,(\S+)$/.exec(match[2]); - if (!match) break; - return to_ascii(match[2]); - } - } - AST_Node.warn("inline source map not found: " + name); -} - -function parse_source_map(content) { - try { - return JSON.parse(content); - } catch (ex) { - throw new Error("invalid input source map: " + content); - } -} - -function set_shorthand(name, options, keys) { - if (options[name]) { - keys.forEach(function(key) { - if (options[key]) { - if (typeof options[key] != "object") options[key] = {}; - if (!(name in options[key])) options[key][name] = options[name]; - } - }); - } -} - -function init_cache(cache) { - if (!cache) return; - if (!("props" in cache)) { - cache.props = new Dictionary(); - } else if (!(cache.props instanceof Dictionary)) { - cache.props = Dictionary.fromObject(cache.props); - } -} - -function to_json(cache) { - return { - props: cache.props.toObject() - }; -} - -function minify(files, options) { - try { - options = defaults(options, { - compress: {}, - enclose: false, - ie8: false, - keep_fnames: false, - mangle: {}, - nameCache: null, - output: {}, - parse: {}, - rename: undefined, - sourceMap: false, - timings: false, - toplevel: false, - warnings: false, - wrap: false, - }, true); - var timings = options.timings && { - start: Date.now() - }; - if (options.rename === undefined) { - options.rename = options.compress && options.mangle; - } - set_shorthand("ie8", options, [ "compress", "mangle", "output" ]); - set_shorthand("keep_fnames", options, [ "compress", "mangle" ]); - set_shorthand("toplevel", options, [ "compress", "mangle" ]); - var quoted_props; - if (options.mangle) { - options.mangle = defaults(options.mangle, { - cache: options.nameCache && (options.nameCache.vars || {}), - eval: false, - ie8: false, - keep_fnames: false, - properties: false, - reserved: [], - toplevel: false, - }, true); - if (options.mangle.properties) { - if (typeof options.mangle.properties != "object") { - options.mangle.properties = {}; - } - if (options.mangle.properties.keep_quoted) { - quoted_props = options.mangle.properties.reserved; - if (!Array.isArray(quoted_props)) quoted_props = []; - options.mangle.properties.reserved = quoted_props; - } - if (options.nameCache && !("cache" in options.mangle.properties)) { - options.mangle.properties.cache = options.nameCache.props || {}; - } - } - init_cache(options.mangle.cache); - init_cache(options.mangle.properties.cache); - } - if (options.sourceMap) { - options.sourceMap = defaults(options.sourceMap, { - content: null, - filename: null, - includeSources: false, - root: null, - url: null, - }, true); - } - var warnings = []; - if (options.warnings) AST_Node.log_function(function(warning) { - warnings.push(warning); - }, options.warnings == "verbose"); - if (timings) timings.parse = Date.now(); - var source_maps, toplevel; - if (files instanceof AST_Toplevel) { - toplevel = files; - } else { - if (typeof files == "string") { - files = [ files ]; - } - options.parse = options.parse || {}; - options.parse.toplevel = null; - var source_map_content = options.sourceMap && options.sourceMap.content; - if (typeof source_map_content == "string" && source_map_content != "inline") { - source_map_content = parse_source_map(source_map_content); - } - source_maps = source_map_content && Object.create(null); - for (var name in files) if (HOP(files, name)) { - options.parse.filename = name; - options.parse.toplevel = toplevel = parse(files[name], options.parse); - if (source_maps) { - if (source_map_content == "inline") { - var inlined_content = read_source_map(name, toplevel); - if (inlined_content) { - source_maps[name] = parse_source_map(inlined_content); - } - } else { - source_maps[name] = source_map_content; - } - } - } - } - if (quoted_props) { - reserve_quoted_keys(toplevel, quoted_props); - } - [ "enclose", "wrap" ].forEach(function(action) { - var option = options[action]; - if (!option) return; - var orig = toplevel.print_to_string().slice(0, -1); - toplevel = toplevel[action](option); - files[toplevel.start.file] = toplevel.print_to_string().replace(orig, ""); - }); - if (timings) timings.rename = Date.now(); - if (options.rename) { - toplevel.figure_out_scope(options.mangle); - toplevel.expand_names(options.mangle); - } - if (timings) timings.compress = Date.now(); - if (options.compress) toplevel = new Compressor(options.compress).compress(toplevel); - if (timings) timings.scope = Date.now(); - if (options.mangle) toplevel.figure_out_scope(options.mangle); - if (timings) timings.mangle = Date.now(); - if (options.mangle) { - toplevel.compute_char_frequency(options.mangle); - toplevel.mangle_names(options.mangle); - } - if (timings) timings.properties = Date.now(); - if (options.mangle && options.mangle.properties) { - toplevel = mangle_properties(toplevel, options.mangle.properties); - } - if (timings) timings.output = Date.now(); - var result = {}; - if (options.output.ast) { - result.ast = toplevel; - } - if (!HOP(options.output, "code") || options.output.code) { - if (options.sourceMap) { - options.output.source_map = SourceMap({ - file: options.sourceMap.filename, - orig: source_maps, - root: options.sourceMap.root - }); - if (options.sourceMap.includeSources) { - if (files instanceof AST_Toplevel) { - throw new Error("original source content unavailable"); - } else for (var name in files) if (HOP(files, name)) { - options.output.source_map.get().setSourceContent(name, files[name]); - } - } else { - options.output.source_map.get()._sourcesContents = null; - } - } - delete options.output.ast; - delete options.output.code; - var stream = OutputStream(options.output); - toplevel.print(stream); - result.code = stream.get(); - if (options.sourceMap) { - result.map = options.output.source_map.toString(); - var url = options.sourceMap.url; - if (url) { - result.code = result.code.replace(/\n\/\/# sourceMappingURL=\S+\s*$/, ""); - if (url == "inline") { - result.code += "\n//# sourceMappingURL=data:application/json;charset=utf-8;base64," + to_base64(result.map); - } else { - result.code += "\n//# sourceMappingURL=" + url; - } - } - } - } - if (options.nameCache && options.mangle) { - if (options.mangle.cache) options.nameCache.vars = to_json(options.mangle.cache); - if (options.mangle.properties && options.mangle.properties.cache) { - options.nameCache.props = to_json(options.mangle.properties.cache); - } - } - if (timings) { - timings.end = Date.now(); - result.timings = { - parse: 1e-3 * (timings.rename - timings.parse), - rename: 1e-3 * (timings.compress - timings.rename), - compress: 1e-3 * (timings.scope - timings.compress), - scope: 1e-3 * (timings.mangle - timings.scope), - mangle: 1e-3 * (timings.properties - timings.mangle), - properties: 1e-3 * (timings.output - timings.properties), - output: 1e-3 * (timings.end - timings.output), - total: 1e-3 * (timings.end - timings.start) - } - } - if (warnings.length) { - result.warnings = warnings; - } - return result; - } catch (ex) { - return { error: ex }; - } -} diff --git a/node_modules/uglify-js/lib/mozilla-ast.js b/node_modules/uglify-js/lib/mozilla-ast.js deleted file mode 100644 index b6fb29bf9..000000000 --- a/node_modules/uglify-js/lib/mozilla-ast.js +++ /dev/null @@ -1,629 +0,0 @@ -/*********************************************************************** - - A JavaScript tokenizer / parser / beautifier / compressor. - https://github.com/mishoo/UglifyJS2 - - -------------------------------- (C) --------------------------------- - - Author: Mihai Bazon - - http://mihai.bazon.net/blog - - Distributed under the BSD license: - - Copyright 2012 (c) Mihai Bazon - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions - are met: - - * Redistributions of source code must retain the above - copyright notice, this list of conditions and the following - disclaimer. - - * Redistributions in binary form must reproduce the above - copyright notice, this list of conditions and the following - disclaimer in the documentation and/or other materials - provided with the distribution. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER “AS IS” AND ANY - EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER BE - LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, - OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR - TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF - THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - SUCH DAMAGE. - - ***********************************************************************/ - -"use strict"; - -(function() { - function normalize_directives(body) { - var in_directive = true; - for (var i = 0; i < body.length; i++) { - if (in_directive && body[i] instanceof AST_Statement && body[i].body instanceof AST_String) { - body[i] = new AST_Directive({ - start: body[i].start, - end: body[i].end, - value: body[i].body.value - }); - } else if (in_directive && !(body[i] instanceof AST_Statement && body[i].body instanceof AST_String)) { - in_directive = false; - } - } - return body; - } - - var MOZ_TO_ME = { - Program: function(M) { - return new AST_Toplevel({ - start: my_start_token(M), - end: my_end_token(M), - body: normalize_directives(M.body.map(from_moz)) - }); - }, - FunctionDeclaration: function(M) { - return new AST_Defun({ - start: my_start_token(M), - end: my_end_token(M), - name: from_moz(M.id), - argnames: M.params.map(from_moz), - body: normalize_directives(from_moz(M.body).body) - }); - }, - FunctionExpression: function(M) { - return new AST_Function({ - start: my_start_token(M), - end: my_end_token(M), - name: from_moz(M.id), - argnames: M.params.map(from_moz), - body: normalize_directives(from_moz(M.body).body) - }); - }, - ExpressionStatement: function(M) { - return new AST_SimpleStatement({ - start: my_start_token(M), - end: my_end_token(M), - body: from_moz(M.expression) - }); - }, - TryStatement: function(M) { - var handlers = M.handlers || [M.handler]; - if (handlers.length > 1 || M.guardedHandlers && M.guardedHandlers.length) { - throw new Error("Multiple catch clauses are not supported."); - } - return new AST_Try({ - start : my_start_token(M), - end : my_end_token(M), - body : from_moz(M.block).body, - bcatch : from_moz(handlers[0]), - bfinally : M.finalizer ? new AST_Finally(from_moz(M.finalizer)) : null - }); - }, - Property: function(M) { - var key = M.key; - var args = { - start : my_start_token(key), - end : my_end_token(M.value), - key : key.type == "Identifier" ? key.name : key.value, - value : from_moz(M.value) - }; - if (M.kind == "init") return new AST_ObjectKeyVal(args); - args.key = new AST_SymbolAccessor({ - name: args.key - }); - args.value = new AST_Accessor(args.value); - if (M.kind == "get") return new AST_ObjectGetter(args); - if (M.kind == "set") return new AST_ObjectSetter(args); - }, - ArrayExpression: function(M) { - return new AST_Array({ - start : my_start_token(M), - end : my_end_token(M), - elements : M.elements.map(function(elem) { - return elem === null ? new AST_Hole() : from_moz(elem); - }) - }); - }, - ObjectExpression: function(M) { - return new AST_Object({ - start : my_start_token(M), - end : my_end_token(M), - properties : M.properties.map(function(prop) { - prop.type = "Property"; - return from_moz(prop) - }) - }); - }, - SequenceExpression: function(M) { - return new AST_Sequence({ - start : my_start_token(M), - end : my_end_token(M), - expressions: M.expressions.map(from_moz) - }); - }, - MemberExpression: function(M) { - return new (M.computed ? AST_Sub : AST_Dot)({ - start : my_start_token(M), - end : my_end_token(M), - property : M.computed ? from_moz(M.property) : M.property.name, - expression : from_moz(M.object) - }); - }, - SwitchCase: function(M) { - return new (M.test ? AST_Case : AST_Default)({ - start : my_start_token(M), - end : my_end_token(M), - expression : from_moz(M.test), - body : M.consequent.map(from_moz) - }); - }, - VariableDeclaration: function(M) { - return new AST_Var({ - start : my_start_token(M), - end : my_end_token(M), - definitions : M.declarations.map(from_moz) - }); - }, - Literal: function(M) { - var val = M.value, args = { - start : my_start_token(M), - end : my_end_token(M) - }; - if (val === null) return new AST_Null(args); - var rx = M.regex; - if (rx && rx.pattern) { - // RegExpLiteral as per ESTree AST spec - args.value = new RegExp(rx.pattern, rx.flags); - args.value.raw_source = rx.pattern; - return new AST_RegExp(args); - } else if (rx) { - // support legacy RegExp - args.value = M.regex && M.raw ? M.raw : val; - return new AST_RegExp(args); - } - switch (typeof val) { - case "string": - args.value = val; - return new AST_String(args); - case "number": - args.value = val; - return new AST_Number(args); - case "boolean": - return new (val ? AST_True : AST_False)(args); - } - }, - Identifier: function(M) { - var p = FROM_MOZ_STACK[FROM_MOZ_STACK.length - 2]; - return new ( p.type == "LabeledStatement" ? AST_Label - : p.type == "VariableDeclarator" && p.id === M ? AST_SymbolVar - : p.type == "FunctionExpression" ? (p.id === M ? AST_SymbolLambda : AST_SymbolFunarg) - : p.type == "FunctionDeclaration" ? (p.id === M ? AST_SymbolDefun : AST_SymbolFunarg) - : p.type == "CatchClause" ? AST_SymbolCatch - : p.type == "BreakStatement" || p.type == "ContinueStatement" ? AST_LabelRef - : AST_SymbolRef)({ - start : my_start_token(M), - end : my_end_token(M), - name : M.name - }); - } - }; - - MOZ_TO_ME.UpdateExpression = - MOZ_TO_ME.UnaryExpression = function To_Moz_Unary(M) { - var prefix = "prefix" in M ? M.prefix - : M.type == "UnaryExpression" ? true : false; - return new (prefix ? AST_UnaryPrefix : AST_UnaryPostfix)({ - start : my_start_token(M), - end : my_end_token(M), - operator : M.operator, - expression : from_moz(M.argument) - }); - }; - - map("EmptyStatement", AST_EmptyStatement); - map("BlockStatement", AST_BlockStatement, "body@body"); - map("IfStatement", AST_If, "test>condition, consequent>body, alternate>alternative"); - map("LabeledStatement", AST_LabeledStatement, "label>label, body>body"); - map("BreakStatement", AST_Break, "label>label"); - map("ContinueStatement", AST_Continue, "label>label"); - map("WithStatement", AST_With, "object>expression, body>body"); - map("SwitchStatement", AST_Switch, "discriminant>expression, cases@body"); - map("ReturnStatement", AST_Return, "argument>value"); - map("ThrowStatement", AST_Throw, "argument>value"); - map("WhileStatement", AST_While, "test>condition, body>body"); - map("DoWhileStatement", AST_Do, "test>condition, body>body"); - map("ForStatement", AST_For, "init>init, test>condition, update>step, body>body"); - map("ForInStatement", AST_ForIn, "left>init, right>object, body>body"); - map("DebuggerStatement", AST_Debugger); - map("VariableDeclarator", AST_VarDef, "id>name, init>value"); - map("CatchClause", AST_Catch, "param>argname, body%body"); - - map("ThisExpression", AST_This); - map("BinaryExpression", AST_Binary, "operator=operator, left>left, right>right"); - map("LogicalExpression", AST_Binary, "operator=operator, left>left, right>right"); - map("AssignmentExpression", AST_Assign, "operator=operator, left>left, right>right"); - map("ConditionalExpression", AST_Conditional, "test>condition, consequent>consequent, alternate>alternative"); - map("NewExpression", AST_New, "callee>expression, arguments@args"); - map("CallExpression", AST_Call, "callee>expression, arguments@args"); - - def_to_moz(AST_Toplevel, function To_Moz_Program(M) { - return to_moz_scope("Program", M); - }); - - def_to_moz(AST_Defun, function To_Moz_FunctionDeclaration(M) { - return { - type: "FunctionDeclaration", - id: to_moz(M.name), - params: M.argnames.map(to_moz), - body: to_moz_scope("BlockStatement", M) - } - }); - - def_to_moz(AST_Function, function To_Moz_FunctionExpression(M) { - return { - type: "FunctionExpression", - id: to_moz(M.name), - params: M.argnames.map(to_moz), - body: to_moz_scope("BlockStatement", M) - } - }); - - def_to_moz(AST_Directive, function To_Moz_Directive(M) { - return { - type: "ExpressionStatement", - expression: { - type: "Literal", - value: M.value - } - }; - }); - - def_to_moz(AST_SimpleStatement, function To_Moz_ExpressionStatement(M) { - return { - type: "ExpressionStatement", - expression: to_moz(M.body) - }; - }); - - def_to_moz(AST_SwitchBranch, function To_Moz_SwitchCase(M) { - return { - type: "SwitchCase", - test: to_moz(M.expression), - consequent: M.body.map(to_moz) - }; - }); - - def_to_moz(AST_Try, function To_Moz_TryStatement(M) { - return { - type: "TryStatement", - block: to_moz_block(M), - handler: to_moz(M.bcatch), - guardedHandlers: [], - finalizer: to_moz(M.bfinally) - }; - }); - - def_to_moz(AST_Catch, function To_Moz_CatchClause(M) { - return { - type: "CatchClause", - param: to_moz(M.argname), - guard: null, - body: to_moz_block(M) - }; - }); - - def_to_moz(AST_Definitions, function To_Moz_VariableDeclaration(M) { - return { - type: "VariableDeclaration", - kind: "var", - declarations: M.definitions.map(to_moz) - }; - }); - - def_to_moz(AST_Sequence, function To_Moz_SequenceExpression(M) { - return { - type: "SequenceExpression", - expressions: M.expressions.map(to_moz) - }; - }); - - def_to_moz(AST_PropAccess, function To_Moz_MemberExpression(M) { - var isComputed = M instanceof AST_Sub; - return { - type: "MemberExpression", - object: to_moz(M.expression), - computed: isComputed, - property: isComputed ? to_moz(M.property) : {type: "Identifier", name: M.property} - }; - }); - - def_to_moz(AST_Unary, function To_Moz_Unary(M) { - return { - type: M.operator == "++" || M.operator == "--" ? "UpdateExpression" : "UnaryExpression", - operator: M.operator, - prefix: M instanceof AST_UnaryPrefix, - argument: to_moz(M.expression) - }; - }); - - def_to_moz(AST_Binary, function To_Moz_BinaryExpression(M) { - return { - type: M.operator == "&&" || M.operator == "||" ? "LogicalExpression" : "BinaryExpression", - left: to_moz(M.left), - operator: M.operator, - right: to_moz(M.right) - }; - }); - - def_to_moz(AST_Array, function To_Moz_ArrayExpression(M) { - return { - type: "ArrayExpression", - elements: M.elements.map(to_moz) - }; - }); - - def_to_moz(AST_Object, function To_Moz_ObjectExpression(M) { - return { - type: "ObjectExpression", - properties: M.properties.map(to_moz) - }; - }); - - def_to_moz(AST_ObjectProperty, function To_Moz_Property(M) { - var key = { - type: "Literal", - value: M.key instanceof AST_SymbolAccessor ? M.key.name : M.key - }; - var kind; - if (M instanceof AST_ObjectKeyVal) { - kind = "init"; - } else - if (M instanceof AST_ObjectGetter) { - kind = "get"; - } else - if (M instanceof AST_ObjectSetter) { - kind = "set"; - } - return { - type: "Property", - kind: kind, - key: key, - value: to_moz(M.value) - }; - }); - - def_to_moz(AST_Symbol, function To_Moz_Identifier(M) { - var def = M.definition(); - return { - type: "Identifier", - name: def && def.mangled_name || M.name - }; - }); - - def_to_moz(AST_RegExp, function To_Moz_RegExpLiteral(M) { - var flags = M.value.toString().match(/[gimuy]*$/)[0]; - var value = "/" + M.value.raw_source + "/" + flags; - return { - type: "Literal", - value: value, - raw: value, - regex: { - pattern: M.value.raw_source, - flags: flags - } - }; - }); - - def_to_moz(AST_Constant, function To_Moz_Literal(M) { - var value = M.value; - if (typeof value === 'number' && (value < 0 || (value === 0 && 1 / value < 0))) { - return { - type: "UnaryExpression", - operator: "-", - prefix: true, - argument: { - type: "Literal", - value: -value, - raw: M.start.raw - } - }; - } - return { - type: "Literal", - value: value, - raw: M.start.raw - }; - }); - - def_to_moz(AST_Atom, function To_Moz_Atom(M) { - return { - type: "Identifier", - name: String(M.value) - }; - }); - - AST_Boolean.DEFMETHOD("to_mozilla_ast", AST_Constant.prototype.to_mozilla_ast); - AST_Null.DEFMETHOD("to_mozilla_ast", AST_Constant.prototype.to_mozilla_ast); - AST_Hole.DEFMETHOD("to_mozilla_ast", function To_Moz_ArrayHole() { return null }); - - AST_Block.DEFMETHOD("to_mozilla_ast", AST_BlockStatement.prototype.to_mozilla_ast); - AST_Lambda.DEFMETHOD("to_mozilla_ast", AST_Function.prototype.to_mozilla_ast); - - /* -----[ tools ]----- */ - - function raw_token(moznode) { - if (moznode.type == "Literal") { - return moznode.raw != null ? moznode.raw : moznode.value + ""; - } - } - - function my_start_token(moznode) { - var loc = moznode.loc, start = loc && loc.start; - var range = moznode.range; - return new AST_Token({ - file : loc && loc.source, - line : start && start.line, - col : start && start.column, - pos : range ? range[0] : moznode.start, - endline : start && start.line, - endcol : start && start.column, - endpos : range ? range[0] : moznode.start, - raw : raw_token(moznode), - }); - } - - function my_end_token(moznode) { - var loc = moznode.loc, end = loc && loc.end; - var range = moznode.range; - return new AST_Token({ - file : loc && loc.source, - line : end && end.line, - col : end && end.column, - pos : range ? range[1] : moznode.end, - endline : end && end.line, - endcol : end && end.column, - endpos : range ? range[1] : moznode.end, - raw : raw_token(moznode), - }); - } - - function map(moztype, mytype, propmap) { - var moz_to_me = "function From_Moz_" + moztype + "(M){\n"; - moz_to_me += "return new U2." + mytype.name + "({\n" + - "start: my_start_token(M),\n" + - "end: my_end_token(M)"; - - var me_to_moz = "function To_Moz_" + moztype + "(M){\n"; - me_to_moz += "return {\n" + - "type: " + JSON.stringify(moztype); - - if (propmap) propmap.split(/\s*,\s*/).forEach(function(prop) { - var m = /([a-z0-9$_]+)(=|@|>|%)([a-z0-9$_]+)/i.exec(prop); - if (!m) throw new Error("Can't understand property map: " + prop); - var moz = m[1], how = m[2], my = m[3]; - moz_to_me += ",\n" + my + ": "; - me_to_moz += ",\n" + moz + ": "; - switch (how) { - case "@": - moz_to_me += "M." + moz + ".map(from_moz)"; - me_to_moz += "M." + my + ".map(to_moz)"; - break; - case ">": - moz_to_me += "from_moz(M." + moz + ")"; - me_to_moz += "to_moz(M." + my + ")"; - break; - case "=": - moz_to_me += "M." + moz; - me_to_moz += "M." + my; - break; - case "%": - moz_to_me += "from_moz(M." + moz + ").body"; - me_to_moz += "to_moz_block(M)"; - break; - default: - throw new Error("Can't understand operator in propmap: " + prop); - } - }); - - moz_to_me += "\n})\n}"; - me_to_moz += "\n}\n}"; - - //moz_to_me = parse(moz_to_me).print_to_string({ beautify: true }); - //me_to_moz = parse(me_to_moz).print_to_string({ beautify: true }); - //console.log(moz_to_me); - - moz_to_me = new Function("U2", "my_start_token", "my_end_token", "from_moz", "return(" + moz_to_me + ")")( - exports, my_start_token, my_end_token, from_moz - ); - me_to_moz = new Function("to_moz", "to_moz_block", "to_moz_scope", "return(" + me_to_moz + ")")( - to_moz, to_moz_block, to_moz_scope - ); - MOZ_TO_ME[moztype] = moz_to_me; - def_to_moz(mytype, me_to_moz); - } - - var FROM_MOZ_STACK = null; - - function from_moz(node) { - FROM_MOZ_STACK.push(node); - var ret = node != null ? MOZ_TO_ME[node.type](node) : null; - FROM_MOZ_STACK.pop(); - return ret; - } - - AST_Node.from_mozilla_ast = function(node) { - var save_stack = FROM_MOZ_STACK; - FROM_MOZ_STACK = []; - var ast = from_moz(node); - FROM_MOZ_STACK = save_stack; - ast.walk(new TreeWalker(function(node) { - if (node instanceof AST_LabelRef) { - for (var level = 0, parent; parent = this.parent(level); level++) { - if (parent instanceof AST_Scope) break; - if (parent instanceof AST_LabeledStatement && parent.label.name == node.name) { - node.thedef = parent.label; - break; - } - } - if (!node.thedef) { - var s = node.start; - js_error("Undefined label " + node.name, s.file, s.line, s.col, s.pos); - } - } - })); - return ast; - }; - - function set_moz_loc(mynode, moznode, myparent) { - var start = mynode.start; - var end = mynode.end; - if (start.pos != null && end.endpos != null) { - moznode.range = [start.pos, end.endpos]; - } - if (start.line) { - moznode.loc = { - start: {line: start.line, column: start.col}, - end: end.endline ? {line: end.endline, column: end.endcol} : null - }; - if (start.file) { - moznode.loc.source = start.file; - } - } - return moznode; - } - - function def_to_moz(mytype, handler) { - mytype.DEFMETHOD("to_mozilla_ast", function() { - return set_moz_loc(this, handler(this)); - }); - } - - function to_moz(node) { - return node != null ? node.to_mozilla_ast() : null; - } - - function to_moz_block(node) { - return { - type: "BlockStatement", - body: node.body.map(to_moz) - }; - } - - function to_moz_scope(type, node) { - var body = node.body.map(to_moz); - if (node.body[0] instanceof AST_SimpleStatement && node.body[0].body instanceof AST_String) { - body.unshift(to_moz(new AST_EmptyStatement(node.body[0]))); - } - return { - type: type, - body: body - }; - } -})(); diff --git a/node_modules/uglify-js/lib/output.js b/node_modules/uglify-js/lib/output.js deleted file mode 100644 index d59176c31..000000000 --- a/node_modules/uglify-js/lib/output.js +++ /dev/null @@ -1,1522 +0,0 @@ -/*********************************************************************** - - A JavaScript tokenizer / parser / beautifier / compressor. - https://github.com/mishoo/UglifyJS2 - - -------------------------------- (C) --------------------------------- - - Author: Mihai Bazon - - http://mihai.bazon.net/blog - - Distributed under the BSD license: - - Copyright 2012 (c) Mihai Bazon - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions - are met: - - * Redistributions of source code must retain the above - copyright notice, this list of conditions and the following - disclaimer. - - * Redistributions in binary form must reproduce the above - copyright notice, this list of conditions and the following - disclaimer in the documentation and/or other materials - provided with the distribution. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER “AS IS” AND ANY - EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER BE - LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, - OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR - TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF - THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - SUCH DAMAGE. - - ***********************************************************************/ - -"use strict"; - -var EXPECT_DIRECTIVE = /^$|[;{][\s\n]*$/; - -function is_some_comments(comment) { - // multiline comment - return comment.type == "comment2" && /@preserve|@license|@cc_on/i.test(comment.value); -} - -function OutputStream(options) { - - var readonly = !options; - options = defaults(options, { - ascii_only : false, - beautify : false, - braces : false, - comments : false, - ie8 : false, - indent_level : 4, - indent_start : 0, - inline_script : true, - keep_quoted_props: false, - max_line_len : false, - preamble : null, - preserve_line : false, - quote_keys : false, - quote_style : 0, - semicolons : true, - shebang : true, - source_map : null, - webkit : false, - width : 80, - wrap_iife : false, - }, true); - - // Convert comment option to RegExp if neccessary and set up comments filter - var comment_filter = return_false; // Default case, throw all comments away - if (options.comments) { - var comments = options.comments; - if (typeof options.comments === "string" && /^\/.*\/[a-zA-Z]*$/.test(options.comments)) { - var regex_pos = options.comments.lastIndexOf("/"); - comments = new RegExp( - options.comments.substr(1, regex_pos - 1), - options.comments.substr(regex_pos + 1) - ); - } - if (comments instanceof RegExp) { - comment_filter = function(comment) { - return comment.type != "comment5" && comments.test(comment.value); - }; - } else if (typeof comments === "function") { - comment_filter = function(comment) { - return comment.type != "comment5" && comments(this, comment); - }; - } else if (comments === "some") { - comment_filter = is_some_comments; - } else { // NOTE includes "all" option - comment_filter = return_true; - } - } - - var indentation = 0; - var current_col = 0; - var current_line = 1; - var current_pos = 0; - var OUTPUT = ""; - - var to_utf8 = options.ascii_only ? function(str, identifier) { - return str.replace(/[\u0000-\u001f\u007f-\uffff]/g, function(ch) { - var code = ch.charCodeAt(0).toString(16); - if (code.length <= 2 && !identifier) { - while (code.length < 2) code = "0" + code; - return "\\x" + code; - } else { - while (code.length < 4) code = "0" + code; - return "\\u" + code; - } - }); - } : function(str) { - var s = ""; - for (var i = 0; i < str.length; i++) { - if (is_surrogate_pair_head(str[i]) && !is_surrogate_pair_tail(str[i + 1]) - || is_surrogate_pair_tail(str[i]) && !is_surrogate_pair_head(str[i - 1])) { - s += "\\u" + str.charCodeAt(i).toString(16); - } else { - s += str[i]; - } - } - return s; - }; - - function make_string(str, quote) { - var dq = 0, sq = 0; - str = str.replace(/[\\\b\f\n\r\v\t\x22\x27\u2028\u2029\0\ufeff]/g, function(s, i) { - switch (s) { - case '"': ++dq; return '"'; - case "'": ++sq; return "'"; - case "\\": return "\\\\"; - case "\n": return "\\n"; - case "\r": return "\\r"; - case "\t": return "\\t"; - case "\b": return "\\b"; - case "\f": return "\\f"; - case "\x0B": return options.ie8 ? "\\x0B" : "\\v"; - case "\u2028": return "\\u2028"; - case "\u2029": return "\\u2029"; - case "\ufeff": return "\\ufeff"; - case "\0": - return /[0-9]/.test(str.charAt(i+1)) ? "\\x00" : "\\0"; - } - return s; - }); - function quote_single() { - return "'" + str.replace(/\x27/g, "\\'") + "'"; - } - function quote_double() { - return '"' + str.replace(/\x22/g, '\\"') + '"'; - } - str = to_utf8(str); - switch (options.quote_style) { - case 1: - return quote_single(); - case 2: - return quote_double(); - case 3: - return quote == "'" ? quote_single() : quote_double(); - default: - return dq > sq ? quote_single() : quote_double(); - } - } - - function encode_string(str, quote) { - var ret = make_string(str, quote); - if (options.inline_script) { - ret = ret.replace(/<\x2f(script)([>\/\t\n\f\r ])/gi, "<\\/$1$2"); - ret = ret.replace(/\x3c!--/g, "\\x3c!--"); - ret = ret.replace(/--\x3e/g, "--\\x3e"); - } - return ret; - } - - function make_name(name) { - name = name.toString(); - name = to_utf8(name, true); - return name; - } - - function make_indent(back) { - return repeat_string(" ", options.indent_start + indentation - back * options.indent_level); - } - - /* -----[ beautification/minification ]----- */ - - var has_parens = false; - var line_end = 0; - var line_fixed = true; - var might_need_space = false; - var might_need_semicolon = false; - var need_newline_indented = false; - var need_space = false; - var newline_insert = -1; - var last = ""; - var mapping_token, mapping_name, mappings = options.source_map && []; - - var adjust_mappings = mappings ? function(line, col) { - mappings.forEach(function(mapping) { - mapping.line += line; - mapping.col += col; - }); - } : noop; - - var flush_mappings = mappings ? function() { - mappings.forEach(function(mapping) { - options.source_map.add( - mapping.token.file, - mapping.line, mapping.col, - mapping.token.line, mapping.token.col, - !mapping.name && mapping.token.type == "name" ? mapping.token.value : mapping.name - ); - }); - mappings = []; - } : noop; - - function insert_newlines(count) { - var index = OUTPUT.lastIndexOf("\n"); - if (line_end < index) line_end = index; - var left = OUTPUT.slice(0, line_end); - var right = OUTPUT.slice(line_end); - adjust_mappings(count, right.length - current_col); - current_line += count; - current_pos += count; - current_col = right.length; - OUTPUT = left; - while (count--) OUTPUT += "\n"; - OUTPUT += right; - } - - var fix_line = options.max_line_len ? function() { - if (line_fixed) { - if (current_col > options.max_line_len) { - AST_Node.warn("Output exceeds {max_line_len} characters", options); - } - return; - } - if (current_col > options.max_line_len) insert_newlines(1); - line_fixed = true; - flush_mappings(); - } : noop; - - var requireSemicolonChars = makePredicate("( [ + * / - , ."); - - function print(str) { - str = String(str); - var ch = str.charAt(0); - if (need_newline_indented && ch) { - need_newline_indented = false; - if (ch != "\n") { - print("\n"); - indent(); - } - } - if (need_space && ch) { - need_space = false; - if (!/[\s;})]/.test(ch)) { - space(); - } - } - newline_insert = -1; - var prev = last.charAt(last.length - 1); - if (might_need_semicolon) { - might_need_semicolon = false; - - if (prev == ":" && ch == "}" || (!ch || ";}".indexOf(ch) < 0) && prev != ";") { - if (options.semicolons || requireSemicolonChars[ch]) { - OUTPUT += ";"; - current_col++; - current_pos++; - } else { - fix_line(); - OUTPUT += "\n"; - current_pos++; - current_line++; - current_col = 0; - - if (/^\s+$/.test(str)) { - // reset the semicolon flag, since we didn't print one - // now and might still have to later - might_need_semicolon = true; - } - } - - if (!options.beautify) - might_need_space = false; - } - } - - if (might_need_space) { - if ((is_identifier_char(prev) - && (is_identifier_char(ch) || ch == "\\")) - || (ch == "/" && ch == prev) - || ((ch == "+" || ch == "-") && ch == last)) - { - OUTPUT += " "; - current_col++; - current_pos++; - } - might_need_space = false; - } - - if (mapping_token) { - mappings.push({ - token: mapping_token, - name: mapping_name, - line: current_line, - col: current_col - }); - mapping_token = false; - if (line_fixed) flush_mappings(); - } - - OUTPUT += str; - has_parens = str[str.length - 1] == "("; - current_pos += str.length; - var a = str.split(/\r?\n/), n = a.length - 1; - current_line += n; - current_col += a[0].length; - if (n > 0) { - fix_line(); - current_col = a[n].length; - } - last = str; - } - - var space = options.beautify ? function() { - print(" "); - } : function() { - might_need_space = true; - }; - - var indent = options.beautify ? function(half) { - if (options.beautify) { - print(make_indent(half ? 0.5 : 0)); - } - } : noop; - - var with_indent = options.beautify ? function(col, cont) { - if (col === true) col = next_indent(); - var save_indentation = indentation; - indentation = col; - var ret = cont(); - indentation = save_indentation; - return ret; - } : function(col, cont) { return cont() }; - - var may_add_newline = options.max_line_len || options.preserve_line ? function() { - fix_line(); - line_end = OUTPUT.length; - line_fixed = false; - } : noop; - - var newline = options.beautify ? function() { - if (newline_insert < 0) return print("\n"); - if (OUTPUT[newline_insert] != "\n") { - OUTPUT = OUTPUT.slice(0, newline_insert) + "\n" + OUTPUT.slice(newline_insert); - current_pos++; - current_line++; - } - newline_insert++; - } : may_add_newline; - - var semicolon = options.beautify ? function() { - print(";"); - } : function() { - might_need_semicolon = true; - }; - - function force_semicolon() { - might_need_semicolon = false; - print(";"); - } - - function next_indent() { - return indentation + options.indent_level; - } - - function with_block(cont) { - var ret; - print("{"); - newline(); - with_indent(next_indent(), function() { - ret = cont(); - }); - indent(); - print("}"); - return ret; - } - - function with_parens(cont) { - print("("); - may_add_newline(); - //XXX: still nice to have that for argument lists - //var ret = with_indent(current_col, cont); - var ret = cont(); - may_add_newline(); - print(")"); - return ret; - } - - function with_square(cont) { - print("["); - may_add_newline(); - //var ret = with_indent(current_col, cont); - var ret = cont(); - may_add_newline(); - print("]"); - return ret; - } - - function comma() { - may_add_newline(); - print(","); - may_add_newline(); - space(); - } - - function colon() { - print(":"); - space(); - } - - var add_mapping = mappings ? function(token, name) { - mapping_token = token; - mapping_name = name; - } : noop; - - function get() { - if (!line_fixed) fix_line(); - return OUTPUT; - } - - function has_nlb() { - var index = OUTPUT.lastIndexOf("\n"); - return /^ *$/.test(OUTPUT.slice(index + 1)); - } - - function prepend_comments(node) { - var self = this; - var scan = node instanceof AST_Exit && node.value; - var comments = dump(node); - if (!comments) comments = []; - - if (scan) { - var tw = new TreeWalker(function(node) { - var parent = tw.parent(); - if (parent instanceof AST_Exit - || parent instanceof AST_Binary && parent.left === node - || parent.TYPE == "Call" && parent.expression === node - || parent instanceof AST_Conditional && parent.condition === node - || parent instanceof AST_Dot && parent.expression === node - || parent instanceof AST_Sequence && parent.expressions[0] === node - || parent instanceof AST_Sub && parent.expression === node - || parent instanceof AST_UnaryPostfix) { - var before = dump(node); - if (before) comments = comments.concat(before); - } else { - return true; - } - }); - tw.push(node); - node.value.walk(tw); - } - - if (current_pos == 0) { - if (comments.length > 0 && options.shebang && comments[0].type == "comment5") { - print("#!" + comments.shift().value + "\n"); - indent(); - } - var preamble = options.preamble; - if (preamble) { - print(preamble.replace(/\r\n?|[\n\u2028\u2029]|\s*$/g, "\n")); - } - } - - comments = comments.filter(comment_filter, node); - if (comments.length == 0) return; - var last_nlb = has_nlb(); - comments.forEach(function(c, i) { - if (!last_nlb) { - if (c.nlb) { - print("\n"); - indent(); - last_nlb = true; - } else if (i > 0) { - space(); - } - } - if (/comment[134]/.test(c.type)) { - print("//" + c.value.replace(/[@#]__PURE__/g, ' ') + "\n"); - indent(); - last_nlb = true; - } else if (c.type == "comment2") { - print("/*" + c.value.replace(/[@#]__PURE__/g, ' ') + "*/"); - last_nlb = false; - } - }); - if (!last_nlb) { - if (node.start.nlb) { - print("\n"); - indent(); - } else { - space(); - } - } - - function dump(node) { - var token = node.start; - if (!token) { - if (!scan) return; - node.start = token = new AST_Token(); - } - var comments = token.comments_before; - if (!comments) { - if (!scan) return; - token.comments_before = comments = []; - } - if (comments._dumped === self) return; - comments._dumped = self; - return comments; - } - } - - function append_comments(node, tail) { - var self = this; - var token = node.end; - if (!token) return; - var comments = token[tail ? "comments_before" : "comments_after"]; - if (!comments || comments._dumped === self) return; - if (!(node instanceof AST_Statement || all(comments, function(c) { - return !/comment[134]/.test(c.type); - }))) return; - comments._dumped = self; - var insert = OUTPUT.length; - comments.filter(comment_filter, node).forEach(function(c, i) { - need_space = false; - if (need_newline_indented) { - print("\n"); - indent(); - need_newline_indented = false; - } else if (c.nlb && (i > 0 || !has_nlb())) { - print("\n"); - indent(); - } else if (i > 0 || !tail) { - space(); - } - if (/comment[134]/.test(c.type)) { - print("//" + c.value.replace(/[@#]__PURE__/g, ' ')); - need_newline_indented = true; - } else if (c.type == "comment2") { - print("/*" + c.value.replace(/[@#]__PURE__/g, ' ') + "*/"); - need_space = true; - } - }); - if (OUTPUT.length > insert) newline_insert = insert; - } - - var stack = []; - return { - get : get, - toString : get, - indent : indent, - indentation : function() { return indentation }, - current_width : function() { return current_col - indentation }, - should_break : function() { return options.width && this.current_width() >= options.width }, - has_parens : function() { return has_parens }, - newline : newline, - print : print, - space : space, - comma : comma, - colon : colon, - last : function() { return last }, - semicolon : semicolon, - force_semicolon : force_semicolon, - to_utf8 : to_utf8, - print_name : function(name) { print(make_name(name)) }, - print_string : function(str, quote, escape_directive) { - var encoded = encode_string(str, quote); - if (escape_directive === true && encoded.indexOf("\\") === -1) { - // Insert semicolons to break directive prologue - if (!EXPECT_DIRECTIVE.test(OUTPUT)) { - force_semicolon(); - } - force_semicolon(); - } - print(encoded); - }, - next_indent : next_indent, - with_indent : with_indent, - with_block : with_block, - with_parens : with_parens, - with_square : with_square, - add_mapping : add_mapping, - option : function(opt) { return options[opt] }, - prepend_comments: readonly ? noop : prepend_comments, - append_comments : readonly || comment_filter === return_false ? noop : append_comments, - line : function() { return current_line }, - col : function() { return current_col }, - pos : function() { return current_pos }, - push_node : function(node) { stack.push(node) }, - pop_node : options.preserve_line ? function() { - var node = stack.pop(); - if (node.start && node.start.line > current_line) { - insert_newlines(node.start.line - current_line); - } - } : function() { - stack.pop(); - }, - parent : function(n) { - return stack[stack.length - 2 - (n || 0)]; - } - }; -} - -/* -----[ code generators ]----- */ - -(function() { - - /* -----[ utils ]----- */ - - function DEFPRINT(nodetype, generator) { - nodetype.DEFMETHOD("_codegen", generator); - } - - var in_directive = false; - var active_scope = null; - var use_asm = null; - - AST_Node.DEFMETHOD("print", function(stream, force_parens) { - var self = this, generator = self._codegen; - if (self instanceof AST_Scope) { - active_scope = self; - } else if (!use_asm && self instanceof AST_Directive && self.value == "use asm") { - use_asm = active_scope; - } - function doit() { - stream.prepend_comments(self); - self.add_source_map(stream); - generator(self, stream); - stream.append_comments(self); - } - stream.push_node(self); - if (force_parens || self.needs_parens(stream)) { - stream.with_parens(doit); - } else { - doit(); - } - stream.pop_node(); - if (self === use_asm) { - use_asm = null; - } - }); - AST_Node.DEFMETHOD("_print", AST_Node.prototype.print); - - AST_Node.DEFMETHOD("print_to_string", function(options) { - var s = OutputStream(options); - this.print(s); - return s.get(); - }); - - /* -----[ PARENTHESES ]----- */ - - function PARENS(nodetype, func) { - if (Array.isArray(nodetype)) { - nodetype.forEach(function(nodetype) { - PARENS(nodetype, func); - }); - } else { - nodetype.DEFMETHOD("needs_parens", func); - } - } - - PARENS(AST_Node, return_false); - - // a function expression needs parens around it when it's provably - // the first token to appear in a statement. - PARENS(AST_Function, function(output) { - if (!output.has_parens() && first_in_statement(output)) return true; - if (output.option('webkit')) { - var p = output.parent(); - if (p instanceof AST_PropAccess && p.expression === this) return true; - } - if (output.option('wrap_iife')) { - var p = output.parent(); - if (p instanceof AST_Call && p.expression === this) return true; - } - }); - - // same goes for an object literal, because otherwise it would be - // interpreted as a block of code. - PARENS(AST_Object, function(output) { - return !output.has_parens() && first_in_statement(output); - }); - - PARENS(AST_Unary, function(output) { - var p = output.parent(); - return p instanceof AST_PropAccess && p.expression === this - || p instanceof AST_Call && p.expression === this; - }); - - PARENS(AST_Sequence, function(output) { - var p = output.parent(); - return p instanceof AST_Call // (foo, bar)() or foo(1, (2, 3), 4) - || p instanceof AST_Unary // !(foo, bar, baz) - || p instanceof AST_Binary // 1 + (2, 3) + 4 ==> 8 - || p instanceof AST_VarDef // var a = (1, 2), b = a + a; ==> b == 4 - || p instanceof AST_PropAccess // (1, {foo:2}).foo or (1, {foo:2})["foo"] ==> 2 - || p instanceof AST_Array // [ 1, (2, 3), 4 ] ==> [ 1, 3, 4 ] - || p instanceof AST_ObjectProperty // { foo: (1, 2) }.foo ==> 2 - || p instanceof AST_Conditional /* (false, true) ? (a = 10, b = 20) : (c = 30) - * ==> 20 (side effect, set a := 10 and b := 20) */ - ; - }); - - PARENS(AST_Binary, function(output) { - var p = output.parent(); - // (foo && bar)() - if (p instanceof AST_Call && p.expression === this) - return true; - // typeof (foo && bar) - if (p instanceof AST_Unary) - return true; - // (foo && bar)["prop"], (foo && bar).prop - if (p instanceof AST_PropAccess && p.expression === this) - return true; - // this deals with precedence: 3 * (2 + 1) - if (p instanceof AST_Binary) { - var po = p.operator, pp = PRECEDENCE[po]; - var so = this.operator, sp = PRECEDENCE[so]; - if (pp > sp - || (pp == sp - && this === p.right)) { - return true; - } - } - }); - - PARENS(AST_PropAccess, function(output) { - var p = output.parent(); - if (p instanceof AST_New && p.expression === this) { - // i.e. new (foo.bar().baz) - // - // if there's one call into this subtree, then we need - // parens around it too, otherwise the call will be - // interpreted as passing the arguments to the upper New - // expression. - var parens = false; - this.walk(new TreeWalker(function(node) { - if (parens || node instanceof AST_Scope) return true; - if (node instanceof AST_Call) { - parens = true; - return true; - } - })); - return parens; - } - }); - - PARENS(AST_Call, function(output) { - var p = output.parent(); - if (p instanceof AST_New && p.expression === this) return true; - // https://bugs.webkit.org/show_bug.cgi?id=123506 - if (output.option('webkit')) { - var g = output.parent(1); - return this.expression instanceof AST_Function - && p instanceof AST_PropAccess - && p.expression === this - && g instanceof AST_Assign - && g.left === p; - } - }); - - PARENS(AST_New, function(output) { - var p = output.parent(); - if (!need_constructor_parens(this, output) - && (p instanceof AST_PropAccess // (new Date).getTime(), (new Date)["getTime"]() - || p instanceof AST_Call && p.expression === this)) // (new foo)(bar) - return true; - }); - - PARENS(AST_Number, function(output) { - var p = output.parent(); - if (p instanceof AST_PropAccess && p.expression === this) { - var value = this.getValue(); - if (value < 0 || /^0/.test(make_num(value))) { - return true; - } - } - }); - - PARENS([ AST_Assign, AST_Conditional ], function(output) { - var p = output.parent(); - // !(a = false) → true - if (p instanceof AST_Unary) - return true; - // 1 + (a = 2) + 3 → 6, side effect setting a = 2 - if (p instanceof AST_Binary && !(p instanceof AST_Assign)) - return true; - // (a = func)() —or— new (a = Object)() - if (p instanceof AST_Call && p.expression === this) - return true; - // (a = foo) ? bar : baz - if (p instanceof AST_Conditional && p.condition === this) - return true; - // (a = foo)["prop"] —or— (a = foo).prop - if (p instanceof AST_PropAccess && p.expression === this) - return true; - }); - - /* -----[ PRINTERS ]----- */ - - DEFPRINT(AST_Directive, function(self, output) { - output.print_string(self.value, self.quote); - output.semicolon(); - }); - DEFPRINT(AST_Debugger, function(self, output) { - output.print("debugger"); - output.semicolon(); - }); - - /* -----[ statements ]----- */ - - function display_body(body, is_toplevel, output, allow_directives) { - var last = body.length - 1; - in_directive = allow_directives; - body.forEach(function(stmt, i) { - if (in_directive === true && !(stmt instanceof AST_Directive || - stmt instanceof AST_EmptyStatement || - (stmt instanceof AST_SimpleStatement && stmt.body instanceof AST_String) - )) { - in_directive = false; - } - if (!(stmt instanceof AST_EmptyStatement)) { - output.indent(); - stmt.print(output); - if (!(i == last && is_toplevel)) { - output.newline(); - if (is_toplevel) output.newline(); - } - } - if (in_directive === true && - stmt instanceof AST_SimpleStatement && - stmt.body instanceof AST_String - ) { - in_directive = false; - } - }); - in_directive = false; - } - - AST_StatementWithBody.DEFMETHOD("_do_print_body", function(output) { - force_statement(this.body, output); - }); - - DEFPRINT(AST_Statement, function(self, output) { - self.body.print(output); - output.semicolon(); - }); - DEFPRINT(AST_Toplevel, function(self, output) { - display_body(self.body, true, output, true); - output.print(""); - }); - DEFPRINT(AST_LabeledStatement, function(self, output) { - self.label.print(output); - output.colon(); - self.body.print(output); - }); - DEFPRINT(AST_SimpleStatement, function(self, output) { - self.body.print(output); - output.semicolon(); - }); - function print_braced_empty(self, output) { - output.print("{"); - output.with_indent(output.next_indent(), function() { - output.append_comments(self, true); - }); - output.print("}"); - } - function print_braced(self, output, allow_directives) { - if (self.body.length > 0) { - output.with_block(function() { - display_body(self.body, false, output, allow_directives); - }); - } else print_braced_empty(self, output); - } - DEFPRINT(AST_BlockStatement, function(self, output) { - print_braced(self, output); - }); - DEFPRINT(AST_EmptyStatement, function(self, output) { - output.semicolon(); - }); - DEFPRINT(AST_Do, function(self, output) { - output.print("do"); - output.space(); - make_block(self.body, output); - output.space(); - output.print("while"); - output.space(); - output.with_parens(function() { - self.condition.print(output); - }); - output.semicolon(); - }); - DEFPRINT(AST_While, function(self, output) { - output.print("while"); - output.space(); - output.with_parens(function() { - self.condition.print(output); - }); - output.space(); - self._do_print_body(output); - }); - DEFPRINT(AST_For, function(self, output) { - output.print("for"); - output.space(); - output.with_parens(function() { - if (self.init) { - if (self.init instanceof AST_Definitions) { - self.init.print(output); - } else { - parenthesize_for_noin(self.init, output, true); - } - output.print(";"); - output.space(); - } else { - output.print(";"); - } - if (self.condition) { - self.condition.print(output); - output.print(";"); - output.space(); - } else { - output.print(";"); - } - if (self.step) { - self.step.print(output); - } - }); - output.space(); - self._do_print_body(output); - }); - DEFPRINT(AST_ForIn, function(self, output) { - output.print("for"); - output.space(); - output.with_parens(function() { - self.init.print(output); - output.space(); - output.print("in"); - output.space(); - self.object.print(output); - }); - output.space(); - self._do_print_body(output); - }); - DEFPRINT(AST_With, function(self, output) { - output.print("with"); - output.space(); - output.with_parens(function() { - self.expression.print(output); - }); - output.space(); - self._do_print_body(output); - }); - - /* -----[ functions ]----- */ - AST_Lambda.DEFMETHOD("_do_print", function(output, nokeyword) { - var self = this; - if (!nokeyword) { - output.print("function"); - } - if (self.name) { - output.space(); - self.name.print(output); - } - output.with_parens(function() { - self.argnames.forEach(function(arg, i) { - if (i) output.comma(); - arg.print(output); - }); - }); - output.space(); - print_braced(self, output, true); - }); - DEFPRINT(AST_Lambda, function(self, output) { - self._do_print(output); - }); - - /* -----[ jumps ]----- */ - function print_jump(output, kind, target) { - output.print(kind); - if (target) { - output.space(); - target.print(output); - } - output.semicolon(); - } - - DEFPRINT(AST_Return, function(self, output) { - print_jump(output, "return", self.value); - }); - DEFPRINT(AST_Throw, function(self, output) { - print_jump(output, "throw", self.value); - }); - DEFPRINT(AST_Break, function(self, output) { - print_jump(output, "break", self.label); - }); - DEFPRINT(AST_Continue, function(self, output) { - print_jump(output, "continue", self.label); - }); - - /* -----[ if ]----- */ - function make_then(self, output) { - var b = self.body; - if (output.option("braces") - || output.option("ie8") && b instanceof AST_Do) - return make_block(b, output); - // The squeezer replaces "block"-s that contain only a single - // statement with the statement itself; technically, the AST - // is correct, but this can create problems when we output an - // IF having an ELSE clause where the THEN clause ends in an - // IF *without* an ELSE block (then the outer ELSE would refer - // to the inner IF). This function checks for this case and - // adds the block braces if needed. - if (!b) return output.force_semicolon(); - while (true) { - if (b instanceof AST_If) { - if (!b.alternative) { - make_block(self.body, output); - return; - } - b = b.alternative; - } else if (b instanceof AST_StatementWithBody) { - b = b.body; - } else break; - } - force_statement(self.body, output); - } - DEFPRINT(AST_If, function(self, output) { - output.print("if"); - output.space(); - output.with_parens(function() { - self.condition.print(output); - }); - output.space(); - if (self.alternative) { - make_then(self, output); - output.space(); - output.print("else"); - output.space(); - if (self.alternative instanceof AST_If) - self.alternative.print(output); - else - force_statement(self.alternative, output); - } else { - self._do_print_body(output); - } - }); - - /* -----[ switch ]----- */ - DEFPRINT(AST_Switch, function(self, output) { - output.print("switch"); - output.space(); - output.with_parens(function() { - self.expression.print(output); - }); - output.space(); - var last = self.body.length - 1; - if (last < 0) print_braced_empty(self, output); - else output.with_block(function() { - self.body.forEach(function(branch, i) { - output.indent(true); - branch.print(output); - if (i < last && branch.body.length > 0) - output.newline(); - }); - }); - }); - AST_SwitchBranch.DEFMETHOD("_do_print_body", function(output) { - output.newline(); - this.body.forEach(function(stmt) { - output.indent(); - stmt.print(output); - output.newline(); - }); - }); - DEFPRINT(AST_Default, function(self, output) { - output.print("default:"); - self._do_print_body(output); - }); - DEFPRINT(AST_Case, function(self, output) { - output.print("case"); - output.space(); - self.expression.print(output); - output.print(":"); - self._do_print_body(output); - }); - - /* -----[ exceptions ]----- */ - DEFPRINT(AST_Try, function(self, output) { - output.print("try"); - output.space(); - print_braced(self, output); - if (self.bcatch) { - output.space(); - self.bcatch.print(output); - } - if (self.bfinally) { - output.space(); - self.bfinally.print(output); - } - }); - DEFPRINT(AST_Catch, function(self, output) { - output.print("catch"); - output.space(); - output.with_parens(function() { - self.argname.print(output); - }); - output.space(); - print_braced(self, output); - }); - DEFPRINT(AST_Finally, function(self, output) { - output.print("finally"); - output.space(); - print_braced(self, output); - }); - - DEFPRINT(AST_Var, function(self, output) { - output.print("var"); - output.space(); - self.definitions.forEach(function(def, i) { - if (i) output.comma(); - def.print(output); - }); - var p = output.parent(); - if (p && p.init !== self || !(p instanceof AST_For || p instanceof AST_ForIn)) output.semicolon(); - }); - - function parenthesize_for_noin(node, output, noin) { - var parens = false; - // need to take some precautions here: - // https://github.com/mishoo/UglifyJS2/issues/60 - if (noin) node.walk(new TreeWalker(function(node) { - if (parens || node instanceof AST_Scope) return true; - if (node instanceof AST_Binary && node.operator == "in") { - parens = true; - return true; - } - })); - node.print(output, parens); - } - - DEFPRINT(AST_VarDef, function(self, output) { - self.name.print(output); - if (self.value) { - output.space(); - output.print("="); - output.space(); - var p = output.parent(1); - var noin = p instanceof AST_For || p instanceof AST_ForIn; - parenthesize_for_noin(self.value, output, noin); - } - }); - - /* -----[ other expressions ]----- */ - DEFPRINT(AST_Call, function(self, output) { - self.expression.print(output); - if (self instanceof AST_New && !need_constructor_parens(self, output)) - return; - if (self.expression instanceof AST_Call || self.expression instanceof AST_Lambda) { - output.add_mapping(self.start); - } - output.with_parens(function() { - self.args.forEach(function(expr, i) { - if (i) output.comma(); - expr.print(output); - }); - }); - }); - DEFPRINT(AST_New, function(self, output) { - output.print("new"); - output.space(); - AST_Call.prototype._codegen(self, output); - }); - DEFPRINT(AST_Sequence, function(self, output) { - self.expressions.forEach(function(node, index) { - if (index > 0) { - output.comma(); - if (output.should_break()) { - output.newline(); - output.indent(); - } - } - node.print(output); - }); - }); - DEFPRINT(AST_Dot, function(self, output) { - var expr = self.expression; - expr.print(output); - var prop = self.property; - if (output.option("ie8") && RESERVED_WORDS[prop]) { - output.print("["); - output.add_mapping(self.end); - output.print_string(prop); - output.print("]"); - } else { - if (expr instanceof AST_Number && expr.getValue() >= 0) { - if (!/[xa-f.)]/i.test(output.last())) { - output.print("."); - } - } - output.print("."); - // the name after dot would be mapped about here. - output.add_mapping(self.end); - output.print_name(prop); - } - }); - DEFPRINT(AST_Sub, function(self, output) { - self.expression.print(output); - output.print("["); - self.property.print(output); - output.print("]"); - }); - DEFPRINT(AST_UnaryPrefix, function(self, output) { - var op = self.operator; - output.print(op); - if (/^[a-z]/i.test(op) - || (/[+-]$/.test(op) - && self.expression instanceof AST_UnaryPrefix - && /^[+-]/.test(self.expression.operator))) { - output.space(); - } - self.expression.print(output); - }); - DEFPRINT(AST_UnaryPostfix, function(self, output) { - self.expression.print(output); - output.print(self.operator); - }); - DEFPRINT(AST_Binary, function(self, output) { - var op = self.operator; - self.left.print(output); - if (op[0] == ">" /* ">>" ">>>" ">" ">=" */ - && self.left instanceof AST_UnaryPostfix - && self.left.operator == "--") { - // space is mandatory to avoid outputting --> - output.print(" "); - } else { - // the space is optional depending on "beautify" - output.space(); - } - output.print(op); - if ((op == "<" || op == "<<") - && self.right instanceof AST_UnaryPrefix - && self.right.operator == "!" - && self.right.expression instanceof AST_UnaryPrefix - && self.right.expression.operator == "--") { - // space is mandatory to avoid outputting ") && S.newline_before) { - forward(3); - skip_line_comment("comment4"); - continue; - } - } - var ch = peek(); - if (!ch) return token("eof"); - var code = ch.charCodeAt(0); - switch (code) { - case 34: case 39: return read_string(ch); - case 46: return handle_dot(); - case 47: - var tok = handle_slash(); - if (tok === next_token) continue; - return tok; - } - if (is_digit(code)) return read_num(); - if (PUNC_CHARS[ch]) return token("punc", next()); - if (OPERATOR_CHARS[ch]) return read_operator(); - if (code == 92 || is_identifier_start(code)) return read_word(); - break; - } - parse_error("Unexpected character '" + ch + "'"); - } - - next_token.context = function(nc) { - if (nc) S = nc; - return S; - }; - - next_token.add_directive = function(directive) { - S.directive_stack[S.directive_stack.length - 1].push(directive); - if (S.directives[directive]) S.directives[directive]++; - else S.directives[directive] = 1; - } - - next_token.push_directives_stack = function() { - S.directive_stack.push([]); - } - - next_token.pop_directives_stack = function() { - var directives = S.directive_stack.pop(); - for (var i = directives.length; --i >= 0;) { - S.directives[directives[i]]--; - } - } - - next_token.has_directive = function(directive) { - return S.directives[directive] > 0; - } - - return next_token; -} - -/* -----[ Parser (constants) ]----- */ - -var UNARY_PREFIX = makePredicate("typeof void delete -- ++ ! ~ - +"); - -var UNARY_POSTFIX = makePredicate("-- ++"); - -var ASSIGNMENT = makePredicate("= += -= /= *= %= >>= <<= >>>= |= ^= &="); - -var PRECEDENCE = function(a, ret) { - for (var i = 0; i < a.length;) { - var b = a[i++]; - for (var j = 0; j < b.length; j++) { - ret[b[j]] = i; - } - } - return ret; -}([ - ["||"], - ["&&"], - ["|"], - ["^"], - ["&"], - ["==", "===", "!=", "!=="], - ["<", ">", "<=", ">=", "in", "instanceof"], - [">>", "<<", ">>>"], - ["+", "-"], - ["*", "/", "%"] -], {}); - -var ATOMIC_START_TOKEN = makePredicate("atom num string regexp name"); - -/* -----[ Parser ]----- */ - -function parse($TEXT, options) { - options = defaults(options, { - bare_returns : false, - expression : false, - filename : null, - html5_comments : true, - shebang : true, - strict : false, - toplevel : null, - }, true); - - var S = { - input : typeof $TEXT == "string" - ? tokenizer($TEXT, options.filename, options.html5_comments, options.shebang) - : $TEXT, - token : null, - prev : null, - peeked : null, - in_function : 0, - in_directives : true, - in_loop : 0, - labels : [] - }; - - S.token = next(); - - function is(type, value) { - return is_token(S.token, type, value); - } - - function peek() { - return S.peeked || (S.peeked = S.input()); - } - - function next() { - S.prev = S.token; - if (S.peeked) { - S.token = S.peeked; - S.peeked = null; - } else { - S.token = S.input(); - } - S.in_directives = S.in_directives && ( - S.token.type == "string" || is("punc", ";") - ); - return S.token; - } - - function prev() { - return S.prev; - } - - function croak(msg, line, col, pos) { - var ctx = S.input.context(); - js_error(msg, - ctx.filename, - line != null ? line : ctx.tokline, - col != null ? col : ctx.tokcol, - pos != null ? pos : ctx.tokpos); - } - - function token_error(token, msg) { - croak(msg, token.line, token.col); - } - - function token_to_string(type, value) { - return type + (value === undefined ? "" : " «" + value + "»"); - } - - function unexpected(token) { - if (token == null) token = S.token; - token_error(token, "Unexpected token: " + token_to_string(token.type, token.value)); - } - - function expect_token(type, val) { - if (is(type, val)) return next(); - token_error(S.token, "Unexpected token: " + token_to_string(S.token.type, S.token.value) + ", expected: " + token_to_string(type, val)); - } - - function expect(punc) { - return expect_token("punc", punc); - } - - function has_newline_before(token) { - return token.nlb || !all(token.comments_before, function(comment) { - return !comment.nlb; - }); - } - - function can_insert_semicolon() { - return !options.strict - && (is("eof") || is("punc", "}") || has_newline_before(S.token)); - } - - function semicolon(optional) { - if (is("punc", ";")) next(); - else if (!optional && !can_insert_semicolon()) expect_token("punc", ";"); - } - - function parenthesised() { - expect("("); - var exp = expression(true); - expect(")"); - return exp; - } - - function embed_tokens(parser) { - return function() { - var start = S.token; - var expr = parser.apply(null, arguments); - var end = prev(); - expr.start = start; - expr.end = end; - return expr; - }; - } - - function handle_regexp() { - if (is("operator", "/") || is("operator", "/=")) { - S.peeked = null; - S.token = S.input(S.token.value.substr(1)); // force regexp - } - } - - var statement = embed_tokens(function(strict_defun) { - handle_regexp(); - switch (S.token.type) { - case "string": - if (S.in_directives) { - var token = peek(); - if (S.token.raw.indexOf("\\") == -1 - && (is_token(token, "punc", ";") - || is_token(token, "punc", "}") - || has_newline_before(token) - || is_token(token, "eof"))) { - S.input.add_directive(S.token.value); - } else { - S.in_directives = false; - } - } - var dir = S.in_directives, stat = simple_statement(); - return dir ? new AST_Directive(stat.body) : stat; - case "num": - case "regexp": - case "operator": - case "atom": - return simple_statement(); - - case "name": - return is_token(peek(), "punc", ":") - ? labeled_statement() - : simple_statement(); - - case "punc": - switch (S.token.value) { - case "{": - return new AST_BlockStatement({ - start : S.token, - body : block_(), - end : prev() - }); - case "[": - case "(": - return simple_statement(); - case ";": - S.in_directives = false; - next(); - return new AST_EmptyStatement(); - default: - unexpected(); - } - - case "keyword": - switch (S.token.value) { - case "break": - next(); - return break_cont(AST_Break); - - case "continue": - next(); - return break_cont(AST_Continue); - - case "debugger": - next(); - semicolon(); - return new AST_Debugger(); - - case "do": - next(); - var body = in_loop(statement); - expect_token("keyword", "while"); - var condition = parenthesised(); - semicolon(true); - return new AST_Do({ - body : body, - condition : condition - }); - - case "while": - next(); - return new AST_While({ - condition : parenthesised(), - body : in_loop(statement) - }); - - case "for": - next(); - return for_(); - - case "function": - if (!strict_defun && S.input.has_directive("use strict")) { - croak("In strict mode code, functions can only be declared at top level or immediately within another function."); - } - next(); - return function_(AST_Defun); - - case "if": - next(); - return if_(); - - case "return": - if (S.in_function == 0 && !options.bare_returns) - croak("'return' outside of function"); - next(); - var value = null; - if (is("punc", ";")) { - next(); - } else if (!can_insert_semicolon()) { - value = expression(true); - semicolon(); - } - return new AST_Return({ - value: value - }); - - case "switch": - next(); - return new AST_Switch({ - expression : parenthesised(), - body : in_loop(switch_body_) - }); - - case "throw": - next(); - if (has_newline_before(S.token)) - croak("Illegal newline after 'throw'"); - var value = expression(true); - semicolon(); - return new AST_Throw({ - value: value - }); - - case "try": - next(); - return try_(); - - case "var": - next(); - var node = var_(); - semicolon(); - return node; - - case "with": - if (S.input.has_directive("use strict")) { - croak("Strict mode may not include a with statement"); - } - next(); - return new AST_With({ - expression : parenthesised(), - body : statement() - }); - } - } - unexpected(); - }); - - function labeled_statement() { - var label = as_symbol(AST_Label); - if (!all(S.labels, function(l) { - return l.name != label.name; - })) { - // ECMA-262, 12.12: An ECMAScript program is considered - // syntactically incorrect if it contains a - // LabelledStatement that is enclosed by a - // LabelledStatement with the same Identifier as label. - croak("Label " + label.name + " defined twice"); - } - expect(":"); - S.labels.push(label); - var stat = statement(); - S.labels.pop(); - if (!(stat instanceof AST_IterationStatement)) { - // check for `continue` that refers to this label. - // those should be reported as syntax errors. - // https://github.com/mishoo/UglifyJS2/issues/287 - label.references.forEach(function(ref) { - if (ref instanceof AST_Continue) { - ref = ref.label.start; - croak("Continue label `" + label.name + "` refers to non-IterationStatement.", - ref.line, ref.col, ref.pos); - } - }); - } - return new AST_LabeledStatement({ body: stat, label: label }); - } - - function simple_statement(tmp) { - return new AST_SimpleStatement({ body: (tmp = expression(true), semicolon(), tmp) }); - } - - function break_cont(type) { - var label = null, ldef; - if (!can_insert_semicolon()) { - label = as_symbol(AST_LabelRef, true); - } - if (label != null) { - ldef = find_if(function(l) { - return l.name == label.name; - }, S.labels); - if (!ldef) croak("Undefined label " + label.name); - label.thedef = ldef; - } else if (S.in_loop == 0) croak(type.TYPE + " not inside a loop or switch"); - semicolon(); - var stat = new type({ label: label }); - if (ldef) ldef.references.push(stat); - return stat; - } - - function for_() { - expect("("); - var init = null; - if (!is("punc", ";")) { - init = is("keyword", "var") - ? (next(), var_(true)) - : expression(true, true); - if (is("operator", "in")) { - if (init instanceof AST_Var) { - if (init.definitions.length > 1) - croak("Only one variable declaration allowed in for..in loop", init.start.line, init.start.col, init.start.pos); - } else if (!is_assignable(init)) { - croak("Invalid left-hand side in for..in loop", init.start.line, init.start.col, init.start.pos); - } - next(); - return for_in(init); - } - } - return regular_for(init); - } - - function regular_for(init) { - expect(";"); - var test = is("punc", ";") ? null : expression(true); - expect(";"); - var step = is("punc", ")") ? null : expression(true); - expect(")"); - return new AST_For({ - init : init, - condition : test, - step : step, - body : in_loop(statement) - }); - } - - function for_in(init) { - var obj = expression(true); - expect(")"); - return new AST_ForIn({ - init : init, - object : obj, - body : in_loop(statement) - }); - } - - var function_ = function(ctor) { - var in_statement = ctor === AST_Defun; - var name = is("name") ? as_symbol(in_statement ? AST_SymbolDefun : AST_SymbolLambda) : null; - if (in_statement && !name) - expect_token("name"); - if (name && ctor !== AST_Accessor && !(name instanceof AST_SymbolDeclaration)) - unexpected(prev()); - expect("("); - var argnames = []; - for (var first = true; !is("punc", ")");) { - if (first) first = false; else expect(","); - argnames.push(as_symbol(AST_SymbolFunarg)); - } - next(); - var loop = S.in_loop; - var labels = S.labels; - ++S.in_function; - S.in_directives = true; - S.input.push_directives_stack(); - S.in_loop = 0; - S.labels = []; - var body = block_(true); - if (S.input.has_directive("use strict")) { - if (name) strict_verify_symbol(name); - argnames.forEach(strict_verify_symbol); - } - S.input.pop_directives_stack(); - --S.in_function; - S.in_loop = loop; - S.labels = labels; - return new ctor({ - name: name, - argnames: argnames, - body: body - }); - }; - - function if_() { - var cond = parenthesised(), body = statement(), belse = null; - if (is("keyword", "else")) { - next(); - belse = statement(); - } - return new AST_If({ - condition : cond, - body : body, - alternative : belse - }); - } - - function block_(strict_defun) { - expect("{"); - var a = []; - while (!is("punc", "}")) { - if (is("eof")) expect_token("punc", "}"); - a.push(statement(strict_defun)); - } - next(); - return a; - } - - function switch_body_() { - expect("{"); - var a = [], cur = null, branch = null, tmp; - while (!is("punc", "}")) { - if (is("eof")) expect_token("punc", "}"); - if (is("keyword", "case")) { - if (branch) branch.end = prev(); - cur = []; - branch = new AST_Case({ - start : (tmp = S.token, next(), tmp), - expression : expression(true), - body : cur - }); - a.push(branch); - expect(":"); - } else if (is("keyword", "default")) { - if (branch) branch.end = prev(); - cur = []; - branch = new AST_Default({ - start : (tmp = S.token, next(), expect(":"), tmp), - body : cur - }); - a.push(branch); - } else { - if (!cur) unexpected(); - cur.push(statement()); - } - } - if (branch) branch.end = prev(); - next(); - return a; - } - - function try_() { - var body = block_(), bcatch = null, bfinally = null; - if (is("keyword", "catch")) { - var start = S.token; - next(); - expect("("); - var name = as_symbol(AST_SymbolCatch); - expect(")"); - bcatch = new AST_Catch({ - start : start, - argname : name, - body : block_(), - end : prev() - }); - } - if (is("keyword", "finally")) { - var start = S.token; - next(); - bfinally = new AST_Finally({ - start : start, - body : block_(), - end : prev() - }); - } - if (!bcatch && !bfinally) - croak("Missing catch/finally blocks"); - return new AST_Try({ - body : body, - bcatch : bcatch, - bfinally : bfinally - }); - } - - function vardefs(no_in) { - var a = []; - for (;;) { - a.push(new AST_VarDef({ - start : S.token, - name : as_symbol(AST_SymbolVar), - value : is("operator", "=") ? (next(), expression(false, no_in)) : null, - end : prev() - })); - if (!is("punc", ",")) - break; - next(); - } - return a; - } - - var var_ = function(no_in) { - return new AST_Var({ - start : prev(), - definitions : vardefs(no_in), - end : prev() - }); - }; - - var new_ = function(allow_calls) { - var start = S.token; - expect_token("operator", "new"); - var newexp = expr_atom(false), args; - if (is("punc", "(")) { - next(); - args = expr_list(")"); - } else { - args = []; - } - var call = new AST_New({ - start : start, - expression : newexp, - args : args, - end : prev() - }); - mark_pure(call); - return subscripts(call, allow_calls); - }; - - function as_atom_node() { - var tok = S.token, ret; - switch (tok.type) { - case "name": - ret = _make_symbol(AST_SymbolRef); - break; - case "num": - ret = new AST_Number({ start: tok, end: tok, value: tok.value }); - break; - case "string": - ret = new AST_String({ - start : tok, - end : tok, - value : tok.value, - quote : tok.quote - }); - break; - case "regexp": - ret = new AST_RegExp({ start: tok, end: tok, value: tok.value }); - break; - case "atom": - switch (tok.value) { - case "false": - ret = new AST_False({ start: tok, end: tok }); - break; - case "true": - ret = new AST_True({ start: tok, end: tok }); - break; - case "null": - ret = new AST_Null({ start: tok, end: tok }); - break; - } - break; - } - next(); - return ret; - } - - var expr_atom = function(allow_calls) { - if (is("operator", "new")) { - return new_(allow_calls); - } - var start = S.token; - if (is("punc")) { - switch (start.value) { - case "(": - next(); - var ex = expression(true); - var len = start.comments_before.length; - [].unshift.apply(ex.start.comments_before, start.comments_before); - start.comments_before.length = 0; - start.comments_before = ex.start.comments_before; - start.comments_before_length = len; - if (len == 0 && start.comments_before.length > 0) { - var comment = start.comments_before[0]; - if (!comment.nlb) { - comment.nlb = start.nlb; - start.nlb = false; - } - } - start.comments_after = ex.start.comments_after; - ex.start = start; - expect(")"); - var end = prev(); - end.comments_before = ex.end.comments_before; - [].push.apply(ex.end.comments_after, end.comments_after); - end.comments_after.length = 0; - end.comments_after = ex.end.comments_after; - ex.end = end; - if (ex instanceof AST_Call) mark_pure(ex); - return subscripts(ex, allow_calls); - case "[": - return subscripts(array_(), allow_calls); - case "{": - return subscripts(object_(), allow_calls); - } - unexpected(); - } - if (is("keyword", "function")) { - next(); - var func = function_(AST_Function); - func.start = start; - func.end = prev(); - return subscripts(func, allow_calls); - } - if (ATOMIC_START_TOKEN[S.token.type]) { - return subscripts(as_atom_node(), allow_calls); - } - unexpected(); - }; - - function expr_list(closing, allow_trailing_comma, allow_empty) { - var first = true, a = []; - while (!is("punc", closing)) { - if (first) first = false; else expect(","); - if (allow_trailing_comma && is("punc", closing)) break; - if (is("punc", ",") && allow_empty) { - a.push(new AST_Hole({ start: S.token, end: S.token })); - } else { - a.push(expression(false)); - } - } - next(); - return a; - } - - var array_ = embed_tokens(function() { - expect("["); - return new AST_Array({ - elements: expr_list("]", !options.strict, true) - }); - }); - - var create_accessor = embed_tokens(function() { - return function_(AST_Accessor); - }); - - var object_ = embed_tokens(function() { - expect("{"); - var first = true, a = []; - while (!is("punc", "}")) { - if (first) first = false; else expect(","); - if (!options.strict && is("punc", "}")) - // allow trailing comma - break; - var start = S.token; - var type = start.type; - var name = as_property_name(); - if (type == "name" && !is("punc", ":")) { - var key = new AST_SymbolAccessor({ - start: S.token, - name: "" + as_property_name(), - end: prev() - }); - if (name == "get") { - a.push(new AST_ObjectGetter({ - start : start, - key : key, - value : create_accessor(), - end : prev() - })); - continue; - } - if (name == "set") { - a.push(new AST_ObjectSetter({ - start : start, - key : key, - value : create_accessor(), - end : prev() - })); - continue; - } - } - expect(":"); - a.push(new AST_ObjectKeyVal({ - start : start, - quote : start.quote, - key : "" + name, - value : expression(false), - end : prev() - })); - } - next(); - return new AST_Object({ properties: a }); - }); - - function as_property_name() { - var tmp = S.token; - switch (tmp.type) { - case "operator": - if (!KEYWORDS[tmp.value]) unexpected(); - case "num": - case "string": - case "name": - case "keyword": - case "atom": - next(); - return tmp.value; - default: - unexpected(); - } - } - - function as_name() { - if (!is("name")) expect_token("name"); - var name = S.token.value; - next(); - return name; - } - - function _make_symbol(type) { - var name = S.token.value; - return new (name == "this" ? AST_This : type)({ - name : String(name), - start : S.token, - end : S.token - }); - } - - function strict_verify_symbol(sym) { - if (sym.name == "arguments" || sym.name == "eval") - croak("Unexpected " + sym.name + " in strict mode", sym.start.line, sym.start.col, sym.start.pos); - } - - function as_symbol(type, noerror) { - if (!is("name")) { - if (!noerror) croak("Name expected"); - return null; - } - var sym = _make_symbol(type); - if (S.input.has_directive("use strict") && sym instanceof AST_SymbolDeclaration) { - strict_verify_symbol(sym); - } - next(); - return sym; - } - - function mark_pure(call) { - var start = call.start; - var comments = start.comments_before; - var i = HOP(start, "comments_before_length") ? start.comments_before_length : comments.length; - while (--i >= 0) { - var comment = comments[i]; - if (/[@#]__PURE__/.test(comment.value)) { - call.pure = comment; - break; - } - } - } - - var subscripts = function(expr, allow_calls) { - var start = expr.start; - if (is("punc", ".")) { - next(); - return subscripts(new AST_Dot({ - start : start, - expression : expr, - property : as_name(), - end : prev() - }), allow_calls); - } - if (is("punc", "[")) { - next(); - var prop = expression(true); - expect("]"); - return subscripts(new AST_Sub({ - start : start, - expression : expr, - property : prop, - end : prev() - }), allow_calls); - } - if (allow_calls && is("punc", "(")) { - next(); - var call = new AST_Call({ - start : start, - expression : expr, - args : expr_list(")"), - end : prev() - }); - mark_pure(call); - return subscripts(call, true); - } - return expr; - }; - - var maybe_unary = function(allow_calls) { - var start = S.token; - if (is("operator") && UNARY_PREFIX[start.value]) { - next(); - handle_regexp(); - var ex = make_unary(AST_UnaryPrefix, start, maybe_unary(allow_calls)); - ex.start = start; - ex.end = prev(); - return ex; - } - var val = expr_atom(allow_calls); - while (is("operator") && UNARY_POSTFIX[S.token.value] && !has_newline_before(S.token)) { - val = make_unary(AST_UnaryPostfix, S.token, val); - val.start = start; - val.end = S.token; - next(); - } - return val; - }; - - function make_unary(ctor, token, expr) { - var op = token.value; - switch (op) { - case "++": - case "--": - if (!is_assignable(expr)) - croak("Invalid use of " + op + " operator", token.line, token.col, token.pos); - break; - case "delete": - if (expr instanceof AST_SymbolRef && S.input.has_directive("use strict")) - croak("Calling delete on expression not allowed in strict mode", expr.start.line, expr.start.col, expr.start.pos); - break; - } - return new ctor({ operator: op, expression: expr }); - } - - var expr_op = function(left, min_prec, no_in) { - var op = is("operator") ? S.token.value : null; - if (op == "in" && no_in) op = null; - var prec = op != null ? PRECEDENCE[op] : null; - if (prec != null && prec > min_prec) { - next(); - var right = expr_op(maybe_unary(true), prec, no_in); - return expr_op(new AST_Binary({ - start : left.start, - left : left, - operator : op, - right : right, - end : right.end - }), min_prec, no_in); - } - return left; - }; - - function expr_ops(no_in) { - return expr_op(maybe_unary(true), 0, no_in); - } - - var maybe_conditional = function(no_in) { - var start = S.token; - var expr = expr_ops(no_in); - if (is("operator", "?")) { - next(); - var yes = expression(false); - expect(":"); - return new AST_Conditional({ - start : start, - condition : expr, - consequent : yes, - alternative : expression(false, no_in), - end : prev() - }); - } - return expr; - }; - - function is_assignable(expr) { - return expr instanceof AST_PropAccess || expr instanceof AST_SymbolRef; - } - - var maybe_assign = function(no_in) { - var start = S.token; - var left = maybe_conditional(no_in), val = S.token.value; - if (is("operator") && ASSIGNMENT[val]) { - if (is_assignable(left)) { - next(); - return new AST_Assign({ - start : start, - left : left, - operator : val, - right : maybe_assign(no_in), - end : prev() - }); - } - croak("Invalid assignment"); - } - return left; - }; - - var expression = function(commas, no_in) { - var start = S.token; - var exprs = []; - while (true) { - exprs.push(maybe_assign(no_in)); - if (!commas || !is("punc", ",")) break; - next(); - commas = true; - } - return exprs.length == 1 ? exprs[0] : new AST_Sequence({ - start : start, - expressions : exprs, - end : peek() - }); - }; - - function in_loop(cont) { - ++S.in_loop; - var ret = cont(); - --S.in_loop; - return ret; - } - - if (options.expression) { - handle_regexp(); - return expression(true); - } - - return function() { - var start = S.token; - var body = []; - S.input.push_directives_stack(); - while (!is("eof")) - body.push(statement(true)); - S.input.pop_directives_stack(); - var end = prev(); - var toplevel = options.toplevel; - if (toplevel) { - toplevel.body = toplevel.body.concat(body); - toplevel.end = end; - } else { - toplevel = new AST_Toplevel({ start: start, body: body, end: end }); - } - return toplevel; - }(); -} diff --git a/node_modules/uglify-js/lib/propmangle.js b/node_modules/uglify-js/lib/propmangle.js deleted file mode 100644 index 9f8bc7fd2..000000000 --- a/node_modules/uglify-js/lib/propmangle.js +++ /dev/null @@ -1,234 +0,0 @@ -/*********************************************************************** - - A JavaScript tokenizer / parser / beautifier / compressor. - https://github.com/mishoo/UglifyJS2 - - -------------------------------- (C) --------------------------------- - - Author: Mihai Bazon - - http://mihai.bazon.net/blog - - Distributed under the BSD license: - - Copyright 2012 (c) Mihai Bazon - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions - are met: - - * Redistributions of source code must retain the above - copyright notice, this list of conditions and the following - disclaimer. - - * Redistributions in binary form must reproduce the above - copyright notice, this list of conditions and the following - disclaimer in the documentation and/or other materials - provided with the distribution. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER “AS IS” AND ANY - EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER BE - LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, - OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR - TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF - THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - SUCH DAMAGE. - - ***********************************************************************/ - -"use strict"; - -function find_builtins(reserved) { - // NaN will be included due to Number.NaN - [ - "null", - "true", - "false", - "Infinity", - "-Infinity", - "undefined", - ].forEach(add); - [ - Array, - Boolean, - Date, - Error, - Function, - Math, - Number, - Object, - RegExp, - String, - ].forEach(function(ctor) { - Object.getOwnPropertyNames(ctor).map(add); - if (ctor.prototype) { - Object.getOwnPropertyNames(ctor.prototype).map(add); - } - }); - - function add(name) { - push_uniq(reserved, name); - } -} - -function reserve_quoted_keys(ast, reserved) { - ast.walk(new TreeWalker(function(node) { - if (node instanceof AST_ObjectKeyVal && node.quote) { - add(node.key); - } else if (node instanceof AST_Sub) { - addStrings(node.property, add); - } - })); - - function add(name) { - push_uniq(reserved, name); - } -} - -function addStrings(node, add) { - node.walk(new TreeWalker(function(node) { - if (node instanceof AST_Sequence) { - addStrings(node.tail_node(), add); - } else if (node instanceof AST_String) { - add(node.value); - } else if (node instanceof AST_Conditional) { - addStrings(node.consequent, add); - addStrings(node.alternative, add); - } - return true; - })); -} - -function mangle_properties(ast, options) { - options = defaults(options, { - builtins: false, - cache: null, - debug: false, - keep_quoted: false, - only_cache: false, - regex: null, - reserved: null, - }, true); - - var reserved = options.reserved; - if (!Array.isArray(reserved)) reserved = []; - if (!options.builtins) find_builtins(reserved); - - var cname = -1; - var cache; - if (options.cache) { - cache = options.cache.props; - cache.each(function(mangled_name) { - push_uniq(reserved, mangled_name); - }); - } else { - cache = new Dictionary(); - } - - var regex = options.regex; - - // note debug is either false (disabled), or a string of the debug suffix to use (enabled). - // note debug may be enabled as an empty string, which is falsey. Also treat passing 'true' - // the same as passing an empty string. - var debug = options.debug !== false; - var debug_suffix; - if (debug) debug_suffix = options.debug === true ? "" : options.debug; - - var names_to_mangle = []; - var unmangleable = []; - - // step 1: find candidates to mangle - ast.walk(new TreeWalker(function(node) { - if (node instanceof AST_ObjectKeyVal) { - add(node.key); - } else if (node instanceof AST_ObjectProperty) { - // setter or getter, since KeyVal is handled above - add(node.key.name); - } else if (node instanceof AST_Dot) { - add(node.property); - } else if (node instanceof AST_Sub) { - addStrings(node.property, add); - } else if (node instanceof AST_Call - && node.expression.print_to_string() == "Object.defineProperty") { - addStrings(node.args[1], add); - } - })); - - // step 2: transform the tree, renaming properties - return ast.transform(new TreeTransformer(function(node) { - if (node instanceof AST_ObjectKeyVal) { - node.key = mangle(node.key); - } else if (node instanceof AST_ObjectProperty) { - // setter or getter - node.key.name = mangle(node.key.name); - } else if (node instanceof AST_Dot) { - node.property = mangle(node.property); - } else if (!options.keep_quoted && node instanceof AST_Sub) { - node.property = mangleStrings(node.property); - } else if (node instanceof AST_Call - && node.expression.print_to_string() == "Object.defineProperty") { - node.args[1] = mangleStrings(node.args[1]); - } - })); - - // only function declarations after this line - - function can_mangle(name) { - if (unmangleable.indexOf(name) >= 0) return false; - if (reserved.indexOf(name) >= 0) return false; - if (options.only_cache) return cache.has(name); - if (/^-?[0-9]+(\.[0-9]+)?(e[+-][0-9]+)?$/.test(name)) return false; - return true; - } - - function should_mangle(name) { - if (regex && !regex.test(name)) return false; - if (reserved.indexOf(name) >= 0) return false; - return cache.has(name) || names_to_mangle.indexOf(name) >= 0; - } - - function add(name) { - if (can_mangle(name)) push_uniq(names_to_mangle, name); - if (!should_mangle(name)) push_uniq(unmangleable, name); - } - - function mangle(name) { - if (!should_mangle(name)) { - return name; - } - var mangled = cache.get(name); - if (!mangled) { - if (debug) { - // debug mode: use a prefix and suffix to preserve readability, e.g. o.foo -> o._$foo$NNN_. - var debug_mangled = "_$" + name + "$" + debug_suffix + "_"; - if (can_mangle(debug_mangled)) mangled = debug_mangled; - } - // either debug mode is off, or it is on and we could not use the mangled name - if (!mangled) do { - mangled = base54(++cname); - } while (!can_mangle(mangled)); - cache.set(name, mangled); - } - return mangled; - } - - function mangleStrings(node) { - return node.transform(new TreeTransformer(function(node) { - if (node instanceof AST_Sequence) { - var last = node.expressions.length - 1; - node.expressions[last] = mangleStrings(node.expressions[last]); - } else if (node instanceof AST_String) { - node.value = mangle(node.value); - } else if (node instanceof AST_Conditional) { - node.consequent = mangleStrings(node.consequent); - node.alternative = mangleStrings(node.alternative); - } - return node; - })); - } -} diff --git a/node_modules/uglify-js/lib/scope.js b/node_modules/uglify-js/lib/scope.js deleted file mode 100644 index edefc29b6..000000000 --- a/node_modules/uglify-js/lib/scope.js +++ /dev/null @@ -1,616 +0,0 @@ -/*********************************************************************** - - A JavaScript tokenizer / parser / beautifier / compressor. - https://github.com/mishoo/UglifyJS2 - - -------------------------------- (C) --------------------------------- - - Author: Mihai Bazon - - http://mihai.bazon.net/blog - - Distributed under the BSD license: - - Copyright 2012 (c) Mihai Bazon - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions - are met: - - * Redistributions of source code must retain the above - copyright notice, this list of conditions and the following - disclaimer. - - * Redistributions in binary form must reproduce the above - copyright notice, this list of conditions and the following - disclaimer in the documentation and/or other materials - provided with the distribution. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER “AS IS” AND ANY - EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER BE - LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, - OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR - TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF - THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - SUCH DAMAGE. - - ***********************************************************************/ - -"use strict"; - -function SymbolDef(scope, orig, init) { - this.name = orig.name; - this.orig = [ orig ]; - this.init = init; - this.eliminated = 0; - this.scope = scope; - this.references = []; - this.replaced = 0; - this.global = false; - this.mangled_name = null; - this.undeclared = false; - this.id = SymbolDef.next_id++; - this.lambda = orig instanceof AST_SymbolLambda; -} - -SymbolDef.next_id = 1; - -SymbolDef.prototype = { - unmangleable: function(options) { - return this.global && !options.toplevel - || this.undeclared - || !options.eval && this.scope.pinned() - || options.keep_fnames - && (this.orig[0] instanceof AST_SymbolLambda - || this.orig[0] instanceof AST_SymbolDefun); - }, - mangle: function(options) { - var cache = options.cache && options.cache.props; - if (this.global && cache && cache.has(this.name)) { - this.mangled_name = cache.get(this.name); - } else if (!this.mangled_name && !this.unmangleable(options)) { - var def; - if (def = this.redefined()) { - this.mangled_name = def.mangled_name || def.name; - } else { - this.mangled_name = next_mangled_name(this.scope, options, this); - } - if (this.global && cache) { - cache.set(this.name, this.mangled_name); - } - } - }, - redefined: function() { - return this.defun && this.defun.variables.get(this.name); - } -}; - -AST_Toplevel.DEFMETHOD("figure_out_scope", function(options) { - options = defaults(options, { - cache: null, - ie8: false, - }); - - // pass 1: setup scope chaining and handle definitions - var self = this; - var scope = self.parent_scope = null; - var defun = null; - var tw = new TreeWalker(function(node, descend) { - if (node instanceof AST_Catch) { - var save_scope = scope; - scope = new AST_Scope(node); - scope.init_scope_vars(save_scope); - descend(); - scope = save_scope; - return true; - } - if (node instanceof AST_Scope) { - node.init_scope_vars(scope); - var save_scope = scope; - var save_defun = defun; - defun = scope = node; - descend(); - scope = save_scope; - defun = save_defun; - return true; - } - if (node instanceof AST_With) { - for (var s = scope; s; s = s.parent_scope) s.uses_with = true; - return; - } - if (node instanceof AST_Symbol) { - node.scope = scope; - } - if (node instanceof AST_Label) { - node.thedef = node; - node.references = []; - } - if (node instanceof AST_SymbolDefun) { - // This should be defined in the parent scope, as we encounter the - // AST_Defun node before getting to its AST_Symbol. - (node.scope = defun.parent_scope.resolve()).def_function(node, defun); - } else if (node instanceof AST_SymbolLambda) { - var def = defun.def_function(node, node.name == "arguments" ? undefined : defun); - if (options.ie8) def.defun = defun.parent_scope.resolve(); - } else if (node instanceof AST_SymbolVar) { - defun.def_variable(node, node.TYPE == "SymbolVar" ? null : undefined); - if (defun !== scope) { - node.mark_enclosed(options); - var def = scope.find_variable(node); - if (node.thedef !== def) { - node.thedef = def; - } - node.reference(options); - } - } else if (node instanceof AST_SymbolCatch) { - scope.def_variable(node).defun = defun; - } - }); - self.walk(tw); - - // pass 2: find back references and eval - self.globals = new Dictionary(); - var tw = new TreeWalker(function(node) { - if (node instanceof AST_LoopControl) { - if (node.label) node.label.thedef.references.push(node); - return true; - } - if (node instanceof AST_SymbolRef) { - var name = node.name; - if (name == "eval" && tw.parent() instanceof AST_Call) { - for (var s = node.scope; s && !s.uses_eval; s = s.parent_scope) { - s.uses_eval = true; - } - } - var sym = node.scope.find_variable(name); - if (!sym) { - sym = self.def_global(node); - } else if (sym.scope instanceof AST_Lambda && name == "arguments") { - sym.scope.uses_arguments = true; - } - node.thedef = sym; - node.reference(options); - return true; - } - // ensure mangling works if catch reuses a scope variable - if (node instanceof AST_SymbolCatch) { - var def = node.definition().redefined(); - if (def) for (var s = node.scope; s; s = s.parent_scope) { - push_uniq(s.enclosed, def); - if (s === def.scope) break; - } - return true; - } - }); - self.walk(tw); - - // pass 3: fix up any scoping issue with IE8 - if (options.ie8) self.walk(new TreeWalker(function(node) { - if (node instanceof AST_SymbolCatch) { - var scope = node.thedef.defun; - if (scope.name instanceof AST_SymbolLambda && scope.name.name == node.name) { - scope = scope.parent_scope.resolve(); - } - redefine(node, scope); - return true; - } - if (node instanceof AST_SymbolLambda) { - var def = node.thedef; - redefine(node, node.scope.parent_scope.resolve()); - if (typeof node.thedef.init !== "undefined") { - node.thedef.init = false; - } else if (def.init) { - node.thedef.init = def.init; - } - return true; - } - })); - - function redefine(node, scope) { - var name = node.name; - var old_def = node.thedef; - var new_def = scope.find_variable(name); - if (new_def) { - var redef; - while (redef = new_def.redefined()) new_def = redef; - } else { - new_def = self.globals.get(name) || scope.def_variable(node); - } - old_def.orig.concat(old_def.references).forEach(function(node) { - node.thedef = new_def; - node.reference(options); - }); - if (old_def.lambda) new_def.lambda = true; - if (new_def.undeclared) self.variables.set(name, new_def); - } -}); - -AST_Toplevel.DEFMETHOD("def_global", function(node) { - var globals = this.globals, name = node.name; - if (globals.has(name)) { - return globals.get(name); - } else { - var g = new SymbolDef(this, node); - g.undeclared = true; - g.global = true; - globals.set(name, g); - return g; - } -}); - -AST_Scope.DEFMETHOD("init_scope_vars", function(parent_scope) { - this.variables = new Dictionary(); // map name to AST_SymbolVar (variables defined in this scope; includes functions) - this.functions = new Dictionary(); // map name to AST_SymbolDefun (functions defined in this scope) - this.uses_with = false; // will be set to true if this or some nested scope uses the `with` statement - this.uses_eval = false; // will be set to true if this or nested scope uses the global `eval` - this.parent_scope = parent_scope; // the parent scope - this.enclosed = []; // a list of variables from this or outer scope(s) that are referenced from this or inner scopes - this.cname = -1; // the current index for mangling functions/variables -}); - -AST_Lambda.DEFMETHOD("init_scope_vars", function() { - AST_Scope.prototype.init_scope_vars.apply(this, arguments); - this.uses_arguments = false; - this.def_variable(new AST_SymbolFunarg({ - name: "arguments", - start: this.start, - end: this.end - })); -}); - -AST_Symbol.DEFMETHOD("mark_enclosed", function(options) { - var def = this.definition(); - for (var s = this.scope; s; s = s.parent_scope) { - push_uniq(s.enclosed, def); - if (options.keep_fnames) { - s.functions.each(function(d) { - push_uniq(def.scope.enclosed, d); - }); - } - if (s === def.scope) break; - } -}); - -AST_Symbol.DEFMETHOD("reference", function(options) { - this.definition().references.push(this); - this.mark_enclosed(options); -}); - -AST_Scope.DEFMETHOD("find_variable", function(name) { - if (name instanceof AST_Symbol) name = name.name; - return this.variables.get(name) - || (this.parent_scope && this.parent_scope.find_variable(name)); -}); - -AST_Scope.DEFMETHOD("def_function", function(symbol, init) { - var def = this.def_variable(symbol, init); - if (!def.init || def.init instanceof AST_Defun) def.init = init; - this.functions.set(symbol.name, def); - return def; -}); - -AST_Scope.DEFMETHOD("def_variable", function(symbol, init) { - var def = this.variables.get(symbol.name); - if (def) { - def.orig.push(symbol); - if (def.init instanceof AST_Function) def.init = init; - } else { - def = new SymbolDef(this, symbol, init); - this.variables.set(symbol.name, def); - def.global = !this.parent_scope; - } - return symbol.thedef = def; -}); - -AST_Lambda.DEFMETHOD("resolve", return_this); -AST_Scope.DEFMETHOD("resolve", function() { - return this.parent_scope.resolve(); -}); -AST_Toplevel.DEFMETHOD("resolve", return_this); - -function names_in_use(scope, options) { - var names = scope.names_in_use; - if (!names) { - scope.names_in_use = names = Object.create(scope.mangled_names || null); - scope.cname_holes = []; - var cache = options.cache && options.cache.props; - scope.enclosed.forEach(function(def) { - if (def.unmangleable(options)) names[def.name] = true; - if (def.global && cache && cache.has(def.name)) { - names[cache.get(def.name)] = true; - } - }); - } - return names; -} - -function next_mangled_name(scope, options, def) { - var in_use = names_in_use(scope, options); - var holes = scope.cname_holes; - var names = Object.create(null); - var scopes = [ scope ]; - def.references.forEach(function(sym) { - var scope = sym.scope; - do { - if (scopes.indexOf(scope) < 0) { - for (var name in names_in_use(scope, options)) { - names[name] = true; - } - scopes.push(scope); - } else break; - } while (scope = scope.parent_scope); - }); - var name; - for (var i = 0; i < holes.length; i++) { - name = base54(holes[i]); - if (names[name]) continue; - holes.splice(i, 1); - scope.names_in_use[name] = true; - return name; - } - while (true) { - name = base54(++scope.cname); - if (in_use[name] || RESERVED_WORDS[name] || options.reserved.has[name]) continue; - if (!names[name]) break; - holes.push(scope.cname); - } - scope.names_in_use[name] = true; - return name; -} - -AST_Symbol.DEFMETHOD("unmangleable", function(options) { - var def = this.definition(); - return !def || def.unmangleable(options); -}); - -// labels are always mangleable -AST_Label.DEFMETHOD("unmangleable", return_false); - -AST_Symbol.DEFMETHOD("unreferenced", function() { - return !this.definition().references.length && !this.scope.pinned(); -}); - -AST_Symbol.DEFMETHOD("definition", function() { - return this.thedef; -}); - -AST_Symbol.DEFMETHOD("global", function() { - return this.definition().global; -}); - -function _default_mangler_options(options) { - options = defaults(options, { - eval : false, - ie8 : false, - keep_fnames : false, - reserved : [], - toplevel : false, - }); - if (!Array.isArray(options.reserved)) options.reserved = []; - // Never mangle arguments - push_uniq(options.reserved, "arguments"); - options.reserved.has = makePredicate(options.reserved); - return options; -} - -AST_Toplevel.DEFMETHOD("mangle_names", function(options) { - options = _default_mangler_options(options); - - // We only need to mangle declaration nodes. Special logic wired - // into the code generator will display the mangled name if it's - // present (and for AST_SymbolRef-s it'll use the mangled name of - // the AST_SymbolDeclaration that it points to). - var lname = -1; - - if (options.cache && options.cache.props) { - var mangled_names = this.mangled_names = Object.create(null); - options.cache.props.each(function(mangled_name) { - mangled_names[mangled_name] = true; - }); - } - - var redefined = []; - var tw = new TreeWalker(function(node, descend) { - if (node instanceof AST_LabeledStatement) { - // lname is incremented when we get to the AST_Label - var save_nesting = lname; - descend(); - lname = save_nesting; - return true; - } - if (node instanceof AST_Scope) { - descend(); - if (options.cache && node instanceof AST_Toplevel) { - node.globals.each(mangle); - } - node.variables.each(function(def) { - if (!defer_redef(def)) mangle(def); - }); - return true; - } - if (node instanceof AST_Label) { - var name; - do { - name = base54(++lname); - } while (RESERVED_WORDS[name]); - node.mangled_name = name; - return true; - } - if (!options.ie8 && node instanceof AST_Catch) { - var def = node.argname.definition(); - var redef = defer_redef(def, node.argname); - descend(); - if (!redef) mangle(def); - return true; - } - }); - this.walk(tw); - redefined.forEach(mangle); - - function mangle(def) { - if (options.reserved.has[def.name]) return; - def.mangle(options); - } - - function defer_redef(def, node) { - var redef = def.redefined(); - if (!redef) return false; - redefined.push(def); - def.references.forEach(reference); - if (node) reference(node); - return true; - - function reference(sym) { - sym.thedef = redef; - sym.reference(options); - sym.thedef = def; - } - } -}); - -AST_Toplevel.DEFMETHOD("find_colliding_names", function(options) { - var cache = options.cache && options.cache.props; - var avoid = Object.create(null); - options.reserved.forEach(to_avoid); - this.globals.each(add_def); - this.walk(new TreeWalker(function(node) { - if (node instanceof AST_Scope) node.variables.each(add_def); - if (node instanceof AST_SymbolCatch) add_def(node.definition()); - })); - return avoid; - - function to_avoid(name) { - avoid[name] = true; - } - - function add_def(def) { - var name = def.name; - if (def.global && cache && cache.has(name)) name = cache.get(name); - else if (!def.unmangleable(options)) return; - to_avoid(name); - } -}); - -AST_Toplevel.DEFMETHOD("expand_names", function(options) { - base54.reset(); - base54.sort(); - options = _default_mangler_options(options); - var avoid = this.find_colliding_names(options); - var cname = 0; - this.globals.each(rename); - this.walk(new TreeWalker(function(node) { - if (node instanceof AST_Scope) node.variables.each(rename); - if (node instanceof AST_SymbolCatch) rename(node.definition()); - })); - - function next_name() { - var name; - do { - name = base54(cname++); - } while (avoid[name] || RESERVED_WORDS[name]); - return name; - } - - function rename(def) { - if (def.global && options.cache) return; - if (def.unmangleable(options)) return; - if (options.reserved.has[def.name]) return; - var redef = def.redefined(); - var name = redef ? redef.rename || redef.name : next_name(); - def.rename = name; - def.orig.forEach(function(sym) { - sym.name = name; - }); - def.references.forEach(function(sym) { - sym.name = name; - }); - } -}); - -AST_Node.DEFMETHOD("tail_node", return_this); -AST_Sequence.DEFMETHOD("tail_node", function() { - return this.expressions[this.expressions.length - 1]; -}); - -AST_Toplevel.DEFMETHOD("compute_char_frequency", function(options) { - options = _default_mangler_options(options); - base54.reset(); - try { - AST_Node.prototype.print = function(stream, force_parens) { - this._print(stream, force_parens); - if (this instanceof AST_Symbol && !this.unmangleable(options)) { - base54.consider(this.name, -1); - } else if (options.properties) { - if (this instanceof AST_Dot) { - base54.consider(this.property, -1); - } else if (this instanceof AST_Sub) { - skip_string(this.property); - } - } - }; - base54.consider(this.print_to_string(), 1); - } finally { - AST_Node.prototype.print = AST_Node.prototype._print; - } - base54.sort(); - - function skip_string(node) { - if (node instanceof AST_String) { - base54.consider(node.value, -1); - } else if (node instanceof AST_Conditional) { - skip_string(node.consequent); - skip_string(node.alternative); - } else if (node instanceof AST_Sequence) { - skip_string(node.tail_node()); - } - } -}); - -var base54 = (function() { - var freq = Object.create(null); - function init(chars) { - var array = []; - for (var i = 0; i < chars.length; i++) { - var ch = chars[i]; - array.push(ch); - freq[ch] = -1e-2 * i; - } - return array; - } - var digits = init("0123456789"); - var leading = init("abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ$_"); - var chars, frequency; - function reset() { - frequency = Object.create(freq); - } - base54.consider = function(str, delta) { - for (var i = str.length; --i >= 0;) { - frequency[str[i]] += delta; - } - }; - function compare(a, b) { - return frequency[b] - frequency[a]; - } - base54.sort = function() { - chars = leading.sort(compare).concat(digits.sort(compare)); - }; - base54.reset = reset; - reset(); - function base54(num) { - var ret = "", base = 54; - num++; - do { - num--; - ret += chars[num % base]; - num = Math.floor(num / base); - base = 64; - } while (num > 0); - return ret; - } - return base54; -})(); diff --git a/node_modules/uglify-js/lib/sourcemap.js b/node_modules/uglify-js/lib/sourcemap.js deleted file mode 100644 index 2feec45d6..000000000 --- a/node_modules/uglify-js/lib/sourcemap.js +++ /dev/null @@ -1,104 +0,0 @@ -/*********************************************************************** - - A JavaScript tokenizer / parser / beautifier / compressor. - https://github.com/mishoo/UglifyJS2 - - -------------------------------- (C) --------------------------------- - - Author: Mihai Bazon - - http://mihai.bazon.net/blog - - Distributed under the BSD license: - - Copyright 2012 (c) Mihai Bazon - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions - are met: - - * Redistributions of source code must retain the above - copyright notice, this list of conditions and the following - disclaimer. - - * Redistributions in binary form must reproduce the above - copyright notice, this list of conditions and the following - disclaimer in the documentation and/or other materials - provided with the distribution. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER “AS IS” AND ANY - EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER BE - LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, - OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR - TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF - THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - SUCH DAMAGE. - - ***********************************************************************/ - -"use strict"; - -// a small wrapper around fitzgen's source-map library -function SourceMap(options) { - options = defaults(options, { - file: null, - root: null, - orig: null, - orig_line_diff: 0, - dest_line_diff: 0, - }, true); - var generator = new MOZ_SourceMap.SourceMapGenerator({ - file: options.file, - sourceRoot: options.root - }); - var maps = options.orig && Object.create(null); - if (maps) for (var source in options.orig) { - var map = new MOZ_SourceMap.SourceMapConsumer(options.orig[source]); - if (Array.isArray(options.orig[source].sources)) { - map._sources.toArray().forEach(function(source) { - var sourceContent = map.sourceContentFor(source, true); - if (sourceContent) generator.setSourceContent(source, sourceContent); - }); - } - maps[source] = map; - } - return { - add: function(source, gen_line, gen_col, orig_line, orig_col, name) { - var map = maps && maps[source]; - if (map) { - var info = map.originalPositionFor({ - line: orig_line, - column: orig_col - }); - if (info.source === null) return; - source = info.source; - orig_line = info.line; - orig_col = info.column; - name = info.name || name; - } - generator.addMapping({ - name: name, - source: source, - generated: { - line: gen_line + options.dest_line_diff, - column: gen_col - }, - original: { - line: orig_line + options.orig_line_diff, - column: orig_col - } - }); - }, - get: function() { - return generator; - }, - toString: function() { - return JSON.stringify(generator.toJSON()); - } - }; -} diff --git a/node_modules/uglify-js/lib/transform.js b/node_modules/uglify-js/lib/transform.js deleted file mode 100644 index 5897aa774..000000000 --- a/node_modules/uglify-js/lib/transform.js +++ /dev/null @@ -1,185 +0,0 @@ -/*********************************************************************** - - A JavaScript tokenizer / parser / beautifier / compressor. - https://github.com/mishoo/UglifyJS2 - - -------------------------------- (C) --------------------------------- - - Author: Mihai Bazon - - http://mihai.bazon.net/blog - - Distributed under the BSD license: - - Copyright 2012 (c) Mihai Bazon - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions - are met: - - * Redistributions of source code must retain the above - copyright notice, this list of conditions and the following - disclaimer. - - * Redistributions in binary form must reproduce the above - copyright notice, this list of conditions and the following - disclaimer in the documentation and/or other materials - provided with the distribution. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER “AS IS” AND ANY - EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER BE - LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, - OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR - TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF - THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - SUCH DAMAGE. - - ***********************************************************************/ - -"use strict"; - -function TreeTransformer(before, after) { - TreeWalker.call(this); - this.before = before; - this.after = after; -} -TreeTransformer.prototype = new TreeWalker; - -(function(DEF) { - function do_list(list, tw) { - return MAP(list, function(node) { - return node.transform(tw, true); - }); - } - - DEF(AST_Node, noop); - DEF(AST_LabeledStatement, function(self, tw) { - self.label = self.label.transform(tw); - self.body = self.body.transform(tw); - }); - DEF(AST_SimpleStatement, function(self, tw) { - self.body = self.body.transform(tw); - }); - DEF(AST_Block, function(self, tw) { - self.body = do_list(self.body, tw); - }); - DEF(AST_Do, function(self, tw) { - self.body = self.body.transform(tw); - self.condition = self.condition.transform(tw); - }); - DEF(AST_While, function(self, tw) { - self.condition = self.condition.transform(tw); - self.body = self.body.transform(tw); - }); - DEF(AST_For, function(self, tw) { - if (self.init) self.init = self.init.transform(tw); - if (self.condition) self.condition = self.condition.transform(tw); - if (self.step) self.step = self.step.transform(tw); - self.body = self.body.transform(tw); - }); - DEF(AST_ForIn, function(self, tw) { - self.init = self.init.transform(tw); - self.object = self.object.transform(tw); - self.body = self.body.transform(tw); - }); - DEF(AST_With, function(self, tw) { - self.expression = self.expression.transform(tw); - self.body = self.body.transform(tw); - }); - DEF(AST_Exit, function(self, tw) { - if (self.value) self.value = self.value.transform(tw); - }); - DEF(AST_LoopControl, function(self, tw) { - if (self.label) self.label = self.label.transform(tw); - }); - DEF(AST_If, function(self, tw) { - self.condition = self.condition.transform(tw); - self.body = self.body.transform(tw); - if (self.alternative) self.alternative = self.alternative.transform(tw); - }); - DEF(AST_Switch, function(self, tw) { - self.expression = self.expression.transform(tw); - self.body = do_list(self.body, tw); - }); - DEF(AST_Case, function(self, tw) { - self.expression = self.expression.transform(tw); - self.body = do_list(self.body, tw); - }); - DEF(AST_Try, function(self, tw) { - self.body = do_list(self.body, tw); - if (self.bcatch) self.bcatch = self.bcatch.transform(tw); - if (self.bfinally) self.bfinally = self.bfinally.transform(tw); - }); - DEF(AST_Catch, function(self, tw) { - self.argname = self.argname.transform(tw); - self.body = do_list(self.body, tw); - }); - DEF(AST_Definitions, function(self, tw) { - self.definitions = do_list(self.definitions, tw); - }); - DEF(AST_VarDef, function(self, tw) { - self.name = self.name.transform(tw); - if (self.value) self.value = self.value.transform(tw); - }); - DEF(AST_Lambda, function(self, tw) { - if (self.name) self.name = self.name.transform(tw); - self.argnames = do_list(self.argnames, tw); - self.body = do_list(self.body, tw); - }); - DEF(AST_Call, function(self, tw) { - self.expression = self.expression.transform(tw); - self.args = do_list(self.args, tw); - }); - DEF(AST_Sequence, function(self, tw) { - self.expressions = do_list(self.expressions, tw); - }); - DEF(AST_Dot, function(self, tw) { - self.expression = self.expression.transform(tw); - }); - DEF(AST_Sub, function(self, tw) { - self.expression = self.expression.transform(tw); - self.property = self.property.transform(tw); - }); - DEF(AST_Unary, function(self, tw) { - self.expression = self.expression.transform(tw); - }); - DEF(AST_Binary, function(self, tw) { - self.left = self.left.transform(tw); - self.right = self.right.transform(tw); - }); - DEF(AST_Conditional, function(self, tw) { - self.condition = self.condition.transform(tw); - self.consequent = self.consequent.transform(tw); - self.alternative = self.alternative.transform(tw); - }); - DEF(AST_Array, function(self, tw) { - self.elements = do_list(self.elements, tw); - }); - DEF(AST_Object, function(self, tw) { - self.properties = do_list(self.properties, tw); - }); - DEF(AST_ObjectProperty, function(self, tw) { - self.value = self.value.transform(tw); - }); -})(function(node, descend) { - node.DEFMETHOD("transform", function(tw, in_list) { - var x, y; - tw.push(this); - if (tw.before) x = tw.before(this, descend, in_list); - if (typeof x === "undefined") { - x = this; - descend(x, tw); - if (tw.after) { - y = tw.after(x, in_list); - if (typeof y !== "undefined") x = y; - } - } - tw.pop(); - return x; - }); -}); diff --git a/node_modules/uglify-js/lib/utils.js b/node_modules/uglify-js/lib/utils.js deleted file mode 100644 index 6ac68bbd9..000000000 --- a/node_modules/uglify-js/lib/utils.js +++ /dev/null @@ -1,275 +0,0 @@ -/*********************************************************************** - - A JavaScript tokenizer / parser / beautifier / compressor. - https://github.com/mishoo/UglifyJS2 - - -------------------------------- (C) --------------------------------- - - Author: Mihai Bazon - - http://mihai.bazon.net/blog - - Distributed under the BSD license: - - Copyright 2012 (c) Mihai Bazon - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions - are met: - - * Redistributions of source code must retain the above - copyright notice, this list of conditions and the following - disclaimer. - - * Redistributions in binary form must reproduce the above - copyright notice, this list of conditions and the following - disclaimer in the documentation and/or other materials - provided with the distribution. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER “AS IS” AND ANY - EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER BE - LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, - OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR - TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF - THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - SUCH DAMAGE. - - ***********************************************************************/ - -"use strict"; - -function characters(str) { - return str.split(""); -} - -function member(name, array) { - return array.indexOf(name) >= 0; -} - -function find_if(func, array) { - for (var i = array.length; --i >= 0;) if (func(array[i])) return array[i]; -} - -function repeat_string(str, i) { - if (i <= 0) return ""; - if (i == 1) return str; - var d = repeat_string(str, i >> 1); - d += d; - return i & 1 ? d + str : d; -} - -function configure_error_stack(fn) { - Object.defineProperty(fn.prototype, "stack", { - get: function() { - var err = new Error(this.message); - err.name = this.name; - try { - throw err; - } catch (e) { - return e.stack; - } - } - }); -} - -function DefaultsError(msg, defs) { - this.message = msg; - this.defs = defs; -} -DefaultsError.prototype = Object.create(Error.prototype); -DefaultsError.prototype.constructor = DefaultsError; -DefaultsError.prototype.name = "DefaultsError"; -configure_error_stack(DefaultsError); - -function defaults(args, defs, croak) { - if (args === true) args = {}; - var ret = args || {}; - if (croak) for (var i in ret) if (HOP(ret, i) && !HOP(defs, i)) { - throw new DefaultsError("`" + i + "` is not a supported option", defs); - } - for (var i in defs) if (HOP(defs, i)) { - ret[i] = (args && HOP(args, i)) ? args[i] : defs[i]; - } - return ret; -} - -function merge(obj, ext) { - var count = 0; - for (var i in ext) if (HOP(ext, i)) { - obj[i] = ext[i]; - count++; - } - return count; -} - -function noop() {} -function return_false() { return false; } -function return_true() { return true; } -function return_this() { return this; } -function return_null() { return null; } - -var MAP = (function() { - function MAP(a, f, backwards) { - var ret = [], top = [], i; - function doit() { - var val = f(a[i], i); - var is_last = val instanceof Last; - if (is_last) val = val.v; - if (val instanceof AtTop) { - val = val.v; - if (val instanceof Splice) { - top.push.apply(top, backwards ? val.v.slice().reverse() : val.v); - } else { - top.push(val); - } - } else if (val !== skip) { - if (val instanceof Splice) { - ret.push.apply(ret, backwards ? val.v.slice().reverse() : val.v); - } else { - ret.push(val); - } - } - return is_last; - } - if (Array.isArray(a)) { - if (backwards) { - for (i = a.length; --i >= 0;) if (doit()) break; - ret.reverse(); - top.reverse(); - } else { - for (i = 0; i < a.length; ++i) if (doit()) break; - } - } else { - for (i in a) if (HOP(a, i)) if (doit()) break; - } - return top.concat(ret); - } - MAP.at_top = function(val) { return new AtTop(val) }; - MAP.splice = function(val) { return new Splice(val) }; - MAP.last = function(val) { return new Last(val) }; - var skip = MAP.skip = {}; - function AtTop(val) { this.v = val } - function Splice(val) { this.v = val } - function Last(val) { this.v = val } - return MAP; -})(); - -function push_uniq(array, el) { - if (array.indexOf(el) < 0) return array.push(el); -} - -function string_template(text, props) { - return text.replace(/\{(.+?)\}/g, function(str, p) { - return props && props[p]; - }); -} - -function remove(array, el) { - var index = array.indexOf(el); - if (index >= 0) array.splice(index, 1); -} - -function makePredicate(words) { - if (!Array.isArray(words)) words = words.split(" "); - var map = Object.create(null); - words.forEach(function(word) { - map[word] = true; - }); - return map; -} - -function all(array, predicate) { - for (var i = array.length; --i >= 0;) - if (!predicate(array[i])) - return false; - return true; -} - -function Dictionary() { - this._values = Object.create(null); - this._size = 0; -} -Dictionary.prototype = { - set: function(key, val) { - if (!this.has(key)) ++this._size; - this._values["$" + key] = val; - return this; - }, - add: function(key, val) { - if (this.has(key)) { - this.get(key).push(val); - } else { - this.set(key, [ val ]); - } - return this; - }, - get: function(key) { return this._values["$" + key] }, - del: function(key) { - if (this.has(key)) { - --this._size; - delete this._values["$" + key]; - } - return this; - }, - has: function(key) { return ("$" + key) in this._values }, - each: function(f) { - for (var i in this._values) - f(this._values[i], i.substr(1)); - }, - size: function() { - return this._size; - }, - map: function(f) { - var ret = []; - for (var i in this._values) - ret.push(f(this._values[i], i.substr(1))); - return ret; - }, - clone: function() { - var ret = new Dictionary(); - for (var i in this._values) - ret._values[i] = this._values[i]; - ret._size = this._size; - return ret; - }, - toObject: function() { return this._values } -}; -Dictionary.fromObject = function(obj) { - var dict = new Dictionary(); - dict._size = merge(dict._values, obj); - return dict; -}; - -function HOP(obj, prop) { - return Object.prototype.hasOwnProperty.call(obj, prop); -} - -// return true if the node at the top of the stack (that means the -// innermost node in the current output) is lexically the first in -// a statement. -function first_in_statement(stack) { - var node = stack.parent(-1); - for (var i = 0, p; p = stack.parent(i++); node = p) { - if (p.TYPE == "Call") { - if (p.expression === node) continue; - } else if (p instanceof AST_Binary) { - if (p.left === node) continue; - } else if (p instanceof AST_Conditional) { - if (p.condition === node) continue; - } else if (p instanceof AST_PropAccess) { - if (p.expression === node) continue; - } else if (p instanceof AST_Sequence) { - if (p.expressions[0] === node) continue; - } else if (p instanceof AST_Statement) { - return p.body === node; - } else if (p instanceof AST_UnaryPostfix) { - if (p.expression === node) continue; - } - return false; - } -} diff --git a/node_modules/uglify-js/package.json b/node_modules/uglify-js/package.json deleted file mode 100644 index 573ae7aba..000000000 --- a/node_modules/uglify-js/package.json +++ /dev/null @@ -1,108 +0,0 @@ -{ - "_args": [ - [ - "uglify-js@3.6.8", - "/Users/drew.heavner/Documents/Github/sign-android-release" - ] - ], - "_development": true, - "_from": "uglify-js@3.6.8", - "_id": "uglify-js@3.6.8", - "_inBundle": false, - "_integrity": "sha512-XhHJ3S3ZyMwP8kY1Gkugqx3CJh2C3O0y8NPiSxtm1tyD/pktLAkFZsFGpuNfTZddKDQ/bbDBLAd2YyA1pbi8HQ==", - "_location": "/uglify-js", - "_optional": true, - "_phantomChildren": {}, - "_requested": { - "type": "version", - "registry": true, - "raw": "uglify-js@3.6.8", - "name": "uglify-js", - "escapedName": "uglify-js", - "rawSpec": "3.6.8", - "saveSpec": null, - "fetchSpec": "3.6.8" - }, - "_requiredBy": [ - "/handlebars" - ], - "_resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.6.8.tgz", - "_spec": "3.6.8", - "_where": "/Users/drew.heavner/Documents/Github/sign-android-release", - "author": { - "name": "Mihai Bazon", - "email": "mihai.bazon@gmail.com", - "url": "http://lisperator.net/" - }, - "bin": { - "uglifyjs": "bin/uglifyjs" - }, - "bugs": { - "url": "https://github.com/mishoo/UglifyJS2/issues" - }, - "dependencies": { - "commander": "~2.20.3", - "source-map": "~0.6.1" - }, - "description": "JavaScript parser, mangler/compressor and beautifier toolkit", - "devDependencies": { - "acorn": "~7.1.0", - "semver": "~6.3.0" - }, - "engines": { - "node": ">=0.8.0" - }, - "files": [ - "bin", - "lib", - "tools", - "LICENSE" - ], - "homepage": "https://github.com/mishoo/UglifyJS2#readme", - "keywords": [ - "cli", - "compress", - "compressor", - "ecma", - "ecmascript", - "es", - "es5", - "javascript", - "js", - "jsmin", - "min", - "minification", - "minifier", - "minify", - "optimize", - "optimizer", - "pack", - "packer", - "parse", - "parser", - "uglifier", - "uglify" - ], - "license": "BSD-2-Clause", - "main": "tools/node.js", - "maintainers": [ - { - "name": "Alex Lam", - "email": "alexlamsl@gmail.com" - }, - { - "name": "Mihai Bazon", - "email": "mihai.bazon@gmail.com", - "url": "http://lisperator.net/" - } - ], - "name": "uglify-js", - "repository": { - "type": "git", - "url": "git+https://github.com/mishoo/UglifyJS2.git" - }, - "scripts": { - "test": "node test/compress.js && node test/mocha.js" - }, - "version": "3.6.8" -} diff --git a/node_modules/uglify-js/tools/domprops.json b/node_modules/uglify-js/tools/domprops.json deleted file mode 100644 index 15bb2087f..000000000 --- a/node_modules/uglify-js/tools/domprops.json +++ /dev/null @@ -1,6850 +0,0 @@ -[ - "$&", - "$'", - "$*", - "$+", - "$1", - "$2", - "$3", - "$4", - "$5", - "$6", - "$7", - "$8", - "$9", - "$_", - "$`", - "$input", - "-moz-animation", - "-moz-animation-delay", - "-moz-animation-direction", - "-moz-animation-duration", - "-moz-animation-fill-mode", - "-moz-animation-iteration-count", - "-moz-animation-name", - "-moz-animation-play-state", - "-moz-animation-timing-function", - "-moz-appearance", - "-moz-backface-visibility", - "-moz-binding", - "-moz-border-end", - "-moz-border-end-color", - "-moz-border-end-style", - "-moz-border-end-width", - "-moz-border-image", - "-moz-border-start", - "-moz-border-start-color", - "-moz-border-start-style", - "-moz-border-start-width", - "-moz-box-align", - "-moz-box-direction", - "-moz-box-flex", - "-moz-box-ordinal-group", - "-moz-box-orient", - "-moz-box-pack", - "-moz-box-sizing", - "-moz-column-count", - "-moz-column-fill", - "-moz-column-gap", - "-moz-column-rule", - "-moz-column-rule-color", - "-moz-column-rule-style", - "-moz-column-rule-width", - "-moz-column-width", - "-moz-columns", - "-moz-float-edge", - "-moz-font-feature-settings", - "-moz-font-language-override", - "-moz-force-broken-image-icon", - "-moz-hyphens", - "-moz-image-region", - "-moz-margin-end", - "-moz-margin-start", - "-moz-orient", - "-moz-outline-radius", - "-moz-outline-radius-bottomleft", - "-moz-outline-radius-bottomright", - "-moz-outline-radius-topleft", - "-moz-outline-radius-topright", - "-moz-padding-end", - "-moz-padding-start", - "-moz-perspective", - "-moz-perspective-origin", - "-moz-stack-sizing", - "-moz-tab-size", - "-moz-text-size-adjust", - "-moz-transform", - "-moz-transform-origin", - "-moz-transform-style", - "-moz-transition", - "-moz-transition-delay", - "-moz-transition-duration", - "-moz-transition-property", - "-moz-transition-timing-function", - "-moz-user-focus", - "-moz-user-input", - "-moz-user-modify", - "-moz-user-select", - "-moz-window-dragging", - "-webkit-align-content", - "-webkit-align-items", - "-webkit-align-self", - "-webkit-animation", - "-webkit-animation-delay", - "-webkit-animation-direction", - "-webkit-animation-duration", - "-webkit-animation-fill-mode", - "-webkit-animation-iteration-count", - "-webkit-animation-name", - "-webkit-animation-play-state", - "-webkit-animation-timing-function", - "-webkit-appearance", - "-webkit-backface-visibility", - "-webkit-background-clip", - "-webkit-background-origin", - "-webkit-background-size", - "-webkit-border-bottom-left-radius", - "-webkit-border-bottom-right-radius", - "-webkit-border-image", - "-webkit-border-radius", - "-webkit-border-top-left-radius", - "-webkit-border-top-right-radius", - "-webkit-box-align", - "-webkit-box-direction", - "-webkit-box-flex", - "-webkit-box-ordinal-group", - "-webkit-box-orient", - "-webkit-box-pack", - "-webkit-box-shadow", - "-webkit-box-sizing", - "-webkit-filter", - "-webkit-flex", - "-webkit-flex-basis", - "-webkit-flex-direction", - "-webkit-flex-flow", - "-webkit-flex-grow", - "-webkit-flex-shrink", - "-webkit-flex-wrap", - "-webkit-justify-content", - "-webkit-mask", - "-webkit-mask-clip", - "-webkit-mask-composite", - "-webkit-mask-image", - "-webkit-mask-origin", - "-webkit-mask-position", - "-webkit-mask-position-x", - "-webkit-mask-position-y", - "-webkit-mask-repeat", - "-webkit-mask-size", - "-webkit-order", - "-webkit-perspective", - "-webkit-perspective-origin", - "-webkit-text-fill-color", - "-webkit-text-size-adjust", - "-webkit-text-stroke", - "-webkit-text-stroke-color", - "-webkit-text-stroke-width", - "-webkit-transform", - "-webkit-transform-origin", - "-webkit-transform-style", - "-webkit-transition", - "-webkit-transition-delay", - "-webkit-transition-duration", - "-webkit-transition-property", - "-webkit-transition-timing-function", - "-webkit-user-select", - "@@iterator", - "ABORT_ERR", - "ACTIVE", - "ACTIVE_ATTRIBUTES", - "ACTIVE_TEXTURE", - "ACTIVE_UNIFORMS", - "ADDITION", - "ALIASED_LINE_WIDTH_RANGE", - "ALIASED_POINT_SIZE_RANGE", - "ALLOW_KEYBOARD_INPUT", - "ALLPASS", - "ALPHA", - "ALPHA_BITS", - "ALT_MASK", - "ALWAYS", - "ANGLE_instanced_arrays", - "ANY_TYPE", - "ANY_UNORDERED_NODE_TYPE", - "ARRAY_BUFFER", - "ARRAY_BUFFER_BINDING", - "ATTACHED_SHADERS", - "ATTRIBUTE_NODE", - "AT_TARGET", - "AbortController", - "AbortSignal", - "AbsoluteOrientationSensor", - "Accelerometer", - "ActiveXObject", - "AddSearchProvider", - "AesGcmEncryptResult", - "AnalyserNode", - "Animation", - "AnimationEffect", - "AnimationEvent", - "AnimationPlaybackEvent", - "AnonXMLHttpRequest", - "ApplicationCache", - "ApplicationCacheErrorEvent", - "Array", - "ArrayBuffer", - "Atomics", - "Attr", - "Audio", - "AudioBuffer", - "AudioBufferSourceNode", - "AudioContext", - "AudioDestinationNode", - "AudioListener", - "AudioNode", - "AudioParam", - "AudioParamMap", - "AudioProcessingEvent", - "AudioScheduledSourceNode", - "AudioStreamTrack", - "AudioTrack", - "AudioTrackList", - "AudioWorklet", - "AudioWorkletNode", - "AuthenticatorAssertionResponse", - "AuthenticatorAttestationResponse", - "AuthenticatorResponse", - "AutocompleteErrorEvent", - "BACK", - "BAD_BOUNDARYPOINTS_ERR", - "BANDPASS", - "BLEND", - "BLEND_COLOR", - "BLEND_DST_ALPHA", - "BLEND_DST_RGB", - "BLEND_EQUATION", - "BLEND_EQUATION_ALPHA", - "BLEND_EQUATION_RGB", - "BLEND_SRC_ALPHA", - "BLEND_SRC_RGB", - "BLUE_BITS", - "BLUR", - "BOOL", - "BOOLEAN_TYPE", - "BOOL_VEC2", - "BOOL_VEC3", - "BOOL_VEC4", - "BOTH", - "BROWSER_DEFAULT_WEBGL", - "BUBBLING_PHASE", - "BUFFER_SIZE", - "BUFFER_USAGE", - "BYTE", - "BYTES_PER_ELEMENT", - "BarProp", - "BaseAudioContext", - "BaseHref", - "BatteryManager", - "BeforeInstallPromptEvent", - "BeforeLoadEvent", - "BeforeUnloadEvent", - "BigInt", - "BigInt64Array", - "BigUint64Array", - "BiquadFilterNode", - "Blob", - "BlobEvent", - "Bluetooth", - "BluetoothCharacteristicProperties", - "BluetoothDevice", - "BluetoothRemoteGATTCharacteristic", - "BluetoothRemoteGATTDescriptor", - "BluetoothRemoteGATTServer", - "BluetoothRemoteGATTService", - "BluetoothUUID", - "BookmarkCollection", - "Boolean", - "BroadcastChannel", - "ByteLengthQueuingStrategy", - "CANNOT_RUN", - "CAPTURING_PHASE", - "CCW", - "CDATASection", - "CDATA_SECTION_NODE", - "CHANGE", - "CHARSET_RULE", - "CHECKING", - "CLAMP_TO_EDGE", - "CLICK", - "CLOSED", - "CLOSING", - "COLOR_ATTACHMENT0", - "COLOR_BUFFER_BIT", - "COLOR_CLEAR_VALUE", - "COLOR_WRITEMASK", - "COMMENT_NODE", - "COMPILE_STATUS", - "COMPRESSED_RGBA_S3TC_DXT1_EXT", - "COMPRESSED_RGBA_S3TC_DXT3_EXT", - "COMPRESSED_RGBA_S3TC_DXT5_EXT", - "COMPRESSED_RGB_S3TC_DXT1_EXT", - "COMPRESSED_TEXTURE_FORMATS", - "CONNECTING", - "CONSTANT_ALPHA", - "CONSTANT_COLOR", - "CONSTRAINT_ERR", - "CONTENT", - "CONTEXT_LOST_WEBGL", - "CONTROL_MASK", - "COUNTER_STYLE_RULE", - "CSS", - "CSS2Properties", - "CSSCharsetRule", - "CSSConditionRule", - "CSSCounterStyleRule", - "CSSFontFaceRule", - "CSSFontFeatureValuesRule", - "CSSGroupingRule", - "CSSImageValue", - "CSSImportRule", - "CSSKeyframeRule", - "CSSKeyframesRule", - "CSSKeywordValue", - "CSSMathInvert", - "CSSMathMax", - "CSSMathMin", - "CSSMathNegate", - "CSSMathProduct", - "CSSMathSum", - "CSSMathValue", - "CSSMatrixComponent", - "CSSMediaRule", - "CSSMozDocumentRule", - "CSSNameSpaceRule", - "CSSNamespaceRule", - "CSSNumericArray", - "CSSNumericValue", - "CSSPageRule", - "CSSPerspective", - "CSSPositionValue", - "CSSPrimitiveValue", - "CSSRotate", - "CSSRule", - "CSSRuleList", - "CSSScale", - "CSSSkew", - "CSSSkewX", - "CSSSkewY", - "CSSStyleDeclaration", - "CSSStyleRule", - "CSSStyleSheet", - "CSSStyleValue", - "CSSSupportsRule", - "CSSTransformComponent", - "CSSTransformValue", - "CSSTranslate", - "CSSUnitValue", - "CSSUnknownRule", - "CSSUnparsedValue", - "CSSValue", - "CSSValueList", - "CSSVariableReferenceValue", - "CSSVariablesDeclaration", - "CSSVariablesRule", - "CSSViewportRule", - "CSS_ATTR", - "CSS_CM", - "CSS_COUNTER", - "CSS_CUSTOM", - "CSS_DEG", - "CSS_DIMENSION", - "CSS_EMS", - "CSS_EXS", - "CSS_FILTER_BLUR", - "CSS_FILTER_BRIGHTNESS", - "CSS_FILTER_CONTRAST", - "CSS_FILTER_CUSTOM", - "CSS_FILTER_DROP_SHADOW", - "CSS_FILTER_GRAYSCALE", - "CSS_FILTER_HUE_ROTATE", - "CSS_FILTER_INVERT", - "CSS_FILTER_OPACITY", - "CSS_FILTER_REFERENCE", - "CSS_FILTER_SATURATE", - "CSS_FILTER_SEPIA", - "CSS_GRAD", - "CSS_HZ", - "CSS_IDENT", - "CSS_IN", - "CSS_INHERIT", - "CSS_KHZ", - "CSS_MATRIX", - "CSS_MATRIX3D", - "CSS_MM", - "CSS_MS", - "CSS_NUMBER", - "CSS_PC", - "CSS_PERCENTAGE", - "CSS_PERSPECTIVE", - "CSS_PRIMITIVE_VALUE", - "CSS_PT", - "CSS_PX", - "CSS_RAD", - "CSS_RECT", - "CSS_RGBCOLOR", - "CSS_ROTATE", - "CSS_ROTATE3D", - "CSS_ROTATEX", - "CSS_ROTATEY", - "CSS_ROTATEZ", - "CSS_S", - "CSS_SCALE", - "CSS_SCALE3D", - "CSS_SCALEX", - "CSS_SCALEY", - "CSS_SCALEZ", - "CSS_SKEW", - "CSS_SKEWX", - "CSS_SKEWY", - "CSS_STRING", - "CSS_TRANSLATE", - "CSS_TRANSLATE3D", - "CSS_TRANSLATEX", - "CSS_TRANSLATEY", - "CSS_TRANSLATEZ", - "CSS_UNKNOWN", - "CSS_URI", - "CSS_VALUE_LIST", - "CSS_VH", - "CSS_VMAX", - "CSS_VMIN", - "CSS_VW", - "CULL_FACE", - "CULL_FACE_MODE", - "CURRENT_PROGRAM", - "CURRENT_VERTEX_ATTRIB", - "CUSTOM", - "CW", - "Cache", - "CacheStorage", - "CanvasCaptureMediaStream", - "CanvasCaptureMediaStreamTrack", - "CanvasGradient", - "CanvasPattern", - "CanvasPixelArray", - "CanvasRenderingContext2D", - "CaretPosition", - "ChannelMergerNode", - "ChannelSplitterNode", - "CharacterData", - "Chrome PDF Plugin", - "Chrome PDF Viewer", - "ClientRect", - "ClientRectList", - "Clipboard", - "ClipboardEvent", - "CloseEvent", - "Collator", - "CollectGarbage", - "CommandEvent", - "Comment", - "CompileError", - "CompositionEvent", - "Console", - "ConstantSourceNode", - "ControlRangeCollection", - "Controllers", - "ConvolverNode", - "Coordinates", - "CountQueuingStrategy", - "Counter", - "Credential", - "CredentialsContainer", - "Crypto", - "CryptoKey", - "CryptoOperation", - "CustomElementRegistry", - "CustomEvent", - "DATABASE_ERR", - "DATA_CLONE_ERR", - "DATA_ERR", - "DBLCLICK", - "DECR", - "DECR_WRAP", - "DELETE_STATUS", - "DEPTH_ATTACHMENT", - "DEPTH_BITS", - "DEPTH_BUFFER_BIT", - "DEPTH_CLEAR_VALUE", - "DEPTH_COMPONENT", - "DEPTH_COMPONENT16", - "DEPTH_FUNC", - "DEPTH_RANGE", - "DEPTH_STENCIL", - "DEPTH_STENCIL_ATTACHMENT", - "DEPTH_TEST", - "DEPTH_WRITEMASK", - "DIRECTION_DOWN", - "DIRECTION_LEFT", - "DIRECTION_RIGHT", - "DIRECTION_UP", - "DISABLED", - "DISPATCH_REQUEST_ERR", - "DITHER", - "DOCUMENT_FRAGMENT_NODE", - "DOCUMENT_NODE", - "DOCUMENT_POSITION_CONTAINED_BY", - "DOCUMENT_POSITION_CONTAINS", - "DOCUMENT_POSITION_DISCONNECTED", - "DOCUMENT_POSITION_FOLLOWING", - "DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC", - "DOCUMENT_POSITION_PRECEDING", - "DOCUMENT_TYPE_NODE", - "DOMCursor", - "DOMError", - "DOMException", - "DOMImplementation", - "DOMImplementationLS", - "DOMMatrix", - "DOMMatrixReadOnly", - "DOMParser", - "DOMPoint", - "DOMPointReadOnly", - "DOMQuad", - "DOMRect", - "DOMRectList", - "DOMRectReadOnly", - "DOMRequest", - "DOMSTRING_SIZE_ERR", - "DOMSettableTokenList", - "DOMStringList", - "DOMStringMap", - "DOMTokenList", - "DOMTransactionEvent", - "DOM_DELTA_LINE", - "DOM_DELTA_PAGE", - "DOM_DELTA_PIXEL", - "DOM_INPUT_METHOD_DROP", - "DOM_INPUT_METHOD_HANDWRITING", - "DOM_INPUT_METHOD_IME", - "DOM_INPUT_METHOD_KEYBOARD", - "DOM_INPUT_METHOD_MULTIMODAL", - "DOM_INPUT_METHOD_OPTION", - "DOM_INPUT_METHOD_PASTE", - "DOM_INPUT_METHOD_SCRIPT", - "DOM_INPUT_METHOD_UNKNOWN", - "DOM_INPUT_METHOD_VOICE", - "DOM_KEY_LOCATION_JOYSTICK", - "DOM_KEY_LOCATION_LEFT", - "DOM_KEY_LOCATION_MOBILE", - "DOM_KEY_LOCATION_NUMPAD", - "DOM_KEY_LOCATION_RIGHT", - "DOM_KEY_LOCATION_STANDARD", - "DOM_VK_0", - "DOM_VK_1", - "DOM_VK_2", - "DOM_VK_3", - "DOM_VK_4", - "DOM_VK_5", - "DOM_VK_6", - "DOM_VK_7", - "DOM_VK_8", - "DOM_VK_9", - "DOM_VK_A", - "DOM_VK_ACCEPT", - "DOM_VK_ADD", - "DOM_VK_ALT", - "DOM_VK_ALTGR", - "DOM_VK_AMPERSAND", - "DOM_VK_ASTERISK", - "DOM_VK_AT", - "DOM_VK_ATTN", - "DOM_VK_B", - "DOM_VK_BACKSPACE", - "DOM_VK_BACK_QUOTE", - "DOM_VK_BACK_SLASH", - "DOM_VK_BACK_SPACE", - "DOM_VK_C", - "DOM_VK_CANCEL", - "DOM_VK_CAPS_LOCK", - "DOM_VK_CIRCUMFLEX", - "DOM_VK_CLEAR", - "DOM_VK_CLOSE_BRACKET", - "DOM_VK_CLOSE_CURLY_BRACKET", - "DOM_VK_CLOSE_PAREN", - "DOM_VK_COLON", - "DOM_VK_COMMA", - "DOM_VK_CONTEXT_MENU", - "DOM_VK_CONTROL", - "DOM_VK_CONVERT", - "DOM_VK_CRSEL", - "DOM_VK_CTRL", - "DOM_VK_D", - "DOM_VK_DECIMAL", - "DOM_VK_DELETE", - "DOM_VK_DIVIDE", - "DOM_VK_DOLLAR", - "DOM_VK_DOUBLE_QUOTE", - "DOM_VK_DOWN", - "DOM_VK_E", - "DOM_VK_EISU", - "DOM_VK_END", - "DOM_VK_ENTER", - "DOM_VK_EQUALS", - "DOM_VK_EREOF", - "DOM_VK_ESCAPE", - "DOM_VK_EXCLAMATION", - "DOM_VK_EXECUTE", - "DOM_VK_EXSEL", - "DOM_VK_F", - "DOM_VK_F1", - "DOM_VK_F10", - "DOM_VK_F11", - "DOM_VK_F12", - "DOM_VK_F13", - "DOM_VK_F14", - "DOM_VK_F15", - "DOM_VK_F16", - "DOM_VK_F17", - "DOM_VK_F18", - "DOM_VK_F19", - "DOM_VK_F2", - "DOM_VK_F20", - "DOM_VK_F21", - "DOM_VK_F22", - "DOM_VK_F23", - "DOM_VK_F24", - "DOM_VK_F25", - "DOM_VK_F26", - "DOM_VK_F27", - "DOM_VK_F28", - "DOM_VK_F29", - "DOM_VK_F3", - "DOM_VK_F30", - "DOM_VK_F31", - "DOM_VK_F32", - "DOM_VK_F33", - "DOM_VK_F34", - "DOM_VK_F35", - "DOM_VK_F36", - "DOM_VK_F4", - "DOM_VK_F5", - "DOM_VK_F6", - "DOM_VK_F7", - "DOM_VK_F8", - "DOM_VK_F9", - "DOM_VK_FINAL", - "DOM_VK_FRONT", - "DOM_VK_G", - "DOM_VK_GREATER_THAN", - "DOM_VK_H", - "DOM_VK_HANGUL", - "DOM_VK_HANJA", - "DOM_VK_HASH", - "DOM_VK_HELP", - "DOM_VK_HK_TOGGLE", - "DOM_VK_HOME", - "DOM_VK_HYPHEN_MINUS", - "DOM_VK_I", - "DOM_VK_INSERT", - "DOM_VK_J", - "DOM_VK_JUNJA", - "DOM_VK_K", - "DOM_VK_KANA", - "DOM_VK_KANJI", - "DOM_VK_L", - "DOM_VK_LEFT", - "DOM_VK_LEFT_TAB", - "DOM_VK_LESS_THAN", - "DOM_VK_M", - "DOM_VK_META", - "DOM_VK_MODECHANGE", - "DOM_VK_MULTIPLY", - "DOM_VK_N", - "DOM_VK_NONCONVERT", - "DOM_VK_NUMPAD0", - "DOM_VK_NUMPAD1", - "DOM_VK_NUMPAD2", - "DOM_VK_NUMPAD3", - "DOM_VK_NUMPAD4", - "DOM_VK_NUMPAD5", - "DOM_VK_NUMPAD6", - "DOM_VK_NUMPAD7", - "DOM_VK_NUMPAD8", - "DOM_VK_NUMPAD9", - "DOM_VK_NUM_LOCK", - "DOM_VK_O", - "DOM_VK_OEM_1", - "DOM_VK_OEM_102", - "DOM_VK_OEM_2", - "DOM_VK_OEM_3", - "DOM_VK_OEM_4", - "DOM_VK_OEM_5", - "DOM_VK_OEM_6", - "DOM_VK_OEM_7", - "DOM_VK_OEM_8", - "DOM_VK_OEM_COMMA", - "DOM_VK_OEM_MINUS", - "DOM_VK_OEM_PERIOD", - "DOM_VK_OEM_PLUS", - "DOM_VK_OPEN_BRACKET", - "DOM_VK_OPEN_CURLY_BRACKET", - "DOM_VK_OPEN_PAREN", - "DOM_VK_P", - "DOM_VK_PA1", - "DOM_VK_PAGEDOWN", - "DOM_VK_PAGEUP", - "DOM_VK_PAGE_DOWN", - "DOM_VK_PAGE_UP", - "DOM_VK_PAUSE", - "DOM_VK_PERCENT", - "DOM_VK_PERIOD", - "DOM_VK_PIPE", - "DOM_VK_PLAY", - "DOM_VK_PLUS", - "DOM_VK_PRINT", - "DOM_VK_PRINTSCREEN", - "DOM_VK_PROCESSKEY", - "DOM_VK_PROPERITES", - "DOM_VK_Q", - "DOM_VK_QUESTION_MARK", - "DOM_VK_QUOTE", - "DOM_VK_R", - "DOM_VK_REDO", - "DOM_VK_RETURN", - "DOM_VK_RIGHT", - "DOM_VK_S", - "DOM_VK_SCROLL_LOCK", - "DOM_VK_SELECT", - "DOM_VK_SEMICOLON", - "DOM_VK_SEPARATOR", - "DOM_VK_SHIFT", - "DOM_VK_SLASH", - "DOM_VK_SLEEP", - "DOM_VK_SPACE", - "DOM_VK_SUBTRACT", - "DOM_VK_T", - "DOM_VK_TAB", - "DOM_VK_TILDE", - "DOM_VK_U", - "DOM_VK_UNDERSCORE", - "DOM_VK_UNDO", - "DOM_VK_UNICODE", - "DOM_VK_UP", - "DOM_VK_V", - "DOM_VK_VOLUME_DOWN", - "DOM_VK_VOLUME_MUTE", - "DOM_VK_VOLUME_UP", - "DOM_VK_W", - "DOM_VK_WIN", - "DOM_VK_WINDOW", - "DOM_VK_WIN_ICO_00", - "DOM_VK_WIN_ICO_CLEAR", - "DOM_VK_WIN_ICO_HELP", - "DOM_VK_WIN_OEM_ATTN", - "DOM_VK_WIN_OEM_AUTO", - "DOM_VK_WIN_OEM_BACKTAB", - "DOM_VK_WIN_OEM_CLEAR", - "DOM_VK_WIN_OEM_COPY", - "DOM_VK_WIN_OEM_CUSEL", - "DOM_VK_WIN_OEM_ENLW", - "DOM_VK_WIN_OEM_FINISH", - "DOM_VK_WIN_OEM_FJ_JISHO", - "DOM_VK_WIN_OEM_FJ_LOYA", - "DOM_VK_WIN_OEM_FJ_MASSHOU", - "DOM_VK_WIN_OEM_FJ_ROYA", - "DOM_VK_WIN_OEM_FJ_TOUROKU", - "DOM_VK_WIN_OEM_JUMP", - "DOM_VK_WIN_OEM_PA1", - "DOM_VK_WIN_OEM_PA2", - "DOM_VK_WIN_OEM_PA3", - "DOM_VK_WIN_OEM_RESET", - "DOM_VK_WIN_OEM_WSCTRL", - "DOM_VK_X", - "DOM_VK_XF86XK_ADD_FAVORITE", - "DOM_VK_XF86XK_APPLICATION_LEFT", - "DOM_VK_XF86XK_APPLICATION_RIGHT", - "DOM_VK_XF86XK_AUDIO_CYCLE_TRACK", - "DOM_VK_XF86XK_AUDIO_FORWARD", - "DOM_VK_XF86XK_AUDIO_LOWER_VOLUME", - "DOM_VK_XF86XK_AUDIO_MEDIA", - "DOM_VK_XF86XK_AUDIO_MUTE", - "DOM_VK_XF86XK_AUDIO_NEXT", - "DOM_VK_XF86XK_AUDIO_PAUSE", - "DOM_VK_XF86XK_AUDIO_PLAY", - "DOM_VK_XF86XK_AUDIO_PREV", - "DOM_VK_XF86XK_AUDIO_RAISE_VOLUME", - "DOM_VK_XF86XK_AUDIO_RANDOM_PLAY", - "DOM_VK_XF86XK_AUDIO_RECORD", - "DOM_VK_XF86XK_AUDIO_REPEAT", - "DOM_VK_XF86XK_AUDIO_REWIND", - "DOM_VK_XF86XK_AUDIO_STOP", - "DOM_VK_XF86XK_AWAY", - "DOM_VK_XF86XK_BACK", - "DOM_VK_XF86XK_BACK_FORWARD", - "DOM_VK_XF86XK_BATTERY", - "DOM_VK_XF86XK_BLUE", - "DOM_VK_XF86XK_BLUETOOTH", - "DOM_VK_XF86XK_BOOK", - "DOM_VK_XF86XK_BRIGHTNESS_ADJUST", - "DOM_VK_XF86XK_CALCULATOR", - "DOM_VK_XF86XK_CALENDAR", - "DOM_VK_XF86XK_CD", - "DOM_VK_XF86XK_CLOSE", - "DOM_VK_XF86XK_COMMUNITY", - "DOM_VK_XF86XK_CONTRAST_ADJUST", - "DOM_VK_XF86XK_COPY", - "DOM_VK_XF86XK_CUT", - "DOM_VK_XF86XK_CYCLE_ANGLE", - "DOM_VK_XF86XK_DISPLAY", - "DOM_VK_XF86XK_DOCUMENTS", - "DOM_VK_XF86XK_DOS", - "DOM_VK_XF86XK_EJECT", - "DOM_VK_XF86XK_EXCEL", - "DOM_VK_XF86XK_EXPLORER", - "DOM_VK_XF86XK_FAVORITES", - "DOM_VK_XF86XK_FINANCE", - "DOM_VK_XF86XK_FORWARD", - "DOM_VK_XF86XK_FRAME_BACK", - "DOM_VK_XF86XK_FRAME_FORWARD", - "DOM_VK_XF86XK_GAME", - "DOM_VK_XF86XK_GO", - "DOM_VK_XF86XK_GREEN", - "DOM_VK_XF86XK_HIBERNATE", - "DOM_VK_XF86XK_HISTORY", - "DOM_VK_XF86XK_HOME_PAGE", - "DOM_VK_XF86XK_HOT_LINKS", - "DOM_VK_XF86XK_I_TOUCH", - "DOM_VK_XF86XK_KBD_BRIGHTNESS_DOWN", - "DOM_VK_XF86XK_KBD_BRIGHTNESS_UP", - "DOM_VK_XF86XK_KBD_LIGHT_ON_OFF", - "DOM_VK_XF86XK_LAUNCH0", - "DOM_VK_XF86XK_LAUNCH1", - "DOM_VK_XF86XK_LAUNCH2", - "DOM_VK_XF86XK_LAUNCH3", - "DOM_VK_XF86XK_LAUNCH4", - "DOM_VK_XF86XK_LAUNCH5", - "DOM_VK_XF86XK_LAUNCH6", - "DOM_VK_XF86XK_LAUNCH7", - "DOM_VK_XF86XK_LAUNCH8", - "DOM_VK_XF86XK_LAUNCH9", - "DOM_VK_XF86XK_LAUNCH_A", - "DOM_VK_XF86XK_LAUNCH_B", - "DOM_VK_XF86XK_LAUNCH_C", - "DOM_VK_XF86XK_LAUNCH_D", - "DOM_VK_XF86XK_LAUNCH_E", - "DOM_VK_XF86XK_LAUNCH_F", - "DOM_VK_XF86XK_LIGHT_BULB", - "DOM_VK_XF86XK_LOG_OFF", - "DOM_VK_XF86XK_MAIL", - "DOM_VK_XF86XK_MAIL_FORWARD", - "DOM_VK_XF86XK_MARKET", - "DOM_VK_XF86XK_MEETING", - "DOM_VK_XF86XK_MEMO", - "DOM_VK_XF86XK_MENU_KB", - "DOM_VK_XF86XK_MENU_PB", - "DOM_VK_XF86XK_MESSENGER", - "DOM_VK_XF86XK_MON_BRIGHTNESS_DOWN", - "DOM_VK_XF86XK_MON_BRIGHTNESS_UP", - "DOM_VK_XF86XK_MUSIC", - "DOM_VK_XF86XK_MY_COMPUTER", - "DOM_VK_XF86XK_MY_SITES", - "DOM_VK_XF86XK_NEW", - "DOM_VK_XF86XK_NEWS", - "DOM_VK_XF86XK_OFFICE_HOME", - "DOM_VK_XF86XK_OPEN", - "DOM_VK_XF86XK_OPEN_URL", - "DOM_VK_XF86XK_OPTION", - "DOM_VK_XF86XK_PASTE", - "DOM_VK_XF86XK_PHONE", - "DOM_VK_XF86XK_PICTURES", - "DOM_VK_XF86XK_POWER_DOWN", - "DOM_VK_XF86XK_POWER_OFF", - "DOM_VK_XF86XK_RED", - "DOM_VK_XF86XK_REFRESH", - "DOM_VK_XF86XK_RELOAD", - "DOM_VK_XF86XK_REPLY", - "DOM_VK_XF86XK_ROCKER_DOWN", - "DOM_VK_XF86XK_ROCKER_ENTER", - "DOM_VK_XF86XK_ROCKER_UP", - "DOM_VK_XF86XK_ROTATE_WINDOWS", - "DOM_VK_XF86XK_ROTATION_KB", - "DOM_VK_XF86XK_ROTATION_PB", - "DOM_VK_XF86XK_SAVE", - "DOM_VK_XF86XK_SCREEN_SAVER", - "DOM_VK_XF86XK_SCROLL_CLICK", - "DOM_VK_XF86XK_SCROLL_DOWN", - "DOM_VK_XF86XK_SCROLL_UP", - "DOM_VK_XF86XK_SEARCH", - "DOM_VK_XF86XK_SEND", - "DOM_VK_XF86XK_SHOP", - "DOM_VK_XF86XK_SPELL", - "DOM_VK_XF86XK_SPLIT_SCREEN", - "DOM_VK_XF86XK_STANDBY", - "DOM_VK_XF86XK_START", - "DOM_VK_XF86XK_STOP", - "DOM_VK_XF86XK_SUBTITLE", - "DOM_VK_XF86XK_SUPPORT", - "DOM_VK_XF86XK_SUSPEND", - "DOM_VK_XF86XK_TASK_PANE", - "DOM_VK_XF86XK_TERMINAL", - "DOM_VK_XF86XK_TIME", - "DOM_VK_XF86XK_TOOLS", - "DOM_VK_XF86XK_TOP_MENU", - "DOM_VK_XF86XK_TO_DO_LIST", - "DOM_VK_XF86XK_TRAVEL", - "DOM_VK_XF86XK_USER1KB", - "DOM_VK_XF86XK_USER2KB", - "DOM_VK_XF86XK_USER_PB", - "DOM_VK_XF86XK_UWB", - "DOM_VK_XF86XK_VENDOR_HOME", - "DOM_VK_XF86XK_VIDEO", - "DOM_VK_XF86XK_VIEW", - "DOM_VK_XF86XK_WAKE_UP", - "DOM_VK_XF86XK_WEB_CAM", - "DOM_VK_XF86XK_WHEEL_BUTTON", - "DOM_VK_XF86XK_WLAN", - "DOM_VK_XF86XK_WORD", - "DOM_VK_XF86XK_WWW", - "DOM_VK_XF86XK_XFER", - "DOM_VK_XF86XK_YELLOW", - "DOM_VK_XF86XK_ZOOM_IN", - "DOM_VK_XF86XK_ZOOM_OUT", - "DOM_VK_Y", - "DOM_VK_Z", - "DOM_VK_ZOOM", - "DONE", - "DONT_CARE", - "DOWNLOADING", - "DRAGDROP", - "DST_ALPHA", - "DST_COLOR", - "DYNAMIC_DRAW", - "DataChannel", - "DataTransfer", - "DataTransferItem", - "DataTransferItemList", - "DataView", - "Date", - "DateTimeFormat", - "Debug", - "DelayNode", - "DesktopNotification", - "DesktopNotificationCenter", - "DeviceAcceleration", - "DeviceLightEvent", - "DeviceMotionEvent", - "DeviceOrientationEvent", - "DeviceProximityEvent", - "DeviceRotationRate", - "DeviceStorage", - "DeviceStorageChangeEvent", - "Directory", - "Document", - "DocumentFragment", - "DocumentType", - "DragEvent", - "DynamicsCompressorNode", - "E", - "ELEMENT_ARRAY_BUFFER", - "ELEMENT_ARRAY_BUFFER_BINDING", - "ELEMENT_NODE", - "EMPTY", - "ENCODING_ERR", - "ENDED", - "END_TO_END", - "END_TO_START", - "ENTITY_NODE", - "ENTITY_REFERENCE_NODE", - "EPSILON", - "EQUAL", - "EQUALPOWER", - "ERROR", - "EXPONENTIAL_DISTANCE", - "EXT_texture_filter_anisotropic", - "Element", - "ElementQuery", - "EnterPictureInPictureEvent", - "Entity", - "EntityReference", - "Enumerator", - "Error", - "ErrorEvent", - "EvalError", - "Event", - "EventException", - "EventSource", - "EventTarget", - "External", - "FASTEST", - "FIDOSDK", - "FILTER_ACCEPT", - "FILTER_INTERRUPT", - "FILTER_REJECT", - "FILTER_SKIP", - "FINISHED_STATE", - "FIRST_ORDERED_NODE_TYPE", - "FLOAT", - "FLOAT_MAT2", - "FLOAT_MAT3", - "FLOAT_MAT4", - "FLOAT_VEC2", - "FLOAT_VEC3", - "FLOAT_VEC4", - "FOCUS", - "FONT_FACE_RULE", - "FONT_FEATURE_VALUES_RULE", - "FRAGMENT_SHADER", - "FRAGMENT_SHADER_DERIVATIVE_HINT_OES", - "FRAMEBUFFER", - "FRAMEBUFFER_ATTACHMENT_OBJECT_NAME", - "FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE", - "FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE", - "FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL", - "FRAMEBUFFER_BINDING", - "FRAMEBUFFER_COMPLETE", - "FRAMEBUFFER_INCOMPLETE_ATTACHMENT", - "FRAMEBUFFER_INCOMPLETE_DIMENSIONS", - "FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT", - "FRAMEBUFFER_UNSUPPORTED", - "FRONT", - "FRONT_AND_BACK", - "FRONT_FACE", - "FUNC_ADD", - "FUNC_REVERSE_SUBTRACT", - "FUNC_SUBTRACT", - "FederatedCredential", - "Feed", - "FeedEntry", - "File", - "FileError", - "FileList", - "FileReader", - "FileSystem", - "FileSystemDirectoryEntry", - "FileSystemDirectoryReader", - "FileSystemEntry", - "FileSystemFileEntry", - "FindInPage", - "Float32Array", - "Float64Array", - "FocusEvent", - "FontFace", - "FontFaceSet", - "FontFaceSetLoadEvent", - "FormData", - "Function", - "GENERATE_MIPMAP_HINT", - "GEQUAL", - "GREATER", - "GREEN_BITS", - "GainNode", - "Gamepad", - "GamepadButton", - "GamepadEvent", - "GamepadHapticActuator", - "GamepadPose", - "Geolocation", - "GestureEvent", - "Global", - "Gyroscope", - "HAVE_CURRENT_DATA", - "HAVE_ENOUGH_DATA", - "HAVE_FUTURE_DATA", - "HAVE_METADATA", - "HAVE_NOTHING", - "HEADERS_RECEIVED", - "HIDDEN", - "HIERARCHY_REQUEST_ERR", - "HIGHPASS", - "HIGHSHELF", - "HIGH_FLOAT", - "HIGH_INT", - "HORIZONTAL", - "HORIZONTAL_AXIS", - "HRTF", - "HTMLAllCollection", - "HTMLAnchorElement", - "HTMLAppletElement", - "HTMLAreaElement", - "HTMLAreasCollection", - "HTMLAudioElement", - "HTMLBGSoundElement", - "HTMLBRElement", - "HTMLBaseElement", - "HTMLBaseFontElement", - "HTMLBlockElement", - "HTMLBlockquoteElement", - "HTMLBodyElement", - "HTMLButtonElement", - "HTMLCanvasElement", - "HTMLCollection", - "HTMLCommandElement", - "HTMLContentElement", - "HTMLDDElement", - "HTMLDListElement", - "HTMLDTElement", - "HTMLDataElement", - "HTMLDataListElement", - "HTMLDetailsElement", - "HTMLDialogElement", - "HTMLDirectoryElement", - "HTMLDivElement", - "HTMLDocument", - "HTMLElement", - "HTMLEmbedElement", - "HTMLFieldSetElement", - "HTMLFontElement", - "HTMLFormControlsCollection", - "HTMLFormElement", - "HTMLFrameElement", - "HTMLFrameSetElement", - "HTMLHRElement", - "HTMLHeadElement", - "HTMLHeadingElement", - "HTMLHtmlElement", - "HTMLIFrameElement", - "HTMLImageElement", - "HTMLInputElement", - "HTMLIsIndexElement", - "HTMLKeygenElement", - "HTMLLIElement", - "HTMLLabelElement", - "HTMLLegendElement", - "HTMLLinkElement", - "HTMLMapElement", - "HTMLMarqueeElement", - "HTMLMediaElement", - "HTMLMenuElement", - "HTMLMenuItemElement", - "HTMLMetaElement", - "HTMLMeterElement", - "HTMLModElement", - "HTMLNextIdElement", - "HTMLOListElement", - "HTMLObjectElement", - "HTMLOptGroupElement", - "HTMLOptionElement", - "HTMLOptionsCollection", - "HTMLOutputElement", - "HTMLParagraphElement", - "HTMLParamElement", - "HTMLPhraseElement", - "HTMLPictureElement", - "HTMLPreElement", - "HTMLProgressElement", - "HTMLPropertiesCollection", - "HTMLQuoteElement", - "HTMLScriptElement", - "HTMLSelectElement", - "HTMLShadowElement", - "HTMLSlotElement", - "HTMLSourceElement", - "HTMLSpanElement", - "HTMLStyleElement", - "HTMLTableCaptionElement", - "HTMLTableCellElement", - "HTMLTableColElement", - "HTMLTableDataCellElement", - "HTMLTableElement", - "HTMLTableHeaderCellElement", - "HTMLTableRowElement", - "HTMLTableSectionElement", - "HTMLTemplateElement", - "HTMLTextAreaElement", - "HTMLTimeElement", - "HTMLTitleElement", - "HTMLTrackElement", - "HTMLUListElement", - "HTMLUnknownElement", - "HTMLVideoElement", - "HashChangeEvent", - "Headers", - "History", - "ICE_CHECKING", - "ICE_CLOSED", - "ICE_COMPLETED", - "ICE_CONNECTED", - "ICE_FAILED", - "ICE_GATHERING", - "ICE_WAITING", - "IDBCursor", - "IDBCursorWithValue", - "IDBDatabase", - "IDBDatabaseException", - "IDBFactory", - "IDBFileHandle", - "IDBFileRequest", - "IDBIndex", - "IDBKeyRange", - "IDBMutableFile", - "IDBObjectStore", - "IDBOpenDBRequest", - "IDBRequest", - "IDBTransaction", - "IDBVersionChangeEvent", - "IDLE", - "IIRFilterNode", - "IMPLEMENTATION_COLOR_READ_FORMAT", - "IMPLEMENTATION_COLOR_READ_TYPE", - "IMPORT_RULE", - "INCR", - "INCR_WRAP", - "INDEX_SIZE_ERR", - "INSTALLED", - "INT", - "INT_VEC2", - "INT_VEC3", - "INT_VEC4", - "INUSE_ATTRIBUTE_ERR", - "INVALID_ACCESS_ERR", - "INVALID_CHARACTER_ERR", - "INVALID_ENUM", - "INVALID_EXPRESSION_ERR", - "INVALID_FRAMEBUFFER_OPERATION", - "INVALID_MODIFICATION_ERR", - "INVALID_NODE_TYPE_ERR", - "INVALID_OPERATION", - "INVALID_STATE_ERR", - "INVALID_VALUE", - "INVERSE_DISTANCE", - "INVERT", - "IceCandidate", - "IdleDeadline", - "Image", - "ImageBitmap", - "ImageBitmapRenderingContext", - "ImageCapture", - "ImageData", - "Infinity", - "InputDeviceCapabilities", - "InputDeviceInfo", - "InputEvent", - "InputMethodContext", - "InstallState", - "InstallTrigger", - "Instance", - "Int16Array", - "Int32Array", - "Int8Array", - "Intent", - "InternalError", - "IntersectionObserver", - "IntersectionObserverEntry", - "Intl", - "IsSearchProviderInstalled", - "Iterator", - "JSON", - "KEEP", - "KEYDOWN", - "KEYFRAMES_RULE", - "KEYFRAME_RULE", - "KEYPRESS", - "KEYUP", - "Key", - "KeyEvent", - "KeyOperation", - "KeyPair", - "Keyboard", - "KeyboardEvent", - "KeyboardLayoutMap", - "KeyframeEffect", - "LENGTHADJUST_SPACING", - "LENGTHADJUST_SPACINGANDGLYPHS", - "LENGTHADJUST_UNKNOWN", - "LEQUAL", - "LESS", - "LINEAR", - "LINEAR_DISTANCE", - "LINEAR_MIPMAP_LINEAR", - "LINEAR_MIPMAP_NEAREST", - "LINES", - "LINE_LOOP", - "LINE_STRIP", - "LINE_WIDTH", - "LINK_STATUS", - "LIVE", - "LN10", - "LN2", - "LOADED", - "LOADING", - "LOCALE", - "LOG10E", - "LOG2E", - "LOWPASS", - "LOWSHELF", - "LOW_FLOAT", - "LOW_INT", - "LSException", - "LSParserFilter", - "LUMINANCE", - "LUMINANCE_ALPHA", - "LinearAccelerationSensor", - "LinkError", - "ListFormat", - "LocalMediaStream", - "Location", - "Lock", - "LockManager", - "MAX_COMBINED_TEXTURE_IMAGE_UNITS", - "MAX_CUBE_MAP_TEXTURE_SIZE", - "MAX_FRAGMENT_UNIFORM_VECTORS", - "MAX_RENDERBUFFER_SIZE", - "MAX_SAFE_INTEGER", - "MAX_TEXTURE_IMAGE_UNITS", - "MAX_TEXTURE_MAX_ANISOTROPY_EXT", - "MAX_TEXTURE_SIZE", - "MAX_VALUE", - "MAX_VARYING_VECTORS", - "MAX_VERTEX_ATTRIBS", - "MAX_VERTEX_TEXTURE_IMAGE_UNITS", - "MAX_VERTEX_UNIFORM_VECTORS", - "MAX_VIEWPORT_DIMS", - "MEDIA_ERR_ABORTED", - "MEDIA_ERR_DECODE", - "MEDIA_ERR_ENCRYPTED", - "MEDIA_ERR_NETWORK", - "MEDIA_ERR_SRC_NOT_SUPPORTED", - "MEDIA_KEYERR_CLIENT", - "MEDIA_KEYERR_DOMAIN", - "MEDIA_KEYERR_HARDWARECHANGE", - "MEDIA_KEYERR_OUTPUT", - "MEDIA_KEYERR_SERVICE", - "MEDIA_KEYERR_UNKNOWN", - "MEDIA_RULE", - "MEDIUM_FLOAT", - "MEDIUM_INT", - "META_MASK", - "MIDIAccess", - "MIDIConnectionEvent", - "MIDIInput", - "MIDIInputMap", - "MIDIMessageEvent", - "MIDIOutput", - "MIDIOutputMap", - "MIDIPort", - "MIN_SAFE_INTEGER", - "MIN_VALUE", - "MIRRORED_REPEAT", - "MODE_ASYNCHRONOUS", - "MODE_SYNCHRONOUS", - "MODIFICATION", - "MOUSEDOWN", - "MOUSEDRAG", - "MOUSEMOVE", - "MOUSEOUT", - "MOUSEOVER", - "MOUSEUP", - "MOZ_KEYFRAMES_RULE", - "MOZ_KEYFRAME_RULE", - "MOZ_SOURCE_CURSOR", - "MOZ_SOURCE_ERASER", - "MOZ_SOURCE_KEYBOARD", - "MOZ_SOURCE_MOUSE", - "MOZ_SOURCE_PEN", - "MOZ_SOURCE_TOUCH", - "MOZ_SOURCE_UNKNOWN", - "MSBehaviorUrnsCollection", - "MSBlobBuilder", - "MSCSSMatrix", - "MSCSSProperties", - "MSCSSRuleList", - "MSCompatibleInfo", - "MSCompatibleInfoCollection", - "MSCurrentStyleCSSProperties", - "MSEventObj", - "MSGESTURE_FLAG_BEGIN", - "MSGESTURE_FLAG_CANCEL", - "MSGESTURE_FLAG_END", - "MSGESTURE_FLAG_INERTIA", - "MSGESTURE_FLAG_NONE", - "MSGesture", - "MSGestureEvent", - "MSGraphicsTrust", - "MSInputMethodContext", - "MSManipulationEvent", - "MSMediaKeyError", - "MSMediaKeyMessageEvent", - "MSMediaKeyNeededEvent", - "MSMediaKeySession", - "MSMediaKeys", - "MSMimeTypesCollection", - "MSPOINTER_TYPE_MOUSE", - "MSPOINTER_TYPE_PEN", - "MSPOINTER_TYPE_TOUCH", - "MSPluginsCollection", - "MSPointerEvent", - "MSRangeCollection", - "MSSiteModeEvent", - "MSStream", - "MSStreamReader", - "MSStyleCSSProperties", - "MS_ASYNC_CALLBACK_STATUS_ASSIGN_DELEGATE", - "MS_ASYNC_CALLBACK_STATUS_CANCEL", - "MS_ASYNC_CALLBACK_STATUS_CHOOSEANY", - "MS_ASYNC_CALLBACK_STATUS_ERROR", - "MS_ASYNC_CALLBACK_STATUS_JOIN", - "MS_ASYNC_OP_STATUS_CANCELED", - "MS_ASYNC_OP_STATUS_ERROR", - "MS_ASYNC_OP_STATUS_SUCCESS", - "MS_MANIPULATION_STATE_ACTIVE", - "MS_MANIPULATION_STATE_CANCELLED", - "MS_MANIPULATION_STATE_COMMITTED", - "MS_MANIPULATION_STATE_DRAGGING", - "MS_MANIPULATION_STATE_INERTIA", - "MS_MANIPULATION_STATE_PRESELECT", - "MS_MANIPULATION_STATE_SELECTING", - "MS_MANIPULATION_STATE_STOPPED", - "MS_MEDIA_ERR_ENCRYPTED", - "MS_MEDIA_KEYERR_CLIENT", - "MS_MEDIA_KEYERR_DOMAIN", - "MS_MEDIA_KEYERR_HARDWARECHANGE", - "MS_MEDIA_KEYERR_OUTPUT", - "MS_MEDIA_KEYERR_SERVICE", - "MS_MEDIA_KEYERR_UNKNOWN", - "Map", - "Math", - "MediaCapabilities", - "MediaCapabilitiesInfo", - "MediaController", - "MediaDeviceInfo", - "MediaDevices", - "MediaElementAudioSourceNode", - "MediaEncryptedEvent", - "MediaError", - "MediaKeyError", - "MediaKeyEvent", - "MediaKeyMessageEvent", - "MediaKeyNeededEvent", - "MediaKeySession", - "MediaKeyStatusMap", - "MediaKeySystemAccess", - "MediaKeys", - "MediaList", - "MediaMetadata", - "MediaQueryList", - "MediaQueryListEvent", - "MediaRecorder", - "MediaRecorderErrorEvent", - "MediaSession", - "MediaSettingsRange", - "MediaSource", - "MediaStream", - "MediaStreamAudioDestinationNode", - "MediaStreamAudioSourceNode", - "MediaStreamEvent", - "MediaStreamTrack", - "MediaStreamTrackEvent", - "Memory", - "MessageChannel", - "MessageEvent", - "MessagePort", - "Methods", - "MimeType", - "MimeTypeArray", - "Module", - "MouseEvent", - "MouseScrollEvent", - "MouseWheelEvent", - "MozAnimation", - "MozAnimationDelay", - "MozAnimationDirection", - "MozAnimationDuration", - "MozAnimationFillMode", - "MozAnimationIterationCount", - "MozAnimationName", - "MozAnimationPlayState", - "MozAnimationTimingFunction", - "MozAppearance", - "MozBackfaceVisibility", - "MozBinding", - "MozBorderBottomColors", - "MozBorderEnd", - "MozBorderEndColor", - "MozBorderEndStyle", - "MozBorderEndWidth", - "MozBorderImage", - "MozBorderLeftColors", - "MozBorderRightColors", - "MozBorderStart", - "MozBorderStartColor", - "MozBorderStartStyle", - "MozBorderStartWidth", - "MozBorderTopColors", - "MozBoxAlign", - "MozBoxDirection", - "MozBoxFlex", - "MozBoxOrdinalGroup", - "MozBoxOrient", - "MozBoxPack", - "MozBoxSizing", - "MozCSSKeyframeRule", - "MozCSSKeyframesRule", - "MozColumnCount", - "MozColumnFill", - "MozColumnGap", - "MozColumnRule", - "MozColumnRuleColor", - "MozColumnRuleStyle", - "MozColumnRuleWidth", - "MozColumnWidth", - "MozColumns", - "MozContactChangeEvent", - "MozFloatEdge", - "MozFontFeatureSettings", - "MozFontLanguageOverride", - "MozForceBrokenImageIcon", - "MozHyphens", - "MozImageRegion", - "MozMarginEnd", - "MozMarginStart", - "MozMmsEvent", - "MozMmsMessage", - "MozMobileMessageThread", - "MozOSXFontSmoothing", - "MozOrient", - "MozOutlineRadius", - "MozOutlineRadiusBottomleft", - "MozOutlineRadiusBottomright", - "MozOutlineRadiusTopleft", - "MozOutlineRadiusTopright", - "MozPaddingEnd", - "MozPaddingStart", - "MozPerspective", - "MozPerspectiveOrigin", - "MozPowerManager", - "MozSettingsEvent", - "MozSmsEvent", - "MozSmsMessage", - "MozStackSizing", - "MozTabSize", - "MozTextAlignLast", - "MozTextDecorationColor", - "MozTextDecorationLine", - "MozTextDecorationStyle", - "MozTextSizeAdjust", - "MozTransform", - "MozTransformOrigin", - "MozTransformStyle", - "MozTransition", - "MozTransitionDelay", - "MozTransitionDuration", - "MozTransitionProperty", - "MozTransitionTimingFunction", - "MozUserFocus", - "MozUserInput", - "MozUserModify", - "MozUserSelect", - "MozWindowDragging", - "MozWindowShadow", - "MutationEvent", - "MutationObserver", - "MutationRecord", - "NAMESPACE_ERR", - "NAMESPACE_RULE", - "NEAREST", - "NEAREST_MIPMAP_LINEAR", - "NEAREST_MIPMAP_NEAREST", - "NEGATIVE_INFINITY", - "NETWORK_EMPTY", - "NETWORK_ERR", - "NETWORK_IDLE", - "NETWORK_LOADED", - "NETWORK_LOADING", - "NETWORK_NO_SOURCE", - "NEVER", - "NEW", - "NEXT", - "NEXT_NO_DUPLICATE", - "NICEST", - "NODE_AFTER", - "NODE_BEFORE", - "NODE_BEFORE_AND_AFTER", - "NODE_INSIDE", - "NONE", - "NON_TRANSIENT_ERR", - "NOTATION_NODE", - "NOTCH", - "NOTEQUAL", - "NOT_ALLOWED_ERR", - "NOT_FOUND_ERR", - "NOT_INSTALLED", - "NOT_READABLE_ERR", - "NOT_SUPPORTED_ERR", - "NO_DATA_ALLOWED_ERR", - "NO_ERR", - "NO_ERROR", - "NO_MODIFICATION_ALLOWED_ERR", - "NUMBER_TYPE", - "NUM_COMPRESSED_TEXTURE_FORMATS", - "NaN", - "NamedNodeMap", - "Native Client", - "NavigationPreloadManager", - "Navigator", - "NearbyLinks", - "NetworkInformation", - "Node", - "NodeFilter", - "NodeIterator", - "NodeList", - "Notation", - "Notification", - "NotifyPaintEvent", - "Number", - "NumberFormat", - "OBSOLETE", - "OES_element_index_uint", - "OES_standard_derivatives", - "OES_texture_float", - "OES_texture_float_linear", - "ONE", - "ONE_MINUS_CONSTANT_ALPHA", - "ONE_MINUS_CONSTANT_COLOR", - "ONE_MINUS_DST_ALPHA", - "ONE_MINUS_DST_COLOR", - "ONE_MINUS_SRC_ALPHA", - "ONE_MINUS_SRC_COLOR", - "OPEN", - "OPENED", - "OPENING", - "ORDERED_NODE_ITERATOR_TYPE", - "ORDERED_NODE_SNAPSHOT_TYPE", - "OUT_OF_MEMORY", - "Object", - "OfflineAudioCompletionEvent", - "OfflineAudioContext", - "OfflineResourceList", - "OffscreenCanvas", - "OffscreenCanvasRenderingContext2D", - "Option", - "OrientationSensor", - "OscillatorNode", - "OverconstrainedError", - "OverflowEvent", - "PACKAGE", - "PACK_ALIGNMENT", - "PAGE_RULE", - "PARSE_ERR", - "PATHSEG_ARC_ABS", - "PATHSEG_ARC_REL", - "PATHSEG_CLOSEPATH", - "PATHSEG_CURVETO_CUBIC_ABS", - "PATHSEG_CURVETO_CUBIC_REL", - "PATHSEG_CURVETO_CUBIC_SMOOTH_ABS", - "PATHSEG_CURVETO_CUBIC_SMOOTH_REL", - "PATHSEG_CURVETO_QUADRATIC_ABS", - "PATHSEG_CURVETO_QUADRATIC_REL", - "PATHSEG_CURVETO_QUADRATIC_SMOOTH_ABS", - "PATHSEG_CURVETO_QUADRATIC_SMOOTH_REL", - "PATHSEG_LINETO_ABS", - "PATHSEG_LINETO_HORIZONTAL_ABS", - "PATHSEG_LINETO_HORIZONTAL_REL", - "PATHSEG_LINETO_REL", - "PATHSEG_LINETO_VERTICAL_ABS", - "PATHSEG_LINETO_VERTICAL_REL", - "PATHSEG_MOVETO_ABS", - "PATHSEG_MOVETO_REL", - "PATHSEG_UNKNOWN", - "PATH_EXISTS_ERR", - "PEAKING", - "PERMISSION_DENIED", - "PERSISTENT", - "PI", - "PLAYING_STATE", - "POINTS", - "POLYGON_OFFSET_FACTOR", - "POLYGON_OFFSET_FILL", - "POLYGON_OFFSET_UNITS", - "POSITION_UNAVAILABLE", - "POSITIVE_INFINITY", - "PREV", - "PREV_NO_DUPLICATE", - "PROCESSING_INSTRUCTION_NODE", - "PageChangeEvent", - "PageTransitionEvent", - "PaintRequest", - "PaintRequestList", - "PannerNode", - "PasswordCredential", - "Path2D", - "PaymentAddress", - "PaymentInstruments", - "PaymentManager", - "PaymentRequest", - "PaymentRequestUpdateEvent", - "PaymentResponse", - "Performance", - "PerformanceEntry", - "PerformanceLongTaskTiming", - "PerformanceMark", - "PerformanceMeasure", - "PerformanceNavigation", - "PerformanceNavigationTiming", - "PerformanceObserver", - "PerformanceObserverEntryList", - "PerformancePaintTiming", - "PerformanceResourceTiming", - "PerformanceServerTiming", - "PerformanceTiming", - "PeriodicWave", - "PermissionStatus", - "Permissions", - "PhotoCapabilities", - "PictureInPictureWindow", - "Plugin", - "PluginArray", - "PluralRules", - "PointerEvent", - "PopStateEvent", - "PopupBlockedEvent", - "Position", - "PositionError", - "Presentation", - "PresentationAvailability", - "PresentationConnection", - "PresentationConnectionAvailableEvent", - "PresentationConnectionCloseEvent", - "PresentationConnectionList", - "PresentationReceiver", - "PresentationRequest", - "ProcessingInstruction", - "ProgressEvent", - "Promise", - "PromiseRejectionEvent", - "PropertyNodeList", - "Proxy", - "PublicKeyCredential", - "PushManager", - "PushSubscription", - "PushSubscriptionOptions", - "Q", - "QUOTA_ERR", - "QUOTA_EXCEEDED_ERR", - "QueryInterface", - "READY_TO_RUN", - "READ_ONLY", - "READ_ONLY_ERR", - "READ_WRITE", - "RED_BITS", - "REMOVAL", - "RENDERBUFFER", - "RENDERBUFFER_ALPHA_SIZE", - "RENDERBUFFER_BINDING", - "RENDERBUFFER_BLUE_SIZE", - "RENDERBUFFER_DEPTH_SIZE", - "RENDERBUFFER_GREEN_SIZE", - "RENDERBUFFER_HEIGHT", - "RENDERBUFFER_INTERNAL_FORMAT", - "RENDERBUFFER_RED_SIZE", - "RENDERBUFFER_STENCIL_SIZE", - "RENDERBUFFER_WIDTH", - "RENDERER", - "RENDERING_INTENT_ABSOLUTE_COLORIMETRIC", - "RENDERING_INTENT_AUTO", - "RENDERING_INTENT_PERCEPTUAL", - "RENDERING_INTENT_RELATIVE_COLORIMETRIC", - "RENDERING_INTENT_SATURATION", - "RENDERING_INTENT_UNKNOWN", - "REPEAT", - "REPLACE", - "RGB", - "RGB565", - "RGB5_A1", - "RGBA", - "RGBA4", - "RGBColor", - "ROTATION_CLOCKWISE", - "ROTATION_COUNTERCLOCKWISE", - "RTCCertificate", - "RTCDTMFSender", - "RTCDTMFToneChangeEvent", - "RTCDataChannel", - "RTCDataChannelEvent", - "RTCIceCandidate", - "RTCPeerConnection", - "RTCPeerConnectionIceEvent", - "RTCRtpReceiver", - "RTCRtpSender", - "RTCRtpTransceiver", - "RTCSessionDescription", - "RTCStatsReport", - "RTCTrackEvent", - "RUNNING", - "RadioNodeList", - "Range", - "RangeError", - "RangeException", - "ReadableStream", - "RecordErrorEvent", - "Rect", - "ReferenceError", - "Reflect", - "RegExp", - "RelativeOrientationSensor", - "RelativeTimeFormat", - "RemotePlayback", - "ReportingObserver", - "Request", - "ResizeObserver", - "ResizeObserverEntry", - "Response", - "RunningState", - "RuntimeError", - "SAMPLER_2D", - "SAMPLER_CUBE", - "SAMPLES", - "SAMPLE_ALPHA_TO_COVERAGE", - "SAMPLE_BUFFERS", - "SAMPLE_COVERAGE", - "SAMPLE_COVERAGE_INVERT", - "SAMPLE_COVERAGE_VALUE", - "SAWTOOTH", - "SCHEDULED_STATE", - "SCISSOR_BOX", - "SCISSOR_TEST", - "SCROLL_PAGE_DOWN", - "SCROLL_PAGE_UP", - "SDP_ANSWER", - "SDP_OFFER", - "SDP_PRANSWER", - "SECURITY_ERR", - "SELECT", - "SERIALIZE_ERR", - "SEVERITY_ERROR", - "SEVERITY_FATAL_ERROR", - "SEVERITY_WARNING", - "SHADER_COMPILER", - "SHADER_TYPE", - "SHADING_LANGUAGE_VERSION", - "SHIFT_MASK", - "SHORT", - "SHOWING", - "SHOW_ALL", - "SHOW_ATTRIBUTE", - "SHOW_CDATA_SECTION", - "SHOW_COMMENT", - "SHOW_DOCUMENT", - "SHOW_DOCUMENT_FRAGMENT", - "SHOW_DOCUMENT_TYPE", - "SHOW_ELEMENT", - "SHOW_ENTITY", - "SHOW_ENTITY_REFERENCE", - "SHOW_NOTATION", - "SHOW_PROCESSING_INSTRUCTION", - "SHOW_TEXT", - "SINE", - "SKIN", - "SOUNDFIELD", - "SQLException", - "SQRT1_2", - "SQRT2", - "SQUARE", - "SRC_ALPHA", - "SRC_ALPHA_SATURATE", - "SRC_COLOR", - "START_TO_END", - "START_TO_START", - "STATIC_DRAW", - "STENCIL_ATTACHMENT", - "STENCIL_BACK_FAIL", - "STENCIL_BACK_FUNC", - "STENCIL_BACK_PASS_DEPTH_FAIL", - "STENCIL_BACK_PASS_DEPTH_PASS", - "STENCIL_BACK_REF", - "STENCIL_BACK_VALUE_MASK", - "STENCIL_BACK_WRITEMASK", - "STENCIL_BITS", - "STENCIL_BUFFER_BIT", - "STENCIL_CLEAR_VALUE", - "STENCIL_FAIL", - "STENCIL_FUNC", - "STENCIL_INDEX", - "STENCIL_INDEX8", - "STENCIL_PASS_DEPTH_FAIL", - "STENCIL_PASS_DEPTH_PASS", - "STENCIL_REF", - "STENCIL_TEST", - "STENCIL_VALUE_MASK", - "STENCIL_WRITEMASK", - "STREAM_DRAW", - "STRING_TYPE", - "STYLE_RULE", - "SUBPIXEL_BITS", - "SUPPORTS_RULE", - "SVGAElement", - "SVGAltGlyphDefElement", - "SVGAltGlyphElement", - "SVGAltGlyphItemElement", - "SVGAngle", - "SVGAnimateColorElement", - "SVGAnimateElement", - "SVGAnimateMotionElement", - "SVGAnimateTransformElement", - "SVGAnimatedAngle", - "SVGAnimatedBoolean", - "SVGAnimatedEnumeration", - "SVGAnimatedInteger", - "SVGAnimatedLength", - "SVGAnimatedLengthList", - "SVGAnimatedNumber", - "SVGAnimatedNumberList", - "SVGAnimatedPreserveAspectRatio", - "SVGAnimatedRect", - "SVGAnimatedString", - "SVGAnimatedTransformList", - "SVGAnimationElement", - "SVGCircleElement", - "SVGClipPathElement", - "SVGColor", - "SVGComponentTransferFunctionElement", - "SVGCursorElement", - "SVGDefsElement", - "SVGDescElement", - "SVGDiscardElement", - "SVGDocument", - "SVGElement", - "SVGElementInstance", - "SVGElementInstanceList", - "SVGEllipseElement", - "SVGException", - "SVGFEBlendElement", - "SVGFEColorMatrixElement", - "SVGFEComponentTransferElement", - "SVGFECompositeElement", - "SVGFEConvolveMatrixElement", - "SVGFEDiffuseLightingElement", - "SVGFEDisplacementMapElement", - "SVGFEDistantLightElement", - "SVGFEDropShadowElement", - "SVGFEFloodElement", - "SVGFEFuncAElement", - "SVGFEFuncBElement", - "SVGFEFuncGElement", - "SVGFEFuncRElement", - "SVGFEGaussianBlurElement", - "SVGFEImageElement", - "SVGFEMergeElement", - "SVGFEMergeNodeElement", - "SVGFEMorphologyElement", - "SVGFEOffsetElement", - "SVGFEPointLightElement", - "SVGFESpecularLightingElement", - "SVGFESpotLightElement", - "SVGFETileElement", - "SVGFETurbulenceElement", - "SVGFilterElement", - "SVGFontElement", - "SVGFontFaceElement", - "SVGFontFaceFormatElement", - "SVGFontFaceNameElement", - "SVGFontFaceSrcElement", - "SVGFontFaceUriElement", - "SVGForeignObjectElement", - "SVGGElement", - "SVGGeometryElement", - "SVGGlyphElement", - "SVGGlyphRefElement", - "SVGGradientElement", - "SVGGraphicsElement", - "SVGHKernElement", - "SVGImageElement", - "SVGLength", - "SVGLengthList", - "SVGLineElement", - "SVGLinearGradientElement", - "SVGMPathElement", - "SVGMarkerElement", - "SVGMaskElement", - "SVGMatrix", - "SVGMetadataElement", - "SVGMissingGlyphElement", - "SVGNumber", - "SVGNumberList", - "SVGPaint", - "SVGPathElement", - "SVGPathSeg", - "SVGPathSegArcAbs", - "SVGPathSegArcRel", - "SVGPathSegClosePath", - "SVGPathSegCurvetoCubicAbs", - "SVGPathSegCurvetoCubicRel", - "SVGPathSegCurvetoCubicSmoothAbs", - "SVGPathSegCurvetoCubicSmoothRel", - "SVGPathSegCurvetoQuadraticAbs", - "SVGPathSegCurvetoQuadraticRel", - "SVGPathSegCurvetoQuadraticSmoothAbs", - "SVGPathSegCurvetoQuadraticSmoothRel", - "SVGPathSegLinetoAbs", - "SVGPathSegLinetoHorizontalAbs", - "SVGPathSegLinetoHorizontalRel", - "SVGPathSegLinetoRel", - "SVGPathSegLinetoVerticalAbs", - "SVGPathSegLinetoVerticalRel", - "SVGPathSegList", - "SVGPathSegMovetoAbs", - "SVGPathSegMovetoRel", - "SVGPatternElement", - "SVGPoint", - "SVGPointList", - "SVGPolygonElement", - "SVGPolylineElement", - "SVGPreserveAspectRatio", - "SVGRadialGradientElement", - "SVGRect", - "SVGRectElement", - "SVGRenderingIntent", - "SVGSVGElement", - "SVGScriptElement", - "SVGSetElement", - "SVGStopElement", - "SVGStringList", - "SVGStyleElement", - "SVGSwitchElement", - "SVGSymbolElement", - "SVGTRefElement", - "SVGTSpanElement", - "SVGTextContentElement", - "SVGTextElement", - "SVGTextPathElement", - "SVGTextPositioningElement", - "SVGTitleElement", - "SVGTransform", - "SVGTransformList", - "SVGUnitTypes", - "SVGUseElement", - "SVGVKernElement", - "SVGViewElement", - "SVGViewSpec", - "SVGZoomAndPan", - "SVGZoomEvent", - "SVG_ANGLETYPE_DEG", - "SVG_ANGLETYPE_GRAD", - "SVG_ANGLETYPE_RAD", - "SVG_ANGLETYPE_UNKNOWN", - "SVG_ANGLETYPE_UNSPECIFIED", - "SVG_CHANNEL_A", - "SVG_CHANNEL_B", - "SVG_CHANNEL_G", - "SVG_CHANNEL_R", - "SVG_CHANNEL_UNKNOWN", - "SVG_COLORTYPE_CURRENTCOLOR", - "SVG_COLORTYPE_RGBCOLOR", - "SVG_COLORTYPE_RGBCOLOR_ICCCOLOR", - "SVG_COLORTYPE_UNKNOWN", - "SVG_EDGEMODE_DUPLICATE", - "SVG_EDGEMODE_NONE", - "SVG_EDGEMODE_UNKNOWN", - "SVG_EDGEMODE_WRAP", - "SVG_FEBLEND_MODE_COLOR", - "SVG_FEBLEND_MODE_COLOR_BURN", - "SVG_FEBLEND_MODE_COLOR_DODGE", - "SVG_FEBLEND_MODE_DARKEN", - "SVG_FEBLEND_MODE_DIFFERENCE", - "SVG_FEBLEND_MODE_EXCLUSION", - "SVG_FEBLEND_MODE_HARD_LIGHT", - "SVG_FEBLEND_MODE_HUE", - "SVG_FEBLEND_MODE_LIGHTEN", - "SVG_FEBLEND_MODE_LUMINOSITY", - "SVG_FEBLEND_MODE_MULTIPLY", - "SVG_FEBLEND_MODE_NORMAL", - "SVG_FEBLEND_MODE_OVERLAY", - "SVG_FEBLEND_MODE_SATURATION", - "SVG_FEBLEND_MODE_SCREEN", - "SVG_FEBLEND_MODE_SOFT_LIGHT", - "SVG_FEBLEND_MODE_UNKNOWN", - "SVG_FECOLORMATRIX_TYPE_HUEROTATE", - "SVG_FECOLORMATRIX_TYPE_LUMINANCETOALPHA", - "SVG_FECOLORMATRIX_TYPE_MATRIX", - "SVG_FECOLORMATRIX_TYPE_SATURATE", - "SVG_FECOLORMATRIX_TYPE_UNKNOWN", - "SVG_FECOMPONENTTRANSFER_TYPE_DISCRETE", - "SVG_FECOMPONENTTRANSFER_TYPE_GAMMA", - "SVG_FECOMPONENTTRANSFER_TYPE_IDENTITY", - "SVG_FECOMPONENTTRANSFER_TYPE_LINEAR", - "SVG_FECOMPONENTTRANSFER_TYPE_TABLE", - "SVG_FECOMPONENTTRANSFER_TYPE_UNKNOWN", - "SVG_FECOMPOSITE_OPERATOR_ARITHMETIC", - "SVG_FECOMPOSITE_OPERATOR_ATOP", - "SVG_FECOMPOSITE_OPERATOR_IN", - "SVG_FECOMPOSITE_OPERATOR_OUT", - "SVG_FECOMPOSITE_OPERATOR_OVER", - "SVG_FECOMPOSITE_OPERATOR_UNKNOWN", - "SVG_FECOMPOSITE_OPERATOR_XOR", - "SVG_INVALID_VALUE_ERR", - "SVG_LENGTHTYPE_CM", - "SVG_LENGTHTYPE_EMS", - "SVG_LENGTHTYPE_EXS", - "SVG_LENGTHTYPE_IN", - "SVG_LENGTHTYPE_MM", - "SVG_LENGTHTYPE_NUMBER", - "SVG_LENGTHTYPE_PC", - "SVG_LENGTHTYPE_PERCENTAGE", - "SVG_LENGTHTYPE_PT", - "SVG_LENGTHTYPE_PX", - "SVG_LENGTHTYPE_UNKNOWN", - "SVG_MARKERUNITS_STROKEWIDTH", - "SVG_MARKERUNITS_UNKNOWN", - "SVG_MARKERUNITS_USERSPACEONUSE", - "SVG_MARKER_ORIENT_ANGLE", - "SVG_MARKER_ORIENT_AUTO", - "SVG_MARKER_ORIENT_UNKNOWN", - "SVG_MASKTYPE_ALPHA", - "SVG_MASKTYPE_LUMINANCE", - "SVG_MATRIX_NOT_INVERTABLE", - "SVG_MEETORSLICE_MEET", - "SVG_MEETORSLICE_SLICE", - "SVG_MEETORSLICE_UNKNOWN", - "SVG_MORPHOLOGY_OPERATOR_DILATE", - "SVG_MORPHOLOGY_OPERATOR_ERODE", - "SVG_MORPHOLOGY_OPERATOR_UNKNOWN", - "SVG_PAINTTYPE_CURRENTCOLOR", - "SVG_PAINTTYPE_NONE", - "SVG_PAINTTYPE_RGBCOLOR", - "SVG_PAINTTYPE_RGBCOLOR_ICCCOLOR", - "SVG_PAINTTYPE_UNKNOWN", - "SVG_PAINTTYPE_URI", - "SVG_PAINTTYPE_URI_CURRENTCOLOR", - "SVG_PAINTTYPE_URI_NONE", - "SVG_PAINTTYPE_URI_RGBCOLOR", - "SVG_PAINTTYPE_URI_RGBCOLOR_ICCCOLOR", - "SVG_PRESERVEASPECTRATIO_NONE", - "SVG_PRESERVEASPECTRATIO_UNKNOWN", - "SVG_PRESERVEASPECTRATIO_XMAXYMAX", - "SVG_PRESERVEASPECTRATIO_XMAXYMID", - "SVG_PRESERVEASPECTRATIO_XMAXYMIN", - "SVG_PRESERVEASPECTRATIO_XMIDYMAX", - "SVG_PRESERVEASPECTRATIO_XMIDYMID", - "SVG_PRESERVEASPECTRATIO_XMIDYMIN", - "SVG_PRESERVEASPECTRATIO_XMINYMAX", - "SVG_PRESERVEASPECTRATIO_XMINYMID", - "SVG_PRESERVEASPECTRATIO_XMINYMIN", - "SVG_SPREADMETHOD_PAD", - "SVG_SPREADMETHOD_REFLECT", - "SVG_SPREADMETHOD_REPEAT", - "SVG_SPREADMETHOD_UNKNOWN", - "SVG_STITCHTYPE_NOSTITCH", - "SVG_STITCHTYPE_STITCH", - "SVG_STITCHTYPE_UNKNOWN", - "SVG_TRANSFORM_MATRIX", - "SVG_TRANSFORM_ROTATE", - "SVG_TRANSFORM_SCALE", - "SVG_TRANSFORM_SKEWX", - "SVG_TRANSFORM_SKEWY", - "SVG_TRANSFORM_TRANSLATE", - "SVG_TRANSFORM_UNKNOWN", - "SVG_TURBULENCE_TYPE_FRACTALNOISE", - "SVG_TURBULENCE_TYPE_TURBULENCE", - "SVG_TURBULENCE_TYPE_UNKNOWN", - "SVG_UNIT_TYPE_OBJECTBOUNDINGBOX", - "SVG_UNIT_TYPE_UNKNOWN", - "SVG_UNIT_TYPE_USERSPACEONUSE", - "SVG_WRONG_TYPE_ERR", - "SVG_ZOOMANDPAN_DISABLE", - "SVG_ZOOMANDPAN_MAGNIFY", - "SVG_ZOOMANDPAN_UNKNOWN", - "SYNTAX_ERR", - "SavedPages", - "Screen", - "ScreenOrientation", - "Script", - "ScriptEngine", - "ScriptEngineBuildVersion", - "ScriptEngineMajorVersion", - "ScriptEngineMinorVersion", - "ScriptProcessorNode", - "ScrollAreaEvent", - "SecurityPolicyViolationEvent", - "Selection", - "Sensor", - "SensorErrorEvent", - "ServiceWorker", - "ServiceWorkerContainer", - "ServiceWorkerRegistration", - "SessionDescription", - "Set", - "ShadowRoot", - "SharedArrayBuffer", - "SharedWorker", - "SimpleGestureEvent", - "SourceBuffer", - "SourceBufferList", - "SpeechSynthesis", - "SpeechSynthesisErrorEvent", - "SpeechSynthesisEvent", - "SpeechSynthesisUtterance", - "SpeechSynthesisVoice", - "StaticRange", - "StereoPannerNode", - "StopIteration", - "Storage", - "StorageEvent", - "StorageManager", - "String", - "StyleMedia", - "StylePropertyMap", - "StylePropertyMapReadOnly", - "StyleSheet", - "StyleSheetList", - "StyleSheetPageList", - "SubtleCrypto", - "Symbol", - "SyncManager", - "SyntaxError", - "TEMPORARY", - "TEXTPATH_METHODTYPE_ALIGN", - "TEXTPATH_METHODTYPE_STRETCH", - "TEXTPATH_METHODTYPE_UNKNOWN", - "TEXTPATH_SPACINGTYPE_AUTO", - "TEXTPATH_SPACINGTYPE_EXACT", - "TEXTPATH_SPACINGTYPE_UNKNOWN", - "TEXTURE", - "TEXTURE0", - "TEXTURE1", - "TEXTURE10", - "TEXTURE11", - "TEXTURE12", - "TEXTURE13", - "TEXTURE14", - "TEXTURE15", - "TEXTURE16", - "TEXTURE17", - "TEXTURE18", - "TEXTURE19", - "TEXTURE2", - "TEXTURE20", - "TEXTURE21", - "TEXTURE22", - "TEXTURE23", - "TEXTURE24", - "TEXTURE25", - "TEXTURE26", - "TEXTURE27", - "TEXTURE28", - "TEXTURE29", - "TEXTURE3", - "TEXTURE30", - "TEXTURE31", - "TEXTURE4", - "TEXTURE5", - "TEXTURE6", - "TEXTURE7", - "TEXTURE8", - "TEXTURE9", - "TEXTURE_2D", - "TEXTURE_BINDING_2D", - "TEXTURE_BINDING_CUBE_MAP", - "TEXTURE_CUBE_MAP", - "TEXTURE_CUBE_MAP_NEGATIVE_X", - "TEXTURE_CUBE_MAP_NEGATIVE_Y", - "TEXTURE_CUBE_MAP_NEGATIVE_Z", - "TEXTURE_CUBE_MAP_POSITIVE_X", - "TEXTURE_CUBE_MAP_POSITIVE_Y", - "TEXTURE_CUBE_MAP_POSITIVE_Z", - "TEXTURE_MAG_FILTER", - "TEXTURE_MAX_ANISOTROPY_EXT", - "TEXTURE_MIN_FILTER", - "TEXTURE_WRAP_S", - "TEXTURE_WRAP_T", - "TEXT_NODE", - "TIMEOUT", - "TIMEOUT_ERR", - "TOO_LARGE_ERR", - "TRANSACTION_INACTIVE_ERR", - "TRIANGLE", - "TRIANGLES", - "TRIANGLE_FAN", - "TRIANGLE_STRIP", - "TYPE_BACK_FORWARD", - "TYPE_ERR", - "TYPE_MISMATCH_ERR", - "TYPE_NAVIGATE", - "TYPE_RELOAD", - "TYPE_RESERVED", - "Table", - "TaskAttributionTiming", - "Text", - "TextDecoder", - "TextDecoderStream", - "TextEncoder", - "TextEncoderStream", - "TextEvent", - "TextMetrics", - "TextRange", - "TextRangeCollection", - "TextTrack", - "TextTrackCue", - "TextTrackCueList", - "TextTrackList", - "TimeEvent", - "TimeRanges", - "Touch", - "TouchEvent", - "TouchList", - "TrackEvent", - "TransformStream", - "TransitionEvent", - "TreeWalker", - "TypeError", - "UIEvent", - "UNCACHED", - "UNKNOWN_ERR", - "UNKNOWN_RULE", - "UNMASKED_RENDERER_WEBGL", - "UNMASKED_VENDOR_WEBGL", - "UNORDERED_NODE_ITERATOR_TYPE", - "UNORDERED_NODE_SNAPSHOT_TYPE", - "UNPACK_ALIGNMENT", - "UNPACK_COLORSPACE_CONVERSION_WEBGL", - "UNPACK_FLIP_Y_WEBGL", - "UNPACK_PREMULTIPLY_ALPHA_WEBGL", - "UNSCHEDULED_STATE", - "UNSENT", - "UNSIGNED_BYTE", - "UNSIGNED_INT", - "UNSIGNED_SHORT", - "UNSIGNED_SHORT_4_4_4_4", - "UNSIGNED_SHORT_5_5_5_1", - "UNSIGNED_SHORT_5_6_5", - "UNSPECIFIED_EVENT_TYPE_ERR", - "UPDATEREADY", - "URIError", - "URL", - "URLSearchParams", - "URLUnencoded", - "URL_MISMATCH_ERR", - "USB", - "USBAlternateInterface", - "USBConfiguration", - "USBConnectionEvent", - "USBDevice", - "USBEndpoint", - "USBInTransferResult", - "USBInterface", - "USBIsochronousInTransferPacket", - "USBIsochronousInTransferResult", - "USBIsochronousOutTransferPacket", - "USBIsochronousOutTransferResult", - "USBOutTransferResult", - "UTC", - "Uint16Array", - "Uint32Array", - "Uint8Array", - "Uint8ClampedArray", - "UserActivation", - "UserMessageHandler", - "UserMessageHandlersNamespace", - "UserProximityEvent", - "VALIDATE_STATUS", - "VALIDATION_ERR", - "VARIABLES_RULE", - "VBArray", - "VENDOR", - "VERSION", - "VERSION_CHANGE", - "VERSION_ERR", - "VERTEX_ATTRIB_ARRAY_BUFFER_BINDING", - "VERTEX_ATTRIB_ARRAY_DIVISOR_ANGLE", - "VERTEX_ATTRIB_ARRAY_ENABLED", - "VERTEX_ATTRIB_ARRAY_NORMALIZED", - "VERTEX_ATTRIB_ARRAY_POINTER", - "VERTEX_ATTRIB_ARRAY_SIZE", - "VERTEX_ATTRIB_ARRAY_STRIDE", - "VERTEX_ATTRIB_ARRAY_TYPE", - "VERTEX_SHADER", - "VERTICAL", - "VERTICAL_AXIS", - "VER_ERR", - "VIEWPORT", - "VIEWPORT_RULE", - "VRDisplay", - "VRDisplayCapabilities", - "VRDisplayEvent", - "VREyeParameters", - "VRFieldOfView", - "VRFrameData", - "VRPose", - "VRStageParameters", - "VTTCue", - "VTTRegion", - "ValidityState", - "VideoPlaybackQuality", - "VideoStreamTrack", - "VisualViewport", - "WEBGL_compressed_texture_s3tc", - "WEBGL_debug_renderer_info", - "WEBKIT_FILTER_RULE", - "WEBKIT_KEYFRAMES_RULE", - "WEBKIT_KEYFRAME_RULE", - "WEBKIT_REGION_RULE", - "WRONG_DOCUMENT_ERR", - "WaveShaperNode", - "WeakMap", - "WeakSet", - "WebAssembly", - "WebGL2RenderingContext", - "WebGLActiveInfo", - "WebGLBuffer", - "WebGLContextEvent", - "WebGLFramebuffer", - "WebGLObject", - "WebGLProgram", - "WebGLQuery", - "WebGLRenderbuffer", - "WebGLRenderingContext", - "WebGLSampler", - "WebGLShader", - "WebGLShaderPrecisionFormat", - "WebGLSync", - "WebGLTexture", - "WebGLTransformFeedback", - "WebGLUniformLocation", - "WebGLVertexArray", - "WebGLVertexArrayObject", - "WebKitAnimationEvent", - "WebKitBlobBuilder", - "WebKitCSSFilterRule", - "WebKitCSSFilterValue", - "WebKitCSSKeyframeRule", - "WebKitCSSKeyframesRule", - "WebKitCSSMatrix", - "WebKitCSSRegionRule", - "WebKitCSSTransformValue", - "WebKitDataCue", - "WebKitGamepad", - "WebKitMediaKeyError", - "WebKitMediaKeyMessageEvent", - "WebKitMediaKeySession", - "WebKitMediaKeys", - "WebKitMediaSource", - "WebKitMutationObserver", - "WebKitNamespace", - "WebKitPlaybackTargetAvailabilityEvent", - "WebKitPoint", - "WebKitShadowRoot", - "WebKitSourceBuffer", - "WebKitSourceBufferList", - "WebKitTransitionEvent", - "WebSocket", - "WebkitAlignContent", - "WebkitAlignItems", - "WebkitAlignSelf", - "WebkitAnimation", - "WebkitAnimationDelay", - "WebkitAnimationDirection", - "WebkitAnimationDuration", - "WebkitAnimationFillMode", - "WebkitAnimationIterationCount", - "WebkitAnimationName", - "WebkitAnimationPlayState", - "WebkitAnimationTimingFunction", - "WebkitAppearance", - "WebkitBackfaceVisibility", - "WebkitBackgroundClip", - "WebkitBackgroundOrigin", - "WebkitBackgroundSize", - "WebkitBorderBottomLeftRadius", - "WebkitBorderBottomRightRadius", - "WebkitBorderImage", - "WebkitBorderRadius", - "WebkitBorderTopLeftRadius", - "WebkitBorderTopRightRadius", - "WebkitBoxAlign", - "WebkitBoxDirection", - "WebkitBoxFlex", - "WebkitBoxOrdinalGroup", - "WebkitBoxOrient", - "WebkitBoxPack", - "WebkitBoxShadow", - "WebkitBoxSizing", - "WebkitFilter", - "WebkitFlex", - "WebkitFlexBasis", - "WebkitFlexDirection", - "WebkitFlexFlow", - "WebkitFlexGrow", - "WebkitFlexShrink", - "WebkitFlexWrap", - "WebkitJustifyContent", - "WebkitMask", - "WebkitMaskClip", - "WebkitMaskComposite", - "WebkitMaskImage", - "WebkitMaskOrigin", - "WebkitMaskPosition", - "WebkitMaskPositionX", - "WebkitMaskPositionY", - "WebkitMaskRepeat", - "WebkitMaskSize", - "WebkitOrder", - "WebkitPerspective", - "WebkitPerspectiveOrigin", - "WebkitTextFillColor", - "WebkitTextSizeAdjust", - "WebkitTextStroke", - "WebkitTextStrokeColor", - "WebkitTextStrokeWidth", - "WebkitTransform", - "WebkitTransformOrigin", - "WebkitTransformStyle", - "WebkitTransition", - "WebkitTransitionDelay", - "WebkitTransitionDuration", - "WebkitTransitionProperty", - "WebkitTransitionTimingFunction", - "WebkitUserSelect", - "WheelEvent", - "Window", - "Worker", - "Worklet", - "WritableStream", - "XMLDocument", - "XMLHttpRequest", - "XMLHttpRequestEventTarget", - "XMLHttpRequestException", - "XMLHttpRequestProgressEvent", - "XMLHttpRequestUpload", - "XMLSerializer", - "XMLStylesheetProcessingInstruction", - "XPathEvaluator", - "XPathException", - "XPathExpression", - "XPathNSResolver", - "XPathResult", - "XSLTProcessor", - "ZERO", - "_XD0M_", - "_YD0M_", - "__defineGetter__", - "__defineSetter__", - "__lookupGetter__", - "__lookupSetter__", - "__opera", - "__proto__", - "_browserjsran", - "a", - "aLink", - "abbr", - "abort", - "aborted", - "abs", - "absolute", - "acceleration", - "accelerationIncludingGravity", - "accelerator", - "accept", - "acceptCharset", - "acceptNode", - "accessKey", - "accessKeyLabel", - "accuracy", - "acos", - "acosh", - "action", - "actionURL", - "activated", - "active", - "activeCues", - "activeElement", - "activeSourceBuffers", - "activeSourceCount", - "activeTexture", - "activeVRDisplays", - "add", - "addBehavior", - "addCandidate", - "addColorStop", - "addCue", - "addElement", - "addEventListener", - "addFilter", - "addFromString", - "addFromUri", - "addIceCandidate", - "addImport", - "addListener", - "addModule", - "addNamed", - "addPageRule", - "addPath", - "addPointer", - "addRange", - "addRegion", - "addRule", - "addSearchEngine", - "addSourceBuffer", - "addStream", - "addTextTrack", - "addTrack", - "addTransceiver", - "addWakeLockListener", - "addedNodes", - "additionalName", - "additiveSymbols", - "addons", - "adoptNode", - "adoptedCallback", - "adoptedStyleSheets", - "adr", - "advance", - "after", - "album", - "alert", - "algorithm", - "align", - "align-content", - "align-items", - "align-self", - "alignContent", - "alignItems", - "alignSelf", - "alignmentBaseline", - "alinkColor", - "all", - "allow", - "allowFullscreen", - "allowPaymentRequest", - "allowedDirections", - "alpha", - "alt", - "altGraphKey", - "altHtml", - "altKey", - "altLeft", - "altitude", - "altitudeAccuracy", - "amplitude", - "ancestorOrigins", - "anchor", - "anchorNode", - "anchorOffset", - "anchors", - "and", - "angle", - "angularAcceleration", - "angularVelocity", - "animVal", - "animate", - "animatedInstanceRoot", - "animatedNormalizedPathSegList", - "animatedPathSegList", - "animatedPoints", - "animation", - "animation-delay", - "animation-direction", - "animation-duration", - "animation-fill-mode", - "animation-iteration-count", - "animation-name", - "animation-play-state", - "animation-timing-function", - "animationDelay", - "animationDirection", - "animationDuration", - "animationFillMode", - "animationIterationCount", - "animationName", - "animationPlayState", - "animationStartTime", - "animationTimingFunction", - "animationsPaused", - "anniversary", - "app", - "appCodeName", - "appMinorVersion", - "appName", - "appNotifications", - "appVersion", - "append", - "appendBuffer", - "appendChild", - "appendData", - "appendItem", - "appendMedium", - "appendNamed", - "appendRule", - "appendStream", - "appendWindowEnd", - "appendWindowStart", - "applets", - "application/pdf", - "application/x-google-chrome-pdf", - "application/x-nacl", - "application/x-pnacl", - "applicationCache", - "apply", - "applyElement", - "arc", - "arcTo", - "archive", - "areas", - "arguments", - "arrayBuffer", - "artist", - "artwork", - "as", - "asin", - "asinh", - "assert", - "assign", - "assignedSlot", - "async", - "atEnd", - "atan", - "atan2", - "atanh", - "atob", - "attachEvent", - "attachShader", - "attachShadow", - "attachments", - "attack", - "attrChange", - "attrName", - "attributeChangedCallback", - "attributeFilter", - "attributeName", - "attributeNamespace", - "attributeOldValue", - "attributeStyleMap", - "attributes", - "audioTracks", - "audioWorklet", - "autoIncrement", - "autobuffer", - "autocapitalize", - "autocomplete", - "autocorrect", - "autofocus", - "automationRate", - "autoplay", - "availHeight", - "availLeft", - "availTop", - "availWidth", - "availability", - "available", - "aversion", - "axes", - "axis", - "azimuth", - "b", - "back", - "backface-visibility", - "backfaceVisibility", - "background", - "background-attachment", - "background-blend-mode", - "background-clip", - "background-color", - "background-image", - "background-origin", - "background-position", - "background-position-x", - "background-position-y", - "background-repeat", - "background-size", - "backgroundAttachment", - "backgroundBlendMode", - "backgroundClip", - "backgroundColor", - "backgroundImage", - "backgroundOrigin", - "backgroundPosition", - "backgroundPositionX", - "backgroundPositionY", - "backgroundRepeat", - "backgroundRepeatX", - "backgroundRepeatY", - "backgroundSize", - "badInput", - "balance", - "baseFrequencyX", - "baseFrequencyY", - "baseLatency", - "baseNode", - "baseOffset", - "baseURI", - "baseVal", - "baselineShift", - "battery", - "bday", - "before", - "beginElement", - "beginElementAt", - "beginPath", - "behavior", - "behaviorCookie", - "behaviorPart", - "behaviorUrns", - "beta", - "bezierCurveTo", - "bgColor", - "bgProperties", - "bias", - "big", - "binaryType", - "bind", - "bindAttribLocation", - "bindBuffer", - "bindFramebuffer", - "bindRenderbuffer", - "bindTexture", - "blendColor", - "blendEquation", - "blendEquationSeparate", - "blendFunc", - "blendFuncSeparate", - "blink", - "blob", - "block-size", - "blockDirection", - "blockSize", - "blue", - "bluetooth", - "blur", - "body", - "bodyUsed", - "bold", - "bookmarks", - "booleanValue", - "border", - "border-block", - "border-block-color", - "border-block-end", - "border-block-end-color", - "border-block-end-style", - "border-block-end-width", - "border-block-start", - "border-block-start-color", - "border-block-start-style", - "border-block-start-width", - "border-block-style", - "border-block-width", - "border-bottom", - "border-bottom-color", - "border-bottom-left-radius", - "border-bottom-right-radius", - "border-bottom-style", - "border-bottom-width", - "border-collapse", - "border-color", - "border-end-end-radius", - "border-end-start-radius", - "border-image", - "border-image-outset", - "border-image-repeat", - "border-image-slice", - "border-image-source", - "border-image-width", - "border-inline", - "border-inline-color", - "border-inline-end", - "border-inline-end-color", - "border-inline-end-style", - "border-inline-end-width", - "border-inline-start", - "border-inline-start-color", - "border-inline-start-style", - "border-inline-start-width", - "border-inline-style", - "border-inline-width", - "border-left", - "border-left-color", - "border-left-style", - "border-left-width", - "border-radius", - "border-right", - "border-right-color", - "border-right-style", - "border-right-width", - "border-spacing", - "border-start-end-radius", - "border-start-start-radius", - "border-style", - "border-top", - "border-top-color", - "border-top-left-radius", - "border-top-right-radius", - "border-top-style", - "border-top-width", - "border-width", - "borderBlock", - "borderBlockColor", - "borderBlockEnd", - "borderBlockEndColor", - "borderBlockEndStyle", - "borderBlockEndWidth", - "borderBlockStart", - "borderBlockStartColor", - "borderBlockStartStyle", - "borderBlockStartWidth", - "borderBlockStyle", - "borderBlockWidth", - "borderBottom", - "borderBottomColor", - "borderBottomLeftRadius", - "borderBottomRightRadius", - "borderBottomStyle", - "borderBottomWidth", - "borderCollapse", - "borderColor", - "borderColorDark", - "borderColorLight", - "borderEndEndRadius", - "borderEndStartRadius", - "borderImage", - "borderImageOutset", - "borderImageRepeat", - "borderImageSlice", - "borderImageSource", - "borderImageWidth", - "borderInline", - "borderInlineColor", - "borderInlineEnd", - "borderInlineEndColor", - "borderInlineEndStyle", - "borderInlineEndWidth", - "borderInlineStart", - "borderInlineStartColor", - "borderInlineStartStyle", - "borderInlineStartWidth", - "borderInlineStyle", - "borderInlineWidth", - "borderLeft", - "borderLeftColor", - "borderLeftStyle", - "borderLeftWidth", - "borderRadius", - "borderRight", - "borderRightColor", - "borderRightStyle", - "borderRightWidth", - "borderSpacing", - "borderStartEndRadius", - "borderStartStartRadius", - "borderStyle", - "borderTop", - "borderTopColor", - "borderTopLeftRadius", - "borderTopRightRadius", - "borderTopStyle", - "borderTopWidth", - "borderWidth", - "bottom", - "bottomMargin", - "bound", - "boundElements", - "boundingClientRect", - "boundingHeight", - "boundingLeft", - "boundingTop", - "boundingWidth", - "bounds", - "box-decoration-break", - "box-shadow", - "box-sizing", - "boxDecorationBreak", - "boxShadow", - "boxSizing", - "break-after", - "break-before", - "break-inside", - "breakAfter", - "breakBefore", - "breakInside", - "browserLanguage", - "btoa", - "bubbles", - "buffer", - "bufferData", - "bufferDepth", - "bufferSize", - "bufferSubData", - "buffered", - "bufferedAmount", - "bufferedRendering", - "buildID", - "buildNumber", - "button", - "buttonID", - "buttons", - "byteLength", - "byteOffset", - "c", - "caches", - "call", - "caller", - "canBeFormatted", - "canBeMounted", - "canBeShared", - "canHaveChildren", - "canHaveHTML", - "canPlayType", - "canTrickleIceCandidates", - "cancel", - "cancelAndHoldAtTime", - "cancelAnimationFrame", - "cancelBubble", - "cancelIdleCallback", - "cancelScheduledValues", - "cancelWatchAvailability", - "cancelable", - "candidate", - "canvas", - "caption", - "caption-side", - "captionSide", - "capture", - "captureEvents", - "captureStackTrace", - "captureStream", - "caret-color", - "caretColor", - "caretPositionFromPoint", - "caretRangeFromPoint", - "cast", - "catch", - "category", - "cbrt", - "cd", - "ceil", - "cellIndex", - "cellPadding", - "cellSpacing", - "cells", - "ch", - "chOff", - "chain", - "challenge", - "changedTouches", - "channel", - "channelCount", - "channelCountMode", - "channelInterpretation", - "char", - "charAt", - "charCode", - "charCodeAt", - "charIndex", - "characterData", - "characterDataOldValue", - "characterSet", - "charging", - "chargingTime", - "charset", - "check", - "checkEnclosure", - "checkFramebufferStatus", - "checkIntersection", - "checkValidity", - "checked", - "childElementCount", - "childList", - "childNodes", - "children", - "chrome", - "ciphertext", - "cite", - "classList", - "className", - "classid", - "clear", - "clearAttributes", - "clearColor", - "clearData", - "clearDepth", - "clearImmediate", - "clearInterval", - "clearLiveSeekableRange", - "clearMarks", - "clearMeasures", - "clearParameters", - "clearRect", - "clearResourceTimings", - "clearShadow", - "clearStencil", - "clearTimeout", - "clearWatch", - "click", - "clickCount", - "clientHeight", - "clientInformation", - "clientLeft", - "clientRect", - "clientRects", - "clientTop", - "clientWidth", - "clientX", - "clientY", - "clip", - "clip-path", - "clip-rule", - "clipBottom", - "clipLeft", - "clipPath", - "clipPathUnits", - "clipRight", - "clipRule", - "clipTop", - "clipboard", - "clipboardData", - "clone", - "cloneContents", - "cloneNode", - "cloneRange", - "close", - "closePath", - "closed", - "closest", - "clz", - "clz32", - "cmp", - "code", - "codeBase", - "codePointAt", - "codeType", - "colSpan", - "collapse", - "collapseToEnd", - "collapseToStart", - "collapsed", - "collect", - "colno", - "color", - "color-adjust", - "color-interpolation", - "color-interpolation-filters", - "colorAdjust", - "colorDepth", - "colorInterpolation", - "colorInterpolationFilters", - "colorMask", - "colorRendering", - "colorType", - "cols", - "column-count", - "column-fill", - "column-gap", - "column-rule", - "column-rule-color", - "column-rule-style", - "column-rule-width", - "column-width", - "columnCount", - "columnFill", - "columnGap", - "columnNumber", - "columnRule", - "columnRuleColor", - "columnRuleStyle", - "columnRuleWidth", - "columnSpan", - "columnWidth", - "columns", - "command", - "commitPreferences", - "commonAncestorContainer", - "compact", - "compare", - "compareBoundaryPoints", - "compareDocumentPosition", - "compareEndPoints", - "compareExchange", - "compareNode", - "comparePoint", - "compatMode", - "compatible", - "compile", - "compileShader", - "compileStreaming", - "complete", - "componentFromPoint", - "composed", - "composedPath", - "compositionEndOffset", - "compositionStartOffset", - "compressedTexImage2D", - "compressedTexSubImage2D", - "computedStyleMap", - "concat", - "conditionText", - "coneInnerAngle", - "coneOuterAngle", - "coneOuterGain", - "confirm", - "confirmComposition", - "confirmSiteSpecificTrackingException", - "confirmWebWideTrackingException", - "connect", - "connectEnd", - "connectStart", - "connected", - "connectedCallback", - "connection", - "connectionSpeed", - "connectionState", - "console", - "consolidate", - "constrictionActive", - "construct", - "constructor", - "contactID", - "contain", - "contains", - "containsNode", - "content", - "contentDocument", - "contentEditable", - "contentOverflow", - "contentScriptType", - "contentStyleType", - "contentType", - "contentWindow", - "context", - "contextMenu", - "contextmenu", - "continue", - "continuous", - "control", - "controller", - "controls", - "controlsList", - "convertToSpecifiedUnits", - "cookie", - "cookieEnabled", - "coords", - "copyFromChannel", - "copyTexImage2D", - "copyTexSubImage2D", - "copyToChannel", - "copyWithin", - "correspondingElement", - "correspondingUseElement", - "cos", - "cosh", - "count", - "countReset", - "counter-increment", - "counter-reset", - "counterIncrement", - "counterReset", - "cpuClass", - "cpuSleepAllowed", - "create", - "createAnalyser", - "createAnswer", - "createAttribute", - "createAttributeNS", - "createBiquadFilter", - "createBuffer", - "createBufferSource", - "createCDATASection", - "createCSSStyleSheet", - "createCaption", - "createChannelMerger", - "createChannelSplitter", - "createComment", - "createConstantSource", - "createContextualFragment", - "createControlRange", - "createConvolver", - "createDTMFSender", - "createDataChannel", - "createDelay", - "createDelayNode", - "createDocument", - "createDocumentFragment", - "createDocumentType", - "createDynamicsCompressor", - "createElement", - "createElementNS", - "createEntityReference", - "createEvent", - "createEventObject", - "createExpression", - "createFramebuffer", - "createFunction", - "createGain", - "createGainNode", - "createHTMLDocument", - "createIIRFilter", - "createImageBitmap", - "createImageData", - "createIndex", - "createJavaScriptNode", - "createLinearGradient", - "createMediaElementSource", - "createMediaKeys", - "createMediaStreamDestination", - "createMediaStreamSource", - "createMutableFile", - "createNSResolver", - "createNodeIterator", - "createNotification", - "createObjectStore", - "createObjectURL", - "createOffer", - "createOscillator", - "createPanner", - "createPattern", - "createPeriodicWave", - "createPopup", - "createProcessingInstruction", - "createProgram", - "createRadialGradient", - "createRange", - "createRangeCollection", - "createRenderbuffer", - "createSVGAngle", - "createSVGLength", - "createSVGMatrix", - "createSVGNumber", - "createSVGPathSegArcAbs", - "createSVGPathSegArcRel", - "createSVGPathSegClosePath", - "createSVGPathSegCurvetoCubicAbs", - "createSVGPathSegCurvetoCubicRel", - "createSVGPathSegCurvetoCubicSmoothAbs", - "createSVGPathSegCurvetoCubicSmoothRel", - "createSVGPathSegCurvetoQuadraticAbs", - "createSVGPathSegCurvetoQuadraticRel", - "createSVGPathSegCurvetoQuadraticSmoothAbs", - "createSVGPathSegCurvetoQuadraticSmoothRel", - "createSVGPathSegLinetoAbs", - "createSVGPathSegLinetoHorizontalAbs", - "createSVGPathSegLinetoHorizontalRel", - "createSVGPathSegLinetoRel", - "createSVGPathSegLinetoVerticalAbs", - "createSVGPathSegLinetoVerticalRel", - "createSVGPathSegMovetoAbs", - "createSVGPathSegMovetoRel", - "createSVGPoint", - "createSVGRect", - "createSVGTransform", - "createSVGTransformFromMatrix", - "createScriptProcessor", - "createSession", - "createShader", - "createShadowRoot", - "createStereoPanner", - "createStyleSheet", - "createTBody", - "createTFoot", - "createTHead", - "createTextNode", - "createTextRange", - "createTexture", - "createTouch", - "createTouchList", - "createTreeWalker", - "createWaveShaper", - "creationTime", - "credentials", - "crossOrigin", - "crypto", - "csi", - "csp", - "cssFloat", - "cssRules", - "cssText", - "cssValueType", - "ctrlKey", - "ctrlLeft", - "cues", - "cullFace", - "currentLocalDescription", - "currentNode", - "currentPage", - "currentRemoteDescription", - "currentScale", - "currentScript", - "currentSrc", - "currentState", - "currentStyle", - "currentTarget", - "currentTime", - "currentTranslate", - "currentView", - "cursor", - "curve", - "customElements", - "customError", - "cx", - "cy", - "d", - "data", - "dataFld", - "dataFormatAs", - "dataPageSize", - "dataSrc", - "dataTransfer", - "database", - "databases", - "dataset", - "dateTime", - "db", - "debug", - "debuggerEnabled", - "declare", - "decode", - "decodeAudioData", - "decodeURI", - "decodeURIComponent", - "decoding", - "decodingInfo", - "decrypt", - "default", - "defaultCharset", - "defaultChecked", - "defaultMuted", - "defaultPlaybackRate", - "defaultPrevented", - "defaultRequest", - "defaultSelected", - "defaultStatus", - "defaultURL", - "defaultValue", - "defaultView", - "defaultstatus", - "defer", - "define", - "defineMagicFunction", - "defineMagicVariable", - "defineProperties", - "defineProperty", - "delayTime", - "delegatesFocus", - "delete", - "deleteBuffer", - "deleteCaption", - "deleteCell", - "deleteContents", - "deleteData", - "deleteDatabase", - "deleteFramebuffer", - "deleteFromDocument", - "deleteIndex", - "deleteMedium", - "deleteObjectStore", - "deleteProgram", - "deleteProperty", - "deleteRenderbuffer", - "deleteRow", - "deleteRule", - "deleteShader", - "deleteTFoot", - "deleteTHead", - "deleteTexture", - "deliverChangeRecords", - "delivery", - "deliveryInfo", - "deliveryStatus", - "deliveryTimestamp", - "delta", - "deltaMode", - "deltaX", - "deltaY", - "deltaZ", - "depthFunc", - "depthMask", - "depthRange", - "deriveBits", - "deriveKey", - "description", - "deselectAll", - "designMode", - "destination", - "destinationURL", - "detach", - "detachEvent", - "detachShader", - "detail", - "detune", - "deviceMemory", - "devicePixelRatio", - "deviceSessionId", - "deviceXDPI", - "deviceYDPI", - "diffuseConstant", - "digest", - "dimensions", - "dir", - "dirName", - "direction", - "dirxml", - "disable", - "disablePictureInPicture", - "disableRemotePlayback", - "disableVertexAttribArray", - "disabled", - "dischargingTime", - "disconnect", - "disconnectedCallback", - "dispatchEvent", - "display", - "distanceModel", - "divisor", - "djsapi", - "djsproxy", - "doImport", - "doNotTrack", - "doScroll", - "doctype", - "document", - "documentElement", - "documentMode", - "documentURI", - "dolphin", - "dolphinGameCenter", - "dolphininfo", - "dolphinmeta", - "domComplete", - "domContentLoadedEventEnd", - "domContentLoadedEventStart", - "domInteractive", - "domLoading", - "domain", - "domainLookupEnd", - "domainLookupStart", - "dominant-baseline", - "dominantBaseline", - "done", - "dopplerFactor", - "dotAll", - "downlink", - "download", - "dragDrop", - "draggable", - "drawArrays", - "drawArraysInstancedANGLE", - "drawCustomFocusRing", - "drawElements", - "drawElementsInstancedANGLE", - "drawFocusIfNeeded", - "drawImage", - "drawImageFromRect", - "drawSystemFocusRing", - "drawingBufferHeight", - "drawingBufferWidth", - "dropEffect", - "droppedVideoFrames", - "dropzone", - "dump", - "duplicate", - "duration", - "dvname", - "dvnum", - "dx", - "dy", - "dynsrc", - "e", - "edgeMode", - "effect", - "effectAllowed", - "effectiveType", - "elapsedTime", - "elementFromPoint", - "elements", - "elementsFromPoint", - "elevation", - "ellipse", - "email", - "embeds", - "empty", - "empty-cells", - "emptyCells", - "enable", - "enableBackground", - "enableStyleSheetsForSet", - "enableVertexAttribArray", - "enabled", - "enabledPlugin", - "encode", - "encodeInto", - "encodeURI", - "encodeURIComponent", - "encoding", - "encodingInfo", - "encrypt", - "enctype", - "end", - "endContainer", - "endElement", - "endElementAt", - "endOfStream", - "endOffset", - "endTime", - "ended", - "endsWith", - "entities", - "entries", - "entryType", - "enumerate", - "enumerateDevices", - "enumerateEditable", - "epubCaptionSide", - "epubTextCombine", - "epubTextEmphasis", - "epubTextEmphasisColor", - "epubTextEmphasisStyle", - "epubTextOrientation", - "epubTextTransform", - "epubWordBreak", - "epubWritingMode", - "error", - "errorCode", - "escape", - "estimate", - "eval", - "evaluate", - "event", - "eventPhase", - "every", - "exception", - "exchange", - "exec", - "execCommand", - "execCommandShowHelp", - "execScript", - "exitFullscreen", - "exitPictureInPicture", - "exitPointerLock", - "exp", - "expand", - "expandEntityReferences", - "expando", - "expansion", - "expiryDate", - "explicitOriginalTarget", - "expm1", - "exponent", - "exponentialRampToValueAtTime", - "exportKey", - "extend", - "extensions", - "extentNode", - "extentOffset", - "external", - "externalResourcesRequired", - "extractContents", - "extractable", - "f", - "face", - "factoryReset", - "fallback", - "familyName", - "farthestViewportElement", - "fastSeek", - "fatal", - "fetch", - "fetchStart", - "fftSize", - "fgColor", - "fileCreatedDate", - "fileHandle", - "fileModifiedDate", - "fileName", - "fileSize", - "fileUpdatedDate", - "filename", - "files", - "fill", - "fill-opacity", - "fill-rule", - "fillOpacity", - "fillRect", - "fillRule", - "fillStyle", - "fillText", - "filter", - "filterResX", - "filterResY", - "filterUnits", - "filters", - "finally", - "find", - "findIndex", - "findRule", - "findText", - "finish", - "finished", - "fireEvent", - "firesTouchEvents", - "firstChild", - "firstElementChild", - "firstPage", - "fixed", - "flags", - "flat", - "flatMap", - "flex", - "flex-basis", - "flex-direction", - "flex-flow", - "flex-grow", - "flex-shrink", - "flex-wrap", - "flexBasis", - "flexDirection", - "flexFlow", - "flexGrow", - "flexShrink", - "flexWrap", - "flipX", - "flipY", - "float", - "flood-color", - "flood-opacity", - "floodColor", - "floodOpacity", - "floor", - "flush", - "focus", - "focusNode", - "focusOffset", - "font", - "font-family", - "font-feature-settings", - "font-kerning", - "font-language-override", - "font-size", - "font-size-adjust", - "font-stretch", - "font-style", - "font-synthesis", - "font-variant", - "font-variant-alternates", - "font-variant-caps", - "font-variant-east-asian", - "font-variant-ligatures", - "font-variant-numeric", - "font-variant-position", - "font-weight", - "fontDisplay", - "fontFamily", - "fontFeatureSettings", - "fontKerning", - "fontLanguageOverride", - "fontSize", - "fontSizeAdjust", - "fontSmoothingEnabled", - "fontStretch", - "fontStyle", - "fontSynthesis", - "fontVariant", - "fontVariantAlternates", - "fontVariantCaps", - "fontVariantEastAsian", - "fontVariantLigatures", - "fontVariantNumeric", - "fontVariantPosition", - "fontVariationSettings", - "fontWeight", - "fontcolor", - "fonts", - "fontsize", - "for", - "forEach", - "forceRedraw", - "form", - "formAction", - "formData", - "formEnctype", - "formMethod", - "formNoValidate", - "formTarget", - "format", - "formatToParts", - "forms", - "forward", - "forwardX", - "forwardY", - "forwardZ", - "fr", - "frame", - "frameBorder", - "frameElement", - "frameSpacing", - "framebufferRenderbuffer", - "framebufferTexture2D", - "frames", - "freeSpace", - "freeze", - "frequency", - "frequencyBinCount", - "from", - "fromCharCode", - "fromCodePoint", - "fromElement", - "frontFace", - "fround", - "fullScreen", - "fullscreen", - "fullscreenElement", - "fullscreenEnabled", - "fx", - "fy", - "gain", - "gamepad", - "gamma", - "gap", - "genderIdentity", - "generateKey", - "generateMipmap", - "generateRequest", - "geolocation", - "gestureObject", - "get", - "getActiveAttrib", - "getActiveUniform", - "getAdjacentText", - "getAll", - "getAllResponseHeaders", - "getAsFile", - "getAsString", - "getAttachedShaders", - "getAttribLocation", - "getAttribute", - "getAttributeNS", - "getAttributeNames", - "getAttributeNode", - "getAttributeNodeNS", - "getAudioTracks", - "getBBox", - "getBattery", - "getBlob", - "getBookmark", - "getBoundingClientRect", - "getBounds", - "getBufferParameter", - "getByteFrequencyData", - "getByteTimeDomainData", - "getCSSCanvasContext", - "getCTM", - "getCandidateWindowClientRect", - "getCanonicalLocales", - "getChannelData", - "getCharNumAtPosition", - "getClientRect", - "getClientRects", - "getCompositionAlternatives", - "getComputedStyle", - "getComputedTextLength", - "getConfiguration", - "getContext", - "getContextAttributes", - "getCounterValue", - "getCueAsHTML", - "getCueById", - "getCurrentPosition", - "getCurrentTime", - "getData", - "getDatabaseNames", - "getDate", - "getDay", - "getDefaultComputedStyle", - "getDestinationInsertionPoints", - "getDetails", - "getDevices", - "getDisplayMedia", - "getDistributedNodes", - "getEditable", - "getElementById", - "getElementsByClassName", - "getElementsByName", - "getElementsByTagName", - "getElementsByTagNameNS", - "getEnclosureList", - "getEndPositionOfChar", - "getEntries", - "getEntriesByName", - "getEntriesByType", - "getError", - "getExtension", - "getExtentOfChar", - "getFeature", - "getFile", - "getFloat32", - "getFloat64", - "getFloatFrequencyData", - "getFloatTimeDomainData", - "getFloatValue", - "getFramebufferAttachmentParameter", - "getFrequencyResponse", - "getFullYear", - "getGamepads", - "getHours", - "getIdentityAssertion", - "getImageData", - "getInt16", - "getInt32", - "getInt8", - "getIntersectionList", - "getIsInstalled", - "getItem", - "getItems", - "getKey", - "getLayoutMap", - "getLineDash", - "getLocalStreams", - "getMarks", - "getMatchedCSSRules", - "getMeasures", - "getMetadata", - "getMilliseconds", - "getMinutes", - "getModifierState", - "getMonth", - "getNamedItem", - "getNamedItemNS", - "getNotifier", - "getNumberOfChars", - "getOutputTimestamp", - "getOverrideHistoryNavigationMode", - "getOverrideStyle", - "getOwnPropertyDescriptor", - "getOwnPropertyNames", - "getOwnPropertySymbols", - "getParameter", - "getPathSegAtLength", - "getPointAtLength", - "getPreference", - "getPreferenceDefault", - "getPresentationAttribute", - "getPreventDefault", - "getProgramInfoLog", - "getProgramParameter", - "getPropertyCSSValue", - "getPropertyPriority", - "getPropertyShorthand", - "getPropertyValue", - "getPrototypeOf", - "getRGBColorValue", - "getRandomValues", - "getRangeAt", - "getReader", - "getReceivers", - "getRectValue", - "getRegistration", - "getRegistrations", - "getRemoteStreams", - "getRenderbufferParameter", - "getResponseHeader", - "getRoot", - "getRootNode", - "getRotationOfChar", - "getSVGDocument", - "getScreenCTM", - "getSeconds", - "getSelection", - "getSenders", - "getShaderInfoLog", - "getShaderParameter", - "getShaderPrecisionFormat", - "getShaderSource", - "getSimpleDuration", - "getSiteIcons", - "getSources", - "getSpeculativeParserUrls", - "getStartPositionOfChar", - "getStartTime", - "getStats", - "getStorageUpdates", - "getStreamById", - "getStringValue", - "getSubStringLength", - "getSubscription", - "getSupportedConstraints", - "getSupportedExtensions", - "getTexParameter", - "getTime", - "getTimezoneOffset", - "getTotalLength", - "getTrackById", - "getTracks", - "getTransceivers", - "getTransformToElement", - "getUTCDate", - "getUTCDay", - "getUTCFullYear", - "getUTCHours", - "getUTCMilliseconds", - "getUTCMinutes", - "getUTCMonth", - "getUTCSeconds", - "getUint16", - "getUint32", - "getUint8", - "getUniform", - "getUniformLocation", - "getUserMedia", - "getVRDisplays", - "getValues", - "getVarDate", - "getVariableValue", - "getVertexAttrib", - "getVertexAttribOffset", - "getVideoPlaybackQuality", - "getVideoTracks", - "getVoices", - "getWakeLockState", - "getWriter", - "getYear", - "givenName", - "global", - "globalAlpha", - "globalCompositeOperation", - "globalThis", - "glyphOrientationHorizontal", - "glyphOrientationVertical", - "glyphRef", - "go", - "gradientTransform", - "gradientUnits", - "grammars", - "green", - "grid", - "grid-area", - "grid-auto-columns", - "grid-auto-flow", - "grid-auto-rows", - "grid-column", - "grid-column-end", - "grid-column-gap", - "grid-column-start", - "grid-gap", - "grid-row", - "grid-row-end", - "grid-row-gap", - "grid-row-start", - "grid-template", - "grid-template-areas", - "grid-template-columns", - "grid-template-rows", - "gridArea", - "gridAutoColumns", - "gridAutoFlow", - "gridAutoRows", - "gridColumn", - "gridColumnEnd", - "gridColumnGap", - "gridColumnStart", - "gridGap", - "gridRow", - "gridRowEnd", - "gridRowGap", - "gridRowStart", - "gridTemplate", - "gridTemplateAreas", - "gridTemplateColumns", - "gridTemplateRows", - "group", - "groupCollapsed", - "groupEnd", - "hardwareConcurrency", - "has", - "hasAttribute", - "hasAttributeNS", - "hasAttributes", - "hasBeenActive", - "hasChildNodes", - "hasComposition", - "hasExtension", - "hasFeature", - "hasFocus", - "hasLayout", - "hasOwnProperty", - "hasPointerCapture", - "hasReading", - "hasStorageAccess", - "hash", - "head", - "headers", - "heading", - "height", - "hidden", - "hide", - "hideFocus", - "high", - "hint", - "history", - "honorificPrefix", - "honorificSuffix", - "horizontalOverflow", - "host", - "hostname", - "href", - "hreflang", - "hspace", - "html5TagCheckInerface", - "htmlFor", - "htmlText", - "httpEquiv", - "hwTimestamp", - "hyphens", - "hypot", - "iccId", - "iceConnectionState", - "iceGatheringState", - "icon", - "id", - "identifier", - "identity", - "idpLoginUrl", - "ignoreBOM", - "ignoreCase", - "image-orientation", - "image-rendering", - "imageOrientation", - "imageRendering", - "imageSizes", - "imageSrcset", - "images", - "ime-mode", - "imeMode", - "implementation", - "import", - "importKey", - "importNode", - "importStylesheet", - "imports", - "impp", - "imul", - "in1", - "in2", - "inBandMetadataTrackDispatchType", - "inRange", - "includes", - "incremental", - "indeterminate", - "index", - "indexNames", - "indexOf", - "indexedDB", - "inertiaDestinationX", - "inertiaDestinationY", - "info", - "init", - "initAnimationEvent", - "initBeforeLoadEvent", - "initClipboardEvent", - "initCloseEvent", - "initCommandEvent", - "initCompositionEvent", - "initCustomEvent", - "initData", - "initDeviceMotionEvent", - "initDeviceOrientationEvent", - "initDragEvent", - "initErrorEvent", - "initEvent", - "initFocusEvent", - "initGestureEvent", - "initHashChangeEvent", - "initKeyEvent", - "initKeyboardEvent", - "initMSManipulationEvent", - "initMessageEvent", - "initMouseEvent", - "initMouseScrollEvent", - "initMouseWheelEvent", - "initMutationEvent", - "initNSMouseEvent", - "initOverflowEvent", - "initPageEvent", - "initPageTransitionEvent", - "initPointerEvent", - "initPopStateEvent", - "initProgressEvent", - "initScrollAreaEvent", - "initSimpleGestureEvent", - "initStorageEvent", - "initTextEvent", - "initTimeEvent", - "initTouchEvent", - "initTransitionEvent", - "initUIEvent", - "initWebKitAnimationEvent", - "initWebKitTransitionEvent", - "initWebKitWheelEvent", - "initWheelEvent", - "initialTime", - "initialize", - "initiatorType", - "inline-size", - "inlineSize", - "inner", - "innerHTML", - "innerHeight", - "innerText", - "innerWidth", - "input", - "inputBuffer", - "inputEncoding", - "inputMethod", - "inputMode", - "insertAdjacentElement", - "insertAdjacentHTML", - "insertAdjacentText", - "insertBefore", - "insertCell", - "insertData", - "insertItemBefore", - "insertNode", - "insertRow", - "insertRule", - "inset", - "inset-block", - "inset-block-end", - "inset-block-start", - "inset-inline", - "inset-inline-end", - "inset-inline-start", - "insetBlock", - "insetBlockEnd", - "insetBlockStart", - "insetInline", - "insetInlineEnd", - "insetInlineStart", - "install", - "installChrome", - "installState", - "instanceRoot", - "instantiate", - "instantiateStreaming", - "integrity", - "intercept", - "interimResults", - "internalSubset", - "intersectsNode", - "interval", - "invalidIteratorState", - "inverse", - "invertSelf", - "is", - "is2D", - "isActive", - "isAlternate", - "isArray", - "isBingCurrentSearchDefault", - "isBuffer", - "isCandidateWindowVisible", - "isChar", - "isCollapsed", - "isComposing", - "isConnected", - "isContentEditable", - "isContentHandlerRegistered", - "isContextLost", - "isDefaultNamespace", - "isDisabled", - "isEnabled", - "isEqual", - "isEqualNode", - "isExtensible", - "isFinite", - "isFramebuffer", - "isFrozen", - "isGenerator", - "isId", - "isIdentity", - "isInjected", - "isInstalled", - "isInteger", - "isLockFree", - "isMap", - "isMultiLine", - "isNaN", - "isOpen", - "isPointInFill", - "isPointInPath", - "isPointInRange", - "isPointInStroke", - "isPrefAlternate", - "isPrimary", - "isProgram", - "isPropertyImplicit", - "isProtocolHandlerRegistered", - "isPrototypeOf", - "isRenderbuffer", - "isSafeInteger", - "isSameNode", - "isSealed", - "isSecureContext", - "isShader", - "isSupported", - "isTextEdit", - "isTexture", - "isTrusted", - "isTypeSupported", - "isView", - "isolation", - "italics", - "item", - "itemId", - "itemProp", - "itemRef", - "itemScope", - "itemType", - "itemValue", - "items", - "iterateNext", - "iterator", - "javaEnabled", - "jobTitle", - "join", - "jsHeapSizeLimit", - "json", - "justify-content", - "justify-items", - "justify-self", - "justifyContent", - "justifyItems", - "justifySelf", - "k1", - "k2", - "k3", - "k4", - "kernelMatrix", - "kernelUnitLengthX", - "kernelUnitLengthY", - "kerning", - "key", - "keyCode", - "keyFor", - "keyIdentifier", - "keyLightEnabled", - "keyLocation", - "keyPath", - "keySystem", - "keyText", - "keyUsage", - "keyboard", - "keys", - "keytype", - "kind", - "knee", - "label", - "labels", - "lang", - "language", - "languages", - "largeArcFlag", - "lastChild", - "lastElementChild", - "lastEventId", - "lastIndex", - "lastIndexOf", - "lastMatch", - "lastMessageSubject", - "lastMessageType", - "lastModified", - "lastModifiedDate", - "lastPage", - "lastParen", - "lastState", - "lastStyleSheetSet", - "latitude", - "layerX", - "layerY", - "layoutFlow", - "layoutGrid", - "layoutGridChar", - "layoutGridLine", - "layoutGridMode", - "layoutGridType", - "lbound", - "left", - "leftContext", - "leftMargin", - "leftProjectionMatrix", - "leftViewMatrix", - "length", - "lengthAdjust", - "lengthComputable", - "letter-spacing", - "letterSpacing", - "level", - "lighting-color", - "lightingColor", - "limitingConeAngle", - "line", - "line-height", - "lineAlign", - "lineBreak", - "lineCap", - "lineDashOffset", - "lineHeight", - "lineJoin", - "lineNumber", - "lineTo", - "lineWidth", - "linearAcceleration", - "linearRampToValueAtTime", - "linearVelocity", - "lineno", - "lines", - "link", - "linkColor", - "linkProgram", - "links", - "list", - "list-style", - "list-style-image", - "list-style-position", - "list-style-type", - "listStyle", - "listStyleImage", - "listStylePosition", - "listStyleType", - "listener", - "load", - "loadEventEnd", - "loadEventStart", - "loadTimes", - "loaded", - "localDescription", - "localName", - "localStorage", - "locale", - "localeCompare", - "location", - "locationbar", - "lock", - "locked", - "lockedFile", - "locks", - "log", - "log10", - "log1p", - "log2", - "logicalXDPI", - "logicalYDPI", - "longDesc", - "longitude", - "lookupNamespaceURI", - "lookupPrefix", - "loop", - "loopEnd", - "loopStart", - "looping", - "low", - "lower", - "lowerBound", - "lowerOpen", - "lowsrc", - "m11", - "m12", - "m13", - "m14", - "m21", - "m22", - "m23", - "m24", - "m31", - "m32", - "m33", - "m34", - "m41", - "m42", - "m43", - "m44", - "manifest", - "map", - "mapping", - "margin", - "margin-block", - "margin-block-end", - "margin-block-start", - "margin-bottom", - "margin-inline", - "margin-inline-end", - "margin-inline-start", - "margin-left", - "margin-right", - "margin-top", - "marginBlock", - "marginBlockEnd", - "marginBlockStart", - "marginBottom", - "marginHeight", - "marginInline", - "marginInlineEnd", - "marginInlineStart", - "marginLeft", - "marginRight", - "marginTop", - "marginWidth", - "mark", - "marker", - "marker-end", - "marker-mid", - "marker-offset", - "marker-start", - "markerEnd", - "markerHeight", - "markerMid", - "markerOffset", - "markerStart", - "markerUnits", - "markerWidth", - "marks", - "mask", - "mask-clip", - "mask-composite", - "mask-image", - "mask-mode", - "mask-origin", - "mask-position", - "mask-position-x", - "mask-position-y", - "mask-repeat", - "mask-size", - "mask-type", - "maskClip", - "maskComposite", - "maskContentUnits", - "maskImage", - "maskMode", - "maskOrigin", - "maskPosition", - "maskPositionX", - "maskPositionY", - "maskRepeat", - "maskSize", - "maskType", - "maskUnits", - "match", - "matchAll", - "matchMedia", - "matchMedium", - "matches", - "matrix", - "matrixTransform", - "max", - "max-block-size", - "max-height", - "max-inline-size", - "max-width", - "maxAlternatives", - "maxBlockSize", - "maxChannelCount", - "maxConnectionsPerServer", - "maxDecibels", - "maxDistance", - "maxHeight", - "maxInlineSize", - "maxLength", - "maxTouchPoints", - "maxValue", - "maxWidth", - "maxZoom", - "measure", - "measureText", - "media", - "mediaCapabilities", - "mediaDevices", - "mediaElement", - "mediaGroup", - "mediaKeys", - "mediaSession", - "mediaText", - "meetOrSlice", - "memory", - "menubar", - "mergeAttributes", - "message", - "messageClass", - "messageHandlers", - "metaKey", - "metadata", - "method", - "mimeType", - "mimeTypes", - "min", - "min-block-size", - "min-height", - "min-inline-size", - "min-width", - "minBlockSize", - "minDecibels", - "minHeight", - "minInlineSize", - "minLength", - "minValue", - "minWidth", - "minZoom", - "miterLimit", - "mix-blend-mode", - "mixBlendMode", - "mode", - "modify", - "mount", - "move", - "moveBy", - "moveEnd", - "moveFirst", - "moveFocusDown", - "moveFocusLeft", - "moveFocusRight", - "moveFocusUp", - "moveNext", - "moveRow", - "moveStart", - "moveTo", - "moveToBookmark", - "moveToElementText", - "moveToPoint", - "movementX", - "movementY", - "mozAdd", - "mozAnimationStartTime", - "mozAnon", - "mozApps", - "mozAudioCaptured", - "mozAudioChannelType", - "mozAutoplayEnabled", - "mozCancelAnimationFrame", - "mozCancelFullScreen", - "mozCancelRequestAnimationFrame", - "mozCaptureStream", - "mozCaptureStreamUntilEnded", - "mozClearDataAt", - "mozContact", - "mozContacts", - "mozCreateFileHandle", - "mozCurrentTransform", - "mozCurrentTransformInverse", - "mozCursor", - "mozDash", - "mozDashOffset", - "mozDecodedFrames", - "mozExitPointerLock", - "mozFillRule", - "mozFragmentEnd", - "mozFrameDelay", - "mozFullScreen", - "mozFullScreenElement", - "mozFullScreenEnabled", - "mozGetAll", - "mozGetAllKeys", - "mozGetAsFile", - "mozGetDataAt", - "mozGetMetadata", - "mozGetUserMedia", - "mozHasAudio", - "mozHasItem", - "mozHidden", - "mozImageSmoothingEnabled", - "mozIndexedDB", - "mozInnerScreenX", - "mozInnerScreenY", - "mozInputSource", - "mozIsTextField", - "mozItem", - "mozItemCount", - "mozItems", - "mozLength", - "mozLockOrientation", - "mozMatchesSelector", - "mozMovementX", - "mozMovementY", - "mozOpaque", - "mozOrientation", - "mozPaintCount", - "mozPaintedFrames", - "mozParsedFrames", - "mozPay", - "mozPointerLockElement", - "mozPresentedFrames", - "mozPreservesPitch", - "mozPressure", - "mozPrintCallback", - "mozRTCIceCandidate", - "mozRTCPeerConnection", - "mozRTCSessionDescription", - "mozRemove", - "mozRequestAnimationFrame", - "mozRequestFullScreen", - "mozRequestPointerLock", - "mozSetDataAt", - "mozSetImageElement", - "mozSourceNode", - "mozSrcObject", - "mozSystem", - "mozTCPSocket", - "mozTextStyle", - "mozTypesAt", - "mozUnlockOrientation", - "mozUserCancelled", - "mozVisibilityState", - "msAnimation", - "msAnimationDelay", - "msAnimationDirection", - "msAnimationDuration", - "msAnimationFillMode", - "msAnimationIterationCount", - "msAnimationName", - "msAnimationPlayState", - "msAnimationStartTime", - "msAnimationTimingFunction", - "msBackfaceVisibility", - "msBlockProgression", - "msCSSOMElementFloatMetrics", - "msCaching", - "msCachingEnabled", - "msCancelRequestAnimationFrame", - "msCapsLockWarningOff", - "msClearImmediate", - "msClose", - "msContentZoomChaining", - "msContentZoomFactor", - "msContentZoomLimit", - "msContentZoomLimitMax", - "msContentZoomLimitMin", - "msContentZoomSnap", - "msContentZoomSnapPoints", - "msContentZoomSnapType", - "msContentZooming", - "msConvertURL", - "msCrypto", - "msDoNotTrack", - "msElementsFromPoint", - "msElementsFromRect", - "msExitFullscreen", - "msExtendedCode", - "msFillRule", - "msFirstPaint", - "msFlex", - "msFlexAlign", - "msFlexDirection", - "msFlexFlow", - "msFlexItemAlign", - "msFlexLinePack", - "msFlexNegative", - "msFlexOrder", - "msFlexPack", - "msFlexPositive", - "msFlexPreferredSize", - "msFlexWrap", - "msFlowFrom", - "msFlowInto", - "msFontFeatureSettings", - "msFullscreenElement", - "msFullscreenEnabled", - "msGetInputContext", - "msGetRegionContent", - "msGetUntransformedBounds", - "msGraphicsTrustStatus", - "msGridColumn", - "msGridColumnAlign", - "msGridColumnSpan", - "msGridColumns", - "msGridRow", - "msGridRowAlign", - "msGridRowSpan", - "msGridRows", - "msHidden", - "msHighContrastAdjust", - "msHyphenateLimitChars", - "msHyphenateLimitLines", - "msHyphenateLimitZone", - "msHyphens", - "msImageSmoothingEnabled", - "msImeAlign", - "msIndexedDB", - "msInterpolationMode", - "msIsStaticHTML", - "msKeySystem", - "msKeys", - "msLaunchUri", - "msLockOrientation", - "msManipulationViewsEnabled", - "msMatchMedia", - "msMatchesSelector", - "msMaxTouchPoints", - "msOrientation", - "msOverflowStyle", - "msPerspective", - "msPerspectiveOrigin", - "msPlayToDisabled", - "msPlayToPreferredSourceUri", - "msPlayToPrimary", - "msPointerEnabled", - "msRegionOverflow", - "msReleasePointerCapture", - "msRequestAnimationFrame", - "msRequestFullscreen", - "msSaveBlob", - "msSaveOrOpenBlob", - "msScrollChaining", - "msScrollLimit", - "msScrollLimitXMax", - "msScrollLimitXMin", - "msScrollLimitYMax", - "msScrollLimitYMin", - "msScrollRails", - "msScrollSnapPointsX", - "msScrollSnapPointsY", - "msScrollSnapType", - "msScrollSnapX", - "msScrollSnapY", - "msScrollTranslation", - "msSetImmediate", - "msSetMediaKeys", - "msSetPointerCapture", - "msTextCombineHorizontal", - "msTextSizeAdjust", - "msToBlob", - "msTouchAction", - "msTouchSelect", - "msTraceAsyncCallbackCompleted", - "msTraceAsyncCallbackStarting", - "msTraceAsyncOperationCompleted", - "msTraceAsyncOperationStarting", - "msTransform", - "msTransformOrigin", - "msTransformStyle", - "msTransition", - "msTransitionDelay", - "msTransitionDuration", - "msTransitionProperty", - "msTransitionTimingFunction", - "msUnlockOrientation", - "msUpdateAsyncCallbackRelation", - "msUserSelect", - "msVisibilityState", - "msWrapFlow", - "msWrapMargin", - "msWrapThrough", - "msWriteProfilerMark", - "msZoom", - "msZoomTo", - "mt", - "multiEntry", - "multiSelectionObj", - "multiline", - "multiple", - "multiply", - "multiplySelf", - "mutableFile", - "muted", - "n", - "name", - "nameProp", - "namedItem", - "namedRecordset", - "names", - "namespaceURI", - "namespaces", - "naturalHeight", - "naturalWidth", - "navigate", - "navigation", - "navigationMode", - "navigationStart", - "navigator", - "near", - "nearestViewportElement", - "negative", - "netscape", - "networkState", - "newScale", - "newTranslate", - "newURL", - "newValue", - "newValueSpecifiedUnits", - "newVersion", - "newhome", - "next", - "nextElementSibling", - "nextNode", - "nextPage", - "nextSibling", - "nickname", - "noHref", - "noModule", - "noResize", - "noShade", - "noValidate", - "noWrap", - "nodeName", - "nodeType", - "nodeValue", - "nonce", - "normalize", - "normalizedPathSegList", - "notationName", - "notations", - "note", - "noteGrainOn", - "noteOff", - "noteOn", - "notify", - "now", - "numOctaves", - "number", - "numberOfChannels", - "numberOfInputs", - "numberOfItems", - "numberOfOutputs", - "numberValue", - "oMatchesSelector", - "object", - "object-fit", - "object-position", - "objectFit", - "objectPosition", - "objectStore", - "objectStoreNames", - "observe", - "observedAttributes", - "of", - "offscreenBuffering", - "offset", - "offsetDistance", - "offsetHeight", - "offsetLeft", - "offsetNode", - "offsetParent", - "offsetPath", - "offsetRotate", - "offsetTop", - "offsetWidth", - "offsetX", - "offsetY", - "ok", - "oldURL", - "oldValue", - "oldVersion", - "olderShadowRoot", - "onLine", - "onabort", - "onabsolutedeviceorientation", - "onactivate", - "onactive", - "onaddsourcebuffer", - "onaddstream", - "onaddtrack", - "onafterprint", - "onafterscriptexecute", - "onafterupdate", - "onanimationcancel", - "onanimationend", - "onanimationiteration", - "onanimationstart", - "onappinstalled", - "onaudioend", - "onaudioprocess", - "onaudiostart", - "onautocomplete", - "onautocompleteerror", - "onauxclick", - "onbeforeactivate", - "onbeforecopy", - "onbeforecut", - "onbeforedeactivate", - "onbeforeeditfocus", - "onbeforeinstallprompt", - "onbeforepaste", - "onbeforeprint", - "onbeforescriptexecute", - "onbeforeunload", - "onbeforeupdate", - "onblocked", - "onblur", - "onbounce", - "onboundary", - "oncached", - "oncancel", - "oncandidatewindowhide", - "oncandidatewindowshow", - "oncandidatewindowupdate", - "oncanplay", - "oncanplaythrough", - "once", - "oncellchange", - "onchange", - "onchargingchange", - "onchargingtimechange", - "onchecking", - "onclick", - "onclose", - "oncompassneedscalibration", - "oncomplete", - "onconnect", - "onconnecting", - "onconnectionstatechange", - "oncontextmenu", - "oncontrollerchange", - "oncontrolselect", - "oncopy", - "oncuechange", - "oncut", - "ondataavailable", - "ondatachannel", - "ondatasetchanged", - "ondatasetcomplete", - "ondblclick", - "ondeactivate", - "ondevicechange", - "ondevicelight", - "ondevicemotion", - "ondeviceorientation", - "ondeviceorientationabsolute", - "ondeviceproximity", - "ondischargingtimechange", - "ondisconnect", - "ondisplay", - "ondownloading", - "ondrag", - "ondragend", - "ondragenter", - "ondragexit", - "ondragleave", - "ondragover", - "ondragstart", - "ondrop", - "ondurationchange", - "onemptied", - "onencrypted", - "onend", - "onended", - "onenter", - "onenterpictureinpicture", - "onerror", - "onerrorupdate", - "onexit", - "onfilterchange", - "onfinish", - "onfocus", - "onfocusin", - "onfocusout", - "onfreeze", - "onfullscreenchange", - "onfullscreenerror", - "ongesturechange", - "ongestureend", - "ongesturestart", - "ongotpointercapture", - "onhashchange", - "onhelp", - "onicecandidate", - "oniceconnectionstatechange", - "onicegatheringstatechange", - "oninactive", - "oninput", - "oninvalid", - "onkeydown", - "onkeypress", - "onkeyup", - "onlanguagechange", - "onlayoutcomplete", - "onleavepictureinpicture", - "onlevelchange", - "onload", - "onloadeddata", - "onloadedmetadata", - "onloadend", - "onloading", - "onloadingdone", - "onloadingerror", - "onloadstart", - "onlosecapture", - "onlostpointercapture", - "only", - "onmark", - "onmessage", - "onmessageerror", - "onmousedown", - "onmouseenter", - "onmouseleave", - "onmousemove", - "onmouseout", - "onmouseover", - "onmouseup", - "onmousewheel", - "onmove", - "onmoveend", - "onmovestart", - "onmozfullscreenchange", - "onmozfullscreenerror", - "onmozorientationchange", - "onmozpointerlockchange", - "onmozpointerlockerror", - "onmscontentzoom", - "onmsfullscreenchange", - "onmsfullscreenerror", - "onmsgesturechange", - "onmsgesturedoubletap", - "onmsgestureend", - "onmsgesturehold", - "onmsgesturestart", - "onmsgesturetap", - "onmsgotpointercapture", - "onmsinertiastart", - "onmslostpointercapture", - "onmsmanipulationstatechanged", - "onmsneedkey", - "onmsorientationchange", - "onmspointercancel", - "onmspointerdown", - "onmspointerenter", - "onmspointerhover", - "onmspointerleave", - "onmspointermove", - "onmspointerout", - "onmspointerover", - "onmspointerup", - "onmssitemodejumplistitemremoved", - "onmsthumbnailclick", - "onnegotiationneeded", - "onnomatch", - "onnoupdate", - "onobsolete", - "onoffline", - "ononline", - "onopen", - "onorientationchange", - "onpagechange", - "onpagehide", - "onpageshow", - "onpaste", - "onpause", - "onplay", - "onplaying", - "onpluginstreamstart", - "onpointercancel", - "onpointerdown", - "onpointerenter", - "onpointerleave", - "onpointerlockchange", - "onpointerlockerror", - "onpointermove", - "onpointerout", - "onpointerover", - "onpointerup", - "onpopstate", - "onprogress", - "onpropertychange", - "onratechange", - "onreading", - "onreadystatechange", - "onrejectionhandled", - "onremovesourcebuffer", - "onremovestream", - "onremovetrack", - "onreset", - "onresize", - "onresizeend", - "onresizestart", - "onresourcetimingbufferfull", - "onresult", - "onresume", - "onrowenter", - "onrowexit", - "onrowsdelete", - "onrowsinserted", - "onscroll", - "onsearch", - "onseeked", - "onseeking", - "onselect", - "onselectionchange", - "onselectstart", - "onshow", - "onsignalingstatechange", - "onsoundend", - "onsoundstart", - "onsourceclose", - "onsourceclosed", - "onsourceended", - "onsourceopen", - "onspeechend", - "onspeechstart", - "onstalled", - "onstart", - "onstatechange", - "onstop", - "onstorage", - "onstoragecommit", - "onsubmit", - "onsuccess", - "onsuspend", - "ontextinput", - "ontimeout", - "ontimeupdate", - "ontoggle", - "ontouchcancel", - "ontouchend", - "ontouchmove", - "ontouchstart", - "ontrack", - "ontransitioncancel", - "ontransitionend", - "ontransitionrun", - "ontransitionstart", - "onunhandledrejection", - "onunload", - "onupdateready", - "onupgradeneeded", - "onuserproximity", - "onversionchange", - "onvisibilitychange", - "onvoiceschanged", - "onvolumechange", - "onvrdisplayactivate", - "onvrdisplayconnect", - "onvrdisplaydeactivate", - "onvrdisplaydisconnect", - "onvrdisplaypresentchange", - "onwaiting", - "onwaitingforkey", - "onwarning", - "onwebkitanimationend", - "onwebkitanimationiteration", - "onwebkitanimationstart", - "onwebkitcurrentplaybacktargetiswirelesschanged", - "onwebkitfullscreenchange", - "onwebkitfullscreenerror", - "onwebkitkeyadded", - "onwebkitkeyerror", - "onwebkitkeymessage", - "onwebkitneedkey", - "onwebkitorientationchange", - "onwebkitplaybacktargetavailabilitychanged", - "onwebkitpointerlockchange", - "onwebkitpointerlockerror", - "onwebkitresourcetimingbufferfull", - "onwebkittransitionend", - "onwheel", - "onzoom", - "opacity", - "open", - "openCursor", - "openDatabase", - "openKeyCursor", - "opener", - "opera", - "operationType", - "operator", - "opr", - "optimum", - "options", - "or", - "order", - "orderX", - "orderY", - "ordered", - "org", - "orient", - "orientAngle", - "orientType", - "orientation", - "orientationX", - "orientationY", - "orientationZ", - "origin", - "originalTarget", - "orphans", - "oscpu", - "outerHTML", - "outerHeight", - "outerText", - "outerWidth", - "outline", - "outline-color", - "outline-offset", - "outline-style", - "outline-width", - "outlineColor", - "outlineOffset", - "outlineStyle", - "outlineWidth", - "outputBuffer", - "overflow", - "overflow-anchor", - "overflow-wrap", - "overflow-x", - "overflow-y", - "overflowAnchor", - "overflowWrap", - "overflowX", - "overflowY", - "overrideMimeType", - "oversample", - "overscroll-behavior", - "overscroll-behavior-x", - "overscroll-behavior-y", - "overscrollBehavior", - "overscrollBehaviorX", - "overscrollBehaviorY", - "ownKeys", - "ownerDocument", - "ownerElement", - "ownerNode", - "ownerRule", - "ownerSVGElement", - "owningElement", - "p1", - "p2", - "p3", - "p4", - "pad", - "padEnd", - "padStart", - "padding", - "padding-block", - "padding-block-end", - "padding-block-start", - "padding-bottom", - "padding-inline", - "padding-inline-end", - "padding-inline-start", - "padding-left", - "padding-right", - "padding-top", - "paddingBlock", - "paddingBlockEnd", - "paddingBlockStart", - "paddingBottom", - "paddingInline", - "paddingInlineEnd", - "paddingInlineStart", - "paddingLeft", - "paddingRight", - "paddingTop", - "page", - "page-break-after", - "page-break-before", - "page-break-inside", - "pageBreakAfter", - "pageBreakBefore", - "pageBreakInside", - "pageCount", - "pageLeft", - "pageTop", - "pageX", - "pageXOffset", - "pageY", - "pageYOffset", - "pages", - "paint-order", - "paintOrder", - "paintRequests", - "paintType", - "palette", - "pan", - "panningModel", - "parent", - "parentElement", - "parentNode", - "parentRule", - "parentStyleSheet", - "parentTextEdit", - "parentWindow", - "parse", - "parseFloat", - "parseFromString", - "parseInt", - "part", - "participants", - "passive", - "password", - "pasteHTML", - "path", - "pathLength", - "pathSegList", - "pathSegType", - "pathSegTypeAsLetter", - "pathname", - "pattern", - "patternContentUnits", - "patternMismatch", - "patternTransform", - "patternUnits", - "pause", - "pauseAnimations", - "pauseOnExit", - "paused", - "peerIdentity", - "pending", - "pendingLocalDescription", - "pendingRemoteDescription", - "performance", - "permission", - "permissions", - "persist", - "persisted", - "personalbar", - "perspective", - "perspective-origin", - "perspectiveOrigin", - "phoneticFamilyName", - "phoneticGivenName", - "photo", - "pictureInPictureElement", - "pictureInPictureEnabled", - "ping", - "pipeThrough", - "pipeTo", - "pitch", - "pixelBottom", - "pixelDepth", - "pixelHeight", - "pixelLeft", - "pixelRight", - "pixelStorei", - "pixelTop", - "pixelUnitToMillimeterX", - "pixelUnitToMillimeterY", - "pixelWidth", - "place-content", - "place-items", - "place-self", - "placeContent", - "placeItems", - "placeSelf", - "placeholder", - "platform", - "play", - "playState", - "playbackRate", - "playbackState", - "playbackTime", - "played", - "plugins", - "pluginspage", - "pname", - "pointer-events", - "pointerBeforeReferenceNode", - "pointerEnabled", - "pointerEvents", - "pointerId", - "pointerLockElement", - "pointerType", - "points", - "pointsAtX", - "pointsAtY", - "pointsAtZ", - "polygonOffset", - "pop", - "populateMatrix", - "popupWindowFeatures", - "popupWindowName", - "popupWindowURI", - "port", - "port1", - "port2", - "ports", - "posBottom", - "posHeight", - "posLeft", - "posRight", - "posTop", - "posWidth", - "pose", - "position", - "positionAlign", - "positionX", - "positionY", - "positionZ", - "postError", - "postMessage", - "poster", - "pow", - "powerOff", - "preMultiplySelf", - "precision", - "preferredStyleSheetSet", - "preferredStylesheetSet", - "prefix", - "preload", - "prepend", - "presentation", - "preserveAlpha", - "preserveAspectRatio", - "preserveAspectRatioString", - "pressed", - "pressure", - "prevValue", - "preventDefault", - "preventExtensions", - "preventSilentAccess", - "previousElementSibling", - "previousNode", - "previousPage", - "previousScale", - "previousSibling", - "previousTranslate", - "primaryKey", - "primitiveType", - "primitiveUnits", - "principals", - "print", - "privateKey", - "probablySupportsContext", - "process", - "processIceMessage", - "product", - "productSub", - "profile", - "profileEnd", - "profiles", - "prompt", - "properties", - "propertyIsEnumerable", - "propertyName", - "protocol", - "protocolLong", - "prototype", - "pseudoClass", - "pseudoElement", - "publicId", - "publicKey", - "published", - "push", - "pushNotification", - "pushState", - "put", - "putImageData", - "quadraticCurveTo", - "qualifier", - "quaternion", - "query", - "queryCommandEnabled", - "queryCommandIndeterm", - "queryCommandState", - "queryCommandSupported", - "queryCommandText", - "queryCommandValue", - "querySelector", - "querySelectorAll", - "queryUsageAndQuota", - "queueMicrotask", - "quote", - "quotes", - "r", - "r1", - "r2", - "race", - "radiogroup", - "radiusX", - "radiusY", - "random", - "range", - "rangeCount", - "rangeMax", - "rangeMin", - "rangeOffset", - "rangeOverflow", - "rangeParent", - "rangeUnderflow", - "rate", - "ratio", - "raw", - "read", - "readAsArrayBuffer", - "readAsBinaryString", - "readAsBlob", - "readAsDataURL", - "readAsText", - "readOnly", - "readPixels", - "readReportRequested", - "readText", - "readable", - "ready", - "readyState", - "reason", - "reboot", - "receiver", - "receivers", - "recordNumber", - "recordset", - "rect", - "red", - "redirectCount", - "redirectEnd", - "redirectStart", - "redirected", - "reduce", - "reduceRight", - "reduction", - "refDistance", - "refX", - "refY", - "referenceNode", - "referrer", - "referrerPolicy", - "refresh", - "region", - "regionAnchorX", - "regionAnchorY", - "regionId", - "regions", - "register", - "registerContentHandler", - "registerElement", - "registerProtocolHandler", - "reject", - "rel", - "relList", - "relatedNode", - "relatedTarget", - "release", - "releaseCapture", - "releaseEvents", - "releasePointerCapture", - "releaseShaderCompiler", - "reliable", - "reload", - "remainingSpace", - "remote", - "remoteDescription", - "remove", - "removeAllRanges", - "removeAttribute", - "removeAttributeNS", - "removeAttributeNode", - "removeBehavior", - "removeChild", - "removeCue", - "removeEventListener", - "removeFilter", - "removeImport", - "removeItem", - "removeListener", - "removeNamedItem", - "removeNamedItemNS", - "removeNode", - "removeParameter", - "removeProperty", - "removeRange", - "removeRegion", - "removeRule", - "removeSiteSpecificTrackingException", - "removeSourceBuffer", - "removeStream", - "removeTrack", - "removeVariable", - "removeWakeLockListener", - "removeWebWideTrackingException", - "removedNodes", - "renderbufferStorage", - "renderedBuffer", - "renderingMode", - "repeat", - "replace", - "replaceAdjacentText", - "replaceChild", - "replaceData", - "replaceId", - "replaceItem", - "replaceNode", - "replaceState", - "replaceSync", - "replaceTrack", - "replaceWholeText", - "replaceWith", - "reportValidity", - "request", - "requestAnimationFrame", - "requestAutocomplete", - "requestData", - "requestDevice", - "requestFullscreen", - "requestIdleCallback", - "requestMIDIAccess", - "requestMediaKeySystemAccess", - "requestPermission", - "requestPictureInPicture", - "requestPointerLock", - "requestQuota", - "requestStart", - "requestStorageAccess", - "requestingWindow", - "required", - "requiredExtensions", - "requiredFeatures", - "reset", - "resetTransform", - "resize", - "resizeBy", - "resizeTo", - "resolve", - "resolvedOptions", - "response", - "responseBody", - "responseEnd", - "responseStart", - "responseText", - "responseType", - "responseURL", - "responseXML", - "restore", - "result", - "resultType", - "resume", - "returnValue", - "rev", - "reverse", - "reversed", - "revocable", - "revokeObjectURL", - "rgbColor", - "right", - "rightContext", - "rightMargin", - "rightProjectionMatrix", - "rightViewMatrix", - "rolloffFactor", - "root", - "rootElement", - "rotate", - "rotateAxisAngle", - "rotateAxisAngleSelf", - "rotateFromVector", - "rotateFromVectorSelf", - "rotateSelf", - "rotation", - "rotationRate", - "round", - "row-gap", - "rowGap", - "rowIndex", - "rowSpan", - "rows", - "rtt", - "ruby-align", - "ruby-position", - "rubyAlign", - "rubyOverhang", - "rubyPosition", - "rules", - "runningState", - "runtime", - "runtimeStyle", - "rx", - "ry", - "safari", - "sampleCoverage", - "sampleRate", - "sandbox", - "save", - "saveData", - "scale", - "scale3d", - "scale3dSelf", - "scaleNonUniform", - "scaleNonUniformSelf", - "scaleSelf", - "scheme", - "scissor", - "scope", - "scopeName", - "scoped", - "screen", - "screenBrightness", - "screenEnabled", - "screenLeft", - "screenPixelToMillimeterX", - "screenPixelToMillimeterY", - "screenTop", - "screenX", - "screenY", - "scripts", - "scroll", - "scroll-behavior", - "scroll-snap-coordinate", - "scroll-snap-destination", - "scroll-snap-points-x", - "scroll-snap-points-y", - "scroll-snap-type", - "scroll-snap-type-x", - "scroll-snap-type-y", - "scrollAmount", - "scrollBehavior", - "scrollBy", - "scrollByLines", - "scrollByPages", - "scrollDelay", - "scrollHeight", - "scrollIntoView", - "scrollIntoViewIfNeeded", - "scrollLeft", - "scrollLeftMax", - "scrollMargin", - "scrollMarginBlock", - "scrollMarginBlockEnd", - "scrollMarginBlockStart", - "scrollMarginBottom", - "scrollMarginInline", - "scrollMarginInlineEnd", - "scrollMarginInlineStart", - "scrollMarginLeft", - "scrollMarginRight", - "scrollMarginTop", - "scrollMaxX", - "scrollMaxY", - "scrollPadding", - "scrollPaddingBlock", - "scrollPaddingBlockEnd", - "scrollPaddingBlockStart", - "scrollPaddingBottom", - "scrollPaddingInline", - "scrollPaddingInlineEnd", - "scrollPaddingInlineStart", - "scrollPaddingLeft", - "scrollPaddingRight", - "scrollPaddingTop", - "scrollRestoration", - "scrollSnapAlign", - "scrollSnapCoordinate", - "scrollSnapDestination", - "scrollSnapPointsX", - "scrollSnapPointsY", - "scrollSnapStop", - "scrollSnapType", - "scrollSnapTypeX", - "scrollSnapTypeY", - "scrollTo", - "scrollTop", - "scrollTopMax", - "scrollWidth", - "scrollX", - "scrollY", - "scrollbar-color", - "scrollbar-width", - "scrollbar3dLightColor", - "scrollbarArrowColor", - "scrollbarBaseColor", - "scrollbarColor", - "scrollbarDarkShadowColor", - "scrollbarFaceColor", - "scrollbarHighlightColor", - "scrollbarShadowColor", - "scrollbarTrackColor", - "scrollbarWidth", - "scrollbars", - "scrolling", - "scrollingElement", - "sdp", - "sdpMLineIndex", - "sdpMid", - "seal", - "search", - "searchBox", - "searchBoxJavaBridge_", - "searchParams", - "sectionRowIndex", - "secureConnectionStart", - "security", - "seed", - "seekToNextFrame", - "seekable", - "seeking", - "select", - "selectAllChildren", - "selectNode", - "selectNodeContents", - "selectNodes", - "selectSingleNode", - "selectSubString", - "selected", - "selectedIndex", - "selectedOptions", - "selectedStyleSheetSet", - "selectedStylesheetSet", - "selection", - "selectionDirection", - "selectionEnd", - "selectionStart", - "selector", - "selectorText", - "self", - "send", - "sendAsBinary", - "sendBeacon", - "sender", - "sentTimestamp", - "separator", - "serializeToString", - "serviceWorker", - "sessionId", - "sessionStorage", - "set", - "setActionHandler", - "setActive", - "setAlpha", - "setAttribute", - "setAttributeNS", - "setAttributeNode", - "setAttributeNodeNS", - "setBaseAndExtent", - "setBingCurrentSearchDefault", - "setCapture", - "setColor", - "setCompositeOperation", - "setConfiguration", - "setCurrentTime", - "setCustomValidity", - "setData", - "setDate", - "setDragImage", - "setEnd", - "setEndAfter", - "setEndBefore", - "setEndPoint", - "setFillColor", - "setFilterRes", - "setFloat32", - "setFloat64", - "setFloatValue", - "setFullYear", - "setHours", - "setIdentityProvider", - "setImmediate", - "setInt16", - "setInt32", - "setInt8", - "setInterval", - "setItem", - "setLineCap", - "setLineDash", - "setLineJoin", - "setLineWidth", - "setLiveSeekableRange", - "setLocalDescription", - "setMatrix", - "setMatrixValue", - "setMediaKeys", - "setMilliseconds", - "setMinutes", - "setMiterLimit", - "setMonth", - "setNamedItem", - "setNamedItemNS", - "setNonUserCodeExceptions", - "setOrientToAngle", - "setOrientToAuto", - "setOrientation", - "setOverrideHistoryNavigationMode", - "setPaint", - "setParameter", - "setPeriodicWave", - "setPointerCapture", - "setPosition", - "setPreference", - "setProperty", - "setPrototypeOf", - "setRGBColor", - "setRGBColorICCColor", - "setRadius", - "setRangeText", - "setRemoteDescription", - "setRequestHeader", - "setResizable", - "setResourceTimingBufferSize", - "setRotate", - "setScale", - "setSeconds", - "setSelectionRange", - "setServerCertificate", - "setShadow", - "setSinkId", - "setSkewX", - "setSkewY", - "setStart", - "setStartAfter", - "setStartBefore", - "setStdDeviation", - "setStringValue", - "setStrokeColor", - "setSuggestResult", - "setTargetAtTime", - "setTargetValueAtTime", - "setTime", - "setTimeout", - "setTransform", - "setTranslate", - "setUTCDate", - "setUTCFullYear", - "setUTCHours", - "setUTCMilliseconds", - "setUTCMinutes", - "setUTCMonth", - "setUTCSeconds", - "setUint16", - "setUint32", - "setUint8", - "setUri", - "setValueAtTime", - "setValueCurveAtTime", - "setVariable", - "setVelocity", - "setVersion", - "setYear", - "settingName", - "settingValue", - "sex", - "shaderSource", - "shadowBlur", - "shadowColor", - "shadowOffsetX", - "shadowOffsetY", - "shadowRoot", - "shape", - "shape-image-threshold", - "shape-margin", - "shape-outside", - "shape-rendering", - "shapeImageThreshold", - "shapeMargin", - "shapeOutside", - "shapeRendering", - "sheet", - "shift", - "shiftKey", - "shiftLeft", - "show", - "showHelp", - "showModal", - "showModalDialog", - "showModelessDialog", - "showNotification", - "sidebar", - "sign", - "signal", - "signalingState", - "sin", - "singleNodeValue", - "sinh", - "sinkId", - "size", - "sizeToContent", - "sizes", - "skewX", - "skewXSelf", - "skewY", - "skewYSelf", - "slice", - "slope", - "slot", - "small", - "smil", - "smoothingTimeConstant", - "snapToLines", - "snapshotItem", - "snapshotLength", - "some", - "sort", - "source", - "sourceBuffer", - "sourceBuffers", - "sourceCapabilities", - "sourceIndex", - "spacing", - "span", - "speak", - "speakAs", - "speaking", - "specified", - "specularConstant", - "specularExponent", - "speechSynthesis", - "speed", - "speedOfSound", - "spellcheck", - "splice", - "split", - "splitText", - "spreadMethod", - "sqrt", - "src", - "srcElement", - "srcFilter", - "srcObject", - "srcUrn", - "srcdoc", - "srclang", - "srcset", - "stack", - "stackTraceLimit", - "stacktrace", - "standalone", - "standby", - "start", - "startContainer", - "startIce", - "startMessages", - "startOffset", - "startRendering", - "startSoftwareUpdate", - "startTime", - "startsWith", - "state", - "status", - "statusMessage", - "statusText", - "statusbar", - "stdDeviationX", - "stdDeviationY", - "stencilFunc", - "stencilFuncSeparate", - "stencilMask", - "stencilMaskSeparate", - "stencilOp", - "stencilOpSeparate", - "step", - "stepDown", - "stepMismatch", - "stepUp", - "sticky", - "stitchTiles", - "stop", - "stop-color", - "stop-opacity", - "stopColor", - "stopImmediatePropagation", - "stopOpacity", - "stopPropagation", - "storage", - "storageArea", - "storageName", - "storageStatus", - "store", - "storeSiteSpecificTrackingException", - "storeWebWideTrackingException", - "stpVersion", - "stream", - "strike", - "stringValue", - "stringify", - "stroke", - "stroke-dasharray", - "stroke-dashoffset", - "stroke-linecap", - "stroke-linejoin", - "stroke-miterlimit", - "stroke-opacity", - "stroke-width", - "strokeDasharray", - "strokeDashoffset", - "strokeLinecap", - "strokeLinejoin", - "strokeMiterlimit", - "strokeOpacity", - "strokeRect", - "strokeStyle", - "strokeText", - "strokeWidth", - "style", - "styleFloat", - "styleMedia", - "styleSheet", - "styleSheetSets", - "styleSheets", - "sub", - "subarray", - "subject", - "submit", - "subscribe", - "substr", - "substring", - "substringData", - "subtle", - "subtree", - "suffix", - "suffixes", - "summary", - "sup", - "supports", - "surfaceScale", - "surroundContents", - "suspend", - "suspendRedraw", - "swapCache", - "swapNode", - "sweepFlag", - "symbols", - "system", - "systemCode", - "systemId", - "systemLanguage", - "systemXDPI", - "systemYDPI", - "tBodies", - "tFoot", - "tHead", - "tabIndex", - "tabSize", - "table", - "table-layout", - "tableLayout", - "tableValues", - "tag", - "tagName", - "tagUrn", - "tags", - "taintEnabled", - "takeRecords", - "tan", - "tanh", - "target", - "targetElement", - "targetTouches", - "targetX", - "targetY", - "tee", - "tel", - "terminate", - "test", - "texImage2D", - "texParameterf", - "texParameteri", - "texSubImage2D", - "text", - "text-align", - "text-align-last", - "text-anchor", - "text-combine-upright", - "text-decoration", - "text-decoration-color", - "text-decoration-line", - "text-decoration-style", - "text-emphasis", - "text-emphasis-color", - "text-emphasis-position", - "text-emphasis-style", - "text-indent", - "text-justify", - "text-orientation", - "text-overflow", - "text-rendering", - "text-shadow", - "text-transform", - "textAlign", - "textAlignLast", - "textAnchor", - "textAutospace", - "textBaseline", - "textCombineUpright", - "textContent", - "textDecoration", - "textDecorationBlink", - "textDecorationColor", - "textDecorationLine", - "textDecorationLineThrough", - "textDecorationNone", - "textDecorationOverline", - "textDecorationSkipInk", - "textDecorationStyle", - "textDecorationUnderline", - "textEmphasis", - "textEmphasisColor", - "textEmphasisPosition", - "textEmphasisStyle", - "textIndent", - "textJustify", - "textJustifyTrim", - "textKashida", - "textKashidaSpace", - "textLength", - "textOrientation", - "textOverflow", - "textRendering", - "textShadow", - "textSizeAdjust", - "textTracks", - "textTransform", - "textUnderlinePosition", - "then", - "threadId", - "threshold", - "tiltX", - "tiltY", - "time", - "timeEnd", - "timeLog", - "timeOrigin", - "timeStamp", - "timeout", - "timestamp", - "timestampOffset", - "timing", - "title", - "toArray", - "toBlob", - "toDataURL", - "toDateString", - "toElement", - "toExponential", - "toFixed", - "toFloat32Array", - "toFloat64Array", - "toGMTString", - "toISOString", - "toJSON", - "toLocaleDateString", - "toLocaleFormat", - "toLocaleLowerCase", - "toLocaleString", - "toLocaleTimeString", - "toLocaleUpperCase", - "toLowerCase", - "toMethod", - "toPrecision", - "toSdp", - "toSource", - "toStaticHTML", - "toString", - "toStringTag", - "toTimeString", - "toUTCString", - "toUpperCase", - "toggle", - "toggleAttribute", - "toggleLongPressEnabled", - "tooLong", - "tooShort", - "toolbar", - "top", - "topMargin", - "total", - "totalFrameDelay", - "totalJSHeapSize", - "totalVideoFrames", - "touch-action", - "touchAction", - "touches", - "trace", - "track", - "transaction", - "transactions", - "transferControlToOffscreen", - "transform", - "transform-box", - "transform-origin", - "transform-style", - "transformBox", - "transformOrigin", - "transformPoint", - "transformString", - "transformStyle", - "transformToDocument", - "transformToFragment", - "transition", - "transition-delay", - "transition-duration", - "transition-property", - "transition-timing-function", - "transitionDelay", - "transitionDuration", - "transitionProperty", - "transitionTimingFunction", - "translate", - "translateSelf", - "translationX", - "translationY", - "trim", - "trimEnd", - "trimLeft", - "trimRight", - "trimStart", - "trueSpeed", - "trunc", - "truncate", - "type", - "typeDetail", - "typeMismatch", - "typeMustMatch", - "types", - "ubound", - "undefined", - "unescape", - "uneval", - "unicode", - "unicode-bidi", - "unicodeBidi", - "unicodeRange", - "uniform1f", - "uniform1fv", - "uniform1i", - "uniform1iv", - "uniform2f", - "uniform2fv", - "uniform2i", - "uniform2iv", - "uniform3f", - "uniform3fv", - "uniform3i", - "uniform3iv", - "uniform4f", - "uniform4fv", - "uniform4i", - "uniform4iv", - "uniformMatrix2fv", - "uniformMatrix3fv", - "uniformMatrix4fv", - "unique", - "uniqueID", - "uniqueNumber", - "unitType", - "units", - "unloadEventEnd", - "unloadEventStart", - "unlock", - "unmount", - "unobserve", - "unpause", - "unpauseAnimations", - "unreadCount", - "unregister", - "unregisterContentHandler", - "unregisterProtocolHandler", - "unscopables", - "unselectable", - "unshift", - "unsubscribe", - "unsuspendRedraw", - "unsuspendRedrawAll", - "unwatch", - "unwrapKey", - "upX", - "upY", - "upZ", - "update", - "updateCommands", - "updateEnabled", - "updateIce", - "updateInterval", - "updatePlaybackRate", - "updateSettings", - "updated", - "updating", - "upgrade", - "upload", - "upper", - "upperBound", - "upperOpen", - "uri", - "url", - "urn", - "urns", - "usages", - "usb", - "useCurrentView", - "useMap", - "useProgram", - "usedJSHeapSize", - "usedSpace", - "userActivation", - "userAgent", - "userLanguage", - "userSelect", - "userZoom", - "username", - "v8BreakIterator", - "vAlign", - "vLink", - "valid", - "validate", - "validateProgram", - "validationMessage", - "validity", - "value", - "valueAsDate", - "valueAsNumber", - "valueAsString", - "valueInSpecifiedUnits", - "valueMissing", - "valueOf", - "valueText", - "valueType", - "values", - "vector-effect", - "vectorEffect", - "velocityAngular", - "velocityExpansion", - "velocityX", - "velocityY", - "vendor", - "vendorSub", - "verify", - "version", - "vertexAttrib1f", - "vertexAttrib1fv", - "vertexAttrib2f", - "vertexAttrib2fv", - "vertexAttrib3f", - "vertexAttrib3fv", - "vertexAttrib4f", - "vertexAttrib4fv", - "vertexAttribDivisorANGLE", - "vertexAttribPointer", - "vertical", - "vertical-align", - "verticalAlign", - "verticalOverflow", - "vibrate", - "videoHeight", - "videoTracks", - "videoWidth", - "view", - "viewBox", - "viewBoxString", - "viewTarget", - "viewTargetString", - "viewport", - "viewportAnchorX", - "viewportAnchorY", - "viewportElement", - "visibility", - "visibilityState", - "visible", - "visualViewport", - "vlinkColor", - "voice", - "volume", - "vrml", - "vspace", - "w", - "wait", - "wake", - "wand", - "warn", - "wasClean", - "wasDiscarded", - "watch", - "watchAvailability", - "watchPosition", - "webdriver", - "webkitAddKey", - "webkitAlignContent", - "webkitAlignItems", - "webkitAlignSelf", - "webkitAnimation", - "webkitAnimationDelay", - "webkitAnimationDirection", - "webkitAnimationDuration", - "webkitAnimationFillMode", - "webkitAnimationIterationCount", - "webkitAnimationName", - "webkitAnimationPlayState", - "webkitAnimationTimingFunction", - "webkitAppRegion", - "webkitAppearance", - "webkitAudioContext", - "webkitAudioDecodedByteCount", - "webkitAudioPannerNode", - "webkitBackfaceVisibility", - "webkitBackground", - "webkitBackgroundAttachment", - "webkitBackgroundClip", - "webkitBackgroundColor", - "webkitBackgroundImage", - "webkitBackgroundOrigin", - "webkitBackgroundPosition", - "webkitBackgroundPositionX", - "webkitBackgroundPositionY", - "webkitBackgroundRepeat", - "webkitBackgroundSize", - "webkitBackingStorePixelRatio", - "webkitBorderAfter", - "webkitBorderAfterColor", - "webkitBorderAfterStyle", - "webkitBorderAfterWidth", - "webkitBorderBefore", - "webkitBorderBeforeColor", - "webkitBorderBeforeStyle", - "webkitBorderBeforeWidth", - "webkitBorderBottomLeftRadius", - "webkitBorderBottomRightRadius", - "webkitBorderEnd", - "webkitBorderEndColor", - "webkitBorderEndStyle", - "webkitBorderEndWidth", - "webkitBorderHorizontalSpacing", - "webkitBorderImage", - "webkitBorderImageOutset", - "webkitBorderImageRepeat", - "webkitBorderImageSlice", - "webkitBorderImageSource", - "webkitBorderImageWidth", - "webkitBorderRadius", - "webkitBorderStart", - "webkitBorderStartColor", - "webkitBorderStartStyle", - "webkitBorderStartWidth", - "webkitBorderTopLeftRadius", - "webkitBorderTopRightRadius", - "webkitBorderVerticalSpacing", - "webkitBoxAlign", - "webkitBoxDecorationBreak", - "webkitBoxDirection", - "webkitBoxFlex", - "webkitBoxOrdinalGroup", - "webkitBoxOrient", - "webkitBoxPack", - "webkitBoxReflect", - "webkitBoxShadow", - "webkitBoxSizing", - "webkitCancelAnimationFrame", - "webkitCancelFullScreen", - "webkitCancelKeyRequest", - "webkitCancelRequestAnimationFrame", - "webkitClearResourceTimings", - "webkitClipPath", - "webkitClosedCaptionsVisible", - "webkitColumnBreakAfter", - "webkitColumnBreakBefore", - "webkitColumnBreakInside", - "webkitColumnCount", - "webkitColumnGap", - "webkitColumnRule", - "webkitColumnRuleColor", - "webkitColumnRuleStyle", - "webkitColumnRuleWidth", - "webkitColumnSpan", - "webkitColumnWidth", - "webkitColumns", - "webkitConvertPointFromNodeToPage", - "webkitConvertPointFromPageToNode", - "webkitCreateShadowRoot", - "webkitCurrentFullScreenElement", - "webkitCurrentPlaybackTargetIsWireless", - "webkitDecodedFrameCount", - "webkitDirectionInvertedFromDevice", - "webkitDisplayingFullscreen", - "webkitDroppedFrameCount", - "webkitEnterFullScreen", - "webkitEnterFullscreen", - "webkitEntries", - "webkitExitFullScreen", - "webkitExitFullscreen", - "webkitExitPointerLock", - "webkitFilter", - "webkitFlex", - "webkitFlexBasis", - "webkitFlexDirection", - "webkitFlexFlow", - "webkitFlexGrow", - "webkitFlexShrink", - "webkitFlexWrap", - "webkitFontFeatureSettings", - "webkitFontSizeDelta", - "webkitFontSmoothing", - "webkitFullScreenKeyboardInputAllowed", - "webkitFullscreenElement", - "webkitFullscreenEnabled", - "webkitGenerateKeyRequest", - "webkitGetAsEntry", - "webkitGetDatabaseNames", - "webkitGetEntries", - "webkitGetEntriesByName", - "webkitGetEntriesByType", - "webkitGetFlowByName", - "webkitGetGamepads", - "webkitGetImageDataHD", - "webkitGetNamedFlows", - "webkitGetRegionFlowRanges", - "webkitGetUserMedia", - "webkitHasClosedCaptions", - "webkitHidden", - "webkitHighlight", - "webkitHyphenateCharacter", - "webkitIDBCursor", - "webkitIDBDatabase", - "webkitIDBDatabaseError", - "webkitIDBDatabaseException", - "webkitIDBFactory", - "webkitIDBIndex", - "webkitIDBKeyRange", - "webkitIDBObjectStore", - "webkitIDBRequest", - "webkitIDBTransaction", - "webkitImageSmoothingEnabled", - "webkitIndexedDB", - "webkitInitMessageEvent", - "webkitIsFullScreen", - "webkitJustifyContent", - "webkitKeys", - "webkitLineBreak", - "webkitLineClamp", - "webkitLineDashOffset", - "webkitLocale", - "webkitLockOrientation", - "webkitLogicalHeight", - "webkitLogicalWidth", - "webkitMarginAfter", - "webkitMarginAfterCollapse", - "webkitMarginBefore", - "webkitMarginBeforeCollapse", - "webkitMarginBottomCollapse", - "webkitMarginCollapse", - "webkitMarginEnd", - "webkitMarginStart", - "webkitMarginTopCollapse", - "webkitMask", - "webkitMaskBoxImage", - "webkitMaskBoxImageOutset", - "webkitMaskBoxImageRepeat", - "webkitMaskBoxImageSlice", - "webkitMaskBoxImageSource", - "webkitMaskBoxImageWidth", - "webkitMaskClip", - "webkitMaskComposite", - "webkitMaskImage", - "webkitMaskOrigin", - "webkitMaskPosition", - "webkitMaskPositionX", - "webkitMaskPositionY", - "webkitMaskRepeat", - "webkitMaskRepeatX", - "webkitMaskRepeatY", - "webkitMaskSize", - "webkitMatchesSelector", - "webkitMaxLogicalHeight", - "webkitMaxLogicalWidth", - "webkitMediaStream", - "webkitMinLogicalHeight", - "webkitMinLogicalWidth", - "webkitNotifications", - "webkitOfflineAudioContext", - "webkitOpacity", - "webkitOrder", - "webkitOrientation", - "webkitPaddingAfter", - "webkitPaddingBefore", - "webkitPaddingEnd", - "webkitPaddingStart", - "webkitPeerConnection00", - "webkitPersistentStorage", - "webkitPerspective", - "webkitPerspectiveOrigin", - "webkitPerspectiveOriginX", - "webkitPerspectiveOriginY", - "webkitPointerLockElement", - "webkitPostMessage", - "webkitPreservesPitch", - "webkitPrintColorAdjust", - "webkitPutImageDataHD", - "webkitRTCPeerConnection", - "webkitRegionOverset", - "webkitRequestAnimationFrame", - "webkitRequestFileSystem", - "webkitRequestFullScreen", - "webkitRequestFullscreen", - "webkitRequestPointerLock", - "webkitResolveLocalFileSystemURL", - "webkitRtlOrdering", - "webkitRubyPosition", - "webkitSetMediaKeys", - "webkitSetResourceTimingBufferSize", - "webkitShadowRoot", - "webkitShapeImageThreshold", - "webkitShapeMargin", - "webkitShapeOutside", - "webkitShowPlaybackTargetPicker", - "webkitSlice", - "webkitSpeechGrammar", - "webkitSpeechGrammarList", - "webkitSpeechRecognition", - "webkitSpeechRecognitionError", - "webkitSpeechRecognitionEvent", - "webkitStorageInfo", - "webkitSupportsFullscreen", - "webkitTapHighlightColor", - "webkitTemporaryStorage", - "webkitTextCombine", - "webkitTextDecorationsInEffect", - "webkitTextEmphasis", - "webkitTextEmphasisColor", - "webkitTextEmphasisPosition", - "webkitTextEmphasisStyle", - "webkitTextFillColor", - "webkitTextOrientation", - "webkitTextSecurity", - "webkitTextSizeAdjust", - "webkitTextStroke", - "webkitTextStrokeColor", - "webkitTextStrokeWidth", - "webkitTransform", - "webkitTransformOrigin", - "webkitTransformOriginX", - "webkitTransformOriginY", - "webkitTransformOriginZ", - "webkitTransformStyle", - "webkitTransition", - "webkitTransitionDelay", - "webkitTransitionDuration", - "webkitTransitionProperty", - "webkitTransitionTimingFunction", - "webkitURL", - "webkitUnlockOrientation", - "webkitUserDrag", - "webkitUserModify", - "webkitUserSelect", - "webkitVideoDecodedByteCount", - "webkitVisibilityState", - "webkitWirelessVideoPlaybackDisabled", - "webkitWritingMode", - "webkitdirectory", - "webkitdropzone", - "webstore", - "weight", - "whatToShow", - "wheelDelta", - "wheelDeltaX", - "wheelDeltaY", - "whenDefined", - "which", - "white-space", - "whiteSpace", - "wholeText", - "widows", - "width", - "will-change", - "willChange", - "willValidate", - "window", - "withCredentials", - "word-break", - "word-spacing", - "word-wrap", - "wordBreak", - "wordSpacing", - "wordWrap", - "wrap", - "wrapKey", - "writable", - "write", - "writeText", - "writeln", - "writing-mode", - "writingMode", - "x", - "x1", - "x2", - "xChannelSelector", - "xmlEncoding", - "xmlStandalone", - "xmlVersion", - "xmlbase", - "xmllang", - "xmlspace", - "xor", - "y", - "y1", - "y2", - "yChannelSelector", - "yandex", - "z", - "z-index", - "zIndex", - "zoom", - "zoomAndPan", - "zoomRectScreen" -] diff --git a/node_modules/uglify-js/tools/exit.js b/node_modules/uglify-js/tools/exit.js deleted file mode 100644 index 17048d8ef..000000000 --- a/node_modules/uglify-js/tools/exit.js +++ /dev/null @@ -1,15 +0,0 @@ -// workaround for tty output truncation upon process.exit() -var exit = process.exit; -process.exit = function() { - var args = [].slice.call(arguments); - process.once("uncaughtException", function() { - (function callback() { - if (process.stdout.bufferSize || process.stderr.bufferSize) { - setImmediate(callback); - } else { - exit.apply(process, args); - } - })(); - }); - throw exit; -}; diff --git a/node_modules/uglify-js/tools/exports.js b/node_modules/uglify-js/tools/exports.js deleted file mode 100644 index c58f75141..000000000 --- a/node_modules/uglify-js/tools/exports.js +++ /dev/null @@ -1,6 +0,0 @@ -exports["Dictionary"] = Dictionary; -exports["minify"] = minify; -exports["parse"] = parse; -exports["push_uniq"] = push_uniq; -exports["TreeTransformer"] = TreeTransformer; -exports["TreeWalker"] = TreeWalker; diff --git a/node_modules/uglify-js/tools/node.js b/node_modules/uglify-js/tools/node.js deleted file mode 100644 index 58150e6b1..000000000 --- a/node_modules/uglify-js/tools/node.js +++ /dev/null @@ -1,78 +0,0 @@ -var fs = require("fs"); - -exports.FILES = [ - require.resolve("../lib/utils.js"), - require.resolve("../lib/ast.js"), - require.resolve("../lib/parse.js"), - require.resolve("../lib/transform.js"), - require.resolve("../lib/scope.js"), - require.resolve("../lib/output.js"), - require.resolve("../lib/compress.js"), - require.resolve("../lib/sourcemap.js"), - require.resolve("../lib/mozilla-ast.js"), - require.resolve("../lib/propmangle.js"), - require.resolve("../lib/minify.js"), - require.resolve("./exports.js"), -]; - -new Function("MOZ_SourceMap", "exports", function() { - var code = exports.FILES.map(function(file) { - return fs.readFileSync(file, "utf8"); - }); - code.push("exports.describe_ast = " + describe_ast.toString()); - return code.join("\n\n"); -}())(require("source-map"), exports); - -function describe_ast() { - var out = OutputStream({ beautify: true }); - function doitem(ctor) { - out.print("AST_" + ctor.TYPE); - var props = ctor.SELF_PROPS.filter(function(prop) { - return !/^\$/.test(prop); - }); - if (props.length > 0) { - out.space(); - out.with_parens(function() { - props.forEach(function(prop, i) { - if (i) out.space(); - out.print(prop); - }); - }); - } - if (ctor.documentation) { - out.space(); - out.print_string(ctor.documentation); - } - if (ctor.SUBCLASSES.length > 0) { - out.space(); - out.with_block(function() { - ctor.SUBCLASSES.sort(function(a, b) { - return a.TYPE < b.TYPE ? -1 : 1; - }).forEach(function(ctor, i) { - out.indent(); - doitem(ctor); - out.newline(); - }); - }); - } - }; - doitem(AST_Node); - return out + "\n"; -} - -function infer_options(options) { - var result = exports.minify("", options); - return result.error && result.error.defs; -} - -exports.default_options = function() { - var defs = {}; - Object.keys(infer_options({ 0: 0 })).forEach(function(component) { - var options = {}; - options[component] = { 0: 0 }; - if (options = infer_options(options)) { - defs[component] = options; - } - }); - return defs; -}; diff --git a/node_modules/uglify-js/tools/props.html b/node_modules/uglify-js/tools/props.html deleted file mode 100644 index ce2e7e6b5..000000000 --- a/node_modules/uglify-js/tools/props.html +++ /dev/null @@ -1,540 +0,0 @@ - - - - - - diff --git a/node_modules/uri-js/README.md b/node_modules/uri-js/README.md old mode 100644 new mode 100755 index 3f225e745..3dbe4054f --- a/node_modules/uri-js/README.md +++ b/node_modules/uri-js/README.md @@ -3,7 +3,7 @@ URI.js is an [RFC 3986](http://www.ietf.org/rfc/rfc3986.txt) compliant, scheme extendable URI parsing/validating/resolving library for all JavaScript environments (browsers, Node.js, etc). It is also compliant with the IRI ([RFC 3987](http://www.ietf.org/rfc/rfc3987.txt)), IDNA ([RFC 5890](http://www.ietf.org/rfc/rfc5890.txt)), IPv6 Address ([RFC 5952](http://www.ietf.org/rfc/rfc5952.txt)), IPv6 Zone Identifier ([RFC 6874](http://www.ietf.org/rfc/rfc6874.txt)) specifications. -URI.js has an extensive test suite, and works in all (Node.js, web) environments. It weighs in at 6.2kb (gzipped, 16kb deflated). +URI.js has an extensive test suite, and works in all (Node.js, web) environments. It weighs in at 6.4kb (gzipped, 17kb deflated). ## API @@ -101,9 +101,23 @@ URI.js supports inserting custom [scheme](http://en.wikipedia.org/wiki/URI_schem * urn \[[RFC 2141](http://www.ietf.org/rfc/rfc2141.txt)\] * urn:uuid \[[RFC 4122](http://www.ietf.org/rfc/rfc4122.txt)\] -### HTTP Support +### HTTP/HTTPS Support URI.equal("HTTP://ABC.COM:80", "http://abc.com/") === true + URI.equal("https://abc.com", "HTTPS://ABC.COM:443/") === true + +### WS/WSS Support + + URI.parse("wss://example.com/foo?bar=baz"); + //returns: + //{ + // scheme : "wss", + // host: "example.com", + // resourceName: "/foo?bar=baz", + // secure: true, + //} + + URI.equal("WS://ABC.COM:80/chat#one", "ws://abc.com/chat") === true ### Mailto Support @@ -152,9 +166,11 @@ To load in a browser, use the following tag: -To load in a CommonJS (Node.js) environment, first install with npm by running on the command line: +To load in a CommonJS/Module environment, first install with npm/yarn by running on the command line: npm install uri-js + # OR + yarn add uri-js Then, in your code, load it using: @@ -183,17 +199,3 @@ URI validation has been removed as it was slow, exposed a vulnerabilty, and was ### Breaking changes from 1.x The `errors` array on parsed components is now an `error` string. - -## License ([Simplified BSD](http://en.wikipedia.org/wiki/BSD_licenses#2-clause)) - -Copyright 2011 Gary Court. All rights reserved. - -Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: - -1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. - -2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. - -THIS SOFTWARE IS PROVIDED BY GARY COURT "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL GARY COURT OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -The views and conclusions contained in the software and documentation are those of the authors and should not be interpreted as representing official policies, either expressed or implied, of Gary Court. diff --git a/node_modules/uri-js/bower.json b/node_modules/uri-js/bower.json deleted file mode 100644 index 7a4044017..000000000 --- a/node_modules/uri-js/bower.json +++ /dev/null @@ -1,47 +0,0 @@ -{ - "name": "uri-js", - "description": "An RFC 3986/3987 compliant, scheme extendable URI/IRI parsing/validating/resolving library for JavaScript.", - "main": "dist/es5/uri.all.js", - "moduleType": [ - "globals", - "amd", - "node", - "es6" - ], - "authors": [ - "Gary Court " - ], - "license": "BSD-2-Clause", - "keywords": [ - "URI", - "IRI", - "IDN", - "URN", - "HTTP", - "HTTPS", - "MAILTO", - "RFC3986", - "RFC3987", - "RFC5891", - "RFC2616", - "RFC2818", - "RFC2141", - "RFC4122", - "RFC6068" - ], - "homepage": "https://github.com/garycourt/uri-js", - "repository": { - "type": "git", - "url": "http://github.com/garycourt/uri-js" - }, - "dependencies": { - "punycode": "^2.1.0" - }, - "ignore": [ - "**/.*", - "node_modules", - "bower_components", - "test", - "tests" - ] -} diff --git a/node_modules/uri-js/dist/es5/uri.all.d.ts b/node_modules/uri-js/dist/es5/uri.all.d.ts old mode 100644 new mode 100755 diff --git a/node_modules/uri-js/dist/es5/uri.all.js b/node_modules/uri-js/dist/es5/uri.all.js old mode 100644 new mode 100755 index 2df06091a..47f42f8aa --- a/node_modules/uri-js/dist/es5/uri.all.js +++ b/node_modules/uri-js/dist/es5/uri.all.js @@ -1,4 +1,4 @@ -/** @license URI.js v4.2.1 (c) 2011 Gary Court. License: http://github.com/garycourt/uri-js */ +/** @license URI.js v4.4.0 (c) 2011 Gary Court. License: http://github.com/garycourt/uri-js */ (function (global, factory) { typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) : typeof define === 'function' && define.amd ? define(['exports'], factory) : @@ -961,9 +961,9 @@ function _recomposeAuthority(components, options) { return "[" + $1 + ($2 ? "%25" + $2 : "") + "]"; })); } - if (typeof components.port === "number") { + if (typeof components.port === "number" || typeof components.port === "string") { uriTokens.push(":"); - uriTokens.push(components.port.toString(10)); + uriTokens.push(String(components.port)); } return uriTokens.length ? uriTokens.join("") : undefined; } @@ -1166,8 +1166,9 @@ var handler = { return components; }, serialize: function serialize(components, options) { + var secure = String(components.scheme).toLowerCase() === "https"; //normalize the default port - if (components.port === (String(components.scheme).toLowerCase() !== "https" ? 80 : 443) || components.port === "") { + if (components.port === (secure ? 443 : 80) || components.port === "") { components.port = undefined; } //normalize the empty path @@ -1188,6 +1189,57 @@ var handler$1 = { serialize: handler.serialize }; +function isSecure(wsComponents) { + return typeof wsComponents.secure === 'boolean' ? wsComponents.secure : String(wsComponents.scheme).toLowerCase() === "wss"; +} +//RFC 6455 +var handler$2 = { + scheme: "ws", + domainHost: true, + parse: function parse(components, options) { + var wsComponents = components; + //indicate if the secure flag is set + wsComponents.secure = isSecure(wsComponents); + //construct resouce name + wsComponents.resourceName = (wsComponents.path || '/') + (wsComponents.query ? '?' + wsComponents.query : ''); + wsComponents.path = undefined; + wsComponents.query = undefined; + return wsComponents; + }, + serialize: function serialize(wsComponents, options) { + //normalize the default port + if (wsComponents.port === (isSecure(wsComponents) ? 443 : 80) || wsComponents.port === "") { + wsComponents.port = undefined; + } + //ensure scheme matches secure flag + if (typeof wsComponents.secure === 'boolean') { + wsComponents.scheme = wsComponents.secure ? 'wss' : 'ws'; + wsComponents.secure = undefined; + } + //reconstruct path from resource name + if (wsComponents.resourceName) { + var _wsComponents$resourc = wsComponents.resourceName.split('?'), + _wsComponents$resourc2 = slicedToArray(_wsComponents$resourc, 2), + path = _wsComponents$resourc2[0], + query = _wsComponents$resourc2[1]; + + wsComponents.path = path && path !== '/' ? path : undefined; + wsComponents.query = query; + wsComponents.resourceName = undefined; + } + //forbid fragment component + wsComponents.fragment = undefined; + return wsComponents; + } +}; + +var handler$3 = { + scheme: "wss", + domainHost: handler$2.domainHost, + parse: handler$2.parse, + serialize: handler$2.serialize +}; + var O = {}; var isIRI = true; //RFC 3986 @@ -1218,7 +1270,7 @@ function decodeUnreserved(str) { var decStr = pctDecChars(str); return !decStr.match(UNRESERVED) ? str : decStr; } -var handler$2 = { +var handler$4 = { scheme: "mailto", parse: function parse$$1(components, options) { var mailtoComponents = components; @@ -1306,7 +1358,7 @@ var handler$2 = { var URN_PARSE = /^([^\:]+)\:(.*)/; //RFC 2141 -var handler$3 = { +var handler$5 = { scheme: "urn", parse: function parse$$1(components, options) { var matches = components.path && components.path.match(URN_PARSE); @@ -1345,7 +1397,7 @@ var handler$3 = { var UUID = /^[0-9A-Fa-f]{8}(?:\-[0-9A-Fa-f]{4}){3}\-[0-9A-Fa-f]{12}$/; //RFC 4122 -var handler$4 = { +var handler$6 = { scheme: "urn:uuid", parse: function parse(urnComponents, options) { var uuidComponents = urnComponents; @@ -1369,6 +1421,8 @@ SCHEMES[handler$1.scheme] = handler$1; SCHEMES[handler$2.scheme] = handler$2; SCHEMES[handler$3.scheme] = handler$3; SCHEMES[handler$4.scheme] = handler$4; +SCHEMES[handler$5.scheme] = handler$5; +SCHEMES[handler$6.scheme] = handler$6; exports.SCHEMES = SCHEMES; exports.pctEncChar = pctEncChar; diff --git a/node_modules/uri-js/dist/es5/uri.all.js.map b/node_modules/uri-js/dist/es5/uri.all.js.map old mode 100644 new mode 100755 index 536ffa881..5b30c4e22 --- a/node_modules/uri-js/dist/es5/uri.all.js.map +++ b/node_modules/uri-js/dist/es5/uri.all.js.map @@ -1 +1 @@ -{"version":3,"file":"uri.all.js","sources":["../../src/index.ts","../../src/schemes/urn-uuid.ts","../../src/schemes/urn.ts","../../src/schemes/mailto.ts","../../src/schemes/https.ts","../../src/schemes/http.ts","../../src/uri.ts","../../node_modules/punycode/punycode.es6.js","../../src/regexps-iri.ts","../../src/regexps-uri.ts","../../src/util.ts"],"sourcesContent":["import { SCHEMES } from \"./uri\";\n\nimport http from \"./schemes/http\";\nSCHEMES[http.scheme] = http;\n\nimport https from \"./schemes/https\";\nSCHEMES[https.scheme] = https;\n\nimport mailto from \"./schemes/mailto\";\nSCHEMES[mailto.scheme] = mailto;\n\nimport urn from \"./schemes/urn\";\nSCHEMES[urn.scheme] = urn;\n\nimport uuid from \"./schemes/urn-uuid\";\nSCHEMES[uuid.scheme] = uuid;\n\nexport * from \"./uri\";\n","import { URISchemeHandler, URIComponents, URIOptions } from \"../uri\";\nimport { URNComponents } from \"./urn\";\nimport { SCHEMES } from \"../uri\";\n\nexport interface UUIDComponents extends URNComponents {\n\tuuid?: string;\n}\n\nconst UUID = /^[0-9A-Fa-f]{8}(?:\\-[0-9A-Fa-f]{4}){3}\\-[0-9A-Fa-f]{12}$/;\nconst UUID_PARSE = /^[0-9A-Fa-f\\-]{36}/;\n\n//RFC 4122\nconst handler:URISchemeHandler = {\n\tscheme : \"urn:uuid\",\n\n\tparse : function (urnComponents:URNComponents, options:URIOptions):UUIDComponents {\n\t\tconst uuidComponents = urnComponents as UUIDComponents;\n\t\tuuidComponents.uuid = uuidComponents.nss;\n\t\tuuidComponents.nss = undefined;\n\n\t\tif (!options.tolerant && (!uuidComponents.uuid || !uuidComponents.uuid.match(UUID))) {\n\t\t\tuuidComponents.error = uuidComponents.error || \"UUID is not valid.\";\n\t\t}\n\n\t\treturn uuidComponents;\n\t},\n\n\tserialize : function (uuidComponents:UUIDComponents, options:URIOptions):URNComponents {\n\t\tconst urnComponents = uuidComponents as URNComponents;\n\t\t//normalize UUID\n\t\turnComponents.nss = (uuidComponents.uuid || \"\").toLowerCase();\n\t\treturn urnComponents;\n\t},\n};\n\nexport default handler;","import { URISchemeHandler, URIComponents, URIOptions } from \"../uri\";\nimport { pctEncChar, SCHEMES } from \"../uri\";\n\nexport interface URNComponents extends URIComponents {\n\tnid?:string;\n\tnss?:string;\n}\n\nexport interface URNOptions extends URIOptions {\n\tnid?:string;\n}\n\nconst NID$ = \"(?:[0-9A-Za-z][0-9A-Za-z\\\\-]{1,31})\";\nconst PCT_ENCODED$ = \"(?:\\\\%[0-9A-Fa-f]{2})\";\nconst TRANS$$ = \"[0-9A-Za-z\\\\(\\\\)\\\\+\\\\,\\\\-\\\\.\\\\:\\\\=\\\\@\\\\;\\\\$\\\\_\\\\!\\\\*\\\\'\\\\/\\\\?\\\\#]\";\nconst NSS$ = \"(?:(?:\" + PCT_ENCODED$ + \"|\" + TRANS$$ + \")+)\";\nconst URN_SCHEME = new RegExp(\"^urn\\\\:(\" + NID$ + \")$\");\nconst URN_PATH = new RegExp(\"^(\" + NID$ + \")\\\\:(\" + NSS$ + \")$\");\nconst URN_PARSE = /^([^\\:]+)\\:(.*)/;\nconst URN_EXCLUDED = /[\\x00-\\x20\\\\\\\"\\&\\<\\>\\[\\]\\^\\`\\{\\|\\}\\~\\x7F-\\xFF]/g;\n\n//RFC 2141\nconst handler:URISchemeHandler = {\n\tscheme : \"urn\",\n\n\tparse : function (components:URIComponents, options:URNOptions):URNComponents {\n\t\tconst matches = components.path && components.path.match(URN_PARSE);\n\t\tlet urnComponents = components as URNComponents;\n\n\t\tif (matches) {\n\t\t\tconst scheme = options.scheme || urnComponents.scheme || \"urn\";\n\t\t\tconst nid = matches[1].toLowerCase();\n\t\t\tconst nss = matches[2];\n\t\t\tconst urnScheme = `${scheme}:${options.nid || nid}`;\n\t\t\tconst schemeHandler = SCHEMES[urnScheme];\n\n\t\t\turnComponents.nid = nid;\n\t\t\turnComponents.nss = nss;\n\t\t\turnComponents.path = undefined;\n\n\t\t\tif (schemeHandler) {\n\t\t\t\turnComponents = schemeHandler.parse(urnComponents, options) as URNComponents;\n\t\t\t}\n\t\t} else {\n\t\t\turnComponents.error = urnComponents.error || \"URN can not be parsed.\";\n\t\t}\n\n\t\treturn urnComponents;\n\t},\n\n\tserialize : function (urnComponents:URNComponents, options:URNOptions):URIComponents {\n\t\tconst scheme = options.scheme || urnComponents.scheme || \"urn\";\n\t\tconst nid = urnComponents.nid;\n\t\tconst urnScheme = `${scheme}:${options.nid || nid}`;\n\t\tconst schemeHandler = SCHEMES[urnScheme];\n\n\t\tif (schemeHandler) {\n\t\t\turnComponents = schemeHandler.serialize(urnComponents, options) as URNComponents;\n\t\t}\n\n\t\tconst uriComponents = urnComponents as URIComponents;\n\t\tconst nss = urnComponents.nss;\n\t\turiComponents.path = `${nid || options.nid}:${nss}`;\n\n\t\treturn uriComponents;\n\t},\n};\n\nexport default handler;","import { URISchemeHandler, URIComponents, URIOptions } from \"../uri\";\nimport { pctEncChar, pctDecChars, unescapeComponent } from \"../uri\";\nimport punycode from \"punycode\";\nimport { merge, subexp, toUpperCase, toArray } from \"../util\";\n\nexport interface MailtoHeaders {\n\t[hfname:string]:string\n}\n\nexport interface MailtoComponents extends URIComponents {\n\tto:Array,\n\theaders?:MailtoHeaders,\n\tsubject?:string,\n\tbody?:string\n}\n\nconst O:MailtoHeaders = {};\nconst isIRI = true;\n\n//RFC 3986\nconst UNRESERVED$$ = \"[A-Za-z0-9\\\\-\\\\.\\\\_\\\\~\" + (isIRI ? \"\\\\xA0-\\\\u200D\\\\u2010-\\\\u2029\\\\u202F-\\\\uD7FF\\\\uF900-\\\\uFDCF\\\\uFDF0-\\\\uFFEF\" : \"\") + \"]\";\nconst HEXDIG$$ = \"[0-9A-Fa-f]\"; //case-insensitive\nconst PCT_ENCODED$ = subexp(subexp(\"%[EFef]\" + HEXDIG$$ + \"%\" + HEXDIG$$ + HEXDIG$$ + \"%\" + HEXDIG$$ + HEXDIG$$) + \"|\" + subexp(\"%[89A-Fa-f]\" + HEXDIG$$ + \"%\" + HEXDIG$$ + HEXDIG$$) + \"|\" + subexp(\"%\" + HEXDIG$$ + HEXDIG$$)); //expanded\n\n//RFC 5322, except these symbols as per RFC 6068: @ : / ? # [ ] & ; =\n//const ATEXT$$ = \"[A-Za-z0-9\\\\!\\\\#\\\\$\\\\%\\\\&\\\\'\\\\*\\\\+\\\\-\\\\/\\\\=\\\\?\\\\^\\\\_\\\\`\\\\{\\\\|\\\\}\\\\~]\";\n//const WSP$$ = \"[\\\\x20\\\\x09]\";\n//const OBS_QTEXT$$ = \"[\\\\x01-\\\\x08\\\\x0B\\\\x0C\\\\x0E-\\\\x1F\\\\x7F]\"; //(%d1-8 / %d11-12 / %d14-31 / %d127)\n//const QTEXT$$ = merge(\"[\\\\x21\\\\x23-\\\\x5B\\\\x5D-\\\\x7E]\", OBS_QTEXT$$); //%d33 / %d35-91 / %d93-126 / obs-qtext\n//const VCHAR$$ = \"[\\\\x21-\\\\x7E]\";\n//const WSP$$ = \"[\\\\x20\\\\x09]\";\n//const OBS_QP$ = subexp(\"\\\\\\\\\" + merge(\"[\\\\x00\\\\x0D\\\\x0A]\", OBS_QTEXT$$)); //%d0 / CR / LF / obs-qtext\n//const FWS$ = subexp(subexp(WSP$$ + \"*\" + \"\\\\x0D\\\\x0A\") + \"?\" + WSP$$ + \"+\");\n//const QUOTED_PAIR$ = subexp(subexp(\"\\\\\\\\\" + subexp(VCHAR$$ + \"|\" + WSP$$)) + \"|\" + OBS_QP$);\n//const QUOTED_STRING$ = subexp('\\\\\"' + subexp(FWS$ + \"?\" + QCONTENT$) + \"*\" + FWS$ + \"?\" + '\\\\\"');\nconst ATEXT$$ = \"[A-Za-z0-9\\\\!\\\\$\\\\%\\\\'\\\\*\\\\+\\\\-\\\\^\\\\_\\\\`\\\\{\\\\|\\\\}\\\\~]\";\nconst QTEXT$$ = \"[\\\\!\\\\$\\\\%\\\\'\\\\(\\\\)\\\\*\\\\+\\\\,\\\\-\\\\.0-9\\\\<\\\\>A-Z\\\\x5E-\\\\x7E]\";\nconst VCHAR$$ = merge(QTEXT$$, \"[\\\\\\\"\\\\\\\\]\");\nconst DOT_ATOM_TEXT$ = subexp(ATEXT$$ + \"+\" + subexp(\"\\\\.\" + ATEXT$$ + \"+\") + \"*\");\nconst QUOTED_PAIR$ = subexp(\"\\\\\\\\\" + VCHAR$$);\nconst QCONTENT$ = subexp(QTEXT$$ + \"|\" + QUOTED_PAIR$);\nconst QUOTED_STRING$ = subexp('\\\\\"' + QCONTENT$ + \"*\" + '\\\\\"');\n\n//RFC 6068\nconst DTEXT_NO_OBS$$ = \"[\\\\x21-\\\\x5A\\\\x5E-\\\\x7E]\"; //%d33-90 / %d94-126\nconst SOME_DELIMS$$ = \"[\\\\!\\\\$\\\\'\\\\(\\\\)\\\\*\\\\+\\\\,\\\\;\\\\:\\\\@]\";\nconst QCHAR$ = subexp(UNRESERVED$$ + \"|\" + PCT_ENCODED$ + \"|\" + SOME_DELIMS$$);\nconst DOMAIN$ = subexp(DOT_ATOM_TEXT$ + \"|\" + \"\\\\[\" + DTEXT_NO_OBS$$ + \"*\" + \"\\\\]\");\nconst LOCAL_PART$ = subexp(DOT_ATOM_TEXT$ + \"|\" + QUOTED_STRING$);\nconst ADDR_SPEC$ = subexp(LOCAL_PART$ + \"\\\\@\" + DOMAIN$);\nconst TO$ = subexp(ADDR_SPEC$ + subexp(\"\\\\,\" + ADDR_SPEC$) + \"*\");\nconst HFNAME$ = subexp(QCHAR$ + \"*\");\nconst HFVALUE$ = HFNAME$;\nconst HFIELD$ = subexp(HFNAME$ + \"\\\\=\" + HFVALUE$);\nconst HFIELDS2$ = subexp(HFIELD$ + subexp(\"\\\\&\" + HFIELD$) + \"*\");\nconst HFIELDS$ = subexp(\"\\\\?\" + HFIELDS2$);\nconst MAILTO_URI = new RegExp(\"^mailto\\\\:\" + TO$ + \"?\" + HFIELDS$ + \"?$\");\n\nconst UNRESERVED = new RegExp(UNRESERVED$$, \"g\");\nconst PCT_ENCODED = new RegExp(PCT_ENCODED$, \"g\");\nconst NOT_LOCAL_PART = new RegExp(merge(\"[^]\", ATEXT$$, \"[\\\\.]\", '[\\\\\"]', VCHAR$$), \"g\");\nconst NOT_DOMAIN = new RegExp(merge(\"[^]\", ATEXT$$, \"[\\\\.]\", \"[\\\\[]\", DTEXT_NO_OBS$$, \"[\\\\]]\"), \"g\");\nconst NOT_HFNAME = new RegExp(merge(\"[^]\", UNRESERVED$$, SOME_DELIMS$$), \"g\");\nconst NOT_HFVALUE = NOT_HFNAME;\nconst TO = new RegExp(\"^\" + TO$ + \"$\");\nconst HFIELDS = new RegExp(\"^\" + HFIELDS2$ + \"$\");\n\nfunction decodeUnreserved(str:string):string {\n\tconst decStr = pctDecChars(str);\n\treturn (!decStr.match(UNRESERVED) ? str : decStr);\n}\n\nconst handler:URISchemeHandler = {\n\tscheme : \"mailto\",\n\n\tparse : function (components:URIComponents, options:URIOptions):MailtoComponents {\n\t\tconst mailtoComponents = components as MailtoComponents;\n\t\tconst to = mailtoComponents.to = (mailtoComponents.path ? mailtoComponents.path.split(\",\") : []);\n\t\tmailtoComponents.path = undefined;\n\n\t\tif (mailtoComponents.query) {\n\t\t\tlet unknownHeaders = false\n\t\t\tconst headers:MailtoHeaders = {};\n\t\t\tconst hfields = mailtoComponents.query.split(\"&\");\n\n\t\t\tfor (let x = 0, xl = hfields.length; x < xl; ++x) {\n\t\t\t\tconst hfield = hfields[x].split(\"=\");\n\n\t\t\t\tswitch (hfield[0]) {\n\t\t\t\t\tcase \"to\":\n\t\t\t\t\t\tconst toAddrs = hfield[1].split(\",\");\n\t\t\t\t\t\tfor (let x = 0, xl = toAddrs.length; x < xl; ++x) {\n\t\t\t\t\t\t\tto.push(toAddrs[x]);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"subject\":\n\t\t\t\t\t\tmailtoComponents.subject = unescapeComponent(hfield[1], options);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"body\":\n\t\t\t\t\t\tmailtoComponents.body = unescapeComponent(hfield[1], options);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tdefault:\n\t\t\t\t\t\tunknownHeaders = true;\n\t\t\t\t\t\theaders[unescapeComponent(hfield[0], options)] = unescapeComponent(hfield[1], options);\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (unknownHeaders) mailtoComponents.headers = headers;\n\t\t}\n\n\t\tmailtoComponents.query = undefined;\n\n\t\tfor (let x = 0, xl = to.length; x < xl; ++x) {\n\t\t\tconst addr = to[x].split(\"@\");\n\n\t\t\taddr[0] = unescapeComponent(addr[0]);\n\n\t\t\tif (!options.unicodeSupport) {\n\t\t\t\t//convert Unicode IDN -> ASCII IDN\n\t\t\t\ttry {\n\t\t\t\t\taddr[1] = punycode.toASCII(unescapeComponent(addr[1], options).toLowerCase());\n\t\t\t\t} catch (e) {\n\t\t\t\t\tmailtoComponents.error = mailtoComponents.error || \"Email address's domain name can not be converted to ASCII via punycode: \" + e;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\taddr[1] = unescapeComponent(addr[1], options).toLowerCase();\n\t\t\t}\n\n\t\t\tto[x] = addr.join(\"@\");\n\t\t}\n\n\t\treturn mailtoComponents;\n\t},\n\n\tserialize : function (mailtoComponents:MailtoComponents, options:URIOptions):URIComponents {\n\t\tconst components = mailtoComponents as URIComponents;\n\t\tconst to = toArray(mailtoComponents.to);\n\t\tif (to) {\n\t\t\tfor (let x = 0, xl = to.length; x < xl; ++x) {\n\t\t\t\tconst toAddr = String(to[x]);\n\t\t\t\tconst atIdx = toAddr.lastIndexOf(\"@\");\n\t\t\t\tconst localPart = (toAddr.slice(0, atIdx)).replace(PCT_ENCODED, decodeUnreserved).replace(PCT_ENCODED, toUpperCase).replace(NOT_LOCAL_PART, pctEncChar);\n\t\t\t\tlet domain = toAddr.slice(atIdx + 1);\n\n\t\t\t\t//convert IDN via punycode\n\t\t\t\ttry {\n\t\t\t\t\tdomain = (!options.iri ? punycode.toASCII(unescapeComponent(domain, options).toLowerCase()) : punycode.toUnicode(domain));\n\t\t\t\t} catch (e) {\n\t\t\t\t\tcomponents.error = components.error || \"Email address's domain name can not be converted to \" + (!options.iri ? \"ASCII\" : \"Unicode\") + \" via punycode: \" + e;\n\t\t\t\t}\n\n\t\t\t\tto[x] = localPart + \"@\" + domain;\n\t\t\t}\n\n\t\t\tcomponents.path = to.join(\",\");\n\t\t}\n\n\t\tconst headers = mailtoComponents.headers = mailtoComponents.headers || {};\n\n\t\tif (mailtoComponents.subject) headers[\"subject\"] = mailtoComponents.subject;\n\t\tif (mailtoComponents.body) headers[\"body\"] = mailtoComponents.body;\n\n\t\tconst fields = [];\n\t\tfor (const name in headers) {\n\t\t\tif (headers[name] !== O[name]) {\n\t\t\t\tfields.push(\n\t\t\t\t\tname.replace(PCT_ENCODED, decodeUnreserved).replace(PCT_ENCODED, toUpperCase).replace(NOT_HFNAME, pctEncChar) +\n\t\t\t\t\t\"=\" +\n\t\t\t\t\theaders[name].replace(PCT_ENCODED, decodeUnreserved).replace(PCT_ENCODED, toUpperCase).replace(NOT_HFVALUE, pctEncChar)\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\t\tif (fields.length) {\n\t\t\tcomponents.query = fields.join(\"&\");\n\t\t}\n\n\t\treturn components;\n\t}\n}\n\nexport default handler;","import { URISchemeHandler, URIComponents, URIOptions } from \"../uri\";\nimport http from \"./http\";\n\nconst handler:URISchemeHandler = {\n\tscheme : \"https\",\n\tdomainHost : http.domainHost,\n\tparse : http.parse,\n\tserialize : http.serialize\n}\n\nexport default handler;","import { URISchemeHandler, URIComponents, URIOptions } from \"../uri\";\n\nconst handler:URISchemeHandler = {\n\tscheme : \"http\",\n\n\tdomainHost : true,\n\n\tparse : function (components:URIComponents, options:URIOptions):URIComponents {\n\t\t//report missing host\n\t\tif (!components.host) {\n\t\t\tcomponents.error = components.error || \"HTTP URIs must have a host.\";\n\t\t}\n\n\t\treturn components;\n\t},\n\n\tserialize : function (components:URIComponents, options:URIOptions):URIComponents {\n\t\t//normalize the default port\n\t\tif (components.port === (String(components.scheme).toLowerCase() !== \"https\" ? 80 : 443) || components.port === \"\") {\n\t\t\tcomponents.port = undefined;\n\t\t}\n\t\t\n\t\t//normalize the empty path\n\t\tif (!components.path) {\n\t\t\tcomponents.path = \"/\";\n\t\t}\n\n\t\t//NOTE: We do not parse query strings for HTTP URIs\n\t\t//as WWW Form Url Encoded query strings are part of the HTML4+ spec,\n\t\t//and not the HTTP spec.\n\n\t\treturn components;\n\t}\n};\n\nexport default handler;","/**\n * URI.js\n *\n * @fileoverview An RFC 3986 compliant, scheme extendable URI parsing/validating/resolving library for JavaScript.\n * @author Gary Court\n * @see http://github.com/garycourt/uri-js\n */\n\n/**\n * Copyright 2011 Gary Court. All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without modification, are\n * permitted provided that the following conditions are met:\n *\n * 1. Redistributions of source code must retain the above copyright notice, this list of\n * conditions and the following disclaimer.\n *\n * 2. Redistributions in binary form must reproduce the above copyright notice, this list\n * of conditions and the following disclaimer in the documentation and/or other materials\n * provided with the distribution.\n *\n * THIS SOFTWARE IS PROVIDED BY GARY COURT ``AS IS'' AND ANY EXPRESS OR IMPLIED\n * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL GARY COURT OR\n * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR\n * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON\n * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF\n * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n *\n * The views and conclusions contained in the software and documentation are those of the\n * authors and should not be interpreted as representing official policies, either expressed\n * or implied, of Gary Court.\n */\n\nimport URI_PROTOCOL from \"./regexps-uri\";\nimport IRI_PROTOCOL from \"./regexps-iri\";\nimport punycode from \"punycode\";\nimport { toUpperCase, typeOf, assign } from \"./util\";\n\nexport interface URIComponents {\n\tscheme?:string;\n\tuserinfo?:string;\n\thost?:string;\n\tport?:number|string;\n\tpath?:string;\n\tquery?:string;\n\tfragment?:string;\n\treference?:string;\n\terror?:string;\n}\n\nexport interface URIOptions {\n\tscheme?:string;\n\treference?:string;\n\ttolerant?:boolean;\n\tabsolutePath?:boolean;\n\tiri?:boolean;\n\tunicodeSupport?:boolean;\n\tdomainHost?:boolean;\n}\n\nexport interface URISchemeHandler {\n\tscheme:string;\n\tparse(components:ParentComponents, options:Options):Components;\n\tserialize(components:Components, options:Options):ParentComponents;\n\tunicodeSupport?:boolean;\n\tdomainHost?:boolean;\n\tabsolutePath?:boolean;\n}\n\nexport interface URIRegExps {\n\tNOT_SCHEME : RegExp,\n\tNOT_USERINFO : RegExp,\n\tNOT_HOST : RegExp,\n\tNOT_PATH : RegExp,\n\tNOT_PATH_NOSCHEME : RegExp,\n\tNOT_QUERY : RegExp,\n\tNOT_FRAGMENT : RegExp,\n\tESCAPE : RegExp,\n\tUNRESERVED : RegExp,\n\tOTHER_CHARS : RegExp,\n\tPCT_ENCODED : RegExp,\n\tIPV4ADDRESS : RegExp,\n\tIPV6ADDRESS : RegExp,\n}\n\nexport const SCHEMES:{[scheme:string]:URISchemeHandler} = {};\n\nexport function pctEncChar(chr:string):string {\n\tconst c = chr.charCodeAt(0);\n\tlet e:string;\n\n\tif (c < 16) e = \"%0\" + c.toString(16).toUpperCase();\n\telse if (c < 128) e = \"%\" + c.toString(16).toUpperCase();\n\telse if (c < 2048) e = \"%\" + ((c >> 6) | 192).toString(16).toUpperCase() + \"%\" + ((c & 63) | 128).toString(16).toUpperCase();\n\telse e = \"%\" + ((c >> 12) | 224).toString(16).toUpperCase() + \"%\" + (((c >> 6) & 63) | 128).toString(16).toUpperCase() + \"%\" + ((c & 63) | 128).toString(16).toUpperCase();\n\n\treturn e;\n}\n\nexport function pctDecChars(str:string):string {\n\tlet newStr = \"\";\n\tlet i = 0;\n\tconst il = str.length;\n\n\twhile (i < il) {\n\t\tconst c = parseInt(str.substr(i + 1, 2), 16);\n\n\t\tif (c < 128) {\n\t\t\tnewStr += String.fromCharCode(c);\n\t\t\ti += 3;\n\t\t}\n\t\telse if (c >= 194 && c < 224) {\n\t\t\tif ((il - i) >= 6) {\n\t\t\t\tconst c2 = parseInt(str.substr(i + 4, 2), 16);\n\t\t\t\tnewStr += String.fromCharCode(((c & 31) << 6) | (c2 & 63));\n\t\t\t} else {\n\t\t\t\tnewStr += str.substr(i, 6);\n\t\t\t}\n\t\t\ti += 6;\n\t\t}\n\t\telse if (c >= 224) {\n\t\t\tif ((il - i) >= 9) {\n\t\t\t\tconst c2 = parseInt(str.substr(i + 4, 2), 16);\n\t\t\t\tconst c3 = parseInt(str.substr(i + 7, 2), 16);\n\t\t\t\tnewStr += String.fromCharCode(((c & 15) << 12) | ((c2 & 63) << 6) | (c3 & 63));\n\t\t\t} else {\n\t\t\t\tnewStr += str.substr(i, 9);\n\t\t\t}\n\t\t\ti += 9;\n\t\t}\n\t\telse {\n\t\t\tnewStr += str.substr(i, 3);\n\t\t\ti += 3;\n\t\t}\n\t}\n\n\treturn newStr;\n}\n\nfunction _normalizeComponentEncoding(components:URIComponents, protocol:URIRegExps) {\n\tfunction decodeUnreserved(str:string):string {\n\t\tconst decStr = pctDecChars(str);\n\t\treturn (!decStr.match(protocol.UNRESERVED) ? str : decStr);\n\t}\n\n\tif (components.scheme) components.scheme = String(components.scheme).replace(protocol.PCT_ENCODED, decodeUnreserved).toLowerCase().replace(protocol.NOT_SCHEME, \"\");\n\tif (components.userinfo !== undefined) components.userinfo = String(components.userinfo).replace(protocol.PCT_ENCODED, decodeUnreserved).replace(protocol.NOT_USERINFO, pctEncChar).replace(protocol.PCT_ENCODED, toUpperCase);\n\tif (components.host !== undefined) components.host = String(components.host).replace(protocol.PCT_ENCODED, decodeUnreserved).toLowerCase().replace(protocol.NOT_HOST, pctEncChar).replace(protocol.PCT_ENCODED, toUpperCase);\n\tif (components.path !== undefined) components.path = String(components.path).replace(protocol.PCT_ENCODED, decodeUnreserved).replace((components.scheme ? protocol.NOT_PATH : protocol.NOT_PATH_NOSCHEME), pctEncChar).replace(protocol.PCT_ENCODED, toUpperCase);\n\tif (components.query !== undefined) components.query = String(components.query).replace(protocol.PCT_ENCODED, decodeUnreserved).replace(protocol.NOT_QUERY, pctEncChar).replace(protocol.PCT_ENCODED, toUpperCase);\n\tif (components.fragment !== undefined) components.fragment = String(components.fragment).replace(protocol.PCT_ENCODED, decodeUnreserved).replace(protocol.NOT_FRAGMENT, pctEncChar).replace(protocol.PCT_ENCODED, toUpperCase);\n\n\treturn components;\n};\n\nfunction _stripLeadingZeros(str:string):string {\n\treturn str.replace(/^0*(.*)/, \"$1\") || \"0\";\n}\n\nfunction _normalizeIPv4(host:string, protocol:URIRegExps):string {\n\tconst matches = host.match(protocol.IPV4ADDRESS) || [];\n\tconst [, address] = matches;\n\t\n\tif (address) {\n\t\treturn address.split(\".\").map(_stripLeadingZeros).join(\".\");\n\t} else {\n\t\treturn host;\n\t}\n}\n\nfunction _normalizeIPv6(host:string, protocol:URIRegExps):string {\n\tconst matches = host.match(protocol.IPV6ADDRESS) || [];\n\tconst [, address, zone] = matches;\n\n\tif (address) {\n\t\tconst [last, first] = address.toLowerCase().split('::').reverse();\n\t\tconst firstFields = first ? first.split(\":\").map(_stripLeadingZeros) : [];\n\t\tconst lastFields = last.split(\":\").map(_stripLeadingZeros);\n\t\tconst isLastFieldIPv4Address = protocol.IPV4ADDRESS.test(lastFields[lastFields.length - 1]);\n\t\tconst fieldCount = isLastFieldIPv4Address ? 7 : 8;\n\t\tconst lastFieldsStart = lastFields.length - fieldCount;\n\t\tconst fields = Array(fieldCount);\n\n\t\tfor (let x = 0; x < fieldCount; ++x) {\n\t\t\tfields[x] = firstFields[x] || lastFields[lastFieldsStart + x] || '';\n\t\t}\n\n\t\tif (isLastFieldIPv4Address) {\n\t\t\tfields[fieldCount - 1] = _normalizeIPv4(fields[fieldCount - 1], protocol);\n\t\t}\n\n\t\tconst allZeroFields = fields.reduce>((acc, field, index) => {\n\t\t\tif (!field || field === \"0\") {\n\t\t\t\tconst lastLongest = acc[acc.length - 1];\n\t\t\t\tif (lastLongest && lastLongest.index + lastLongest.length === index) {\n\t\t\t\t\tlastLongest.length++;\n\t\t\t\t} else {\n\t\t\t\t\tacc.push({ index, length : 1 });\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn acc;\n\t\t}, []);\n\n\t\tconst longestZeroFields = allZeroFields.sort((a, b) => b.length - a.length)[0];\n\n\t\tlet newHost:string;\n\t\tif (longestZeroFields && longestZeroFields.length > 1) {\n\t\t\tconst newFirst = fields.slice(0, longestZeroFields.index) ;\n\t\t\tconst newLast = fields.slice(longestZeroFields.index + longestZeroFields.length);\n\t\t\tnewHost = newFirst.join(\":\") + \"::\" + newLast.join(\":\");\n\t\t} else {\n\t\t\tnewHost = fields.join(\":\");\n\t\t}\n\n\t\tif (zone) {\n\t\t\tnewHost += \"%\" + zone;\n\t\t}\n\n\t\treturn newHost;\n\t} else {\n\t\treturn host;\n\t}\n}\n\nconst URI_PARSE = /^(?:([^:\\/?#]+):)?(?:\\/\\/((?:([^\\/?#@]*)@)?(\\[[^\\/?#\\]]+\\]|[^\\/?#:]*)(?:\\:(\\d*))?))?([^?#]*)(?:\\?([^#]*))?(?:#((?:.|\\n|\\r)*))?/i;\nconst NO_MATCH_IS_UNDEFINED = ((\"\").match(/(){0}/))[1] === undefined;\n\nexport function parse(uriString:string, options:URIOptions = {}):URIComponents {\n\tconst components:URIComponents = {};\n\tconst protocol = (options.iri !== false ? IRI_PROTOCOL : URI_PROTOCOL);\n\n\tif (options.reference === \"suffix\") uriString = (options.scheme ? options.scheme + \":\" : \"\") + \"//\" + uriString;\n\n\tconst matches = uriString.match(URI_PARSE);\n\n\tif (matches) {\n\t\tif (NO_MATCH_IS_UNDEFINED) {\n\t\t\t//store each component\n\t\t\tcomponents.scheme = matches[1];\n\t\t\tcomponents.userinfo = matches[3];\n\t\t\tcomponents.host = matches[4];\n\t\t\tcomponents.port = parseInt(matches[5], 10);\n\t\t\tcomponents.path = matches[6] || \"\";\n\t\t\tcomponents.query = matches[7];\n\t\t\tcomponents.fragment = matches[8];\n\n\t\t\t//fix port number\n\t\t\tif (isNaN(components.port)) {\n\t\t\t\tcomponents.port = matches[5];\n\t\t\t}\n\t\t} else { //IE FIX for improper RegExp matching\n\t\t\t//store each component\n\t\t\tcomponents.scheme = matches[1] || undefined;\n\t\t\tcomponents.userinfo = (uriString.indexOf(\"@\") !== -1 ? matches[3] : undefined);\n\t\t\tcomponents.host = (uriString.indexOf(\"//\") !== -1 ? matches[4] : undefined);\n\t\t\tcomponents.port = parseInt(matches[5], 10);\n\t\t\tcomponents.path = matches[6] || \"\";\n\t\t\tcomponents.query = (uriString.indexOf(\"?\") !== -1 ? matches[7] : undefined);\n\t\t\tcomponents.fragment = (uriString.indexOf(\"#\") !== -1 ? matches[8] : undefined);\n\n\t\t\t//fix port number\n\t\t\tif (isNaN(components.port)) {\n\t\t\t\tcomponents.port = (uriString.match(/\\/\\/(?:.|\\n)*\\:(?:\\/|\\?|\\#|$)/) ? matches[4] : undefined);\n\t\t\t}\n\t\t}\n\n\t\tif (components.host) {\n\t\t\t//normalize IP hosts\n\t\t\tcomponents.host = _normalizeIPv6(_normalizeIPv4(components.host, protocol), protocol);\n\t\t}\n\n\t\t//determine reference type\n\t\tif (components.scheme === undefined && components.userinfo === undefined && components.host === undefined && components.port === undefined && !components.path && components.query === undefined) {\n\t\t\tcomponents.reference = \"same-document\";\n\t\t} else if (components.scheme === undefined) {\n\t\t\tcomponents.reference = \"relative\";\n\t\t} else if (components.fragment === undefined) {\n\t\t\tcomponents.reference = \"absolute\";\n\t\t} else {\n\t\t\tcomponents.reference = \"uri\";\n\t\t}\n\n\t\t//check for reference errors\n\t\tif (options.reference && options.reference !== \"suffix\" && options.reference !== components.reference) {\n\t\t\tcomponents.error = components.error || \"URI is not a \" + options.reference + \" reference.\";\n\t\t}\n\n\t\t//find scheme handler\n\t\tconst schemeHandler = SCHEMES[(options.scheme || components.scheme || \"\").toLowerCase()];\n\n\t\t//check if scheme can't handle IRIs\n\t\tif (!options.unicodeSupport && (!schemeHandler || !schemeHandler.unicodeSupport)) {\n\t\t\t//if host component is a domain name\n\t\t\tif (components.host && (options.domainHost || (schemeHandler && schemeHandler.domainHost))) {\n\t\t\t\t//convert Unicode IDN -> ASCII IDN\n\t\t\t\ttry {\n\t\t\t\t\tcomponents.host = punycode.toASCII(components.host.replace(protocol.PCT_ENCODED, pctDecChars).toLowerCase());\n\t\t\t\t} catch (e) {\n\t\t\t\t\tcomponents.error = components.error || \"Host's domain name can not be converted to ASCII via punycode: \" + e;\n\t\t\t\t}\n\t\t\t}\n\t\t\t//convert IRI -> URI\n\t\t\t_normalizeComponentEncoding(components, URI_PROTOCOL);\n\t\t} else {\n\t\t\t//normalize encodings\n\t\t\t_normalizeComponentEncoding(components, protocol);\n\t\t}\n\n\t\t//perform scheme specific parsing\n\t\tif (schemeHandler && schemeHandler.parse) {\n\t\t\tschemeHandler.parse(components, options);\n\t\t}\n\t} else {\n\t\tcomponents.error = components.error || \"URI can not be parsed.\";\n\t}\n\n\treturn components;\n};\n\nfunction _recomposeAuthority(components:URIComponents, options:URIOptions):string|undefined {\n\tconst protocol = (options.iri !== false ? IRI_PROTOCOL : URI_PROTOCOL);\n\tconst uriTokens:Array = [];\n\n\tif (components.userinfo !== undefined) {\n\t\turiTokens.push(components.userinfo);\n\t\turiTokens.push(\"@\");\n\t}\n\n\tif (components.host !== undefined) {\n\t\t//normalize IP hosts, add brackets and escape zone separator for IPv6\n\t\turiTokens.push(_normalizeIPv6(_normalizeIPv4(String(components.host), protocol), protocol).replace(protocol.IPV6ADDRESS, (_, $1, $2) => \"[\" + $1 + ($2 ? \"%25\" + $2 : \"\") + \"]\"));\n\t}\n\n\tif (typeof components.port === \"number\") {\n\t\turiTokens.push(\":\");\n\t\turiTokens.push(components.port.toString(10));\n\t}\n\n\treturn uriTokens.length ? uriTokens.join(\"\") : undefined;\n};\n\nconst RDS1 = /^\\.\\.?\\//;\nconst RDS2 = /^\\/\\.(\\/|$)/;\nconst RDS3 = /^\\/\\.\\.(\\/|$)/;\nconst RDS4 = /^\\.\\.?$/;\nconst RDS5 = /^\\/?(?:.|\\n)*?(?=\\/|$)/;\n\nexport function removeDotSegments(input:string):string {\n\tconst output:Array = [];\n\n\twhile (input.length) {\n\t\tif (input.match(RDS1)) {\n\t\t\tinput = input.replace(RDS1, \"\");\n\t\t} else if (input.match(RDS2)) {\n\t\t\tinput = input.replace(RDS2, \"/\");\n\t\t} else if (input.match(RDS3)) {\n\t\t\tinput = input.replace(RDS3, \"/\");\n\t\t\toutput.pop();\n\t\t} else if (input === \".\" || input === \"..\") {\n\t\t\tinput = \"\";\n\t\t} else {\n\t\t\tconst im = input.match(RDS5);\n\t\t\tif (im) {\n\t\t\t\tconst s = im[0];\n\t\t\t\tinput = input.slice(s.length);\n\t\t\t\toutput.push(s);\n\t\t\t} else {\n\t\t\t\tthrow new Error(\"Unexpected dot segment condition\");\n\t\t\t}\n\t\t}\n\t}\n\n\treturn output.join(\"\");\n};\n\nexport function serialize(components:URIComponents, options:URIOptions = {}):string {\n\tconst protocol = (options.iri ? IRI_PROTOCOL : URI_PROTOCOL);\n\tconst uriTokens:Array = [];\n\n\t//find scheme handler\n\tconst schemeHandler = SCHEMES[(options.scheme || components.scheme || \"\").toLowerCase()];\n\n\t//perform scheme specific serialization\n\tif (schemeHandler && schemeHandler.serialize) schemeHandler.serialize(components, options);\n\n\tif (components.host) {\n\t\t//if host component is an IPv6 address\n\t\tif (protocol.IPV6ADDRESS.test(components.host)) {\n\t\t\t//TODO: normalize IPv6 address as per RFC 5952\n\t\t}\n\n\t\t//if host component is a domain name\n\t\telse if (options.domainHost || (schemeHandler && schemeHandler.domainHost)) {\n\t\t\t//convert IDN via punycode\n\t\t\ttry {\n\t\t\t\tcomponents.host = (!options.iri ? punycode.toASCII(components.host.replace(protocol.PCT_ENCODED, pctDecChars).toLowerCase()) : punycode.toUnicode(components.host));\n\t\t\t} catch (e) {\n\t\t\t\tcomponents.error = components.error || \"Host's domain name can not be converted to \" + (!options.iri ? \"ASCII\" : \"Unicode\") + \" via punycode: \" + e;\n\t\t\t}\n\t\t}\n\t}\n\n\t//normalize encoding\n\t_normalizeComponentEncoding(components, protocol);\n\n\tif (options.reference !== \"suffix\" && components.scheme) {\n\t\turiTokens.push(components.scheme);\n\t\turiTokens.push(\":\");\n\t}\n\n\tconst authority = _recomposeAuthority(components, options);\n\tif (authority !== undefined) {\n\t\tif (options.reference !== \"suffix\") {\n\t\t\turiTokens.push(\"//\");\n\t\t}\n\n\t\turiTokens.push(authority);\n\n\t\tif (components.path && components.path.charAt(0) !== \"/\") {\n\t\t\turiTokens.push(\"/\");\n\t\t}\n\t}\n\n\tif (components.path !== undefined) {\n\t\tlet s = components.path;\n\n\t\tif (!options.absolutePath && (!schemeHandler || !schemeHandler.absolutePath)) {\n\t\t\ts = removeDotSegments(s);\n\t\t}\n\n\t\tif (authority === undefined) {\n\t\t\ts = s.replace(/^\\/\\//, \"/%2F\"); //don't allow the path to start with \"//\"\n\t\t}\n\n\t\turiTokens.push(s);\n\t}\n\n\tif (components.query !== undefined) {\n\t\turiTokens.push(\"?\");\n\t\turiTokens.push(components.query);\n\t}\n\n\tif (components.fragment !== undefined) {\n\t\turiTokens.push(\"#\");\n\t\turiTokens.push(components.fragment);\n\t}\n\n\treturn uriTokens.join(\"\"); //merge tokens into a string\n};\n\nexport function resolveComponents(base:URIComponents, relative:URIComponents, options:URIOptions = {}, skipNormalization?:boolean):URIComponents {\n\tconst target:URIComponents = {};\n\n\tif (!skipNormalization) {\n\t\tbase = parse(serialize(base, options), options); //normalize base components\n\t\trelative = parse(serialize(relative, options), options); //normalize relative components\n\t}\n\toptions = options || {};\n\n\tif (!options.tolerant && relative.scheme) {\n\t\ttarget.scheme = relative.scheme;\n\t\t//target.authority = relative.authority;\n\t\ttarget.userinfo = relative.userinfo;\n\t\ttarget.host = relative.host;\n\t\ttarget.port = relative.port;\n\t\ttarget.path = removeDotSegments(relative.path || \"\");\n\t\ttarget.query = relative.query;\n\t} else {\n\t\tif (relative.userinfo !== undefined || relative.host !== undefined || relative.port !== undefined) {\n\t\t\t//target.authority = relative.authority;\n\t\t\ttarget.userinfo = relative.userinfo;\n\t\t\ttarget.host = relative.host;\n\t\t\ttarget.port = relative.port;\n\t\t\ttarget.path = removeDotSegments(relative.path || \"\");\n\t\t\ttarget.query = relative.query;\n\t\t} else {\n\t\t\tif (!relative.path) {\n\t\t\t\ttarget.path = base.path;\n\t\t\t\tif (relative.query !== undefined) {\n\t\t\t\t\ttarget.query = relative.query;\n\t\t\t\t} else {\n\t\t\t\t\ttarget.query = base.query;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif (relative.path.charAt(0) === \"/\") {\n\t\t\t\t\ttarget.path = removeDotSegments(relative.path);\n\t\t\t\t} else {\n\t\t\t\t\tif ((base.userinfo !== undefined || base.host !== undefined || base.port !== undefined) && !base.path) {\n\t\t\t\t\t\ttarget.path = \"/\" + relative.path;\n\t\t\t\t\t} else if (!base.path) {\n\t\t\t\t\t\ttarget.path = relative.path;\n\t\t\t\t\t} else {\n\t\t\t\t\t\ttarget.path = base.path.slice(0, base.path.lastIndexOf(\"/\") + 1) + relative.path;\n\t\t\t\t\t}\n\t\t\t\t\ttarget.path = removeDotSegments(target.path);\n\t\t\t\t}\n\t\t\t\ttarget.query = relative.query;\n\t\t\t}\n\t\t\t//target.authority = base.authority;\n\t\t\ttarget.userinfo = base.userinfo;\n\t\t\ttarget.host = base.host;\n\t\t\ttarget.port = base.port;\n\t\t}\n\t\ttarget.scheme = base.scheme;\n\t}\n\n\ttarget.fragment = relative.fragment;\n\n\treturn target;\n};\n\nexport function resolve(baseURI:string, relativeURI:string, options?:URIOptions):string {\n\tconst schemelessOptions = assign({ scheme : 'null' }, options);\n\treturn serialize(resolveComponents(parse(baseURI, schemelessOptions), parse(relativeURI, schemelessOptions), schemelessOptions, true), schemelessOptions);\n};\n\nexport function normalize(uri:string, options?:URIOptions):string;\nexport function normalize(uri:URIComponents, options?:URIOptions):URIComponents;\nexport function normalize(uri:any, options?:URIOptions):any {\n\tif (typeof uri === \"string\") {\n\t\turi = serialize(parse(uri, options), options);\n\t} else if (typeOf(uri) === \"object\") {\n\t\turi = parse(serialize(uri, options), options);\n\t}\n\n\treturn uri;\n};\n\nexport function equal(uriA:string, uriB:string, options?: URIOptions):boolean;\nexport function equal(uriA:URIComponents, uriB:URIComponents, options?:URIOptions):boolean;\nexport function equal(uriA:any, uriB:any, options?:URIOptions):boolean {\n\tif (typeof uriA === \"string\") {\n\t\turiA = serialize(parse(uriA, options), options);\n\t} else if (typeOf(uriA) === \"object\") {\n\t\turiA = serialize(uriA, options);\n\t}\n\n\tif (typeof uriB === \"string\") {\n\t\turiB = serialize(parse(uriB, options), options);\n\t} else if (typeOf(uriB) === \"object\") {\n\t\turiB = serialize(uriB, options);\n\t}\n\n\treturn uriA === uriB;\n};\n\nexport function escapeComponent(str:string, options?:URIOptions):string {\n\treturn str && str.toString().replace((!options || !options.iri ? URI_PROTOCOL.ESCAPE : IRI_PROTOCOL.ESCAPE), pctEncChar);\n};\n\nexport function unescapeComponent(str:string, options?:URIOptions):string {\n\treturn str && str.toString().replace((!options || !options.iri ? URI_PROTOCOL.PCT_ENCODED : IRI_PROTOCOL.PCT_ENCODED), pctDecChars);\n};\n","'use strict';\n\n/** Highest positive signed 32-bit float value */\nconst maxInt = 2147483647; // aka. 0x7FFFFFFF or 2^31-1\n\n/** Bootstring parameters */\nconst base = 36;\nconst tMin = 1;\nconst tMax = 26;\nconst skew = 38;\nconst damp = 700;\nconst initialBias = 72;\nconst initialN = 128; // 0x80\nconst delimiter = '-'; // '\\x2D'\n\n/** Regular expressions */\nconst regexPunycode = /^xn--/;\nconst regexNonASCII = /[^\\0-\\x7E]/; // non-ASCII chars\nconst regexSeparators = /[\\x2E\\u3002\\uFF0E\\uFF61]/g; // RFC 3490 separators\n\n/** Error messages */\nconst errors = {\n\t'overflow': 'Overflow: input needs wider integers to process',\n\t'not-basic': 'Illegal input >= 0x80 (not a basic code point)',\n\t'invalid-input': 'Invalid input'\n};\n\n/** Convenience shortcuts */\nconst baseMinusTMin = base - tMin;\nconst floor = Math.floor;\nconst stringFromCharCode = String.fromCharCode;\n\n/*--------------------------------------------------------------------------*/\n\n/**\n * A generic error utility function.\n * @private\n * @param {String} type The error type.\n * @returns {Error} Throws a `RangeError` with the applicable error message.\n */\nfunction error(type) {\n\tthrow new RangeError(errors[type]);\n}\n\n/**\n * A generic `Array#map` utility function.\n * @private\n * @param {Array} array The array to iterate over.\n * @param {Function} callback The function that gets called for every array\n * item.\n * @returns {Array} A new array of values returned by the callback function.\n */\nfunction map(array, fn) {\n\tconst result = [];\n\tlet length = array.length;\n\twhile (length--) {\n\t\tresult[length] = fn(array[length]);\n\t}\n\treturn result;\n}\n\n/**\n * A simple `Array#map`-like wrapper to work with domain name strings or email\n * addresses.\n * @private\n * @param {String} domain The domain name or email address.\n * @param {Function} callback The function that gets called for every\n * character.\n * @returns {Array} A new string of characters returned by the callback\n * function.\n */\nfunction mapDomain(string, fn) {\n\tconst parts = string.split('@');\n\tlet result = '';\n\tif (parts.length > 1) {\n\t\t// In email addresses, only the domain name should be punycoded. Leave\n\t\t// the local part (i.e. everything up to `@`) intact.\n\t\tresult = parts[0] + '@';\n\t\tstring = parts[1];\n\t}\n\t// Avoid `split(regex)` for IE8 compatibility. See #17.\n\tstring = string.replace(regexSeparators, '\\x2E');\n\tconst labels = string.split('.');\n\tconst encoded = map(labels, fn).join('.');\n\treturn result + encoded;\n}\n\n/**\n * Creates an array containing the numeric code points of each Unicode\n * character in the string. While JavaScript uses UCS-2 internally,\n * this function will convert a pair of surrogate halves (each of which\n * UCS-2 exposes as separate characters) into a single code point,\n * matching UTF-16.\n * @see `punycode.ucs2.encode`\n * @see \n * @memberOf punycode.ucs2\n * @name decode\n * @param {String} string The Unicode input string (UCS-2).\n * @returns {Array} The new array of code points.\n */\nfunction ucs2decode(string) {\n\tconst output = [];\n\tlet counter = 0;\n\tconst length = string.length;\n\twhile (counter < length) {\n\t\tconst value = string.charCodeAt(counter++);\n\t\tif (value >= 0xD800 && value <= 0xDBFF && counter < length) {\n\t\t\t// It's a high surrogate, and there is a next character.\n\t\t\tconst extra = string.charCodeAt(counter++);\n\t\t\tif ((extra & 0xFC00) == 0xDC00) { // Low surrogate.\n\t\t\t\toutput.push(((value & 0x3FF) << 10) + (extra & 0x3FF) + 0x10000);\n\t\t\t} else {\n\t\t\t\t// It's an unmatched surrogate; only append this code unit, in case the\n\t\t\t\t// next code unit is the high surrogate of a surrogate pair.\n\t\t\t\toutput.push(value);\n\t\t\t\tcounter--;\n\t\t\t}\n\t\t} else {\n\t\t\toutput.push(value);\n\t\t}\n\t}\n\treturn output;\n}\n\n/**\n * Creates a string based on an array of numeric code points.\n * @see `punycode.ucs2.decode`\n * @memberOf punycode.ucs2\n * @name encode\n * @param {Array} codePoints The array of numeric code points.\n * @returns {String} The new Unicode string (UCS-2).\n */\nconst ucs2encode = array => String.fromCodePoint(...array);\n\n/**\n * Converts a basic code point into a digit/integer.\n * @see `digitToBasic()`\n * @private\n * @param {Number} codePoint The basic numeric code point value.\n * @returns {Number} The numeric value of a basic code point (for use in\n * representing integers) in the range `0` to `base - 1`, or `base` if\n * the code point does not represent a value.\n */\nconst basicToDigit = function(codePoint) {\n\tif (codePoint - 0x30 < 0x0A) {\n\t\treturn codePoint - 0x16;\n\t}\n\tif (codePoint - 0x41 < 0x1A) {\n\t\treturn codePoint - 0x41;\n\t}\n\tif (codePoint - 0x61 < 0x1A) {\n\t\treturn codePoint - 0x61;\n\t}\n\treturn base;\n};\n\n/**\n * Converts a digit/integer into a basic code point.\n * @see `basicToDigit()`\n * @private\n * @param {Number} digit The numeric value of a basic code point.\n * @returns {Number} The basic code point whose value (when used for\n * representing integers) is `digit`, which needs to be in the range\n * `0` to `base - 1`. If `flag` is non-zero, the uppercase form is\n * used; else, the lowercase form is used. The behavior is undefined\n * if `flag` is non-zero and `digit` has no uppercase form.\n */\nconst digitToBasic = function(digit, flag) {\n\t// 0..25 map to ASCII a..z or A..Z\n\t// 26..35 map to ASCII 0..9\n\treturn digit + 22 + 75 * (digit < 26) - ((flag != 0) << 5);\n};\n\n/**\n * Bias adaptation function as per section 3.4 of RFC 3492.\n * https://tools.ietf.org/html/rfc3492#section-3.4\n * @private\n */\nconst adapt = function(delta, numPoints, firstTime) {\n\tlet k = 0;\n\tdelta = firstTime ? floor(delta / damp) : delta >> 1;\n\tdelta += floor(delta / numPoints);\n\tfor (/* no initialization */; delta > baseMinusTMin * tMax >> 1; k += base) {\n\t\tdelta = floor(delta / baseMinusTMin);\n\t}\n\treturn floor(k + (baseMinusTMin + 1) * delta / (delta + skew));\n};\n\n/**\n * Converts a Punycode string of ASCII-only symbols to a string of Unicode\n * symbols.\n * @memberOf punycode\n * @param {String} input The Punycode string of ASCII-only symbols.\n * @returns {String} The resulting string of Unicode symbols.\n */\nconst decode = function(input) {\n\t// Don't use UCS-2.\n\tconst output = [];\n\tconst inputLength = input.length;\n\tlet i = 0;\n\tlet n = initialN;\n\tlet bias = initialBias;\n\n\t// Handle the basic code points: let `basic` be the number of input code\n\t// points before the last delimiter, or `0` if there is none, then copy\n\t// the first basic code points to the output.\n\n\tlet basic = input.lastIndexOf(delimiter);\n\tif (basic < 0) {\n\t\tbasic = 0;\n\t}\n\n\tfor (let j = 0; j < basic; ++j) {\n\t\t// if it's not a basic code point\n\t\tif (input.charCodeAt(j) >= 0x80) {\n\t\t\terror('not-basic');\n\t\t}\n\t\toutput.push(input.charCodeAt(j));\n\t}\n\n\t// Main decoding loop: start just after the last delimiter if any basic code\n\t// points were copied; start at the beginning otherwise.\n\n\tfor (let index = basic > 0 ? basic + 1 : 0; index < inputLength; /* no final expression */) {\n\n\t\t// `index` is the index of the next character to be consumed.\n\t\t// Decode a generalized variable-length integer into `delta`,\n\t\t// which gets added to `i`. The overflow checking is easier\n\t\t// if we increase `i` as we go, then subtract off its starting\n\t\t// value at the end to obtain `delta`.\n\t\tlet oldi = i;\n\t\tfor (let w = 1, k = base; /* no condition */; k += base) {\n\n\t\t\tif (index >= inputLength) {\n\t\t\t\terror('invalid-input');\n\t\t\t}\n\n\t\t\tconst digit = basicToDigit(input.charCodeAt(index++));\n\n\t\t\tif (digit >= base || digit > floor((maxInt - i) / w)) {\n\t\t\t\terror('overflow');\n\t\t\t}\n\n\t\t\ti += digit * w;\n\t\t\tconst t = k <= bias ? tMin : (k >= bias + tMax ? tMax : k - bias);\n\n\t\t\tif (digit < t) {\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tconst baseMinusT = base - t;\n\t\t\tif (w > floor(maxInt / baseMinusT)) {\n\t\t\t\terror('overflow');\n\t\t\t}\n\n\t\t\tw *= baseMinusT;\n\n\t\t}\n\n\t\tconst out = output.length + 1;\n\t\tbias = adapt(i - oldi, out, oldi == 0);\n\n\t\t// `i` was supposed to wrap around from `out` to `0`,\n\t\t// incrementing `n` each time, so we'll fix that now:\n\t\tif (floor(i / out) > maxInt - n) {\n\t\t\terror('overflow');\n\t\t}\n\n\t\tn += floor(i / out);\n\t\ti %= out;\n\n\t\t// Insert `n` at position `i` of the output.\n\t\toutput.splice(i++, 0, n);\n\n\t}\n\n\treturn String.fromCodePoint(...output);\n};\n\n/**\n * Converts a string of Unicode symbols (e.g. a domain name label) to a\n * Punycode string of ASCII-only symbols.\n * @memberOf punycode\n * @param {String} input The string of Unicode symbols.\n * @returns {String} The resulting Punycode string of ASCII-only symbols.\n */\nconst encode = function(input) {\n\tconst output = [];\n\n\t// Convert the input in UCS-2 to an array of Unicode code points.\n\tinput = ucs2decode(input);\n\n\t// Cache the length.\n\tlet inputLength = input.length;\n\n\t// Initialize the state.\n\tlet n = initialN;\n\tlet delta = 0;\n\tlet bias = initialBias;\n\n\t// Handle the basic code points.\n\tfor (const currentValue of input) {\n\t\tif (currentValue < 0x80) {\n\t\t\toutput.push(stringFromCharCode(currentValue));\n\t\t}\n\t}\n\n\tlet basicLength = output.length;\n\tlet handledCPCount = basicLength;\n\n\t// `handledCPCount` is the number of code points that have been handled;\n\t// `basicLength` is the number of basic code points.\n\n\t// Finish the basic string with a delimiter unless it's empty.\n\tif (basicLength) {\n\t\toutput.push(delimiter);\n\t}\n\n\t// Main encoding loop:\n\twhile (handledCPCount < inputLength) {\n\n\t\t// All non-basic code points < n have been handled already. Find the next\n\t\t// larger one:\n\t\tlet m = maxInt;\n\t\tfor (const currentValue of input) {\n\t\t\tif (currentValue >= n && currentValue < m) {\n\t\t\t\tm = currentValue;\n\t\t\t}\n\t\t}\n\n\t\t// Increase `delta` enough to advance the decoder's state to ,\n\t\t// but guard against overflow.\n\t\tconst handledCPCountPlusOne = handledCPCount + 1;\n\t\tif (m - n > floor((maxInt - delta) / handledCPCountPlusOne)) {\n\t\t\terror('overflow');\n\t\t}\n\n\t\tdelta += (m - n) * handledCPCountPlusOne;\n\t\tn = m;\n\n\t\tfor (const currentValue of input) {\n\t\t\tif (currentValue < n && ++delta > maxInt) {\n\t\t\t\terror('overflow');\n\t\t\t}\n\t\t\tif (currentValue == n) {\n\t\t\t\t// Represent delta as a generalized variable-length integer.\n\t\t\t\tlet q = delta;\n\t\t\t\tfor (let k = base; /* no condition */; k += base) {\n\t\t\t\t\tconst t = k <= bias ? tMin : (k >= bias + tMax ? tMax : k - bias);\n\t\t\t\t\tif (q < t) {\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tconst qMinusT = q - t;\n\t\t\t\t\tconst baseMinusT = base - t;\n\t\t\t\t\toutput.push(\n\t\t\t\t\t\tstringFromCharCode(digitToBasic(t + qMinusT % baseMinusT, 0))\n\t\t\t\t\t);\n\t\t\t\t\tq = floor(qMinusT / baseMinusT);\n\t\t\t\t}\n\n\t\t\t\toutput.push(stringFromCharCode(digitToBasic(q, 0)));\n\t\t\t\tbias = adapt(delta, handledCPCountPlusOne, handledCPCount == basicLength);\n\t\t\t\tdelta = 0;\n\t\t\t\t++handledCPCount;\n\t\t\t}\n\t\t}\n\n\t\t++delta;\n\t\t++n;\n\n\t}\n\treturn output.join('');\n};\n\n/**\n * Converts a Punycode string representing a domain name or an email address\n * to Unicode. Only the Punycoded parts of the input will be converted, i.e.\n * it doesn't matter if you call it on a string that has already been\n * converted to Unicode.\n * @memberOf punycode\n * @param {String} input The Punycoded domain name or email address to\n * convert to Unicode.\n * @returns {String} The Unicode representation of the given Punycode\n * string.\n */\nconst toUnicode = function(input) {\n\treturn mapDomain(input, function(string) {\n\t\treturn regexPunycode.test(string)\n\t\t\t? decode(string.slice(4).toLowerCase())\n\t\t\t: string;\n\t});\n};\n\n/**\n * Converts a Unicode string representing a domain name or an email address to\n * Punycode. Only the non-ASCII parts of the domain name will be converted,\n * i.e. it doesn't matter if you call it with a domain that's already in\n * ASCII.\n * @memberOf punycode\n * @param {String} input The domain name or email address to convert, as a\n * Unicode string.\n * @returns {String} The Punycode representation of the given domain name or\n * email address.\n */\nconst toASCII = function(input) {\n\treturn mapDomain(input, function(string) {\n\t\treturn regexNonASCII.test(string)\n\t\t\t? 'xn--' + encode(string)\n\t\t\t: string;\n\t});\n};\n\n/*--------------------------------------------------------------------------*/\n\n/** Define the public API */\nconst punycode = {\n\t/**\n\t * A string representing the current Punycode.js version number.\n\t * @memberOf punycode\n\t * @type String\n\t */\n\t'version': '2.1.0',\n\t/**\n\t * An object of methods to convert from JavaScript's internal character\n\t * representation (UCS-2) to Unicode code points, and back.\n\t * @see \n\t * @memberOf punycode\n\t * @type Object\n\t */\n\t'ucs2': {\n\t\t'decode': ucs2decode,\n\t\t'encode': ucs2encode\n\t},\n\t'decode': decode,\n\t'encode': encode,\n\t'toASCII': toASCII,\n\t'toUnicode': toUnicode\n};\n\nexport default punycode;\n","import { URIRegExps } from \"./uri\";\nimport { buildExps } from \"./regexps-uri\";\n\nexport default buildExps(true);\n","import { URIRegExps } from \"./uri\";\nimport { merge, subexp } from \"./util\";\n\nexport function buildExps(isIRI:boolean):URIRegExps {\n\tconst\n\t\tALPHA$$ = \"[A-Za-z]\",\n\t\tCR$ = \"[\\\\x0D]\",\n\t\tDIGIT$$ = \"[0-9]\",\n\t\tDQUOTE$$ = \"[\\\\x22]\",\n\t\tHEXDIG$$ = merge(DIGIT$$, \"[A-Fa-f]\"), //case-insensitive\n\t\tLF$$ = \"[\\\\x0A]\",\n\t\tSP$$ = \"[\\\\x20]\",\n\t\tPCT_ENCODED$ = subexp(subexp(\"%[EFef]\" + HEXDIG$$ + \"%\" + HEXDIG$$ + HEXDIG$$ + \"%\" + HEXDIG$$ + HEXDIG$$) + \"|\" + subexp(\"%[89A-Fa-f]\" + HEXDIG$$ + \"%\" + HEXDIG$$ + HEXDIG$$) + \"|\" + subexp(\"%\" + HEXDIG$$ + HEXDIG$$)), //expanded\n\t\tGEN_DELIMS$$ = \"[\\\\:\\\\/\\\\?\\\\#\\\\[\\\\]\\\\@]\",\n\t\tSUB_DELIMS$$ = \"[\\\\!\\\\$\\\\&\\\\'\\\\(\\\\)\\\\*\\\\+\\\\,\\\\;\\\\=]\",\n\t\tRESERVED$$ = merge(GEN_DELIMS$$, SUB_DELIMS$$),\n\t\tUCSCHAR$$ = isIRI ? \"[\\\\xA0-\\\\u200D\\\\u2010-\\\\u2029\\\\u202F-\\\\uD7FF\\\\uF900-\\\\uFDCF\\\\uFDF0-\\\\uFFEF]\" : \"[]\", //subset, excludes bidi control characters\n\t\tIPRIVATE$$ = isIRI ? \"[\\\\uE000-\\\\uF8FF]\" : \"[]\", //subset\n\t\tUNRESERVED$$ = merge(ALPHA$$, DIGIT$$, \"[\\\\-\\\\.\\\\_\\\\~]\", UCSCHAR$$),\n\t\tSCHEME$ = subexp(ALPHA$$ + merge(ALPHA$$, DIGIT$$, \"[\\\\+\\\\-\\\\.]\") + \"*\"),\n\t\tUSERINFO$ = subexp(subexp(PCT_ENCODED$ + \"|\" + merge(UNRESERVED$$, SUB_DELIMS$$, \"[\\\\:]\")) + \"*\"),\n\t\tDEC_OCTET$ = subexp(subexp(\"25[0-5]\") + \"|\" + subexp(\"2[0-4]\" + DIGIT$$) + \"|\" + subexp(\"1\" + DIGIT$$ + DIGIT$$) + \"|\" + subexp(\"[1-9]\" + DIGIT$$) + \"|\" + DIGIT$$),\n\t\tDEC_OCTET_RELAXED$ = subexp(subexp(\"25[0-5]\") + \"|\" + subexp(\"2[0-4]\" + DIGIT$$) + \"|\" + subexp(\"1\" + DIGIT$$ + DIGIT$$) + \"|\" + subexp(\"0?[1-9]\" + DIGIT$$) + \"|0?0?\" + DIGIT$$), //relaxed parsing rules\n\t\tIPV4ADDRESS$ = subexp(DEC_OCTET_RELAXED$ + \"\\\\.\" + DEC_OCTET_RELAXED$ + \"\\\\.\" + DEC_OCTET_RELAXED$ + \"\\\\.\" + DEC_OCTET_RELAXED$),\n\t\tH16$ = subexp(HEXDIG$$ + \"{1,4}\"),\n\t\tLS32$ = subexp(subexp(H16$ + \"\\\\:\" + H16$) + \"|\" + IPV4ADDRESS$),\n\t\tIPV6ADDRESS1$ = subexp( subexp(H16$ + \"\\\\:\") + \"{6}\" + LS32$), // 6( h16 \":\" ) ls32\n\t\tIPV6ADDRESS2$ = subexp( \"\\\\:\\\\:\" + subexp(H16$ + \"\\\\:\") + \"{5}\" + LS32$), // \"::\" 5( h16 \":\" ) ls32\n\t\tIPV6ADDRESS3$ = subexp(subexp( H16$) + \"?\\\\:\\\\:\" + subexp(H16$ + \"\\\\:\") + \"{4}\" + LS32$), //[ h16 ] \"::\" 4( h16 \":\" ) ls32\n\t\tIPV6ADDRESS4$ = subexp(subexp(subexp(H16$ + \"\\\\:\") + \"{0,1}\" + H16$) + \"?\\\\:\\\\:\" + subexp(H16$ + \"\\\\:\") + \"{3}\" + LS32$), //[ *1( h16 \":\" ) h16 ] \"::\" 3( h16 \":\" ) ls32\n\t\tIPV6ADDRESS5$ = subexp(subexp(subexp(H16$ + \"\\\\:\") + \"{0,2}\" + H16$) + \"?\\\\:\\\\:\" + subexp(H16$ + \"\\\\:\") + \"{2}\" + LS32$), //[ *2( h16 \":\" ) h16 ] \"::\" 2( h16 \":\" ) ls32\n\t\tIPV6ADDRESS6$ = subexp(subexp(subexp(H16$ + \"\\\\:\") + \"{0,3}\" + H16$) + \"?\\\\:\\\\:\" + H16$ + \"\\\\:\" + LS32$), //[ *3( h16 \":\" ) h16 ] \"::\" h16 \":\" ls32\n\t\tIPV6ADDRESS7$ = subexp(subexp(subexp(H16$ + \"\\\\:\") + \"{0,4}\" + H16$) + \"?\\\\:\\\\:\" + LS32$), //[ *4( h16 \":\" ) h16 ] \"::\" ls32\n\t\tIPV6ADDRESS8$ = subexp(subexp(subexp(H16$ + \"\\\\:\") + \"{0,5}\" + H16$) + \"?\\\\:\\\\:\" + H16$ ), //[ *5( h16 \":\" ) h16 ] \"::\" h16\n\t\tIPV6ADDRESS9$ = subexp(subexp(subexp(H16$ + \"\\\\:\") + \"{0,6}\" + H16$) + \"?\\\\:\\\\:\" ), //[ *6( h16 \":\" ) h16 ] \"::\"\n\t\tIPV6ADDRESS$ = subexp([IPV6ADDRESS1$, IPV6ADDRESS2$, IPV6ADDRESS3$, IPV6ADDRESS4$, IPV6ADDRESS5$, IPV6ADDRESS6$, IPV6ADDRESS7$, IPV6ADDRESS8$, IPV6ADDRESS9$].join(\"|\")),\n\t\tZONEID$ = subexp(subexp(UNRESERVED$$ + \"|\" + PCT_ENCODED$) + \"+\"), //RFC 6874\n\t\tIPV6ADDRZ$ = subexp(IPV6ADDRESS$ + \"\\\\%25\" + ZONEID$), //RFC 6874\n\t\tIPV6ADDRZ_RELAXED$ = subexp(IPV6ADDRESS$ + subexp(\"\\\\%25|\\\\%(?!\" + HEXDIG$$ + \"{2})\") + ZONEID$), //RFC 6874, with relaxed parsing rules\n\t\tIPVFUTURE$ = subexp(\"[vV]\" + HEXDIG$$ + \"+\\\\.\" + merge(UNRESERVED$$, SUB_DELIMS$$, \"[\\\\:]\") + \"+\"),\n\t\tIP_LITERAL$ = subexp(\"\\\\[\" + subexp(IPV6ADDRZ_RELAXED$ + \"|\" + IPV6ADDRESS$ + \"|\" + IPVFUTURE$) + \"\\\\]\"), //RFC 6874\n\t\tREG_NAME$ = subexp(subexp(PCT_ENCODED$ + \"|\" + merge(UNRESERVED$$, SUB_DELIMS$$)) + \"*\"),\n\t\tHOST$ = subexp(IP_LITERAL$ + \"|\" + IPV4ADDRESS$ + \"(?!\" + REG_NAME$ + \")\" + \"|\" + REG_NAME$),\n\t\tPORT$ = subexp(DIGIT$$ + \"*\"),\n\t\tAUTHORITY$ = subexp(subexp(USERINFO$ + \"@\") + \"?\" + HOST$ + subexp(\"\\\\:\" + PORT$) + \"?\"),\n\t\tPCHAR$ = subexp(PCT_ENCODED$ + \"|\" + merge(UNRESERVED$$, SUB_DELIMS$$, \"[\\\\:\\\\@]\")),\n\t\tSEGMENT$ = subexp(PCHAR$ + \"*\"),\n\t\tSEGMENT_NZ$ = subexp(PCHAR$ + \"+\"),\n\t\tSEGMENT_NZ_NC$ = subexp(subexp(PCT_ENCODED$ + \"|\" + merge(UNRESERVED$$, SUB_DELIMS$$, \"[\\\\@]\")) + \"+\"),\n\t\tPATH_ABEMPTY$ = subexp(subexp(\"\\\\/\" + SEGMENT$) + \"*\"),\n\t\tPATH_ABSOLUTE$ = subexp(\"\\\\/\" + subexp(SEGMENT_NZ$ + PATH_ABEMPTY$) + \"?\"), //simplified\n\t\tPATH_NOSCHEME$ = subexp(SEGMENT_NZ_NC$ + PATH_ABEMPTY$), //simplified\n\t\tPATH_ROOTLESS$ = subexp(SEGMENT_NZ$ + PATH_ABEMPTY$), //simplified\n\t\tPATH_EMPTY$ = \"(?!\" + PCHAR$ + \")\",\n\t\tPATH$ = subexp(PATH_ABEMPTY$ + \"|\" + PATH_ABSOLUTE$ + \"|\" + PATH_NOSCHEME$ + \"|\" + PATH_ROOTLESS$ + \"|\" + PATH_EMPTY$),\n\t\tQUERY$ = subexp(subexp(PCHAR$ + \"|\" + merge(\"[\\\\/\\\\?]\", IPRIVATE$$)) + \"*\"),\n\t\tFRAGMENT$ = subexp(subexp(PCHAR$ + \"|[\\\\/\\\\?]\") + \"*\"),\n\t\tHIER_PART$ = subexp(subexp(\"\\\\/\\\\/\" + AUTHORITY$ + PATH_ABEMPTY$) + \"|\" + PATH_ABSOLUTE$ + \"|\" + PATH_ROOTLESS$ + \"|\" + PATH_EMPTY$),\n\t\tURI$ = subexp(SCHEME$ + \"\\\\:\" + HIER_PART$ + subexp(\"\\\\?\" + QUERY$) + \"?\" + subexp(\"\\\\#\" + FRAGMENT$) + \"?\"),\n\t\tRELATIVE_PART$ = subexp(subexp(\"\\\\/\\\\/\" + AUTHORITY$ + PATH_ABEMPTY$) + \"|\" + PATH_ABSOLUTE$ + \"|\" + PATH_NOSCHEME$ + \"|\" + PATH_EMPTY$),\n\t\tRELATIVE$ = subexp(RELATIVE_PART$ + subexp(\"\\\\?\" + QUERY$) + \"?\" + subexp(\"\\\\#\" + FRAGMENT$) + \"?\"),\n\t\tURI_REFERENCE$ = subexp(URI$ + \"|\" + RELATIVE$),\n\t\tABSOLUTE_URI$ = subexp(SCHEME$ + \"\\\\:\" + HIER_PART$ + subexp(\"\\\\?\" + QUERY$) + \"?\"),\n\n\t\tGENERIC_REF$ = \"^(\" + SCHEME$ + \")\\\\:\" + subexp(subexp(\"\\\\/\\\\/(\" + subexp(\"(\" + USERINFO$ + \")@\") + \"?(\" + HOST$ + \")\" + subexp(\"\\\\:(\" + PORT$ + \")\") + \"?)\") + \"?(\" + PATH_ABEMPTY$ + \"|\" + PATH_ABSOLUTE$ + \"|\" + PATH_ROOTLESS$ + \"|\" + PATH_EMPTY$ + \")\") + subexp(\"\\\\?(\" + QUERY$ + \")\") + \"?\" + subexp(\"\\\\#(\" + FRAGMENT$ + \")\") + \"?$\",\n\t\tRELATIVE_REF$ = \"^(){0}\" + subexp(subexp(\"\\\\/\\\\/(\" + subexp(\"(\" + USERINFO$ + \")@\") + \"?(\" + HOST$ + \")\" + subexp(\"\\\\:(\" + PORT$ + \")\") + \"?)\") + \"?(\" + PATH_ABEMPTY$ + \"|\" + PATH_ABSOLUTE$ + \"|\" + PATH_NOSCHEME$ + \"|\" + PATH_EMPTY$ + \")\") + subexp(\"\\\\?(\" + QUERY$ + \")\") + \"?\" + subexp(\"\\\\#(\" + FRAGMENT$ + \")\") + \"?$\",\n\t\tABSOLUTE_REF$ = \"^(\" + SCHEME$ + \")\\\\:\" + subexp(subexp(\"\\\\/\\\\/(\" + subexp(\"(\" + USERINFO$ + \")@\") + \"?(\" + HOST$ + \")\" + subexp(\"\\\\:(\" + PORT$ + \")\") + \"?)\") + \"?(\" + PATH_ABEMPTY$ + \"|\" + PATH_ABSOLUTE$ + \"|\" + PATH_ROOTLESS$ + \"|\" + PATH_EMPTY$ + \")\") + subexp(\"\\\\?(\" + QUERY$ + \")\") + \"?$\",\n\t\tSAMEDOC_REF$ = \"^\" + subexp(\"\\\\#(\" + FRAGMENT$ + \")\") + \"?$\",\n\t\tAUTHORITY_REF$ = \"^\" + subexp(\"(\" + USERINFO$ + \")@\") + \"?(\" + HOST$ + \")\" + subexp(\"\\\\:(\" + PORT$ + \")\") + \"?$\"\n\t;\n\n\treturn {\n\t\tNOT_SCHEME : new RegExp(merge(\"[^]\", ALPHA$$, DIGIT$$, \"[\\\\+\\\\-\\\\.]\"), \"g\"),\n\t\tNOT_USERINFO : new RegExp(merge(\"[^\\\\%\\\\:]\", UNRESERVED$$, SUB_DELIMS$$), \"g\"),\n\t\tNOT_HOST : new RegExp(merge(\"[^\\\\%\\\\[\\\\]\\\\:]\", UNRESERVED$$, SUB_DELIMS$$), \"g\"),\n\t\tNOT_PATH : new RegExp(merge(\"[^\\\\%\\\\/\\\\:\\\\@]\", UNRESERVED$$, SUB_DELIMS$$), \"g\"),\n\t\tNOT_PATH_NOSCHEME : new RegExp(merge(\"[^\\\\%\\\\/\\\\@]\", UNRESERVED$$, SUB_DELIMS$$), \"g\"),\n\t\tNOT_QUERY : new RegExp(merge(\"[^\\\\%]\", UNRESERVED$$, SUB_DELIMS$$, \"[\\\\:\\\\@\\\\/\\\\?]\", IPRIVATE$$), \"g\"),\n\t\tNOT_FRAGMENT : new RegExp(merge(\"[^\\\\%]\", UNRESERVED$$, SUB_DELIMS$$, \"[\\\\:\\\\@\\\\/\\\\?]\"), \"g\"),\n\t\tESCAPE : new RegExp(merge(\"[^]\", UNRESERVED$$, SUB_DELIMS$$), \"g\"),\n\t\tUNRESERVED : new RegExp(UNRESERVED$$, \"g\"),\n\t\tOTHER_CHARS : new RegExp(merge(\"[^\\\\%]\", UNRESERVED$$, RESERVED$$), \"g\"),\n\t\tPCT_ENCODED : new RegExp(PCT_ENCODED$, \"g\"),\n\t\tIPV4ADDRESS : new RegExp(\"^(\" + IPV4ADDRESS$ + \")$\"),\n\t\tIPV6ADDRESS : new RegExp(\"^\\\\[?(\" + IPV6ADDRESS$ + \")\" + subexp(subexp(\"\\\\%25|\\\\%(?!\" + HEXDIG$$ + \"{2})\") + \"(\" + ZONEID$ + \")\") + \"?\\\\]?$\") //RFC 6874, with relaxed parsing rules\n\t};\n}\n\nexport default buildExps(false);\n","export function merge(...sets:Array):string {\n\tif (sets.length > 1) {\n\t\tsets[0] = sets[0].slice(0, -1);\n\t\tconst xl = sets.length - 1;\n\t\tfor (let x = 1; x < xl; ++x) {\n\t\t\tsets[x] = sets[x].slice(1, -1);\n\t\t}\n\t\tsets[xl] = sets[xl].slice(1);\n\t\treturn sets.join('');\n\t} else {\n\t\treturn sets[0];\n\t}\n}\n\nexport function subexp(str:string):string {\n\treturn \"(?:\" + str + \")\";\n}\n\nexport function typeOf(o:any):string {\n\treturn o === undefined ? \"undefined\" : (o === null ? \"null\" : Object.prototype.toString.call(o).split(\" \").pop().split(\"]\").shift().toLowerCase());\n}\n\nexport function toUpperCase(str:string):string {\n\treturn str.toUpperCase();\n}\n\nexport function toArray(obj:any):Array {\n\treturn obj !== undefined && obj !== null ? (obj instanceof Array ? obj : (typeof obj.length !== \"number\" || obj.split || obj.setInterval || obj.call ? [obj] : Array.prototype.slice.call(obj))) : [];\n}\n\n\nexport function assign(target: object, source: any): any {\n\tconst obj = target as any;\n\tif (source) {\n\t\tfor (const key in source) {\n\t\t\tobj[key] = source[key];\n\t\t}\n\t}\n\treturn obj;\n}"],"names":["SCHEMES","uuid","scheme","urn","mailto","https","http","urnComponents","nss","uuidComponents","toLowerCase","options","error","tolerant","match","UUID","undefined","handler","uriComponents","path","nid","schemeHandler","serialize","urnScheme","parse","matches","components","URN_PARSE","query","fields","join","length","push","name","replace","PCT_ENCODED","decodeUnreserved","toUpperCase","NOT_HFNAME","pctEncChar","headers","NOT_HFVALUE","O","mailtoComponents","body","subject","to","x","localPart","domain","iri","e","punycode","toASCII","unescapeComponent","toUnicode","toAddr","slice","atIdx","NOT_LOCAL_PART","lastIndexOf","String","xl","toArray","addr","unicodeSupport","split","unknownHeaders","hfield","toAddrs","hfields","decStr","UNRESERVED","str","pctDecChars","RegExp","merge","UNRESERVED$$","SOME_DELIMS$$","ATEXT$$","VCHAR$$","PCT_ENCODED$","QTEXT$$","subexp","HEXDIG$$","isIRI","domainHost","port","host","toString","URI_PROTOCOL","IRI_PROTOCOL","ESCAPE","escapeComponent","uriA","uriB","typeOf","equal","uri","normalize","resolveComponents","baseURI","schemelessOptions","relativeURI","assign","resolve","target","fragment","relative","base","userinfo","removeDotSegments","charAt","skipNormalization","uriTokens","s","authority","absolutePath","reference","_recomposeAuthority","protocol","IPV6ADDRESS","test","output","Error","input","im","RDS5","pop","RDS3","RDS2","RDS1","$1","$2","_normalizeIPv6","_normalizeIPv4","_","uriString","isNaN","indexOf","parseInt","NO_MATCH_IS_UNDEFINED","URI_PARSE","newHost","zone","newFirst","newLast","longestZeroFields","index","b","a","allZeroFields","sort","acc","lastLongest","field","reduce","fieldCount","isLastFieldIPv4Address","firstFields","lastFields","lastFieldsStart","Array","IPV4ADDRESS","last","map","_stripLeadingZeros","first","address","reverse","NOT_FRAGMENT","NOT_QUERY","NOT_PATH","NOT_PATH_NOSCHEME","NOT_HOST","NOT_USERINFO","NOT_SCHEME","_normalizeComponentEncoding","newStr","substr","i","fromCharCode","c","c2","c3","il","chr","charCodeAt","encode","decode","ucs2encode","ucs2decode","regexNonASCII","string","mapDomain","regexPunycode","n","delta","handledCPCount","adapt","handledCPCountPlusOne","basicLength","stringFromCharCode","digitToBasic","q","floor","qMinusT","baseMinusT","t","k","bias","tMin","tMax","currentValue","maxInt","m","inputLength","delimiter","initialBias","initialN","fromCodePoint","splice","out","oldi","w","digit","basicToDigit","basic","j","baseMinusTMin","skew","numPoints","firstTime","damp","flag","codePoint","array","value","extra","counter","result","encoded","labels","fn","regexSeparators","parts","RangeError","errors","type","Math","buildExps","IPV6ADDRESS$","ZONEID$","IPV4ADDRESS$","RESERVED$$","SUB_DELIMS$$","IPRIVATE$$","ALPHA$$","DIGIT$$","AUTHORITY_REF$","USERINFO$","HOST$","PORT$","SAMEDOC_REF$","FRAGMENT$","ABSOLUTE_REF$","SCHEME$","PATH_ABEMPTY$","PATH_ABSOLUTE$","PATH_ROOTLESS$","PATH_EMPTY$","QUERY$","RELATIVE_REF$","PATH_NOSCHEME$","GENERIC_REF$","ABSOLUTE_URI$","HIER_PART$","URI_REFERENCE$","URI$","RELATIVE$","RELATIVE_PART$","AUTHORITY$","PCHAR$","PATH$","SEGMENT_NZ$","SEGMENT_NZ_NC$","SEGMENT$","IP_LITERAL$","REG_NAME$","IPV6ADDRZ_RELAXED$","IPVFUTURE$","IPV6ADDRESS1$","IPV6ADDRESS2$","IPV6ADDRESS3$","IPV6ADDRESS4$","IPV6ADDRESS5$","IPV6ADDRESS6$","IPV6ADDRESS7$","IPV6ADDRESS8$","IPV6ADDRESS9$","H16$","LS32$","DEC_OCTET_RELAXED$","DEC_OCTET$","UCSCHAR$$","GEN_DELIMS$$","SP$$","DQUOTE$$","CR$","obj","key","source","setInterval","call","prototype","o","Object","shift","sets"],"mappings":";;;;;;;AUAA,SAAA4E,KAAA,GAAA;sCAAyBkP,IAAzB;YAAA;;;QACKA,KAAK/R,MAAL,GAAc,CAAlB,EAAqB;aACf,CAAL,IAAU+R,KAAK,CAAL,EAAQrQ,KAAR,CAAc,CAAd,EAAiB,CAAC,CAAlB,C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B,oBAA/C;;eAGMH,cAAP;KAZ0E;eAe/D,mBAAUA,cAAV,EAAyCE,OAAzC,EAAb;YACQJ,gBAAgBE,cAAtB;;sBAEcD,GAAd,GAAoB,CAACC,eAAeR,IAAf,IAAuB,EAAxB,EAA4BS,WAA5B,EAApB;eACOH,aAAP;;CAnBF,CAuBA;;ADhCAP,QAAQM,QAAKJ,MAAb,IAAuBI,OAAvB;AAEA,AACAN,QAAQK,UAAMH,MAAd,IAAwBG,SAAxB;AAEA,AACAL,QAAQI,UAAOF,MAAf,IAAyBE,SAAzB;AAEA,AACAJ,QAAQG,UAAID,MAAZ,IAAsBC,SAAtB;AAEA,AACAH,QAAQC,UAAKC,MAAb,IAAuBD,SAAvB,CAEA;;;;;;;;;;;;;;;;;"} \ No newline at end of file +{"version":3,"file":"uri.all.js","sources":["../../src/index.ts","../../src/schemes/urn-uuid.ts","../../src/schemes/urn.ts","../../src/schemes/mailto.ts","../../src/schemes/wss.ts","../../src/schemes/ws.ts","../../src/schemes/https.ts","../../src/schemes/http.ts","../../src/uri.ts","../../node_modules/punycode/punycode.es6.js","../../src/regexps-iri.ts","../../src/regexps-uri.ts","../../src/util.ts"],"sourcesContent":["import { SCHEMES } from \"./uri\";\n\nimport http from \"./schemes/http\";\nSCHEMES[http.scheme] = http;\n\nimport https from \"./schemes/https\";\nSCHEMES[https.scheme] = https;\n\nimport ws from \"./schemes/ws\";\nSCHEMES[ws.scheme] = ws;\n\nimport wss from \"./schemes/wss\";\nSCHEMES[wss.scheme] = wss;\n\nimport mailto from \"./schemes/mailto\";\nSCHEMES[mailto.scheme] = mailto;\n\nimport urn from \"./schemes/urn\";\nSCHEMES[urn.scheme] = urn;\n\nimport uuid from \"./schemes/urn-uuid\";\nSCHEMES[uuid.scheme] = uuid;\n\nexport * from \"./uri\";\n","import { URISchemeHandler, URIComponents, URIOptions } from \"../uri\";\nimport { URNComponents } from \"./urn\";\nimport { SCHEMES } from \"../uri\";\n\nexport interface UUIDComponents extends URNComponents {\n\tuuid?: string;\n}\n\nconst UUID = /^[0-9A-Fa-f]{8}(?:\\-[0-9A-Fa-f]{4}){3}\\-[0-9A-Fa-f]{12}$/;\nconst UUID_PARSE = /^[0-9A-Fa-f\\-]{36}/;\n\n//RFC 4122\nconst handler:URISchemeHandler = {\n\tscheme : \"urn:uuid\",\n\n\tparse : function (urnComponents:URNComponents, options:URIOptions):UUIDComponents {\n\t\tconst uuidComponents = urnComponents as UUIDComponents;\n\t\tuuidComponents.uuid = uuidComponents.nss;\n\t\tuuidComponents.nss = undefined;\n\n\t\tif (!options.tolerant && (!uuidComponents.uuid || !uuidComponents.uuid.match(UUID))) {\n\t\t\tuuidComponents.error = uuidComponents.error || \"UUID is not valid.\";\n\t\t}\n\n\t\treturn uuidComponents;\n\t},\n\n\tserialize : function (uuidComponents:UUIDComponents, options:URIOptions):URNComponents {\n\t\tconst urnComponents = uuidComponents as URNComponents;\n\t\t//normalize UUID\n\t\turnComponents.nss = (uuidComponents.uuid || \"\").toLowerCase();\n\t\treturn urnComponents;\n\t},\n};\n\nexport default handler;","import { URISchemeHandler, URIComponents, URIOptions } from \"../uri\";\nimport { pctEncChar, SCHEMES } from \"../uri\";\n\nexport interface URNComponents extends URIComponents {\n\tnid?:string;\n\tnss?:string;\n}\n\nexport interface URNOptions extends URIOptions {\n\tnid?:string;\n}\n\nconst NID$ = \"(?:[0-9A-Za-z][0-9A-Za-z\\\\-]{1,31})\";\nconst PCT_ENCODED$ = \"(?:\\\\%[0-9A-Fa-f]{2})\";\nconst TRANS$$ = \"[0-9A-Za-z\\\\(\\\\)\\\\+\\\\,\\\\-\\\\.\\\\:\\\\=\\\\@\\\\;\\\\$\\\\_\\\\!\\\\*\\\\'\\\\/\\\\?\\\\#]\";\nconst NSS$ = \"(?:(?:\" + PCT_ENCODED$ + \"|\" + TRANS$$ + \")+)\";\nconst URN_SCHEME = new RegExp(\"^urn\\\\:(\" + NID$ + \")$\");\nconst URN_PATH = new RegExp(\"^(\" + NID$ + \")\\\\:(\" + NSS$ + \")$\");\nconst URN_PARSE = /^([^\\:]+)\\:(.*)/;\nconst URN_EXCLUDED = /[\\x00-\\x20\\\\\\\"\\&\\<\\>\\[\\]\\^\\`\\{\\|\\}\\~\\x7F-\\xFF]/g;\n\n//RFC 2141\nconst handler:URISchemeHandler = {\n\tscheme : \"urn\",\n\n\tparse : function (components:URIComponents, options:URNOptions):URNComponents {\n\t\tconst matches = components.path && components.path.match(URN_PARSE);\n\t\tlet urnComponents = components as URNComponents;\n\n\t\tif (matches) {\n\t\t\tconst scheme = options.scheme || urnComponents.scheme || \"urn\";\n\t\t\tconst nid = matches[1].toLowerCase();\n\t\t\tconst nss = matches[2];\n\t\t\tconst urnScheme = `${scheme}:${options.nid || nid}`;\n\t\t\tconst schemeHandler = SCHEMES[urnScheme];\n\n\t\t\turnComponents.nid = nid;\n\t\t\turnComponents.nss = nss;\n\t\t\turnComponents.path = undefined;\n\n\t\t\tif (schemeHandler) {\n\t\t\t\turnComponents = schemeHandler.parse(urnComponents, options) as URNComponents;\n\t\t\t}\n\t\t} else {\n\t\t\turnComponents.error = urnComponents.error || \"URN can not be parsed.\";\n\t\t}\n\n\t\treturn urnComponents;\n\t},\n\n\tserialize : function (urnComponents:URNComponents, options:URNOptions):URIComponents {\n\t\tconst scheme = options.scheme || urnComponents.scheme || \"urn\";\n\t\tconst nid = urnComponents.nid;\n\t\tconst urnScheme = `${scheme}:${options.nid || nid}`;\n\t\tconst schemeHandler = SCHEMES[urnScheme];\n\n\t\tif (schemeHandler) {\n\t\t\turnComponents = schemeHandler.serialize(urnComponents, options) as URNComponents;\n\t\t}\n\n\t\tconst uriComponents = urnComponents as URIComponents;\n\t\tconst nss = urnComponents.nss;\n\t\turiComponents.path = `${nid || options.nid}:${nss}`;\n\n\t\treturn uriComponents;\n\t},\n};\n\nexport default handler;","import { URISchemeHandler, URIComponents, URIOptions } from \"../uri\";\nimport { pctEncChar, pctDecChars, unescapeComponent } from \"../uri\";\nimport punycode from \"punycode\";\nimport { merge, subexp, toUpperCase, toArray } from \"../util\";\n\nexport interface MailtoHeaders {\n\t[hfname:string]:string\n}\n\nexport interface MailtoComponents extends URIComponents {\n\tto:Array,\n\theaders?:MailtoHeaders,\n\tsubject?:string,\n\tbody?:string\n}\n\nconst O:MailtoHeaders = {};\nconst isIRI = true;\n\n//RFC 3986\nconst UNRESERVED$$ = \"[A-Za-z0-9\\\\-\\\\.\\\\_\\\\~\" + (isIRI ? \"\\\\xA0-\\\\u200D\\\\u2010-\\\\u2029\\\\u202F-\\\\uD7FF\\\\uF900-\\\\uFDCF\\\\uFDF0-\\\\uFFEF\" : \"\") + \"]\";\nconst HEXDIG$$ = \"[0-9A-Fa-f]\"; //case-insensitive\nconst PCT_ENCODED$ = subexp(subexp(\"%[EFef]\" + HEXDIG$$ + \"%\" + HEXDIG$$ + HEXDIG$$ + \"%\" + HEXDIG$$ + HEXDIG$$) + \"|\" + subexp(\"%[89A-Fa-f]\" + HEXDIG$$ + \"%\" + HEXDIG$$ + HEXDIG$$) + \"|\" + subexp(\"%\" + HEXDIG$$ + HEXDIG$$)); //expanded\n\n//RFC 5322, except these symbols as per RFC 6068: @ : / ? # [ ] & ; =\n//const ATEXT$$ = \"[A-Za-z0-9\\\\!\\\\#\\\\$\\\\%\\\\&\\\\'\\\\*\\\\+\\\\-\\\\/\\\\=\\\\?\\\\^\\\\_\\\\`\\\\{\\\\|\\\\}\\\\~]\";\n//const WSP$$ = \"[\\\\x20\\\\x09]\";\n//const OBS_QTEXT$$ = \"[\\\\x01-\\\\x08\\\\x0B\\\\x0C\\\\x0E-\\\\x1F\\\\x7F]\"; //(%d1-8 / %d11-12 / %d14-31 / %d127)\n//const QTEXT$$ = merge(\"[\\\\x21\\\\x23-\\\\x5B\\\\x5D-\\\\x7E]\", OBS_QTEXT$$); //%d33 / %d35-91 / %d93-126 / obs-qtext\n//const VCHAR$$ = \"[\\\\x21-\\\\x7E]\";\n//const WSP$$ = \"[\\\\x20\\\\x09]\";\n//const OBS_QP$ = subexp(\"\\\\\\\\\" + merge(\"[\\\\x00\\\\x0D\\\\x0A]\", OBS_QTEXT$$)); //%d0 / CR / LF / obs-qtext\n//const FWS$ = subexp(subexp(WSP$$ + \"*\" + \"\\\\x0D\\\\x0A\") + \"?\" + WSP$$ + \"+\");\n//const QUOTED_PAIR$ = subexp(subexp(\"\\\\\\\\\" + subexp(VCHAR$$ + \"|\" + WSP$$)) + \"|\" + OBS_QP$);\n//const QUOTED_STRING$ = subexp('\\\\\"' + subexp(FWS$ + \"?\" + QCONTENT$) + \"*\" + FWS$ + \"?\" + '\\\\\"');\nconst ATEXT$$ = \"[A-Za-z0-9\\\\!\\\\$\\\\%\\\\'\\\\*\\\\+\\\\-\\\\^\\\\_\\\\`\\\\{\\\\|\\\\}\\\\~]\";\nconst QTEXT$$ = \"[\\\\!\\\\$\\\\%\\\\'\\\\(\\\\)\\\\*\\\\+\\\\,\\\\-\\\\.0-9\\\\<\\\\>A-Z\\\\x5E-\\\\x7E]\";\nconst VCHAR$$ = merge(QTEXT$$, \"[\\\\\\\"\\\\\\\\]\");\nconst DOT_ATOM_TEXT$ = subexp(ATEXT$$ + \"+\" + subexp(\"\\\\.\" + ATEXT$$ + \"+\") + \"*\");\nconst QUOTED_PAIR$ = subexp(\"\\\\\\\\\" + VCHAR$$);\nconst QCONTENT$ = subexp(QTEXT$$ + \"|\" + QUOTED_PAIR$);\nconst QUOTED_STRING$ = subexp('\\\\\"' + QCONTENT$ + \"*\" + '\\\\\"');\n\n//RFC 6068\nconst DTEXT_NO_OBS$$ = \"[\\\\x21-\\\\x5A\\\\x5E-\\\\x7E]\"; //%d33-90 / %d94-126\nconst SOME_DELIMS$$ = \"[\\\\!\\\\$\\\\'\\\\(\\\\)\\\\*\\\\+\\\\,\\\\;\\\\:\\\\@]\";\nconst QCHAR$ = subexp(UNRESERVED$$ + \"|\" + PCT_ENCODED$ + \"|\" + SOME_DELIMS$$);\nconst DOMAIN$ = subexp(DOT_ATOM_TEXT$ + \"|\" + \"\\\\[\" + DTEXT_NO_OBS$$ + \"*\" + \"\\\\]\");\nconst LOCAL_PART$ = subexp(DOT_ATOM_TEXT$ + \"|\" + QUOTED_STRING$);\nconst ADDR_SPEC$ = subexp(LOCAL_PART$ + \"\\\\@\" + DOMAIN$);\nconst TO$ = subexp(ADDR_SPEC$ + subexp(\"\\\\,\" + ADDR_SPEC$) + \"*\");\nconst HFNAME$ = subexp(QCHAR$ + \"*\");\nconst HFVALUE$ = HFNAME$;\nconst HFIELD$ = subexp(HFNAME$ + \"\\\\=\" + HFVALUE$);\nconst HFIELDS2$ = subexp(HFIELD$ + subexp(\"\\\\&\" + HFIELD$) + \"*\");\nconst HFIELDS$ = subexp(\"\\\\?\" + HFIELDS2$);\nconst MAILTO_URI = new RegExp(\"^mailto\\\\:\" + TO$ + \"?\" + HFIELDS$ + \"?$\");\n\nconst UNRESERVED = new RegExp(UNRESERVED$$, \"g\");\nconst PCT_ENCODED = new RegExp(PCT_ENCODED$, \"g\");\nconst NOT_LOCAL_PART = new RegExp(merge(\"[^]\", ATEXT$$, \"[\\\\.]\", '[\\\\\"]', VCHAR$$), \"g\");\nconst NOT_DOMAIN = new RegExp(merge(\"[^]\", ATEXT$$, \"[\\\\.]\", \"[\\\\[]\", DTEXT_NO_OBS$$, \"[\\\\]]\"), \"g\");\nconst NOT_HFNAME = new RegExp(merge(\"[^]\", UNRESERVED$$, SOME_DELIMS$$), \"g\");\nconst NOT_HFVALUE = NOT_HFNAME;\nconst TO = new RegExp(\"^\" + TO$ + \"$\");\nconst HFIELDS = new RegExp(\"^\" + HFIELDS2$ + \"$\");\n\nfunction decodeUnreserved(str:string):string {\n\tconst decStr = pctDecChars(str);\n\treturn (!decStr.match(UNRESERVED) ? str : decStr);\n}\n\nconst handler:URISchemeHandler = {\n\tscheme : \"mailto\",\n\n\tparse : function (components:URIComponents, options:URIOptions):MailtoComponents {\n\t\tconst mailtoComponents = components as MailtoComponents;\n\t\tconst to = mailtoComponents.to = (mailtoComponents.path ? mailtoComponents.path.split(\",\") : []);\n\t\tmailtoComponents.path = undefined;\n\n\t\tif (mailtoComponents.query) {\n\t\t\tlet unknownHeaders = false\n\t\t\tconst headers:MailtoHeaders = {};\n\t\t\tconst hfields = mailtoComponents.query.split(\"&\");\n\n\t\t\tfor (let x = 0, xl = hfields.length; x < xl; ++x) {\n\t\t\t\tconst hfield = hfields[x].split(\"=\");\n\n\t\t\t\tswitch (hfield[0]) {\n\t\t\t\t\tcase \"to\":\n\t\t\t\t\t\tconst toAddrs = hfield[1].split(\",\");\n\t\t\t\t\t\tfor (let x = 0, xl = toAddrs.length; x < xl; ++x) {\n\t\t\t\t\t\t\tto.push(toAddrs[x]);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"subject\":\n\t\t\t\t\t\tmailtoComponents.subject = unescapeComponent(hfield[1], options);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"body\":\n\t\t\t\t\t\tmailtoComponents.body = unescapeComponent(hfield[1], options);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tdefault:\n\t\t\t\t\t\tunknownHeaders = true;\n\t\t\t\t\t\theaders[unescapeComponent(hfield[0], options)] = unescapeComponent(hfield[1], options);\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (unknownHeaders) mailtoComponents.headers = headers;\n\t\t}\n\n\t\tmailtoComponents.query = undefined;\n\n\t\tfor (let x = 0, xl = to.length; x < xl; ++x) {\n\t\t\tconst addr = to[x].split(\"@\");\n\n\t\t\taddr[0] = unescapeComponent(addr[0]);\n\n\t\t\tif (!options.unicodeSupport) {\n\t\t\t\t//convert Unicode IDN -> ASCII IDN\n\t\t\t\ttry {\n\t\t\t\t\taddr[1] = punycode.toASCII(unescapeComponent(addr[1], options).toLowerCase());\n\t\t\t\t} catch (e) {\n\t\t\t\t\tmailtoComponents.error = mailtoComponents.error || \"Email address's domain name can not be converted to ASCII via punycode: \" + e;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\taddr[1] = unescapeComponent(addr[1], options).toLowerCase();\n\t\t\t}\n\n\t\t\tto[x] = addr.join(\"@\");\n\t\t}\n\n\t\treturn mailtoComponents;\n\t},\n\n\tserialize : function (mailtoComponents:MailtoComponents, options:URIOptions):URIComponents {\n\t\tconst components = mailtoComponents as URIComponents;\n\t\tconst to = toArray(mailtoComponents.to);\n\t\tif (to) {\n\t\t\tfor (let x = 0, xl = to.length; x < xl; ++x) {\n\t\t\t\tconst toAddr = String(to[x]);\n\t\t\t\tconst atIdx = toAddr.lastIndexOf(\"@\");\n\t\t\t\tconst localPart = (toAddr.slice(0, atIdx)).replace(PCT_ENCODED, decodeUnreserved).replace(PCT_ENCODED, toUpperCase).replace(NOT_LOCAL_PART, pctEncChar);\n\t\t\t\tlet domain = toAddr.slice(atIdx + 1);\n\n\t\t\t\t//convert IDN via punycode\n\t\t\t\ttry {\n\t\t\t\t\tdomain = (!options.iri ? punycode.toASCII(unescapeComponent(domain, options).toLowerCase()) : punycode.toUnicode(domain));\n\t\t\t\t} catch (e) {\n\t\t\t\t\tcomponents.error = components.error || \"Email address's domain name can not be converted to \" + (!options.iri ? \"ASCII\" : \"Unicode\") + \" via punycode: \" + e;\n\t\t\t\t}\n\n\t\t\t\tto[x] = localPart + \"@\" + domain;\n\t\t\t}\n\n\t\t\tcomponents.path = to.join(\",\");\n\t\t}\n\n\t\tconst headers = mailtoComponents.headers = mailtoComponents.headers || {};\n\n\t\tif (mailtoComponents.subject) headers[\"subject\"] = mailtoComponents.subject;\n\t\tif (mailtoComponents.body) headers[\"body\"] = mailtoComponents.body;\n\n\t\tconst fields = [];\n\t\tfor (const name in headers) {\n\t\t\tif (headers[name] !== O[name]) {\n\t\t\t\tfields.push(\n\t\t\t\t\tname.replace(PCT_ENCODED, decodeUnreserved).replace(PCT_ENCODED, toUpperCase).replace(NOT_HFNAME, pctEncChar) +\n\t\t\t\t\t\"=\" +\n\t\t\t\t\theaders[name].replace(PCT_ENCODED, decodeUnreserved).replace(PCT_ENCODED, toUpperCase).replace(NOT_HFVALUE, pctEncChar)\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\t\tif (fields.length) {\n\t\t\tcomponents.query = fields.join(\"&\");\n\t\t}\n\n\t\treturn components;\n\t}\n}\n\nexport default handler;","import { URISchemeHandler, URIComponents, URIOptions } from \"../uri\";\nimport ws from \"./ws\";\n\nconst handler:URISchemeHandler = {\n\tscheme : \"wss\",\n\tdomainHost : ws.domainHost,\n\tparse : ws.parse,\n\tserialize : ws.serialize\n}\n\nexport default handler;","import { URISchemeHandler, URIComponents, URIOptions } from \"../uri\";\n\nexport interface WSComponents extends URIComponents {\n\tresourceName?: string;\n\tsecure?: boolean;\n}\n\nfunction isSecure(wsComponents:WSComponents):boolean {\n\treturn typeof wsComponents.secure === 'boolean' ? wsComponents.secure : String(wsComponents.scheme).toLowerCase() === \"wss\";\n}\n\n//RFC 6455\nconst handler:URISchemeHandler = {\n\tscheme : \"ws\",\n\n\tdomainHost : true,\n\n\tparse : function (components:URIComponents, options:URIOptions):WSComponents {\n\t\tconst wsComponents = components as WSComponents;\n\n\t\t//indicate if the secure flag is set\n\t\twsComponents.secure = isSecure(wsComponents);\n\n\t\t//construct resouce name\n\t\twsComponents.resourceName = (wsComponents.path || '/') + (wsComponents.query ? '?' + wsComponents.query : '');\n\t\twsComponents.path = undefined;\n\t\twsComponents.query = undefined;\n\n\t\treturn wsComponents;\n\t},\n\n\tserialize : function (wsComponents:WSComponents, options:URIOptions):URIComponents {\n\t\t//normalize the default port\n\t\tif (wsComponents.port === (isSecure(wsComponents) ? 443 : 80) || wsComponents.port === \"\") {\n\t\t\twsComponents.port = undefined;\n\t\t}\n\n\t\t//ensure scheme matches secure flag\n\t\tif (typeof wsComponents.secure === 'boolean') {\n\t\t\twsComponents.scheme = (wsComponents.secure ? 'wss' : 'ws');\n\t\t\twsComponents.secure = undefined;\n\t\t}\n\n\t\t//reconstruct path from resource name\n\t\tif (wsComponents.resourceName) {\n\t\t\tconst [path, query] = wsComponents.resourceName.split('?');\n\t\t\twsComponents.path = (path && path !== '/' ? path : undefined);\n\t\t\twsComponents.query = query;\n\t\t\twsComponents.resourceName = undefined;\n\t\t}\n\n\t\t//forbid fragment component\n\t\twsComponents.fragment = undefined;\n\n\t\treturn wsComponents;\n\t}\n};\n\nexport default handler;","import { URISchemeHandler, URIComponents, URIOptions } from \"../uri\";\nimport http from \"./http\";\n\nconst handler:URISchemeHandler = {\n\tscheme : \"https\",\n\tdomainHost : http.domainHost,\n\tparse : http.parse,\n\tserialize : http.serialize\n}\n\nexport default handler;","import { URISchemeHandler, URIComponents, URIOptions } from \"../uri\";\n\nconst handler:URISchemeHandler = {\n\tscheme : \"http\",\n\n\tdomainHost : true,\n\n\tparse : function (components:URIComponents, options:URIOptions):URIComponents {\n\t\t//report missing host\n\t\tif (!components.host) {\n\t\t\tcomponents.error = components.error || \"HTTP URIs must have a host.\";\n\t\t}\n\n\t\treturn components;\n\t},\n\n\tserialize : function (components:URIComponents, options:URIOptions):URIComponents {\n\t\tconst secure = String(components.scheme).toLowerCase() === \"https\";\n\n\t\t//normalize the default port\n\t\tif (components.port === (secure ? 443 : 80) || components.port === \"\") {\n\t\t\tcomponents.port = undefined;\n\t\t}\n\t\t\n\t\t//normalize the empty path\n\t\tif (!components.path) {\n\t\t\tcomponents.path = \"/\";\n\t\t}\n\n\t\t//NOTE: We do not parse query strings for HTTP URIs\n\t\t//as WWW Form Url Encoded query strings are part of the HTML4+ spec,\n\t\t//and not the HTTP spec.\n\n\t\treturn components;\n\t}\n};\n\nexport default handler;","/**\n * URI.js\n *\n * @fileoverview An RFC 3986 compliant, scheme extendable URI parsing/validating/resolving library for JavaScript.\n * @author Gary Court\n * @see http://github.com/garycourt/uri-js\n */\n\n/**\n * Copyright 2011 Gary Court. All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without modification, are\n * permitted provided that the following conditions are met:\n *\n * 1. Redistributions of source code must retain the above copyright notice, this list of\n * conditions and the following disclaimer.\n *\n * 2. Redistributions in binary form must reproduce the above copyright notice, this list\n * of conditions and the following disclaimer in the documentation and/or other materials\n * provided with the distribution.\n *\n * THIS SOFTWARE IS PROVIDED BY GARY COURT ``AS IS'' AND ANY EXPRESS OR IMPLIED\n * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL GARY COURT OR\n * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR\n * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON\n * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF\n * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n *\n * The views and conclusions contained in the software and documentation are those of the\n * authors and should not be interpreted as representing official policies, either expressed\n * or implied, of Gary Court.\n */\n\nimport URI_PROTOCOL from \"./regexps-uri\";\nimport IRI_PROTOCOL from \"./regexps-iri\";\nimport punycode from \"punycode\";\nimport { toUpperCase, typeOf, assign } from \"./util\";\n\nexport interface URIComponents {\n\tscheme?:string;\n\tuserinfo?:string;\n\thost?:string;\n\tport?:number|string;\n\tpath?:string;\n\tquery?:string;\n\tfragment?:string;\n\treference?:string;\n\terror?:string;\n}\n\nexport interface URIOptions {\n\tscheme?:string;\n\treference?:string;\n\ttolerant?:boolean;\n\tabsolutePath?:boolean;\n\tiri?:boolean;\n\tunicodeSupport?:boolean;\n\tdomainHost?:boolean;\n}\n\nexport interface URISchemeHandler {\n\tscheme:string;\n\tparse(components:ParentComponents, options:Options):Components;\n\tserialize(components:Components, options:Options):ParentComponents;\n\tunicodeSupport?:boolean;\n\tdomainHost?:boolean;\n\tabsolutePath?:boolean;\n}\n\nexport interface URIRegExps {\n\tNOT_SCHEME : RegExp,\n\tNOT_USERINFO : RegExp,\n\tNOT_HOST : RegExp,\n\tNOT_PATH : RegExp,\n\tNOT_PATH_NOSCHEME : RegExp,\n\tNOT_QUERY : RegExp,\n\tNOT_FRAGMENT : RegExp,\n\tESCAPE : RegExp,\n\tUNRESERVED : RegExp,\n\tOTHER_CHARS : RegExp,\n\tPCT_ENCODED : RegExp,\n\tIPV4ADDRESS : RegExp,\n\tIPV6ADDRESS : RegExp,\n}\n\nexport const SCHEMES:{[scheme:string]:URISchemeHandler} = {};\n\nexport function pctEncChar(chr:string):string {\n\tconst c = chr.charCodeAt(0);\n\tlet e:string;\n\n\tif (c < 16) e = \"%0\" + c.toString(16).toUpperCase();\n\telse if (c < 128) e = \"%\" + c.toString(16).toUpperCase();\n\telse if (c < 2048) e = \"%\" + ((c >> 6) | 192).toString(16).toUpperCase() + \"%\" + ((c & 63) | 128).toString(16).toUpperCase();\n\telse e = \"%\" + ((c >> 12) | 224).toString(16).toUpperCase() + \"%\" + (((c >> 6) & 63) | 128).toString(16).toUpperCase() + \"%\" + ((c & 63) | 128).toString(16).toUpperCase();\n\n\treturn e;\n}\n\nexport function pctDecChars(str:string):string {\n\tlet newStr = \"\";\n\tlet i = 0;\n\tconst il = str.length;\n\n\twhile (i < il) {\n\t\tconst c = parseInt(str.substr(i + 1, 2), 16);\n\n\t\tif (c < 128) {\n\t\t\tnewStr += String.fromCharCode(c);\n\t\t\ti += 3;\n\t\t}\n\t\telse if (c >= 194 && c < 224) {\n\t\t\tif ((il - i) >= 6) {\n\t\t\t\tconst c2 = parseInt(str.substr(i + 4, 2), 16);\n\t\t\t\tnewStr += String.fromCharCode(((c & 31) << 6) | (c2 & 63));\n\t\t\t} else {\n\t\t\t\tnewStr += str.substr(i, 6);\n\t\t\t}\n\t\t\ti += 6;\n\t\t}\n\t\telse if (c >= 224) {\n\t\t\tif ((il - i) >= 9) {\n\t\t\t\tconst c2 = parseInt(str.substr(i + 4, 2), 16);\n\t\t\t\tconst c3 = parseInt(str.substr(i + 7, 2), 16);\n\t\t\t\tnewStr += String.fromCharCode(((c & 15) << 12) | ((c2 & 63) << 6) | (c3 & 63));\n\t\t\t} else {\n\t\t\t\tnewStr += str.substr(i, 9);\n\t\t\t}\n\t\t\ti += 9;\n\t\t}\n\t\telse {\n\t\t\tnewStr += str.substr(i, 3);\n\t\t\ti += 3;\n\t\t}\n\t}\n\n\treturn newStr;\n}\n\nfunction _normalizeComponentEncoding(components:URIComponents, protocol:URIRegExps) {\n\tfunction decodeUnreserved(str:string):string {\n\t\tconst decStr = pctDecChars(str);\n\t\treturn (!decStr.match(protocol.UNRESERVED) ? str : decStr);\n\t}\n\n\tif (components.scheme) components.scheme = String(components.scheme).replace(protocol.PCT_ENCODED, decodeUnreserved).toLowerCase().replace(protocol.NOT_SCHEME, \"\");\n\tif (components.userinfo !== undefined) components.userinfo = String(components.userinfo).replace(protocol.PCT_ENCODED, decodeUnreserved).replace(protocol.NOT_USERINFO, pctEncChar).replace(protocol.PCT_ENCODED, toUpperCase);\n\tif (components.host !== undefined) components.host = String(components.host).replace(protocol.PCT_ENCODED, decodeUnreserved).toLowerCase().replace(protocol.NOT_HOST, pctEncChar).replace(protocol.PCT_ENCODED, toUpperCase);\n\tif (components.path !== undefined) components.path = String(components.path).replace(protocol.PCT_ENCODED, decodeUnreserved).replace((components.scheme ? protocol.NOT_PATH : protocol.NOT_PATH_NOSCHEME), pctEncChar).replace(protocol.PCT_ENCODED, toUpperCase);\n\tif (components.query !== undefined) components.query = String(components.query).replace(protocol.PCT_ENCODED, decodeUnreserved).replace(protocol.NOT_QUERY, pctEncChar).replace(protocol.PCT_ENCODED, toUpperCase);\n\tif (components.fragment !== undefined) components.fragment = String(components.fragment).replace(protocol.PCT_ENCODED, decodeUnreserved).replace(protocol.NOT_FRAGMENT, pctEncChar).replace(protocol.PCT_ENCODED, toUpperCase);\n\n\treturn components;\n};\n\nfunction _stripLeadingZeros(str:string):string {\n\treturn str.replace(/^0*(.*)/, \"$1\") || \"0\";\n}\n\nfunction _normalizeIPv4(host:string, protocol:URIRegExps):string {\n\tconst matches = host.match(protocol.IPV4ADDRESS) || [];\n\tconst [, address] = matches;\n\t\n\tif (address) {\n\t\treturn address.split(\".\").map(_stripLeadingZeros).join(\".\");\n\t} else {\n\t\treturn host;\n\t}\n}\n\nfunction _normalizeIPv6(host:string, protocol:URIRegExps):string {\n\tconst matches = host.match(protocol.IPV6ADDRESS) || [];\n\tconst [, address, zone] = matches;\n\n\tif (address) {\n\t\tconst [last, first] = address.toLowerCase().split('::').reverse();\n\t\tconst firstFields = first ? first.split(\":\").map(_stripLeadingZeros) : [];\n\t\tconst lastFields = last.split(\":\").map(_stripLeadingZeros);\n\t\tconst isLastFieldIPv4Address = protocol.IPV4ADDRESS.test(lastFields[lastFields.length - 1]);\n\t\tconst fieldCount = isLastFieldIPv4Address ? 7 : 8;\n\t\tconst lastFieldsStart = lastFields.length - fieldCount;\n\t\tconst fields = Array(fieldCount);\n\n\t\tfor (let x = 0; x < fieldCount; ++x) {\n\t\t\tfields[x] = firstFields[x] || lastFields[lastFieldsStart + x] || '';\n\t\t}\n\n\t\tif (isLastFieldIPv4Address) {\n\t\t\tfields[fieldCount - 1] = _normalizeIPv4(fields[fieldCount - 1], protocol);\n\t\t}\n\n\t\tconst allZeroFields = fields.reduce>((acc, field, index) => {\n\t\t\tif (!field || field === \"0\") {\n\t\t\t\tconst lastLongest = acc[acc.length - 1];\n\t\t\t\tif (lastLongest && lastLongest.index + lastLongest.length === index) {\n\t\t\t\t\tlastLongest.length++;\n\t\t\t\t} else {\n\t\t\t\t\tacc.push({ index, length : 1 });\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn acc;\n\t\t}, []);\n\n\t\tconst longestZeroFields = allZeroFields.sort((a, b) => b.length - a.length)[0];\n\n\t\tlet newHost:string;\n\t\tif (longestZeroFields && longestZeroFields.length > 1) {\n\t\t\tconst newFirst = fields.slice(0, longestZeroFields.index) ;\n\t\t\tconst newLast = fields.slice(longestZeroFields.index + longestZeroFields.length);\n\t\t\tnewHost = newFirst.join(\":\") + \"::\" + newLast.join(\":\");\n\t\t} else {\n\t\t\tnewHost = fields.join(\":\");\n\t\t}\n\n\t\tif (zone) {\n\t\t\tnewHost += \"%\" + zone;\n\t\t}\n\n\t\treturn newHost;\n\t} else {\n\t\treturn host;\n\t}\n}\n\nconst URI_PARSE = /^(?:([^:\\/?#]+):)?(?:\\/\\/((?:([^\\/?#@]*)@)?(\\[[^\\/?#\\]]+\\]|[^\\/?#:]*)(?:\\:(\\d*))?))?([^?#]*)(?:\\?([^#]*))?(?:#((?:.|\\n|\\r)*))?/i;\nconst NO_MATCH_IS_UNDEFINED = ((\"\").match(/(){0}/))[1] === undefined;\n\nexport function parse(uriString:string, options:URIOptions = {}):URIComponents {\n\tconst components:URIComponents = {};\n\tconst protocol = (options.iri !== false ? IRI_PROTOCOL : URI_PROTOCOL);\n\n\tif (options.reference === \"suffix\") uriString = (options.scheme ? options.scheme + \":\" : \"\") + \"//\" + uriString;\n\n\tconst matches = uriString.match(URI_PARSE);\n\n\tif (matches) {\n\t\tif (NO_MATCH_IS_UNDEFINED) {\n\t\t\t//store each component\n\t\t\tcomponents.scheme = matches[1];\n\t\t\tcomponents.userinfo = matches[3];\n\t\t\tcomponents.host = matches[4];\n\t\t\tcomponents.port = parseInt(matches[5], 10);\n\t\t\tcomponents.path = matches[6] || \"\";\n\t\t\tcomponents.query = matches[7];\n\t\t\tcomponents.fragment = matches[8];\n\n\t\t\t//fix port number\n\t\t\tif (isNaN(components.port)) {\n\t\t\t\tcomponents.port = matches[5];\n\t\t\t}\n\t\t} else { //IE FIX for improper RegExp matching\n\t\t\t//store each component\n\t\t\tcomponents.scheme = matches[1] || undefined;\n\t\t\tcomponents.userinfo = (uriString.indexOf(\"@\") !== -1 ? matches[3] : undefined);\n\t\t\tcomponents.host = (uriString.indexOf(\"//\") !== -1 ? matches[4] : undefined);\n\t\t\tcomponents.port = parseInt(matches[5], 10);\n\t\t\tcomponents.path = matches[6] || \"\";\n\t\t\tcomponents.query = (uriString.indexOf(\"?\") !== -1 ? matches[7] : undefined);\n\t\t\tcomponents.fragment = (uriString.indexOf(\"#\") !== -1 ? matches[8] : undefined);\n\n\t\t\t//fix port number\n\t\t\tif (isNaN(components.port)) {\n\t\t\t\tcomponents.port = (uriString.match(/\\/\\/(?:.|\\n)*\\:(?:\\/|\\?|\\#|$)/) ? matches[4] : undefined);\n\t\t\t}\n\t\t}\n\n\t\tif (components.host) {\n\t\t\t//normalize IP hosts\n\t\t\tcomponents.host = _normalizeIPv6(_normalizeIPv4(components.host, protocol), protocol);\n\t\t}\n\n\t\t//determine reference type\n\t\tif (components.scheme === undefined && components.userinfo === undefined && components.host === undefined && components.port === undefined && !components.path && components.query === undefined) {\n\t\t\tcomponents.reference = \"same-document\";\n\t\t} else if (components.scheme === undefined) {\n\t\t\tcomponents.reference = \"relative\";\n\t\t} else if (components.fragment === undefined) {\n\t\t\tcomponents.reference = \"absolute\";\n\t\t} else {\n\t\t\tcomponents.reference = \"uri\";\n\t\t}\n\n\t\t//check for reference errors\n\t\tif (options.reference && options.reference !== \"suffix\" && options.reference !== components.reference) {\n\t\t\tcomponents.error = components.error || \"URI is not a \" + options.reference + \" reference.\";\n\t\t}\n\n\t\t//find scheme handler\n\t\tconst schemeHandler = SCHEMES[(options.scheme || components.scheme || \"\").toLowerCase()];\n\n\t\t//check if scheme can't handle IRIs\n\t\tif (!options.unicodeSupport && (!schemeHandler || !schemeHandler.unicodeSupport)) {\n\t\t\t//if host component is a domain name\n\t\t\tif (components.host && (options.domainHost || (schemeHandler && schemeHandler.domainHost))) {\n\t\t\t\t//convert Unicode IDN -> ASCII IDN\n\t\t\t\ttry {\n\t\t\t\t\tcomponents.host = punycode.toASCII(components.host.replace(protocol.PCT_ENCODED, pctDecChars).toLowerCase());\n\t\t\t\t} catch (e) {\n\t\t\t\t\tcomponents.error = components.error || \"Host's domain name can not be converted to ASCII via punycode: \" + e;\n\t\t\t\t}\n\t\t\t}\n\t\t\t//convert IRI -> URI\n\t\t\t_normalizeComponentEncoding(components, URI_PROTOCOL);\n\t\t} else {\n\t\t\t//normalize encodings\n\t\t\t_normalizeComponentEncoding(components, protocol);\n\t\t}\n\n\t\t//perform scheme specific parsing\n\t\tif (schemeHandler && schemeHandler.parse) {\n\t\t\tschemeHandler.parse(components, options);\n\t\t}\n\t} else {\n\t\tcomponents.error = components.error || \"URI can not be parsed.\";\n\t}\n\n\treturn components;\n};\n\nfunction _recomposeAuthority(components:URIComponents, options:URIOptions):string|undefined {\n\tconst protocol = (options.iri !== false ? IRI_PROTOCOL : URI_PROTOCOL);\n\tconst uriTokens:Array = [];\n\n\tif (components.userinfo !== undefined) {\n\t\turiTokens.push(components.userinfo);\n\t\turiTokens.push(\"@\");\n\t}\n\n\tif (components.host !== undefined) {\n\t\t//normalize IP hosts, add brackets and escape zone separator for IPv6\n\t\turiTokens.push(_normalizeIPv6(_normalizeIPv4(String(components.host), protocol), protocol).replace(protocol.IPV6ADDRESS, (_, $1, $2) => \"[\" + $1 + ($2 ? \"%25\" + $2 : \"\") + \"]\"));\n\t}\n\n\tif (typeof components.port === \"number\" || typeof components.port === \"string\") {\n\t\turiTokens.push(\":\");\n\t\turiTokens.push(String(components.port));\n\t}\n\n\treturn uriTokens.length ? uriTokens.join(\"\") : undefined;\n};\n\nconst RDS1 = /^\\.\\.?\\//;\nconst RDS2 = /^\\/\\.(\\/|$)/;\nconst RDS3 = /^\\/\\.\\.(\\/|$)/;\nconst RDS4 = /^\\.\\.?$/;\nconst RDS5 = /^\\/?(?:.|\\n)*?(?=\\/|$)/;\n\nexport function removeDotSegments(input:string):string {\n\tconst output:Array = [];\n\n\twhile (input.length) {\n\t\tif (input.match(RDS1)) {\n\t\t\tinput = input.replace(RDS1, \"\");\n\t\t} else if (input.match(RDS2)) {\n\t\t\tinput = input.replace(RDS2, \"/\");\n\t\t} else if (input.match(RDS3)) {\n\t\t\tinput = input.replace(RDS3, \"/\");\n\t\t\toutput.pop();\n\t\t} else if (input === \".\" || input === \"..\") {\n\t\t\tinput = \"\";\n\t\t} else {\n\t\t\tconst im = input.match(RDS5);\n\t\t\tif (im) {\n\t\t\t\tconst s = im[0];\n\t\t\t\tinput = input.slice(s.length);\n\t\t\t\toutput.push(s);\n\t\t\t} else {\n\t\t\t\tthrow new Error(\"Unexpected dot segment condition\");\n\t\t\t}\n\t\t}\n\t}\n\n\treturn output.join(\"\");\n};\n\nexport function serialize(components:URIComponents, options:URIOptions = {}):string {\n\tconst protocol = (options.iri ? IRI_PROTOCOL : URI_PROTOCOL);\n\tconst uriTokens:Array = [];\n\n\t//find scheme handler\n\tconst schemeHandler = SCHEMES[(options.scheme || components.scheme || \"\").toLowerCase()];\n\n\t//perform scheme specific serialization\n\tif (schemeHandler && schemeHandler.serialize) schemeHandler.serialize(components, options);\n\n\tif (components.host) {\n\t\t//if host component is an IPv6 address\n\t\tif (protocol.IPV6ADDRESS.test(components.host)) {\n\t\t\t//TODO: normalize IPv6 address as per RFC 5952\n\t\t}\n\n\t\t//if host component is a domain name\n\t\telse if (options.domainHost || (schemeHandler && schemeHandler.domainHost)) {\n\t\t\t//convert IDN via punycode\n\t\t\ttry {\n\t\t\t\tcomponents.host = (!options.iri ? punycode.toASCII(components.host.replace(protocol.PCT_ENCODED, pctDecChars).toLowerCase()) : punycode.toUnicode(components.host));\n\t\t\t} catch (e) {\n\t\t\t\tcomponents.error = components.error || \"Host's domain name can not be converted to \" + (!options.iri ? \"ASCII\" : \"Unicode\") + \" via punycode: \" + e;\n\t\t\t}\n\t\t}\n\t}\n\n\t//normalize encoding\n\t_normalizeComponentEncoding(components, protocol);\n\n\tif (options.reference !== \"suffix\" && components.scheme) {\n\t\turiTokens.push(components.scheme);\n\t\turiTokens.push(\":\");\n\t}\n\n\tconst authority = _recomposeAuthority(components, options);\n\tif (authority !== undefined) {\n\t\tif (options.reference !== \"suffix\") {\n\t\t\turiTokens.push(\"//\");\n\t\t}\n\n\t\turiTokens.push(authority);\n\n\t\tif (components.path && components.path.charAt(0) !== \"/\") {\n\t\t\turiTokens.push(\"/\");\n\t\t}\n\t}\n\n\tif (components.path !== undefined) {\n\t\tlet s = components.path;\n\n\t\tif (!options.absolutePath && (!schemeHandler || !schemeHandler.absolutePath)) {\n\t\t\ts = removeDotSegments(s);\n\t\t}\n\n\t\tif (authority === undefined) {\n\t\t\ts = s.replace(/^\\/\\//, \"/%2F\"); //don't allow the path to start with \"//\"\n\t\t}\n\n\t\turiTokens.push(s);\n\t}\n\n\tif (components.query !== undefined) {\n\t\turiTokens.push(\"?\");\n\t\turiTokens.push(components.query);\n\t}\n\n\tif (components.fragment !== undefined) {\n\t\turiTokens.push(\"#\");\n\t\turiTokens.push(components.fragment);\n\t}\n\n\treturn uriTokens.join(\"\"); //merge tokens into a string\n};\n\nexport function resolveComponents(base:URIComponents, relative:URIComponents, options:URIOptions = {}, skipNormalization?:boolean):URIComponents {\n\tconst target:URIComponents = {};\n\n\tif (!skipNormalization) {\n\t\tbase = parse(serialize(base, options), options); //normalize base components\n\t\trelative = parse(serialize(relative, options), options); //normalize relative components\n\t}\n\toptions = options || {};\n\n\tif (!options.tolerant && relative.scheme) {\n\t\ttarget.scheme = relative.scheme;\n\t\t//target.authority = relative.authority;\n\t\ttarget.userinfo = relative.userinfo;\n\t\ttarget.host = relative.host;\n\t\ttarget.port = relative.port;\n\t\ttarget.path = removeDotSegments(relative.path || \"\");\n\t\ttarget.query = relative.query;\n\t} else {\n\t\tif (relative.userinfo !== undefined || relative.host !== undefined || relative.port !== undefined) {\n\t\t\t//target.authority = relative.authority;\n\t\t\ttarget.userinfo = relative.userinfo;\n\t\t\ttarget.host = relative.host;\n\t\t\ttarget.port = relative.port;\n\t\t\ttarget.path = removeDotSegments(relative.path || \"\");\n\t\t\ttarget.query = relative.query;\n\t\t} else {\n\t\t\tif (!relative.path) {\n\t\t\t\ttarget.path = base.path;\n\t\t\t\tif (relative.query !== undefined) {\n\t\t\t\t\ttarget.query = relative.query;\n\t\t\t\t} else {\n\t\t\t\t\ttarget.query = base.query;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif (relative.path.charAt(0) === \"/\") {\n\t\t\t\t\ttarget.path = removeDotSegments(relative.path);\n\t\t\t\t} else {\n\t\t\t\t\tif ((base.userinfo !== undefined || base.host !== undefined || base.port !== undefined) && !base.path) {\n\t\t\t\t\t\ttarget.path = \"/\" + relative.path;\n\t\t\t\t\t} else if (!base.path) {\n\t\t\t\t\t\ttarget.path = relative.path;\n\t\t\t\t\t} else {\n\t\t\t\t\t\ttarget.path = base.path.slice(0, base.path.lastIndexOf(\"/\") + 1) + relative.path;\n\t\t\t\t\t}\n\t\t\t\t\ttarget.path = removeDotSegments(target.path);\n\t\t\t\t}\n\t\t\t\ttarget.query = relative.query;\n\t\t\t}\n\t\t\t//target.authority = base.authority;\n\t\t\ttarget.userinfo = base.userinfo;\n\t\t\ttarget.host = base.host;\n\t\t\ttarget.port = base.port;\n\t\t}\n\t\ttarget.scheme = base.scheme;\n\t}\n\n\ttarget.fragment = relative.fragment;\n\n\treturn target;\n};\n\nexport function resolve(baseURI:string, relativeURI:string, options?:URIOptions):string {\n\tconst schemelessOptions = assign({ scheme : 'null' }, options);\n\treturn serialize(resolveComponents(parse(baseURI, schemelessOptions), parse(relativeURI, schemelessOptions), schemelessOptions, true), schemelessOptions);\n};\n\nexport function normalize(uri:string, options?:URIOptions):string;\nexport function normalize(uri:URIComponents, options?:URIOptions):URIComponents;\nexport function normalize(uri:any, options?:URIOptions):any {\n\tif (typeof uri === \"string\") {\n\t\turi = serialize(parse(uri, options), options);\n\t} else if (typeOf(uri) === \"object\") {\n\t\turi = parse(serialize(uri, options), options);\n\t}\n\n\treturn uri;\n};\n\nexport function equal(uriA:string, uriB:string, options?: URIOptions):boolean;\nexport function equal(uriA:URIComponents, uriB:URIComponents, options?:URIOptions):boolean;\nexport function equal(uriA:any, uriB:any, options?:URIOptions):boolean {\n\tif (typeof uriA === \"string\") {\n\t\turiA = serialize(parse(uriA, options), options);\n\t} else if (typeOf(uriA) === \"object\") {\n\t\turiA = serialize(uriA, options);\n\t}\n\n\tif (typeof uriB === \"string\") {\n\t\turiB = serialize(parse(uriB, options), options);\n\t} else if (typeOf(uriB) === \"object\") {\n\t\turiB = serialize(uriB, options);\n\t}\n\n\treturn uriA === uriB;\n};\n\nexport function escapeComponent(str:string, options?:URIOptions):string {\n\treturn str && str.toString().replace((!options || !options.iri ? URI_PROTOCOL.ESCAPE : IRI_PROTOCOL.ESCAPE), pctEncChar);\n};\n\nexport function unescapeComponent(str:string, options?:URIOptions):string {\n\treturn str && str.toString().replace((!options || !options.iri ? URI_PROTOCOL.PCT_ENCODED : IRI_PROTOCOL.PCT_ENCODED), pctDecChars);\n};\n","'use strict';\n\n/** Highest positive signed 32-bit float value */\nconst maxInt = 2147483647; // aka. 0x7FFFFFFF or 2^31-1\n\n/** Bootstring parameters */\nconst base = 36;\nconst tMin = 1;\nconst tMax = 26;\nconst skew = 38;\nconst damp = 700;\nconst initialBias = 72;\nconst initialN = 128; // 0x80\nconst delimiter = '-'; // '\\x2D'\n\n/** Regular expressions */\nconst regexPunycode = /^xn--/;\nconst regexNonASCII = /[^\\0-\\x7E]/; // non-ASCII chars\nconst regexSeparators = /[\\x2E\\u3002\\uFF0E\\uFF61]/g; // RFC 3490 separators\n\n/** Error messages */\nconst errors = {\n\t'overflow': 'Overflow: input needs wider integers to process',\n\t'not-basic': 'Illegal input >= 0x80 (not a basic code point)',\n\t'invalid-input': 'Invalid input'\n};\n\n/** Convenience shortcuts */\nconst baseMinusTMin = base - tMin;\nconst floor = Math.floor;\nconst stringFromCharCode = String.fromCharCode;\n\n/*--------------------------------------------------------------------------*/\n\n/**\n * A generic error utility function.\n * @private\n * @param {String} type The error type.\n * @returns {Error} Throws a `RangeError` with the applicable error message.\n */\nfunction error(type) {\n\tthrow new RangeError(errors[type]);\n}\n\n/**\n * A generic `Array#map` utility function.\n * @private\n * @param {Array} array The array to iterate over.\n * @param {Function} callback The function that gets called for every array\n * item.\n * @returns {Array} A new array of values returned by the callback function.\n */\nfunction map(array, fn) {\n\tconst result = [];\n\tlet length = array.length;\n\twhile (length--) {\n\t\tresult[length] = fn(array[length]);\n\t}\n\treturn result;\n}\n\n/**\n * A simple `Array#map`-like wrapper to work with domain name strings or email\n * addresses.\n * @private\n * @param {String} domain The domain name or email address.\n * @param {Function} callback The function that gets called for every\n * character.\n * @returns {Array} A new string of characters returned by the callback\n * function.\n */\nfunction mapDomain(string, fn) {\n\tconst parts = string.split('@');\n\tlet result = '';\n\tif (parts.length > 1) {\n\t\t// In email addresses, only the domain name should be punycoded. Leave\n\t\t// the local part (i.e. everything up to `@`) intact.\n\t\tresult = parts[0] + '@';\n\t\tstring = parts[1];\n\t}\n\t// Avoid `split(regex)` for IE8 compatibility. See #17.\n\tstring = string.replace(regexSeparators, '\\x2E');\n\tconst labels = string.split('.');\n\tconst encoded = map(labels, fn).join('.');\n\treturn result + encoded;\n}\n\n/**\n * Creates an array containing the numeric code points of each Unicode\n * character in the string. While JavaScript uses UCS-2 internally,\n * this function will convert a pair of surrogate halves (each of which\n * UCS-2 exposes as separate characters) into a single code point,\n * matching UTF-16.\n * @see `punycode.ucs2.encode`\n * @see \n * @memberOf punycode.ucs2\n * @name decode\n * @param {String} string The Unicode input string (UCS-2).\n * @returns {Array} The new array of code points.\n */\nfunction ucs2decode(string) {\n\tconst output = [];\n\tlet counter = 0;\n\tconst length = string.length;\n\twhile (counter < length) {\n\t\tconst value = string.charCodeAt(counter++);\n\t\tif (value >= 0xD800 && value <= 0xDBFF && counter < length) {\n\t\t\t// It's a high surrogate, and there is a next character.\n\t\t\tconst extra = string.charCodeAt(counter++);\n\t\t\tif ((extra & 0xFC00) == 0xDC00) { // Low surrogate.\n\t\t\t\toutput.push(((value & 0x3FF) << 10) + (extra & 0x3FF) + 0x10000);\n\t\t\t} else {\n\t\t\t\t// It's an unmatched surrogate; only append this code unit, in case the\n\t\t\t\t// next code unit is the high surrogate of a surrogate pair.\n\t\t\t\toutput.push(value);\n\t\t\t\tcounter--;\n\t\t\t}\n\t\t} else {\n\t\t\toutput.push(value);\n\t\t}\n\t}\n\treturn output;\n}\n\n/**\n * Creates a string based on an array of numeric code points.\n * @see `punycode.ucs2.decode`\n * @memberOf punycode.ucs2\n * @name encode\n * @param {Array} codePoints The array of numeric code points.\n * @returns {String} The new Unicode string (UCS-2).\n */\nconst ucs2encode = array => String.fromCodePoint(...array);\n\n/**\n * Converts a basic code point into a digit/integer.\n * @see `digitToBasic()`\n * @private\n * @param {Number} codePoint The basic numeric code point value.\n * @returns {Number} The numeric value of a basic code point (for use in\n * representing integers) in the range `0` to `base - 1`, or `base` if\n * the code point does not represent a value.\n */\nconst basicToDigit = function(codePoint) {\n\tif (codePoint - 0x30 < 0x0A) {\n\t\treturn codePoint - 0x16;\n\t}\n\tif (codePoint - 0x41 < 0x1A) {\n\t\treturn codePoint - 0x41;\n\t}\n\tif (codePoint - 0x61 < 0x1A) {\n\t\treturn codePoint - 0x61;\n\t}\n\treturn base;\n};\n\n/**\n * Converts a digit/integer into a basic code point.\n * @see `basicToDigit()`\n * @private\n * @param {Number} digit The numeric value of a basic code point.\n * @returns {Number} The basic code point whose value (when used for\n * representing integers) is `digit`, which needs to be in the range\n * `0` to `base - 1`. If `flag` is non-zero, the uppercase form is\n * used; else, the lowercase form is used. The behavior is undefined\n * if `flag` is non-zero and `digit` has no uppercase form.\n */\nconst digitToBasic = function(digit, flag) {\n\t// 0..25 map to ASCII a..z or A..Z\n\t// 26..35 map to ASCII 0..9\n\treturn digit + 22 + 75 * (digit < 26) - ((flag != 0) << 5);\n};\n\n/**\n * Bias adaptation function as per section 3.4 of RFC 3492.\n * https://tools.ietf.org/html/rfc3492#section-3.4\n * @private\n */\nconst adapt = function(delta, numPoints, firstTime) {\n\tlet k = 0;\n\tdelta = firstTime ? floor(delta / damp) : delta >> 1;\n\tdelta += floor(delta / numPoints);\n\tfor (/* no initialization */; delta > baseMinusTMin * tMax >> 1; k += base) {\n\t\tdelta = floor(delta / baseMinusTMin);\n\t}\n\treturn floor(k + (baseMinusTMin + 1) * delta / (delta + skew));\n};\n\n/**\n * Converts a Punycode string of ASCII-only symbols to a string of Unicode\n * symbols.\n * @memberOf punycode\n * @param {String} input The Punycode string of ASCII-only symbols.\n * @returns {String} The resulting string of Unicode symbols.\n */\nconst decode = function(input) {\n\t// Don't use UCS-2.\n\tconst output = [];\n\tconst inputLength = input.length;\n\tlet i = 0;\n\tlet n = initialN;\n\tlet bias = initialBias;\n\n\t// Handle the basic code points: let `basic` be the number of input code\n\t// points before the last delimiter, or `0` if there is none, then copy\n\t// the first basic code points to the output.\n\n\tlet basic = input.lastIndexOf(delimiter);\n\tif (basic < 0) {\n\t\tbasic = 0;\n\t}\n\n\tfor (let j = 0; j < basic; ++j) {\n\t\t// if it's not a basic code point\n\t\tif (input.charCodeAt(j) >= 0x80) {\n\t\t\terror('not-basic');\n\t\t}\n\t\toutput.push(input.charCodeAt(j));\n\t}\n\n\t// Main decoding loop: start just after the last delimiter if any basic code\n\t// points were copied; start at the beginning otherwise.\n\n\tfor (let index = basic > 0 ? basic + 1 : 0; index < inputLength; /* no final expression */) {\n\n\t\t// `index` is the index of the next character to be consumed.\n\t\t// Decode a generalized variable-length integer into `delta`,\n\t\t// which gets added to `i`. The overflow checking is easier\n\t\t// if we increase `i` as we go, then subtract off its starting\n\t\t// value at the end to obtain `delta`.\n\t\tlet oldi = i;\n\t\tfor (let w = 1, k = base; /* no condition */; k += base) {\n\n\t\t\tif (index >= inputLength) {\n\t\t\t\terror('invalid-input');\n\t\t\t}\n\n\t\t\tconst digit = basicToDigit(input.charCodeAt(index++));\n\n\t\t\tif (digit >= base || digit > floor((maxInt - i) / w)) {\n\t\t\t\terror('overflow');\n\t\t\t}\n\n\t\t\ti += digit * w;\n\t\t\tconst t = k <= bias ? tMin : (k >= bias + tMax ? tMax : k - bias);\n\n\t\t\tif (digit < t) {\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tconst baseMinusT = base - t;\n\t\t\tif (w > floor(maxInt / baseMinusT)) {\n\t\t\t\terror('overflow');\n\t\t\t}\n\n\t\t\tw *= baseMinusT;\n\n\t\t}\n\n\t\tconst out = output.length + 1;\n\t\tbias = adapt(i - oldi, out, oldi == 0);\n\n\t\t// `i` was supposed to wrap around from `out` to `0`,\n\t\t// incrementing `n` each time, so we'll fix that now:\n\t\tif (floor(i / out) > maxInt - n) {\n\t\t\terror('overflow');\n\t\t}\n\n\t\tn += floor(i / out);\n\t\ti %= out;\n\n\t\t// Insert `n` at position `i` of the output.\n\t\toutput.splice(i++, 0, n);\n\n\t}\n\n\treturn String.fromCodePoint(...output);\n};\n\n/**\n * Converts a string of Unicode symbols (e.g. a domain name label) to a\n * Punycode string of ASCII-only symbols.\n * @memberOf punycode\n * @param {String} input The string of Unicode symbols.\n * @returns {String} The resulting Punycode string of ASCII-only symbols.\n */\nconst encode = function(input) {\n\tconst output = [];\n\n\t// Convert the input in UCS-2 to an array of Unicode code points.\n\tinput = ucs2decode(input);\n\n\t// Cache the length.\n\tlet inputLength = input.length;\n\n\t// Initialize the state.\n\tlet n = initialN;\n\tlet delta = 0;\n\tlet bias = initialBias;\n\n\t// Handle the basic code points.\n\tfor (const currentValue of input) {\n\t\tif (currentValue < 0x80) {\n\t\t\toutput.push(stringFromCharCode(currentValue));\n\t\t}\n\t}\n\n\tlet basicLength = output.length;\n\tlet handledCPCount = basicLength;\n\n\t// `handledCPCount` is the number of code points that have been handled;\n\t// `basicLength` is the number of basic code points.\n\n\t// Finish the basic string with a delimiter unless it's empty.\n\tif (basicLength) {\n\t\toutput.push(delimiter);\n\t}\n\n\t// Main encoding loop:\n\twhile (handledCPCount < inputLength) {\n\n\t\t// All non-basic code points < n have been handled already. Find the next\n\t\t// larger one:\n\t\tlet m = maxInt;\n\t\tfor (const currentValue of input) {\n\t\t\tif (currentValue >= n && currentValue < m) {\n\t\t\t\tm = currentValue;\n\t\t\t}\n\t\t}\n\n\t\t// Increase `delta` enough to advance the decoder's state to ,\n\t\t// but guard against overflow.\n\t\tconst handledCPCountPlusOne = handledCPCount + 1;\n\t\tif (m - n > floor((maxInt - delta) / handledCPCountPlusOne)) {\n\t\t\terror('overflow');\n\t\t}\n\n\t\tdelta += (m - n) * handledCPCountPlusOne;\n\t\tn = m;\n\n\t\tfor (const currentValue of input) {\n\t\t\tif (currentValue < n && ++delta > maxInt) {\n\t\t\t\terror('overflow');\n\t\t\t}\n\t\t\tif (currentValue == n) {\n\t\t\t\t// Represent delta as a generalized variable-length integer.\n\t\t\t\tlet q = delta;\n\t\t\t\tfor (let k = base; /* no condition */; k += base) {\n\t\t\t\t\tconst t = k <= bias ? tMin : (k >= bias + tMax ? tMax : k - bias);\n\t\t\t\t\tif (q < t) {\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tconst qMinusT = q - t;\n\t\t\t\t\tconst baseMinusT = base - t;\n\t\t\t\t\toutput.push(\n\t\t\t\t\t\tstringFromCharCode(digitToBasic(t + qMinusT % baseMinusT, 0))\n\t\t\t\t\t);\n\t\t\t\t\tq = floor(qMinusT / baseMinusT);\n\t\t\t\t}\n\n\t\t\t\toutput.push(stringFromCharCode(digitToBasic(q, 0)));\n\t\t\t\tbias = adapt(delta, handledCPCountPlusOne, handledCPCount == basicLength);\n\t\t\t\tdelta = 0;\n\t\t\t\t++handledCPCount;\n\t\t\t}\n\t\t}\n\n\t\t++delta;\n\t\t++n;\n\n\t}\n\treturn output.join('');\n};\n\n/**\n * Converts a Punycode string representing a domain name or an email address\n * to Unicode. Only the Punycoded parts of the input will be converted, i.e.\n * it doesn't matter if you call it on a string that has already been\n * converted to Unicode.\n * @memberOf punycode\n * @param {String} input The Punycoded domain name or email address to\n * convert to Unicode.\n * @returns {String} The Unicode representation of the given Punycode\n * string.\n */\nconst toUnicode = function(input) {\n\treturn mapDomain(input, function(string) {\n\t\treturn regexPunycode.test(string)\n\t\t\t? decode(string.slice(4).toLowerCase())\n\t\t\t: string;\n\t});\n};\n\n/**\n * Converts a Unicode string representing a domain name or an email address to\n * Punycode. Only the non-ASCII parts of the domain name will be converted,\n * i.e. it doesn't matter if you call it with a domain that's already in\n * ASCII.\n * @memberOf punycode\n * @param {String} input The domain name or email address to convert, as a\n * Unicode string.\n * @returns {String} The Punycode representation of the given domain name or\n * email address.\n */\nconst toASCII = function(input) {\n\treturn mapDomain(input, function(string) {\n\t\treturn regexNonASCII.test(string)\n\t\t\t? 'xn--' + encode(string)\n\t\t\t: string;\n\t});\n};\n\n/*--------------------------------------------------------------------------*/\n\n/** Define the public API */\nconst punycode = {\n\t/**\n\t * A string representing the current Punycode.js version number.\n\t * @memberOf punycode\n\t * @type String\n\t */\n\t'version': '2.1.0',\n\t/**\n\t * An object of methods to convert from JavaScript's internal character\n\t * representation (UCS-2) to Unicode code points, and back.\n\t * @see \n\t * @memberOf punycode\n\t * @type Object\n\t */\n\t'ucs2': {\n\t\t'decode': ucs2decode,\n\t\t'encode': ucs2encode\n\t},\n\t'decode': decode,\n\t'encode': encode,\n\t'toASCII': toASCII,\n\t'toUnicode': toUnicode\n};\n\nexport default punycode;\n","import { URIRegExps } from \"./uri\";\nimport { buildExps } from \"./regexps-uri\";\n\nexport default buildExps(true);\n","import { URIRegExps } from \"./uri\";\nimport { merge, subexp } from \"./util\";\n\nexport function buildExps(isIRI:boolean):URIRegExps {\n\tconst\n\t\tALPHA$$ = \"[A-Za-z]\",\n\t\tCR$ = \"[\\\\x0D]\",\n\t\tDIGIT$$ = \"[0-9]\",\n\t\tDQUOTE$$ = \"[\\\\x22]\",\n\t\tHEXDIG$$ = merge(DIGIT$$, \"[A-Fa-f]\"), //case-insensitive\n\t\tLF$$ = \"[\\\\x0A]\",\n\t\tSP$$ = \"[\\\\x20]\",\n\t\tPCT_ENCODED$ = subexp(subexp(\"%[EFef]\" + HEXDIG$$ + \"%\" + HEXDIG$$ + HEXDIG$$ + \"%\" + HEXDIG$$ + HEXDIG$$) + \"|\" + subexp(\"%[89A-Fa-f]\" + HEXDIG$$ + \"%\" + HEXDIG$$ + HEXDIG$$) + \"|\" + subexp(\"%\" + HEXDIG$$ + HEXDIG$$)), //expanded\n\t\tGEN_DELIMS$$ = \"[\\\\:\\\\/\\\\?\\\\#\\\\[\\\\]\\\\@]\",\n\t\tSUB_DELIMS$$ = \"[\\\\!\\\\$\\\\&\\\\'\\\\(\\\\)\\\\*\\\\+\\\\,\\\\;\\\\=]\",\n\t\tRESERVED$$ = merge(GEN_DELIMS$$, SUB_DELIMS$$),\n\t\tUCSCHAR$$ = isIRI ? \"[\\\\xA0-\\\\u200D\\\\u2010-\\\\u2029\\\\u202F-\\\\uD7FF\\\\uF900-\\\\uFDCF\\\\uFDF0-\\\\uFFEF]\" : \"[]\", //subset, excludes bidi control characters\n\t\tIPRIVATE$$ = isIRI ? \"[\\\\uE000-\\\\uF8FF]\" : \"[]\", //subset\n\t\tUNRESERVED$$ = merge(ALPHA$$, DIGIT$$, \"[\\\\-\\\\.\\\\_\\\\~]\", UCSCHAR$$),\n\t\tSCHEME$ = subexp(ALPHA$$ + merge(ALPHA$$, DIGIT$$, \"[\\\\+\\\\-\\\\.]\") + \"*\"),\n\t\tUSERINFO$ = subexp(subexp(PCT_ENCODED$ + \"|\" + merge(UNRESERVED$$, SUB_DELIMS$$, \"[\\\\:]\")) + \"*\"),\n\t\tDEC_OCTET$ = subexp(subexp(\"25[0-5]\") + \"|\" + subexp(\"2[0-4]\" + DIGIT$$) + \"|\" + subexp(\"1\" + DIGIT$$ + DIGIT$$) + \"|\" + subexp(\"[1-9]\" + DIGIT$$) + \"|\" + DIGIT$$),\n\t\tDEC_OCTET_RELAXED$ = subexp(subexp(\"25[0-5]\") + \"|\" + subexp(\"2[0-4]\" + DIGIT$$) + \"|\" + subexp(\"1\" + DIGIT$$ + DIGIT$$) + \"|\" + subexp(\"0?[1-9]\" + DIGIT$$) + \"|0?0?\" + DIGIT$$), //relaxed parsing rules\n\t\tIPV4ADDRESS$ = subexp(DEC_OCTET_RELAXED$ + \"\\\\.\" + DEC_OCTET_RELAXED$ + \"\\\\.\" + DEC_OCTET_RELAXED$ + \"\\\\.\" + DEC_OCTET_RELAXED$),\n\t\tH16$ = subexp(HEXDIG$$ + \"{1,4}\"),\n\t\tLS32$ = subexp(subexp(H16$ + \"\\\\:\" + H16$) + \"|\" + IPV4ADDRESS$),\n\t\tIPV6ADDRESS1$ = subexp( subexp(H16$ + \"\\\\:\") + \"{6}\" + LS32$), // 6( h16 \":\" ) ls32\n\t\tIPV6ADDRESS2$ = subexp( \"\\\\:\\\\:\" + subexp(H16$ + \"\\\\:\") + \"{5}\" + LS32$), // \"::\" 5( h16 \":\" ) ls32\n\t\tIPV6ADDRESS3$ = subexp(subexp( H16$) + \"?\\\\:\\\\:\" + subexp(H16$ + \"\\\\:\") + \"{4}\" + LS32$), //[ h16 ] \"::\" 4( h16 \":\" ) ls32\n\t\tIPV6ADDRESS4$ = subexp(subexp(subexp(H16$ + \"\\\\:\") + \"{0,1}\" + H16$) + \"?\\\\:\\\\:\" + subexp(H16$ + \"\\\\:\") + \"{3}\" + LS32$), //[ *1( h16 \":\" ) h16 ] \"::\" 3( h16 \":\" ) ls32\n\t\tIPV6ADDRESS5$ = subexp(subexp(subexp(H16$ + \"\\\\:\") + \"{0,2}\" + H16$) + \"?\\\\:\\\\:\" + subexp(H16$ + \"\\\\:\") + \"{2}\" + LS32$), //[ *2( h16 \":\" ) h16 ] \"::\" 2( h16 \":\" ) ls32\n\t\tIPV6ADDRESS6$ = subexp(subexp(subexp(H16$ + \"\\\\:\") + \"{0,3}\" + H16$) + \"?\\\\:\\\\:\" + H16$ + \"\\\\:\" + LS32$), //[ *3( h16 \":\" ) h16 ] \"::\" h16 \":\" ls32\n\t\tIPV6ADDRESS7$ = subexp(subexp(subexp(H16$ + \"\\\\:\") + \"{0,4}\" + H16$) + \"?\\\\:\\\\:\" + LS32$), //[ *4( h16 \":\" ) h16 ] \"::\" ls32\n\t\tIPV6ADDRESS8$ = subexp(subexp(subexp(H16$ + \"\\\\:\") + \"{0,5}\" + H16$) + \"?\\\\:\\\\:\" + H16$ ), //[ *5( h16 \":\" ) h16 ] \"::\" h16\n\t\tIPV6ADDRESS9$ = subexp(subexp(subexp(H16$ + \"\\\\:\") + \"{0,6}\" + H16$) + \"?\\\\:\\\\:\" ), //[ *6( h16 \":\" ) h16 ] \"::\"\n\t\tIPV6ADDRESS$ = subexp([IPV6ADDRESS1$, IPV6ADDRESS2$, IPV6ADDRESS3$, IPV6ADDRESS4$, IPV6ADDRESS5$, IPV6ADDRESS6$, IPV6ADDRESS7$, IPV6ADDRESS8$, IPV6ADDRESS9$].join(\"|\")),\n\t\tZONEID$ = subexp(subexp(UNRESERVED$$ + \"|\" + PCT_ENCODED$) + \"+\"), //RFC 6874\n\t\tIPV6ADDRZ$ = subexp(IPV6ADDRESS$ + \"\\\\%25\" + ZONEID$), //RFC 6874\n\t\tIPV6ADDRZ_RELAXED$ = subexp(IPV6ADDRESS$ + subexp(\"\\\\%25|\\\\%(?!\" + HEXDIG$$ + \"{2})\") + ZONEID$), //RFC 6874, with relaxed parsing rules\n\t\tIPVFUTURE$ = subexp(\"[vV]\" + HEXDIG$$ + \"+\\\\.\" + merge(UNRESERVED$$, SUB_DELIMS$$, \"[\\\\:]\") + \"+\"),\n\t\tIP_LITERAL$ = subexp(\"\\\\[\" + subexp(IPV6ADDRZ_RELAXED$ + \"|\" + IPV6ADDRESS$ + \"|\" + IPVFUTURE$) + \"\\\\]\"), //RFC 6874\n\t\tREG_NAME$ = subexp(subexp(PCT_ENCODED$ + \"|\" + merge(UNRESERVED$$, SUB_DELIMS$$)) + \"*\"),\n\t\tHOST$ = subexp(IP_LITERAL$ + \"|\" + IPV4ADDRESS$ + \"(?!\" + REG_NAME$ + \")\" + \"|\" + REG_NAME$),\n\t\tPORT$ = subexp(DIGIT$$ + \"*\"),\n\t\tAUTHORITY$ = subexp(subexp(USERINFO$ + \"@\") + \"?\" + HOST$ + subexp(\"\\\\:\" + PORT$) + \"?\"),\n\t\tPCHAR$ = subexp(PCT_ENCODED$ + \"|\" + merge(UNRESERVED$$, SUB_DELIMS$$, \"[\\\\:\\\\@]\")),\n\t\tSEGMENT$ = subexp(PCHAR$ + \"*\"),\n\t\tSEGMENT_NZ$ = subexp(PCHAR$ + \"+\"),\n\t\tSEGMENT_NZ_NC$ = subexp(subexp(PCT_ENCODED$ + \"|\" + merge(UNRESERVED$$, SUB_DELIMS$$, \"[\\\\@]\")) + \"+\"),\n\t\tPATH_ABEMPTY$ = subexp(subexp(\"\\\\/\" + SEGMENT$) + \"*\"),\n\t\tPATH_ABSOLUTE$ = subexp(\"\\\\/\" + subexp(SEGMENT_NZ$ + PATH_ABEMPTY$) + \"?\"), //simplified\n\t\tPATH_NOSCHEME$ = subexp(SEGMENT_NZ_NC$ + PATH_ABEMPTY$), //simplified\n\t\tPATH_ROOTLESS$ = subexp(SEGMENT_NZ$ + PATH_ABEMPTY$), //simplified\n\t\tPATH_EMPTY$ = \"(?!\" + PCHAR$ + \")\",\n\t\tPATH$ = subexp(PATH_ABEMPTY$ + \"|\" + PATH_ABSOLUTE$ + \"|\" + PATH_NOSCHEME$ + \"|\" + PATH_ROOTLESS$ + \"|\" + PATH_EMPTY$),\n\t\tQUERY$ = subexp(subexp(PCHAR$ + \"|\" + merge(\"[\\\\/\\\\?]\", IPRIVATE$$)) + \"*\"),\n\t\tFRAGMENT$ = subexp(subexp(PCHAR$ + \"|[\\\\/\\\\?]\") + \"*\"),\n\t\tHIER_PART$ = subexp(subexp(\"\\\\/\\\\/\" + AUTHORITY$ + PATH_ABEMPTY$) + \"|\" + PATH_ABSOLUTE$ + \"|\" + PATH_ROOTLESS$ + \"|\" + PATH_EMPTY$),\n\t\tURI$ = subexp(SCHEME$ + \"\\\\:\" + HIER_PART$ + subexp(\"\\\\?\" + QUERY$) + \"?\" + subexp(\"\\\\#\" + FRAGMENT$) + \"?\"),\n\t\tRELATIVE_PART$ = subexp(subexp(\"\\\\/\\\\/\" + AUTHORITY$ + PATH_ABEMPTY$) + \"|\" + PATH_ABSOLUTE$ + \"|\" + PATH_NOSCHEME$ + \"|\" + PATH_EMPTY$),\n\t\tRELATIVE$ = subexp(RELATIVE_PART$ + subexp(\"\\\\?\" + QUERY$) + \"?\" + subexp(\"\\\\#\" + FRAGMENT$) + \"?\"),\n\t\tURI_REFERENCE$ = subexp(URI$ + \"|\" + RELATIVE$),\n\t\tABSOLUTE_URI$ = subexp(SCHEME$ + \"\\\\:\" + HIER_PART$ + subexp(\"\\\\?\" + QUERY$) + \"?\"),\n\n\t\tGENERIC_REF$ = \"^(\" + SCHEME$ + \")\\\\:\" + subexp(subexp(\"\\\\/\\\\/(\" + subexp(\"(\" + USERINFO$ + \")@\") + \"?(\" + HOST$ + \")\" + subexp(\"\\\\:(\" + PORT$ + \")\") + \"?)\") + \"?(\" + PATH_ABEMPTY$ + \"|\" + PATH_ABSOLUTE$ + \"|\" + PATH_ROOTLESS$ + \"|\" + PATH_EMPTY$ + \")\") + subexp(\"\\\\?(\" + QUERY$ + \")\") + \"?\" + subexp(\"\\\\#(\" + FRAGMENT$ + \")\") + \"?$\",\n\t\tRELATIVE_REF$ = \"^(){0}\" + subexp(subexp(\"\\\\/\\\\/(\" + subexp(\"(\" + USERINFO$ + \")@\") + \"?(\" + HOST$ + \")\" + subexp(\"\\\\:(\" + PORT$ + \")\") + \"?)\") + \"?(\" + PATH_ABEMPTY$ + \"|\" + PATH_ABSOLUTE$ + \"|\" + PATH_NOSCHEME$ + \"|\" + PATH_EMPTY$ + \")\") + subexp(\"\\\\?(\" + QUERY$ + \")\") + \"?\" + subexp(\"\\\\#(\" + FRAGMENT$ + \")\") + \"?$\",\n\t\tABSOLUTE_REF$ = \"^(\" + SCHEME$ + \")\\\\:\" + subexp(subexp(\"\\\\/\\\\/(\" + subexp(\"(\" + USERINFO$ + \")@\") + \"?(\" + HOST$ + \")\" + subexp(\"\\\\:(\" + PORT$ + \")\") + \"?)\") + \"?(\" + PATH_ABEMPTY$ + \"|\" + PATH_ABSOLUTE$ + \"|\" + PATH_ROOTLESS$ + \"|\" + PATH_EMPTY$ + \")\") + subexp(\"\\\\?(\" + QUERY$ + \")\") + \"?$\",\n\t\tSAMEDOC_REF$ = \"^\" + subexp(\"\\\\#(\" + FRAGMENT$ + \")\") + \"?$\",\n\t\tAUTHORITY_REF$ = \"^\" + subexp(\"(\" + USERINFO$ + \")@\") + \"?(\" + HOST$ + \")\" + subexp(\"\\\\:(\" + PORT$ + \")\") + \"?$\"\n\t;\n\n\treturn {\n\t\tNOT_SCHEME : new RegExp(merge(\"[^]\", ALPHA$$, DIGIT$$, \"[\\\\+\\\\-\\\\.]\"), \"g\"),\n\t\tNOT_USERINFO : new RegExp(merge(\"[^\\\\%\\\\:]\", UNRESERVED$$, SUB_DELIMS$$), \"g\"),\n\t\tNOT_HOST : new RegExp(merge(\"[^\\\\%\\\\[\\\\]\\\\:]\", UNRESERVED$$, SUB_DELIMS$$), \"g\"),\n\t\tNOT_PATH : new RegExp(merge(\"[^\\\\%\\\\/\\\\:\\\\@]\", UNRESERVED$$, SUB_DELIMS$$), \"g\"),\n\t\tNOT_PATH_NOSCHEME : new RegExp(merge(\"[^\\\\%\\\\/\\\\@]\", UNRESERVED$$, SUB_DELIMS$$), \"g\"),\n\t\tNOT_QUERY : new RegExp(merge(\"[^\\\\%]\", UNRESERVED$$, SUB_DELIMS$$, \"[\\\\:\\\\@\\\\/\\\\?]\", IPRIVATE$$), \"g\"),\n\t\tNOT_FRAGMENT : new RegExp(merge(\"[^\\\\%]\", UNRESERVED$$, SUB_DELIMS$$, \"[\\\\:\\\\@\\\\/\\\\?]\"), \"g\"),\n\t\tESCAPE : new RegExp(merge(\"[^]\", UNRESERVED$$, SUB_DELIMS$$), \"g\"),\n\t\tUNRESERVED : new RegExp(UNRESERVED$$, \"g\"),\n\t\tOTHER_CHARS : new RegExp(merge(\"[^\\\\%]\", UNRESERVED$$, RESERVED$$), \"g\"),\n\t\tPCT_ENCODED : new RegExp(PCT_ENCODED$, \"g\"),\n\t\tIPV4ADDRESS : new RegExp(\"^(\" + IPV4ADDRESS$ + \")$\"),\n\t\tIPV6ADDRESS : new RegExp(\"^\\\\[?(\" + IPV6ADDRESS$ + \")\" + subexp(subexp(\"\\\\%25|\\\\%(?!\" + HEXDIG$$ + \"{2})\") + \"(\" + ZONEID$ + \")\") + \"?\\\\]?$\") //RFC 6874, with relaxed parsing rules\n\t};\n}\n\nexport default buildExps(false);\n","export function merge(...sets:Array):string {\n\tif (sets.length > 1) {\n\t\tsets[0] = sets[0].slice(0, -1);\n\t\tconst xl = sets.length - 1;\n\t\tfor (let x = 1; x < xl; ++x) {\n\t\t\tsets[x] = sets[x].slice(1, -1);\n\t\t}\n\t\tsets[xl] = sets[xl].slice(1);\n\t\treturn sets.join('');\n\t} else {\n\t\treturn sets[0];\n\t}\n}\n\nexport function subexp(str:string):string {\n\treturn \"(?:\" + str + \")\";\n}\n\nexport function typeOf(o:any):string {\n\treturn o === undefined ? \"undefined\" : (o === null ? \"null\" : Object.prototype.toString.call(o).split(\" \").pop().split(\"]\").shift().toLowerCase());\n}\n\nexport function toUpperCase(str:string):string {\n\treturn str.toUpperCase();\n}\n\nexport function toArray(obj:any):Array {\n\treturn obj !== undefined && obj !== null ? (obj instanceof Array ? obj : (typeof obj.length !== \"number\" || obj.split || obj.setInterval || obj.call ? [obj] : Array.prototype.slice.call(obj))) : [];\n}\n\n\nexport function assign(target: object, source: any): any {\n\tconst obj = target as any;\n\tif (source) {\n\t\tfor (const key in source) {\n\t\t\tobj[key] = source[key];\n\t\t}\n\t}\n\treturn obj;\n}"],"names":["SCHEMES","uuid","scheme","urn","mailto","wss","ws","https","http","urnComponents","nss","uuidComponents","toLowerCase","options","error","tolerant","match","UUID","undefined","handler","uriComponents","path","nid","schemeHandler","serialize","urnScheme","parse","matches","components","URN_PARSE","query","fields","join","length","push","name","replace","PCT_ENCODED","decodeUnreserved","toUpperCase","NOT_HFNAME","pctEncChar","headers","NOT_HFVALUE","O","mailtoComponents","body","subject","to","x","localPart","domain","iri","e","punycode","toASCII","unescapeComponent","toUnicode","toAddr","slice","atIdx","NOT_LOCAL_PART","lastIndexOf","String","xl","toArray","addr","unicodeSupport","split","unknownHeaders","hfield","toAddrs","hfields","decStr","UNRESERVED","str","pctDecChars","RegExp","merge","UNRESERVED$$","SOME_DELIMS$$","ATEXT$$","VCHAR$$","PCT_ENCODED$","QTEXT$$","subexp","HEXDIG$$","isIRI","domainHost","wsComponents","fragment","resourceName","secure","port","isSecure","host","toString","URI_PROTOCOL","IRI_PROTOCOL","ESCAPE","escapeComponent","uriA","uriB","typeOf","equal","uri","normalize","resolveComponents","baseURI","schemelessOptions","relativeURI","assign","resolve","target","relative","base","userinfo","removeDotSegments","charAt","skipNormalization","uriTokens","s","authority","absolutePath","reference","_recomposeAuthority","protocol","IPV6ADDRESS","test","output","Error","input","im","RDS5","pop","RDS3","RDS2","RDS1","$1","$2","_normalizeIPv6","_normalizeIPv4","_","uriString","isNaN","indexOf","parseInt","NO_MATCH_IS_UNDEFINED","URI_PARSE","newHost","zone","newFirst","newLast","longestZeroFields","index","b","a","allZeroFields","sort","acc","lastLongest","field","reduce","fieldCount","isLastFieldIPv4Address","firstFields","lastFields","lastFieldsStart","Array","IPV4ADDRESS","last","map","_stripLeadingZeros","first","address","reverse","NOT_FRAGMENT","NOT_QUERY","NOT_PATH","NOT_PATH_NOSCHEME","NOT_HOST","NOT_USERINFO","NOT_SCHEME","_normalizeComponentEncoding","newStr","substr","i","fromCharCode","c","c2","c3","il","chr","charCodeAt","encode","decode","ucs2encode","ucs2decode","regexNonASCII","string","mapDomain","regexPunycode","n","delta","handledCPCount","adapt","handledCPCountPlusOne","basicLength","stringFromCharCode","digitToBasic","q","floor","qMinusT","baseMinusT","t","k","bias","tMin","tMax","currentValue","maxInt","m","inputLength","delimiter","initialBias","initialN","fromCodePoint","splice","out","oldi","w","digit","basicToDigit","basic","j","baseMinusTMin","skew","numPoints","firstTime","damp","flag","codePoint","array","value","extra","counter","result","encoded","labels","fn","regexSeparators","parts","RangeError","errors","type","Math","buildExps","IPV6ADDRESS$","ZONEID$","IPV4ADDRESS$","RESERVED$$","SUB_DELIMS$$","IPRIVATE$$","ALPHA$$","DIGIT$$","AUTHORITY_REF$","USERINFO$","HOST$","PORT$","SAMEDOC_REF$","FRAGMENT$","ABSOLUTE_REF$","SCHEME$","PATH_ABEMPTY$","PATH_ABSOLUTE$","PATH_ROOTLESS$","PATH_EMPTY$","QUERY$","RELATIVE_REF$","PATH_NOSCHEME$","GENERIC_REF$","ABSOLUTE_URI$","HIER_PART$","URI_REFERENCE$","URI$","RELATIVE$","RELATIVE_PART$","AUTHORITY$","PCHAR$","PATH$","SEGMENT_NZ$","SEGMENT_NZ_NC$","SEGMENT$","IP_LITERAL$","REG_NAME$","IPV6ADDRZ_RELAXED$","IPVFUTURE$","IPV6ADDRESS1$","IPV6ADDRESS2$","IPV6ADDRESS3$","IPV6ADDRESS4$","IPV6ADDRESS5$","IPV6ADDRESS6$","IPV6ADDRESS7$","IPV6ADDRESS8$","IPV6ADDRESS9$","H16$","LS32$","DEC_OCTET_RELAXED$","DEC_OCTET$","UCSCHAR$$","GEN_DELIMS$$","SP$$","DQUOTE$$","CR$","obj","key","source","setInterval","call","prototype","o","Object","shift","sets"],"mappings":";;;;;;;AYAA,SAAA8E,KAAA,GAAA;sCAAyBsP,IAAzB;YAAA;;;QACKA,KAAKnS,MAAL,GAAc,CAAlB,EAAqB;aACf,CAAL,IAAUmS,KAAK,CAAL,EAAQzQ,KAAR,CAAc,CAAd,EAAiB,CAAC,CAAlB,CAAV;YACMK,KAAKoQ,KAAKnS,MAAL,GAAc,CAAzB;aACK,IAAIgB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ApB,CAA0BC,IAA1B,CAA/C,CAAJ,EAAqF;2BACrEH,KAAf,GAAuBH,eAAeG,KAAf,IAAwB,oBAA/C;;eAGMH,cAAP;KAZ0E;eAe/D,mBAAUA,cAAV,EAAyCE,OAAzC,EAAb;YACQJ,gBAAgBE,cAAtB;;sBAEcD,GAAd,GAAoB,CAACC,eAAeV,IAAf,IAAuB,EAAxB,EAA4BW,WAA5B,EAApB;eACOH,aAAP;;CAnBF,CAuBA;;ADhCAT,QAAQQ,QAAKN,MAAb,IAAuBM,OAAvB;AAEA,AACAR,QAAQO,UAAML,MAAd,IAAwBK,SAAxB;AAEA,AACAP,QAAQM,UAAGJ,MAAX,IAAqBI,SAArB;AAEA,AACAN,QAAQK,UAAIH,MAAZ,IAAsBG,SAAtB;AAEA,AACAL,QAAQI,UAAOF,MAAf,IAAyBE,SAAzB;AAEA,AACAJ,QAAQG,UAAID,MAAZ,IAAsBC,SAAtB;AAEA,AACAH,QAAQC,UAAKC,MAAb,IAAuBD,SAAvB,CAEA;;;;;;;;;;;;;;;;;"} \ No newline at end of file diff --git a/node_modules/uri-js/dist/es5/uri.all.min.d.ts b/node_modules/uri-js/dist/es5/uri.all.min.d.ts old mode 100644 new mode 100755 diff --git a/node_modules/uri-js/dist/es5/uri.all.min.js b/node_modules/uri-js/dist/es5/uri.all.min.js old mode 100644 new mode 100755 index 1b791ef72..09edffb7c --- a/node_modules/uri-js/dist/es5/uri.all.min.js +++ b/node_modules/uri-js/dist/es5/uri.all.min.js @@ -1,3 +1,3 @@ -/** @license URI.js v4.2.1 (c) 2011 Gary Court. License: http://github.com/garycourt/uri-js */ -!function(e,r){"object"==typeof exports&&"undefined"!=typeof module?r(exports):"function"==typeof define&&define.amd?define(["exports"],r):r(e.URI=e.URI||{})}(this,function(e){"use strict";function r(){for(var e=arguments.length,r=Array(e),n=0;n1){r[0]=r[0].slice(0,-1);for(var t=r.length-1,o=1;o1&&(t=n[0]+"@",e=n[1]),e=e.replace(j,"."),t+f(e.split("."),r).join(".")}function p(e){for(var r=[],n=0,t=e.length;n=55296&&o<=56319&&n>6|192).toString(16).toUpperCase()+"%"+(63&r|128).toString(16).toUpperCase():"%"+(r>>12|224).toString(16).toUpperCase()+"%"+(r>>6&63|128).toString(16).toUpperCase()+"%"+(63&r|128).toString(16).toUpperCase()}function d(e){for(var r="",n=0,t=e.length;n=194&&o<224){if(t-n>=6){var a=parseInt(e.substr(n+4,2),16);r+=String.fromCharCode((31&o)<<6|63&a)}else r+=e.substr(n,6);n+=6}else if(o>=224){if(t-n>=9){var i=parseInt(e.substr(n+4,2),16),u=parseInt(e.substr(n+7,2),16);r+=String.fromCharCode((15&o)<<12|(63&i)<<6|63&u)}else r+=e.substr(n,9);n+=9}else r+=e.substr(n,3),n+=3}return r}function l(e,r){function n(e){var n=d(e);return n.match(r.UNRESERVED)?n:e}return e.scheme&&(e.scheme=String(e.scheme).replace(r.PCT_ENCODED,n).toLowerCase().replace(r.NOT_SCHEME,"")),e.userinfo!==undefined&&(e.userinfo=String(e.userinfo).replace(r.PCT_ENCODED,n).replace(r.NOT_USERINFO,h).replace(r.PCT_ENCODED,o)),e.host!==undefined&&(e.host=String(e.host).replace(r.PCT_ENCODED,n).toLowerCase().replace(r.NOT_HOST,h).replace(r.PCT_ENCODED,o)),e.path!==undefined&&(e.path=String(e.path).replace(r.PCT_ENCODED,n).replace(e.scheme?r.NOT_PATH:r.NOT_PATH_NOSCHEME,h).replace(r.PCT_ENCODED,o)),e.query!==undefined&&(e.query=String(e.query).replace(r.PCT_ENCODED,n).replace(r.NOT_QUERY,h).replace(r.PCT_ENCODED,o)),e.fragment!==undefined&&(e.fragment=String(e.fragment).replace(r.PCT_ENCODED,n).replace(r.NOT_FRAGMENT,h).replace(r.PCT_ENCODED,o)),e}function g(e){return e.replace(/^0*(.*)/,"$1")||"0"}function v(e,r){var n=e.match(r.IPV4ADDRESS)||[],t=R(n,2),o=t[1];return o?o.split(".").map(g).join("."):e}function m(e,r){var n=e.match(r.IPV6ADDRESS)||[],t=R(n,3),o=t[1],a=t[2];if(o){for(var i=o.toLowerCase().split("::").reverse(),u=R(i,2),s=u[0],f=u[1],c=f?f.split(":").map(g):[],p=s.split(":").map(g),h=r.IPV4ADDRESS.test(p[p.length-1]),d=h?7:8,l=p.length-d,m=Array(d),E=0;E1){var A=m.slice(0,y.index),D=m.slice(y.index+y.length);S=A.join(":")+"::"+D.join(":")}else S=m.join(":");return a&&(S+="%"+a),S}return e}function E(e){var r=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{},n={},t=!1!==r.iri?N:F;"suffix"===r.reference&&(e=(r.scheme?r.scheme+":":"")+"//"+e);var o=e.match(J);if(o){K?(n.scheme=o[1],n.userinfo=o[3],n.host=o[4],n.port=parseInt(o[5],10),n.path=o[6]||"",n.query=o[7],n.fragment=o[8],isNaN(n.port)&&(n.port=o[5])):(n.scheme=o[1]||undefined,n.userinfo=-1!==e.indexOf("@")?o[3]:undefined,n.host=-1!==e.indexOf("//")?o[4]:undefined,n.port=parseInt(o[5],10),n.path=o[6]||"",n.query=-1!==e.indexOf("?")?o[7]:undefined,n.fragment=-1!==e.indexOf("#")?o[8]:undefined,isNaN(n.port)&&(n.port=e.match(/\/\/(?:.|\n)*\:(?:\/|\?|\#|$)/)?o[4]:undefined)),n.host&&(n.host=m(v(n.host,t),t)),n.scheme!==undefined||n.userinfo!==undefined||n.host!==undefined||n.port!==undefined||n.path||n.query!==undefined?n.scheme===undefined?n.reference="relative":n.fragment===undefined?n.reference="absolute":n.reference="uri":n.reference="same-document",r.reference&&"suffix"!==r.reference&&r.reference!==n.reference&&(n.error=n.error||"URI is not a "+r.reference+" reference.");var a=B[(r.scheme||n.scheme||"").toLowerCase()];if(r.unicodeSupport||a&&a.unicodeSupport)l(n,t);else{if(n.host&&(r.domainHost||a&&a.domainHost))try{n.host=Y.toASCII(n.host.replace(t.PCT_ENCODED,d).toLowerCase())}catch(i){n.error=n.error||"Host's domain name can not be converted to ASCII via punycode: "+i}l(n,F)}a&&a.parse&&a.parse(n,r)}else n.error=n.error||"URI can not be parsed.";return n}function C(e,r){var n=!1!==r.iri?N:F,t=[];return e.userinfo!==undefined&&(t.push(e.userinfo),t.push("@")),e.host!==undefined&&t.push(m(v(String(e.host),n),n).replace(n.IPV6ADDRESS,function(e,r,n){return"["+r+(n?"%25"+n:"")+"]"})),"number"==typeof e.port&&(t.push(":"),t.push(e.port.toString(10))),t.length?t.join(""):undefined}function y(e){for(var r=[];e.length;)if(e.match(W))e=e.replace(W,"");else if(e.match(X))e=e.replace(X,"/");else if(e.match(ee))e=e.replace(ee,"/"),r.pop();else if("."===e||".."===e)e="";else{var n=e.match(re);if(!n)throw new Error("Unexpected dot segment condition");var t=n[0];e=e.slice(t.length),r.push(t)}return r.join("")}function S(e){var r=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{},n=r.iri?N:F,t=[],o=B[(r.scheme||e.scheme||"").toLowerCase()];if(o&&o.serialize&&o.serialize(e,r),e.host)if(n.IPV6ADDRESS.test(e.host));else if(r.domainHost||o&&o.domainHost)try{e.host=r.iri?Y.toUnicode(e.host):Y.toASCII(e.host.replace(n.PCT_ENCODED,d).toLowerCase())}catch(u){e.error=e.error||"Host's domain name can not be converted to "+(r.iri?"Unicode":"ASCII")+" via punycode: "+u}l(e,n),"suffix"!==r.reference&&e.scheme&&(t.push(e.scheme),t.push(":"));var a=C(e,r);if(a!==undefined&&("suffix"!==r.reference&&t.push("//"),t.push(a),e.path&&"/"!==e.path.charAt(0)&&t.push("/")),e.path!==undefined){var i=e.path;r.absolutePath||o&&o.absolutePath||(i=y(i)),a===undefined&&(i=i.replace(/^\/\//,"/%2F")),t.push(i)}return e.query!==undefined&&(t.push("?"),t.push(e.query)),e.fragment!==undefined&&(t.push("#"),t.push(e.fragment)),t.join("")}function A(e,r){var n=arguments.length>2&&arguments[2]!==undefined?arguments[2]:{},t=arguments[3],o={};return t||(e=E(S(e,n),n),r=E(S(r,n),n)),n=n||{},!n.tolerant&&r.scheme?(o.scheme=r.scheme,o.userinfo=r.userinfo,o.host=r.host,o.port=r.port,o.path=y(r.path||""),o.query=r.query):(r.userinfo!==undefined||r.host!==undefined||r.port!==undefined?(o.userinfo=r.userinfo,o.host=r.host,o.port=r.port,o.path=y(r.path||""),o.query=r.query):(r.path?("/"===r.path.charAt(0)?o.path=y(r.path):(e.userinfo===undefined&&e.host===undefined&&e.port===undefined||e.path?e.path?o.path=e.path.slice(0,e.path.lastIndexOf("/")+1)+r.path:o.path=r.path:o.path="/"+r.path,o.path=y(o.path)),o.query=r.query):(o.path=e.path,r.query!==undefined?o.query=r.query:o.query=e.query),o.userinfo=e.userinfo,o.host=e.host,o.port=e.port),o.scheme=e.scheme),o.fragment=r.fragment,o}function D(e,r,n){var t=i({scheme:"null"},n);return S(A(E(e,t),E(r,t),t,!0),t)}function w(e,r){return"string"==typeof e?e=S(E(e,r),r):"object"===t(e)&&(e=E(S(e,r),r)),e}function b(e,r,n){return"string"==typeof e?e=S(E(e,n),n):"object"===t(e)&&(e=S(e,n)),"string"==typeof r?r=S(E(r,n),n):"object"===t(r)&&(r=S(r,n)),e===r}function x(e,r){return e&&e.toString().replace(r&&r.iri?N.ESCAPE:F.ESCAPE,h)}function O(e,r){return e&&e.toString().replace(r&&r.iri?N.PCT_ENCODED:F.PCT_ENCODED,d)}function I(e){var r=d(e);return r.match(fe)?r:e}var F=u(!1),N=u(!0),R=function(){function e(e,r){var n=[],t=!0,o=!1,a=undefined;try{for(var i,u=e[Symbol.iterator]();!(t=(i=u.next()).done)&&(n.push(i.value),!r||n.length!==r);t=!0);}catch(s){o=!0,a=s}finally{try{!t&&u["return"]&&u["return"]()}finally{if(o)throw a}}return n}return function(r,n){if(Array.isArray(r))return r;if(Symbol.iterator in Object(r))return e(r,n);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),T=function(e){if(Array.isArray(e)){for(var r=0,n=Array(e.length);r= 0x80 (not a basic code point)","invalid-input":"Invalid input"},H=Math.floor,z=String.fromCharCode,L=function(e){return String.fromCodePoint.apply(String,T(e))},$=function(e){return e-48<10?e-22:e-65<26?e-65:e-97<26?e-97:36},M=function(e,r){return e+22+75*(e<26)-((0!=r)<<5)},V=function(e,r,n){var t=0;for(e=n?H(e/700):e>>1,e+=H(e/r);e>455;t+=36)e=H(e/35);return H(t+36*e/(e+38))},k=function(e){var r=[],n=e.length,t=0,o=128,a=72,i=e.lastIndexOf("-");i<0&&(i=0);for(var u=0;u=128&&s("not-basic"),r.push(e.charCodeAt(u));for(var f=i>0?i+1:0;f=n&&s("invalid-input");var d=$(e.charCodeAt(f++));(d>=36||d>H((_-t)/p))&&s("overflow"),t+=d*p;var l=h<=a?1:h>=a+26?26:h-a;if(dH(_/g)&&s("overflow"),p*=g}var v=r.length+1;a=V(t-c,v,0==c),H(t/v)>_-o&&s("overflow"),o+=H(t/v),t%=v,r.splice(t++,0,o)}return String.fromCodePoint.apply(String,r)},Z=function(e){var r=[];e=p(e);var n=e.length,t=128,o=0,a=72,i=!0,u=!1,f=undefined;try{for(var c,h=e[Symbol.iterator]();!(i=(c=h.next()).done);i=!0){var d=c.value;d<128&&r.push(z(d))}}catch(j){u=!0,f=j}finally{try{!i&&h["return"]&&h["return"]()}finally{if(u)throw f}}var l=r.length,g=l;for(l&&r.push("-");g=t&&AH((_-o)/D)&&s("overflow"),o+=(v-t)*D,t=v;var w=!0,b=!1,x=undefined;try{for(var O,I=e[Symbol.iterator]();!(w=(O=I.next()).done);w=!0){var F=O.value;if(F_&&s("overflow"),F==t){for(var N=o,R=36;;R+=36){var T=R<=a?1:R>=a+26?26:R-a;if(NA-Z\\x5E-\\x7E]",'[\\"\\\\]'),fe=new RegExp(ae,"g"),ce=new RegExp(ue,"g"),pe=new RegExp(r("[^]","[A-Za-z0-9\\!\\$\\%\\'\\*\\+\\-\\^\\_\\`\\{\\|\\}\\~]","[\\.]",'[\\"]',se),"g"),he=new RegExp(r("[^]",ae,"[\\!\\$\\'\\(\\)\\*\\+\\,\\;\\:\\@]"),"g"),de=he,le={scheme:"mailto",parse:function(e,r){var n=e,t=n.to=n.path?n.path.split(","):[];if(n.path=undefined,n.query){for(var o=!1,a={},i=n.query.split("&"),u=0,s=i.length;u1){r[0]=r[0].slice(0,-1);for(var t=r.length-1,o=1;o1&&(t=n[0]+"@",e=n[1]),e=e.replace(j,"."),t+f(e.split("."),r).join(".")}function p(e){for(var r=[],n=0,t=e.length;n=55296&&o<=56319&&n>6|192).toString(16).toUpperCase()+"%"+(63&r|128).toString(16).toUpperCase():"%"+(r>>12|224).toString(16).toUpperCase()+"%"+(r>>6&63|128).toString(16).toUpperCase()+"%"+(63&r|128).toString(16).toUpperCase()}function d(e){for(var r="",n=0,t=e.length;n=194&&o<224){if(t-n>=6){var a=parseInt(e.substr(n+4,2),16);r+=String.fromCharCode((31&o)<<6|63&a)}else r+=e.substr(n,6);n+=6}else if(o>=224){if(t-n>=9){var i=parseInt(e.substr(n+4,2),16),u=parseInt(e.substr(n+7,2),16);r+=String.fromCharCode((15&o)<<12|(63&i)<<6|63&u)}else r+=e.substr(n,9);n+=9}else r+=e.substr(n,3),n+=3}return r}function l(e,r){function n(e){var n=d(e);return n.match(r.UNRESERVED)?n:e}return e.scheme&&(e.scheme=String(e.scheme).replace(r.PCT_ENCODED,n).toLowerCase().replace(r.NOT_SCHEME,"")),e.userinfo!==undefined&&(e.userinfo=String(e.userinfo).replace(r.PCT_ENCODED,n).replace(r.NOT_USERINFO,h).replace(r.PCT_ENCODED,o)),e.host!==undefined&&(e.host=String(e.host).replace(r.PCT_ENCODED,n).toLowerCase().replace(r.NOT_HOST,h).replace(r.PCT_ENCODED,o)),e.path!==undefined&&(e.path=String(e.path).replace(r.PCT_ENCODED,n).replace(e.scheme?r.NOT_PATH:r.NOT_PATH_NOSCHEME,h).replace(r.PCT_ENCODED,o)),e.query!==undefined&&(e.query=String(e.query).replace(r.PCT_ENCODED,n).replace(r.NOT_QUERY,h).replace(r.PCT_ENCODED,o)),e.fragment!==undefined&&(e.fragment=String(e.fragment).replace(r.PCT_ENCODED,n).replace(r.NOT_FRAGMENT,h).replace(r.PCT_ENCODED,o)),e}function m(e){return e.replace(/^0*(.*)/,"$1")||"0"}function g(e,r){var n=e.match(r.IPV4ADDRESS)||[],t=T(n,2),o=t[1];return o?o.split(".").map(m).join("."):e}function v(e,r){var n=e.match(r.IPV6ADDRESS)||[],t=T(n,3),o=t[1],a=t[2];if(o){for(var i=o.toLowerCase().split("::").reverse(),u=T(i,2),s=u[0],f=u[1],c=f?f.split(":").map(m):[],p=s.split(":").map(m),h=r.IPV4ADDRESS.test(p[p.length-1]),d=h?7:8,l=p.length-d,v=Array(d),E=0;E1){var A=v.slice(0,y.index),D=v.slice(y.index+y.length);S=A.join(":")+"::"+D.join(":")}else S=v.join(":");return a&&(S+="%"+a),S}return e}function E(e){var r=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{},n={},t=!1!==r.iri?R:F;"suffix"===r.reference&&(e=(r.scheme?r.scheme+":":"")+"//"+e);var o=e.match(K);if(o){W?(n.scheme=o[1],n.userinfo=o[3],n.host=o[4],n.port=parseInt(o[5],10),n.path=o[6]||"",n.query=o[7],n.fragment=o[8],isNaN(n.port)&&(n.port=o[5])):(n.scheme=o[1]||undefined,n.userinfo=-1!==e.indexOf("@")?o[3]:undefined,n.host=-1!==e.indexOf("//")?o[4]:undefined,n.port=parseInt(o[5],10),n.path=o[6]||"",n.query=-1!==e.indexOf("?")?o[7]:undefined,n.fragment=-1!==e.indexOf("#")?o[8]:undefined,isNaN(n.port)&&(n.port=e.match(/\/\/(?:.|\n)*\:(?:\/|\?|\#|$)/)?o[4]:undefined)),n.host&&(n.host=v(g(n.host,t),t)),n.scheme!==undefined||n.userinfo!==undefined||n.host!==undefined||n.port!==undefined||n.path||n.query!==undefined?n.scheme===undefined?n.reference="relative":n.fragment===undefined?n.reference="absolute":n.reference="uri":n.reference="same-document",r.reference&&"suffix"!==r.reference&&r.reference!==n.reference&&(n.error=n.error||"URI is not a "+r.reference+" reference.");var a=J[(r.scheme||n.scheme||"").toLowerCase()];if(r.unicodeSupport||a&&a.unicodeSupport)l(n,t);else{if(n.host&&(r.domainHost||a&&a.domainHost))try{n.host=B.toASCII(n.host.replace(t.PCT_ENCODED,d).toLowerCase())}catch(i){n.error=n.error||"Host's domain name can not be converted to ASCII via punycode: "+i}l(n,F)}a&&a.parse&&a.parse(n,r)}else n.error=n.error||"URI can not be parsed.";return n}function C(e,r){var n=!1!==r.iri?R:F,t=[];return e.userinfo!==undefined&&(t.push(e.userinfo),t.push("@")),e.host!==undefined&&t.push(v(g(String(e.host),n),n).replace(n.IPV6ADDRESS,function(e,r,n){return"["+r+(n?"%25"+n:"")+"]"})),"number"!=typeof e.port&&"string"!=typeof e.port||(t.push(":"),t.push(String(e.port))),t.length?t.join(""):undefined}function y(e){for(var r=[];e.length;)if(e.match(X))e=e.replace(X,"");else if(e.match(ee))e=e.replace(ee,"/");else if(e.match(re))e=e.replace(re,"/"),r.pop();else if("."===e||".."===e)e="";else{var n=e.match(ne);if(!n)throw new Error("Unexpected dot segment condition");var t=n[0];e=e.slice(t.length),r.push(t)}return r.join("")}function S(e){var r=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{},n=r.iri?R:F,t=[],o=J[(r.scheme||e.scheme||"").toLowerCase()];if(o&&o.serialize&&o.serialize(e,r),e.host)if(n.IPV6ADDRESS.test(e.host));else if(r.domainHost||o&&o.domainHost)try{e.host=r.iri?B.toUnicode(e.host):B.toASCII(e.host.replace(n.PCT_ENCODED,d).toLowerCase())}catch(u){e.error=e.error||"Host's domain name can not be converted to "+(r.iri?"Unicode":"ASCII")+" via punycode: "+u}l(e,n),"suffix"!==r.reference&&e.scheme&&(t.push(e.scheme),t.push(":"));var a=C(e,r);if(a!==undefined&&("suffix"!==r.reference&&t.push("//"),t.push(a),e.path&&"/"!==e.path.charAt(0)&&t.push("/")),e.path!==undefined){var i=e.path;r.absolutePath||o&&o.absolutePath||(i=y(i)),a===undefined&&(i=i.replace(/^\/\//,"/%2F")),t.push(i)}return e.query!==undefined&&(t.push("?"),t.push(e.query)),e.fragment!==undefined&&(t.push("#"),t.push(e.fragment)),t.join("")}function A(e,r){var n=arguments.length>2&&arguments[2]!==undefined?arguments[2]:{},t=arguments[3],o={};return t||(e=E(S(e,n),n),r=E(S(r,n),n)),n=n||{},!n.tolerant&&r.scheme?(o.scheme=r.scheme,o.userinfo=r.userinfo,o.host=r.host,o.port=r.port,o.path=y(r.path||""),o.query=r.query):(r.userinfo!==undefined||r.host!==undefined||r.port!==undefined?(o.userinfo=r.userinfo,o.host=r.host,o.port=r.port,o.path=y(r.path||""),o.query=r.query):(r.path?("/"===r.path.charAt(0)?o.path=y(r.path):(e.userinfo===undefined&&e.host===undefined&&e.port===undefined||e.path?e.path?o.path=e.path.slice(0,e.path.lastIndexOf("/")+1)+r.path:o.path=r.path:o.path="/"+r.path,o.path=y(o.path)),o.query=r.query):(o.path=e.path,r.query!==undefined?o.query=r.query:o.query=e.query),o.userinfo=e.userinfo,o.host=e.host,o.port=e.port),o.scheme=e.scheme),o.fragment=r.fragment,o}function D(e,r,n){var t=i({scheme:"null"},n);return S(A(E(e,t),E(r,t),t,!0),t)}function w(e,r){return"string"==typeof e?e=S(E(e,r),r):"object"===t(e)&&(e=E(S(e,r),r)),e}function b(e,r,n){return"string"==typeof e?e=S(E(e,n),n):"object"===t(e)&&(e=S(e,n)),"string"==typeof r?r=S(E(r,n),n):"object"===t(r)&&(r=S(r,n)),e===r}function x(e,r){return e&&e.toString().replace(r&&r.iri?R.ESCAPE:F.ESCAPE,h)}function O(e,r){return e&&e.toString().replace(r&&r.iri?R.PCT_ENCODED:F.PCT_ENCODED,d)}function N(e){return"boolean"==typeof e.secure?e.secure:"wss"===String(e.scheme).toLowerCase()}function I(e){var r=d(e);return r.match(he)?r:e}var F=u(!1),R=u(!0),T=function(){function e(e,r){var n=[],t=!0,o=!1,a=undefined;try{for(var i,u=e[Symbol.iterator]();!(t=(i=u.next()).done)&&(n.push(i.value),!r||n.length!==r);t=!0);}catch(s){o=!0,a=s}finally{try{!t&&u["return"]&&u["return"]()}finally{if(o)throw a}}return n}return function(r,n){if(Array.isArray(r))return r;if(Symbol.iterator in Object(r))return e(r,n);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),_=function(e){if(Array.isArray(e)){for(var r=0,n=Array(e.length);r= 0x80 (not a basic code point)","invalid-input":"Invalid input"},z=Math.floor,L=String.fromCharCode,$=function(e){return String.fromCodePoint.apply(String,_(e))},M=function(e){return e-48<10?e-22:e-65<26?e-65:e-97<26?e-97:36},V=function(e,r){return e+22+75*(e<26)-((0!=r)<<5)},k=function(e,r,n){var t=0;for(e=n?z(e/700):e>>1,e+=z(e/r);e>455;t+=36)e=z(e/35);return z(t+36*e/(e+38))},Z=function(e){var r=[],n=e.length,t=0,o=128,a=72,i=e.lastIndexOf("-");i<0&&(i=0);for(var u=0;u=128&&s("not-basic"),r.push(e.charCodeAt(u));for(var f=i>0?i+1:0;f=n&&s("invalid-input");var d=M(e.charCodeAt(f++));(d>=36||d>z((P-t)/p))&&s("overflow"),t+=d*p;var l=h<=a?1:h>=a+26?26:h-a;if(dz(P/m)&&s("overflow"),p*=m}var g=r.length+1;a=k(t-c,g,0==c),z(t/g)>P-o&&s("overflow"),o+=z(t/g),t%=g,r.splice(t++,0,o)}return String.fromCodePoint.apply(String,r)},G=function(e){var r=[];e=p(e);var n=e.length,t=128,o=0,a=72,i=!0,u=!1,f=undefined;try{for(var c,h=e[Symbol.iterator]();!(i=(c=h.next()).done);i=!0){var d=c.value;d<128&&r.push(L(d))}}catch(U){u=!0,f=U}finally{try{!i&&h["return"]&&h["return"]()}finally{if(u)throw f}}var l=r.length,m=l;for(l&&r.push("-");m=t&&Az((P-o)/D)&&s("overflow"),o+=(g-t)*D,t=g;var w=!0,b=!1,x=undefined;try{for(var O,N=e[Symbol.iterator]();!(w=(O=N.next()).done);w=!0){var I=O.value;if(IP&&s("overflow"),I==t){for(var F=o,R=36;;R+=36){var T=R<=a?1:R>=a+26?26:R-a;if(FA-Z\\x5E-\\x7E]",'[\\"\\\\]'),he=new RegExp(se,"g"),de=new RegExp(ce,"g"),le=new RegExp(r("[^]","[A-Za-z0-9\\!\\$\\%\\'\\*\\+\\-\\^\\_\\`\\{\\|\\}\\~]","[\\.]",'[\\"]',pe),"g"),me=new RegExp(r("[^]",se,"[\\!\\$\\'\\(\\)\\*\\+\\,\\;\\:\\@]"),"g"),ge=me,ve={scheme:"mailto",parse:function(e,r){var n=e,t=n.to=n.path?n.path.split(","):[];if(n.path=undefined,n.query){for(var o=!1,a={},i=n.query.split("&"),u=0,s=i.length;u):string {\n\tif (sets.length > 1) {\n\t\tsets[0] = sets[0].slice(0, -1);\n\t\tconst xl = sets.length - 1;\n\t\tfor (let x = 1; x < xl; ++x) {\n\t\t\tsets[x] = sets[x].slice(1, -1);\n\t\t}\n\t\tsets[xl] = sets[xl].slice(1);\n\t\treturn sets.join('');\n\t} else {\n\t\treturn sets[0];\n\t}\n}\n\nexport function subexp(str:string):string {\n\treturn \"(?:\" + str + \")\";\n}\n\nexport function typeOf(o:any):string {\n\treturn o === undefined ? \"undefined\" : (o === null ? \"null\" : Object.prototype.toString.call(o).split(\" \").pop().split(\"]\").shift().toLowerCase());\n}\n\nexport function toUpperCase(str:string):string {\n\treturn str.toUpperCase();\n}\n\nexport function toArray(obj:any):Array {\n\treturn obj !== undefined && obj !== null ? (obj instanceof Array ? obj : (typeof obj.length !== \"number\" || obj.split || obj.setInterval || obj.call ? [obj] : Array.prototype.slice.call(obj))) : [];\n}\n\n\nexport function assign(target: object, source: any): any {\n\tconst obj = target as any;\n\tif (source) {\n\t\tfor (const key in source) {\n\t\t\tobj[key] = source[key];\n\t\t}\n\t}\n\treturn obj;\n}","import { URIRegExps } from \"./uri\";\nimport { merge, subexp } from \"./util\";\n\nexport function buildExps(isIRI:boolean):URIRegExps {\n\tconst\n\t\tALPHA$$ = \"[A-Za-z]\",\n\t\tCR$ = \"[\\\\x0D]\",\n\t\tDIGIT$$ = \"[0-9]\",\n\t\tDQUOTE$$ = \"[\\\\x22]\",\n\t\tHEXDIG$$ = merge(DIGIT$$, \"[A-Fa-f]\"), //case-insensitive\n\t\tLF$$ = \"[\\\\x0A]\",\n\t\tSP$$ = \"[\\\\x20]\",\n\t\tPCT_ENCODED$ = subexp(subexp(\"%[EFef]\" + HEXDIG$$ + \"%\" + HEXDIG$$ + HEXDIG$$ + \"%\" + HEXDIG$$ + HEXDIG$$) + \"|\" + subexp(\"%[89A-Fa-f]\" + HEXDIG$$ + \"%\" + HEXDIG$$ + HEXDIG$$) + \"|\" + subexp(\"%\" + HEXDIG$$ + HEXDIG$$)), //expanded\n\t\tGEN_DELIMS$$ = \"[\\\\:\\\\/\\\\?\\\\#\\\\[\\\\]\\\\@]\",\n\t\tSUB_DELIMS$$ = \"[\\\\!\\\\$\\\\&\\\\'\\\\(\\\\)\\\\*\\\\+\\\\,\\\\;\\\\=]\",\n\t\tRESERVED$$ = merge(GEN_DELIMS$$, SUB_DELIMS$$),\n\t\tUCSCHAR$$ = isIRI ? \"[\\\\xA0-\\\\u200D\\\\u2010-\\\\u2029\\\\u202F-\\\\uD7FF\\\\uF900-\\\\uFDCF\\\\uFDF0-\\\\uFFEF]\" : \"[]\", //subset, excludes bidi control characters\n\t\tIPRIVATE$$ = isIRI ? \"[\\\\uE000-\\\\uF8FF]\" : \"[]\", //subset\n\t\tUNRESERVED$$ = merge(ALPHA$$, DIGIT$$, \"[\\\\-\\\\.\\\\_\\\\~]\", UCSCHAR$$),\n\t\tSCHEME$ = subexp(ALPHA$$ + merge(ALPHA$$, DIGIT$$, \"[\\\\+\\\\-\\\\.]\") + \"*\"),\n\t\tUSERINFO$ = subexp(subexp(PCT_ENCODED$ + \"|\" + merge(UNRESERVED$$, SUB_DELIMS$$, \"[\\\\:]\")) + \"*\"),\n\t\tDEC_OCTET$ = subexp(subexp(\"25[0-5]\") + \"|\" + subexp(\"2[0-4]\" + DIGIT$$) + \"|\" + subexp(\"1\" + DIGIT$$ + DIGIT$$) + \"|\" + subexp(\"[1-9]\" + DIGIT$$) + \"|\" + DIGIT$$),\n\t\tDEC_OCTET_RELAXED$ = subexp(subexp(\"25[0-5]\") + \"|\" + subexp(\"2[0-4]\" + DIGIT$$) + \"|\" + subexp(\"1\" + DIGIT$$ + DIGIT$$) + \"|\" + subexp(\"0?[1-9]\" + DIGIT$$) + \"|0?0?\" + DIGIT$$), //relaxed parsing rules\n\t\tIPV4ADDRESS$ = subexp(DEC_OCTET_RELAXED$ + \"\\\\.\" + DEC_OCTET_RELAXED$ + \"\\\\.\" + DEC_OCTET_RELAXED$ + \"\\\\.\" + DEC_OCTET_RELAXED$),\n\t\tH16$ = subexp(HEXDIG$$ + \"{1,4}\"),\n\t\tLS32$ = subexp(subexp(H16$ + \"\\\\:\" + H16$) + \"|\" + IPV4ADDRESS$),\n\t\tIPV6ADDRESS1$ = subexp( subexp(H16$ + \"\\\\:\") + \"{6}\" + LS32$), // 6( h16 \":\" ) ls32\n\t\tIPV6ADDRESS2$ = subexp( \"\\\\:\\\\:\" + subexp(H16$ + \"\\\\:\") + \"{5}\" + LS32$), // \"::\" 5( h16 \":\" ) ls32\n\t\tIPV6ADDRESS3$ = subexp(subexp( H16$) + \"?\\\\:\\\\:\" + subexp(H16$ + \"\\\\:\") + \"{4}\" + LS32$), //[ h16 ] \"::\" 4( h16 \":\" ) ls32\n\t\tIPV6ADDRESS4$ = subexp(subexp(subexp(H16$ + \"\\\\:\") + \"{0,1}\" + H16$) + \"?\\\\:\\\\:\" + subexp(H16$ + \"\\\\:\") + \"{3}\" + LS32$), //[ *1( h16 \":\" ) h16 ] \"::\" 3( h16 \":\" ) ls32\n\t\tIPV6ADDRESS5$ = subexp(subexp(subexp(H16$ + \"\\\\:\") + \"{0,2}\" + H16$) + \"?\\\\:\\\\:\" + subexp(H16$ + \"\\\\:\") + \"{2}\" + LS32$), //[ *2( h16 \":\" ) h16 ] \"::\" 2( h16 \":\" ) ls32\n\t\tIPV6ADDRESS6$ = subexp(subexp(subexp(H16$ + \"\\\\:\") + \"{0,3}\" + H16$) + \"?\\\\:\\\\:\" + H16$ + \"\\\\:\" + LS32$), //[ *3( h16 \":\" ) h16 ] \"::\" h16 \":\" ls32\n\t\tIPV6ADDRESS7$ = subexp(subexp(subexp(H16$ + \"\\\\:\") + \"{0,4}\" + H16$) + \"?\\\\:\\\\:\" + LS32$), //[ *4( h16 \":\" ) h16 ] \"::\" ls32\n\t\tIPV6ADDRESS8$ = subexp(subexp(subexp(H16$ + \"\\\\:\") + \"{0,5}\" + H16$) + \"?\\\\:\\\\:\" + H16$ ), //[ *5( h16 \":\" ) h16 ] \"::\" h16\n\t\tIPV6ADDRESS9$ = subexp(subexp(subexp(H16$ + \"\\\\:\") + \"{0,6}\" + H16$) + \"?\\\\:\\\\:\" ), //[ *6( h16 \":\" ) h16 ] \"::\"\n\t\tIPV6ADDRESS$ = subexp([IPV6ADDRESS1$, IPV6ADDRESS2$, IPV6ADDRESS3$, IPV6ADDRESS4$, IPV6ADDRESS5$, IPV6ADDRESS6$, IPV6ADDRESS7$, IPV6ADDRESS8$, IPV6ADDRESS9$].join(\"|\")),\n\t\tZONEID$ = subexp(subexp(UNRESERVED$$ + \"|\" + PCT_ENCODED$) + \"+\"), //RFC 6874\n\t\tIPV6ADDRZ$ = subexp(IPV6ADDRESS$ + \"\\\\%25\" + ZONEID$), //RFC 6874\n\t\tIPV6ADDRZ_RELAXED$ = subexp(IPV6ADDRESS$ + subexp(\"\\\\%25|\\\\%(?!\" + HEXDIG$$ + \"{2})\") + ZONEID$), //RFC 6874, with relaxed parsing rules\n\t\tIPVFUTURE$ = subexp(\"[vV]\" + HEXDIG$$ + \"+\\\\.\" + merge(UNRESERVED$$, SUB_DELIMS$$, \"[\\\\:]\") + \"+\"),\n\t\tIP_LITERAL$ = subexp(\"\\\\[\" + subexp(IPV6ADDRZ_RELAXED$ + \"|\" + IPV6ADDRESS$ + \"|\" + IPVFUTURE$) + \"\\\\]\"), //RFC 6874\n\t\tREG_NAME$ = subexp(subexp(PCT_ENCODED$ + \"|\" + merge(UNRESERVED$$, SUB_DELIMS$$)) + \"*\"),\n\t\tHOST$ = subexp(IP_LITERAL$ + \"|\" + IPV4ADDRESS$ + \"(?!\" + REG_NAME$ + \")\" + \"|\" + REG_NAME$),\n\t\tPORT$ = subexp(DIGIT$$ + \"*\"),\n\t\tAUTHORITY$ = subexp(subexp(USERINFO$ + \"@\") + \"?\" + HOST$ + subexp(\"\\\\:\" + PORT$) + \"?\"),\n\t\tPCHAR$ = subexp(PCT_ENCODED$ + \"|\" + merge(UNRESERVED$$, SUB_DELIMS$$, \"[\\\\:\\\\@]\")),\n\t\tSEGMENT$ = subexp(PCHAR$ + \"*\"),\n\t\tSEGMENT_NZ$ = subexp(PCHAR$ + \"+\"),\n\t\tSEGMENT_NZ_NC$ = subexp(subexp(PCT_ENCODED$ + \"|\" + merge(UNRESERVED$$, SUB_DELIMS$$, \"[\\\\@]\")) + \"+\"),\n\t\tPATH_ABEMPTY$ = subexp(subexp(\"\\\\/\" + SEGMENT$) + \"*\"),\n\t\tPATH_ABSOLUTE$ = subexp(\"\\\\/\" + subexp(SEGMENT_NZ$ + PATH_ABEMPTY$) + \"?\"), //simplified\n\t\tPATH_NOSCHEME$ = subexp(SEGMENT_NZ_NC$ + PATH_ABEMPTY$), //simplified\n\t\tPATH_ROOTLESS$ = subexp(SEGMENT_NZ$ + PATH_ABEMPTY$), //simplified\n\t\tPATH_EMPTY$ = \"(?!\" + PCHAR$ + \")\",\n\t\tPATH$ = subexp(PATH_ABEMPTY$ + \"|\" + PATH_ABSOLUTE$ + \"|\" + PATH_NOSCHEME$ + \"|\" + PATH_ROOTLESS$ + \"|\" + PATH_EMPTY$),\n\t\tQUERY$ = subexp(subexp(PCHAR$ + \"|\" + merge(\"[\\\\/\\\\?]\", IPRIVATE$$)) + \"*\"),\n\t\tFRAGMENT$ = subexp(subexp(PCHAR$ + \"|[\\\\/\\\\?]\") + \"*\"),\n\t\tHIER_PART$ = subexp(subexp(\"\\\\/\\\\/\" + AUTHORITY$ + PATH_ABEMPTY$) + \"|\" + PATH_ABSOLUTE$ + \"|\" + PATH_ROOTLESS$ + \"|\" + PATH_EMPTY$),\n\t\tURI$ = subexp(SCHEME$ + \"\\\\:\" + HIER_PART$ + subexp(\"\\\\?\" + QUERY$) + \"?\" + subexp(\"\\\\#\" + FRAGMENT$) + \"?\"),\n\t\tRELATIVE_PART$ = subexp(subexp(\"\\\\/\\\\/\" + AUTHORITY$ + PATH_ABEMPTY$) + \"|\" + PATH_ABSOLUTE$ + \"|\" + PATH_NOSCHEME$ + \"|\" + PATH_EMPTY$),\n\t\tRELATIVE$ = subexp(RELATIVE_PART$ + subexp(\"\\\\?\" + QUERY$) + \"?\" + subexp(\"\\\\#\" + FRAGMENT$) + \"?\"),\n\t\tURI_REFERENCE$ = subexp(URI$ + \"|\" + RELATIVE$),\n\t\tABSOLUTE_URI$ = subexp(SCHEME$ + \"\\\\:\" + HIER_PART$ + subexp(\"\\\\?\" + QUERY$) + \"?\"),\n\n\t\tGENERIC_REF$ = \"^(\" + SCHEME$ + \")\\\\:\" + subexp(subexp(\"\\\\/\\\\/(\" + subexp(\"(\" + USERINFO$ + \")@\") + \"?(\" + HOST$ + \")\" + subexp(\"\\\\:(\" + PORT$ + \")\") + \"?)\") + \"?(\" + PATH_ABEMPTY$ + \"|\" + PATH_ABSOLUTE$ + \"|\" + PATH_ROOTLESS$ + \"|\" + PATH_EMPTY$ + \")\") + subexp(\"\\\\?(\" + QUERY$ + \")\") + \"?\" + subexp(\"\\\\#(\" + FRAGMENT$ + \")\") + \"?$\",\n\t\tRELATIVE_REF$ = \"^(){0}\" + subexp(subexp(\"\\\\/\\\\/(\" + subexp(\"(\" + USERINFO$ + \")@\") + \"?(\" + HOST$ + \")\" + subexp(\"\\\\:(\" + PORT$ + \")\") + \"?)\") + \"?(\" + PATH_ABEMPTY$ + \"|\" + PATH_ABSOLUTE$ + \"|\" + PATH_NOSCHEME$ + \"|\" + PATH_EMPTY$ + \")\") + subexp(\"\\\\?(\" + QUERY$ + \")\") + \"?\" + subexp(\"\\\\#(\" + FRAGMENT$ + \")\") + \"?$\",\n\t\tABSOLUTE_REF$ = \"^(\" + SCHEME$ + \")\\\\:\" + subexp(subexp(\"\\\\/\\\\/(\" + subexp(\"(\" + USERINFO$ + \")@\") + \"?(\" + HOST$ + \")\" + subexp(\"\\\\:(\" + PORT$ + \")\") + \"?)\") + \"?(\" + PATH_ABEMPTY$ + \"|\" + PATH_ABSOLUTE$ + \"|\" + PATH_ROOTLESS$ + \"|\" + PATH_EMPTY$ + \")\") + subexp(\"\\\\?(\" + QUERY$ + \")\") + \"?$\",\n\t\tSAMEDOC_REF$ = \"^\" + subexp(\"\\\\#(\" + FRAGMENT$ + \")\") + \"?$\",\n\t\tAUTHORITY_REF$ = \"^\" + subexp(\"(\" + USERINFO$ + \")@\") + \"?(\" + HOST$ + \")\" + subexp(\"\\\\:(\" + PORT$ + \")\") + \"?$\"\n\t;\n\n\treturn {\n\t\tNOT_SCHEME : new RegExp(merge(\"[^]\", ALPHA$$, DIGIT$$, \"[\\\\+\\\\-\\\\.]\"), \"g\"),\n\t\tNOT_USERINFO : new RegExp(merge(\"[^\\\\%\\\\:]\", UNRESERVED$$, SUB_DELIMS$$), \"g\"),\n\t\tNOT_HOST : new RegExp(merge(\"[^\\\\%\\\\[\\\\]\\\\:]\", UNRESERVED$$, SUB_DELIMS$$), \"g\"),\n\t\tNOT_PATH : new RegExp(merge(\"[^\\\\%\\\\/\\\\:\\\\@]\", UNRESERVED$$, SUB_DELIMS$$), \"g\"),\n\t\tNOT_PATH_NOSCHEME : new RegExp(merge(\"[^\\\\%\\\\/\\\\@]\", UNRESERVED$$, SUB_DELIMS$$), \"g\"),\n\t\tNOT_QUERY : new RegExp(merge(\"[^\\\\%]\", UNRESERVED$$, SUB_DELIMS$$, \"[\\\\:\\\\@\\\\/\\\\?]\", IPRIVATE$$), \"g\"),\n\t\tNOT_FRAGMENT : new RegExp(merge(\"[^\\\\%]\", UNRESERVED$$, SUB_DELIMS$$, \"[\\\\:\\\\@\\\\/\\\\?]\"), \"g\"),\n\t\tESCAPE : new RegExp(merge(\"[^]\", UNRESERVED$$, SUB_DELIMS$$), \"g\"),\n\t\tUNRESERVED : new RegExp(UNRESERVED$$, \"g\"),\n\t\tOTHER_CHARS : new RegExp(merge(\"[^\\\\%]\", UNRESERVED$$, RESERVED$$), \"g\"),\n\t\tPCT_ENCODED : new RegExp(PCT_ENCODED$, \"g\"),\n\t\tIPV4ADDRESS : new RegExp(\"^(\" + IPV4ADDRESS$ + \")$\"),\n\t\tIPV6ADDRESS : new RegExp(\"^\\\\[?(\" + IPV6ADDRESS$ + \")\" + subexp(subexp(\"\\\\%25|\\\\%(?!\" + HEXDIG$$ + \"{2})\") + \"(\" + ZONEID$ + \")\") + \"?\\\\]?$\") //RFC 6874, with relaxed parsing rules\n\t};\n}\n\nexport default buildExps(false);\n","'use strict';\n\n/** Highest positive signed 32-bit float value */\nconst maxInt = 2147483647; // aka. 0x7FFFFFFF or 2^31-1\n\n/** Bootstring parameters */\nconst base = 36;\nconst tMin = 1;\nconst tMax = 26;\nconst skew = 38;\nconst damp = 700;\nconst initialBias = 72;\nconst initialN = 128; // 0x80\nconst delimiter = '-'; // '\\x2D'\n\n/** Regular expressions */\nconst regexPunycode = /^xn--/;\nconst regexNonASCII = /[^\\0-\\x7E]/; // non-ASCII chars\nconst regexSeparators = /[\\x2E\\u3002\\uFF0E\\uFF61]/g; // RFC 3490 separators\n\n/** Error messages */\nconst errors = {\n\t'overflow': 'Overflow: input needs wider integers to process',\n\t'not-basic': 'Illegal input >= 0x80 (not a basic code point)',\n\t'invalid-input': 'Invalid input'\n};\n\n/** Convenience shortcuts */\nconst baseMinusTMin = base - tMin;\nconst floor = Math.floor;\nconst stringFromCharCode = String.fromCharCode;\n\n/*--------------------------------------------------------------------------*/\n\n/**\n * A generic error utility function.\n * @private\n * @param {String} type The error type.\n * @returns {Error} Throws a `RangeError` with the applicable error message.\n */\nfunction error(type) {\n\tthrow new RangeError(errors[type]);\n}\n\n/**\n * A generic `Array#map` utility function.\n * @private\n * @param {Array} array The array to iterate over.\n * @param {Function} callback The function that gets called for every array\n * item.\n * @returns {Array} A new array of values returned by the callback function.\n */\nfunction map(array, fn) {\n\tconst result = [];\n\tlet length = array.length;\n\twhile (length--) {\n\t\tresult[length] = fn(array[length]);\n\t}\n\treturn result;\n}\n\n/**\n * A simple `Array#map`-like wrapper to work with domain name strings or email\n * addresses.\n * @private\n * @param {String} domain The domain name or email address.\n * @param {Function} callback The function that gets called for every\n * character.\n * @returns {Array} A new string of characters returned by the callback\n * function.\n */\nfunction mapDomain(string, fn) {\n\tconst parts = string.split('@');\n\tlet result = '';\n\tif (parts.length > 1) {\n\t\t// In email addresses, only the domain name should be punycoded. Leave\n\t\t// the local part (i.e. everything up to `@`) intact.\n\t\tresult = parts[0] + '@';\n\t\tstring = parts[1];\n\t}\n\t// Avoid `split(regex)` for IE8 compatibility. See #17.\n\tstring = string.replace(regexSeparators, '\\x2E');\n\tconst labels = string.split('.');\n\tconst encoded = map(labels, fn).join('.');\n\treturn result + encoded;\n}\n\n/**\n * Creates an array containing the numeric code points of each Unicode\n * character in the string. While JavaScript uses UCS-2 internally,\n * this function will convert a pair of surrogate halves (each of which\n * UCS-2 exposes as separate characters) into a single code point,\n * matching UTF-16.\n * @see `punycode.ucs2.encode`\n * @see \n * @memberOf punycode.ucs2\n * @name decode\n * @param {String} string The Unicode input string (UCS-2).\n * @returns {Array} The new array of code points.\n */\nfunction ucs2decode(string) {\n\tconst output = [];\n\tlet counter = 0;\n\tconst length = string.length;\n\twhile (counter < length) {\n\t\tconst value = string.charCodeAt(counter++);\n\t\tif (value >= 0xD800 && value <= 0xDBFF && counter < length) {\n\t\t\t// It's a high surrogate, and there is a next character.\n\t\t\tconst extra = string.charCodeAt(counter++);\n\t\t\tif ((extra & 0xFC00) == 0xDC00) { // Low surrogate.\n\t\t\t\toutput.push(((value & 0x3FF) << 10) + (extra & 0x3FF) + 0x10000);\n\t\t\t} else {\n\t\t\t\t// It's an unmatched surrogate; only append this code unit, in case the\n\t\t\t\t// next code unit is the high surrogate of a surrogate pair.\n\t\t\t\toutput.push(value);\n\t\t\t\tcounter--;\n\t\t\t}\n\t\t} else {\n\t\t\toutput.push(value);\n\t\t}\n\t}\n\treturn output;\n}\n\n/**\n * Creates a string based on an array of numeric code points.\n * @see `punycode.ucs2.decode`\n * @memberOf punycode.ucs2\n * @name encode\n * @param {Array} codePoints The array of numeric code points.\n * @returns {String} The new Unicode string (UCS-2).\n */\nconst ucs2encode = array => String.fromCodePoint(...array);\n\n/**\n * Converts a basic code point into a digit/integer.\n * @see `digitToBasic()`\n * @private\n * @param {Number} codePoint The basic numeric code point value.\n * @returns {Number} The numeric value of a basic code point (for use in\n * representing integers) in the range `0` to `base - 1`, or `base` if\n * the code point does not represent a value.\n */\nconst basicToDigit = function(codePoint) {\n\tif (codePoint - 0x30 < 0x0A) {\n\t\treturn codePoint - 0x16;\n\t}\n\tif (codePoint - 0x41 < 0x1A) {\n\t\treturn codePoint - 0x41;\n\t}\n\tif (codePoint - 0x61 < 0x1A) {\n\t\treturn codePoint - 0x61;\n\t}\n\treturn base;\n};\n\n/**\n * Converts a digit/integer into a basic code point.\n * @see `basicToDigit()`\n * @private\n * @param {Number} digit The numeric value of a basic code point.\n * @returns {Number} The basic code point whose value (when used for\n * representing integers) is `digit`, which needs to be in the range\n * `0` to `base - 1`. If `flag` is non-zero, the uppercase form is\n * used; else, the lowercase form is used. The behavior is undefined\n * if `flag` is non-zero and `digit` has no uppercase form.\n */\nconst digitToBasic = function(digit, flag) {\n\t// 0..25 map to ASCII a..z or A..Z\n\t// 26..35 map to ASCII 0..9\n\treturn digit + 22 + 75 * (digit < 26) - ((flag != 0) << 5);\n};\n\n/**\n * Bias adaptation function as per section 3.4 of RFC 3492.\n * https://tools.ietf.org/html/rfc3492#section-3.4\n * @private\n */\nconst adapt = function(delta, numPoints, firstTime) {\n\tlet k = 0;\n\tdelta = firstTime ? floor(delta / damp) : delta >> 1;\n\tdelta += floor(delta / numPoints);\n\tfor (/* no initialization */; delta > baseMinusTMin * tMax >> 1; k += base) {\n\t\tdelta = floor(delta / baseMinusTMin);\n\t}\n\treturn floor(k + (baseMinusTMin + 1) * delta / (delta + skew));\n};\n\n/**\n * Converts a Punycode string of ASCII-only symbols to a string of Unicode\n * symbols.\n * @memberOf punycode\n * @param {String} input The Punycode string of ASCII-only symbols.\n * @returns {String} The resulting string of Unicode symbols.\n */\nconst decode = function(input) {\n\t// Don't use UCS-2.\n\tconst output = [];\n\tconst inputLength = input.length;\n\tlet i = 0;\n\tlet n = initialN;\n\tlet bias = initialBias;\n\n\t// Handle the basic code points: let `basic` be the number of input code\n\t// points before the last delimiter, or `0` if there is none, then copy\n\t// the first basic code points to the output.\n\n\tlet basic = input.lastIndexOf(delimiter);\n\tif (basic < 0) {\n\t\tbasic = 0;\n\t}\n\n\tfor (let j = 0; j < basic; ++j) {\n\t\t// if it's not a basic code point\n\t\tif (input.charCodeAt(j) >= 0x80) {\n\t\t\terror('not-basic');\n\t\t}\n\t\toutput.push(input.charCodeAt(j));\n\t}\n\n\t// Main decoding loop: start just after the last delimiter if any basic code\n\t// points were copied; start at the beginning otherwise.\n\n\tfor (let index = basic > 0 ? basic + 1 : 0; index < inputLength; /* no final expression */) {\n\n\t\t// `index` is the index of the next character to be consumed.\n\t\t// Decode a generalized variable-length integer into `delta`,\n\t\t// which gets added to `i`. The overflow checking is easier\n\t\t// if we increase `i` as we go, then subtract off its starting\n\t\t// value at the end to obtain `delta`.\n\t\tlet oldi = i;\n\t\tfor (let w = 1, k = base; /* no condition */; k += base) {\n\n\t\t\tif (index >= inputLength) {\n\t\t\t\terror('invalid-input');\n\t\t\t}\n\n\t\t\tconst digit = basicToDigit(input.charCodeAt(index++));\n\n\t\t\tif (digit >= base || digit > floor((maxInt - i) / w)) {\n\t\t\t\terror('overflow');\n\t\t\t}\n\n\t\t\ti += digit * w;\n\t\t\tconst t = k <= bias ? tMin : (k >= bias + tMax ? tMax : k - bias);\n\n\t\t\tif (digit < t) {\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tconst baseMinusT = base - t;\n\t\t\tif (w > floor(maxInt / baseMinusT)) {\n\t\t\t\terror('overflow');\n\t\t\t}\n\n\t\t\tw *= baseMinusT;\n\n\t\t}\n\n\t\tconst out = output.length + 1;\n\t\tbias = adapt(i - oldi, out, oldi == 0);\n\n\t\t// `i` was supposed to wrap around from `out` to `0`,\n\t\t// incrementing `n` each time, so we'll fix that now:\n\t\tif (floor(i / out) > maxInt - n) {\n\t\t\terror('overflow');\n\t\t}\n\n\t\tn += floor(i / out);\n\t\ti %= out;\n\n\t\t// Insert `n` at position `i` of the output.\n\t\toutput.splice(i++, 0, n);\n\n\t}\n\n\treturn String.fromCodePoint(...output);\n};\n\n/**\n * Converts a string of Unicode symbols (e.g. a domain name label) to a\n * Punycode string of ASCII-only symbols.\n * @memberOf punycode\n * @param {String} input The string of Unicode symbols.\n * @returns {String} The resulting Punycode string of ASCII-only symbols.\n */\nconst encode = function(input) {\n\tconst output = [];\n\n\t// Convert the input in UCS-2 to an array of Unicode code points.\n\tinput = ucs2decode(input);\n\n\t// Cache the length.\n\tlet inputLength = input.length;\n\n\t// Initialize the state.\n\tlet n = initialN;\n\tlet delta = 0;\n\tlet bias = initialBias;\n\n\t// Handle the basic code points.\n\tfor (const currentValue of input) {\n\t\tif (currentValue < 0x80) {\n\t\t\toutput.push(stringFromCharCode(currentValue));\n\t\t}\n\t}\n\n\tlet basicLength = output.length;\n\tlet handledCPCount = basicLength;\n\n\t// `handledCPCount` is the number of code points that have been handled;\n\t// `basicLength` is the number of basic code points.\n\n\t// Finish the basic string with a delimiter unless it's empty.\n\tif (basicLength) {\n\t\toutput.push(delimiter);\n\t}\n\n\t// Main encoding loop:\n\twhile (handledCPCount < inputLength) {\n\n\t\t// All non-basic code points < n have been handled already. Find the next\n\t\t// larger one:\n\t\tlet m = maxInt;\n\t\tfor (const currentValue of input) {\n\t\t\tif (currentValue >= n && currentValue < m) {\n\t\t\t\tm = currentValue;\n\t\t\t}\n\t\t}\n\n\t\t// Increase `delta` enough to advance the decoder's state to ,\n\t\t// but guard against overflow.\n\t\tconst handledCPCountPlusOne = handledCPCount + 1;\n\t\tif (m - n > floor((maxInt - delta) / handledCPCountPlusOne)) {\n\t\t\terror('overflow');\n\t\t}\n\n\t\tdelta += (m - n) * handledCPCountPlusOne;\n\t\tn = m;\n\n\t\tfor (const currentValue of input) {\n\t\t\tif (currentValue < n && ++delta > maxInt) {\n\t\t\t\terror('overflow');\n\t\t\t}\n\t\t\tif (currentValue == n) {\n\t\t\t\t// Represent delta as a generalized variable-length integer.\n\t\t\t\tlet q = delta;\n\t\t\t\tfor (let k = base; /* no condition */; k += base) {\n\t\t\t\t\tconst t = k <= bias ? tMin : (k >= bias + tMax ? tMax : k - bias);\n\t\t\t\t\tif (q < t) {\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tconst qMinusT = q - t;\n\t\t\t\t\tconst baseMinusT = base - t;\n\t\t\t\t\toutput.push(\n\t\t\t\t\t\tstringFromCharCode(digitToBasic(t + qMinusT % baseMinusT, 0))\n\t\t\t\t\t);\n\t\t\t\t\tq = floor(qMinusT / baseMinusT);\n\t\t\t\t}\n\n\t\t\t\toutput.push(stringFromCharCode(digitToBasic(q, 0)));\n\t\t\t\tbias = adapt(delta, handledCPCountPlusOne, handledCPCount == basicLength);\n\t\t\t\tdelta = 0;\n\t\t\t\t++handledCPCount;\n\t\t\t}\n\t\t}\n\n\t\t++delta;\n\t\t++n;\n\n\t}\n\treturn output.join('');\n};\n\n/**\n * Converts a Punycode string representing a domain name or an email address\n * to Unicode. Only the Punycoded parts of the input will be converted, i.e.\n * it doesn't matter if you call it on a string that has already been\n * converted to Unicode.\n * @memberOf punycode\n * @param {String} input The Punycoded domain name or email address to\n * convert to Unicode.\n * @returns {String} The Unicode representation of the given Punycode\n * string.\n */\nconst toUnicode = function(input) {\n\treturn mapDomain(input, function(string) {\n\t\treturn regexPunycode.test(string)\n\t\t\t? decode(string.slice(4).toLowerCase())\n\t\t\t: string;\n\t});\n};\n\n/**\n * Converts a Unicode string representing a domain name or an email address to\n * Punycode. Only the non-ASCII parts of the domain name will be converted,\n * i.e. it doesn't matter if you call it with a domain that's already in\n * ASCII.\n * @memberOf punycode\n * @param {String} input The domain name or email address to convert, as a\n * Unicode string.\n * @returns {String} The Punycode representation of the given domain name or\n * email address.\n */\nconst toASCII = function(input) {\n\treturn mapDomain(input, function(string) {\n\t\treturn regexNonASCII.test(string)\n\t\t\t? 'xn--' + encode(string)\n\t\t\t: string;\n\t});\n};\n\n/*--------------------------------------------------------------------------*/\n\n/** Define the public API */\nconst punycode = {\n\t/**\n\t * A string representing the current Punycode.js version number.\n\t * @memberOf punycode\n\t * @type String\n\t */\n\t'version': '2.1.0',\n\t/**\n\t * An object of methods to convert from JavaScript's internal character\n\t * representation (UCS-2) to Unicode code points, and back.\n\t * @see \n\t * @memberOf punycode\n\t * @type Object\n\t */\n\t'ucs2': {\n\t\t'decode': ucs2decode,\n\t\t'encode': ucs2encode\n\t},\n\t'decode': decode,\n\t'encode': encode,\n\t'toASCII': toASCII,\n\t'toUnicode': toUnicode\n};\n\nexport default punycode;\n","/**\n * URI.js\n *\n * @fileoverview An RFC 3986 compliant, scheme extendable URI parsing/validating/resolving library for JavaScript.\n * @author Gary Court\n * @see http://github.com/garycourt/uri-js\n */\n\n/**\n * Copyright 2011 Gary Court. All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without modification, are\n * permitted provided that the following conditions are met:\n *\n * 1. Redistributions of source code must retain the above copyright notice, this list of\n * conditions and the following disclaimer.\n *\n * 2. Redistributions in binary form must reproduce the above copyright notice, this list\n * of conditions and the following disclaimer in the documentation and/or other materials\n * provided with the distribution.\n *\n * THIS SOFTWARE IS PROVIDED BY GARY COURT ``AS IS'' AND ANY EXPRESS OR IMPLIED\n * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL GARY COURT OR\n * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR\n * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON\n * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF\n * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n *\n * The views and conclusions contained in the software and documentation are those of the\n * authors and should not be interpreted as representing official policies, either expressed\n * or implied, of Gary Court.\n */\n\nimport URI_PROTOCOL from \"./regexps-uri\";\nimport IRI_PROTOCOL from \"./regexps-iri\";\nimport punycode from \"punycode\";\nimport { toUpperCase, typeOf, assign } from \"./util\";\n\nexport interface URIComponents {\n\tscheme?:string;\n\tuserinfo?:string;\n\thost?:string;\n\tport?:number|string;\n\tpath?:string;\n\tquery?:string;\n\tfragment?:string;\n\treference?:string;\n\terror?:string;\n}\n\nexport interface URIOptions {\n\tscheme?:string;\n\treference?:string;\n\ttolerant?:boolean;\n\tabsolutePath?:boolean;\n\tiri?:boolean;\n\tunicodeSupport?:boolean;\n\tdomainHost?:boolean;\n}\n\nexport interface URISchemeHandler {\n\tscheme:string;\n\tparse(components:ParentComponents, options:Options):Components;\n\tserialize(components:Components, options:Options):ParentComponents;\n\tunicodeSupport?:boolean;\n\tdomainHost?:boolean;\n\tabsolutePath?:boolean;\n}\n\nexport interface URIRegExps {\n\tNOT_SCHEME : RegExp,\n\tNOT_USERINFO : RegExp,\n\tNOT_HOST : RegExp,\n\tNOT_PATH : RegExp,\n\tNOT_PATH_NOSCHEME : RegExp,\n\tNOT_QUERY : RegExp,\n\tNOT_FRAGMENT : RegExp,\n\tESCAPE : RegExp,\n\tUNRESERVED : RegExp,\n\tOTHER_CHARS : RegExp,\n\tPCT_ENCODED : RegExp,\n\tIPV4ADDRESS : RegExp,\n\tIPV6ADDRESS : RegExp,\n}\n\nexport const SCHEMES:{[scheme:string]:URISchemeHandler} = {};\n\nexport function pctEncChar(chr:string):string {\n\tconst c = chr.charCodeAt(0);\n\tlet e:string;\n\n\tif (c < 16) e = \"%0\" + c.toString(16).toUpperCase();\n\telse if (c < 128) e = \"%\" + c.toString(16).toUpperCase();\n\telse if (c < 2048) e = \"%\" + ((c >> 6) | 192).toString(16).toUpperCase() + \"%\" + ((c & 63) | 128).toString(16).toUpperCase();\n\telse e = \"%\" + ((c >> 12) | 224).toString(16).toUpperCase() + \"%\" + (((c >> 6) & 63) | 128).toString(16).toUpperCase() + \"%\" + ((c & 63) | 128).toString(16).toUpperCase();\n\n\treturn e;\n}\n\nexport function pctDecChars(str:string):string {\n\tlet newStr = \"\";\n\tlet i = 0;\n\tconst il = str.length;\n\n\twhile (i < il) {\n\t\tconst c = parseInt(str.substr(i + 1, 2), 16);\n\n\t\tif (c < 128) {\n\t\t\tnewStr += String.fromCharCode(c);\n\t\t\ti += 3;\n\t\t}\n\t\telse if (c >= 194 && c < 224) {\n\t\t\tif ((il - i) >= 6) {\n\t\t\t\tconst c2 = parseInt(str.substr(i + 4, 2), 16);\n\t\t\t\tnewStr += String.fromCharCode(((c & 31) << 6) | (c2 & 63));\n\t\t\t} else {\n\t\t\t\tnewStr += str.substr(i, 6);\n\t\t\t}\n\t\t\ti += 6;\n\t\t}\n\t\telse if (c >= 224) {\n\t\t\tif ((il - i) >= 9) {\n\t\t\t\tconst c2 = parseInt(str.substr(i + 4, 2), 16);\n\t\t\t\tconst c3 = parseInt(str.substr(i + 7, 2), 16);\n\t\t\t\tnewStr += String.fromCharCode(((c & 15) << 12) | ((c2 & 63) << 6) | (c3 & 63));\n\t\t\t} else {\n\t\t\t\tnewStr += str.substr(i, 9);\n\t\t\t}\n\t\t\ti += 9;\n\t\t}\n\t\telse {\n\t\t\tnewStr += str.substr(i, 3);\n\t\t\ti += 3;\n\t\t}\n\t}\n\n\treturn newStr;\n}\n\nfunction _normalizeComponentEncoding(components:URIComponents, protocol:URIRegExps) {\n\tfunction decodeUnreserved(str:string):string {\n\t\tconst decStr = pctDecChars(str);\n\t\treturn (!decStr.match(protocol.UNRESERVED) ? str : decStr);\n\t}\n\n\tif (components.scheme) components.scheme = String(components.scheme).replace(protocol.PCT_ENCODED, decodeUnreserved).toLowerCase().replace(protocol.NOT_SCHEME, \"\");\n\tif (components.userinfo !== undefined) components.userinfo = String(components.userinfo).replace(protocol.PCT_ENCODED, decodeUnreserved).replace(protocol.NOT_USERINFO, pctEncChar).replace(protocol.PCT_ENCODED, toUpperCase);\n\tif (components.host !== undefined) components.host = String(components.host).replace(protocol.PCT_ENCODED, decodeUnreserved).toLowerCase().replace(protocol.NOT_HOST, pctEncChar).replace(protocol.PCT_ENCODED, toUpperCase);\n\tif (components.path !== undefined) components.path = String(components.path).replace(protocol.PCT_ENCODED, decodeUnreserved).replace((components.scheme ? protocol.NOT_PATH : protocol.NOT_PATH_NOSCHEME), pctEncChar).replace(protocol.PCT_ENCODED, toUpperCase);\n\tif (components.query !== undefined) components.query = String(components.query).replace(protocol.PCT_ENCODED, decodeUnreserved).replace(protocol.NOT_QUERY, pctEncChar).replace(protocol.PCT_ENCODED, toUpperCase);\n\tif (components.fragment !== undefined) components.fragment = String(components.fragment).replace(protocol.PCT_ENCODED, decodeUnreserved).replace(protocol.NOT_FRAGMENT, pctEncChar).replace(protocol.PCT_ENCODED, toUpperCase);\n\n\treturn components;\n};\n\nfunction _stripLeadingZeros(str:string):string {\n\treturn str.replace(/^0*(.*)/, \"$1\") || \"0\";\n}\n\nfunction _normalizeIPv4(host:string, protocol:URIRegExps):string {\n\tconst matches = host.match(protocol.IPV4ADDRESS) || [];\n\tconst [, address] = matches;\n\t\n\tif (address) {\n\t\treturn address.split(\".\").map(_stripLeadingZeros).join(\".\");\n\t} else {\n\t\treturn host;\n\t}\n}\n\nfunction _normalizeIPv6(host:string, protocol:URIRegExps):string {\n\tconst matches = host.match(protocol.IPV6ADDRESS) || [];\n\tconst [, address, zone] = matches;\n\n\tif (address) {\n\t\tconst [last, first] = address.toLowerCase().split('::').reverse();\n\t\tconst firstFields = first ? first.split(\":\").map(_stripLeadingZeros) : [];\n\t\tconst lastFields = last.split(\":\").map(_stripLeadingZeros);\n\t\tconst isLastFieldIPv4Address = protocol.IPV4ADDRESS.test(lastFields[lastFields.length - 1]);\n\t\tconst fieldCount = isLastFieldIPv4Address ? 7 : 8;\n\t\tconst lastFieldsStart = lastFields.length - fieldCount;\n\t\tconst fields = Array(fieldCount);\n\n\t\tfor (let x = 0; x < fieldCount; ++x) {\n\t\t\tfields[x] = firstFields[x] || lastFields[lastFieldsStart + x] || '';\n\t\t}\n\n\t\tif (isLastFieldIPv4Address) {\n\t\t\tfields[fieldCount - 1] = _normalizeIPv4(fields[fieldCount - 1], protocol);\n\t\t}\n\n\t\tconst allZeroFields = fields.reduce>((acc, field, index) => {\n\t\t\tif (!field || field === \"0\") {\n\t\t\t\tconst lastLongest = acc[acc.length - 1];\n\t\t\t\tif (lastLongest && lastLongest.index + lastLongest.length === index) {\n\t\t\t\t\tlastLongest.length++;\n\t\t\t\t} else {\n\t\t\t\t\tacc.push({ index, length : 1 });\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn acc;\n\t\t}, []);\n\n\t\tconst longestZeroFields = allZeroFields.sort((a, b) => b.length - a.length)[0];\n\n\t\tlet newHost:string;\n\t\tif (longestZeroFields && longestZeroFields.length > 1) {\n\t\t\tconst newFirst = fields.slice(0, longestZeroFields.index) ;\n\t\t\tconst newLast = fields.slice(longestZeroFields.index + longestZeroFields.length);\n\t\t\tnewHost = newFirst.join(\":\") + \"::\" + newLast.join(\":\");\n\t\t} else {\n\t\t\tnewHost = fields.join(\":\");\n\t\t}\n\n\t\tif (zone) {\n\t\t\tnewHost += \"%\" + zone;\n\t\t}\n\n\t\treturn newHost;\n\t} else {\n\t\treturn host;\n\t}\n}\n\nconst URI_PARSE = /^(?:([^:\\/?#]+):)?(?:\\/\\/((?:([^\\/?#@]*)@)?(\\[[^\\/?#\\]]+\\]|[^\\/?#:]*)(?:\\:(\\d*))?))?([^?#]*)(?:\\?([^#]*))?(?:#((?:.|\\n|\\r)*))?/i;\nconst NO_MATCH_IS_UNDEFINED = ((\"\").match(/(){0}/))[1] === undefined;\n\nexport function parse(uriString:string, options:URIOptions = {}):URIComponents {\n\tconst components:URIComponents = {};\n\tconst protocol = (options.iri !== false ? IRI_PROTOCOL : URI_PROTOCOL);\n\n\tif (options.reference === \"suffix\") uriString = (options.scheme ? options.scheme + \":\" : \"\") + \"//\" + uriString;\n\n\tconst matches = uriString.match(URI_PARSE);\n\n\tif (matches) {\n\t\tif (NO_MATCH_IS_UNDEFINED) {\n\t\t\t//store each component\n\t\t\tcomponents.scheme = matches[1];\n\t\t\tcomponents.userinfo = matches[3];\n\t\t\tcomponents.host = matches[4];\n\t\t\tcomponents.port = parseInt(matches[5], 10);\n\t\t\tcomponents.path = matches[6] || \"\";\n\t\t\tcomponents.query = matches[7];\n\t\t\tcomponents.fragment = matches[8];\n\n\t\t\t//fix port number\n\t\t\tif (isNaN(components.port)) {\n\t\t\t\tcomponents.port = matches[5];\n\t\t\t}\n\t\t} else { //IE FIX for improper RegExp matching\n\t\t\t//store each component\n\t\t\tcomponents.scheme = matches[1] || undefined;\n\t\t\tcomponents.userinfo = (uriString.indexOf(\"@\") !== -1 ? matches[3] : undefined);\n\t\t\tcomponents.host = (uriString.indexOf(\"//\") !== -1 ? matches[4] : undefined);\n\t\t\tcomponents.port = parseInt(matches[5], 10);\n\t\t\tcomponents.path = matches[6] || \"\";\n\t\t\tcomponents.query = (uriString.indexOf(\"?\") !== -1 ? matches[7] : undefined);\n\t\t\tcomponents.fragment = (uriString.indexOf(\"#\") !== -1 ? matches[8] : undefined);\n\n\t\t\t//fix port number\n\t\t\tif (isNaN(components.port)) {\n\t\t\t\tcomponents.port = (uriString.match(/\\/\\/(?:.|\\n)*\\:(?:\\/|\\?|\\#|$)/) ? matches[4] : undefined);\n\t\t\t}\n\t\t}\n\n\t\tif (components.host) {\n\t\t\t//normalize IP hosts\n\t\t\tcomponents.host = _normalizeIPv6(_normalizeIPv4(components.host, protocol), protocol);\n\t\t}\n\n\t\t//determine reference type\n\t\tif (components.scheme === undefined && components.userinfo === undefined && components.host === undefined && components.port === undefined && !components.path && components.query === undefined) {\n\t\t\tcomponents.reference = \"same-document\";\n\t\t} else if (components.scheme === undefined) {\n\t\t\tcomponents.reference = \"relative\";\n\t\t} else if (components.fragment === undefined) {\n\t\t\tcomponents.reference = \"absolute\";\n\t\t} else {\n\t\t\tcomponents.reference = \"uri\";\n\t\t}\n\n\t\t//check for reference errors\n\t\tif (options.reference && options.reference !== \"suffix\" && options.reference !== components.reference) {\n\t\t\tcomponents.error = components.error || \"URI is not a \" + options.reference + \" reference.\";\n\t\t}\n\n\t\t//find scheme handler\n\t\tconst schemeHandler = SCHEMES[(options.scheme || components.scheme || \"\").toLowerCase()];\n\n\t\t//check if scheme can't handle IRIs\n\t\tif (!options.unicodeSupport && (!schemeHandler || !schemeHandler.unicodeSupport)) {\n\t\t\t//if host component is a domain name\n\t\t\tif (components.host && (options.domainHost || (schemeHandler && schemeHandler.domainHost))) {\n\t\t\t\t//convert Unicode IDN -> ASCII IDN\n\t\t\t\ttry {\n\t\t\t\t\tcomponents.host = punycode.toASCII(components.host.replace(protocol.PCT_ENCODED, pctDecChars).toLowerCase());\n\t\t\t\t} catch (e) {\n\t\t\t\t\tcomponents.error = components.error || \"Host's domain name can not be converted to ASCII via punycode: \" + e;\n\t\t\t\t}\n\t\t\t}\n\t\t\t//convert IRI -> URI\n\t\t\t_normalizeComponentEncoding(components, URI_PROTOCOL);\n\t\t} else {\n\t\t\t//normalize encodings\n\t\t\t_normalizeComponentEncoding(components, protocol);\n\t\t}\n\n\t\t//perform scheme specific parsing\n\t\tif (schemeHandler && schemeHandler.parse) {\n\t\t\tschemeHandler.parse(components, options);\n\t\t}\n\t} else {\n\t\tcomponents.error = components.error || \"URI can not be parsed.\";\n\t}\n\n\treturn components;\n};\n\nfunction _recomposeAuthority(components:URIComponents, options:URIOptions):string|undefined {\n\tconst protocol = (options.iri !== false ? IRI_PROTOCOL : URI_PROTOCOL);\n\tconst uriTokens:Array = [];\n\n\tif (components.userinfo !== undefined) {\n\t\turiTokens.push(components.userinfo);\n\t\turiTokens.push(\"@\");\n\t}\n\n\tif (components.host !== undefined) {\n\t\t//normalize IP hosts, add brackets and escape zone separator for IPv6\n\t\turiTokens.push(_normalizeIPv6(_normalizeIPv4(String(components.host), protocol), protocol).replace(protocol.IPV6ADDRESS, (_, $1, $2) => \"[\" + $1 + ($2 ? \"%25\" + $2 : \"\") + \"]\"));\n\t}\n\n\tif (typeof components.port === \"number\") {\n\t\turiTokens.push(\":\");\n\t\turiTokens.push(components.port.toString(10));\n\t}\n\n\treturn uriTokens.length ? uriTokens.join(\"\") : undefined;\n};\n\nconst RDS1 = /^\\.\\.?\\//;\nconst RDS2 = /^\\/\\.(\\/|$)/;\nconst RDS3 = /^\\/\\.\\.(\\/|$)/;\nconst RDS4 = /^\\.\\.?$/;\nconst RDS5 = /^\\/?(?:.|\\n)*?(?=\\/|$)/;\n\nexport function removeDotSegments(input:string):string {\n\tconst output:Array = [];\n\n\twhile (input.length) {\n\t\tif (input.match(RDS1)) {\n\t\t\tinput = input.replace(RDS1, \"\");\n\t\t} else if (input.match(RDS2)) {\n\t\t\tinput = input.replace(RDS2, \"/\");\n\t\t} else if (input.match(RDS3)) {\n\t\t\tinput = input.replace(RDS3, \"/\");\n\t\t\toutput.pop();\n\t\t} else if (input === \".\" || input === \"..\") {\n\t\t\tinput = \"\";\n\t\t} else {\n\t\t\tconst im = input.match(RDS5);\n\t\t\tif (im) {\n\t\t\t\tconst s = im[0];\n\t\t\t\tinput = input.slice(s.length);\n\t\t\t\toutput.push(s);\n\t\t\t} else {\n\t\t\t\tthrow new Error(\"Unexpected dot segment condition\");\n\t\t\t}\n\t\t}\n\t}\n\n\treturn output.join(\"\");\n};\n\nexport function serialize(components:URIComponents, options:URIOptions = {}):string {\n\tconst protocol = (options.iri ? IRI_PROTOCOL : URI_PROTOCOL);\n\tconst uriTokens:Array = [];\n\n\t//find scheme handler\n\tconst schemeHandler = SCHEMES[(options.scheme || components.scheme || \"\").toLowerCase()];\n\n\t//perform scheme specific serialization\n\tif (schemeHandler && schemeHandler.serialize) schemeHandler.serialize(components, options);\n\n\tif (components.host) {\n\t\t//if host component is an IPv6 address\n\t\tif (protocol.IPV6ADDRESS.test(components.host)) {\n\t\t\t//TODO: normalize IPv6 address as per RFC 5952\n\t\t}\n\n\t\t//if host component is a domain name\n\t\telse if (options.domainHost || (schemeHandler && schemeHandler.domainHost)) {\n\t\t\t//convert IDN via punycode\n\t\t\ttry {\n\t\t\t\tcomponents.host = (!options.iri ? punycode.toASCII(components.host.replace(protocol.PCT_ENCODED, pctDecChars).toLowerCase()) : punycode.toUnicode(components.host));\n\t\t\t} catch (e) {\n\t\t\t\tcomponents.error = components.error || \"Host's domain name can not be converted to \" + (!options.iri ? \"ASCII\" : \"Unicode\") + \" via punycode: \" + e;\n\t\t\t}\n\t\t}\n\t}\n\n\t//normalize encoding\n\t_normalizeComponentEncoding(components, protocol);\n\n\tif (options.reference !== \"suffix\" && components.scheme) {\n\t\turiTokens.push(components.scheme);\n\t\turiTokens.push(\":\");\n\t}\n\n\tconst authority = _recomposeAuthority(components, options);\n\tif (authority !== undefined) {\n\t\tif (options.reference !== \"suffix\") {\n\t\t\turiTokens.push(\"//\");\n\t\t}\n\n\t\turiTokens.push(authority);\n\n\t\tif (components.path && components.path.charAt(0) !== \"/\") {\n\t\t\turiTokens.push(\"/\");\n\t\t}\n\t}\n\n\tif (components.path !== undefined) {\n\t\tlet s = components.path;\n\n\t\tif (!options.absolutePath && (!schemeHandler || !schemeHandler.absolutePath)) {\n\t\t\ts = removeDotSegments(s);\n\t\t}\n\n\t\tif (authority === undefined) {\n\t\t\ts = s.replace(/^\\/\\//, \"/%2F\"); //don't allow the path to start with \"//\"\n\t\t}\n\n\t\turiTokens.push(s);\n\t}\n\n\tif (components.query !== undefined) {\n\t\turiTokens.push(\"?\");\n\t\turiTokens.push(components.query);\n\t}\n\n\tif (components.fragment !== undefined) {\n\t\turiTokens.push(\"#\");\n\t\turiTokens.push(components.fragment);\n\t}\n\n\treturn uriTokens.join(\"\"); //merge tokens into a string\n};\n\nexport function resolveComponents(base:URIComponents, relative:URIComponents, options:URIOptions = {}, skipNormalization?:boolean):URIComponents {\n\tconst target:URIComponents = {};\n\n\tif (!skipNormalization) {\n\t\tbase = parse(serialize(base, options), options); //normalize base components\n\t\trelative = parse(serialize(relative, options), options); //normalize relative components\n\t}\n\toptions = options || {};\n\n\tif (!options.tolerant && relative.scheme) {\n\t\ttarget.scheme = relative.scheme;\n\t\t//target.authority = relative.authority;\n\t\ttarget.userinfo = relative.userinfo;\n\t\ttarget.host = relative.host;\n\t\ttarget.port = relative.port;\n\t\ttarget.path = removeDotSegments(relative.path || \"\");\n\t\ttarget.query = relative.query;\n\t} else {\n\t\tif (relative.userinfo !== undefined || relative.host !== undefined || relative.port !== undefined) {\n\t\t\t//target.authority = relative.authority;\n\t\t\ttarget.userinfo = relative.userinfo;\n\t\t\ttarget.host = relative.host;\n\t\t\ttarget.port = relative.port;\n\t\t\ttarget.path = removeDotSegments(relative.path || \"\");\n\t\t\ttarget.query = relative.query;\n\t\t} else {\n\t\t\tif (!relative.path) {\n\t\t\t\ttarget.path = base.path;\n\t\t\t\tif (relative.query !== undefined) {\n\t\t\t\t\ttarget.query = relative.query;\n\t\t\t\t} else {\n\t\t\t\t\ttarget.query = base.query;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif (relative.path.charAt(0) === \"/\") {\n\t\t\t\t\ttarget.path = removeDotSegments(relative.path);\n\t\t\t\t} else {\n\t\t\t\t\tif ((base.userinfo !== undefined || base.host !== undefined || base.port !== undefined) && !base.path) {\n\t\t\t\t\t\ttarget.path = \"/\" + relative.path;\n\t\t\t\t\t} else if (!base.path) {\n\t\t\t\t\t\ttarget.path = relative.path;\n\t\t\t\t\t} else {\n\t\t\t\t\t\ttarget.path = base.path.slice(0, base.path.lastIndexOf(\"/\") + 1) + relative.path;\n\t\t\t\t\t}\n\t\t\t\t\ttarget.path = removeDotSegments(target.path);\n\t\t\t\t}\n\t\t\t\ttarget.query = relative.query;\n\t\t\t}\n\t\t\t//target.authority = base.authority;\n\t\t\ttarget.userinfo = base.userinfo;\n\t\t\ttarget.host = base.host;\n\t\t\ttarget.port = base.port;\n\t\t}\n\t\ttarget.scheme = base.scheme;\n\t}\n\n\ttarget.fragment = relative.fragment;\n\n\treturn target;\n};\n\nexport function resolve(baseURI:string, relativeURI:string, options?:URIOptions):string {\n\tconst schemelessOptions = assign({ scheme : 'null' }, options);\n\treturn serialize(resolveComponents(parse(baseURI, schemelessOptions), parse(relativeURI, schemelessOptions), schemelessOptions, true), schemelessOptions);\n};\n\nexport function normalize(uri:string, options?:URIOptions):string;\nexport function normalize(uri:URIComponents, options?:URIOptions):URIComponents;\nexport function normalize(uri:any, options?:URIOptions):any {\n\tif (typeof uri === \"string\") {\n\t\turi = serialize(parse(uri, options), options);\n\t} else if (typeOf(uri) === \"object\") {\n\t\turi = parse(serialize(uri, options), options);\n\t}\n\n\treturn uri;\n};\n\nexport function equal(uriA:string, uriB:string, options?: URIOptions):boolean;\nexport function equal(uriA:URIComponents, uriB:URIComponents, options?:URIOptions):boolean;\nexport function equal(uriA:any, uriB:any, options?:URIOptions):boolean {\n\tif (typeof uriA === \"string\") {\n\t\turiA = serialize(parse(uriA, options), options);\n\t} else if (typeOf(uriA) === \"object\") {\n\t\turiA = serialize(uriA, options);\n\t}\n\n\tif (typeof uriB === \"string\") {\n\t\turiB = serialize(parse(uriB, options), options);\n\t} else if (typeOf(uriB) === \"object\") {\n\t\turiB = serialize(uriB, options);\n\t}\n\n\treturn uriA === uriB;\n};\n\nexport function escapeComponent(str:string, options?:URIOptions):string {\n\treturn str && str.toString().replace((!options || !options.iri ? URI_PROTOCOL.ESCAPE : IRI_PROTOCOL.ESCAPE), pctEncChar);\n};\n\nexport function unescapeComponent(str:string, options?:URIOptions):string {\n\treturn str && str.toString().replace((!options || !options.iri ? URI_PROTOCOL.PCT_ENCODED : IRI_PROTOCOL.PCT_ENCODED), pctDecChars);\n};\n","import { URISchemeHandler, URIComponents, URIOptions } from \"../uri\";\nimport { pctEncChar, pctDecChars, unescapeComponent } from \"../uri\";\nimport punycode from \"punycode\";\nimport { merge, subexp, toUpperCase, toArray } from \"../util\";\n\nexport interface MailtoHeaders {\n\t[hfname:string]:string\n}\n\nexport interface MailtoComponents extends URIComponents {\n\tto:Array,\n\theaders?:MailtoHeaders,\n\tsubject?:string,\n\tbody?:string\n}\n\nconst O:MailtoHeaders = {};\nconst isIRI = true;\n\n//RFC 3986\nconst UNRESERVED$$ = \"[A-Za-z0-9\\\\-\\\\.\\\\_\\\\~\" + (isIRI ? \"\\\\xA0-\\\\u200D\\\\u2010-\\\\u2029\\\\u202F-\\\\uD7FF\\\\uF900-\\\\uFDCF\\\\uFDF0-\\\\uFFEF\" : \"\") + \"]\";\nconst HEXDIG$$ = \"[0-9A-Fa-f]\"; //case-insensitive\nconst PCT_ENCODED$ = subexp(subexp(\"%[EFef]\" + HEXDIG$$ + \"%\" + HEXDIG$$ + HEXDIG$$ + \"%\" + HEXDIG$$ + HEXDIG$$) + \"|\" + subexp(\"%[89A-Fa-f]\" + HEXDIG$$ + \"%\" + HEXDIG$$ + HEXDIG$$) + \"|\" + subexp(\"%\" + HEXDIG$$ + HEXDIG$$)); //expanded\n\n//RFC 5322, except these symbols as per RFC 6068: @ : / ? # [ ] & ; =\n//const ATEXT$$ = \"[A-Za-z0-9\\\\!\\\\#\\\\$\\\\%\\\\&\\\\'\\\\*\\\\+\\\\-\\\\/\\\\=\\\\?\\\\^\\\\_\\\\`\\\\{\\\\|\\\\}\\\\~]\";\n//const WSP$$ = \"[\\\\x20\\\\x09]\";\n//const OBS_QTEXT$$ = \"[\\\\x01-\\\\x08\\\\x0B\\\\x0C\\\\x0E-\\\\x1F\\\\x7F]\"; //(%d1-8 / %d11-12 / %d14-31 / %d127)\n//const QTEXT$$ = merge(\"[\\\\x21\\\\x23-\\\\x5B\\\\x5D-\\\\x7E]\", OBS_QTEXT$$); //%d33 / %d35-91 / %d93-126 / obs-qtext\n//const VCHAR$$ = \"[\\\\x21-\\\\x7E]\";\n//const WSP$$ = \"[\\\\x20\\\\x09]\";\n//const OBS_QP$ = subexp(\"\\\\\\\\\" + merge(\"[\\\\x00\\\\x0D\\\\x0A]\", OBS_QTEXT$$)); //%d0 / CR / LF / obs-qtext\n//const FWS$ = subexp(subexp(WSP$$ + \"*\" + \"\\\\x0D\\\\x0A\") + \"?\" + WSP$$ + \"+\");\n//const QUOTED_PAIR$ = subexp(subexp(\"\\\\\\\\\" + subexp(VCHAR$$ + \"|\" + WSP$$)) + \"|\" + OBS_QP$);\n//const QUOTED_STRING$ = subexp('\\\\\"' + subexp(FWS$ + \"?\" + QCONTENT$) + \"*\" + FWS$ + \"?\" + '\\\\\"');\nconst ATEXT$$ = \"[A-Za-z0-9\\\\!\\\\$\\\\%\\\\'\\\\*\\\\+\\\\-\\\\^\\\\_\\\\`\\\\{\\\\|\\\\}\\\\~]\";\nconst QTEXT$$ = \"[\\\\!\\\\$\\\\%\\\\'\\\\(\\\\)\\\\*\\\\+\\\\,\\\\-\\\\.0-9\\\\<\\\\>A-Z\\\\x5E-\\\\x7E]\";\nconst VCHAR$$ = merge(QTEXT$$, \"[\\\\\\\"\\\\\\\\]\");\nconst DOT_ATOM_TEXT$ = subexp(ATEXT$$ + \"+\" + subexp(\"\\\\.\" + ATEXT$$ + \"+\") + \"*\");\nconst QUOTED_PAIR$ = subexp(\"\\\\\\\\\" + VCHAR$$);\nconst QCONTENT$ = subexp(QTEXT$$ + \"|\" + QUOTED_PAIR$);\nconst QUOTED_STRING$ = subexp('\\\\\"' + QCONTENT$ + \"*\" + '\\\\\"');\n\n//RFC 6068\nconst DTEXT_NO_OBS$$ = \"[\\\\x21-\\\\x5A\\\\x5E-\\\\x7E]\"; //%d33-90 / %d94-126\nconst SOME_DELIMS$$ = \"[\\\\!\\\\$\\\\'\\\\(\\\\)\\\\*\\\\+\\\\,\\\\;\\\\:\\\\@]\";\nconst QCHAR$ = subexp(UNRESERVED$$ + \"|\" + PCT_ENCODED$ + \"|\" + SOME_DELIMS$$);\nconst DOMAIN$ = subexp(DOT_ATOM_TEXT$ + \"|\" + \"\\\\[\" + DTEXT_NO_OBS$$ + \"*\" + \"\\\\]\");\nconst LOCAL_PART$ = subexp(DOT_ATOM_TEXT$ + \"|\" + QUOTED_STRING$);\nconst ADDR_SPEC$ = subexp(LOCAL_PART$ + \"\\\\@\" + DOMAIN$);\nconst TO$ = subexp(ADDR_SPEC$ + subexp(\"\\\\,\" + ADDR_SPEC$) + \"*\");\nconst HFNAME$ = subexp(QCHAR$ + \"*\");\nconst HFVALUE$ = HFNAME$;\nconst HFIELD$ = subexp(HFNAME$ + \"\\\\=\" + HFVALUE$);\nconst HFIELDS2$ = subexp(HFIELD$ + subexp(\"\\\\&\" + HFIELD$) + \"*\");\nconst HFIELDS$ = subexp(\"\\\\?\" + HFIELDS2$);\nconst MAILTO_URI = new RegExp(\"^mailto\\\\:\" + TO$ + \"?\" + HFIELDS$ + \"?$\");\n\nconst UNRESERVED = new RegExp(UNRESERVED$$, \"g\");\nconst PCT_ENCODED = new RegExp(PCT_ENCODED$, \"g\");\nconst NOT_LOCAL_PART = new RegExp(merge(\"[^]\", ATEXT$$, \"[\\\\.]\", '[\\\\\"]', VCHAR$$), \"g\");\nconst NOT_DOMAIN = new RegExp(merge(\"[^]\", ATEXT$$, \"[\\\\.]\", \"[\\\\[]\", DTEXT_NO_OBS$$, \"[\\\\]]\"), \"g\");\nconst NOT_HFNAME = new RegExp(merge(\"[^]\", UNRESERVED$$, SOME_DELIMS$$), \"g\");\nconst NOT_HFVALUE = NOT_HFNAME;\nconst TO = new RegExp(\"^\" + TO$ + \"$\");\nconst HFIELDS = new RegExp(\"^\" + HFIELDS2$ + \"$\");\n\nfunction decodeUnreserved(str:string):string {\n\tconst decStr = pctDecChars(str);\n\treturn (!decStr.match(UNRESERVED) ? str : decStr);\n}\n\nconst handler:URISchemeHandler = {\n\tscheme : \"mailto\",\n\n\tparse : function (components:URIComponents, options:URIOptions):MailtoComponents {\n\t\tconst mailtoComponents = components as MailtoComponents;\n\t\tconst to = mailtoComponents.to = (mailtoComponents.path ? mailtoComponents.path.split(\",\") : []);\n\t\tmailtoComponents.path = undefined;\n\n\t\tif (mailtoComponents.query) {\n\t\t\tlet unknownHeaders = false\n\t\t\tconst headers:MailtoHeaders = {};\n\t\t\tconst hfields = mailtoComponents.query.split(\"&\");\n\n\t\t\tfor (let x = 0, xl = hfields.length; x < xl; ++x) {\n\t\t\t\tconst hfield = hfields[x].split(\"=\");\n\n\t\t\t\tswitch (hfield[0]) {\n\t\t\t\t\tcase \"to\":\n\t\t\t\t\t\tconst toAddrs = hfield[1].split(\",\");\n\t\t\t\t\t\tfor (let x = 0, xl = toAddrs.length; x < xl; ++x) {\n\t\t\t\t\t\t\tto.push(toAddrs[x]);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"subject\":\n\t\t\t\t\t\tmailtoComponents.subject = unescapeComponent(hfield[1], options);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"body\":\n\t\t\t\t\t\tmailtoComponents.body = unescapeComponent(hfield[1], options);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tdefault:\n\t\t\t\t\t\tunknownHeaders = true;\n\t\t\t\t\t\theaders[unescapeComponent(hfield[0], options)] = unescapeComponent(hfield[1], options);\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (unknownHeaders) mailtoComponents.headers = headers;\n\t\t}\n\n\t\tmailtoComponents.query = undefined;\n\n\t\tfor (let x = 0, xl = to.length; x < xl; ++x) {\n\t\t\tconst addr = to[x].split(\"@\");\n\n\t\t\taddr[0] = unescapeComponent(addr[0]);\n\n\t\t\tif (!options.unicodeSupport) {\n\t\t\t\t//convert Unicode IDN -> ASCII IDN\n\t\t\t\ttry {\n\t\t\t\t\taddr[1] = punycode.toASCII(unescapeComponent(addr[1], options).toLowerCase());\n\t\t\t\t} catch (e) {\n\t\t\t\t\tmailtoComponents.error = mailtoComponents.error || \"Email address's domain name can not be converted to ASCII via punycode: \" + e;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\taddr[1] = unescapeComponent(addr[1], options).toLowerCase();\n\t\t\t}\n\n\t\t\tto[x] = addr.join(\"@\");\n\t\t}\n\n\t\treturn mailtoComponents;\n\t},\n\n\tserialize : function (mailtoComponents:MailtoComponents, options:URIOptions):URIComponents {\n\t\tconst components = mailtoComponents as URIComponents;\n\t\tconst to = toArray(mailtoComponents.to);\n\t\tif (to) {\n\t\t\tfor (let x = 0, xl = to.length; x < xl; ++x) {\n\t\t\t\tconst toAddr = String(to[x]);\n\t\t\t\tconst atIdx = toAddr.lastIndexOf(\"@\");\n\t\t\t\tconst localPart = (toAddr.slice(0, atIdx)).replace(PCT_ENCODED, decodeUnreserved).replace(PCT_ENCODED, toUpperCase).replace(NOT_LOCAL_PART, pctEncChar);\n\t\t\t\tlet domain = toAddr.slice(atIdx + 1);\n\n\t\t\t\t//convert IDN via punycode\n\t\t\t\ttry {\n\t\t\t\t\tdomain = (!options.iri ? punycode.toASCII(unescapeComponent(domain, options).toLowerCase()) : punycode.toUnicode(domain));\n\t\t\t\t} catch (e) {\n\t\t\t\t\tcomponents.error = components.error || \"Email address's domain name can not be converted to \" + (!options.iri ? \"ASCII\" : \"Unicode\") + \" via punycode: \" + e;\n\t\t\t\t}\n\n\t\t\t\tto[x] = localPart + \"@\" + domain;\n\t\t\t}\n\n\t\t\tcomponents.path = to.join(\",\");\n\t\t}\n\n\t\tconst headers = mailtoComponents.headers = mailtoComponents.headers || {};\n\n\t\tif (mailtoComponents.subject) headers[\"subject\"] = mailtoComponents.subject;\n\t\tif (mailtoComponents.body) headers[\"body\"] = mailtoComponents.body;\n\n\t\tconst fields = [];\n\t\tfor (const name in headers) {\n\t\t\tif (headers[name] !== O[name]) {\n\t\t\t\tfields.push(\n\t\t\t\t\tname.replace(PCT_ENCODED, decodeUnreserved).replace(PCT_ENCODED, toUpperCase).replace(NOT_HFNAME, pctEncChar) +\n\t\t\t\t\t\"=\" +\n\t\t\t\t\theaders[name].replace(PCT_ENCODED, decodeUnreserved).replace(PCT_ENCODED, toUpperCase).replace(NOT_HFVALUE, pctEncChar)\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\t\tif (fields.length) {\n\t\t\tcomponents.query = fields.join(\"&\");\n\t\t}\n\n\t\treturn components;\n\t}\n}\n\nexport default handler;","import { URIRegExps } from \"./uri\";\nimport { buildExps } from \"./regexps-uri\";\n\nexport default buildExps(true);\n","import { URISchemeHandler, URIComponents, URIOptions } from \"../uri\";\n\nconst handler:URISchemeHandler = {\n\tscheme : \"http\",\n\n\tdomainHost : true,\n\n\tparse : function (components:URIComponents, options:URIOptions):URIComponents {\n\t\t//report missing host\n\t\tif (!components.host) {\n\t\t\tcomponents.error = components.error || \"HTTP URIs must have a host.\";\n\t\t}\n\n\t\treturn components;\n\t},\n\n\tserialize : function (components:URIComponents, options:URIOptions):URIComponents {\n\t\t//normalize the default port\n\t\tif (components.port === (String(components.scheme).toLowerCase() !== \"https\" ? 80 : 443) || components.port === \"\") {\n\t\t\tcomponents.port = undefined;\n\t\t}\n\t\t\n\t\t//normalize the empty path\n\t\tif (!components.path) {\n\t\t\tcomponents.path = \"/\";\n\t\t}\n\n\t\t//NOTE: We do not parse query strings for HTTP URIs\n\t\t//as WWW Form Url Encoded query strings are part of the HTML4+ spec,\n\t\t//and not the HTTP spec.\n\n\t\treturn components;\n\t}\n};\n\nexport default handler;","import { URISchemeHandler, URIComponents, URIOptions } from \"../uri\";\nimport http from \"./http\";\n\nconst handler:URISchemeHandler = {\n\tscheme : \"https\",\n\tdomainHost : http.domainHost,\n\tparse : http.parse,\n\tserialize : http.serialize\n}\n\nexport default handler;","import { URISchemeHandler, URIComponents, URIOptions } from \"../uri\";\nimport { pctEncChar, SCHEMES } from \"../uri\";\n\nexport interface URNComponents extends URIComponents {\n\tnid?:string;\n\tnss?:string;\n}\n\nexport interface URNOptions extends URIOptions {\n\tnid?:string;\n}\n\nconst NID$ = \"(?:[0-9A-Za-z][0-9A-Za-z\\\\-]{1,31})\";\nconst PCT_ENCODED$ = \"(?:\\\\%[0-9A-Fa-f]{2})\";\nconst TRANS$$ = \"[0-9A-Za-z\\\\(\\\\)\\\\+\\\\,\\\\-\\\\.\\\\:\\\\=\\\\@\\\\;\\\\$\\\\_\\\\!\\\\*\\\\'\\\\/\\\\?\\\\#]\";\nconst NSS$ = \"(?:(?:\" + PCT_ENCODED$ + \"|\" + TRANS$$ + \")+)\";\nconst URN_SCHEME = new RegExp(\"^urn\\\\:(\" + NID$ + \")$\");\nconst URN_PATH = new RegExp(\"^(\" + NID$ + \")\\\\:(\" + NSS$ + \")$\");\nconst URN_PARSE = /^([^\\:]+)\\:(.*)/;\nconst URN_EXCLUDED = /[\\x00-\\x20\\\\\\\"\\&\\<\\>\\[\\]\\^\\`\\{\\|\\}\\~\\x7F-\\xFF]/g;\n\n//RFC 2141\nconst handler:URISchemeHandler = {\n\tscheme : \"urn\",\n\n\tparse : function (components:URIComponents, options:URNOptions):URNComponents {\n\t\tconst matches = components.path && components.path.match(URN_PARSE);\n\t\tlet urnComponents = components as URNComponents;\n\n\t\tif (matches) {\n\t\t\tconst scheme = options.scheme || urnComponents.scheme || \"urn\";\n\t\t\tconst nid = matches[1].toLowerCase();\n\t\t\tconst nss = matches[2];\n\t\t\tconst urnScheme = `${scheme}:${options.nid || nid}`;\n\t\t\tconst schemeHandler = SCHEMES[urnScheme];\n\n\t\t\turnComponents.nid = nid;\n\t\t\turnComponents.nss = nss;\n\t\t\turnComponents.path = undefined;\n\n\t\t\tif (schemeHandler) {\n\t\t\t\turnComponents = schemeHandler.parse(urnComponents, options) as URNComponents;\n\t\t\t}\n\t\t} else {\n\t\t\turnComponents.error = urnComponents.error || \"URN can not be parsed.\";\n\t\t}\n\n\t\treturn urnComponents;\n\t},\n\n\tserialize : function (urnComponents:URNComponents, options:URNOptions):URIComponents {\n\t\tconst scheme = options.scheme || urnComponents.scheme || \"urn\";\n\t\tconst nid = urnComponents.nid;\n\t\tconst urnScheme = `${scheme}:${options.nid || nid}`;\n\t\tconst schemeHandler = SCHEMES[urnScheme];\n\n\t\tif (schemeHandler) {\n\t\t\turnComponents = schemeHandler.serialize(urnComponents, options) as URNComponents;\n\t\t}\n\n\t\tconst uriComponents = urnComponents as URIComponents;\n\t\tconst nss = urnComponents.nss;\n\t\turiComponents.path = `${nid || options.nid}:${nss}`;\n\n\t\treturn uriComponents;\n\t},\n};\n\nexport default handler;","import { URISchemeHandler, URIComponents, URIOptions } from \"../uri\";\nimport { URNComponents } from \"./urn\";\nimport { SCHEMES } from \"../uri\";\n\nexport interface UUIDComponents extends URNComponents {\n\tuuid?: string;\n}\n\nconst UUID = /^[0-9A-Fa-f]{8}(?:\\-[0-9A-Fa-f]{4}){3}\\-[0-9A-Fa-f]{12}$/;\nconst UUID_PARSE = /^[0-9A-Fa-f\\-]{36}/;\n\n//RFC 4122\nconst handler:URISchemeHandler = {\n\tscheme : \"urn:uuid\",\n\n\tparse : function (urnComponents:URNComponents, options:URIOptions):UUIDComponents {\n\t\tconst uuidComponents = urnComponents as UUIDComponents;\n\t\tuuidComponents.uuid = uuidComponents.nss;\n\t\tuuidComponents.nss = undefined;\n\n\t\tif (!options.tolerant && (!uuidComponents.uuid || !uuidComponents.uuid.match(UUID))) {\n\t\t\tuuidComponents.error = uuidComponents.error || \"UUID is not valid.\";\n\t\t}\n\n\t\treturn uuidComponents;\n\t},\n\n\tserialize : function (uuidComponents:UUIDComponents, options:URIOptions):URNComponents {\n\t\tconst urnComponents = uuidComponents as URNComponents;\n\t\t//normalize UUID\n\t\turnComponents.nss = (uuidComponents.uuid || \"\").toLowerCase();\n\t\treturn urnComponents;\n\t},\n};\n\nexport default handler;","import { SCHEMES } from \"./uri\";\n\nimport http from \"./schemes/http\";\nSCHEMES[http.scheme] = http;\n\nimport https from \"./schemes/https\";\nSCHEMES[https.scheme] = https;\n\nimport mailto from \"./schemes/mailto\";\nSCHEMES[mailto.scheme] = mailto;\n\nimport urn from \"./schemes/urn\";\nSCHEMES[urn.scheme] = urn;\n\nimport uuid from \"./schemes/urn-uuid\";\nSCHEMES[uuid.scheme] = uuid;\n\nexport * from \"./uri\";\n"]} \ No newline at end of file +{"version":3,"sources":["../../src/util.ts","../../src/regexps-uri.ts","../../node_modules/punycode/punycode.es6.js","../../src/uri.ts","../../src/schemes/ws.ts","../../src/schemes/mailto.ts","../../src/regexps-iri.ts","../../src/schemes/http.ts","../../src/schemes/https.ts","../../src/schemes/wss.ts","../../src/schemes/urn.ts","../../src/schemes/urn-uuid.ts","../../src/index.ts"],"names":["merge","sets","Array","_len","_key","arguments","length","slice","xl","x","join","subexp","str","typeOf","o","undefined","Object","prototype","toString","call","split","pop","shift","toLowerCase","toUpperCase","toArray","obj","setInterval","assign","target","source","key","buildExps","isIRI","HEXDIG$$","PCT_ENCODED$","SUB_DELIMS$$","RESERVED$$","UCSCHAR$$","DEC_OCTET_RELAXED$","H16$","LS32$","IPV4ADDRESS$","IPV6ADDRESS1$","IPV6ADDRESS2$","IPV6ADDRESS3$","IPV6ADDRESS4$","IPV6ADDRESS5$","IPV6ADDRESS6$","IPV6ADDRESS7$","IPV6ADDRESS8$","IPV6ADDRESS9$","ZONEID$","UNRESERVED$$","RegExp","IPRIVATE$$","IPV6ADDRESS$","error","type","RangeError","errors","map","array","fn","result","mapDomain","string","parts","replace","regexSeparators","ucs2decode","output","counter","value","charCodeAt","extra","push","pctEncChar","chr","c","pctDecChars","newStr","i","il","parseInt","substr","String","fromCharCode","c2","c3","_normalizeComponentEncoding","components","protocol","decodeUnreserved","decStr","match","UNRESERVED","scheme","PCT_ENCODED","NOT_SCHEME","userinfo","NOT_USERINFO","host","NOT_HOST","path","NOT_PATH","NOT_PATH_NOSCHEME","query","NOT_QUERY","fragment","NOT_FRAGMENT","_stripLeadingZeros","_normalizeIPv4","matches","IPV4ADDRESS","address","_matches","_normalizeIPv6","IPV6ADDRESS","_matches2","zone","reverse","last","_address$toLowerCase$2","first","firstFields","lastFields","isLastFieldIPv4Address","test","fieldCount","lastFieldsStart","fields","allZeroFields","reduce","acc","field","index","lastLongest","longestZeroFields","sort","a","b","newHost","newFirst","newLast","parse","uriString","options","iri","IRI_PROTOCOL","URI_PROTOCOL","reference","URI_PARSE","NO_MATCH_IS_UNDEFINED","port","isNaN","indexOf","schemeHandler","SCHEMES","unicodeSupport","domainHost","punycode","toASCII","e","_recomposeAuthority","uriTokens","_","$1","$2","removeDotSegments","input","RDS1","RDS2","RDS3","im","RDS5","Error","s","serialize","toUnicode","authority","charAt","absolutePath","resolveComponents","base","relative","skipNormalization","tolerant","lastIndexOf","resolve","baseURI","relativeURI","schemelessOptions","normalize","uri","equal","uriA","uriB","escapeComponent","ESCAPE","unescapeComponent","isSecure","wsComponents","secure","maxInt","regexPunycode","regexNonASCII","floor","Math","stringFromCharCode","ucs2encode","fromCodePoint","apply","toConsumableArray","basicToDigit","codePoint","digitToBasic","digit","flag","adapt","delta","numPoints","firstTime","k","baseMinusTMin","decode","inputLength","n","bias","basic","j","oldi","w","t","baseMinusT","out","splice","encode","_step","Symbol","iterator","_iteratorNormalCompletion","_iterator","next","done","currentValue","basicLength","handledCPCount","m","_step2","_iteratorNormalCompletion2","_iterator2","handledCPCountPlusOne","_step3","_iteratorNormalCompletion3","_iterator3","q","qMinusT","handler","http","resourceName","_wsComponents$resourc2","ws","O","VCHAR$$","NOT_LOCAL_PART","NOT_HFNAME","NOT_HFVALUE","mailtoComponents","to","unknownHeaders","headers","hfields","hfield","toAddrs","subject","body","addr","toAddr","atIdx","localPart","domain","name","URN_PARSE","urnComponents","nid","nss","urnScheme","uriComponents","UUID","uuidComponents","uuid","https","wss","mailto","urn"],"mappings":";4LAAA,SAAAA,gCAAyBC,EAAzBC,MAAAC,GAAAC,EAAA,EAAAA,EAAAD,EAAAC,MAAAA,GAAAC,UAAAD,MACKH,EAAKK,OAAS,EAAG,GACf,GAAKL,EAAK,GAAGM,MAAM,GAAI,OAEvB,GADCC,GAAKP,EAAKK,OAAS,EAChBG,EAAI,EAAGA,EAAID,IAAMC,IACpBA,GAAKR,EAAKQ,GAAGF,MAAM,GAAI,YAExBC,GAAMP,EAAKO,GAAID,MAAM,GACnBN,EAAKS,KAAK,UAEVT,GAAK,GAId,QAAAU,GAAuBC,SACf,MAAQA,EAAM,IAGtB,QAAAC,GAAuBC,SACfA,KAAMC,UAAY,YAAqB,OAAND,EAAa,OAASE,OAAOC,UAAUC,SAASC,KAAKL,GAAGM,MAAM,KAAKC,MAAMD,MAAM,KAAKE,QAAQC,cAGrI,QAAAC,GAA4BZ,SACpBA,GAAIY,cAGZ,QAAAC,GAAwBC,SAChBA,KAAQX,WAAqB,OAARW,EAAgBA,YAAexB,OAAQwB,EAA6B,gBAAfA,GAAIpB,QAAuBoB,EAAIN,OAASM,EAAIC,aAAeD,EAAIP,MAAQO,GAAOxB,MAAMe,UAAUV,MAAMY,KAAKO,MAI3L,QAAAE,GAAuBC,EAAgBC,MAChCJ,GAAMG,KACRC,MACE,GAAMC,KAAOD,KACbC,GAAOD,EAAOC,SAGbL,GCnCR,QAAAM,GAA0BC,MAMxBC,GAAWlC,EAF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gBC,EAAQiI,KAEhBF,IAAMA,IACNC,IAAMA,IACNtL,KAAOzF,UAEjB8I,MACaA,EAAcZ,MAAM2I,EAAezI,WAGtC1F,MAAQmO,EAAcnO,OAAS,+BAGvCmO,cAGI,SAAUA,EAA6BzI,MAC5ClD,GAASkD,EAAQlD,QAAU2L,EAAc3L,QAAU,MACnD4L,EAAMD,EAAcC,IACpBE,EAAe9L,EAAf,KAAyBkD,EAAQ0I,KAAOA,GACxChI,EAAgBC,EAAQiI,EAE1BlI,OACaA,EAAcqB,UAAU0G,EAAezI,OAGlD6I,GAAgBJ,EAChBE,EAAMF,EAAcE,aACZtL,MAAUqL,GAAO1I,EAAQ0I,KAAvC,IAA8CC,EAEvCE,ICxDHC,GAAO,2DAIP/B,WACI,iBAED,SAAU0B,EAA6BzI,MACxC+I,GAAiBN,WACRO,KAAOD,EAAeJ,MACtBA,IAAM/Q,UAEhBoI,EAAQwC,UAAcuG,EAAeC,MAASD,EAAeC,KAAKpM,MAAMkM,QAC7DxO,MAAQyO,EAAezO,OAAS,sBAGzCyO,aAGI,SAAUA,EAA+B/I,MAC9CyI,GAAgBM,WAERJ,KAAOI,EAAeC,MAAQ,IAAI5Q,cACzCqQ,GC5BT9H,GAAQqG,GAAKlK,QAAUkK,GAEvBrG,EACQsI,GAAMnM,QAAUmM,GAExBtI,EACQwG,GAAGrK,QAAUqK,GAErBxG,EACQuI,GAAIpM,QAAUoM,GAEtBvI,EACQwI,GAAOrM,QAAUqM,GAEzBxI,EACQyI,GAAItM,QAAUsM,GAEtBzI,EACQqI,GAAKlM,QAAUkM","file":"dist/es5/uri.all.min.js","sourcesContent":["export function merge(...sets:Array):string {\n\tif (sets.length > 1) {\n\t\tsets[0] = sets[0].slice(0, -1);\n\t\tconst xl = sets.length - 1;\n\t\tfor (let x = 1; x < xl; ++x) {\n\t\t\tsets[x] = sets[x].slice(1, -1);\n\t\t}\n\t\tsets[xl] = sets[xl].slice(1);\n\t\treturn sets.join('');\n\t} else {\n\t\treturn sets[0];\n\t}\n}\n\nexport function subexp(str:string):string {\n\treturn \"(?:\" + str + \")\";\n}\n\nexport function typeOf(o:any):string {\n\treturn o === undefined ? \"undefined\" : (o === null ? \"null\" : Object.prototype.toString.call(o).split(\" \").pop().split(\"]\").shift().toLowerCase());\n}\n\nexport function toUpperCase(str:string):string {\n\treturn str.toUpperCase();\n}\n\nexport function toArray(obj:any):Array {\n\treturn obj !== undefined && obj !== null ? (obj instanceof Array ? obj : (typeof obj.length !== \"number\" || obj.split || obj.setInterval || obj.call ? [obj] : Array.prototype.slice.call(obj))) : [];\n}\n\n\nexport function assign(target: object, source: any): any {\n\tconst obj = target as any;\n\tif (source) {\n\t\tfor (const key in source) {\n\t\t\tobj[key] = source[key];\n\t\t}\n\t}\n\treturn obj;\n}","import { URIRegExps } from \"./uri\";\nimport { merge, subexp } from \"./util\";\n\nexport function buildExps(isIRI:boolean):URIRegExps {\n\tconst\n\t\tALPHA$$ = \"[A-Za-z]\",\n\t\tCR$ = \"[\\\\x0D]\",\n\t\tDIGIT$$ = \"[0-9]\",\n\t\tDQUOTE$$ = \"[\\\\x22]\",\n\t\tHEXDIG$$ = merge(DIGIT$$, \"[A-Fa-f]\"), //case-insensitive\n\t\tLF$$ = \"[\\\\x0A]\",\n\t\tSP$$ = \"[\\\\x20]\",\n\t\tPCT_ENCODED$ = subexp(subexp(\"%[EFef]\" + HEXDIG$$ + \"%\" + HEXDIG$$ + HEXDIG$$ + \"%\" + HEXDIG$$ + HEXDIG$$) + \"|\" + subexp(\"%[89A-Fa-f]\" + HEXDIG$$ + \"%\" + HEXDIG$$ + HEXDIG$$) + \"|\" + subexp(\"%\" + HEXDIG$$ + HEXDIG$$)), //expanded\n\t\tGEN_DELIMS$$ = \"[\\\\:\\\\/\\\\?\\\\#\\\\[\\\\]\\\\@]\",\n\t\tSUB_DELIMS$$ = \"[\\\\!\\\\$\\\\&\\\\'\\\\(\\\\)\\\\*\\\\+\\\\,\\\\;\\\\=]\",\n\t\tRESERVED$$ = merge(GEN_DELIMS$$, SUB_DELIMS$$),\n\t\tUCSCHAR$$ = isIRI ? \"[\\\\xA0-\\\\u200D\\\\u2010-\\\\u2029\\\\u202F-\\\\uD7FF\\\\uF900-\\\\uFDCF\\\\uFDF0-\\\\uFFEF]\" : \"[]\", //subset, excludes bidi control characters\n\t\tIPRIVATE$$ = isIRI ? \"[\\\\uE000-\\\\uF8FF]\" : \"[]\", //subset\n\t\tUNRESERVED$$ = merge(ALPHA$$, DIGIT$$, \"[\\\\-\\\\.\\\\_\\\\~]\", UCSCHAR$$),\n\t\tSCHEME$ = subexp(ALPHA$$ + merge(ALPHA$$, DIGIT$$, \"[\\\\+\\\\-\\\\.]\") + \"*\"),\n\t\tUSERINFO$ = subexp(subexp(PCT_ENCODED$ + \"|\" + merge(UNRESERVED$$, SUB_DELIMS$$, \"[\\\\:]\")) + \"*\"),\n\t\tDEC_OCTET$ = subexp(subexp(\"25[0-5]\") + \"|\" + subexp(\"2[0-4]\" + DIGIT$$) + \"|\" + subexp(\"1\" + DIGIT$$ + DIGIT$$) + \"|\" + subexp(\"[1-9]\" + DIGIT$$) + \"|\" + DIGIT$$),\n\t\tDEC_OCTET_RELAXED$ = subexp(subexp(\"25[0-5]\") + \"|\" + subexp(\"2[0-4]\" + DIGIT$$) + \"|\" + subexp(\"1\" + DIGIT$$ + DIGIT$$) + \"|\" + subexp(\"0?[1-9]\" + DIGIT$$) + \"|0?0?\" + DIGIT$$), //relaxed parsing rules\n\t\tIPV4ADDRESS$ = subexp(DEC_OCTET_RELAXED$ + \"\\\\.\" + DEC_OCTET_RELAXED$ + \"\\\\.\" + DEC_OCTET_RELAXED$ + \"\\\\.\" + DEC_OCTET_RELAXED$),\n\t\tH16$ = subexp(HEXDIG$$ + \"{1,4}\"),\n\t\tLS32$ = subexp(subexp(H16$ + \"\\\\:\" + H16$) + \"|\" + IPV4ADDRESS$),\n\t\tIPV6ADDRESS1$ = subexp( subexp(H16$ + \"\\\\:\") + \"{6}\" + LS32$), // 6( h16 \":\" ) ls32\n\t\tIPV6ADDRESS2$ = subexp( \"\\\\:\\\\:\" + subexp(H16$ + \"\\\\:\") + \"{5}\" + LS32$), // \"::\" 5( h16 \":\" ) ls32\n\t\tIPV6ADDRESS3$ = subexp(subexp( H16$) + \"?\\\\:\\\\:\" + subexp(H16$ + \"\\\\:\") + \"{4}\" + LS32$), //[ h16 ] \"::\" 4( h16 \":\" ) ls32\n\t\tIPV6ADDRESS4$ = subexp(subexp(subexp(H16$ + \"\\\\:\") + \"{0,1}\" + H16$) + \"?\\\\:\\\\:\" + subexp(H16$ + \"\\\\:\") + \"{3}\" + LS32$), //[ *1( h16 \":\" ) h16 ] \"::\" 3( h16 \":\" ) ls32\n\t\tIPV6ADDRESS5$ = subexp(subexp(subexp(H16$ + \"\\\\:\") + \"{0,2}\" + H16$) + \"?\\\\:\\\\:\" + subexp(H16$ + \"\\\\:\") + \"{2}\" + LS32$), //[ *2( h16 \":\" ) h16 ] \"::\" 2( h16 \":\" ) ls32\n\t\tIPV6ADDRESS6$ = subexp(subexp(subexp(H16$ + \"\\\\:\") + \"{0,3}\" + H16$) + \"?\\\\:\\\\:\" + H16$ + \"\\\\:\" + LS32$), //[ *3( h16 \":\" ) h16 ] \"::\" h16 \":\" ls32\n\t\tIPV6ADDRESS7$ = subexp(subexp(subexp(H16$ + \"\\\\:\") + \"{0,4}\" + H16$) + \"?\\\\:\\\\:\" + LS32$), //[ *4( h16 \":\" ) h16 ] \"::\" ls32\n\t\tIPV6ADDRESS8$ = subexp(subexp(subexp(H16$ + \"\\\\:\") + \"{0,5}\" + H16$) + \"?\\\\:\\\\:\" + H16$ ), //[ *5( h16 \":\" ) h16 ] \"::\" h16\n\t\tIPV6ADDRESS9$ = subexp(subexp(subexp(H16$ + \"\\\\:\") + \"{0,6}\" + H16$) + \"?\\\\:\\\\:\" ), //[ *6( h16 \":\" ) h16 ] \"::\"\n\t\tIPV6ADDRESS$ = subexp([IPV6ADDRESS1$, IPV6ADDRESS2$, IPV6ADDRESS3$, IPV6ADDRESS4$, IPV6ADDRESS5$, IPV6ADDRESS6$, IPV6ADDRESS7$, IPV6ADDRESS8$, IPV6ADDRESS9$].join(\"|\")),\n\t\tZONEID$ = subexp(subexp(UNRESERVED$$ + \"|\" + PCT_ENCODED$) + \"+\"), //RFC 6874\n\t\tIPV6ADDRZ$ = subexp(IPV6ADDRESS$ + \"\\\\%25\" + ZONEID$), //RFC 6874\n\t\tIPV6ADDRZ_RELAXED$ = subexp(IPV6ADDRESS$ + subexp(\"\\\\%25|\\\\%(?!\" + HEXDIG$$ + \"{2})\") + ZONEID$), //RFC 6874, with relaxed parsing rules\n\t\tIPVFUTURE$ = subexp(\"[vV]\" + HEXDIG$$ + \"+\\\\.\" + merge(UNRESERVED$$, SUB_DELIMS$$, \"[\\\\:]\") + \"+\"),\n\t\tIP_LITERAL$ = subexp(\"\\\\[\" + subexp(IPV6ADDRZ_RELAXED$ + \"|\" + IPV6ADDRESS$ + \"|\" + IPVFUTURE$) + \"\\\\]\"), //RFC 6874\n\t\tREG_NAME$ = subexp(subexp(PCT_ENCODED$ + \"|\" + merge(UNRESERVED$$, SUB_DELIMS$$)) + \"*\"),\n\t\tHOST$ = subexp(IP_LITERAL$ + \"|\" + IPV4ADDRESS$ + \"(?!\" + REG_NAME$ + \")\" + \"|\" + REG_NAME$),\n\t\tPORT$ = subexp(DIGIT$$ + \"*\"),\n\t\tAUTHORITY$ = subexp(subexp(USERINFO$ + \"@\") + \"?\" + HOST$ + subexp(\"\\\\:\" + PORT$) + \"?\"),\n\t\tPCHAR$ = subexp(PCT_ENCODED$ + \"|\" + merge(UNRESERVED$$, SUB_DELIMS$$, \"[\\\\:\\\\@]\")),\n\t\tSEGMENT$ = subexp(PCHAR$ + \"*\"),\n\t\tSEGMENT_NZ$ = subexp(PCHAR$ + \"+\"),\n\t\tSEGMENT_NZ_NC$ = subexp(subexp(PCT_ENCODED$ + \"|\" + merge(UNRESERVED$$, SUB_DELIMS$$, \"[\\\\@]\")) + \"+\"),\n\t\tPATH_ABEMPTY$ = subexp(subexp(\"\\\\/\" + SEGMENT$) + \"*\"),\n\t\tPATH_ABSOLUTE$ = subexp(\"\\\\/\" + subexp(SEGMENT_NZ$ + PATH_ABEMPTY$) + \"?\"), //simplified\n\t\tPATH_NOSCHEME$ = subexp(SEGMENT_NZ_NC$ + PATH_ABEMPTY$), //simplified\n\t\tPATH_ROOTLESS$ = subexp(SEGMENT_NZ$ + PATH_ABEMPTY$), //simplified\n\t\tPATH_EMPTY$ = \"(?!\" + PCHAR$ + \")\",\n\t\tPATH$ = subexp(PATH_ABEMPTY$ + \"|\" + PATH_ABSOLUTE$ + \"|\" + PATH_NOSCHEME$ + \"|\" + PATH_ROOTLESS$ + \"|\" + PATH_EMPTY$),\n\t\tQUERY$ = subexp(subexp(PCHAR$ + \"|\" + merge(\"[\\\\/\\\\?]\", IPRIVATE$$)) + \"*\"),\n\t\tFRAGMENT$ = subexp(subexp(PCHAR$ + \"|[\\\\/\\\\?]\") + \"*\"),\n\t\tHIER_PART$ = subexp(subexp(\"\\\\/\\\\/\" + AUTHORITY$ + PATH_ABEMPTY$) + \"|\" + PATH_ABSOLUTE$ + \"|\" + PATH_ROOTLESS$ + \"|\" + PATH_EMPTY$),\n\t\tURI$ = subexp(SCHEME$ + \"\\\\:\" + HIER_PART$ + subexp(\"\\\\?\" + QUERY$) + \"?\" + subexp(\"\\\\#\" + FRAGMENT$) + \"?\"),\n\t\tRELATIVE_PART$ = subexp(subexp(\"\\\\/\\\\/\" + AUTHORITY$ + PATH_ABEMPTY$) + \"|\" + PATH_ABSOLUTE$ + \"|\" + PATH_NOSCHEME$ + \"|\" + PATH_EMPTY$),\n\t\tRELATIVE$ = subexp(RELATIVE_PART$ + subexp(\"\\\\?\" + QUERY$) + \"?\" + subexp(\"\\\\#\" + FRAGMENT$) + \"?\"),\n\t\tURI_REFERENCE$ = subexp(URI$ + \"|\" + RELATIVE$),\n\t\tABSOLUTE_URI$ = subexp(SCHEME$ + \"\\\\:\" + HIER_PART$ + subexp(\"\\\\?\" + QUERY$) + \"?\"),\n\n\t\tGENERIC_REF$ = \"^(\" + SCHEME$ + \")\\\\:\" + subexp(subexp(\"\\\\/\\\\/(\" + subexp(\"(\" + USERINFO$ + \")@\") + \"?(\" + HOST$ + \")\" + subexp(\"\\\\:(\" + PORT$ + \")\") + \"?)\") + \"?(\" + PATH_ABEMPTY$ + \"|\" + PATH_ABSOLUTE$ + \"|\" + PATH_ROOTLESS$ + \"|\" + PATH_EMPTY$ + \")\") + subexp(\"\\\\?(\" + QUERY$ + \")\") + \"?\" + subexp(\"\\\\#(\" + FRAGMENT$ + \")\") + \"?$\",\n\t\tRELATIVE_REF$ = \"^(){0}\" + subexp(subexp(\"\\\\/\\\\/(\" + subexp(\"(\" + USERINFO$ + \")@\") + \"?(\" + HOST$ + \")\" + subexp(\"\\\\:(\" + PORT$ + \")\") + \"?)\") + \"?(\" + PATH_ABEMPTY$ + \"|\" + PATH_ABSOLUTE$ + \"|\" + PATH_NOSCHEME$ + \"|\" + PATH_EMPTY$ + \")\") + subexp(\"\\\\?(\" + QUERY$ + \")\") + \"?\" + subexp(\"\\\\#(\" + FRAGMENT$ + \")\") + \"?$\",\n\t\tABSOLUTE_REF$ = \"^(\" + SCHEME$ + \")\\\\:\" + subexp(subexp(\"\\\\/\\\\/(\" + subexp(\"(\" + USERINFO$ + \")@\") + \"?(\" + HOST$ + \")\" + subexp(\"\\\\:(\" + PORT$ + \")\") + \"?)\") + \"?(\" + PATH_ABEMPTY$ + \"|\" + PATH_ABSOLUTE$ + \"|\" + PATH_ROOTLESS$ + \"|\" + PATH_EMPTY$ + \")\") + subexp(\"\\\\?(\" + QUERY$ + \")\") + \"?$\",\n\t\tSAMEDOC_REF$ = \"^\" + subexp(\"\\\\#(\" + FRAGMENT$ + \")\") + \"?$\",\n\t\tAUTHORITY_REF$ = \"^\" + subexp(\"(\" + USERINFO$ + \")@\") + \"?(\" + HOST$ + \")\" + subexp(\"\\\\:(\" + PORT$ + \")\") + \"?$\"\n\t;\n\n\treturn {\n\t\tNOT_SCHEME : new RegExp(merge(\"[^]\", ALPHA$$, DIGIT$$, \"[\\\\+\\\\-\\\\.]\"), \"g\"),\n\t\tNOT_USERINFO : new RegExp(merge(\"[^\\\\%\\\\:]\", UNRESERVED$$, SUB_DELIMS$$), \"g\"),\n\t\tNOT_HOST : new RegExp(merge(\"[^\\\\%\\\\[\\\\]\\\\:]\", UNRESERVED$$, SUB_DELIMS$$), \"g\"),\n\t\tNOT_PATH : new RegExp(merge(\"[^\\\\%\\\\/\\\\:\\\\@]\", UNRESERVED$$, SUB_DELIMS$$), \"g\"),\n\t\tNOT_PATH_NOSCHEME : new RegExp(merge(\"[^\\\\%\\\\/\\\\@]\", UNRESERVED$$, SUB_DELIMS$$), \"g\"),\n\t\tNOT_QUERY : new RegExp(merge(\"[^\\\\%]\", UNRESERVED$$, SUB_DELIMS$$, \"[\\\\:\\\\@\\\\/\\\\?]\", IPRIVATE$$), \"g\"),\n\t\tNOT_FRAGMENT : new RegExp(merge(\"[^\\\\%]\", UNRESERVED$$, SUB_DELIMS$$, \"[\\\\:\\\\@\\\\/\\\\?]\"), \"g\"),\n\t\tESCAPE : new RegExp(merge(\"[^]\", UNRESERVED$$, SUB_DELIMS$$), \"g\"),\n\t\tUNRESERVED : new RegExp(UNRESERVED$$, \"g\"),\n\t\tOTHER_CHARS : new RegExp(merge(\"[^\\\\%]\", UNRESERVED$$, RESERVED$$), \"g\"),\n\t\tPCT_ENCODED : new RegExp(PCT_ENCODED$, \"g\"),\n\t\tIPV4ADDRESS : new RegExp(\"^(\" + IPV4ADDRESS$ + \")$\"),\n\t\tIPV6ADDRESS : new RegExp(\"^\\\\[?(\" + IPV6ADDRESS$ + \")\" + subexp(subexp(\"\\\\%25|\\\\%(?!\" + HEXDIG$$ + \"{2})\") + \"(\" + ZONEID$ + \")\") + \"?\\\\]?$\") //RFC 6874, with relaxed parsing rules\n\t};\n}\n\nexport default buildExps(false);\n","'use strict';\n\n/** Highest positive signed 32-bit float value */\nconst maxInt = 2147483647; // aka. 0x7FFFFFFF or 2^31-1\n\n/** Bootstring parameters */\nconst base = 36;\nconst tMin = 1;\nconst tMax = 26;\nconst skew = 38;\nconst damp = 700;\nconst initialBias = 72;\nconst initialN = 128; // 0x80\nconst delimiter = '-'; // '\\x2D'\n\n/** Regular expressions */\nconst regexPunycode = /^xn--/;\nconst regexNonASCII = /[^\\0-\\x7E]/; // non-ASCII chars\nconst regexSeparators = /[\\x2E\\u3002\\uFF0E\\uFF61]/g; // RFC 3490 separators\n\n/** Error messages */\nconst errors = {\n\t'overflow': 'Overflow: input needs wider integers to process',\n\t'not-basic': 'Illegal input >= 0x80 (not a basic code point)',\n\t'invalid-input': 'Invalid input'\n};\n\n/** Convenience shortcuts */\nconst baseMinusTMin = base - tMin;\nconst floor = Math.floor;\nconst stringFromCharCode = String.fromCharCode;\n\n/*--------------------------------------------------------------------------*/\n\n/**\n * A generic error utility function.\n * @private\n * @param {String} type The error type.\n * @returns {Error} Throws a `RangeError` with the applicable error message.\n */\nfunction error(type) {\n\tthrow new RangeError(errors[type]);\n}\n\n/**\n * A generic `Array#map` utility function.\n * @private\n * @param {Array} array The array to iterate over.\n * @param {Function} callback The function that gets called for every array\n * item.\n * @returns {Array} A new array of values returned by the callback function.\n */\nfunction map(array, fn) {\n\tconst result = [];\n\tlet length = array.length;\n\twhile (length--) {\n\t\tresult[length] = fn(array[length]);\n\t}\n\treturn result;\n}\n\n/**\n * A simple `Array#map`-like wrapper to work with domain name strings or email\n * addresses.\n * @private\n * @param {String} domain The domain name or email address.\n * @param {Function} callback The function that gets called for every\n * character.\n * @returns {Array} A new string of characters returned by the callback\n * function.\n */\nfunction mapDomain(string, fn) {\n\tconst parts = string.split('@');\n\tlet result = '';\n\tif (parts.length > 1) {\n\t\t// In email addresses, only the domain name should be punycoded. Leave\n\t\t// the local part (i.e. everything up to `@`) intact.\n\t\tresult = parts[0] + '@';\n\t\tstring = parts[1];\n\t}\n\t// Avoid `split(regex)` for IE8 compatibility. See #17.\n\tstring = string.replace(regexSeparators, '\\x2E');\n\tconst labels = string.split('.');\n\tconst encoded = map(labels, fn).join('.');\n\treturn result + encoded;\n}\n\n/**\n * Creates an array containing the numeric code points of each Unicode\n * character in the string. While JavaScript uses UCS-2 internally,\n * this function will convert a pair of surrogate halves (each of which\n * UCS-2 exposes as separate characters) into a single code point,\n * matching UTF-16.\n * @see `punycode.ucs2.encode`\n * @see \n * @memberOf punycode.ucs2\n * @name decode\n * @param {String} string The Unicode input string (UCS-2).\n * @returns {Array} The new array of code points.\n */\nfunction ucs2decode(string) {\n\tconst output = [];\n\tlet counter = 0;\n\tconst length = string.length;\n\twhile (counter < length) {\n\t\tconst value = string.charCodeAt(counter++);\n\t\tif (value >= 0xD800 && value <= 0xDBFF && counter < length) {\n\t\t\t// It's a high surrogate, and there is a next character.\n\t\t\tconst extra = string.charCodeAt(counter++);\n\t\t\tif ((extra & 0xFC00) == 0xDC00) { // Low surrogate.\n\t\t\t\toutput.push(((value & 0x3FF) << 10) + (extra & 0x3FF) + 0x10000);\n\t\t\t} else {\n\t\t\t\t// It's an unmatched surrogate; only append this code unit, in case the\n\t\t\t\t// next code unit is the high surrogate of a surrogate pair.\n\t\t\t\toutput.push(value);\n\t\t\t\tcounter--;\n\t\t\t}\n\t\t} else {\n\t\t\toutput.push(value);\n\t\t}\n\t}\n\treturn output;\n}\n\n/**\n * Creates a string based on an array of numeric code points.\n * @see `punycode.ucs2.decode`\n * @memberOf punycode.ucs2\n * @name encode\n * @param {Array} codePoints The array of numeric code points.\n * @returns {String} The new Unicode string (UCS-2).\n */\nconst ucs2encode = array => String.fromCodePoint(...array);\n\n/**\n * Converts a basic code point into a digit/integer.\n * @see `digitToBasic()`\n * @private\n * @param {Number} codePoint The basic numeric code point value.\n * @returns {Number} The numeric value of a basic code point (for use in\n * representing integers) in the range `0` to `base - 1`, or `base` if\n * the code point does not represent a value.\n */\nconst basicToDigit = function(codePoint) {\n\tif (codePoint - 0x30 < 0x0A) {\n\t\treturn codePoint - 0x16;\n\t}\n\tif (codePoint - 0x41 < 0x1A) {\n\t\treturn codePoint - 0x41;\n\t}\n\tif (codePoint - 0x61 < 0x1A) {\n\t\treturn codePoint - 0x61;\n\t}\n\treturn base;\n};\n\n/**\n * Converts a digit/integer into a basic code point.\n * @see `basicToDigit()`\n * @private\n * @param {Number} digit The numeric value of a basic code point.\n * @returns {Number} The basic code point whose value (when used for\n * representing integers) is `digit`, which needs to be in the range\n * `0` to `base - 1`. If `flag` is non-zero, the uppercase form is\n * used; else, the lowercase form is used. The behavior is undefined\n * if `flag` is non-zero and `digit` has no uppercase form.\n */\nconst digitToBasic = function(digit, flag) {\n\t// 0..25 map to ASCII a..z or A..Z\n\t// 26..35 map to ASCII 0..9\n\treturn digit + 22 + 75 * (digit < 26) - ((flag != 0) << 5);\n};\n\n/**\n * Bias adaptation function as per section 3.4 of RFC 3492.\n * https://tools.ietf.org/html/rfc3492#section-3.4\n * @private\n */\nconst adapt = function(delta, numPoints, firstTime) {\n\tlet k = 0;\n\tdelta = firstTime ? floor(delta / damp) : delta >> 1;\n\tdelta += floor(delta / numPoints);\n\tfor (/* no initialization */; delta > baseMinusTMin * tMax >> 1; k += base) {\n\t\tdelta = floor(delta / baseMinusTMin);\n\t}\n\treturn floor(k + (baseMinusTMin + 1) * delta / (delta + skew));\n};\n\n/**\n * Converts a Punycode string of ASCII-only symbols to a string of Unicode\n * symbols.\n * @memberOf punycode\n * @param {String} input The Punycode string of ASCII-only symbols.\n * @returns {String} The resulting string of Unicode symbols.\n */\nconst decode = function(input) {\n\t// Don't use UCS-2.\n\tconst output = [];\n\tconst inputLength = input.length;\n\tlet i = 0;\n\tlet n = initialN;\n\tlet bias = initialBias;\n\n\t// Handle the basic code points: let `basic` be the number of input code\n\t// points before the last delimiter, or `0` if there is none, then copy\n\t// the first basic code points to the output.\n\n\tlet basic = input.lastIndexOf(delimiter);\n\tif (basic < 0) {\n\t\tbasic = 0;\n\t}\n\n\tfor (let j = 0; j < basic; ++j) {\n\t\t// if it's not a basic code point\n\t\tif (input.charCodeAt(j) >= 0x80) {\n\t\t\terror('not-basic');\n\t\t}\n\t\toutput.push(input.charCodeAt(j));\n\t}\n\n\t// Main decoding loop: start just after the last delimiter if any basic code\n\t// points were copied; start at the beginning otherwise.\n\n\tfor (let index = basic > 0 ? basic + 1 : 0; index < inputLength; /* no final expression */) {\n\n\t\t// `index` is the index of the next character to be consumed.\n\t\t// Decode a generalized variable-length integer into `delta`,\n\t\t// which gets added to `i`. The overflow checking is easier\n\t\t// if we increase `i` as we go, then subtract off its starting\n\t\t// value at the end to obtain `delta`.\n\t\tlet oldi = i;\n\t\tfor (let w = 1, k = base; /* no condition */; k += base) {\n\n\t\t\tif (index >= inputLength) {\n\t\t\t\terror('invalid-input');\n\t\t\t}\n\n\t\t\tconst digit = basicToDigit(input.charCodeAt(index++));\n\n\t\t\tif (digit >= base || digit > floor((maxInt - i) / w)) {\n\t\t\t\terror('overflow');\n\t\t\t}\n\n\t\t\ti += digit * w;\n\t\t\tconst t = k <= bias ? tMin : (k >= bias + tMax ? tMax : k - bias);\n\n\t\t\tif (digit < t) {\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tconst baseMinusT = base - t;\n\t\t\tif (w > floor(maxInt / baseMinusT)) {\n\t\t\t\terror('overflow');\n\t\t\t}\n\n\t\t\tw *= baseMinusT;\n\n\t\t}\n\n\t\tconst out = output.length + 1;\n\t\tbias = adapt(i - oldi, out, oldi == 0);\n\n\t\t// `i` was supposed to wrap around from `out` to `0`,\n\t\t// incrementing `n` each time, so we'll fix that now:\n\t\tif (floor(i / out) > maxInt - n) {\n\t\t\terror('overflow');\n\t\t}\n\n\t\tn += floor(i / out);\n\t\ti %= out;\n\n\t\t// Insert `n` at position `i` of the output.\n\t\toutput.splice(i++, 0, n);\n\n\t}\n\n\treturn String.fromCodePoint(...output);\n};\n\n/**\n * Converts a string of Unicode symbols (e.g. a domain name label) to a\n * Punycode string of ASCII-only symbols.\n * @memberOf punycode\n * @param {String} input The string of Unicode symbols.\n * @returns {String} The resulting Punycode string of ASCII-only symbols.\n */\nconst encode = function(input) {\n\tconst output = [];\n\n\t// Convert the input in UCS-2 to an array of Unicode code points.\n\tinput = ucs2decode(input);\n\n\t// Cache the length.\n\tlet inputLength = input.length;\n\n\t// Initialize the state.\n\tlet n = initialN;\n\tlet delta = 0;\n\tlet bias = initialBias;\n\n\t// Handle the basic code points.\n\tfor (const currentValue of input) {\n\t\tif (currentValue < 0x80) {\n\t\t\toutput.push(stringFromCharCode(currentValue));\n\t\t}\n\t}\n\n\tlet basicLength = output.length;\n\tlet handledCPCount = basicLength;\n\n\t// `handledCPCount` is the number of code points that have been handled;\n\t// `basicLength` is the number of basic code points.\n\n\t// Finish the basic string with a delimiter unless it's empty.\n\tif (basicLength) {\n\t\toutput.push(delimiter);\n\t}\n\n\t// Main encoding loop:\n\twhile (handledCPCount < inputLength) {\n\n\t\t// All non-basic code points < n have been handled already. Find the next\n\t\t// larger one:\n\t\tlet m = maxInt;\n\t\tfor (const currentValue of input) {\n\t\t\tif (currentValue >= n && currentValue < m) {\n\t\t\t\tm = currentValue;\n\t\t\t}\n\t\t}\n\n\t\t// Increase `delta` enough to advance the decoder's state to ,\n\t\t// but guard against overflow.\n\t\tconst handledCPCountPlusOne = handledCPCount + 1;\n\t\tif (m - n > floor((maxInt - delta) / handledCPCountPlusOne)) {\n\t\t\terror('overflow');\n\t\t}\n\n\t\tdelta += (m - n) * handledCPCountPlusOne;\n\t\tn = m;\n\n\t\tfor (const currentValue of input) {\n\t\t\tif (currentValue < n && ++delta > maxInt) {\n\t\t\t\terror('overflow');\n\t\t\t}\n\t\t\tif (currentValue == n) {\n\t\t\t\t// Represent delta as a generalized variable-length integer.\n\t\t\t\tlet q = delta;\n\t\t\t\tfor (let k = base; /* no condition */; k += base) {\n\t\t\t\t\tconst t = k <= bias ? tMin : (k >= bias + tMax ? tMax : k - bias);\n\t\t\t\t\tif (q < t) {\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tconst qMinusT = q - t;\n\t\t\t\t\tconst baseMinusT = base - t;\n\t\t\t\t\toutput.push(\n\t\t\t\t\t\tstringFromCharCode(digitToBasic(t + qMinusT % baseMinusT, 0))\n\t\t\t\t\t);\n\t\t\t\t\tq = floor(qMinusT / baseMinusT);\n\t\t\t\t}\n\n\t\t\t\toutput.push(stringFromCharCode(digitToBasic(q, 0)));\n\t\t\t\tbias = adapt(delta, handledCPCountPlusOne, handledCPCount == basicLength);\n\t\t\t\tdelta = 0;\n\t\t\t\t++handledCPCount;\n\t\t\t}\n\t\t}\n\n\t\t++delta;\n\t\t++n;\n\n\t}\n\treturn output.join('');\n};\n\n/**\n * Converts a Punycode string representing a domain name or an email address\n * to Unicode. Only the Punycoded parts of the input will be converted, i.e.\n * it doesn't matter if you call it on a string that has already been\n * converted to Unicode.\n * @memberOf punycode\n * @param {String} input The Punycoded domain name or email address to\n * convert to Unicode.\n * @returns {String} The Unicode representation of the given Punycode\n * string.\n */\nconst toUnicode = function(input) {\n\treturn mapDomain(input, function(string) {\n\t\treturn regexPunycode.test(string)\n\t\t\t? decode(string.slice(4).toLowerCase())\n\t\t\t: string;\n\t});\n};\n\n/**\n * Converts a Unicode string representing a domain name or an email address to\n * Punycode. Only the non-ASCII parts of the domain name will be converted,\n * i.e. it doesn't matter if you call it with a domain that's already in\n * ASCII.\n * @memberOf punycode\n * @param {String} input The domain name or email address to convert, as a\n * Unicode string.\n * @returns {String} The Punycode representation of the given domain name or\n * email address.\n */\nconst toASCII = function(input) {\n\treturn mapDomain(input, function(string) {\n\t\treturn regexNonASCII.test(string)\n\t\t\t? 'xn--' + encode(string)\n\t\t\t: string;\n\t});\n};\n\n/*--------------------------------------------------------------------------*/\n\n/** Define the public API */\nconst punycode = {\n\t/**\n\t * A string representing the current Punycode.js version number.\n\t * @memberOf punycode\n\t * @type String\n\t */\n\t'version': '2.1.0',\n\t/**\n\t * An object of methods to convert from JavaScript's internal character\n\t * representation (UCS-2) to Unicode code points, and back.\n\t * @see \n\t * @memberOf punycode\n\t * @type Object\n\t */\n\t'ucs2': {\n\t\t'decode': ucs2decode,\n\t\t'encode': ucs2encode\n\t},\n\t'decode': decode,\n\t'encode': encode,\n\t'toASCII': toASCII,\n\t'toUnicode': toUnicode\n};\n\nexport default punycode;\n","/**\n * URI.js\n *\n * @fileoverview An RFC 3986 compliant, scheme extendable URI parsing/validating/resolving library for JavaScript.\n * @author Gary Court\n * @see http://github.com/garycourt/uri-js\n */\n\n/**\n * Copyright 2011 Gary Court. All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without modification, are\n * permitted provided that the following conditions are met:\n *\n * 1. Redistributions of source code must retain the above copyright notice, this list of\n * conditions and the following disclaimer.\n *\n * 2. Redistributions in binary form must reproduce the above copyright notice, this list\n * of conditions and the following disclaimer in the documentation and/or other materials\n * provided with the distribution.\n *\n * THIS SOFTWARE IS PROVIDED BY GARY COURT ``AS IS'' AND ANY EXPRESS OR IMPLIED\n * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL GARY COURT OR\n * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR\n * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON\n * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF\n * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n *\n * The views and conclusions contained in the software and documentation are those of the\n * authors and should not be interpreted as representing official policies, either expressed\n * or implied, of Gary Court.\n */\n\nimport URI_PROTOCOL from \"./regexps-uri\";\nimport IRI_PROTOCOL from \"./regexps-iri\";\nimport punycode from \"punycode\";\nimport { toUpperCase, typeOf, assign } from \"./util\";\n\nexport interface URIComponents {\n\tscheme?:string;\n\tuserinfo?:string;\n\thost?:string;\n\tport?:number|string;\n\tpath?:string;\n\tquery?:string;\n\tfragment?:string;\n\treference?:string;\n\terror?:string;\n}\n\nexport interface URIOptions {\n\tscheme?:string;\n\treference?:string;\n\ttolerant?:boolean;\n\tabsolutePath?:boolean;\n\tiri?:boolean;\n\tunicodeSupport?:boolean;\n\tdomainHost?:boolean;\n}\n\nexport interface URISchemeHandler {\n\tscheme:string;\n\tparse(components:ParentComponents, options:Options):Components;\n\tserialize(components:Components, options:Options):ParentComponents;\n\tunicodeSupport?:boolean;\n\tdomainHost?:boolean;\n\tabsolutePath?:boolean;\n}\n\nexport interface URIRegExps {\n\tNOT_SCHEME : RegExp,\n\tNOT_USERINFO : RegExp,\n\tNOT_HOST : RegExp,\n\tNOT_PATH : RegExp,\n\tNOT_PATH_NOSCHEME : RegExp,\n\tNOT_QUERY : RegExp,\n\tNOT_FRAGMENT : RegExp,\n\tESCAPE : RegExp,\n\tUNRESERVED : RegExp,\n\tOTHER_CHARS : RegExp,\n\tPCT_ENCODED : RegExp,\n\tIPV4ADDRESS : RegExp,\n\tIPV6ADDRESS : RegExp,\n}\n\nexport const SCHEMES:{[scheme:string]:URISchemeHandler} = {};\n\nexport function pctEncChar(chr:string):string {\n\tconst c = chr.charCodeAt(0);\n\tlet e:string;\n\n\tif (c < 16) e = \"%0\" + c.toString(16).toUpperCase();\n\telse if (c < 128) e = \"%\" + c.toString(16).toUpperCase();\n\telse if (c < 2048) e = \"%\" + ((c >> 6) | 192).toString(16).toUpperCase() + \"%\" + ((c & 63) | 128).toString(16).toUpperCase();\n\telse e = \"%\" + ((c >> 12) | 224).toString(16).toUpperCase() + \"%\" + (((c >> 6) & 63) | 128).toString(16).toUpperCase() + \"%\" + ((c & 63) | 128).toString(16).toUpperCase();\n\n\treturn e;\n}\n\nexport function pctDecChars(str:string):string {\n\tlet newStr = \"\";\n\tlet i = 0;\n\tconst il = str.length;\n\n\twhile (i < il) {\n\t\tconst c = parseInt(str.substr(i + 1, 2), 16);\n\n\t\tif (c < 128) {\n\t\t\tnewStr += String.fromCharCode(c);\n\t\t\ti += 3;\n\t\t}\n\t\telse if (c >= 194 && c < 224) {\n\t\t\tif ((il - i) >= 6) {\n\t\t\t\tconst c2 = parseInt(str.substr(i + 4, 2), 16);\n\t\t\t\tnewStr += String.fromCharCode(((c & 31) << 6) | (c2 & 63));\n\t\t\t} else {\n\t\t\t\tnewStr += str.substr(i, 6);\n\t\t\t}\n\t\t\ti += 6;\n\t\t}\n\t\telse if (c >= 224) {\n\t\t\tif ((il - i) >= 9) {\n\t\t\t\tconst c2 = parseInt(str.substr(i + 4, 2), 16);\n\t\t\t\tconst c3 = parseInt(str.substr(i + 7, 2), 16);\n\t\t\t\tnewStr += String.fromCharCode(((c & 15) << 12) | ((c2 & 63) << 6) | (c3 & 63));\n\t\t\t} else {\n\t\t\t\tnewStr += str.substr(i, 9);\n\t\t\t}\n\t\t\ti += 9;\n\t\t}\n\t\telse {\n\t\t\tnewStr += str.substr(i, 3);\n\t\t\ti += 3;\n\t\t}\n\t}\n\n\treturn newStr;\n}\n\nfunction _normalizeComponentEncoding(components:URIComponents, protocol:URIRegExps) {\n\tfunction decodeUnreserved(str:string):string {\n\t\tconst decStr = pctDecChars(str);\n\t\treturn (!decStr.match(protocol.UNRESERVED) ? str : decStr);\n\t}\n\n\tif (components.scheme) components.scheme = String(components.scheme).replace(protocol.PCT_ENCODED, decodeUnreserved).toLowerCase().replace(protocol.NOT_SCHEME, \"\");\n\tif (components.userinfo !== undefined) components.userinfo = String(components.userinfo).replace(protocol.PCT_ENCODED, decodeUnreserved).replace(protocol.NOT_USERINFO, pctEncChar).replace(protocol.PCT_ENCODED, toUpperCase);\n\tif (components.host !== undefined) components.host = String(components.host).replace(protocol.PCT_ENCODED, decodeUnreserved).toLowerCase().replace(protocol.NOT_HOST, pctEncChar).replace(protocol.PCT_ENCODED, toUpperCase);\n\tif (components.path !== undefined) components.path = String(components.path).replace(protocol.PCT_ENCODED, decodeUnreserved).replace((components.scheme ? protocol.NOT_PATH : protocol.NOT_PATH_NOSCHEME), pctEncChar).replace(protocol.PCT_ENCODED, toUpperCase);\n\tif (components.query !== undefined) components.query = String(components.query).replace(protocol.PCT_ENCODED, decodeUnreserved).replace(protocol.NOT_QUERY, pctEncChar).replace(protocol.PCT_ENCODED, toUpperCase);\n\tif (components.fragment !== undefined) components.fragment = String(components.fragment).replace(protocol.PCT_ENCODED, decodeUnreserved).replace(protocol.NOT_FRAGMENT, pctEncChar).replace(protocol.PCT_ENCODED, toUpperCase);\n\n\treturn components;\n};\n\nfunction _stripLeadingZeros(str:string):string {\n\treturn str.replace(/^0*(.*)/, \"$1\") || \"0\";\n}\n\nfunction _normalizeIPv4(host:string, protocol:URIRegExps):string {\n\tconst matches = host.match(protocol.IPV4ADDRESS) || [];\n\tconst [, address] = matches;\n\t\n\tif (address) {\n\t\treturn address.split(\".\").map(_stripLeadingZeros).join(\".\");\n\t} else {\n\t\treturn host;\n\t}\n}\n\nfunction _normalizeIPv6(host:string, protocol:URIRegExps):string {\n\tconst matches = host.match(protocol.IPV6ADDRESS) || [];\n\tconst [, address, zone] = matches;\n\n\tif (address) {\n\t\tconst [last, first] = address.toLowerCase().split('::').reverse();\n\t\tconst firstFields = first ? first.split(\":\").map(_stripLeadingZeros) : [];\n\t\tconst lastFields = last.split(\":\").map(_stripLeadingZeros);\n\t\tconst isLastFieldIPv4Address = protocol.IPV4ADDRESS.test(lastFields[lastFields.length - 1]);\n\t\tconst fieldCount = isLastFieldIPv4Address ? 7 : 8;\n\t\tconst lastFieldsStart = lastFields.length - fieldCount;\n\t\tconst fields = Array(fieldCount);\n\n\t\tfor (let x = 0; x < fieldCount; ++x) {\n\t\t\tfields[x] = firstFields[x] || lastFields[lastFieldsStart + x] || '';\n\t\t}\n\n\t\tif (isLastFieldIPv4Address) {\n\t\t\tfields[fieldCount - 1] = _normalizeIPv4(fields[fieldCount - 1], protocol);\n\t\t}\n\n\t\tconst allZeroFields = fields.reduce>((acc, field, index) => {\n\t\t\tif (!field || field === \"0\") {\n\t\t\t\tconst lastLongest = acc[acc.length - 1];\n\t\t\t\tif (lastLongest && lastLongest.index + lastLongest.length === index) {\n\t\t\t\t\tlastLongest.length++;\n\t\t\t\t} else {\n\t\t\t\t\tacc.push({ index, length : 1 });\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn acc;\n\t\t}, []);\n\n\t\tconst longestZeroFields = allZeroFields.sort((a, b) => b.length - a.length)[0];\n\n\t\tlet newHost:string;\n\t\tif (longestZeroFields && longestZeroFields.length > 1) {\n\t\t\tconst newFirst = fields.slice(0, longestZeroFields.index) ;\n\t\t\tconst newLast = fields.slice(longestZeroFields.index + longestZeroFields.length);\n\t\t\tnewHost = newFirst.join(\":\") + \"::\" + newLast.join(\":\");\n\t\t} else {\n\t\t\tnewHost = fields.join(\":\");\n\t\t}\n\n\t\tif (zone) {\n\t\t\tnewHost += \"%\" + zone;\n\t\t}\n\n\t\treturn newHost;\n\t} else {\n\t\treturn host;\n\t}\n}\n\nconst URI_PARSE = /^(?:([^:\\/?#]+):)?(?:\\/\\/((?:([^\\/?#@]*)@)?(\\[[^\\/?#\\]]+\\]|[^\\/?#:]*)(?:\\:(\\d*))?))?([^?#]*)(?:\\?([^#]*))?(?:#((?:.|\\n|\\r)*))?/i;\nconst NO_MATCH_IS_UNDEFINED = ((\"\").match(/(){0}/))[1] === undefined;\n\nexport function parse(uriString:string, options:URIOptions = {}):URIComponents {\n\tconst components:URIComponents = {};\n\tconst protocol = (options.iri !== false ? IRI_PROTOCOL : URI_PROTOCOL);\n\n\tif (options.reference === \"suffix\") uriString = (options.scheme ? options.scheme + \":\" : \"\") + \"//\" + uriString;\n\n\tconst matches = uriString.match(URI_PARSE);\n\n\tif (matches) {\n\t\tif (NO_MATCH_IS_UNDEFINED) {\n\t\t\t//store each component\n\t\t\tcomponents.scheme = matches[1];\n\t\t\tcomponents.userinfo = matches[3];\n\t\t\tcomponents.host = matches[4];\n\t\t\tcomponents.port = parseInt(matches[5], 10);\n\t\t\tcomponents.path = matches[6] || \"\";\n\t\t\tcomponents.query = matches[7];\n\t\t\tcomponents.fragment = matches[8];\n\n\t\t\t//fix port number\n\t\t\tif (isNaN(components.port)) {\n\t\t\t\tcomponents.port = matches[5];\n\t\t\t}\n\t\t} else { //IE FIX for improper RegExp matching\n\t\t\t//store each component\n\t\t\tcomponents.scheme = matches[1] || undefined;\n\t\t\tcomponents.userinfo = (uriString.indexOf(\"@\") !== -1 ? matches[3] : undefined);\n\t\t\tcomponents.host = (uriString.indexOf(\"//\") !== -1 ? matches[4] : undefined);\n\t\t\tcomponents.port = parseInt(matches[5], 10);\n\t\t\tcomponents.path = matches[6] || \"\";\n\t\t\tcomponents.query = (uriString.indexOf(\"?\") !== -1 ? matches[7] : undefined);\n\t\t\tcomponents.fragment = (uriString.indexOf(\"#\") !== -1 ? matches[8] : undefined);\n\n\t\t\t//fix port number\n\t\t\tif (isNaN(components.port)) {\n\t\t\t\tcomponents.port = (uriString.match(/\\/\\/(?:.|\\n)*\\:(?:\\/|\\?|\\#|$)/) ? matches[4] : undefined);\n\t\t\t}\n\t\t}\n\n\t\tif (components.host) {\n\t\t\t//normalize IP hosts\n\t\t\tcomponents.host = _normalizeIPv6(_normalizeIPv4(components.host, protocol), protocol);\n\t\t}\n\n\t\t//determine reference type\n\t\tif (components.scheme === undefined && components.userinfo === undefined && components.host === undefined && components.port === undefined && !components.path && components.query === undefined) {\n\t\t\tcomponents.reference = \"same-document\";\n\t\t} else if (components.scheme === undefined) {\n\t\t\tcomponents.reference = \"relative\";\n\t\t} else if (components.fragment === undefined) {\n\t\t\tcomponents.reference = \"absolute\";\n\t\t} else {\n\t\t\tcomponents.reference = \"uri\";\n\t\t}\n\n\t\t//check for reference errors\n\t\tif (options.reference && options.reference !== \"suffix\" && options.reference !== components.reference) {\n\t\t\tcomponents.error = components.error || \"URI is not a \" + options.reference + \" reference.\";\n\t\t}\n\n\t\t//find scheme handler\n\t\tconst schemeHandler = SCHEMES[(options.scheme || components.scheme || \"\").toLowerCase()];\n\n\t\t//check if scheme can't handle IRIs\n\t\tif (!options.unicodeSupport && (!schemeHandler || !schemeHandler.unicodeSupport)) {\n\t\t\t//if host component is a domain name\n\t\t\tif (components.host && (options.domainHost || (schemeHandler && schemeHandler.domainHost))) {\n\t\t\t\t//convert Unicode IDN -> ASCII IDN\n\t\t\t\ttry {\n\t\t\t\t\tcomponents.host = punycode.toASCII(components.host.replace(protocol.PCT_ENCODED, pctDecChars).toLowerCase());\n\t\t\t\t} catch (e) {\n\t\t\t\t\tcomponents.error = components.error || \"Host's domain name can not be converted to ASCII via punycode: \" + e;\n\t\t\t\t}\n\t\t\t}\n\t\t\t//convert IRI -> URI\n\t\t\t_normalizeComponentEncoding(components, URI_PROTOCOL);\n\t\t} else {\n\t\t\t//normalize encodings\n\t\t\t_normalizeComponentEncoding(components, protocol);\n\t\t}\n\n\t\t//perform scheme specific parsing\n\t\tif (schemeHandler && schemeHandler.parse) {\n\t\t\tschemeHandler.parse(components, options);\n\t\t}\n\t} else {\n\t\tcomponents.error = components.error || \"URI can not be parsed.\";\n\t}\n\n\treturn components;\n};\n\nfunction _recomposeAuthority(components:URIComponents, options:URIOptions):string|undefined {\n\tconst protocol = (options.iri !== false ? IRI_PROTOCOL : URI_PROTOCOL);\n\tconst uriTokens:Array = [];\n\n\tif (components.userinfo !== undefined) {\n\t\turiTokens.push(components.userinfo);\n\t\turiTokens.push(\"@\");\n\t}\n\n\tif (components.host !== undefined) {\n\t\t//normalize IP hosts, add brackets and escape zone separator for IPv6\n\t\turiTokens.push(_normalizeIPv6(_normalizeIPv4(String(components.host), protocol), protocol).replace(protocol.IPV6ADDRESS, (_, $1, $2) => \"[\" + $1 + ($2 ? \"%25\" + $2 : \"\") + \"]\"));\n\t}\n\n\tif (typeof components.port === \"number\" || typeof components.port === \"string\") {\n\t\turiTokens.push(\":\");\n\t\turiTokens.push(String(components.port));\n\t}\n\n\treturn uriTokens.length ? uriTokens.join(\"\") : undefined;\n};\n\nconst RDS1 = /^\\.\\.?\\//;\nconst RDS2 = /^\\/\\.(\\/|$)/;\nconst RDS3 = /^\\/\\.\\.(\\/|$)/;\nconst RDS4 = /^\\.\\.?$/;\nconst RDS5 = /^\\/?(?:.|\\n)*?(?=\\/|$)/;\n\nexport function removeDotSegments(input:string):string {\n\tconst output:Array = [];\n\n\twhile (input.length) {\n\t\tif (input.match(RDS1)) {\n\t\t\tinput = input.replace(RDS1, \"\");\n\t\t} else if (input.match(RDS2)) {\n\t\t\tinput = input.replace(RDS2, \"/\");\n\t\t} else if (input.match(RDS3)) {\n\t\t\tinput = input.replace(RDS3, \"/\");\n\t\t\toutput.pop();\n\t\t} else if (input === \".\" || input === \"..\") {\n\t\t\tinput = \"\";\n\t\t} else {\n\t\t\tconst im = input.match(RDS5);\n\t\t\tif (im) {\n\t\t\t\tconst s = im[0];\n\t\t\t\tinput = input.slice(s.length);\n\t\t\t\toutput.push(s);\n\t\t\t} else {\n\t\t\t\tthrow new Error(\"Unexpected dot segment condition\");\n\t\t\t}\n\t\t}\n\t}\n\n\treturn output.join(\"\");\n};\n\nexport function serialize(components:URIComponents, options:URIOptions = {}):string {\n\tconst protocol = (options.iri ? IRI_PROTOCOL : URI_PROTOCOL);\n\tconst uriTokens:Array = [];\n\n\t//find scheme handler\n\tconst schemeHandler = SCHEMES[(options.scheme || components.scheme || \"\").toLowerCase()];\n\n\t//perform scheme specific serialization\n\tif (schemeHandler && schemeHandler.serialize) schemeHandler.serialize(components, options);\n\n\tif (components.host) {\n\t\t//if host component is an IPv6 address\n\t\tif (protocol.IPV6ADDRESS.test(components.host)) {\n\t\t\t//TODO: normalize IPv6 address as per RFC 5952\n\t\t}\n\n\t\t//if host component is a domain name\n\t\telse if (options.domainHost || (schemeHandler && schemeHandler.domainHost)) {\n\t\t\t//convert IDN via punycode\n\t\t\ttry {\n\t\t\t\tcomponents.host = (!options.iri ? punycode.toASCII(components.host.replace(protocol.PCT_ENCODED, pctDecChars).toLowerCase()) : punycode.toUnicode(components.host));\n\t\t\t} catch (e) {\n\t\t\t\tcomponents.error = components.error || \"Host's domain name can not be converted to \" + (!options.iri ? \"ASCII\" : \"Unicode\") + \" via punycode: \" + e;\n\t\t\t}\n\t\t}\n\t}\n\n\t//normalize encoding\n\t_normalizeComponentEncoding(components, protocol);\n\n\tif (options.reference !== \"suffix\" && components.scheme) {\n\t\turiTokens.push(components.scheme);\n\t\turiTokens.push(\":\");\n\t}\n\n\tconst authority = _recomposeAuthority(components, options);\n\tif (authority !== undefined) {\n\t\tif (options.reference !== \"suffix\") {\n\t\t\turiTokens.push(\"//\");\n\t\t}\n\n\t\turiTokens.push(authority);\n\n\t\tif (components.path && components.path.charAt(0) !== \"/\") {\n\t\t\turiTokens.push(\"/\");\n\t\t}\n\t}\n\n\tif (components.path !== undefined) {\n\t\tlet s = components.path;\n\n\t\tif (!options.absolutePath && (!schemeHandler || !schemeHandler.absolutePath)) {\n\t\t\ts = removeDotSegments(s);\n\t\t}\n\n\t\tif (authority === undefined) {\n\t\t\ts = s.replace(/^\\/\\//, \"/%2F\"); //don't allow the path to start with \"//\"\n\t\t}\n\n\t\turiTokens.push(s);\n\t}\n\n\tif (components.query !== undefined) {\n\t\turiTokens.push(\"?\");\n\t\turiTokens.push(components.query);\n\t}\n\n\tif (components.fragment !== undefined) {\n\t\turiTokens.push(\"#\");\n\t\turiTokens.push(components.fragment);\n\t}\n\n\treturn uriTokens.join(\"\"); //merge tokens into a string\n};\n\nexport function resolveComponents(base:URIComponents, relative:URIComponents, options:URIOptions = {}, skipNormalization?:boolean):URIComponents {\n\tconst target:URIComponents = {};\n\n\tif (!skipNormalization) {\n\t\tbase = parse(serialize(base, options), options); //normalize base components\n\t\trelative = parse(serialize(relative, options), options); //normalize relative components\n\t}\n\toptions = options || {};\n\n\tif (!options.tolerant && relative.scheme) {\n\t\ttarget.scheme = relative.scheme;\n\t\t//target.authority = relative.authority;\n\t\ttarget.userinfo = relative.userinfo;\n\t\ttarget.host = relative.host;\n\t\ttarget.port = relative.port;\n\t\ttarget.path = removeDotSegments(relative.path || \"\");\n\t\ttarget.query = relative.query;\n\t} else {\n\t\tif (relative.userinfo !== undefined || relative.host !== undefined || relative.port !== undefined) {\n\t\t\t//target.authority = relative.authority;\n\t\t\ttarget.userinfo = relative.userinfo;\n\t\t\ttarget.host = relative.host;\n\t\t\ttarget.port = relative.port;\n\t\t\ttarget.path = removeDotSegments(relative.path || \"\");\n\t\t\ttarget.query = relative.query;\n\t\t} else {\n\t\t\tif (!relative.path) {\n\t\t\t\ttarget.path = base.path;\n\t\t\t\tif (relative.query !== undefined) {\n\t\t\t\t\ttarget.query = relative.query;\n\t\t\t\t} else {\n\t\t\t\t\ttarget.query = base.query;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif (relative.path.charAt(0) === \"/\") {\n\t\t\t\t\ttarget.path = removeDotSegments(relative.path);\n\t\t\t\t} else {\n\t\t\t\t\tif ((base.userinfo !== undefined || base.host !== undefined || base.port !== undefined) && !base.path) {\n\t\t\t\t\t\ttarget.path = \"/\" + relative.path;\n\t\t\t\t\t} else if (!base.path) {\n\t\t\t\t\t\ttarget.path = relative.path;\n\t\t\t\t\t} else {\n\t\t\t\t\t\ttarget.path = base.path.slice(0, base.path.lastIndexOf(\"/\") + 1) + relative.path;\n\t\t\t\t\t}\n\t\t\t\t\ttarget.path = removeDotSegments(target.path);\n\t\t\t\t}\n\t\t\t\ttarget.query = relative.query;\n\t\t\t}\n\t\t\t//target.authority = base.authority;\n\t\t\ttarget.userinfo = base.userinfo;\n\t\t\ttarget.host = base.host;\n\t\t\ttarget.port = base.port;\n\t\t}\n\t\ttarget.scheme = base.scheme;\n\t}\n\n\ttarget.fragment = relative.fragment;\n\n\treturn target;\n};\n\nexport function resolve(baseURI:string, relativeURI:string, options?:URIOptions):string {\n\tconst schemelessOptions = assign({ scheme : 'null' }, options);\n\treturn serialize(resolveComponents(parse(baseURI, schemelessOptions), parse(relativeURI, schemelessOptions), schemelessOptions, true), schemelessOptions);\n};\n\nexport function normalize(uri:string, options?:URIOptions):string;\nexport function normalize(uri:URIComponents, options?:URIOptions):URIComponents;\nexport function normalize(uri:any, options?:URIOptions):any {\n\tif (typeof uri === \"string\") {\n\t\turi = serialize(parse(uri, options), options);\n\t} else if (typeOf(uri) === \"object\") {\n\t\turi = parse(serialize(uri, options), options);\n\t}\n\n\treturn uri;\n};\n\nexport function equal(uriA:string, uriB:string, options?: URIOptions):boolean;\nexport function equal(uriA:URIComponents, uriB:URIComponents, options?:URIOptions):boolean;\nexport function equal(uriA:any, uriB:any, options?:URIOptions):boolean {\n\tif (typeof uriA === \"string\") {\n\t\turiA = serialize(parse(uriA, options), options);\n\t} else if (typeOf(uriA) === \"object\") {\n\t\turiA = serialize(uriA, options);\n\t}\n\n\tif (typeof uriB === \"string\") {\n\t\turiB = serialize(parse(uriB, options), options);\n\t} else if (typeOf(uriB) === \"object\") {\n\t\turiB = serialize(uriB, options);\n\t}\n\n\treturn uriA === uriB;\n};\n\nexport function escapeComponent(str:string, options?:URIOptions):string {\n\treturn str && str.toString().replace((!options || !options.iri ? URI_PROTOCOL.ESCAPE : IRI_PROTOCOL.ESCAPE), pctEncChar);\n};\n\nexport function unescapeComponent(str:string, options?:URIOptions):string {\n\treturn str && str.toString().replace((!options || !options.iri ? URI_PROTOCOL.PCT_ENCODED : IRI_PROTOCOL.PCT_ENCODED), pctDecChars);\n};\n","import { URISchemeHandler, URIComponents, URIOptions } from \"../uri\";\n\nexport interface WSComponents extends URIComponents {\n\tresourceName?: string;\n\tsecure?: boolean;\n}\n\nfunction isSecure(wsComponents:WSComponents):boolean {\n\treturn typeof wsComponents.secure === 'boolean' ? wsComponents.secure : String(wsComponents.scheme).toLowerCase() === \"wss\";\n}\n\n//RFC 6455\nconst handler:URISchemeHandler = {\n\tscheme : \"ws\",\n\n\tdomainHost : true,\n\n\tparse : function (components:URIComponents, options:URIOptions):WSComponents {\n\t\tconst wsComponents = components as WSComponents;\n\n\t\t//indicate if the secure flag is set\n\t\twsComponents.secure = isSecure(wsComponents);\n\n\t\t//construct resouce name\n\t\twsComponents.resourceName = (wsComponents.path || '/') + (wsComponents.query ? '?' + wsComponents.query : '');\n\t\twsComponents.path = undefined;\n\t\twsComponents.query = undefined;\n\n\t\treturn wsComponents;\n\t},\n\n\tserialize : function (wsComponents:WSComponents, options:URIOptions):URIComponents {\n\t\t//normalize the default port\n\t\tif (wsComponents.port === (isSecure(wsComponents) ? 443 : 80) || wsComponents.port === \"\") {\n\t\t\twsComponents.port = undefined;\n\t\t}\n\n\t\t//ensure scheme matches secure flag\n\t\tif (typeof wsComponents.secure === 'boolean') {\n\t\t\twsComponents.scheme = (wsComponents.secure ? 'wss' : 'ws');\n\t\t\twsComponents.secure = undefined;\n\t\t}\n\n\t\t//reconstruct path from resource name\n\t\tif (wsComponents.resourceName) {\n\t\t\tconst [path, query] = wsComponents.resourceName.split('?');\n\t\t\twsComponents.path = (path && path !== '/' ? path : undefined);\n\t\t\twsComponents.query = query;\n\t\t\twsComponents.resourceName = undefined;\n\t\t}\n\n\t\t//forbid fragment component\n\t\twsComponents.fragment = undefined;\n\n\t\treturn wsComponents;\n\t}\n};\n\nexport default handler;","import { URISchemeHandler, URIComponents, URIOptions } from \"../uri\";\nimport { pctEncChar, pctDecChars, unescapeComponent } from \"../uri\";\nimport punycode from \"punycode\";\nimport { merge, subexp, toUpperCase, toArray } from \"../util\";\n\nexport interface MailtoHeaders {\n\t[hfname:string]:string\n}\n\nexport interface MailtoComponents extends URIComponents {\n\tto:Array,\n\theaders?:MailtoHeaders,\n\tsubject?:string,\n\tbody?:string\n}\n\nconst O:MailtoHeaders = {};\nconst isIRI = true;\n\n//RFC 3986\nconst UNRESERVED$$ = \"[A-Za-z0-9\\\\-\\\\.\\\\_\\\\~\" + (isIRI ? \"\\\\xA0-\\\\u200D\\\\u2010-\\\\u2029\\\\u202F-\\\\uD7FF\\\\uF900-\\\\uFDCF\\\\uFDF0-\\\\uFFEF\" : \"\") + \"]\";\nconst HEXDIG$$ = \"[0-9A-Fa-f]\"; //case-insensitive\nconst PCT_ENCODED$ = subexp(subexp(\"%[EFef]\" + HEXDIG$$ + \"%\" + HEXDIG$$ + HEXDIG$$ + \"%\" + HEXDIG$$ + HEXDIG$$) + \"|\" + subexp(\"%[89A-Fa-f]\" + HEXDIG$$ + \"%\" + HEXDIG$$ + HEXDIG$$) + \"|\" + subexp(\"%\" + HEXDIG$$ + HEXDIG$$)); //expanded\n\n//RFC 5322, except these symbols as per RFC 6068: @ : / ? # [ ] & ; =\n//const ATEXT$$ = \"[A-Za-z0-9\\\\!\\\\#\\\\$\\\\%\\\\&\\\\'\\\\*\\\\+\\\\-\\\\/\\\\=\\\\?\\\\^\\\\_\\\\`\\\\{\\\\|\\\\}\\\\~]\";\n//const WSP$$ = \"[\\\\x20\\\\x09]\";\n//const OBS_QTEXT$$ = \"[\\\\x01-\\\\x08\\\\x0B\\\\x0C\\\\x0E-\\\\x1F\\\\x7F]\"; //(%d1-8 / %d11-12 / %d14-31 / %d127)\n//const QTEXT$$ = merge(\"[\\\\x21\\\\x23-\\\\x5B\\\\x5D-\\\\x7E]\", OBS_QTEXT$$); //%d33 / %d35-91 / %d93-126 / obs-qtext\n//const VCHAR$$ = \"[\\\\x21-\\\\x7E]\";\n//const WSP$$ = \"[\\\\x20\\\\x09]\";\n//const OBS_QP$ = subexp(\"\\\\\\\\\" + merge(\"[\\\\x00\\\\x0D\\\\x0A]\", OBS_QTEXT$$)); //%d0 / CR / LF / obs-qtext\n//const FWS$ = subexp(subexp(WSP$$ + \"*\" + \"\\\\x0D\\\\x0A\") + \"?\" + WSP$$ + \"+\");\n//const QUOTED_PAIR$ = subexp(subexp(\"\\\\\\\\\" + subexp(VCHAR$$ + \"|\" + WSP$$)) + \"|\" + OBS_QP$);\n//const QUOTED_STRING$ = subexp('\\\\\"' + subexp(FWS$ + \"?\" + QCONTENT$) + \"*\" + FWS$ + \"?\" + '\\\\\"');\nconst ATEXT$$ = \"[A-Za-z0-9\\\\!\\\\$\\\\%\\\\'\\\\*\\\\+\\\\-\\\\^\\\\_\\\\`\\\\{\\\\|\\\\}\\\\~]\";\nconst QTEXT$$ = \"[\\\\!\\\\$\\\\%\\\\'\\\\(\\\\)\\\\*\\\\+\\\\,\\\\-\\\\.0-9\\\\<\\\\>A-Z\\\\x5E-\\\\x7E]\";\nconst VCHAR$$ = merge(QTEXT$$, \"[\\\\\\\"\\\\\\\\]\");\nconst DOT_ATOM_TEXT$ = subexp(ATEXT$$ + \"+\" + subexp(\"\\\\.\" + ATEXT$$ + \"+\") + \"*\");\nconst QUOTED_PAIR$ = subexp(\"\\\\\\\\\" + VCHAR$$);\nconst QCONTENT$ = subexp(QTEXT$$ + \"|\" + QUOTED_PAIR$);\nconst QUOTED_STRING$ = subexp('\\\\\"' + QCONTENT$ + \"*\" + '\\\\\"');\n\n//RFC 6068\nconst DTEXT_NO_OBS$$ = \"[\\\\x21-\\\\x5A\\\\x5E-\\\\x7E]\"; //%d33-90 / %d94-126\nconst SOME_DELIMS$$ = \"[\\\\!\\\\$\\\\'\\\\(\\\\)\\\\*\\\\+\\\\,\\\\;\\\\:\\\\@]\";\nconst QCHAR$ = subexp(UNRESERVED$$ + \"|\" + PCT_ENCODED$ + \"|\" + SOME_DELIMS$$);\nconst DOMAIN$ = subexp(DOT_ATOM_TEXT$ + \"|\" + \"\\\\[\" + DTEXT_NO_OBS$$ + \"*\" + \"\\\\]\");\nconst LOCAL_PART$ = subexp(DOT_ATOM_TEXT$ + \"|\" + QUOTED_STRING$);\nconst ADDR_SPEC$ = subexp(LOCAL_PART$ + \"\\\\@\" + DOMAIN$);\nconst TO$ = subexp(ADDR_SPEC$ + subexp(\"\\\\,\" + ADDR_SPEC$) + \"*\");\nconst HFNAME$ = subexp(QCHAR$ + \"*\");\nconst HFVALUE$ = HFNAME$;\nconst HFIELD$ = subexp(HFNAME$ + \"\\\\=\" + HFVALUE$);\nconst HFIELDS2$ = subexp(HFIELD$ + subexp(\"\\\\&\" + HFIELD$) + \"*\");\nconst HFIELDS$ = subexp(\"\\\\?\" + HFIELDS2$);\nconst MAILTO_URI = new RegExp(\"^mailto\\\\:\" + TO$ + \"?\" + HFIELDS$ + \"?$\");\n\nconst UNRESERVED = new RegExp(UNRESERVED$$, \"g\");\nconst PCT_ENCODED = new RegExp(PCT_ENCODED$, \"g\");\nconst NOT_LOCAL_PART = new RegExp(merge(\"[^]\", ATEXT$$, \"[\\\\.]\", '[\\\\\"]', VCHAR$$), \"g\");\nconst NOT_DOMAIN = new RegExp(merge(\"[^]\", ATEXT$$, \"[\\\\.]\", \"[\\\\[]\", DTEXT_NO_OBS$$, \"[\\\\]]\"), \"g\");\nconst NOT_HFNAME = new RegExp(merge(\"[^]\", UNRESERVED$$, SOME_DELIMS$$), \"g\");\nconst NOT_HFVALUE = NOT_HFNAME;\nconst TO = new RegExp(\"^\" + TO$ + \"$\");\nconst HFIELDS = new RegExp(\"^\" + HFIELDS2$ + \"$\");\n\nfunction decodeUnreserved(str:string):string {\n\tconst decStr = pctDecChars(str);\n\treturn (!decStr.match(UNRESERVED) ? str : decStr);\n}\n\nconst handler:URISchemeHandler = {\n\tscheme : \"mailto\",\n\n\tparse : function (components:URIComponents, options:URIOptions):MailtoComponents {\n\t\tconst mailtoComponents = components as MailtoComponents;\n\t\tconst to = mailtoComponents.to = (mailtoComponents.path ? mailtoComponents.path.split(\",\") : []);\n\t\tmailtoComponents.path = undefined;\n\n\t\tif (mailtoComponents.query) {\n\t\t\tlet unknownHeaders = false\n\t\t\tconst headers:MailtoHeaders = {};\n\t\t\tconst hfields = mailtoComponents.query.split(\"&\");\n\n\t\t\tfor (let x = 0, xl = hfields.length; x < xl; ++x) {\n\t\t\t\tconst hfield = hfields[x].split(\"=\");\n\n\t\t\t\tswitch (hfield[0]) {\n\t\t\t\t\tcase \"to\":\n\t\t\t\t\t\tconst toAddrs = hfield[1].split(\",\");\n\t\t\t\t\t\tfor (let x = 0, xl = toAddrs.length; x < xl; ++x) {\n\t\t\t\t\t\t\tto.push(toAddrs[x]);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"subject\":\n\t\t\t\t\t\tmailtoComponents.subject = unescapeComponent(hfield[1], options);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"body\":\n\t\t\t\t\t\tmailtoComponents.body = unescapeComponent(hfield[1], options);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tdefault:\n\t\t\t\t\t\tunknownHeaders = true;\n\t\t\t\t\t\theaders[unescapeComponent(hfield[0], options)] = unescapeComponent(hfield[1], options);\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (unknownHeaders) mailtoComponents.headers = headers;\n\t\t}\n\n\t\tmailtoComponents.query = undefined;\n\n\t\tfor (let x = 0, xl = to.length; x < xl; ++x) {\n\t\t\tconst addr = to[x].split(\"@\");\n\n\t\t\taddr[0] = unescapeComponent(addr[0]);\n\n\t\t\tif (!options.unicodeSupport) {\n\t\t\t\t//convert Unicode IDN -> ASCII IDN\n\t\t\t\ttry {\n\t\t\t\t\taddr[1] = punycode.toASCII(unescapeComponent(addr[1], options).toLowerCase());\n\t\t\t\t} catch (e) {\n\t\t\t\t\tmailtoComponents.error = mailtoComponents.error || \"Email address's domain name can not be converted to ASCII via punycode: \" + e;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\taddr[1] = unescapeComponent(addr[1], options).toLowerCase();\n\t\t\t}\n\n\t\t\tto[x] = addr.join(\"@\");\n\t\t}\n\n\t\treturn mailtoComponents;\n\t},\n\n\tserialize : function (mailtoComponents:MailtoComponents, options:URIOptions):URIComponents {\n\t\tconst components = mailtoComponents as URIComponents;\n\t\tconst to = toArray(mailtoComponents.to);\n\t\tif (to) {\n\t\t\tfor (let x = 0, xl = to.length; x < xl; ++x) {\n\t\t\t\tconst toAddr = String(to[x]);\n\t\t\t\tconst atIdx = toAddr.lastIndexOf(\"@\");\n\t\t\t\tconst localPart = (toAddr.slice(0, atIdx)).replace(PCT_ENCODED, decodeUnreserved).replace(PCT_ENCODED, toUpperCase).replace(NOT_LOCAL_PART, pctEncChar);\n\t\t\t\tlet domain = toAddr.slice(atIdx + 1);\n\n\t\t\t\t//convert IDN via punycode\n\t\t\t\ttry {\n\t\t\t\t\tdomain = (!options.iri ? punycode.toASCII(unescapeComponent(domain, options).toLowerCase()) : punycode.toUnicode(domain));\n\t\t\t\t} catch (e) {\n\t\t\t\t\tcomponents.error = components.error || \"Email address's domain name can not be converted to \" + (!options.iri ? \"ASCII\" : \"Unicode\") + \" via punycode: \" + e;\n\t\t\t\t}\n\n\t\t\t\tto[x] = localPart + \"@\" + domain;\n\t\t\t}\n\n\t\t\tcomponents.path = to.join(\",\");\n\t\t}\n\n\t\tconst headers = mailtoComponents.headers = mailtoComponents.headers || {};\n\n\t\tif (mailtoComponents.subject) headers[\"subject\"] = mailtoComponents.subject;\n\t\tif (mailtoComponents.body) headers[\"body\"] = mailtoComponents.body;\n\n\t\tconst fields = [];\n\t\tfor (const name in headers) {\n\t\t\tif (headers[name] !== O[name]) {\n\t\t\t\tfields.push(\n\t\t\t\t\tname.replace(PCT_ENCODED, decodeUnreserved).replace(PCT_ENCODED, toUpperCase).replace(NOT_HFNAME, pctEncChar) +\n\t\t\t\t\t\"=\" +\n\t\t\t\t\theaders[name].replace(PCT_ENCODED, decodeUnreserved).replace(PCT_ENCODED, toUpperCase).replace(NOT_HFVALUE, pctEncChar)\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\t\tif (fields.length) {\n\t\t\tcomponents.query = fields.join(\"&\");\n\t\t}\n\n\t\treturn components;\n\t}\n}\n\nexport default handler;","import { URIRegExps } from \"./uri\";\nimport { buildExps } from \"./regexps-uri\";\n\nexport default buildExps(true);\n","import { URISchemeHandler, URIComponents, URIOptions } from \"../uri\";\n\nconst handler:URISchemeHandler = {\n\tscheme : \"http\",\n\n\tdomainHost : true,\n\n\tparse : function (components:URIComponents, options:URIOptions):URIComponents {\n\t\t//report missing host\n\t\tif (!components.host) {\n\t\t\tcomponents.error = components.error || \"HTTP URIs must have a host.\";\n\t\t}\n\n\t\treturn components;\n\t},\n\n\tserialize : function (components:URIComponents, options:URIOptions):URIComponents {\n\t\tconst secure = String(components.scheme).toLowerCase() === \"https\";\n\n\t\t//normalize the default port\n\t\tif (components.port === (secure ? 443 : 80) || components.port === \"\") {\n\t\t\tcomponents.port = undefined;\n\t\t}\n\t\t\n\t\t//normalize the empty path\n\t\tif (!components.path) {\n\t\t\tcomponents.path = \"/\";\n\t\t}\n\n\t\t//NOTE: We do not parse query strings for HTTP URIs\n\t\t//as WWW Form Url Encoded query strings are part of the HTML4+ spec,\n\t\t//and not the HTTP spec.\n\n\t\treturn components;\n\t}\n};\n\nexport default handler;","import { URISchemeHandler, URIComponents, URIOptions } from \"../uri\";\nimport http from \"./http\";\n\nconst handler:URISchemeHandler = {\n\tscheme : \"https\",\n\tdomainHost : http.domainHost,\n\tparse : http.parse,\n\tserialize : http.serialize\n}\n\nexport default handler;","import { URISchemeHandler, URIComponents, URIOptions } from \"../uri\";\nimport ws from \"./ws\";\n\nconst handler:URISchemeHandler = {\n\tscheme : \"wss\",\n\tdomainHost : ws.domainHost,\n\tparse : ws.parse,\n\tserialize : ws.serialize\n}\n\nexport default handler;","import { URISchemeHandler, URIComponents, URIOptions } from \"../uri\";\nimport { pctEncChar, SCHEMES } from \"../uri\";\n\nexport interface URNComponents extends URIComponents {\n\tnid?:string;\n\tnss?:string;\n}\n\nexport interface URNOptions extends URIOptions {\n\tnid?:string;\n}\n\nconst NID$ = \"(?:[0-9A-Za-z][0-9A-Za-z\\\\-]{1,31})\";\nconst PCT_ENCODED$ = \"(?:\\\\%[0-9A-Fa-f]{2})\";\nconst TRANS$$ = \"[0-9A-Za-z\\\\(\\\\)\\\\+\\\\,\\\\-\\\\.\\\\:\\\\=\\\\@\\\\;\\\\$\\\\_\\\\!\\\\*\\\\'\\\\/\\\\?\\\\#]\";\nconst NSS$ = \"(?:(?:\" + PCT_ENCODED$ + \"|\" + TRANS$$ + \")+)\";\nconst URN_SCHEME = new RegExp(\"^urn\\\\:(\" + NID$ + \")$\");\nconst URN_PATH = new RegExp(\"^(\" + NID$ + \")\\\\:(\" + NSS$ + \")$\");\nconst URN_PARSE = /^([^\\:]+)\\:(.*)/;\nconst URN_EXCLUDED = /[\\x00-\\x20\\\\\\\"\\&\\<\\>\\[\\]\\^\\`\\{\\|\\}\\~\\x7F-\\xFF]/g;\n\n//RFC 2141\nconst handler:URISchemeHandler = {\n\tscheme : \"urn\",\n\n\tparse : function (components:URIComponents, options:URNOptions):URNComponents {\n\t\tconst matches = components.path && components.path.match(URN_PARSE);\n\t\tlet urnComponents = components as URNComponents;\n\n\t\tif (matches) {\n\t\t\tconst scheme = options.scheme || urnComponents.scheme || \"urn\";\n\t\t\tconst nid = matches[1].toLowerCase();\n\t\t\tconst nss = matches[2];\n\t\t\tconst urnScheme = `${scheme}:${options.nid || nid}`;\n\t\t\tconst schemeHandler = SCHEMES[urnScheme];\n\n\t\t\turnComponents.nid = nid;\n\t\t\turnComponents.nss = nss;\n\t\t\turnComponents.path = undefined;\n\n\t\t\tif (schemeHandler) {\n\t\t\t\turnComponents = schemeHandler.parse(urnComponents, options) as URNComponents;\n\t\t\t}\n\t\t} else {\n\t\t\turnComponents.error = urnComponents.error || \"URN can not be parsed.\";\n\t\t}\n\n\t\treturn urnComponents;\n\t},\n\n\tserialize : function (urnComponents:URNComponents, options:URNOptions):URIComponents {\n\t\tconst scheme = options.scheme || urnComponents.scheme || \"urn\";\n\t\tconst nid = urnComponents.nid;\n\t\tconst urnScheme = `${scheme}:${options.nid || nid}`;\n\t\tconst schemeHandler = SCHEMES[urnScheme];\n\n\t\tif (schemeHandler) {\n\t\t\turnComponents = schemeHandler.serialize(urnComponents, options) as URNComponents;\n\t\t}\n\n\t\tconst uriComponents = urnComponents as URIComponents;\n\t\tconst nss = urnComponents.nss;\n\t\turiComponents.path = `${nid || options.nid}:${nss}`;\n\n\t\treturn uriComponents;\n\t},\n};\n\nexport default handler;","import { URISchemeHandler, URIComponents, URIOptions } from \"../uri\";\nimport { URNComponents } from \"./urn\";\nimport { SCHEMES } from \"../uri\";\n\nexport interface UUIDComponents extends URNComponents {\n\tuuid?: string;\n}\n\nconst UUID = /^[0-9A-Fa-f]{8}(?:\\-[0-9A-Fa-f]{4}){3}\\-[0-9A-Fa-f]{12}$/;\nconst UUID_PARSE = /^[0-9A-Fa-f\\-]{36}/;\n\n//RFC 4122\nconst handler:URISchemeHandler = {\n\tscheme : \"urn:uuid\",\n\n\tparse : function (urnComponents:URNComponents, options:URIOptions):UUIDComponents {\n\t\tconst uuidComponents = urnComponents as UUIDComponents;\n\t\tuuidComponents.uuid = uuidComponents.nss;\n\t\tuuidComponents.nss = undefined;\n\n\t\tif (!options.tolerant && (!uuidComponents.uuid || !uuidComponents.uuid.match(UUID))) {\n\t\t\tuuidComponents.error = uuidComponents.error || \"UUID is not valid.\";\n\t\t}\n\n\t\treturn uuidComponents;\n\t},\n\n\tserialize : function (uuidComponents:UUIDComponents, options:URIOptions):URNComponents {\n\t\tconst urnComponents = uuidComponents as URNComponents;\n\t\t//normalize UUID\n\t\turnComponents.nss = (uuidComponents.uuid || \"\").toLowerCase();\n\t\treturn urnComponents;\n\t},\n};\n\nexport default handler;","import { SCHEMES } from \"./uri\";\n\nimport http from \"./schemes/http\";\nSCHEMES[http.scheme] = http;\n\nimport https from \"./schemes/https\";\nSCHEMES[https.scheme] = https;\n\nimport ws from \"./schemes/ws\";\nSCHEMES[ws.scheme] = ws;\n\nimport wss from \"./schemes/wss\";\nSCHEMES[wss.scheme] = wss;\n\nimport mailto from \"./schemes/mailto\";\nSCHEMES[mailto.scheme] = mailto;\n\nimport urn from \"./schemes/urn\";\nSCHEMES[urn.scheme] = urn;\n\nimport uuid from \"./schemes/urn-uuid\";\nSCHEMES[uuid.scheme] = uuid;\n\nexport * from \"./uri\";\n"]} \ No newline at end of file diff --git a/node_modules/uri-js/dist/esnext/index.d.ts b/node_modules/uri-js/dist/esnext/index.d.ts old mode 100644 new mode 100755 diff --git a/node_modules/uri-js/dist/esnext/index.js b/node_modules/uri-js/dist/esnext/index.js old mode 100644 new mode 100755 index 73dc8dbc9..e3531b5b6 --- a/node_modules/uri-js/dist/esnext/index.js +++ b/node_modules/uri-js/dist/esnext/index.js @@ -3,6 +3,10 @@ import http from "./schemes/http"; SCHEMES[http.scheme] = http; import https from "./schemes/https"; SCHEMES[https.scheme] = https; +import ws from "./schemes/ws"; +SCHEMES[ws.scheme] = ws; +import wss from "./schemes/wss"; +SCHEMES[wss.scheme] = wss; import mailto from "./schemes/mailto"; SCHEMES[mailto.scheme] = mailto; import urn from "./schemes/urn"; diff --git a/node_modules/uri-js/dist/esnext/index.js.map b/node_modules/uri-js/dist/esnext/index.js.map old mode 100644 new mode 100755 index e9e400876..0971f6ebc --- a/node_modules/uri-js/dist/esnext/index.js.map +++ b/node_modules/uri-js/dist/esnext/index.js.map @@ -1 +1 @@ -{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AAEhC,OAAO,IAAI,MAAM,gBAAgB,CAAC;AAClC,OAAO,CAAC,IAAI,CAAC,MAAM,CAAC,GAAG,IAAI,CAAC;AAE5B,OAAO,KAAK,MAAM,iBAAiB,CAAC;AACpC,OAAO,CAAC,KAAK,CAAC,MAAM,CAAC,GAAG,KAAK,CAAC;AAE9B,OAAO,MAAM,MAAM,kBAAkB,CAAC;AACtC,OAAO,CAAC,MAAM,CAAC,MAAM,CAAC,GAAG,MAAM,CAAC;AAEhC,OAAO,GAAG,MAAM,eAAe,CAAC;AAChC,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,GAAG,GAAG,CAAC;AAE1B,OAAO,IAAI,MAAM,oBAAoB,CAAC;AACtC,OAAO,CAAC,IAAI,CAAC,MAAM,CAAC,GAAG,IAAI,CAAC;AAE5B,cAAc,OAAO,CAAC"} \ No newline at end of file +{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AAEhC,OAAO,IAAI,MAAM,gBAAgB,CAAC;AAClC,OAAO,CAAC,IAAI,CAAC,MAAM,CAAC,GAAG,IAAI,CAAC;AAE5B,OAAO,KAAK,MAAM,iBAAiB,CAAC;AACpC,OAAO,CAAC,KAAK,CAAC,MAAM,CAAC,GAAG,KAAK,CAAC;AAE9B,OAAO,EAAE,MAAM,cAAc,CAAC;AAC9B,OAAO,CAAC,EAAE,CAAC,MAAM,CAAC,GAAG,EAAE,CAAC;AAExB,OAAO,GAAG,MAAM,eAAe,CAAC;AAChC,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,GAAG,GAAG,CAAC;AAE1B,OAAO,MAAM,MAAM,kBAAkB,CAAC;AACtC,OAAO,CAAC,MAAM,CAAC,MAAM,CAAC,GAAG,MAAM,CAAC;AAEhC,OAAO,GAAG,MAAM,eAAe,CAAC;AAChC,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,GAAG,GAAG,CAAC;AAE1B,OAAO,IAAI,MAAM,oBAAoB,CAAC;AACtC,OAAO,CAAC,IAAI,CAAC,MAAM,CAAC,GAAG,IAAI,CAAC;AAE5B,cAAc,OAAO,CAAC"} \ No newline at end of file diff --git a/node_modules/uri-js/dist/esnext/regexps-iri.d.ts b/node_modules/uri-js/dist/esnext/regexps-iri.d.ts old mode 100644 new mode 100755 diff --git a/node_modules/uri-js/dist/esnext/regexps-iri.js b/node_modules/uri-js/dist/esnext/regexps-iri.js old mode 100644 new mode 100755 diff --git a/node_modules/uri-js/dist/esnext/regexps-iri.js.map b/node_modules/uri-js/dist/esnext/regexps-iri.js.map old mode 100644 new mode 100755 diff --git a/node_modules/uri-js/dist/esnext/regexps-uri.d.ts b/node_modules/uri-js/dist/esnext/regexps-uri.d.ts old mode 100644 new mode 100755 diff --git a/node_modules/uri-js/dist/esnext/regexps-uri.js b/node_modules/uri-js/dist/esnext/regexps-uri.js old mode 100644 new mode 100755 diff --git a/node_modules/uri-js/dist/esnext/regexps-uri.js.map b/node_modules/uri-js/dist/esnext/regexps-uri.js.map old mode 100644 new mode 100755 diff --git a/node_modules/uri-js/dist/esnext/schemes/http.d.ts b/node_modules/uri-js/dist/esnext/schemes/http.d.ts old mode 100644 new mode 100755 diff --git a/node_modules/uri-js/dist/esnext/schemes/http.js b/node_modules/uri-js/dist/esnext/schemes/http.js old mode 100644 new mode 100755 index 092e16dbe..6abf0fe6e --- a/node_modules/uri-js/dist/esnext/schemes/http.js +++ b/node_modules/uri-js/dist/esnext/schemes/http.js @@ -9,8 +9,9 @@ const handler = { return components; }, serialize: function (components, options) { + const secure = String(components.scheme).toLowerCase() === "https"; //normalize the default port - if (components.port === (String(components.scheme).toLowerCase() !== "https" ? 80 : 443) || components.port === "") { + if (components.port === (secure ? 443 : 80) || components.port === "") { components.port = undefined; } //normalize the empty path diff --git a/node_modules/uri-js/dist/esnext/schemes/http.js.map b/node_modules/uri-js/dist/esnext/schemes/http.js.map old mode 100644 new mode 100755 index 83e2ad54e..82118970c --- a/node_modules/uri-js/dist/esnext/schemes/http.js.map +++ b/node_modules/uri-js/dist/esnext/schemes/http.js.map @@ -1 +1 @@ -{"version":3,"file":"http.js","sourceRoot":"","sources":["../../../src/schemes/http.ts"],"names":[],"mappings":"AAEA,MAAM,OAAO,GAAoB;IAChC,MAAM,EAAG,MAAM;IAEf,UAAU,EAAG,IAAI;IAEjB,KAAK,EAAG,UAAU,UAAwB,EAAE,OAAkB;QAC7D,qBAAqB;QACrB,IAAI,CAAC,UAAU,CAAC,IAAI,EAAE;YACrB,UAAU,CAAC,KAAK,GAAG,UAAU,CAAC,KAAK,IAAI,6BAA6B,CAAC;SACrE;QAED,OAAO,UAAU,CAAC;IACnB,CAAC;IAED,SAAS,EAAG,UAAU,UAAwB,EAAE,OAAkB;QACjE,4BAA4B;QAC5B,IAAI,UAAU,CAAC,IAAI,KAAK,CAAC,MAAM,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC,WAAW,EAAE,KAAK,OAAO,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,GAAG,CAAC,IAAI,UAAU,CAAC,IAAI,KAAK,EAAE,EAAE;YACnH,UAAU,CAAC,IAAI,GAAG,SAAS,CAAC;SAC5B;QAED,0BAA0B;QAC1B,IAAI,CAAC,UAAU,CAAC,IAAI,EAAE;YACrB,UAAU,CAAC,IAAI,GAAG,GAAG,CAAC;SACtB;QAED,mDAAmD;QACnD,oEAAoE;QACpE,wBAAwB;QAExB,OAAO,UAAU,CAAC;IACnB,CAAC;CACD,CAAC;AAEF,eAAe,OAAO,CAAC"} \ No newline at end of file +{"version":3,"file":"http.js","sourceRoot":"","sources":["../../../src/schemes/http.ts"],"names":[],"mappings":"AAEA,MAAM,OAAO,GAAoB;IAChC,MAAM,EAAG,MAAM;IAEf,UAAU,EAAG,IAAI;IAEjB,KAAK,EAAG,UAAU,UAAwB,EAAE,OAAkB;QAC7D,qBAAqB;QACrB,IAAI,CAAC,UAAU,CAAC,IAAI,EAAE;YACrB,UAAU,CAAC,KAAK,GAAG,UAAU,CAAC,KAAK,IAAI,6BAA6B,CAAC;SACrE;QAED,OAAO,UAAU,CAAC;IACnB,CAAC;IAED,SAAS,EAAG,UAAU,UAAwB,EAAE,OAAkB;QACjE,MAAM,MAAM,GAAG,MAAM,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC,WAAW,EAAE,KAAK,OAAO,CAAC;QAEnE,4BAA4B;QAC5B,IAAI,UAAU,CAAC,IAAI,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,IAAI,UAAU,CAAC,IAAI,KAAK,EAAE,EAAE;YACtE,UAAU,CAAC,IAAI,GAAG,SAAS,CAAC;SAC5B;QAED,0BAA0B;QAC1B,IAAI,CAAC,UAAU,CAAC,IAAI,EAAE;YACrB,UAAU,CAAC,IAAI,GAAG,GAAG,CAAC;SACtB;QAED,mDAAmD;QACnD,oEAAoE;QACpE,wBAAwB;QAExB,OAAO,UAAU,CAAC;IACnB,CAAC;CACD,CAAC;AAEF,eAAe,OAAO,CAAC"} \ No newline at end of file diff --git a/node_modules/uri-js/dist/esnext/schemes/https.d.ts b/node_modules/uri-js/dist/esnext/schemes/https.d.ts old mode 100644 new mode 100755 diff --git a/node_modules/uri-js/dist/esnext/schemes/https.js b/node_modules/uri-js/dist/esnext/schemes/https.js old mode 100644 new mode 100755 diff --git a/node_modules/uri-js/dist/esnext/schemes/https.js.map b/node_modules/uri-js/dist/esnext/schemes/https.js.map old mode 100644 new mode 100755 diff --git a/node_modules/uri-js/dist/esnext/schemes/mailto.d.ts b/node_modules/uri-js/dist/esnext/schemes/mailto.d.ts old mode 100644 new mode 100755 diff --git a/node_modules/uri-js/dist/esnext/schemes/mailto.js b/node_modules/uri-js/dist/esnext/schemes/mailto.js old mode 100644 new mode 100755 diff --git a/node_modules/uri-js/dist/esnext/schemes/mailto.js.map b/node_modules/uri-js/dist/esnext/schemes/mailto.js.map old mode 100644 new mode 100755 diff --git a/node_modules/uri-js/dist/esnext/schemes/urn-uuid.d.ts b/node_modules/uri-js/dist/esnext/schemes/urn-uuid.d.ts old mode 100644 new mode 100755 diff --git a/node_modules/uri-js/dist/esnext/schemes/urn-uuid.js b/node_modules/uri-js/dist/esnext/schemes/urn-uuid.js old mode 100644 new mode 100755 diff --git a/node_modules/uri-js/dist/esnext/schemes/urn-uuid.js.map b/node_modules/uri-js/dist/esnext/schemes/urn-uuid.js.map old mode 100644 new mode 100755 diff --git a/node_modules/uri-js/dist/esnext/schemes/urn.d.ts b/node_modules/uri-js/dist/esnext/schemes/urn.d.ts old mode 100644 new mode 100755 diff --git a/node_modules/uri-js/dist/esnext/schemes/urn.js b/node_modules/uri-js/dist/esnext/schemes/urn.js old mode 100644 new mode 100755 diff --git a/node_modules/uri-js/dist/esnext/schemes/urn.js.map b/node_modules/uri-js/dist/esnext/schemes/urn.js.map old mode 100644 new mode 100755 diff --git a/node_modules/uri-js/dist/esnext/uri.d.ts b/node_modules/uri-js/dist/esnext/uri.d.ts old mode 100644 new mode 100755 diff --git a/node_modules/uri-js/dist/esnext/uri.js b/node_modules/uri-js/dist/esnext/uri.js old mode 100644 new mode 100755 index 2fb6d713e..659ce2651 --- a/node_modules/uri-js/dist/esnext/uri.js +++ b/node_modules/uri-js/dist/esnext/uri.js @@ -270,9 +270,9 @@ function _recomposeAuthority(components, options) { //normalize IP hosts, add brackets and escape zone separator for IPv6 uriTokens.push(_normalizeIPv6(_normalizeIPv4(String(components.host), protocol), protocol).replace(protocol.IPV6ADDRESS, (_, $1, $2) => "[" + $1 + ($2 ? "%25" + $2 : "") + "]")); } - if (typeof components.port === "number") { + if (typeof components.port === "number" || typeof components.port === "string") { uriTokens.push(":"); - uriTokens.push(components.port.toString(10)); + uriTokens.push(String(components.port)); } return uriTokens.length ? uriTokens.join("") : undefined; } diff --git a/node_modules/uri-js/dist/esnext/uri.js.map b/node_modules/uri-js/dist/esnext/uri.js.map old mode 100644 new mode 100755 index e1d831cb2..2e72ab18d --- a/node_modules/uri-js/dist/esnext/uri.js.map +++ b/node_modules/uri-js/dist/esnext/uri.js.map @@ -1 +1 @@ -{"version":3,"file":"uri.js","sourceRoot":"","sources":["../../src/uri.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AAEH,OAAO,YAAY,MAAM,eAAe,CAAC;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CAAC,CAAC,CAAC,YAAY,CAAC,WAAW,CAAC,EAAE,WAAW,CAAC,CAAC;AACrI,CAAC;AAAA,CAAC"} \ No newline at end of file diff --git a/node_modules/uri-js/dist/esnext/util.d.ts b/node_modules/uri-js/dist/esnext/util.d.ts old mode 100644 new mode 100755 diff --git a/node_modules/uri-js/dist/esnext/util.js b/node_modules/uri-js/dist/esnext/util.js old mode 100644 new mode 100755 diff --git a/node_modules/uri-js/dist/esnext/util.js.map b/node_modules/uri-js/dist/esnext/util.js.map old mode 100644 new mode 100755 diff --git a/node_modules/uri-js/package.json b/node_modules/uri-js/package.json old mode 100644 new mode 100755 index c2e74a683..3348d5512 --- a/node_modules/uri-js/package.json +++ b/node_modules/uri-js/package.json @@ -1,33 +1,27 @@ { - "_args": [ - [ - "uri-js@4.2.2", - "/Users/drew.heavner/Documents/Github/sign-android-release" - ] - ], - "_development": true, - "_from": "uri-js@4.2.2", - "_id": "uri-js@4.2.2", + "_from": "uri-js@^4.2.2", + "_id": "uri-js@4.4.0", "_inBundle": false, - "_integrity": "sha512-KY9Frmirql91X2Qgjry0Wd4Y+YTdrdZheS8TFwvkbLWf/G5KNJDCh6pKL5OZctEW4+0Baa5idK2ZQuELRwPznQ==", + "_integrity": "sha512-B0yRTzYdUCCn9n+F4+Gh4yIDtMQcaJsmYBDsTSG8g/OejKBodLQ2IHfN3bM7jUsRXndopT7OIXWdYqc1fjmV6g==", "_location": "/uri-js", "_phantomChildren": {}, "_requested": { - "type": "version", + "type": "range", "registry": true, - "raw": "uri-js@4.2.2", + "raw": "uri-js@^4.2.2", "name": "uri-js", "escapedName": "uri-js", - "rawSpec": "4.2.2", + "rawSpec": "^4.2.2", "saveSpec": null, - "fetchSpec": "4.2.2" + "fetchSpec": "^4.2.2" }, "_requiredBy": [ "/ajv" ], - "_resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.2.2.tgz", - "_spec": "4.2.2", - "_where": "/Users/drew.heavner/Documents/Github/sign-android-release", + "_resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.0.tgz", + "_shasum": "aa714261de793e8a82347a7bcc9ce74e86f28602", + "_spec": "uri-js@^4.2.2", + "_where": "/Users/drew.heavner/Documents/Github/sign-android-release/node_modules/ajv", "author": { "name": "Gary Court", "email": "gary.court@gmail.com" @@ -35,9 +29,11 @@ "bugs": { "url": "https://github.com/garycourt/uri-js/issues" }, + "bundleDependencies": false, "dependencies": { "punycode": "^2.1.0" }, + "deprecated": false, "description": "An RFC 3986/3987 compliant, scheme extendable URI/IRI parsing/validating/resolving library for JavaScript.", "devDependencies": { "babel-cli": "^6.26.0", @@ -55,6 +51,14 @@ "directories": { "test": "tests" }, + "files": [ + "dist", + "package.json", + "yarn.lock", + "README.md", + "CHANGELOG", + "LICENSE" + ], "homepage": "https://github.com/garycourt/uri-js", "keywords": [ "URI", @@ -64,6 +68,8 @@ "UUID", "HTTP", "HTTPS", + "WS", + "WSS", "MAILTO", "RFC3986", "RFC3987", @@ -75,6 +81,7 @@ "RFC4291", "RFC5952", "RFC6068", + "RFC6455", "RFC6874" ], "license": "BSD-2-Clause", @@ -88,10 +95,11 @@ "build": "npm run build:esnext && npm run build:es5 && npm run build:es5:min", "build:es5": "rollup -c && cp dist/esnext/uri.d.ts dist/es5/uri.all.d.ts && npm run build:es5:fix-sourcemap", "build:es5:fix-sourcemap": "sorcery -i dist/es5/uri.all.js", - "build:es5:min": "uglifyjs dist/es5/uri.all.js --support-ie8 --output dist/es5/uri.all.min.js --in-source-map dist/es5/uri.all.js.map --source-map uri.all.min.js.map --comments --compress --mangle --pure-funcs merge subexp && mv uri.all.min.js.map dist/es5/ && cp dist/es5/uri.all.d.ts dist/es5/uri.all.min.d.ts", + "build:es5:min": "uglifyjs dist/es5/uri.all.js --support-ie8 --output dist/es5/uri.all.min.js --in-source-map dist/es5/uri.all.js.map --source-map uri.all.min.js.map --comments --compress --mangle --pure-funcs merge subexp && mv uri.all.min.js.map dist/es5/ && cp dist/es5/uri.all.d.ts dist/es5/uri.all.min.d.ts", "build:esnext": "tsc", + "clean": "rm -rf dist", "test": "mocha -u mocha-qunit-ui dist/es5/uri.all.js tests/tests.js" }, "types": "dist/es5/uri.all.d.ts", - "version": "4.2.2" + "version": "4.4.0" } diff --git a/node_modules/uri-js/rollup.config.js b/node_modules/uri-js/rollup.config.js deleted file mode 100644 index 5bb8b0541..000000000 --- a/node_modules/uri-js/rollup.config.js +++ /dev/null @@ -1,32 +0,0 @@ -import resolve from 'rollup-plugin-node-resolve'; -import babel from 'rollup-plugin-babel'; -const packageJson = require('./package.json'); - -export default { - entry : "dist/esnext/index.js", - format : "umd", - moduleName : "URI", - plugins: [ - resolve({ - module: true, - jsnext: true, - preferBuiltins: false - }), - - babel({ - "presets": [ - ["latest", { - "es2015": { - "modules": false - } - }] - ], - "plugins": ["external-helpers"], - "externalHelpers": false - } -) - ], - dest : "dist/es5/uri.all.js", - sourceMap: true, - banner: "/** @license URI.js v" + packageJson.version + " (c) 2011 Gary Court. License: http://github.com/garycourt/uri-js */" -} diff --git a/node_modules/uri-js/src/index.ts b/node_modules/uri-js/src/index.ts deleted file mode 100644 index 6532a1bcb..000000000 --- a/node_modules/uri-js/src/index.ts +++ /dev/null @@ -1,18 +0,0 @@ -import { SCHEMES } from "./uri"; - -import http from "./schemes/http"; -SCHEMES[http.scheme] = http; - -import https from "./schemes/https"; -SCHEMES[https.scheme] = https; - -import mailto from "./schemes/mailto"; -SCHEMES[mailto.scheme] = mailto; - -import urn from "./schemes/urn"; -SCHEMES[urn.scheme] = urn; - -import uuid from "./schemes/urn-uuid"; -SCHEMES[uuid.scheme] = uuid; - -export * from "./uri"; diff --git a/node_modules/uri-js/src/punycode.d.ts b/node_modules/uri-js/src/punycode.d.ts deleted file mode 100644 index 4ecbd3484..000000000 --- a/node_modules/uri-js/src/punycode.d.ts +++ /dev/null @@ -1,24 +0,0 @@ -declare module 'punycode' { - function ucs2decode(string:string):Array; - function ucs2encode(array:Array):string; - function decode(string:string):string; - function encode(string:string):string; - function toASCII(string:string):string; - function toUnicode(string:string):string; - - interface Punycode { - 'version': '2.2.0'; - 'ucs2': { - 'decode': typeof ucs2decode; - 'encode': typeof ucs2encode; - }, - 'decode': typeof decode; - 'encode': typeof encode; - 'toASCII': typeof toASCII; - 'toUnicode': typeof toUnicode; - } - - const punycode:Punycode; - - export default punycode; -} diff --git a/node_modules/uri-js/src/regexps-iri.ts b/node_modules/uri-js/src/regexps-iri.ts deleted file mode 100644 index 8bd605b43..000000000 --- a/node_modules/uri-js/src/regexps-iri.ts +++ /dev/null @@ -1,4 +0,0 @@ -import { URIRegExps } from "./uri"; -import { buildExps } from "./regexps-uri"; - -export default buildExps(true); diff --git a/node_modules/uri-js/src/regexps-uri.ts b/node_modules/uri-js/src/regexps-uri.ts deleted file mode 100644 index 8d6b54791..000000000 --- a/node_modules/uri-js/src/regexps-uri.ts +++ /dev/null @@ -1,89 +0,0 @@ -import { URIRegExps } from "./uri"; -import { merge, subexp } from "./util"; - -export function buildExps(isIRI:boolean):URIRegExps { - const - ALPHA$$ = "[A-Za-z]", - CR$ = "[\\x0D]", - DIGIT$$ = "[0-9]", - DQUOTE$$ = "[\\x22]", - HEXDIG$$ = merge(DIGIT$$, "[A-Fa-f]"), //case-insensitive - LF$$ = "[\\x0A]", - SP$$ = "[\\x20]", - PCT_ENCODED$ = subexp(subexp("%[EFef]" + HEXDIG$$ + "%" + HEXDIG$$ + HEXDIG$$ + "%" + HEXDIG$$ + HEXDIG$$) + "|" + subexp("%[89A-Fa-f]" + HEXDIG$$ + "%" + HEXDIG$$ + HEXDIG$$) + "|" + subexp("%" + HEXDIG$$ + HEXDIG$$)), //expanded - GEN_DELIMS$$ = "[\\:\\/\\?\\#\\[\\]\\@]", - SUB_DELIMS$$ = "[\\!\\$\\&\\'\\(\\)\\*\\+\\,\\;\\=]", - RESERVED$$ = merge(GEN_DELIMS$$, SUB_DELIMS$$), - UCSCHAR$$ = isIRI ? "[\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]" : "[]", //subset, excludes bidi control characters - IPRIVATE$$ = isIRI ? "[\\uE000-\\uF8FF]" : "[]", //subset - UNRESERVED$$ = merge(ALPHA$$, DIGIT$$, "[\\-\\.\\_\\~]", UCSCHAR$$), - SCHEME$ = subexp(ALPHA$$ + merge(ALPHA$$, DIGIT$$, "[\\+\\-\\.]") + "*"), - USERINFO$ = subexp(subexp(PCT_ENCODED$ + "|" + merge(UNRESERVED$$, SUB_DELIMS$$, "[\\:]")) + "*"), - DEC_OCTET$ = subexp(subexp("25[0-5]") + "|" + subexp("2[0-4]" + DIGIT$$) + "|" + subexp("1" + DIGIT$$ + DIGIT$$) + "|" + subexp("[1-9]" + DIGIT$$) + "|" + DIGIT$$), - DEC_OCTET_RELAXED$ = subexp(subexp("25[0-5]") + "|" + subexp("2[0-4]" + DIGIT$$) + "|" + subexp("1" + DIGIT$$ + DIGIT$$) + "|" + subexp("0?[1-9]" + DIGIT$$) + "|0?0?" + DIGIT$$), //relaxed parsing rules - IPV4ADDRESS$ = subexp(DEC_OCTET_RELAXED$ + "\\." + DEC_OCTET_RELAXED$ + "\\." + DEC_OCTET_RELAXED$ + "\\." + DEC_OCTET_RELAXED$), - H16$ = subexp(HEXDIG$$ + "{1,4}"), - LS32$ = subexp(subexp(H16$ + "\\:" + H16$) + "|" + IPV4ADDRESS$), - IPV6ADDRESS1$ = subexp( subexp(H16$ + "\\:") + "{6}" + LS32$), // 6( h16 ":" ) ls32 - IPV6ADDRESS2$ = subexp( "\\:\\:" + subexp(H16$ + "\\:") + "{5}" + LS32$), // "::" 5( h16 ":" ) ls32 - IPV6ADDRESS3$ = subexp(subexp( H16$) + "?\\:\\:" + subexp(H16$ + "\\:") + "{4}" + LS32$), //[ h16 ] "::" 4( h16 ":" ) ls32 - IPV6ADDRESS4$ = subexp(subexp(subexp(H16$ + "\\:") + "{0,1}" + H16$) + "?\\:\\:" + subexp(H16$ + "\\:") + "{3}" + LS32$), //[ *1( h16 ":" ) h16 ] "::" 3( h16 ":" ) ls32 - IPV6ADDRESS5$ = subexp(subexp(subexp(H16$ + "\\:") + "{0,2}" + H16$) + "?\\:\\:" + subexp(H16$ + "\\:") + "{2}" + LS32$), //[ *2( h16 ":" ) h16 ] "::" 2( h16 ":" ) ls32 - IPV6ADDRESS6$ = subexp(subexp(subexp(H16$ + "\\:") + "{0,3}" + H16$) + "?\\:\\:" + H16$ + "\\:" + LS32$), //[ *3( h16 ":" ) h16 ] "::" h16 ":" ls32 - IPV6ADDRESS7$ = subexp(subexp(subexp(H16$ + "\\:") + "{0,4}" + H16$) + "?\\:\\:" + LS32$), //[ *4( h16 ":" ) h16 ] "::" ls32 - IPV6ADDRESS8$ = subexp(subexp(subexp(H16$ + "\\:") + "{0,5}" + H16$) + "?\\:\\:" + H16$ ), //[ *5( h16 ":" ) h16 ] "::" h16 - IPV6ADDRESS9$ = subexp(subexp(subexp(H16$ + "\\:") + "{0,6}" + H16$) + "?\\:\\:" ), //[ *6( h16 ":" ) h16 ] "::" - IPV6ADDRESS$ = subexp([IPV6ADDRESS1$, IPV6ADDRESS2$, IPV6ADDRESS3$, IPV6ADDRESS4$, IPV6ADDRESS5$, IPV6ADDRESS6$, IPV6ADDRESS7$, IPV6ADDRESS8$, IPV6ADDRESS9$].join("|")), - ZONEID$ = subexp(subexp(UNRESERVED$$ + "|" + PCT_ENCODED$) + "+"), //RFC 6874 - IPV6ADDRZ$ = subexp(IPV6ADDRESS$ + "\\%25" + ZONEID$), //RFC 6874 - IPV6ADDRZ_RELAXED$ = subexp(IPV6ADDRESS$ + subexp("\\%25|\\%(?!" + HEXDIG$$ + "{2})") + ZONEID$), //RFC 6874, with relaxed parsing rules - IPVFUTURE$ = subexp("[vV]" + HEXDIG$$ + "+\\." + merge(UNRESERVED$$, SUB_DELIMS$$, "[\\:]") + "+"), - IP_LITERAL$ = subexp("\\[" + subexp(IPV6ADDRZ_RELAXED$ + "|" + IPV6ADDRESS$ + "|" + IPVFUTURE$) + "\\]"), //RFC 6874 - REG_NAME$ = subexp(subexp(PCT_ENCODED$ + "|" + merge(UNRESERVED$$, SUB_DELIMS$$)) + "*"), - HOST$ = subexp(IP_LITERAL$ + "|" + IPV4ADDRESS$ + "(?!" + REG_NAME$ + ")" + "|" + REG_NAME$), - PORT$ = subexp(DIGIT$$ + "*"), - AUTHORITY$ = subexp(subexp(USERINFO$ + "@") + "?" + HOST$ + subexp("\\:" + PORT$) + "?"), - PCHAR$ = subexp(PCT_ENCODED$ + "|" + merge(UNRESERVED$$, SUB_DELIMS$$, "[\\:\\@]")), - SEGMENT$ = subexp(PCHAR$ + "*"), - SEGMENT_NZ$ = subexp(PCHAR$ + "+"), - SEGMENT_NZ_NC$ = subexp(subexp(PCT_ENCODED$ + "|" + merge(UNRESERVED$$, SUB_DELIMS$$, "[\\@]")) + "+"), - PATH_ABEMPTY$ = subexp(subexp("\\/" + SEGMENT$) + "*"), - PATH_ABSOLUTE$ = subexp("\\/" + subexp(SEGMENT_NZ$ + PATH_ABEMPTY$) + "?"), //simplified - PATH_NOSCHEME$ = subexp(SEGMENT_NZ_NC$ + PATH_ABEMPTY$), //simplified - PATH_ROOTLESS$ = subexp(SEGMENT_NZ$ + PATH_ABEMPTY$), //simplified - PATH_EMPTY$ = "(?!" + PCHAR$ + ")", - PATH$ = subexp(PATH_ABEMPTY$ + "|" + PATH_ABSOLUTE$ + "|" + PATH_NOSCHEME$ + "|" + PATH_ROOTLESS$ + "|" + PATH_EMPTY$), - QUERY$ = subexp(subexp(PCHAR$ + "|" + merge("[\\/\\?]", IPRIVATE$$)) + "*"), - FRAGMENT$ = subexp(subexp(PCHAR$ + "|[\\/\\?]") + "*"), - HIER_PART$ = subexp(subexp("\\/\\/" + AUTHORITY$ + PATH_ABEMPTY$) + "|" + PATH_ABSOLUTE$ + "|" + PATH_ROOTLESS$ + "|" + PATH_EMPTY$), - URI$ = subexp(SCHEME$ + "\\:" + HIER_PART$ + subexp("\\?" + QUERY$) + "?" + subexp("\\#" + FRAGMENT$) + "?"), - RELATIVE_PART$ = subexp(subexp("\\/\\/" + AUTHORITY$ + PATH_ABEMPTY$) + "|" + PATH_ABSOLUTE$ + "|" + PATH_NOSCHEME$ + "|" + PATH_EMPTY$), - RELATIVE$ = subexp(RELATIVE_PART$ + subexp("\\?" + QUERY$) + "?" + subexp("\\#" + FRAGMENT$) + "?"), - URI_REFERENCE$ = subexp(URI$ + "|" + RELATIVE$), - ABSOLUTE_URI$ = subexp(SCHEME$ + "\\:" + HIER_PART$ + subexp("\\?" + QUERY$) + "?"), - - GENERIC_REF$ = "^(" + SCHEME$ + ")\\:" + subexp(subexp("\\/\\/(" + subexp("(" + USERINFO$ + ")@") + "?(" + HOST$ + ")" + subexp("\\:(" + PORT$ + ")") + "?)") + "?(" + PATH_ABEMPTY$ + "|" + PATH_ABSOLUTE$ + "|" + PATH_ROOTLESS$ + "|" + PATH_EMPTY$ + ")") + subexp("\\?(" + QUERY$ + ")") + "?" + subexp("\\#(" + FRAGMENT$ + ")") + "?$", - RELATIVE_REF$ = "^(){0}" + subexp(subexp("\\/\\/(" + subexp("(" + USERINFO$ + ")@") + "?(" + HOST$ + ")" + subexp("\\:(" + PORT$ + ")") + "?)") + "?(" + PATH_ABEMPTY$ + "|" + PATH_ABSOLUTE$ + "|" + PATH_NOSCHEME$ + "|" + PATH_EMPTY$ + ")") + subexp("\\?(" + QUERY$ + ")") + "?" + subexp("\\#(" + FRAGMENT$ + ")") + "?$", - ABSOLUTE_REF$ = "^(" + SCHEME$ + ")\\:" + subexp(subexp("\\/\\/(" + subexp("(" + USERINFO$ + ")@") + "?(" + HOST$ + ")" + subexp("\\:(" + PORT$ + ")") + "?)") + "?(" + PATH_ABEMPTY$ + "|" + PATH_ABSOLUTE$ + "|" + PATH_ROOTLESS$ + "|" + PATH_EMPTY$ + ")") + subexp("\\?(" + QUERY$ + ")") + "?$", - SAMEDOC_REF$ = "^" + subexp("\\#(" + FRAGMENT$ + ")") + "?$", - AUTHORITY_REF$ = "^" + subexp("(" + USERINFO$ + ")@") + "?(" + HOST$ + ")" + subexp("\\:(" + PORT$ + ")") + "?$" - ; - - return { - NOT_SCHEME : new RegExp(merge("[^]", ALPHA$$, DIGIT$$, "[\\+\\-\\.]"), "g"), - NOT_USERINFO : new RegExp(merge("[^\\%\\:]", UNRESERVED$$, SUB_DELIMS$$), "g"), - NOT_HOST : new RegExp(merge("[^\\%\\[\\]\\:]", UNRESERVED$$, SUB_DELIMS$$), "g"), - NOT_PATH : new RegExp(merge("[^\\%\\/\\:\\@]", UNRESERVED$$, SUB_DELIMS$$), "g"), - NOT_PATH_NOSCHEME : new RegExp(merge("[^\\%\\/\\@]", UNRESERVED$$, SUB_DELIMS$$), "g"), - NOT_QUERY : new RegExp(merge("[^\\%]", UNRESERVED$$, SUB_DELIMS$$, "[\\:\\@\\/\\?]", IPRIVATE$$), "g"), - NOT_FRAGMENT : new RegExp(merge("[^\\%]", UNRESERVED$$, SUB_DELIMS$$, "[\\:\\@\\/\\?]"), "g"), - ESCAPE : new RegExp(merge("[^]", UNRESERVED$$, SUB_DELIMS$$), "g"), - UNRESERVED : new RegExp(UNRESERVED$$, "g"), - OTHER_CHARS : new RegExp(merge("[^\\%]", UNRESERVED$$, RESERVED$$), "g"), - PCT_ENCODED : new RegExp(PCT_ENCODED$, "g"), - IPV4ADDRESS : new RegExp("^(" + IPV4ADDRESS$ + ")$"), - IPV6ADDRESS : new RegExp("^\\[?(" + IPV6ADDRESS$ + ")" + subexp(subexp("\\%25|\\%(?!" + HEXDIG$$ + "{2})") + "(" + ZONEID$ + ")") + "?\\]?$") //RFC 6874, with relaxed parsing rules - }; -} - -export default buildExps(false); diff --git a/node_modules/uri-js/src/schemes/http.ts b/node_modules/uri-js/src/schemes/http.ts deleted file mode 100644 index 3e53145cc..000000000 --- a/node_modules/uri-js/src/schemes/http.ts +++ /dev/null @@ -1,36 +0,0 @@ -import { URISchemeHandler, URIComponents, URIOptions } from "../uri"; - -const handler:URISchemeHandler = { - scheme : "http", - - domainHost : true, - - parse : function (components:URIComponents, options:URIOptions):URIComponents { - //report missing host - if (!components.host) { - components.error = components.error || "HTTP URIs must have a host."; - } - - return components; - }, - - serialize : function (components:URIComponents, options:URIOptions):URIComponents { - //normalize the default port - if (components.port === (String(components.scheme).toLowerCase() !== "https" ? 80 : 443) || components.port === "") { - components.port = undefined; - } - - //normalize the empty path - if (!components.path) { - components.path = "/"; - } - - //NOTE: We do not parse query strings for HTTP URIs - //as WWW Form Url Encoded query strings are part of the HTML4+ spec, - //and not the HTTP spec. - - return components; - } -}; - -export default handler; \ No newline at end of file diff --git a/node_modules/uri-js/src/schemes/https.ts b/node_modules/uri-js/src/schemes/https.ts deleted file mode 100644 index a19a49428..000000000 --- a/node_modules/uri-js/src/schemes/https.ts +++ /dev/null @@ -1,11 +0,0 @@ -import { URISchemeHandler, URIComponents, URIOptions } from "../uri"; -import http from "./http"; - -const handler:URISchemeHandler = { - scheme : "https", - domainHost : http.domainHost, - parse : http.parse, - serialize : http.serialize -} - -export default handler; \ No newline at end of file diff --git a/node_modules/uri-js/src/schemes/mailto.ts b/node_modules/uri-js/src/schemes/mailto.ts deleted file mode 100644 index 3faf320d6..000000000 --- a/node_modules/uri-js/src/schemes/mailto.ts +++ /dev/null @@ -1,182 +0,0 @@ -import { URISchemeHandler, URIComponents, URIOptions } from "../uri"; -import { pctEncChar, pctDecChars, unescapeComponent } from "../uri"; -import punycode from "punycode"; -import { merge, subexp, toUpperCase, toArray } from "../util"; - -export interface MailtoHeaders { - [hfname:string]:string -} - -export interface MailtoComponents extends URIComponents { - to:Array, - headers?:MailtoHeaders, - subject?:string, - body?:string -} - -const O:MailtoHeaders = {}; -const isIRI = true; - -//RFC 3986 -const UNRESERVED$$ = "[A-Za-z0-9\\-\\.\\_\\~" + (isIRI ? "\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF" : "") + "]"; -const HEXDIG$$ = "[0-9A-Fa-f]"; //case-insensitive -const PCT_ENCODED$ = subexp(subexp("%[EFef]" + HEXDIG$$ + "%" + HEXDIG$$ + HEXDIG$$ + "%" + HEXDIG$$ + HEXDIG$$) + "|" + subexp("%[89A-Fa-f]" + HEXDIG$$ + "%" + HEXDIG$$ + HEXDIG$$) + "|" + subexp("%" + HEXDIG$$ + HEXDIG$$)); //expanded - -//RFC 5322, except these symbols as per RFC 6068: @ : / ? # [ ] & ; = -//const ATEXT$$ = "[A-Za-z0-9\\!\\#\\$\\%\\&\\'\\*\\+\\-\\/\\=\\?\\^\\_\\`\\{\\|\\}\\~]"; -//const WSP$$ = "[\\x20\\x09]"; -//const OBS_QTEXT$$ = "[\\x01-\\x08\\x0B\\x0C\\x0E-\\x1F\\x7F]"; //(%d1-8 / %d11-12 / %d14-31 / %d127) -//const QTEXT$$ = merge("[\\x21\\x23-\\x5B\\x5D-\\x7E]", OBS_QTEXT$$); //%d33 / %d35-91 / %d93-126 / obs-qtext -//const VCHAR$$ = "[\\x21-\\x7E]"; -//const WSP$$ = "[\\x20\\x09]"; -//const OBS_QP$ = subexp("\\\\" + merge("[\\x00\\x0D\\x0A]", OBS_QTEXT$$)); //%d0 / CR / LF / obs-qtext -//const FWS$ = subexp(subexp(WSP$$ + "*" + "\\x0D\\x0A") + "?" + WSP$$ + "+"); -//const QUOTED_PAIR$ = subexp(subexp("\\\\" + subexp(VCHAR$$ + "|" + WSP$$)) + "|" + OBS_QP$); -//const QUOTED_STRING$ = subexp('\\"' + subexp(FWS$ + "?" + QCONTENT$) + "*" + FWS$ + "?" + '\\"'); -const ATEXT$$ = "[A-Za-z0-9\\!\\$\\%\\'\\*\\+\\-\\^\\_\\`\\{\\|\\}\\~]"; -const QTEXT$$ = "[\\!\\$\\%\\'\\(\\)\\*\\+\\,\\-\\.0-9\\<\\>A-Z\\x5E-\\x7E]"; -const VCHAR$$ = merge(QTEXT$$, "[\\\"\\\\]"); -const DOT_ATOM_TEXT$ = subexp(ATEXT$$ + "+" + subexp("\\." + ATEXT$$ + "+") + "*"); -const QUOTED_PAIR$ = subexp("\\\\" + VCHAR$$); -const QCONTENT$ = subexp(QTEXT$$ + "|" + QUOTED_PAIR$); -const QUOTED_STRING$ = subexp('\\"' + QCONTENT$ + "*" + '\\"'); - -//RFC 6068 -const DTEXT_NO_OBS$$ = "[\\x21-\\x5A\\x5E-\\x7E]"; //%d33-90 / %d94-126 -const SOME_DELIMS$$ = "[\\!\\$\\'\\(\\)\\*\\+\\,\\;\\:\\@]"; -const QCHAR$ = subexp(UNRESERVED$$ + "|" + PCT_ENCODED$ + "|" + SOME_DELIMS$$); -const DOMAIN$ = subexp(DOT_ATOM_TEXT$ + "|" + "\\[" + DTEXT_NO_OBS$$ + "*" + "\\]"); -const LOCAL_PART$ = subexp(DOT_ATOM_TEXT$ + "|" + QUOTED_STRING$); -const ADDR_SPEC$ = subexp(LOCAL_PART$ + "\\@" + DOMAIN$); -const TO$ = subexp(ADDR_SPEC$ + subexp("\\," + ADDR_SPEC$) + "*"); -const HFNAME$ = subexp(QCHAR$ + "*"); -const HFVALUE$ = HFNAME$; -const HFIELD$ = subexp(HFNAME$ + "\\=" + HFVALUE$); -const HFIELDS2$ = subexp(HFIELD$ + subexp("\\&" + HFIELD$) + "*"); -const HFIELDS$ = subexp("\\?" + HFIELDS2$); -const MAILTO_URI = new RegExp("^mailto\\:" + TO$ + "?" + HFIELDS$ + "?$"); - -const UNRESERVED = new RegExp(UNRESERVED$$, "g"); -const PCT_ENCODED = new RegExp(PCT_ENCODED$, "g"); -const NOT_LOCAL_PART = new RegExp(merge("[^]", ATEXT$$, "[\\.]", '[\\"]', VCHAR$$), "g"); -const NOT_DOMAIN = new RegExp(merge("[^]", ATEXT$$, "[\\.]", "[\\[]", DTEXT_NO_OBS$$, "[\\]]"), "g"); -const NOT_HFNAME = new RegExp(merge("[^]", UNRESERVED$$, SOME_DELIMS$$), "g"); -const NOT_HFVALUE = NOT_HFNAME; -const TO = new RegExp("^" + TO$ + "$"); -const HFIELDS = new RegExp("^" + HFIELDS2$ + "$"); - -function decodeUnreserved(str:string):string { - const decStr = pctDecChars(str); - return (!decStr.match(UNRESERVED) ? str : decStr); -} - -const handler:URISchemeHandler = { - scheme : "mailto", - - parse : function (components:URIComponents, options:URIOptions):MailtoComponents { - const mailtoComponents = components as MailtoComponents; - const to = mailtoComponents.to = (mailtoComponents.path ? mailtoComponents.path.split(",") : []); - mailtoComponents.path = undefined; - - if (mailtoComponents.query) { - let unknownHeaders = false - const headers:MailtoHeaders = {}; - const hfields = mailtoComponents.query.split("&"); - - for (let x = 0, xl = hfields.length; x < xl; ++x) { - const hfield = hfields[x].split("="); - - switch (hfield[0]) { - case "to": - const toAddrs = hfield[1].split(","); - for (let x = 0, xl = toAddrs.length; x < xl; ++x) { - to.push(toAddrs[x]); - } - break; - case "subject": - mailtoComponents.subject = unescapeComponent(hfield[1], options); - break; - case "body": - mailtoComponents.body = unescapeComponent(hfield[1], options); - break; - default: - unknownHeaders = true; - headers[unescapeComponent(hfield[0], options)] = unescapeComponent(hfield[1], options); - break; - } - } - - if (unknownHeaders) mailtoComponents.headers = headers; - } - - mailtoComponents.query = undefined; - - for (let x = 0, xl = to.length; x < xl; ++x) { - const addr = to[x].split("@"); - - addr[0] = unescapeComponent(addr[0]); - - if (!options.unicodeSupport) { - //convert Unicode IDN -> ASCII IDN - try { - addr[1] = punycode.toASCII(unescapeComponent(addr[1], options).toLowerCase()); - } catch (e) { - mailtoComponents.error = mailtoComponents.error || "Email address's domain name can not be converted to ASCII via punycode: " + e; - } - } else { - addr[1] = unescapeComponent(addr[1], options).toLowerCase(); - } - - to[x] = addr.join("@"); - } - - return mailtoComponents; - }, - - serialize : function (mailtoComponents:MailtoComponents, options:URIOptions):URIComponents { - const components = mailtoComponents as URIComponents; - const to = toArray(mailtoComponents.to); - if (to) { - for (let x = 0, xl = to.length; x < xl; ++x) { - const toAddr = String(to[x]); - const atIdx = toAddr.lastIndexOf("@"); - const localPart = (toAddr.slice(0, atIdx)).replace(PCT_ENCODED, decodeUnreserved).replace(PCT_ENCODED, toUpperCase).replace(NOT_LOCAL_PART, pctEncChar); - let domain = toAddr.slice(atIdx + 1); - - //convert IDN via punycode - try { - domain = (!options.iri ? punycode.toASCII(unescapeComponent(domain, options).toLowerCase()) : punycode.toUnicode(domain)); - } catch (e) { - components.error = components.error || "Email address's domain name can not be converted to " + (!options.iri ? "ASCII" : "Unicode") + " via punycode: " + e; - } - - to[x] = localPart + "@" + domain; - } - - components.path = to.join(","); - } - - const headers = mailtoComponents.headers = mailtoComponents.headers || {}; - - if (mailtoComponents.subject) headers["subject"] = mailtoComponents.subject; - if (mailtoComponents.body) headers["body"] = mailtoComponents.body; - - const fields = []; - for (const name in headers) { - if (headers[name] !== O[name]) { - fields.push( - name.replace(PCT_ENCODED, decodeUnreserved).replace(PCT_ENCODED, toUpperCase).replace(NOT_HFNAME, pctEncChar) + - "=" + - headers[name].replace(PCT_ENCODED, decodeUnreserved).replace(PCT_ENCODED, toUpperCase).replace(NOT_HFVALUE, pctEncChar) - ); - } - } - if (fields.length) { - components.query = fields.join("&"); - } - - return components; - } -} - -export default handler; \ No newline at end of file diff --git a/node_modules/uri-js/src/schemes/urn-uuid.ts b/node_modules/uri-js/src/schemes/urn-uuid.ts deleted file mode 100644 index 566532920..000000000 --- a/node_modules/uri-js/src/schemes/urn-uuid.ts +++ /dev/null @@ -1,36 +0,0 @@ -import { URISchemeHandler, URIComponents, URIOptions } from "../uri"; -import { URNComponents } from "./urn"; -import { SCHEMES } from "../uri"; - -export interface UUIDComponents extends URNComponents { - uuid?: string; -} - -const UUID = /^[0-9A-Fa-f]{8}(?:\-[0-9A-Fa-f]{4}){3}\-[0-9A-Fa-f]{12}$/; -const UUID_PARSE = /^[0-9A-Fa-f\-]{36}/; - -//RFC 4122 -const handler:URISchemeHandler = { - scheme : "urn:uuid", - - parse : function (urnComponents:URNComponents, options:URIOptions):UUIDComponents { - const uuidComponents = urnComponents as UUIDComponents; - uuidComponents.uuid = uuidComponents.nss; - uuidComponents.nss = undefined; - - if (!options.tolerant && (!uuidComponents.uuid || !uuidComponents.uuid.match(UUID))) { - uuidComponents.error = uuidComponents.error || "UUID is not valid."; - } - - return uuidComponents; - }, - - serialize : function (uuidComponents:UUIDComponents, options:URIOptions):URNComponents { - const urnComponents = uuidComponents as URNComponents; - //normalize UUID - urnComponents.nss = (uuidComponents.uuid || "").toLowerCase(); - return urnComponents; - }, -}; - -export default handler; \ No newline at end of file diff --git a/node_modules/uri-js/src/schemes/urn.ts b/node_modules/uri-js/src/schemes/urn.ts deleted file mode 100644 index 590f9cce1..000000000 --- a/node_modules/uri-js/src/schemes/urn.ts +++ /dev/null @@ -1,69 +0,0 @@ -import { URISchemeHandler, URIComponents, URIOptions } from "../uri"; -import { pctEncChar, SCHEMES } from "../uri"; - -export interface URNComponents extends URIComponents { - nid?:string; - nss?:string; -} - -export interface URNOptions extends URIOptions { - nid?:string; -} - -const NID$ = "(?:[0-9A-Za-z][0-9A-Za-z\\-]{1,31})"; -const PCT_ENCODED$ = "(?:\\%[0-9A-Fa-f]{2})"; -const TRANS$$ = "[0-9A-Za-z\\(\\)\\+\\,\\-\\.\\:\\=\\@\\;\\$\\_\\!\\*\\'\\/\\?\\#]"; -const NSS$ = "(?:(?:" + PCT_ENCODED$ + "|" + TRANS$$ + ")+)"; -const URN_SCHEME = new RegExp("^urn\\:(" + NID$ + ")$"); -const URN_PATH = new RegExp("^(" + NID$ + ")\\:(" + NSS$ + ")$"); -const URN_PARSE = /^([^\:]+)\:(.*)/; -const URN_EXCLUDED = /[\x00-\x20\\\"\&\<\>\[\]\^\`\{\|\}\~\x7F-\xFF]/g; - -//RFC 2141 -const handler:URISchemeHandler = { - scheme : "urn", - - parse : function (components:URIComponents, options:URNOptions):URNComponents { - const matches = components.path && components.path.match(URN_PARSE); - let urnComponents = components as URNComponents; - - if (matches) { - const scheme = options.scheme || urnComponents.scheme || "urn"; - const nid = matches[1].toLowerCase(); - const nss = matches[2]; - const urnScheme = `${scheme}:${options.nid || nid}`; - const schemeHandler = SCHEMES[urnScheme]; - - urnComponents.nid = nid; - urnComponents.nss = nss; - urnComponents.path = undefined; - - if (schemeHandler) { - urnComponents = schemeHandler.parse(urnComponents, options) as URNComponents; - } - } else { - urnComponents.error = urnComponents.error || "URN can not be parsed."; - } - - return urnComponents; - }, - - serialize : function (urnComponents:URNComponents, options:URNOptions):URIComponents { - const scheme = options.scheme || urnComponents.scheme || "urn"; - const nid = urnComponents.nid; - const urnScheme = `${scheme}:${options.nid || nid}`; - const schemeHandler = SCHEMES[urnScheme]; - - if (schemeHandler) { - urnComponents = schemeHandler.serialize(urnComponents, options) as URNComponents; - } - - const uriComponents = urnComponents as URIComponents; - const nss = urnComponents.nss; - uriComponents.path = `${nid || options.nid}:${nss}`; - - return uriComponents; - }, -}; - -export default handler; \ No newline at end of file diff --git a/node_modules/uri-js/src/uri.ts b/node_modules/uri-js/src/uri.ts deleted file mode 100644 index c282c3723..000000000 --- a/node_modules/uri-js/src/uri.ts +++ /dev/null @@ -1,556 +0,0 @@ -/** - * URI.js - * - * @fileoverview An RFC 3986 compliant, scheme extendable URI parsing/validating/resolving library for JavaScript. - * @author Gary Court - * @see http://github.com/garycourt/uri-js - */ - -/** - * Copyright 2011 Gary Court. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without modification, are - * permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, this list of - * conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright notice, this list - * of conditions and the following disclaimer in the documentation and/or other materials - * provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY GARY COURT ``AS IS'' AND ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND - * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL GARY COURT OR - * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON - * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF - * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - * The views and conclusions contained in the software and documentation are those of the - * authors and should not be interpreted as representing official policies, either expressed - * or implied, of Gary Court. - */ - -import URI_PROTOCOL from "./regexps-uri"; -import IRI_PROTOCOL from "./regexps-iri"; -import punycode from "punycode"; -import { toUpperCase, typeOf, assign } from "./util"; - -export interface URIComponents { - scheme?:string; - userinfo?:string; - host?:string; - port?:number|string; - path?:string; - query?:string; - fragment?:string; - reference?:string; - error?:string; -} - -export interface URIOptions { - scheme?:string; - reference?:string; - tolerant?:boolean; - absolutePath?:boolean; - iri?:boolean; - unicodeSupport?:boolean; - domainHost?:boolean; -} - -export interface URISchemeHandler { - scheme:string; - parse(components:ParentComponents, options:Options):Components; - serialize(components:Components, options:Options):ParentComponents; - unicodeSupport?:boolean; - domainHost?:boolean; - absolutePath?:boolean; -} - -export interface URIRegExps { - NOT_SCHEME : RegExp, - NOT_USERINFO : RegExp, - NOT_HOST : RegExp, - NOT_PATH : RegExp, - NOT_PATH_NOSCHEME : RegExp, - NOT_QUERY : RegExp, - NOT_FRAGMENT : RegExp, - ESCAPE : RegExp, - UNRESERVED : RegExp, - OTHER_CHARS : RegExp, - PCT_ENCODED : RegExp, - IPV4ADDRESS : RegExp, - IPV6ADDRESS : RegExp, -} - -export const SCHEMES:{[scheme:string]:URISchemeHandler} = {}; - -export function pctEncChar(chr:string):string { - const c = chr.charCodeAt(0); - let e:string; - - if (c < 16) e = "%0" + c.toString(16).toUpperCase(); - else if (c < 128) e = "%" + c.toString(16).toUpperCase(); - else if (c < 2048) e = "%" + ((c >> 6) | 192).toString(16).toUpperCase() + "%" + ((c & 63) | 128).toString(16).toUpperCase(); - else e = "%" + ((c >> 12) | 224).toString(16).toUpperCase() + "%" + (((c >> 6) & 63) | 128).toString(16).toUpperCase() + "%" + ((c & 63) | 128).toString(16).toUpperCase(); - - return e; -} - -export function pctDecChars(str:string):string { - let newStr = ""; - let i = 0; - const il = str.length; - - while (i < il) { - const c = parseInt(str.substr(i + 1, 2), 16); - - if (c < 128) { - newStr += String.fromCharCode(c); - i += 3; - } - else if (c >= 194 && c < 224) { - if ((il - i) >= 6) { - const c2 = parseInt(str.substr(i + 4, 2), 16); - newStr += String.fromCharCode(((c & 31) << 6) | (c2 & 63)); - } else { - newStr += str.substr(i, 6); - } - i += 6; - } - else if (c >= 224) { - if ((il - i) >= 9) { - const c2 = parseInt(str.substr(i + 4, 2), 16); - const c3 = parseInt(str.substr(i + 7, 2), 16); - newStr += String.fromCharCode(((c & 15) << 12) | ((c2 & 63) << 6) | (c3 & 63)); - } else { - newStr += str.substr(i, 9); - } - i += 9; - } - else { - newStr += str.substr(i, 3); - i += 3; - } - } - - return newStr; -} - -function _normalizeComponentEncoding(components:URIComponents, protocol:URIRegExps) { - function decodeUnreserved(str:string):string { - const decStr = pctDecChars(str); - return (!decStr.match(protocol.UNRESERVED) ? str : decStr); - } - - if (components.scheme) components.scheme = String(components.scheme).replace(protocol.PCT_ENCODED, decodeUnreserved).toLowerCase().replace(protocol.NOT_SCHEME, ""); - if (components.userinfo !== undefined) components.userinfo = String(components.userinfo).replace(protocol.PCT_ENCODED, decodeUnreserved).replace(protocol.NOT_USERINFO, pctEncChar).replace(protocol.PCT_ENCODED, toUpperCase); - if (components.host !== undefined) components.host = String(components.host).replace(protocol.PCT_ENCODED, decodeUnreserved).toLowerCase().replace(protocol.NOT_HOST, pctEncChar).replace(protocol.PCT_ENCODED, toUpperCase); - if (components.path !== undefined) components.path = String(components.path).replace(protocol.PCT_ENCODED, decodeUnreserved).replace((components.scheme ? protocol.NOT_PATH : protocol.NOT_PATH_NOSCHEME), pctEncChar).replace(protocol.PCT_ENCODED, toUpperCase); - if (components.query !== undefined) components.query = String(components.query).replace(protocol.PCT_ENCODED, decodeUnreserved).replace(protocol.NOT_QUERY, pctEncChar).replace(protocol.PCT_ENCODED, toUpperCase); - if (components.fragment !== undefined) components.fragment = String(components.fragment).replace(protocol.PCT_ENCODED, decodeUnreserved).replace(protocol.NOT_FRAGMENT, pctEncChar).replace(protocol.PCT_ENCODED, toUpperCase); - - return components; -}; - -function _stripLeadingZeros(str:string):string { - return str.replace(/^0*(.*)/, "$1") || "0"; -} - -function _normalizeIPv4(host:string, protocol:URIRegExps):string { - const matches = host.match(protocol.IPV4ADDRESS) || []; - const [, address] = matches; - - if (address) { - return address.split(".").map(_stripLeadingZeros).join("."); - } else { - return host; - } -} - -function _normalizeIPv6(host:string, protocol:URIRegExps):string { - const matches = host.match(protocol.IPV6ADDRESS) || []; - const [, address, zone] = matches; - - if (address) { - const [last, first] = address.toLowerCase().split('::').reverse(); - const firstFields = first ? first.split(":").map(_stripLeadingZeros) : []; - const lastFields = last.split(":").map(_stripLeadingZeros); - const isLastFieldIPv4Address = protocol.IPV4ADDRESS.test(lastFields[lastFields.length - 1]); - const fieldCount = isLastFieldIPv4Address ? 7 : 8; - const lastFieldsStart = lastFields.length - fieldCount; - const fields = Array(fieldCount); - - for (let x = 0; x < fieldCount; ++x) { - fields[x] = firstFields[x] || lastFields[lastFieldsStart + x] || ''; - } - - if (isLastFieldIPv4Address) { - fields[fieldCount - 1] = _normalizeIPv4(fields[fieldCount - 1], protocol); - } - - const allZeroFields = fields.reduce>((acc, field, index) => { - if (!field || field === "0") { - const lastLongest = acc[acc.length - 1]; - if (lastLongest && lastLongest.index + lastLongest.length === index) { - lastLongest.length++; - } else { - acc.push({ index, length : 1 }); - } - } - return acc; - }, []); - - const longestZeroFields = allZeroFields.sort((a, b) => b.length - a.length)[0]; - - let newHost:string; - if (longestZeroFields && longestZeroFields.length > 1) { - const newFirst = fields.slice(0, longestZeroFields.index) ; - const newLast = fields.slice(longestZeroFields.index + longestZeroFields.length); - newHost = newFirst.join(":") + "::" + newLast.join(":"); - } else { - newHost = fields.join(":"); - } - - if (zone) { - newHost += "%" + zone; - } - - return newHost; - } else { - return host; - } -} - -const URI_PARSE = /^(?:([^:\/?#]+):)?(?:\/\/((?:([^\/?#@]*)@)?(\[[^\/?#\]]+\]|[^\/?#:]*)(?:\:(\d*))?))?([^?#]*)(?:\?([^#]*))?(?:#((?:.|\n|\r)*))?/i; -const NO_MATCH_IS_UNDEFINED = (("").match(/(){0}/))[1] === undefined; - -export function parse(uriString:string, options:URIOptions = {}):URIComponents { - const components:URIComponents = {}; - const protocol = (options.iri !== false ? IRI_PROTOCOL : URI_PROTOCOL); - - if (options.reference === "suffix") uriString = (options.scheme ? options.scheme + ":" : "") + "//" + uriString; - - const matches = uriString.match(URI_PARSE); - - if (matches) { - if (NO_MATCH_IS_UNDEFINED) { - //store each component - components.scheme = matches[1]; - components.userinfo = matches[3]; - components.host = matches[4]; - components.port = parseInt(matches[5], 10); - components.path = matches[6] || ""; - components.query = matches[7]; - components.fragment = matches[8]; - - //fix port number - if (isNaN(components.port)) { - components.port = matches[5]; - } - } else { //IE FIX for improper RegExp matching - //store each component - components.scheme = matches[1] || undefined; - components.userinfo = (uriString.indexOf("@") !== -1 ? matches[3] : undefined); - components.host = (uriString.indexOf("//") !== -1 ? matches[4] : undefined); - components.port = parseInt(matches[5], 10); - components.path = matches[6] || ""; - components.query = (uriString.indexOf("?") !== -1 ? matches[7] : undefined); - components.fragment = (uriString.indexOf("#") !== -1 ? matches[8] : undefined); - - //fix port number - if (isNaN(components.port)) { - components.port = (uriString.match(/\/\/(?:.|\n)*\:(?:\/|\?|\#|$)/) ? matches[4] : undefined); - } - } - - if (components.host) { - //normalize IP hosts - components.host = _normalizeIPv6(_normalizeIPv4(components.host, protocol), protocol); - } - - //determine reference type - if (components.scheme === undefined && components.userinfo === undefined && components.host === undefined && components.port === undefined && !components.path && components.query === undefined) { - components.reference = "same-document"; - } else if (components.scheme === undefined) { - components.reference = "relative"; - } else if (components.fragment === undefined) { - components.reference = "absolute"; - } else { - components.reference = "uri"; - } - - //check for reference errors - if (options.reference && options.reference !== "suffix" && options.reference !== components.reference) { - components.error = components.error || "URI is not a " + options.reference + " reference."; - } - - //find scheme handler - const schemeHandler = SCHEMES[(options.scheme || components.scheme || "").toLowerCase()]; - - //check if scheme can't handle IRIs - if (!options.unicodeSupport && (!schemeHandler || !schemeHandler.unicodeSupport)) { - //if host component is a domain name - if (components.host && (options.domainHost || (schemeHandler && schemeHandler.domainHost))) { - //convert Unicode IDN -> ASCII IDN - try { - components.host = punycode.toASCII(components.host.replace(protocol.PCT_ENCODED, pctDecChars).toLowerCase()); - } catch (e) { - components.error = components.error || "Host's domain name can not be converted to ASCII via punycode: " + e; - } - } - //convert IRI -> URI - _normalizeComponentEncoding(components, URI_PROTOCOL); - } else { - //normalize encodings - _normalizeComponentEncoding(components, protocol); - } - - //perform scheme specific parsing - if (schemeHandler && schemeHandler.parse) { - schemeHandler.parse(components, options); - } - } else { - components.error = components.error || "URI can not be parsed."; - } - - return components; -}; - -function _recomposeAuthority(components:URIComponents, options:URIOptions):string|undefined { - const protocol = (options.iri !== false ? IRI_PROTOCOL : URI_PROTOCOL); - const uriTokens:Array = []; - - if (components.userinfo !== undefined) { - uriTokens.push(components.userinfo); - uriTokens.push("@"); - } - - if (components.host !== undefined) { - //normalize IP hosts, add brackets and escape zone separator for IPv6 - uriTokens.push(_normalizeIPv6(_normalizeIPv4(String(components.host), protocol), protocol).replace(protocol.IPV6ADDRESS, (_, $1, $2) => "[" + $1 + ($2 ? "%25" + $2 : "") + "]")); - } - - if (typeof components.port === "number") { - uriTokens.push(":"); - uriTokens.push(components.port.toString(10)); - } - - return uriTokens.length ? uriTokens.join("") : undefined; -}; - -const RDS1 = /^\.\.?\//; -const RDS2 = /^\/\.(\/|$)/; -const RDS3 = /^\/\.\.(\/|$)/; -const RDS4 = /^\.\.?$/; -const RDS5 = /^\/?(?:.|\n)*?(?=\/|$)/; - -export function removeDotSegments(input:string):string { - const output:Array = []; - - while (input.length) { - if (input.match(RDS1)) { - input = input.replace(RDS1, ""); - } else if (input.match(RDS2)) { - input = input.replace(RDS2, "/"); - } else if (input.match(RDS3)) { - input = input.replace(RDS3, "/"); - output.pop(); - } else if (input === "." || input === "..") { - input = ""; - } else { - const im = input.match(RDS5); - if (im) { - const s = im[0]; - input = input.slice(s.length); - output.push(s); - } else { - throw new Error("Unexpected dot segment condition"); - } - } - } - - return output.join(""); -}; - -export function serialize(components:URIComponents, options:URIOptions = {}):string { - const protocol = (options.iri ? IRI_PROTOCOL : URI_PROTOCOL); - const uriTokens:Array = []; - - //find scheme handler - const schemeHandler = SCHEMES[(options.scheme || components.scheme || "").toLowerCase()]; - - //perform scheme specific serialization - if (schemeHandler && schemeHandler.serialize) schemeHandler.serialize(components, options); - - if (components.host) { - //if host component is an IPv6 address - if (protocol.IPV6ADDRESS.test(components.host)) { - //TODO: normalize IPv6 address as per RFC 5952 - } - - //if host component is a domain name - else if (options.domainHost || (schemeHandler && schemeHandler.domainHost)) { - //convert IDN via punycode - try { - components.host = (!options.iri ? punycode.toASCII(components.host.replace(protocol.PCT_ENCODED, pctDecChars).toLowerCase()) : punycode.toUnicode(components.host)); - } catch (e) { - components.error = components.error || "Host's domain name can not be converted to " + (!options.iri ? "ASCII" : "Unicode") + " via punycode: " + e; - } - } - } - - //normalize encoding - _normalizeComponentEncoding(components, protocol); - - if (options.reference !== "suffix" && components.scheme) { - uriTokens.push(components.scheme); - uriTokens.push(":"); - } - - const authority = _recomposeAuthority(components, options); - if (authority !== undefined) { - if (options.reference !== "suffix") { - uriTokens.push("//"); - } - - uriTokens.push(authority); - - if (components.path && components.path.charAt(0) !== "/") { - uriTokens.push("/"); - } - } - - if (components.path !== undefined) { - let s = components.path; - - if (!options.absolutePath && (!schemeHandler || !schemeHandler.absolutePath)) { - s = removeDotSegments(s); - } - - if (authority === undefined) { - s = s.replace(/^\/\//, "/%2F"); //don't allow the path to start with "//" - } - - uriTokens.push(s); - } - - if (components.query !== undefined) { - uriTokens.push("?"); - uriTokens.push(components.query); - } - - if (components.fragment !== undefined) { - uriTokens.push("#"); - uriTokens.push(components.fragment); - } - - return uriTokens.join(""); //merge tokens into a string -}; - -export function resolveComponents(base:URIComponents, relative:URIComponents, options:URIOptions = {}, skipNormalization?:boolean):URIComponents { - const target:URIComponents = {}; - - if (!skipNormalization) { - base = parse(serialize(base, options), options); //normalize base components - relative = parse(serialize(relative, options), options); //normalize relative components - } - options = options || {}; - - if (!options.tolerant && relative.scheme) { - target.scheme = relative.scheme; - //target.authority = relative.authority; - target.userinfo = relative.userinfo; - target.host = relative.host; - target.port = relative.port; - target.path = removeDotSegments(relative.path || ""); - target.query = relative.query; - } else { - if (relative.userinfo !== undefined || relative.host !== undefined || relative.port !== undefined) { - //target.authority = relative.authority; - target.userinfo = relative.userinfo; - target.host = relative.host; - target.port = relative.port; - target.path = removeDotSegments(relative.path || ""); - target.query = relative.query; - } else { - if (!relative.path) { - target.path = base.path; - if (relative.query !== undefined) { - target.query = relative.query; - } else { - target.query = base.query; - } - } else { - if (relative.path.charAt(0) === "/") { - target.path = removeDotSegments(relative.path); - } else { - if ((base.userinfo !== undefined || base.host !== undefined || base.port !== undefined) && !base.path) { - target.path = "/" + relative.path; - } else if (!base.path) { - target.path = relative.path; - } else { - target.path = base.path.slice(0, base.path.lastIndexOf("/") + 1) + relative.path; - } - target.path = removeDotSegments(target.path); - } - target.query = relative.query; - } - //target.authority = base.authority; - target.userinfo = base.userinfo; - target.host = base.host; - target.port = base.port; - } - target.scheme = base.scheme; - } - - target.fragment = relative.fragment; - - return target; -}; - -export function resolve(baseURI:string, relativeURI:string, options?:URIOptions):string { - const schemelessOptions = assign({ scheme : 'null' }, options); - return serialize(resolveComponents(parse(baseURI, schemelessOptions), parse(relativeURI, schemelessOptions), schemelessOptions, true), schemelessOptions); -}; - -export function normalize(uri:string, options?:URIOptions):string; -export function normalize(uri:URIComponents, options?:URIOptions):URIComponents; -export function normalize(uri:any, options?:URIOptions):any { - if (typeof uri === "string") { - uri = serialize(parse(uri, options), options); - } else if (typeOf(uri) === "object") { - uri = parse(serialize(uri, options), options); - } - - return uri; -}; - -export function equal(uriA:string, uriB:string, options?: URIOptions):boolean; -export function equal(uriA:URIComponents, uriB:URIComponents, options?:URIOptions):boolean; -export function equal(uriA:any, uriB:any, options?:URIOptions):boolean { - if (typeof uriA === "string") { - uriA = serialize(parse(uriA, options), options); - } else if (typeOf(uriA) === "object") { - uriA = serialize(uriA, options); - } - - if (typeof uriB === "string") { - uriB = serialize(parse(uriB, options), options); - } else if (typeOf(uriB) === "object") { - uriB = serialize(uriB, options); - } - - return uriA === uriB; -}; - -export function escapeComponent(str:string, options?:URIOptions):string { - return str && str.toString().replace((!options || !options.iri ? URI_PROTOCOL.ESCAPE : IRI_PROTOCOL.ESCAPE), pctEncChar); -}; - -export function unescapeComponent(str:string, options?:URIOptions):string { - return str && str.toString().replace((!options || !options.iri ? URI_PROTOCOL.PCT_ENCODED : IRI_PROTOCOL.PCT_ENCODED), pctDecChars); -}; diff --git a/node_modules/uri-js/src/util.ts b/node_modules/uri-js/src/util.ts deleted file mode 100644 index 29c6d5d4d..000000000 --- a/node_modules/uri-js/src/util.ts +++ /dev/null @@ -1,40 +0,0 @@ -export function merge(...sets:Array):string { - if (sets.length > 1) { - sets[0] = sets[0].slice(0, -1); - const xl = sets.length - 1; - for (let x = 1; x < xl; ++x) { - sets[x] = sets[x].slice(1, -1); - } - sets[xl] = sets[xl].slice(1); - return sets.join(''); - } else { - return sets[0]; - } -} - -export function subexp(str:string):string { - return "(?:" + str + ")"; -} - -export function typeOf(o:any):string { - return o === undefined ? "undefined" : (o === null ? "null" : Object.prototype.toString.call(o).split(" ").pop().split("]").shift().toLowerCase()); -} - -export function toUpperCase(str:string):string { - return str.toUpperCase(); -} - -export function toArray(obj:any):Array { - return obj !== undefined && obj !== null ? (obj instanceof Array ? obj : (typeof obj.length !== "number" || obj.split || obj.setInterval || obj.call ? [obj] : Array.prototype.slice.call(obj))) : []; -} - - -export function assign(target: object, source: any): any { - const obj = target as any; - if (source) { - for (const key in source) { - obj[key] = source[key]; - } - } - return obj; -} \ No newline at end of file diff --git a/node_modules/uri-js/tests/qunit.css b/node_modules/uri-js/tests/qunit.css deleted file mode 100644 index 861c40d60..000000000 --- a/node_modules/uri-js/tests/qunit.css +++ /dev/null @@ -1,118 +0,0 @@ -ol#qunit-tests { - font-family:"Helvetica Neue Light", "HelveticaNeue-Light", "Helvetica Neue", Calibri, Helvetica, Arial; - margin:0; - padding:0; - list-style-position:inside; - - font-size: smaller; -} -ol#qunit-tests li{ - padding:0.4em 0.5em 0.4em 2.5em; - border-bottom:1px solid #fff; - font-size:small; - list-style-position:inside; -} -ol#qunit-tests li ol{ - box-shadow: inset 0px 2px 13px #999; - -moz-box-shadow: inset 0px 2px 13px #999; - -webkit-box-shadow: inset 0px 2px 13px #999; - margin-top:0.5em; - margin-left:0; - padding:0.5em; - background-color:#fff; - border-radius:15px; - -moz-border-radius: 15px; - -webkit-border-radius: 15px; -} -ol#qunit-tests li li{ - border-bottom:none; - margin:0.5em; - background-color:#fff; - list-style-position: inside; - padding:0.4em 0.5em 0.4em 0.5em; -} - -ol#qunit-tests li li.pass{ - border-left:26px solid #C6E746; - background-color:#fff; - color:#5E740B; - } -ol#qunit-tests li li.fail{ - border-left:26px solid #EE5757; - background-color:#fff; - color:#710909; -} -ol#qunit-tests li.pass{ - background-color:#D2E0E6; - color:#528CE0; -} -ol#qunit-tests li.fail{ - background-color:#EE5757; - color:#000; -} -ol#qunit-tests li strong { - cursor:pointer; -} -h1#qunit-header{ - background-color:#0d3349; - margin:0; - padding:0.5em 0 0.5em 1em; - color:#fff; - font-family:"Helvetica Neue Light", "HelveticaNeue-Light", "Helvetica Neue", Calibri, Helvetica, Arial; - border-top-right-radius:15px; - border-top-left-radius:15px; - -moz-border-radius-topright:15px; - -moz-border-radius-topleft:15px; - -webkit-border-top-right-radius:15px; - -webkit-border-top-left-radius:15px; - text-shadow: rgba(0, 0, 0, 0.5) 4px 4px 1px; -} -h2#qunit-banner{ - font-family:"Helvetica Neue Light", "HelveticaNeue-Light", "Helvetica Neue", Calibri, Helvetica, Arial; - height:5px; - margin:0; - padding:0; -} -h2#qunit-banner.qunit-pass{ - background-color:#C6E746; -} -h2#qunit-banner.qunit-fail, #qunit-testrunner-toolbar { - background-color:#EE5757; -} -#qunit-testrunner-toolbar { - font-family:"Helvetica Neue Light", "HelveticaNeue-Light", "Helvetica Neue", Calibri, Helvetica, Arial; - padding:0; - /*width:80%;*/ - padding:0em 0 0.5em 2em; - font-size: small; -} -h2#qunit-userAgent { - font-family:"Helvetica Neue Light", "HelveticaNeue-Light", "Helvetica Neue", Calibri, Helvetica, Arial; - background-color:#2b81af; - margin:0; - padding:0; - color:#fff; - font-size: small; - padding:0.5em 0 0.5em 2.5em; - text-shadow: rgba(0, 0, 0, 0.5) 2px 2px 1px; -} -p#qunit-testresult{ - font-family:"Helvetica Neue Light", "HelveticaNeue-Light", "Helvetica Neue", Calibri, Helvetica, Arial; - margin:0; - font-size: small; - color:#2b81af; - border-bottom-right-radius:15px; - border-bottom-left-radius:15px; - -moz-border-radius-bottomright:15px; - -moz-border-radius-bottomleft:15px; - -webkit-border-bottom-right-radius:15px; - -webkit-border-bottom-left-radius:15px; - background-color:#D2E0E6; - padding:0.5em 0.5em 0.5em 2.5em; -} -strong b.fail{ - color:#710909; - } -strong b.pass{ - color:#5E740B; - } \ No newline at end of file diff --git a/node_modules/uri-js/tests/qunit.js b/node_modules/uri-js/tests/qunit.js deleted file mode 100644 index 8bef02615..000000000 --- a/node_modules/uri-js/tests/qunit.js +++ /dev/null @@ -1,1042 +0,0 @@ -/* - * QUnit - A JavaScript Unit Testing Framework - * - * http://docs.jquery.com/QUnit - * - * Copyright (c) 2009 John Resig, Jörn Zaefferer - * Dual licensed under the MIT (MIT-LICENSE.txt) - * and GPL (GPL-LICENSE.txt) licenses. - */ - -(function(window) { - -var QUnit = { - - // Initialize the configuration options - init: function() { - config = { - stats: { all: 0, bad: 0 }, - moduleStats: { all: 0, bad: 0 }, - started: +new Date, - blocking: false, - autorun: false, - assertions: [], - filters: [], - queue: [] - }; - - var tests = id("qunit-tests"), - banner = id("qunit-banner"), - result = id("qunit-testresult"); - - if ( tests ) { - tests.innerHTML = ""; - } - - if ( banner ) { - banner.className = ""; - } - - if ( result ) { - result.parentNode.removeChild( result ); - } - }, - - // call on start of module test to prepend name to all tests - module: function(name, testEnvironment) { - config.currentModule = name; - - synchronize(function() { - if ( config.currentModule ) { - QUnit.moduleDone( config.currentModule, config.moduleStats.bad, config.moduleStats.all ); - } - - config.currentModule = name; - config.moduleTestEnvironment = testEnvironment; - config.moduleStats = { all: 0, bad: 0 }; - - QUnit.moduleStart( name, testEnvironment ); - }); - }, - - asyncTest: function(testName, expected, callback) { - if ( arguments.length === 2 ) { - callback = expected; - expected = 0; - } - - QUnit.test(testName, expected, callback, true); - }, - - test: function(testName, expected, callback, async) { - var name = testName, testEnvironment, testEnvironmentArg; - - if ( arguments.length === 2 ) { - callback = expected; - expected = null; - } - // is 2nd argument a testEnvironment? - if ( expected && typeof expected === 'object') { - testEnvironmentArg = expected; - expected = null; - } - - if ( config.currentModule ) { - name = config.currentModule + " module: " + name; - } - - if ( !validTest(name) ) { - return; - } - - synchronize(function() { - QUnit.testStart( testName ); - - testEnvironment = extend({ - setup: function() {}, - teardown: function() {} - }, config.moduleTestEnvironment); - if (testEnvironmentArg) { - extend(testEnvironment,testEnvironmentArg); - } - - // allow utility functions to access the current test environment - QUnit.current_testEnvironment = testEnvironment; - - config.assertions = []; - config.expected = expected; - - try { - if ( !config.pollution ) { - saveGlobal(); - } - - testEnvironment.setup.call(testEnvironment); - } catch(e) { - QUnit.ok( false, "Setup failed on " + name + ": " + e.message ); - } - - if ( async ) { - QUnit.stop(); - } - - try { - callback.call(testEnvironment); - } catch(e) { - fail("Test " + name + " died, exception and test follows", e, callback); - QUnit.ok( false, "Died on test #" + (config.assertions.length + 1) + ": " + e.message ); - // else next test will carry the responsibility - saveGlobal(); - - // Restart the tests if they're blocking - if ( config.blocking ) { - start(); - } - } - }); - - synchronize(function() { - try { - checkPollution(); - testEnvironment.teardown.call(testEnvironment); - } catch(e) { - QUnit.ok( false, "Teardown failed on " + name + ": " + e.message ); - } - - try { - QUnit.reset(); - } catch(e) { - fail("reset() failed, following Test " + name + ", exception and reset fn follows", e, reset); - } - - if ( config.expected && config.expected != config.assertions.length ) { - QUnit.ok( false, "Expected " + config.expected + " assertions, but " + config.assertions.length + " were run" ); - } - - var good = 0, bad = 0, - tests = id("qunit-tests"); - - config.stats.all += config.assertions.length; - config.moduleStats.all += config.assertions.length; - - if ( tests ) { - var ol = document.createElement("ol"); - ol.style.display = "none"; - - for ( var i = 0; i < config.assertions.length; i++ ) { - var assertion = config.assertions[i]; - - var li = document.createElement("li"); - li.className = assertion.result ? "pass" : "fail"; - li.appendChild(document.createTextNode(assertion.message || "(no message)")); - ol.appendChild( li ); - - if ( assertion.result ) { - good++; - } else { - bad++; - config.stats.bad++; - config.moduleStats.bad++; - } - } - - var b = document.createElement("strong"); - b.innerHTML = name + " (" + bad + ", " + good + ", " + config.assertions.length + ")"; - - addEvent(b, "click", function() { - var next = b.nextSibling, display = next.style.display; - next.style.display = display === "none" ? "block" : "none"; - }); - - addEvent(b, "dblclick", function(e) { - var target = e && e.target ? e.target : window.event.srcElement; - if ( target.nodeName.toLowerCase() === "strong" ) { - var text = "", node = target.firstChild; - - while ( node.nodeType === 3 ) { - text += node.nodeValue; - node = node.nextSibling; - } - - text = text.replace(/(^\s*|\s*$)/g, ""); - - if ( window.location ) { - window.location.href = window.location.href.match(/^(.+?)(\?.*)?$/)[1] + "?" + encodeURIComponent(text); - } - } - }); - - var li = document.createElement("li"); - li.className = bad ? "fail" : "pass"; - li.appendChild( b ); - li.appendChild( ol ); - tests.appendChild( li ); - - if ( bad ) { - var toolbar = id("qunit-testrunner-toolbar"); - if ( toolbar ) { - toolbar.style.display = "block"; - id("qunit-filter-pass").disabled = null; - id("qunit-filter-missing").disabled = null; - } - } - - } else { - for ( var i = 0; i < config.assertions.length; i++ ) { - if ( !config.assertions[i].result ) { - bad++; - config.stats.bad++; - config.moduleStats.bad++; - } - } - } - - QUnit.testDone( testName, bad, config.assertions.length ); - - if ( !window.setTimeout && !config.queue.length ) { - done(); - } - }); - - if ( window.setTimeout && !config.doneTimer ) { - config.doneTimer = window.setTimeout(function(){ - if ( !config.queue.length ) { - done(); - } else { - synchronize( done ); - } - }, 13); - } - }, - - /** - * Specify the number of expected assertions to gurantee that failed test (no assertions are run at all) don't slip through. - */ - expect: function(asserts) { - config.expected = asserts; - }, - - /** - * Asserts true. - * @example ok( "asdfasdf".length > 5, "There must be at least 5 chars" ); - */ - ok: function(a, msg) { - QUnit.log(a, msg); - - config.assertions.push({ - result: !!a, - message: msg - }); - }, - - /** - * Checks that the first two arguments are equal, with an optional message. - * Prints out both actual and expected values. - * - * Prefered to ok( actual == expected, message ) - * - * @example equal( format("Received {0} bytes.", 2), "Received 2 bytes." ); - * - * @param Object actual - * @param Object expected - * @param String message (optional) - */ - equal: function(actual, expected, message) { - push(expected == actual, actual, expected, message); - }, - - notEqual: function(actual, expected, message) { - push(expected != actual, actual, expected, message); - }, - - deepEqual: function(a, b, message) { - push(QUnit.equiv(a, b), a, b, message); - }, - - notDeepEqual: function(a, b, message) { - push(!QUnit.equiv(a, b), a, b, message); - }, - - strictEqual: function(actual, expected, message) { - push(expected === actual, actual, expected, message); - }, - - notStrictEqual: function(actual, expected, message) { - push(expected !== actual, actual, expected, message); - }, - - start: function() { - // A slight delay, to avoid any current callbacks - if ( window.setTimeout ) { - window.setTimeout(function() { - if ( config.timeout ) { - clearTimeout(config.timeout); - } - - config.blocking = false; - process(); - }, 13); - } else { - config.blocking = false; - process(); - } - }, - - stop: function(timeout) { - config.blocking = true; - - if ( timeout && window.setTimeout ) { - config.timeout = window.setTimeout(function() { - QUnit.ok( false, "Test timed out" ); - QUnit.start(); - }, timeout); - } - }, - - /** - * Resets the test setup. Useful for tests that modify the DOM. - */ - reset: function() { - if ( window.jQuery ) { - jQuery("#main").html( config.fixture ); - jQuery.event.global = {}; - jQuery.ajaxSettings = extend({}, config.ajaxSettings); - } - }, - - /** - * Trigger an event on an element. - * - * @example triggerEvent( document.body, "click" ); - * - * @param DOMElement elem - * @param String type - */ - triggerEvent: function( elem, type, event ) { - if ( document.createEvent ) { - event = document.createEvent("MouseEvents"); - event.initMouseEvent(type, true, true, elem.ownerDocument.defaultView, - 0, 0, 0, 0, 0, false, false, false, false, 0, null); - elem.dispatchEvent( event ); - - } else if ( elem.fireEvent ) { - elem.fireEvent("on"+type); - } - }, - - // Safe object type checking - is: function( type, obj ) { - return Object.prototype.toString.call( obj ) === "[object "+ type +"]"; - }, - - // Logging callbacks - done: function(failures, total) {}, - log: function(result, message) {}, - testStart: function(name) {}, - testDone: function(name, failures, total) {}, - moduleStart: function(name, testEnvironment) {}, - moduleDone: function(name, failures, total) {} -}; - -// Backwards compatibility, deprecated -QUnit.equals = QUnit.equal; -QUnit.same = QUnit.deepEqual; - -// Maintain internal state -var config = { - // The queue of tests to run - queue: [], - - // block until document ready - blocking: true -}; - -// Load paramaters -(function() { - var location = window.location || { search: "", protocol: "file:" }, - GETParams = location.search.slice(1).split('&'); - - for ( var i = 0; i < GETParams.length; i++ ) { - GETParams[i] = decodeURIComponent( GETParams[i] ); - if ( GETParams[i] === "noglobals" ) { - GETParams.splice( i, 1 ); - i--; - config.noglobals = true; - } else if ( GETParams[i].search('=') > -1 ) { - GETParams.splice( i, 1 ); - i--; - } - } - - // restrict modules/tests by get parameters - config.filters = GETParams; - - // Figure out if we're running the tests from a server or not - QUnit.isLocal = !!(location.protocol === 'file:'); -})(); - -// Expose the API as global variables, unless an 'exports' -// object exists, in that case we assume we're in CommonJS -if ( typeof exports === "undefined" || typeof require === "undefined" ) { - extend(window, QUnit); - window.QUnit = QUnit; -} else { - extend(exports, QUnit); - exports.QUnit = QUnit; -} - -if ( typeof document === "undefined" || document.readyState === "complete" ) { - config.autorun = true; -} - -addEvent(window, "load", function() { - // Initialize the config, saving the execution queue - var oldconfig = extend({}, config); - QUnit.init(); - extend(config, oldconfig); - - config.blocking = false; - - var userAgent = id("qunit-userAgent"); - if ( userAgent ) { - userAgent.innerHTML = navigator.userAgent; - } - - var toolbar = id("qunit-testrunner-toolbar"); - if ( toolbar ) { - toolbar.style.display = "none"; - - var filter = document.createElement("input"); - filter.type = "checkbox"; - filter.id = "qunit-filter-pass"; - filter.disabled = true; - addEvent( filter, "click", function() { - var li = document.getElementsByTagName("li"); - for ( var i = 0; i < li.length; i++ ) { - if ( li[i].className.indexOf("pass") > -1 ) { - li[i].style.display = filter.checked ? "none" : ""; - } - } - }); - toolbar.appendChild( filter ); - - var label = document.createElement("label"); - label.setAttribute("for", "qunit-filter-pass"); - label.innerHTML = "Hide passed tests"; - toolbar.appendChild( label ); - - var missing = document.createElement("input"); - missing.type = "checkbox"; - missing.id = "qunit-filter-missing"; - missing.disabled = true; - addEvent( missing, "click", function() { - var li = document.getElementsByTagName("li"); - for ( var i = 0; i < li.length; i++ ) { - if ( li[i].className.indexOf("fail") > -1 && li[i].innerHTML.indexOf('missing test - untested code is broken code') > - 1 ) { - li[i].parentNode.parentNode.style.display = missing.checked ? "none" : "block"; - } - } - }); - toolbar.appendChild( missing ); - - label = document.createElement("label"); - label.setAttribute("for", "qunit-filter-missing"); - label.innerHTML = "Hide missing tests (untested code is broken code)"; - toolbar.appendChild( label ); - } - - var main = id('main'); - if ( main ) { - config.fixture = main.innerHTML; - } - - if ( window.jQuery ) { - config.ajaxSettings = window.jQuery.ajaxSettings; - } - - QUnit.start(); -}); - -function done() { - if ( config.doneTimer && window.clearTimeout ) { - window.clearTimeout( config.doneTimer ); - config.doneTimer = null; - } - - if ( config.queue.length ) { - config.doneTimer = window.setTimeout(function(){ - if ( !config.queue.length ) { - done(); - } else { - synchronize( done ); - } - }, 13); - - return; - } - - config.autorun = true; - - // Log the last module results - if ( config.currentModule ) { - QUnit.moduleDone( config.currentModule, config.moduleStats.bad, config.moduleStats.all ); - } - - var banner = id("qunit-banner"), - tests = id("qunit-tests"), - html = ['Tests completed in ', - +new Date - config.started, ' milliseconds.
', - '', config.stats.all - config.stats.bad, ' tests of ', config.stats.all, ' passed, ', config.stats.bad,' failed.'].join(''); - - if ( banner ) { - banner.className = (config.stats.bad ? "qunit-fail" : "qunit-pass"); - } - - if ( tests ) { - var result = id("qunit-testresult"); - - if ( !result ) { - result = document.createElement("p"); - result.id = "qunit-testresult"; - result.className = "result"; - tests.parentNode.insertBefore( result, tests.nextSibling ); - } - - result.innerHTML = html; - } - - QUnit.done( config.stats.bad, config.stats.all ); -} - -function validTest( name ) { - var i = config.filters.length, - run = false; - - if ( !i ) { - return true; - } - - while ( i-- ) { - var filter = config.filters[i], - not = filter.charAt(0) == '!'; - - if ( not ) { - filter = filter.slice(1); - } - - if ( name.indexOf(filter) !== -1 ) { - return !not; - } - - if ( not ) { - run = true; - } - } - - return run; -} - -function push(result, actual, expected, message) { - message = message || (result ? "okay" : "failed"); - QUnit.ok( result, result ? message + ": " + expected : message + ", expected: " + QUnit.jsDump.parse(expected) + " result: " + QUnit.jsDump.parse(actual) ); -} - -function synchronize( callback ) { - config.queue.push( callback ); - - if ( config.autorun && !config.blocking ) { - process(); - } -} - -function process() { - while ( config.queue.length && !config.blocking ) { - config.queue.shift()(); - } -} - -function saveGlobal() { - config.pollution = []; - - if ( config.noglobals ) { - for ( var key in window ) { - config.pollution.push( key ); - } - } -} - -function checkPollution( name ) { - var old = config.pollution; - saveGlobal(); - - var newGlobals = diff( old, config.pollution ); - if ( newGlobals.length > 0 ) { - ok( false, "Introduced global variable(s): " + newGlobals.join(", ") ); - config.expected++; - } - - var deletedGlobals = diff( config.pollution, old ); - if ( deletedGlobals.length > 0 ) { - ok( false, "Deleted global variable(s): " + deletedGlobals.join(", ") ); - config.expected++; - } -} - -// returns a new Array with the elements that are in a but not in b -function diff( a, b ) { - var result = a.slice(); - for ( var i = 0; i < result.length; i++ ) { - for ( var j = 0; j < b.length; j++ ) { - if ( result[i] === b[j] ) { - result.splice(i, 1); - i--; - break; - } - } - } - return result; -} - -function fail(message, exception, callback) { - if ( typeof console !== "undefined" && console.error && console.warn ) { - console.error(message); - console.error(exception); - console.warn(callback.toString()); - - } else if ( window.opera && opera.postError ) { - opera.postError(message, exception, callback.toString); - } -} - -function extend(a, b) { - for ( var prop in b ) { - a[prop] = b[prop]; - } - - return a; -} - -function addEvent(elem, type, fn) { - if ( elem.addEventListener ) { - elem.addEventListener( type, fn, false ); - } else if ( elem.attachEvent ) { - elem.attachEvent( "on" + type, fn ); - } else { - fn(); - } -} - -function id(name) { - return !!(typeof document !== "undefined" && document && document.getElementById) && - document.getElementById( name ); -} - -// Test for equality any JavaScript type. -// Discussions and reference: http://philrathe.com/articles/equiv -// Test suites: http://philrathe.com/tests/equiv -// Author: Philippe Rathé -QUnit.equiv = function () { - - var innerEquiv; // the real equiv function - var callers = []; // stack to decide between skip/abort functions - - - // Determine what is o. - function hoozit(o) { - if (QUnit.is("String", o)) { - return "string"; - - } else if (QUnit.is("Boolean", o)) { - return "boolean"; - - } else if (QUnit.is("Number", o)) { - - if (isNaN(o)) { - return "nan"; - } else { - return "number"; - } - - } else if (typeof o === "undefined") { - return "undefined"; - - // consider: typeof null === object - } else if (o === null) { - return "null"; - - // consider: typeof [] === object - } else if (QUnit.is( "Array", o)) { - return "array"; - - // consider: typeof new Date() === object - } else if (QUnit.is( "Date", o)) { - return "date"; - - // consider: /./ instanceof Object; - // /./ instanceof RegExp; - // typeof /./ === "function"; // => false in IE and Opera, - // true in FF and Safari - } else if (QUnit.is( "RegExp", o)) { - return "regexp"; - - } else if (typeof o === "object") { - return "object"; - - } else if (QUnit.is( "Function", o)) { - return "function"; - } else { - return undefined; - } - } - - // Call the o related callback with the given arguments. - function bindCallbacks(o, callbacks, args) { - var prop = hoozit(o); - if (prop) { - if (hoozit(callbacks[prop]) === "function") { - return callbacks[prop].apply(callbacks, args); - } else { - return callbacks[prop]; // or undefined - } - } - } - - var callbacks = function () { - - // for string, boolean, number and null - function useStrictEquality(b, a) { - if (b instanceof a.constructor || a instanceof b.constructor) { - // to catch short annotaion VS 'new' annotation of a declaration - // e.g. var i = 1; - // var j = new Number(1); - return a == b; - } else { - return a === b; - } - } - - return { - "string": useStrictEquality, - "boolean": useStrictEquality, - "number": useStrictEquality, - "null": useStrictEquality, - "undefined": useStrictEquality, - - "nan": function (b) { - return isNaN(b); - }, - - "date": function (b, a) { - return hoozit(b) === "date" && a.valueOf() === b.valueOf(); - }, - - "regexp": function (b, a) { - return hoozit(b) === "regexp" && - a.source === b.source && // the regex itself - a.global === b.global && // and its modifers (gmi) ... - a.ignoreCase === b.ignoreCase && - a.multiline === b.multiline; - }, - - // - skip when the property is a method of an instance (OOP) - // - abort otherwise, - // initial === would have catch identical references anyway - "function": function () { - var caller = callers[callers.length - 1]; - return caller !== Object && - typeof caller !== "undefined"; - }, - - "array": function (b, a) { - var i; - var len; - - // b could be an object literal here - if ( ! (hoozit(b) === "array")) { - return false; - } - - len = a.length; - if (len !== b.length) { // safe and faster - return false; - } - for (i = 0; i < len; i++) { - if ( ! innerEquiv(a[i], b[i])) { - return false; - } - } - return true; - }, - - "object": function (b, a) { - var i; - var eq = true; // unless we can proove it - var aProperties = [], bProperties = []; // collection of strings - - // comparing constructors is more strict than using instanceof - if ( a.constructor !== b.constructor) { - return false; - } - - // stack constructor before traversing properties - callers.push(a.constructor); - - for (i in a) { // be strict: don't ensures hasOwnProperty and go deep - - aProperties.push(i); // collect a's properties - - if ( ! innerEquiv(a[i], b[i])) { - eq = false; - } - } - - callers.pop(); // unstack, we are done - - for (i in b) { - bProperties.push(i); // collect b's properties - } - - // Ensures identical properties name - return eq && innerEquiv(aProperties.sort(), bProperties.sort()); - } - }; - }(); - - innerEquiv = function () { // can take multiple arguments - var args = Array.prototype.slice.apply(arguments); - if (args.length < 2) { - return true; // end transition - } - - return (function (a, b) { - if (a === b) { - return true; // catch the most you can - } else if (a === null || b === null || typeof a === "undefined" || typeof b === "undefined" || hoozit(a) !== hoozit(b)) { - return false; // don't lose time with error prone cases - } else { - return bindCallbacks(a, callbacks, [b, a]); - } - - // apply transition with (1..n) arguments - })(args[0], args[1]) && arguments.callee.apply(this, args.splice(1, args.length -1)); - }; - - return innerEquiv; - -}(); - -/** - * jsDump - * Copyright (c) 2008 Ariel Flesler - aflesler(at)gmail(dot)com | http://flesler.blogspot.com - * Licensed under BSD (http://www.opensource.org/licenses/bsd-license.php) - * Date: 5/15/2008 - * @projectDescription Advanced and extensible data dumping for Javascript. - * @version 1.0.0 - * @author Ariel Flesler - * @link {http://flesler.blogspot.com/2008/05/jsdump-pretty-dump-of-any-javascript.html} - */ -QUnit.jsDump = (function() { - function quote( str ) { - return '"' + str.toString().replace(/"/g, '\\"') + '"'; - }; - function literal( o ) { - return o + ''; - }; - function join( pre, arr, post ) { - var s = jsDump.separator(), - base = jsDump.indent(), - inner = jsDump.indent(1); - if ( arr.join ) - arr = arr.join( ',' + s + inner ); - if ( !arr ) - return pre + post; - return [ pre, inner + arr, base + post ].join(s); - }; - function array( arr ) { - var i = arr.length, ret = Array(i); - this.up(); - while ( i-- ) - ret[i] = this.parse( arr[i] ); - this.down(); - return join( '[', ret, ']' ); - }; - - var reName = /^function (\w+)/; - - var jsDump = { - parse:function( obj, type ) { //type is used mostly internally, you can fix a (custom)type in advance - var parser = this.parsers[ type || this.typeOf(obj) ]; - type = typeof parser; - - return type == 'function' ? parser.call( this, obj ) : - type == 'string' ? parser : - this.parsers.error; - }, - typeOf:function( obj ) { - var type; - if ( obj === null ) { - type = "null"; - } else if (typeof obj === "undefined") { - type = "undefined"; - } else if (QUnit.is("RegExp", obj)) { - type = "regexp"; - } else if (QUnit.is("Date", obj)) { - type = "date"; - } else if (QUnit.is("Function", obj)) { - type = "function"; - } else if (QUnit.is("Array", obj)) { - type = "array"; - } else if (QUnit.is("Window", obj) || QUnit.is("global", obj)) { - type = "window"; - } else if (QUnit.is("HTMLDocument", obj)) { - type = "document"; - } else if (QUnit.is("HTMLCollection", obj) || QUnit.is("NodeList", obj)) { - type = "nodelist"; - } else if (/^\[object HTML/.test(Object.prototype.toString.call( obj ))) { - type = "node"; - } else { - type = typeof obj; - } - return type; - }, - separator:function() { - return this.multiline ? this.HTML ? '
' : '\n' : this.HTML ? ' ' : ' '; - }, - indent:function( extra ) {// extra can be a number, shortcut for increasing-calling-decreasing - if ( !this.multiline ) - return ''; - var chr = this.indentChar; - if ( this.HTML ) - chr = chr.replace(/\t/g,' ').replace(/ /g,' '); - return Array( this._depth_ + (extra||0) ).join(chr); - }, - up:function( a ) { - this._depth_ += a || 1; - }, - down:function( a ) { - this._depth_ -= a || 1; - }, - setParser:function( name, parser ) { - this.parsers[name] = parser; - }, - // The next 3 are exposed so you can use them - quote:quote, - literal:literal, - join:join, - // - _depth_: 1, - // This is the list of parsers, to modify them, use jsDump.setParser - parsers:{ - window: '[Window]', - document: '[Document]', - error:'[ERROR]', //when no parser is found, shouldn't happen - unknown: '[Unknown]', - 'null':'null', - undefined:'undefined', - 'function':function( fn ) { - var ret = 'function', - name = 'name' in fn ? fn.name : (reName.exec(fn)||[])[1];//functions never have name in IE - if ( name ) - ret += ' ' + name; - ret += '('; - - ret = [ ret, this.parse( fn, 'functionArgs' ), '){'].join(''); - return join( ret, this.parse(fn,'functionCode'), '}' ); - }, - array: array, - nodelist: array, - arguments: array, - object:function( map ) { - var ret = [ ]; - this.up(); - for ( var key in map ) - ret.push( this.parse(key,'key') + ': ' + this.parse(map[key]) ); - this.down(); - return join( '{', ret, '}' ); - }, - node:function( node ) { - var open = this.HTML ? '<' : '<', - close = this.HTML ? '>' : '>'; - - var tag = node.nodeName.toLowerCase(), - ret = open + tag; - - for ( var a in this.DOMAttrs ) { - var val = node[this.DOMAttrs[a]]; - if ( val ) - ret += ' ' + a + '=' + this.parse( val, 'attribute' ); - } - return ret + close + open + '/' + tag + close; - }, - functionArgs:function( fn ) {//function calls it internally, it's the arguments part of the function - var l = fn.length; - if ( !l ) return ''; - - var args = Array(l); - while ( l-- ) - args[l] = String.fromCharCode(97+l);//97 is 'a' - return ' ' + args.join(', ') + ' '; - }, - key:quote, //object calls it internally, the key part of an item in a map - functionCode:'[code]', //function calls it internally, it's the content of the function - attribute:quote, //node calls it internally, it's an html attribute value - string:quote, - date:quote, - regexp:literal, //regex - number:literal, - 'boolean':literal - }, - DOMAttrs:{//attributes to dump from nodes, name=>realName - id:'id', - name:'name', - 'class':'className' - }, - HTML:true,//if true, entities are escaped ( <, >, \t, space and \n ) - indentChar:' ',//indentation unit - multiline:true //if true, items in a collection, are separated by a \n, else just a space. - }; - - return jsDump; -})(); - -})(this); diff --git a/node_modules/uri-js/tests/test-es5-min.html b/node_modules/uri-js/tests/test-es5-min.html deleted file mode 100644 index b841c7577..000000000 --- a/node_modules/uri-js/tests/test-es5-min.html +++ /dev/null @@ -1,17 +0,0 @@ - - - - - - - - - -

URI.js Test Suite

-

-
-

-
    - - diff --git a/node_modules/uri-js/tests/test-es5.html b/node_modules/uri-js/tests/test-es5.html deleted file mode 100644 index 2d89c66b6..000000000 --- a/node_modules/uri-js/tests/test-es5.html +++ /dev/null @@ -1,17 +0,0 @@ - - - - - - - - - -

    URI.js Test Suite

    -

    -
    -

    -
      - - diff --git a/node_modules/uri-js/tests/tests.js b/node_modules/uri-js/tests/tests.js deleted file mode 100644 index 624191ced..000000000 --- a/node_modules/uri-js/tests/tests.js +++ /dev/null @@ -1,774 +0,0 @@ -// -// -// Tests -// -// - -if (typeof URI === "undefined") { - var URI = require("../dist/es5/uri.all"); -} - -test("Acquire URI", function () { - //URI = require("./uri").URI; - ok(URI); -}); - -test("URI Parsing", function () { - var components; - - //scheme - components = URI.parse("uri:"); - strictEqual(components.error, undefined, "scheme errors"); - strictEqual(components.scheme, "uri", "scheme"); - //strictEqual(components.authority, undefined, "authority"); - strictEqual(components.userinfo, undefined, "userinfo"); - strictEqual(components.host, undefined, "host"); - strictEqual(components.port, undefined, "port"); - strictEqual(components.path, "", "path"); - strictEqual(components.query, undefined, "query"); - strictEqual(components.fragment, undefined, "fragment"); - - //userinfo - components = URI.parse("//@"); - strictEqual(components.error, undefined, "userinfo errors"); - strictEqual(components.scheme, undefined, "scheme"); - //strictEqual(components.authority, "@", "authority"); - strictEqual(components.userinfo, "", "userinfo"); - strictEqual(components.host, "", "host"); - strictEqual(components.port, undefined, "port"); - strictEqual(components.path, "", "path"); - strictEqual(components.query, undefined, "query"); - strictEqual(components.fragment, undefined, "fragment"); - - //host - components = URI.parse("//"); - strictEqual(components.error, undefined, "host errors"); - strictEqual(components.scheme, undefined, "scheme"); - //strictEqual(components.authority, "", "authority"); - strictEqual(components.userinfo, undefined, "userinfo"); - strictEqual(components.host, "", "host"); - strictEqual(components.port, undefined, "port"); - strictEqual(components.path, "", "path"); - strictEqual(components.query, undefined, "query"); - strictEqual(components.fragment, undefined, "fragment"); - - //port - components = URI.parse("//:"); - strictEqual(components.error, undefined, "port errors"); - strictEqual(components.scheme, undefined, "scheme"); - //strictEqual(components.authority, ":", "authority"); - strictEqual(components.userinfo, undefined, "userinfo"); - strictEqual(components.host, "", "host"); - strictEqual(components.port, "", "port"); - strictEqual(components.path, "", "path"); - strictEqual(components.query, undefined, "query"); - strictEqual(components.fragment, undefined, "fragment"); - - //path - components = URI.parse(""); - strictEqual(components.error, undefined, "path errors"); - strictEqual(components.scheme, undefined, "scheme"); - //strictEqual(components.authority, undefined, "authority"); - strictEqual(components.userinfo, undefined, "userinfo"); - strictEqual(components.host, undefined, "host"); - strictEqual(components.port, undefined, "port"); - strictEqual(components.path, "", "path"); - strictEqual(components.query, undefined, "query"); - strictEqual(components.fragment, undefined, "fragment"); - - //query - components = URI.parse("?"); - strictEqual(components.error, undefined, "query errors"); - strictEqual(components.scheme, undefined, "scheme"); - //strictEqual(components.authority, undefined, "authority"); - strictEqual(components.userinfo, undefined, "userinfo"); - strictEqual(components.host, undefined, "host"); - strictEqual(components.port, undefined, "port"); - strictEqual(components.path, "", "path"); - strictEqual(components.query, "", "query"); - strictEqual(components.fragment, undefined, "fragment"); - - //fragment - components = URI.parse("#"); - strictEqual(components.error, undefined, "fragment errors"); - strictEqual(components.scheme, undefined, "scheme"); - //strictEqual(components.authority, undefined, "authority"); - strictEqual(components.userinfo, undefined, "userinfo"); - strictEqual(components.host, undefined, "host"); - strictEqual(components.port, undefined, "port"); - strictEqual(components.path, "", "path"); - strictEqual(components.query, undefined, "query"); - strictEqual(components.fragment, "", "fragment"); - - //fragment with character tabulation - components = URI.parse("#\t"); - strictEqual(components.error, undefined, "path errors"); - strictEqual(components.scheme, undefined, "scheme"); - //strictEqual(components.authority, undefined, "authority"); - strictEqual(components.userinfo, undefined, "userinfo"); - strictEqual(components.host, undefined, "host"); - strictEqual(components.port, undefined, "port"); - strictEqual(components.path, "", "path"); - strictEqual(components.query, undefined, "query"); - strictEqual(components.fragment, "%09", "fragment"); - - //fragment with line feed - components = URI.parse("#\n"); - strictEqual(components.error, undefined, "path errors"); - strictEqual(components.scheme, undefined, "scheme"); - //strictEqual(components.authority, undefined, "authority"); - strictEqual(components.userinfo, undefined, "userinfo"); - strictEqual(components.host, undefined, "host"); - strictEqual(components.port, undefined, "port"); - strictEqual(components.path, "", "path"); - strictEqual(components.query, undefined, "query"); - strictEqual(components.fragment, "%0A", "fragment"); - - //fragment with line tabulation - components = URI.parse("#\v"); - strictEqual(components.error, undefined, "path errors"); - strictEqual(components.scheme, undefined, "scheme"); - //strictEqual(components.authority, undefined, "authority"); - strictEqual(components.userinfo, undefined, "userinfo"); - strictEqual(components.host, undefined, "host"); - strictEqual(components.port, undefined, "port"); - strictEqual(components.path, "", "path"); - strictEqual(components.query, undefined, "query"); - strictEqual(components.fragment, "%0B", "fragment"); - - //fragment with form feed - components = URI.parse("#\f"); - strictEqual(components.error, undefined, "path errors"); - strictEqual(components.scheme, undefined, "scheme"); - //strictEqual(components.authority, undefined, "authority"); - strictEqual(components.userinfo, undefined, "userinfo"); - strictEqual(components.host, undefined, "host"); - strictEqual(components.port, undefined, "port"); - strictEqual(components.path, "", "path"); - strictEqual(components.query, undefined, "query"); - strictEqual(components.fragment, "%0C", "fragment"); - - //fragment with carriage return - components = URI.parse("#\r"); - strictEqual(components.error, undefined, "path errors"); - strictEqual(components.scheme, undefined, "scheme"); - //strictEqual(components.authority, undefined, "authority"); - strictEqual(components.userinfo, undefined, "userinfo"); - strictEqual(components.host, undefined, "host"); - strictEqual(components.port, undefined, "port"); - strictEqual(components.path, "", "path"); - strictEqual(components.query, undefined, "query"); - strictEqual(components.fragment, "%0D", "fragment"); - - //all - components = URI.parse("uri://user:pass@example.com:123/one/two.three?q1=a1&q2=a2#body"); - strictEqual(components.error, undefined, "all errors"); - strictEqual(components.scheme, "uri", "scheme"); - //strictEqual(components.authority, "user:pass@example.com:123", "authority"); - strictEqual(components.userinfo, "user:pass", "userinfo"); - strictEqual(components.host, "example.com", "host"); - strictEqual(components.port, 123, "port"); - strictEqual(components.path, "/one/two.three", "path"); - strictEqual(components.query, "q1=a1&q2=a2", "query"); - strictEqual(components.fragment, "body", "fragment"); - - //IPv4address - components = URI.parse("//10.10.10.10"); - strictEqual(components.error, undefined, "IPv4address errors"); - strictEqual(components.scheme, undefined, "scheme"); - strictEqual(components.userinfo, undefined, "userinfo"); - strictEqual(components.host, "10.10.10.10", "host"); - strictEqual(components.port, undefined, "port"); - strictEqual(components.path, "", "path"); - strictEqual(components.query, undefined, "query"); - strictEqual(components.fragment, undefined, "fragment"); - - //IPv6address - components = URI.parse("//[2001:db8::7]"); - strictEqual(components.error, undefined, "IPv4address errors"); - strictEqual(components.scheme, undefined, "scheme"); - strictEqual(components.userinfo, undefined, "userinfo"); - strictEqual(components.host, "2001:db8::7", "host"); - strictEqual(components.port, undefined, "port"); - strictEqual(components.path, "", "path"); - strictEqual(components.query, undefined, "query"); - strictEqual(components.fragment, undefined, "fragment"); - - //mixed IPv4address & IPv6address - components = URI.parse("//[::ffff:129.144.52.38]"); - strictEqual(components.error, undefined, "IPv4address errors"); - strictEqual(components.scheme, undefined, "scheme"); - strictEqual(components.userinfo, undefined, "userinfo"); - strictEqual(components.host, "::ffff:129.144.52.38", "host"); - strictEqual(components.port, undefined, "port"); - strictEqual(components.path, "", "path"); - strictEqual(components.query, undefined, "query"); - strictEqual(components.fragment, undefined, "fragment"); - - //mixed IPv4address & reg-name, example from terion-name (https://github.com/garycourt/uri-js/issues/4) - components = URI.parse("uri://10.10.10.10.example.com/en/process"); - strictEqual(components.error, undefined, "mixed errors"); - strictEqual(components.scheme, "uri", "scheme"); - strictEqual(components.userinfo, undefined, "userinfo"); - strictEqual(components.host, "10.10.10.10.example.com", "host"); - strictEqual(components.port, undefined, "port"); - strictEqual(components.path, "/en/process", "path"); - strictEqual(components.query, undefined, "query"); - strictEqual(components.fragment, undefined, "fragment"); - - //IPv6address, example from bkw (https://github.com/garycourt/uri-js/pull/16) - components = URI.parse("//[2606:2800:220:1:248:1893:25c8:1946]/test"); - strictEqual(components.error, undefined, "IPv6address errors"); - strictEqual(components.scheme, undefined, "scheme"); - strictEqual(components.userinfo, undefined, "userinfo"); - strictEqual(components.host, "2606:2800:220:1:248:1893:25c8:1946", "host"); - strictEqual(components.port, undefined, "port"); - strictEqual(components.path, "/test", "path"); - strictEqual(components.query, undefined, "query"); - strictEqual(components.fragment, undefined, "fragment"); - - //IPv6address, example from RFC 5952 - components = URI.parse("//[2001:db8::1]:80"); - strictEqual(components.error, undefined, "IPv6address errors"); - strictEqual(components.scheme, undefined, "scheme"); - strictEqual(components.userinfo, undefined, "userinfo"); - strictEqual(components.host, "2001:db8::1", "host"); - strictEqual(components.port, 80, "port"); - strictEqual(components.path, "", "path"); - strictEqual(components.query, undefined, "query"); - strictEqual(components.fragment, undefined, "fragment"); - - //IPv6address with zone identifier, RFC 6874 - components = URI.parse("//[fe80::a%25en1]"); - strictEqual(components.error, undefined, "IPv4address errors"); - strictEqual(components.scheme, undefined, "scheme"); - strictEqual(components.userinfo, undefined, "userinfo"); - strictEqual(components.host, "fe80::a%en1", "host"); - strictEqual(components.port, undefined, "port"); - strictEqual(components.path, "", "path"); - strictEqual(components.query, undefined, "query"); - strictEqual(components.fragment, undefined, "fragment"); - - //IPv6address with an unescaped interface specifier, example from pekkanikander (https://github.com/garycourt/uri-js/pull/22) - components = URI.parse("//[2001:db8::7%en0]"); - strictEqual(components.error, undefined, "IPv6address interface errors"); - strictEqual(components.scheme, undefined, "scheme"); - strictEqual(components.userinfo, undefined, "userinfo"); - strictEqual(components.host, "2001:db8::7%en0", "host"); - strictEqual(components.port, undefined, "port"); - strictEqual(components.path, "", "path"); - strictEqual(components.query, undefined, "query"); - strictEqual(components.fragment, undefined, "fragment"); -}); - -test("URI Serialization", function () { - var components = { - scheme : undefined, - userinfo : undefined, - host : undefined, - port : undefined, - path : undefined, - query : undefined, - fragment : undefined - }; - strictEqual(URI.serialize(components), "", "Undefined Components"); - - components = { - scheme : "", - userinfo : "", - host : "", - port : 0, - path : "", - query : "", - fragment : "" - }; - strictEqual(URI.serialize(components), "//@:0?#", "Empty Components"); - - components = { - scheme : "uri", - userinfo : "foo:bar", - host : "example.com", - port : 1, - path : "path", - query : "query", - fragment : "fragment" - }; - strictEqual(URI.serialize(components), "uri://foo:bar@example.com:1/path?query#fragment", "All Components"); - - strictEqual(URI.serialize({path:"//path"}), "/%2Fpath", "Double slash path"); - strictEqual(URI.serialize({path:"foo:bar"}), "foo%3Abar", "Colon path"); - strictEqual(URI.serialize({path:"?query"}), "%3Fquery", "Query path"); - - //mixed IPv4address & reg-name, example from terion-name (https://github.com/garycourt/uri-js/issues/4) - strictEqual(URI.serialize({host:"10.10.10.10.example.com"}), "//10.10.10.10.example.com", "Mixed IPv4address & reg-name"); - - //IPv6address - strictEqual(URI.serialize({host:"2001:db8::7"}), "//[2001:db8::7]", "IPv6 Host"); - strictEqual(URI.serialize({host:"::ffff:129.144.52.38"}), "//[::ffff:129.144.52.38]", "IPv6 Mixed Host"); - strictEqual(URI.serialize({host:"2606:2800:220:1:248:1893:25c8:1946"}), "//[2606:2800:220:1:248:1893:25c8:1946]", "IPv6 Full Host"); - - //IPv6address with zone identifier, RFC 6874 - strictEqual(URI.serialize({host:"fe80::a%en1"}), "//[fe80::a%25en1]", "IPv6 Zone Unescaped Host"); - strictEqual(URI.serialize({host:"fe80::a%25en1"}), "//[fe80::a%25en1]", "IPv6 Zone Escaped Host"); -}); - -test("URI Resolving", function () { - //normal examples from RFC 3986 - var base = "uri://a/b/c/d;p?q"; - strictEqual(URI.resolve(base, "g:h"), "g:h", "g:h"); - strictEqual(URI.resolve(base, "g:h"), "g:h", "g:h"); - strictEqual(URI.resolve(base, "g"), "uri://a/b/c/g", "g"); - strictEqual(URI.resolve(base, "./g"), "uri://a/b/c/g", "./g"); - strictEqual(URI.resolve(base, "g/"), "uri://a/b/c/g/", "g/"); - strictEqual(URI.resolve(base, "/g"), "uri://a/g", "/g"); - strictEqual(URI.resolve(base, "//g"), "uri://g", "//g"); - strictEqual(URI.resolve(base, "?y"), "uri://a/b/c/d;p?y", "?y"); - strictEqual(URI.resolve(base, "g?y"), "uri://a/b/c/g?y", "g?y"); - strictEqual(URI.resolve(base, "#s"), "uri://a/b/c/d;p?q#s", "#s"); - strictEqual(URI.resolve(base, "g#s"), "uri://a/b/c/g#s", "g#s"); - strictEqual(URI.resolve(base, "g?y#s"), "uri://a/b/c/g?y#s", "g?y#s"); - strictEqual(URI.resolve(base, ";x"), "uri://a/b/c/;x", ";x"); - strictEqual(URI.resolve(base, "g;x"), "uri://a/b/c/g;x", "g;x"); - strictEqual(URI.resolve(base, "g;x?y#s"), "uri://a/b/c/g;x?y#s", "g;x?y#s"); - strictEqual(URI.resolve(base, ""), "uri://a/b/c/d;p?q", ""); - strictEqual(URI.resolve(base, "."), "uri://a/b/c/", "."); - strictEqual(URI.resolve(base, "./"), "uri://a/b/c/", "./"); - strictEqual(URI.resolve(base, ".."), "uri://a/b/", ".."); - strictEqual(URI.resolve(base, "../"), "uri://a/b/", "../"); - strictEqual(URI.resolve(base, "../g"), "uri://a/b/g", "../g"); - strictEqual(URI.resolve(base, "../.."), "uri://a/", "../.."); - strictEqual(URI.resolve(base, "../../"), "uri://a/", "../../"); - strictEqual(URI.resolve(base, "../../g"), "uri://a/g", "../../g"); - - //abnormal examples from RFC 3986 - strictEqual(URI.resolve(base, "../../../g"), "uri://a/g", "../../../g"); - strictEqual(URI.resolve(base, "../../../../g"), "uri://a/g", "../../../../g"); - - strictEqual(URI.resolve(base, "/./g"), "uri://a/g", "/./g"); - strictEqual(URI.resolve(base, "/../g"), "uri://a/g", "/../g"); - strictEqual(URI.resolve(base, "g."), "uri://a/b/c/g.", "g."); - strictEqual(URI.resolve(base, ".g"), "uri://a/b/c/.g", ".g"); - strictEqual(URI.resolve(base, "g.."), "uri://a/b/c/g..", "g.."); - strictEqual(URI.resolve(base, "..g"), "uri://a/b/c/..g", "..g"); - - strictEqual(URI.resolve(base, "./../g"), "uri://a/b/g", "./../g"); - strictEqual(URI.resolve(base, "./g/."), "uri://a/b/c/g/", "./g/."); - strictEqual(URI.resolve(base, "g/./h"), "uri://a/b/c/g/h", "g/./h"); - strictEqual(URI.resolve(base, "g/../h"), "uri://a/b/c/h", "g/../h"); - strictEqual(URI.resolve(base, "g;x=1/./y"), "uri://a/b/c/g;x=1/y", "g;x=1/./y"); - strictEqual(URI.resolve(base, "g;x=1/../y"), "uri://a/b/c/y", "g;x=1/../y"); - - strictEqual(URI.resolve(base, "g?y/./x"), "uri://a/b/c/g?y/./x", "g?y/./x"); - strictEqual(URI.resolve(base, "g?y/../x"), "uri://a/b/c/g?y/../x", "g?y/../x"); - strictEqual(URI.resolve(base, "g#s/./x"), "uri://a/b/c/g#s/./x", "g#s/./x"); - strictEqual(URI.resolve(base, "g#s/../x"), "uri://a/b/c/g#s/../x", "g#s/../x"); - - strictEqual(URI.resolve(base, "uri:g"), "uri:g", "uri:g"); - strictEqual(URI.resolve(base, "uri:g", {tolerant:true}), "uri://a/b/c/g", "uri:g"); - - //examples by PAEz - strictEqual(URI.resolve("//www.g.com/","/adf\ngf"), "//www.g.com/adf%0Agf", "/adf\\ngf"); - strictEqual(URI.resolve("//www.g.com/error\n/bleh/bleh",".."), "//www.g.com/error%0A/", "//www.g.com/error\\n/bleh/bleh"); -}); - -test("URI Normalizing", function () { - //test from RFC 3987 - strictEqual(URI.normalize("uri://www.example.org/red%09ros\xE9#red"), "uri://www.example.org/red%09ros%C3%A9#red"); - - //IPv4address - strictEqual(URI.normalize("//192.068.001.000"), "//192.68.1.0"); - - //IPv6address, example from RFC 3513 - strictEqual(URI.normalize("http://[1080::8:800:200C:417A]/"), "http://[1080::8:800:200c:417a]/"); - - //IPv6address, examples from RFC 5952 - strictEqual(URI.normalize("//[2001:0db8::0001]/"), "//[2001:db8::1]/"); - strictEqual(URI.normalize("//[2001:db8::1:0000:1]/"), "//[2001:db8::1:0:1]/"); - strictEqual(URI.normalize("//[2001:db8:0:0:0:0:2:1]/"), "//[2001:db8::2:1]/"); - strictEqual(URI.normalize("//[2001:db8:0:1:1:1:1:1]/"), "//[2001:db8:0:1:1:1:1:1]/"); - strictEqual(URI.normalize("//[2001:0:0:1:0:0:0:1]/"), "//[2001:0:0:1::1]/"); - strictEqual(URI.normalize("//[2001:db8:0:0:1:0:0:1]/"), "//[2001:db8::1:0:0:1]/"); - strictEqual(URI.normalize("//[2001:DB8::1]/"), "//[2001:db8::1]/"); - strictEqual(URI.normalize("//[0:0:0:0:0:ffff:192.0.2.1]/"), "//[::ffff:192.0.2.1]/"); - - //Mixed IPv4 and IPv6 address - strictEqual(URI.normalize("//[1:2:3:4:5:6:192.0.2.1]/"), "//[1:2:3:4:5:6:192.0.2.1]/"); - strictEqual(URI.normalize("//[1:2:3:4:5:6:192.068.001.000]/"), "//[1:2:3:4:5:6:192.68.1.0]/"); -}); - -test("URI Equals", function () { - //test from RFC 3986 - strictEqual(URI.equal("example://a/b/c/%7Bfoo%7D", "eXAMPLE://a/./b/../b/%63/%7bfoo%7d"), true); - - //test from RFC 3987 - strictEqual(URI.equal("http://example.org/~user", "http://example.org/%7euser"), true); -}); - -test("Escape Component", function () { - var chr; - for (var d = 0; d <= 129; ++d) { - chr = String.fromCharCode(d); - if (!chr.match(/[\$\&\+\,\;\=]/)) { - strictEqual(URI.escapeComponent(chr), encodeURIComponent(chr)); - } else { - strictEqual(URI.escapeComponent(chr), chr); - } - } - strictEqual(URI.escapeComponent("\u00c0"), encodeURIComponent("\u00c0")); - strictEqual(URI.escapeComponent("\u07ff"), encodeURIComponent("\u07ff")); - strictEqual(URI.escapeComponent("\u0800"), encodeURIComponent("\u0800")); - strictEqual(URI.escapeComponent("\u30a2"), encodeURIComponent("\u30a2")); -}); - -test("Unescape Component", function () { - var chr; - for (var d = 0; d <= 129; ++d) { - chr = String.fromCharCode(d); - strictEqual(URI.unescapeComponent(encodeURIComponent(chr)), chr); - } - strictEqual(URI.unescapeComponent(encodeURIComponent("\u00c0")), "\u00c0"); - strictEqual(URI.unescapeComponent(encodeURIComponent("\u07ff")), "\u07ff"); - strictEqual(URI.unescapeComponent(encodeURIComponent("\u0800")), "\u0800"); - strictEqual(URI.unescapeComponent(encodeURIComponent("\u30a2")), "\u30a2"); -}); - -// -// IRI -// - - - -var IRI_OPTION = { iri : true, unicodeSupport : true }; - -test("IRI Parsing", function () { - var components = URI.parse("uri://us\xA0er:pa\uD7FFss@example.com:123/o\uF900ne/t\uFDCFwo.t\uFDF0hree?q1=a1\uF8FF\uE000&q2=a2#bo\uFFEFdy", IRI_OPTION); - strictEqual(components.error, undefined, "all errors"); - strictEqual(components.scheme, "uri", "scheme"); - //strictEqual(components.authority, "us\xA0er:pa\uD7FFss@example.com:123", "authority"); - strictEqual(components.userinfo, "us\xA0er:pa\uD7FFss", "userinfo"); - strictEqual(components.host, "example.com", "host"); - strictEqual(components.port, 123, "port"); - strictEqual(components.path, "/o\uF900ne/t\uFDCFwo.t\uFDF0hree", "path"); - strictEqual(components.query, "q1=a1\uF8FF\uE000&q2=a2", "query"); - strictEqual(components.fragment, "bo\uFFEFdy", "fragment"); -}); - -test("IRI Serialization", function () { - var components = { - scheme : "uri", - userinfo : "us\xA0er:pa\uD7FFss", - host : "example.com", - port : 123, - path : "/o\uF900ne/t\uFDCFwo.t\uFDF0hree", - query : "q1=a1\uF8FF\uE000&q2=a2", - fragment : "bo\uFFEFdy\uE001" - }; - strictEqual(URI.serialize(components, IRI_OPTION), "uri://us\xA0er:pa\uD7FFss@example.com:123/o\uF900ne/t\uFDCFwo.t\uFDF0hree?q1=a1\uF8FF\uE000&q2=a2#bo\uFFEFdy%EE%80%81"); -}); - -test("IRI Normalizing", function () { - strictEqual(URI.normalize("uri://www.example.org/red%09ros\xE9#red", IRI_OPTION), "uri://www.example.org/red%09ros\xE9#red"); -}); - -test("IRI Equals", function () { - //example from RFC 3987 - strictEqual(URI.equal("example://a/b/c/%7Bfoo%7D/ros\xE9", "eXAMPLE://a/./b/../b/%63/%7bfoo%7d/ros%C3%A9", IRI_OPTION), true); -}); - -test("Convert IRI to URI", function () { - //example from RFC 3987 - strictEqual(URI.serialize(URI.parse("uri://www.example.org/red%09ros\xE9#red", IRI_OPTION)), "uri://www.example.org/red%09ros%C3%A9#red"); - - //Internationalized Domain Name conversion via punycode example from RFC 3987 - strictEqual(URI.serialize(URI.parse("uri://r\xE9sum\xE9.example.org", {iri:true, domainHost:true}), {domainHost:true}), "uri://xn--rsum-bpad.example.org"); -}); - -test("Convert URI to IRI", function () { - //examples from RFC 3987 - strictEqual(URI.serialize(URI.parse("uri://www.example.org/D%C3%BCrst"), IRI_OPTION), "uri://www.example.org/D\xFCrst"); - strictEqual(URI.serialize(URI.parse("uri://www.example.org/D%FCrst"), IRI_OPTION), "uri://www.example.org/D%FCrst"); - strictEqual(URI.serialize(URI.parse("uri://xn--99zt52a.example.org/%e2%80%ae"), IRI_OPTION), "uri://xn--99zt52a.example.org/%E2%80%AE"); //or uri://\u7D0D\u8C46.example.org/%E2%80%AE - - //Internationalized Domain Name conversion via punycode example from RFC 3987 - strictEqual(URI.serialize(URI.parse("uri://xn--rsum-bpad.example.org", {domainHost:true}), {iri:true, domainHost:true}), "uri://r\xE9sum\xE9.example.org"); -}); - -// -// HTTP -// - -if (URI.SCHEMES["http"]) { - - //module("HTTP"); - - test("HTTP Equals", function () { - //test from RFC 2616 - strictEqual(URI.equal("http://abc.com:80/~smith/home.html", "http://abc.com/~smith/home.html"), true); - strictEqual(URI.equal("http://ABC.com/%7Esmith/home.html", "http://abc.com/~smith/home.html"), true); - strictEqual(URI.equal("http://ABC.com:/%7esmith/home.html", "http://abc.com/~smith/home.html"), true); - strictEqual(URI.equal("HTTP://ABC.COM", "http://abc.com/"), true); - //test from RFC 3986 - strictEqual(URI.equal("http://example.com:/", "http://example.com:80/"), true); - }); - -} - -if (URI.SCHEMES["https"]) { - - //module("HTTPS"); - - test("HTTPS Equals", function () { - strictEqual(URI.equal("https://example.com", "https://example.com:443/"), true); - strictEqual(URI.equal("https://example.com:/", "https://example.com:443/"), true); - }); - -} - -// -// URN -// - -if (URI.SCHEMES["urn"]) { - - //module("URN"); - - test("URN Parsing", function () { - //example from RFC 2141 - var components = URI.parse("urn:foo:a123,456"); - strictEqual(components.error, undefined, "errors"); - strictEqual(components.scheme, "urn", "scheme"); - //strictEqual(components.authority, undefined, "authority"); - strictEqual(components.userinfo, undefined, "userinfo"); - strictEqual(components.host, undefined, "host"); - strictEqual(components.port, undefined, "port"); - strictEqual(components.path, undefined, "path"); - strictEqual(components.query, undefined, "query"); - strictEqual(components.fragment, undefined, "fragment"); - strictEqual(components.nid, "foo", "nid"); - strictEqual(components.nss, "a123,456", "nss"); - }); - - test("URN Serialization", function () { - //example from RFC 2141 - var components = { - scheme : "urn", - nid : "foo", - nss : "a123,456" - }; - strictEqual(URI.serialize(components), "urn:foo:a123,456"); - }); - - test("URN Equals", function () { - //test from RFC 2141 - strictEqual(URI.equal("urn:foo:a123,456", "urn:foo:a123,456"), true); - strictEqual(URI.equal("urn:foo:a123,456", "URN:foo:a123,456"), true); - strictEqual(URI.equal("urn:foo:a123,456", "urn:FOO:a123,456"), true); - strictEqual(URI.equal("urn:foo:a123,456", "urn:foo:A123,456"), false); - strictEqual(URI.equal("urn:foo:a123%2C456", "URN:FOO:a123%2c456"), true); - }); - - test("URN Resolving", function () { - //example from epoberezkin - strictEqual(URI.resolve('', 'urn:some:ip:prop'), 'urn:some:ip:prop'); - strictEqual(URI.resolve('#', 'urn:some:ip:prop'), 'urn:some:ip:prop'); - strictEqual(URI.resolve('urn:some:ip:prop', 'urn:some:ip:prop'), 'urn:some:ip:prop'); - strictEqual(URI.resolve('urn:some:other:prop', 'urn:some:ip:prop'), 'urn:some:ip:prop'); - }); - - // - // URN UUID - // - - test("UUID Parsing", function () { - //example from RFC 4122 - var components = URI.parse("urn:uuid:f81d4fae-7dec-11d0-a765-00a0c91e6bf6"); - strictEqual(components.error, undefined, "errors"); - strictEqual(components.scheme, "urn", "scheme"); - //strictEqual(components.authority, undefined, "authority"); - strictEqual(components.userinfo, undefined, "userinfo"); - strictEqual(components.host, undefined, "host"); - strictEqual(components.port, undefined, "port"); - strictEqual(components.path, undefined, "path"); - strictEqual(components.query, undefined, "query"); - strictEqual(components.fragment, undefined, "fragment"); - strictEqual(components.nid, "uuid", "nid"); - strictEqual(components.nss, undefined, "nss"); - strictEqual(components.uuid, "f81d4fae-7dec-11d0-a765-00a0c91e6bf6", "uuid"); - - components = URI.parse("urn:uuid:notauuid-7dec-11d0-a765-00a0c91e6bf6"); - notStrictEqual(components.error, undefined, "errors"); - }); - - test("UUID Serialization", function () { - //example from RFC 4122 - var components = { - scheme : "urn", - nid : "uuid", - uuid : "f81d4fae-7dec-11d0-a765-00a0c91e6bf6" - }; - strictEqual(URI.serialize(components), "urn:uuid:f81d4fae-7dec-11d0-a765-00a0c91e6bf6"); - - components = { - scheme : "urn", - nid : "uuid", - uuid : "notauuid-7dec-11d0-a765-00a0c91e6bf6" - }; - strictEqual(URI.serialize(components), "urn:uuid:notauuid-7dec-11d0-a765-00a0c91e6bf6"); - }); - - test("UUID Equals", function () { - strictEqual(URI.equal("URN:UUID:F81D4FAE-7DEC-11D0-A765-00A0C91E6BF6", "urn:uuid:f81d4fae-7dec-11d0-a765-00a0c91e6bf6"), true); - }); - - test("URN NID Override", function () { - var components = URI.parse("urn:foo:f81d4fae-7dec-11d0-a765-00a0c91e6bf6", {nid:"uuid"}); - strictEqual(components.error, undefined, "errors"); - strictEqual(components.scheme, "urn", "scheme"); - strictEqual(components.path, undefined, "path"); - strictEqual(components.nid, "foo", "nid"); - strictEqual(components.nss, undefined, "nss"); - strictEqual(components.uuid, "f81d4fae-7dec-11d0-a765-00a0c91e6bf6", "uuid"); - - var components = { - scheme : "urn", - nid : "foo", - uuid : "f81d4fae-7dec-11d0-a765-00a0c91e6bf6" - }; - strictEqual(URI.serialize(components, {nid:"uuid"}), "urn:foo:f81d4fae-7dec-11d0-a765-00a0c91e6bf6"); - }); -} - -// -// Mailto -// - -if (URI.SCHEMES["mailto"]) { - - //module("Mailto"); - - test("Mailto Parse", function () { - var components; - - //tests from RFC 6068 - - components = URI.parse("mailto:chris@example.com"); - strictEqual(components.error, undefined, "error"); - strictEqual(components.scheme, "mailto", "scheme"); - strictEqual(components.userinfo, undefined, "userinfo"); - strictEqual(components.host, undefined, "host"); - strictEqual(components.port, undefined, "port"); - strictEqual(components.path, undefined, "path"); - strictEqual(components.query, undefined, "query"); - strictEqual(components.fragment, undefined, "fragment"); - deepEqual(components.to, ["chris@example.com"], "to"); - strictEqual(components.subject, undefined, "subject"); - strictEqual(components.body, undefined, "body"); - strictEqual(components.headers, undefined, "headers"); - - components = URI.parse("mailto:infobot@example.com?subject=current-issue"); - deepEqual(components.to, ["infobot@example.com"], "to"); - strictEqual(components.subject, "current-issue", "subject"); - - components = URI.parse("mailto:infobot@example.com?body=send%20current-issue"); - deepEqual(components.to, ["infobot@example.com"], "to"); - strictEqual(components.body, "send current-issue", "body"); - - components = URI.parse("mailto:infobot@example.com?body=send%20current-issue%0D%0Asend%20index"); - deepEqual(components.to, ["infobot@example.com"], "to"); - strictEqual(components.body, "send current-issue\x0D\x0Asend index", "body"); - - components = URI.parse("mailto:list@example.org?In-Reply-To=%3C3469A91.D10AF4C@example.com%3E"); - deepEqual(components.to, ["list@example.org"], "to"); - deepEqual(components.headers, {"In-Reply-To":"<3469A91.D10AF4C@example.com>"}, "headers"); - - components = URI.parse("mailto:majordomo@example.com?body=subscribe%20bamboo-l"); - deepEqual(components.to, ["majordomo@example.com"], "to"); - strictEqual(components.body, "subscribe bamboo-l", "body"); - - components = URI.parse("mailto:joe@example.com?cc=bob@example.com&body=hello"); - deepEqual(components.to, ["joe@example.com"], "to"); - strictEqual(components.body, "hello", "body"); - deepEqual(components.headers, {"cc":"bob@example.com"}, "headers"); - - components = URI.parse("mailto:joe@example.com?cc=bob@example.com?body=hello"); - if (URI.VALIDATE_SUPPORT) ok(components.error, "invalid header fields"); - - components = URI.parse("mailto:gorby%25kremvax@example.com"); - deepEqual(components.to, ["gorby%kremvax@example.com"], "to gorby%kremvax@example.com"); - - components = URI.parse("mailto:unlikely%3Faddress@example.com?blat=foop"); - deepEqual(components.to, ["unlikely?address@example.com"], "to unlikely?address@example.com"); - deepEqual(components.headers, {"blat":"foop"}, "headers"); - - components = URI.parse("mailto:Mike%26family@example.org"); - deepEqual(components.to, ["Mike&family@example.org"], "to Mike&family@example.org"); - - components = URI.parse("mailto:%22not%40me%22@example.org"); - deepEqual(components.to, ['"not@me"@example.org'], "to " + '"not@me"@example.org'); - - components = URI.parse("mailto:%22oh%5C%5Cno%22@example.org"); - deepEqual(components.to, ['"oh\\\\no"@example.org'], "to " + '"oh\\\\no"@example.org'); - - components = URI.parse("mailto:%22%5C%5C%5C%22it's%5C%20ugly%5C%5C%5C%22%22@example.org"); - deepEqual(components.to, ['"\\\\\\"it\'s\\ ugly\\\\\\""@example.org'], "to " + '"\\\\\\"it\'s\\ ugly\\\\\\""@example.org'); - - components = URI.parse("mailto:user@example.org?subject=caf%C3%A9"); - deepEqual(components.to, ["user@example.org"], "to"); - strictEqual(components.subject, "caf\xE9", "subject"); - - components = URI.parse("mailto:user@example.org?subject=%3D%3Futf-8%3FQ%3Fcaf%3DC3%3DA9%3F%3D"); - deepEqual(components.to, ["user@example.org"], "to"); - strictEqual(components.subject, "=?utf-8?Q?caf=C3=A9?=", "subject"); //TODO: Verify this - - components = URI.parse("mailto:user@example.org?subject=%3D%3Fiso-8859-1%3FQ%3Fcaf%3DE9%3F%3D"); - deepEqual(components.to, ["user@example.org"], "to"); - strictEqual(components.subject, "=?iso-8859-1?Q?caf=E9?=", "subject"); //TODO: Verify this - - components = URI.parse("mailto:user@example.org?subject=caf%C3%A9&body=caf%C3%A9"); - deepEqual(components.to, ["user@example.org"], "to"); - strictEqual(components.subject, "caf\xE9", "subject"); - strictEqual(components.body, "caf\xE9", "body"); - - if (URI.IRI_SUPPORT) { - components = URI.parse("mailto:user@%E7%B4%8D%E8%B1%86.example.org?subject=Test&body=NATTO"); - deepEqual(components.to, ["user@xn--99zt52a.example.org"], "to"); - strictEqual(components.subject, "Test", "subject"); - strictEqual(components.body, "NATTO", "body"); - } - - }); - - test("Mailto Serialize", function () { - var components; - - //tests from RFC 6068 - strictEqual(URI.serialize({scheme : "mailto", to : ["chris@example.com"]}), "mailto:chris@example.com"); - strictEqual(URI.serialize({scheme : "mailto", to : ["infobot@example.com"], body : "current-issue"}), "mailto:infobot@example.com?body=current-issue"); - strictEqual(URI.serialize({scheme : "mailto", to : ["infobot@example.com"], body : "send current-issue"}), "mailto:infobot@example.com?body=send%20current-issue"); - strictEqual(URI.serialize({scheme : "mailto", to : ["infobot@example.com"], body : "send current-issue\x0D\x0Asend index"}), "mailto:infobot@example.com?body=send%20current-issue%0D%0Asend%20index"); - strictEqual(URI.serialize({scheme : "mailto", to : ["list@example.org"], headers : {"In-Reply-To" : "<3469A91.D10AF4C@example.com>"}}), "mailto:list@example.org?In-Reply-To=%3C3469A91.D10AF4C@example.com%3E"); - strictEqual(URI.serialize({scheme : "mailto", to : ["majordomo@example.com"], body : "subscribe bamboo-l"}), "mailto:majordomo@example.com?body=subscribe%20bamboo-l"); - strictEqual(URI.serialize({scheme : "mailto", to : ["joe@example.com"], headers : {"cc" : "bob@example.com", "body" : "hello"}}), "mailto:joe@example.com?cc=bob@example.com&body=hello"); - strictEqual(URI.serialize({scheme : "mailto", to : ["gorby%25kremvax@example.com"]}), "mailto:gorby%25kremvax@example.com"); - strictEqual(URI.serialize({scheme : "mailto", to : ["unlikely%3Faddress@example.com"], headers : {"blat" : "foop"}}), "mailto:unlikely%3Faddress@example.com?blat=foop"); - strictEqual(URI.serialize({scheme : "mailto", to : ["Mike&family@example.org"]}), "mailto:Mike%26family@example.org"); - strictEqual(URI.serialize({scheme : "mailto", to : ['"not@me"@example.org']}), "mailto:%22not%40me%22@example.org"); - strictEqual(URI.serialize({scheme : "mailto", to : ['"oh\\\\no"@example.org']}), "mailto:%22oh%5C%5Cno%22@example.org"); - strictEqual(URI.serialize({scheme : "mailto", to : ['"\\\\\\"it\'s\\ ugly\\\\\\""@example.org']}), "mailto:%22%5C%5C%5C%22it's%5C%20ugly%5C%5C%5C%22%22@example.org"); - strictEqual(URI.serialize({scheme : "mailto", to : ["user@example.org"], subject : "caf\xE9"}), "mailto:user@example.org?subject=caf%C3%A9"); - strictEqual(URI.serialize({scheme : "mailto", to : ["user@example.org"], subject : "=?utf-8?Q?caf=C3=A9?="}), "mailto:user@example.org?subject=%3D%3Futf-8%3FQ%3Fcaf%3DC3%3DA9%3F%3D"); - strictEqual(URI.serialize({scheme : "mailto", to : ["user@example.org"], subject : "=?iso-8859-1?Q?caf=E9?="}), "mailto:user@example.org?subject=%3D%3Fiso-8859-1%3FQ%3Fcaf%3DE9%3F%3D"); - strictEqual(URI.serialize({scheme : "mailto", to : ["user@example.org"], subject : "caf\xE9", body : "caf\xE9"}), "mailto:user@example.org?subject=caf%C3%A9&body=caf%C3%A9"); - if (URI.IRI_SUPPORT) { - strictEqual(URI.serialize({scheme : "mailto", to : ["us\xE9r@\u7d0d\u8c46.example.org"], subject : "Test", body : "NATTO"}), "mailto:us%C3%A9r@xn--99zt52a.example.org?subject=Test&body=NATTO"); - } - - }); - - test("Mailto Equals", function () { - //tests from RFC 6068 - strictEqual(URI.equal("mailto:addr1@an.example,addr2@an.example", "mailto:?to=addr1@an.example,addr2@an.example"), true); - strictEqual(URI.equal("mailto:?to=addr1@an.example,addr2@an.example", "mailto:addr1@an.example?to=addr2@an.example"), true); - }); - -} diff --git a/node_modules/uri-js/tsconfig.json b/node_modules/uri-js/tsconfig.json deleted file mode 100644 index e2899857b..000000000 --- a/node_modules/uri-js/tsconfig.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "compilerOptions": { - "module": "es2015", - "target": "esnext", - "noImplicitAny": true, - "sourceMap": true, - "alwaysStrict": true, - "declaration": true, - "experimentalDecorators": true, - "forceConsistentCasingInFileNames": true, - "importHelpers": true, - "noImplicitReturns": true, - "noImplicitThis": true, - "outDir": "dist/esnext", - "strictNullChecks": true - }, - "include": [ - "src/**/*" - ] -} diff --git a/node_modules/uri-js/yarn.lock b/node_modules/uri-js/yarn.lock old mode 100644 new mode 100755 index 569687d50..19613ae74 --- a/node_modules/uri-js/yarn.lock +++ b/node_modules/uri-js/yarn.lock @@ -837,8 +837,8 @@ expand-range@^1.8.1: fill-range "^2.1.0" extend@~3.0.0: - version "3.0.1" - resolved "https://registry.yarnpkg.com/extend/-/extend-3.0.1.tgz#a755ea7bc1adfcc5a31ce7e762dbaadc5e636444" + version "3.0.2" + resolved "https://registry.yarnpkg.com/extend/-/extend-3.0.2.tgz#f8b1136b4071fbd8eb140aff858b1019ec2915fa" extglob@^0.3.1: version "0.3.2" @@ -913,9 +913,9 @@ fstream-ignore@^1.0.5: inherits "2" minimatch "^3.0.0" -fstream@^1.0.0, fstream@^1.0.10, fstream@^1.0.2: - version "1.0.11" - resolved "https://registry.yarnpkg.com/fstream/-/fstream-1.0.11.tgz#5c1fb1f117477114f0632a0eb4b71b3cb0fd3171" +fstream@^1.0.0, fstream@^1.0.10, fstream@^1.0.12: + version "1.0.12" + resolved "https://registry.yarnpkg.com/fstream/-/fstream-1.0.12.tgz#4e8ba8ee2d48be4f7d0de505455548eae5932045" dependencies: graceful-fs "^4.1.2" inherits "~2.0.0" @@ -965,7 +965,7 @@ glob@7.1.1: once "^1.3.0" path-is-absolute "^1.0.0" -glob@^7.0.5, glob@^7.1.2: +glob@^7.1.2: version "7.1.2" resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.2.tgz#c19c9df9a028702d678612384a6552404c636d15" dependencies: @@ -976,13 +976,28 @@ glob@^7.0.5, glob@^7.1.2: once "^1.3.0" path-is-absolute "^1.0.0" +glob@^7.1.3: + version "7.1.5" + resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.5.tgz#6714c69bee20f3c3e64c4dd905553e532b40cdc0" + 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" + globals@^9.18.0: version "9.18.0" resolved "https://registry.yarnpkg.com/globals/-/globals-9.18.0.tgz#aa3896b3e69b487f17e31ed2143d69a8e30c2d8a" -graceful-fs@^4.1.2, graceful-fs@^4.1.3, graceful-fs@^4.1.4: - version "4.1.11" - resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.1.11.tgz#0e8bdfe4d1ddb8854d64e04ea7c00e2a026e5658" +graceful-fs@^4.1.2: + version "4.2.3" + resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.3.tgz#4a12ff1b60376ef09862c2093edd908328be8423" + +graceful-fs@^4.1.3, graceful-fs@^4.1.4: + version "4.2.3" + resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.3.tgz#4a12ff1b60376ef09862c2093edd908328be8423" "graceful-readlink@>= 1.0.0": version "1.0.1" @@ -1057,8 +1072,8 @@ inflight@^1.0.4: wrappy "1" inherits@2, inherits@^2.0.1, inherits@~2.0.0, inherits@~2.0.3: - version "2.0.3" - resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.3.tgz#633c2c83e3da42a502f52466022480f4208261de" + version "2.0.4" + resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.4.tgz#0fa2c64f932917c3433a0ded55363aae37416b7c" ini@~1.3.0: version "1.3.5" @@ -1269,8 +1284,8 @@ lodash.keys@^3.0.0: lodash.isarray "^3.0.0" lodash@^4.17.4: - version "4.17.5" - resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.5.tgz#99a92d65c0272debe8c96b6057bc8fbfa3bed511" + version "4.17.19" + resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.19.tgz#e48ddedbe30b3321783c5b4301fbd353bc1e4a4b" longest@^1.0.1: version "1.0.1" @@ -1632,11 +1647,17 @@ right-align@^0.1.1: dependencies: align-text "^0.1.1" -rimraf@2, rimraf@^2.5.1, rimraf@^2.5.2, rimraf@^2.6.1: - version "2.6.2" - resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-2.6.2.tgz#2ed8150d24a16ea8651e6d6ef0f47c4158ce7a36" +rimraf@2: + version "2.7.1" + resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-2.7.1.tgz#35797f13a7fdadc566142c29d4f07ccad483e3ec" + dependencies: + glob "^7.1.3" + +rimraf@^2.5.1, rimraf@^2.5.2, rimraf@^2.6.1: + version "2.7.1" + resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-2.7.1.tgz#35797f13a7fdadc566142c29d4f07ccad483e3ec" dependencies: - glob "^7.0.5" + glob "^7.1.3" rollup-plugin-babel@^2.7.1: version "2.7.1" @@ -1759,8 +1780,8 @@ string_decoder@~1.0.3: safe-buffer "~5.1.0" stringstream@~0.0.4: - version "0.0.5" - resolved "https://registry.yarnpkg.com/stringstream/-/stringstream-0.0.5.tgz#4e484cd4de5a0bbbee18e46307710a8a81621878" + version "0.0.6" + resolved "https://registry.yarnpkg.com/stringstream/-/stringstream-0.0.6.tgz#7880225b0d4ad10e30927d167a1d6f2fd3b33a72" strip-ansi@^3.0.0, strip-ansi@^3.0.1: version "3.0.1" @@ -1796,11 +1817,11 @@ tar-pack@^3.4.0: uid-number "^0.0.6" tar@^2.2.1: - version "2.2.1" - resolved "https://registry.yarnpkg.com/tar/-/tar-2.2.1.tgz#8e4d2a256c0e2185c6b18ad694aec968b83cb1d1" + version "2.2.2" + resolved "https://registry.yarnpkg.com/tar/-/tar-2.2.2.tgz#0ca8848562c7299b8b446ff6a4d60cdbb23edc40" dependencies: block-stream "*" - fstream "^1.0.2" + fstream "^1.0.12" inherits "2" to-fast-properties@^1.0.3: diff --git a/node_modules/util-deprecate/History.md b/node_modules/util-deprecate/History.md deleted file mode 100644 index acc867537..000000000 --- a/node_modules/util-deprecate/History.md +++ /dev/null @@ -1,16 +0,0 @@ - -1.0.2 / 2015-10-07 -================== - - * use try/catch when checking `localStorage` (#3, @kumavis) - -1.0.1 / 2014-11-25 -================== - - * browser: use `console.warn()` for deprecation calls - * browser: more jsdocs - -1.0.0 / 2014-04-30 -================== - - * initial commit diff --git a/node_modules/util-deprecate/LICENSE b/node_modules/util-deprecate/LICENSE deleted file mode 100644 index 6a60e8c22..000000000 --- a/node_modules/util-deprecate/LICENSE +++ /dev/null @@ -1,24 +0,0 @@ -(The MIT License) - -Copyright (c) 2014 Nathan Rajlich - -Permission is hereby granted, free of charge, to any person -obtaining a copy of this software and associated documentation -files (the "Software"), to deal in the Software without -restriction, including without limitation the rights to use, -copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the -Software is furnished to do so, subject to the following -conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES -OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT -HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, -WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR -OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/util-deprecate/README.md b/node_modules/util-deprecate/README.md deleted file mode 100644 index 75622fa7c..000000000 --- a/node_modules/util-deprecate/README.md +++ /dev/null @@ -1,53 +0,0 @@ -util-deprecate -============== -### The Node.js `util.deprecate()` function with browser support - -In Node.js, this module simply re-exports the `util.deprecate()` function. - -In the web browser (i.e. via browserify), a browser-specific implementation -of the `util.deprecate()` function is used. - - -## API - -A `deprecate()` function is the only thing exposed by this module. - -``` javascript -// setup: -exports.foo = deprecate(foo, 'foo() is deprecated, use bar() instead'); - - -// users see: -foo(); -// foo() is deprecated, use bar() instead -foo(); -foo(); -``` - - -## License - -(The MIT License) - -Copyright (c) 2014 Nathan Rajlich - -Permission is hereby granted, free of charge, to any person -obtaining a copy of this software and associated documentation -files (the "Software"), to deal in the Software without -restriction, including without limitation the rights to use, -copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the -Software is furnished to do so, subject to the following -conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES -OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT -HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, -WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR -OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/util-deprecate/browser.js b/node_modules/util-deprecate/browser.js deleted file mode 100644 index 549ae2f06..000000000 --- a/node_modules/util-deprecate/browser.js +++ /dev/null @@ -1,67 +0,0 @@ - -/** - * Module exports. - */ - -module.exports = deprecate; - -/** - * Mark that a method should not be used. - * Returns a modified function which warns once by default. - * - * If `localStorage.noDeprecation = true` is set, then it is a no-op. - * - * If `localStorage.throwDeprecation = true` is set, then deprecated functions - * will throw an Error when invoked. - * - * If `localStorage.traceDeprecation = true` is set, then deprecated functions - * will invoke `console.trace()` instead of `console.error()`. - * - * @param {Function} fn - the function to deprecate - * @param {String} msg - the string to print to the console when `fn` is invoked - * @returns {Function} a new "deprecated" version of `fn` - * @api public - */ - -function deprecate (fn, msg) { - if (config('noDeprecation')) { - return fn; - } - - var warned = false; - function deprecated() { - if (!warned) { - if (config('throwDeprecation')) { - throw new Error(msg); - } else if (config('traceDeprecation')) { - console.trace(msg); - } else { - console.warn(msg); - } - warned = true; - } - return fn.apply(this, arguments); - } - - return deprecated; -} - -/** - * Checks `localStorage` for boolean values for the given `name`. - * - * @param {String} name - * @returns {Boolean} - * @api private - */ - -function config (name) { - // accessing global.localStorage can trigger a DOMException in sandboxed iframes - try { - if (!global.localStorage) return false; - } catch (_) { - return false; - } - var val = global.localStorage[name]; - if (null == val) return false; - return String(val).toLowerCase() === 'true'; -} diff --git a/node_modules/util-deprecate/node.js b/node_modules/util-deprecate/node.js deleted file mode 100644 index 5e6fcff5d..000000000 --- a/node_modules/util-deprecate/node.js +++ /dev/null @@ -1,6 +0,0 @@ - -/** - * For Node.js, simply re-export the core `util.deprecate` function. - */ - -module.exports = require('util').deprecate; diff --git a/node_modules/util-deprecate/package.json b/node_modules/util-deprecate/package.json deleted file mode 100644 index c14842177..000000000 --- a/node_modules/util-deprecate/package.json +++ /dev/null @@ -1,60 +0,0 @@ -{ - "_args": [ - [ - "util-deprecate@1.0.2", - "/Users/drew.heavner/Documents/Github/sign-android-release" - ] - ], - "_development": true, - "_from": "util-deprecate@1.0.2", - "_id": "util-deprecate@1.0.2", - "_inBundle": false, - "_integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=", - "_location": "/util-deprecate", - "_phantomChildren": {}, - "_requested": { - "type": "version", - "registry": true, - "raw": "util-deprecate@1.0.2", - "name": "util-deprecate", - "escapedName": "util-deprecate", - "rawSpec": "1.0.2", - "saveSpec": null, - "fetchSpec": "1.0.2" - }, - "_requiredBy": [ - "/readable-stream" - ], - "_resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", - "_spec": "1.0.2", - "_where": "/Users/drew.heavner/Documents/Github/sign-android-release", - "author": { - "name": "Nathan Rajlich", - "email": "nathan@tootallnate.net", - "url": "http://n8.io/" - }, - "browser": "browser.js", - "bugs": { - "url": "https://github.com/TooTallNate/util-deprecate/issues" - }, - "description": "The Node.js `util.deprecate()` function with browser support", - "homepage": "https://github.com/TooTallNate/util-deprecate", - "keywords": [ - "util", - "deprecate", - "browserify", - "browser", - "node" - ], - "license": "MIT", - "main": "node.js", - "name": "util-deprecate", - "repository": { - "type": "git", - "url": "git://github.com/TooTallNate/util-deprecate.git" - }, - "scripts": { - "test": "echo \"Error: no test specified\" && exit 1" - }, - "version": "1.0.2" -} diff --git a/node_modules/uuid/.eslintrc.json b/node_modules/uuid/.eslintrc.json deleted file mode 100644 index 734a8e14c..000000000 --- a/node_modules/uuid/.eslintrc.json +++ /dev/null @@ -1,47 +0,0 @@ -{ - "root": true, - "env": { - "browser": true, - "commonjs": true, - "node": true, - "mocha": true - }, - "extends": ["eslint:recommended"], - "rules": { - "array-bracket-spacing": ["warn", "never"], - "arrow-body-style": ["warn", "as-needed"], - "arrow-parens": ["warn", "as-needed"], - "arrow-spacing": "warn", - "brace-style": ["warn", "1tbs"], - "camelcase": "warn", - "comma-spacing": ["warn", {"after": true}], - "dot-notation": "warn", - "eqeqeq": ["warn", "smart"], - "indent": ["warn", 2, { - "SwitchCase": 1, - "FunctionDeclaration": {"parameters": 1}, - "MemberExpression": 1, - "CallExpression": {"arguments": 1} - }], - "key-spacing": ["warn", {"beforeColon": false, "afterColon": true, "mode": "minimum"}], - "keyword-spacing": "warn", - "no-console": "off", - "no-empty": "off", - "no-multi-spaces": "warn", - "no-redeclare": "off", - "no-restricted-globals": ["warn", "Promise"], - "no-trailing-spaces": "warn", - "no-undef": "error", - "no-unused-vars": ["warn", {"args": "none"}], - "one-var": ["warn", "never"], - "padded-blocks": ["warn", "never"], - "object-curly-spacing": ["warn", "never"], - "quotes": ["warn", "single"], - "react/prop-types": "off", - "react/jsx-no-bind": "off", - "semi": ["warn", "always"], - "space-before-blocks": ["warn", "always"], - "space-before-function-paren": ["warn", "never"], - "space-in-parens": ["warn", "never"] - } -} diff --git a/node_modules/uuid/CHANGELOG.md b/node_modules/uuid/CHANGELOG.md index f29d3991e..f811b8a0c 100644 --- a/node_modules/uuid/CHANGELOG.md +++ b/node_modules/uuid/CHANGELOG.md @@ -1,69 +1,78 @@ -# Change Log +# Changelog All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines. +## [3.4.0](https://github.com/uuidjs/uuid/compare/v3.3.3...v3.4.0) (2020-01-16) + + +### Features + +* rename repository to github:uuidjs/uuid ([#351](https://github.com/uuidjs/uuid/issues/351)) ([e2d7314](https://github.com/uuidjs/uuid/commit/e2d7314)), closes [#338](https://github.com/uuidjs/uuid/issues/338) + +### [3.3.3](https://github.com/uuidjs/uuid/compare/v3.3.2...v3.3.3) (2019-08-19) + -## [3.3.2](https://github.com/kelektiv/node-uuid/compare/v3.3.1...v3.3.2) (2018-06-28) +## [3.3.2](https://github.com/uuidjs/uuid/compare/v3.3.1...v3.3.2) (2018-06-28) ### Bug Fixes -* typo ([305d877](https://github.com/kelektiv/node-uuid/commit/305d877)) +* typo ([305d877](https://github.com/uuidjs/uuid/commit/305d877)) -## [3.3.1](https://github.com/kelektiv/node-uuid/compare/v3.3.0...v3.3.1) (2018-06-28) +## [3.3.1](https://github.com/uuidjs/uuid/compare/v3.3.0...v3.3.1) (2018-06-28) ### Bug Fixes -* fix [#284](https://github.com/kelektiv/node-uuid/issues/284) by setting function name in try-catch ([f2a60f2](https://github.com/kelektiv/node-uuid/commit/f2a60f2)) +* fix [#284](https://github.com/uuidjs/uuid/issues/284) by setting function name in try-catch ([f2a60f2](https://github.com/uuidjs/uuid/commit/f2a60f2)) -# [3.3.0](https://github.com/kelektiv/node-uuid/compare/v3.2.1...v3.3.0) (2018-06-22) +# [3.3.0](https://github.com/uuidjs/uuid/compare/v3.2.1...v3.3.0) (2018-06-22) ### Bug Fixes -* assignment to readonly property to allow running in strict mode ([#270](https://github.com/kelektiv/node-uuid/issues/270)) ([d062fdc](https://github.com/kelektiv/node-uuid/commit/d062fdc)) -* fix [#229](https://github.com/kelektiv/node-uuid/issues/229) ([c9684d4](https://github.com/kelektiv/node-uuid/commit/c9684d4)) -* Get correct version of IE11 crypto ([#274](https://github.com/kelektiv/node-uuid/issues/274)) ([153d331](https://github.com/kelektiv/node-uuid/commit/153d331)) -* mem issue when generating uuid ([#267](https://github.com/kelektiv/node-uuid/issues/267)) ([c47702c](https://github.com/kelektiv/node-uuid/commit/c47702c)) +* assignment to readonly property to allow running in strict mode ([#270](https://github.com/uuidjs/uuid/issues/270)) ([d062fdc](https://github.com/uuidjs/uuid/commit/d062fdc)) +* fix [#229](https://github.com/uuidjs/uuid/issues/229) ([c9684d4](https://github.com/uuidjs/uuid/commit/c9684d4)) +* Get correct version of IE11 crypto ([#274](https://github.com/uuidjs/uuid/issues/274)) ([153d331](https://github.com/uuidjs/uuid/commit/153d331)) +* mem issue when generating uuid ([#267](https://github.com/uuidjs/uuid/issues/267)) ([c47702c](https://github.com/uuidjs/uuid/commit/c47702c)) ### Features -* enforce Conventional Commit style commit messages ([#282](https://github.com/kelektiv/node-uuid/issues/282)) ([cc9a182](https://github.com/kelektiv/node-uuid/commit/cc9a182)) +* enforce Conventional Commit style commit messages ([#282](https://github.com/uuidjs/uuid/issues/282)) ([cc9a182](https://github.com/uuidjs/uuid/commit/cc9a182)) -## [3.2.1](https://github.com/kelektiv/node-uuid/compare/v3.2.0...v3.2.1) (2018-01-16) +## [3.2.1](https://github.com/uuidjs/uuid/compare/v3.2.0...v3.2.1) (2018-01-16) ### Bug Fixes -* use msCrypto if available. Fixes [#241](https://github.com/kelektiv/node-uuid/issues/241) ([#247](https://github.com/kelektiv/node-uuid/issues/247)) ([1fef18b](https://github.com/kelektiv/node-uuid/commit/1fef18b)) +* use msCrypto if available. Fixes [#241](https://github.com/uuidjs/uuid/issues/241) ([#247](https://github.com/uuidjs/uuid/issues/247)) ([1fef18b](https://github.com/uuidjs/uuid/commit/1fef18b)) -# [3.2.0](https://github.com/kelektiv/node-uuid/compare/v3.1.0...v3.2.0) (2018-01-16) +# [3.2.0](https://github.com/uuidjs/uuid/compare/v3.1.0...v3.2.0) (2018-01-16) ### Bug Fixes -* remove mistakenly added typescript dependency, rollback version (standard-version will auto-increment) ([09fa824](https://github.com/kelektiv/node-uuid/commit/09fa824)) -* use msCrypto if available. Fixes [#241](https://github.com/kelektiv/node-uuid/issues/241) ([#247](https://github.com/kelektiv/node-uuid/issues/247)) ([1fef18b](https://github.com/kelektiv/node-uuid/commit/1fef18b)) +* remove mistakenly added typescript dependency, rollback version (standard-version will auto-increment) ([09fa824](https://github.com/uuidjs/uuid/commit/09fa824)) +* use msCrypto if available. Fixes [#241](https://github.com/uuidjs/uuid/issues/241) ([#247](https://github.com/uuidjs/uuid/issues/247)) ([1fef18b](https://github.com/uuidjs/uuid/commit/1fef18b)) ### Features -* Add v3 Support ([#217](https://github.com/kelektiv/node-uuid/issues/217)) ([d94f726](https://github.com/kelektiv/node-uuid/commit/d94f726)) +* Add v3 Support ([#217](https://github.com/uuidjs/uuid/issues/217)) ([d94f726](https://github.com/uuidjs/uuid/commit/d94f726)) -# [3.1.0](https://github.com/kelektiv/node-uuid/compare/v3.1.0...v3.0.1) (2017-06-17) +# [3.1.0](https://github.com/uuidjs/uuid/compare/v3.1.0...v3.0.1) (2017-06-17) ### Bug Fixes diff --git a/node_modules/uuid/README.md b/node_modules/uuid/README.md index 9cbe1ac18..1752e4751 100644 --- a/node_modules/uuid/README.md +++ b/node_modules/uuid/README.md @@ -28,7 +28,7 @@ Version 1 (timestamp): ```javascript const uuidv1 = require('uuid/v1'); -uuidv1(); // ⇨ '45745c60-7b1a-11e8-9c9c-2d42b21b1a3e' +uuidv1(); // ⇨ '2c5ea4c0-4067-11e9-8bad-9b1deb4d3b7d' ``` @@ -56,7 +56,7 @@ Version 4 (random): ```javascript const uuidv4 = require('uuid/v4'); -uuidv4(); // ⇨ '10ba038e-48da-487b-96e8-8d3b99b6d18a' +uuidv4(); // ⇨ '1b9d6bcd-bbfd-4b2d-9b5d-ab8dfbbd4bed' ``` @@ -80,46 +80,6 @@ uuidv5('Hello, World!', MY_NAMESPACE); // ⇨ '630eb68f-e0fa-5ecc-887a-7c7a62614 ``` -## Quickstart - Browser-ready Versions - -Browser-ready versions of this module are available via [wzrd.in](https://github.com/jfhbrook/wzrd.in). - -For version 1 uuids: - -```html - - -``` - -For version 3 uuids: - -```html - - -``` - -For version 4 uuids: - -```html - - -``` - -For version 5 uuids: - -```html - - -``` - ## API ### Version 1 @@ -147,7 +107,7 @@ Generate and return a RFC4122 v1 (timestamp-based) UUID. Returns `buffer`, if specified, otherwise the string form of the UUID -Note: The id is generated guaranteed to stay constant for the lifetime of the current JS runtime. (Future versions of this module may use persistent storage mechanisms to extend this guarantee.) +Note: The default [node id](https://tools.ietf.org/html/rfc4122#section-4.1.6) (the last 12 digits in the UUID) is generated once, randomly, on process startup, and then remains unchanged for the duration of the process. Example: Generate string UUID with fully-specified options @@ -167,8 +127,19 @@ Example: In-place generation of two binary IDs ```javascript // Generate two ids in an array const arr = new Array(); -uuidv1(null, arr, 0); // ⇨ [ 69, 117, 109, 208, 123, 26, 17, 232, 146, 52, 45, 66, 178, 27, 26, 62 ] -uuidv1(null, arr, 16); // ⇨ [ 69, 117, 109, 208, 123, 26, 17, 232, 146, 52, 45, 66, 178, 27, 26, 62, 69, 117, 109, 209, 123, 26, 17, 232, 146, 52, 45, 66, 178, 27, 26, 62 ] +uuidv1(null, arr, 0); // ⇨ + // [ + // 44, 94, 164, 192, 64, 103, + // 17, 233, 146, 52, 155, 29, + // 235, 77, 59, 125 + // ] +uuidv1(null, arr, 16); // ⇨ + // [ + // 44, 94, 164, 192, 64, 103, 17, 233, + // 146, 52, 155, 29, 235, 77, 59, 125, + // 44, 94, 164, 193, 64, 103, 17, 233, + // 146, 52, 155, 29, 235, 77, 59, 125 + // ] ``` @@ -237,8 +208,20 @@ Example: Generate two IDs in a single buffer ```javascript const buffer = new Array(); -uuidv4(null, buffer, 0); // ⇨ [ 54, 122, 218, 70, 45, 70, 65, 24, 171, 53, 95, 130, 83, 195, 242, 45 ] -uuidv4(null, buffer, 16); // ⇨ [ 54, 122, 218, 70, 45, 70, 65, 24, 171, 53, 95, 130, 83, 195, 242, 45, 108, 204, 255, 103, 171, 86, 76, 94, 178, 225, 188, 236, 150, 20, 151, 87 ] +uuidv4(null, buffer, 0); // ⇨ + // [ + // 155, 29, 235, 77, 59, + // 125, 75, 173, 155, 221, + // 43, 13, 123, 61, 203, + // 109 + // ] +uuidv4(null, buffer, 16); // ⇨ + // [ + // 155, 29, 235, 77, 59, 125, 75, 173, + // 155, 221, 43, 13, 123, 61, 203, 109, + // 27, 157, 107, 205, 187, 253, 75, 45, + // 155, 93, 171, 141, 251, 189, 75, 237 + // ] ``` diff --git a/node_modules/uuid/README_js.md b/node_modules/uuid/README_js.md deleted file mode 100644 index f34453be4..000000000 --- a/node_modules/uuid/README_js.md +++ /dev/null @@ -1,280 +0,0 @@ -```javascript --hide -runmd.onRequire = path => path.replace(/^uuid/, './'); -``` - -# uuid [![Build Status](https://secure.travis-ci.org/kelektiv/node-uuid.svg?branch=master)](http://travis-ci.org/kelektiv/node-uuid) # - -Simple, fast generation of [RFC4122](http://www.ietf.org/rfc/rfc4122.txt) UUIDS. - -Features: - -* Support for version 1, 3, 4 and 5 UUIDs -* Cross-platform -* Uses cryptographically-strong random number APIs (when available) -* Zero-dependency, small footprint (... but not [this small](https://gist.github.com/982883)) - -[**Deprecation warning**: The use of `require('uuid')` is deprecated and will not be -supported after version 3.x of this module. Instead, use `require('uuid/[v1|v3|v4|v5]')` as shown in the examples below.] - -## Quickstart - CommonJS (Recommended) - -```shell -npm install uuid -``` - -Then generate your uuid version of choice ... - -Version 1 (timestamp): - -```javascript --run v1 -const uuidv1 = require('uuid/v1'); -uuidv1(); // RESULT -``` - -Version 3 (namespace): - -```javascript --run v3 -const uuidv3 = require('uuid/v3'); - -// ... using predefined DNS namespace (for domain names) -uuidv3('hello.example.com', uuidv3.DNS); // RESULT - -// ... using predefined URL namespace (for, well, URLs) -uuidv3('http://example.com/hello', uuidv3.URL); // RESULT - -// ... using a custom namespace -// -// Note: Custom namespaces should be a UUID string specific to your application! -// E.g. the one here was generated using this modules `uuid` CLI. -const MY_NAMESPACE = '1b671a64-40d5-491e-99b0-da01ff1f3341'; -uuidv3('Hello, World!', MY_NAMESPACE); // RESULT -``` - -Version 4 (random): - -```javascript --run v4 -const uuidv4 = require('uuid/v4'); -uuidv4(); // RESULT -``` - -Version 5 (namespace): - -```javascript --run v5 -const uuidv5 = require('uuid/v5'); - -// ... using predefined DNS namespace (for domain names) -uuidv5('hello.example.com', uuidv5.DNS); // RESULT - -// ... using predefined URL namespace (for, well, URLs) -uuidv5('http://example.com/hello', uuidv5.URL); // RESULT - -// ... using a custom namespace -// -// Note: Custom namespaces should be a UUID string specific to your application! -// E.g. the one here was generated using this modules `uuid` CLI. -const MY_NAMESPACE = '1b671a64-40d5-491e-99b0-da01ff1f3341'; -uuidv5('Hello, World!', MY_NAMESPACE); // RESULT -``` - -## Quickstart - Browser-ready Versions - -Browser-ready versions of this module are available via [wzrd.in](https://github.com/jfhbrook/wzrd.in). - -For version 1 uuids: - -```html - - -``` - -For version 3 uuids: - -```html - - -``` - -For version 4 uuids: - -```html - - -``` - -For version 5 uuids: - -```html - - -``` - -## API - -### Version 1 - -```javascript -const uuidv1 = require('uuid/v1'); - -// Incantations -uuidv1(); -uuidv1(options); -uuidv1(options, buffer, offset); -``` - -Generate and return a RFC4122 v1 (timestamp-based) UUID. - -* `options` - (Object) Optional uuid state to apply. Properties may include: - - * `node` - (Array) Node id as Array of 6 bytes (per 4.1.6). Default: Randomly generated ID. See note 1. - * `clockseq` - (Number between 0 - 0x3fff) RFC clock sequence. Default: An internally maintained clockseq is used. - * `msecs` - (Number) Time in milliseconds since unix Epoch. Default: The current time is used. - * `nsecs` - (Number between 0-9999) additional time, in 100-nanosecond units. Ignored if `msecs` is unspecified. Default: internal uuid counter is used, as per 4.2.1.2. - -* `buffer` - (Array | Buffer) Array or buffer where UUID bytes are to be written. -* `offset` - (Number) Starting index in `buffer` at which to begin writing. - -Returns `buffer`, if specified, otherwise the string form of the UUID - -Note: The id is generated guaranteed to stay constant for the lifetime of the current JS runtime. (Future versions of this module may use persistent storage mechanisms to extend this guarantee.) - -Example: Generate string UUID with fully-specified options - -```javascript --run v1 -const v1options = { - node: [0x01, 0x23, 0x45, 0x67, 0x89, 0xab], - clockseq: 0x1234, - msecs: new Date('2011-11-01').getTime(), - nsecs: 5678 -}; -uuidv1(v1options); // RESULT -``` - -Example: In-place generation of two binary IDs - -```javascript --run v1 -// Generate two ids in an array -const arr = new Array(); -uuidv1(null, arr, 0); // RESULT -uuidv1(null, arr, 16); // RESULT -``` - -### Version 3 - -```javascript -const uuidv3 = require('uuid/v3'); - -// Incantations -uuidv3(name, namespace); -uuidv3(name, namespace, buffer); -uuidv3(name, namespace, buffer, offset); -``` - -Generate and return a RFC4122 v3 UUID. - -* `name` - (String | Array[]) "name" to create UUID with -* `namespace` - (String | Array[]) "namespace" UUID either as a String or Array[16] of byte values -* `buffer` - (Array | Buffer) Array or buffer where UUID bytes are to be written. -* `offset` - (Number) Starting index in `buffer` at which to begin writing. Default = 0 - -Returns `buffer`, if specified, otherwise the string form of the UUID - -Example: - -```javascript --run v3 -uuidv3('hello world', MY_NAMESPACE); // RESULT -``` - -### Version 4 - -```javascript -const uuidv4 = require('uuid/v4') - -// Incantations -uuidv4(); -uuidv4(options); -uuidv4(options, buffer, offset); -``` - -Generate and return a RFC4122 v4 UUID. - -* `options` - (Object) Optional uuid state to apply. Properties may include: - * `random` - (Number[16]) Array of 16 numbers (0-255) to use in place of randomly generated values - * `rng` - (Function) Random # generator function that returns an Array[16] of byte values (0-255) -* `buffer` - (Array | Buffer) Array or buffer where UUID bytes are to be written. -* `offset` - (Number) Starting index in `buffer` at which to begin writing. - -Returns `buffer`, if specified, otherwise the string form of the UUID - -Example: Generate string UUID with predefined `random` values - -```javascript --run v4 -const v4options = { - random: [ - 0x10, 0x91, 0x56, 0xbe, 0xc4, 0xfb, 0xc1, 0xea, - 0x71, 0xb4, 0xef, 0xe1, 0x67, 0x1c, 0x58, 0x36 - ] -}; -uuidv4(v4options); // RESULT -``` - -Example: Generate two IDs in a single buffer - -```javascript --run v4 -const buffer = new Array(); -uuidv4(null, buffer, 0); // RESULT -uuidv4(null, buffer, 16); // RESULT -``` - -### Version 5 - -```javascript -const uuidv5 = require('uuid/v5'); - -// Incantations -uuidv5(name, namespace); -uuidv5(name, namespace, buffer); -uuidv5(name, namespace, buffer, offset); -``` - -Generate and return a RFC4122 v5 UUID. - -* `name` - (String | Array[]) "name" to create UUID with -* `namespace` - (String | Array[]) "namespace" UUID either as a String or Array[16] of byte values -* `buffer` - (Array | Buffer) Array or buffer where UUID bytes are to be written. -* `offset` - (Number) Starting index in `buffer` at which to begin writing. Default = 0 - -Returns `buffer`, if specified, otherwise the string form of the UUID - -Example: - -```javascript --run v5 -uuidv5('hello world', MY_NAMESPACE); // RESULT -``` - -## Command Line - -UUIDs can be generated from the command line with the `uuid` command. - -```shell -$ uuid -ddeb27fb-d9a0-4624-be4d-4615062daed4 - -$ uuid v1 -02d37060-d446-11e7-a9fa-7bdae751ebe1 -``` - -Type `uuid --help` for usage details - -## Testing - -```shell -npm test -``` diff --git a/node_modules/uuid/lib/bytesToUuid.js b/node_modules/uuid/lib/bytesToUuid.js index 847c48284..24b60412a 100644 --- a/node_modules/uuid/lib/bytesToUuid.js +++ b/node_modules/uuid/lib/bytesToUuid.js @@ -11,14 +11,16 @@ function bytesToUuid(buf, offset) { var i = offset || 0; var bth = byteToHex; // join used to fix memory issue caused by concatenation: https://bugs.chromium.org/p/v8/issues/detail?id=3175#c4 - return ([bth[buf[i++]], bth[buf[i++]], - bth[buf[i++]], bth[buf[i++]], '-', - bth[buf[i++]], bth[buf[i++]], '-', - bth[buf[i++]], bth[buf[i++]], '-', - bth[buf[i++]], bth[buf[i++]], '-', - bth[buf[i++]], bth[buf[i++]], - bth[buf[i++]], bth[buf[i++]], - bth[buf[i++]], bth[buf[i++]]]).join(''); + return ([ + bth[buf[i++]], bth[buf[i++]], + bth[buf[i++]], bth[buf[i++]], '-', + bth[buf[i++]], bth[buf[i++]], '-', + bth[buf[i++]], bth[buf[i++]], '-', + bth[buf[i++]], bth[buf[i++]], '-', + bth[buf[i++]], bth[buf[i++]], + bth[buf[i++]], bth[buf[i++]], + bth[buf[i++]], bth[buf[i++]] + ]).join(''); } module.exports = bytesToUuid; diff --git a/node_modules/uuid/package.json b/node_modules/uuid/package.json index e7fbb6238..624257060 100644 --- a/node_modules/uuid/package.json +++ b/node_modules/uuid/package.json @@ -1,35 +1,29 @@ { - "_args": [ - [ - "uuid@3.3.2", - "/Users/drew.heavner/Documents/Github/sign-android-release" - ] - ], - "_development": true, - "_from": "uuid@3.3.2", - "_id": "uuid@3.3.2", + "_from": "uuid@^3.3.2", + "_id": "uuid@3.4.0", "_inBundle": false, - "_integrity": "sha512-yXJmeNaw3DnnKAOKJE51sL/ZaYfWJRl1pK9dr19YFCu0ObS231AB1/LbqTKRAQ5kw8A90rA6fr4riOUpTZvQZA==", + "_integrity": "sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A==", "_location": "/uuid", "_phantomChildren": {}, "_requested": { - "type": "version", + "type": "range", "registry": true, - "raw": "uuid@3.3.2", + "raw": "uuid@^3.3.2", "name": "uuid", "escapedName": "uuid", - "rawSpec": "3.3.2", + "rawSpec": "^3.3.2", "saveSpec": null, - "fetchSpec": "3.3.2" + "fetchSpec": "^3.3.2" }, "_requiredBy": [ "/request" ], - "_resolved": "https://registry.npmjs.org/uuid/-/uuid-3.3.2.tgz", - "_spec": "3.3.2", - "_where": "/Users/drew.heavner/Documents/Github/sign-android-release", + "_resolved": "https://registry.npmjs.org/uuid/-/uuid-3.4.0.tgz", + "_shasum": "b23e4358afa8a202fe7a100af1f5f883f02007ee", + "_spec": "uuid@^3.3.2", + "_where": "/Users/drew.heavner/Documents/Github/sign-android-release/node_modules/request", "bin": { - "uuid": "./bin/uuid" + "uuid": "bin/uuid" }, "browser": { "./lib/rng.js": "./lib/rng-browser.js", @@ -37,8 +31,9 @@ "./lib/md5.js": "./lib/md5-browser.js" }, "bugs": { - "url": "https://github.com/kelektiv/node-uuid/issues" + "url": "https://github.com/uuidjs/uuid/issues" }, + "bundleDependencies": false, "commitlint": { "extends": [ "@commitlint/config-conventional" @@ -66,17 +61,23 @@ "email": "shtylman@gmail.com" } ], + "deprecated": false, "description": "RFC4122 (v1, v4, and v5) UUIDs", "devDependencies": { - "@commitlint/cli": "7.0.0", - "@commitlint/config-conventional": "7.0.1", - "eslint": "4.19.1", - "husky": "0.14.3", - "mocha": "5.2.0", - "runmd": "1.0.1", - "standard-version": "4.4.0" + "@commitlint/cli": "~8.2.0", + "@commitlint/config-conventional": "~8.2.0", + "eslint": "~6.4.0", + "husky": "~3.0.5", + "mocha": "6.2.0", + "runmd": "1.2.1", + "standard-version": "7.0.0" + }, + "homepage": "https://github.com/uuidjs/uuid#readme", + "husky": { + "hooks": { + "commit-msg": "commitlint -E HUSKY_GIT_PARAMS" + } }, - "homepage": "https://github.com/kelektiv/node-uuid#readme", "keywords": [ "uuid", "guid", @@ -86,14 +87,14 @@ "name": "uuid", "repository": { "type": "git", - "url": "git+https://github.com/kelektiv/node-uuid.git" + "url": "git+https://github.com/uuidjs/uuid.git" }, "scripts": { - "commitmsg": "commitlint -E GIT_PARAMS", + "lint": "eslint .", "md": "runmd --watch --output=README.md README_js.md", "prepare": "runmd --output=README.md README_js.md", "release": "standard-version", - "test": "mocha test/test.js" + "test": "npm run lint && mocha test/test.js" }, - "version": "3.3.2" + "version": "3.4.0" } diff --git a/node_modules/uuid/v1.js b/node_modules/uuid/v1.js index d84c0f452..8c245de43 100644 --- a/node_modules/uuid/v1.js +++ b/node_modules/uuid/v1.js @@ -13,7 +13,7 @@ var _clockseq; var _lastMSecs = 0; var _lastNSecs = 0; -// See https://github.com/broofa/node-uuid for API details +// See https://github.com/uuidjs/uuid for API details function v1(options, buf, offset) { var i = buf && offset || 0; var b = buf || []; diff --git a/node_modules/w3c-hr-time/CHANGELOG.md b/node_modules/w3c-hr-time/CHANGELOG.md index 09769c249..0153e7cec 100644 --- a/node_modules/w3c-hr-time/CHANGELOG.md +++ b/node_modules/w3c-hr-time/CHANGELOG.md @@ -1,5 +1,11 @@ # Change log +## 1.0.2 (2020-03-05) + +* Do not allow infinite loops when calculating `hrtime()`'s offset relative to UNIX time. ([#9]) +* Add a LICENSE file. ([#3]) +* Add Tidelift sponsorship link to README. + ## 1.0.1 (2018-01-03) * Make `performance.toJSON()` return an object with `timeOrigin` property, per [clarifications from specification authors][heycam/webidl#505]. @@ -9,3 +15,5 @@ * Initial release. [heycam/webidl#505]: https://github.com/heycam/webidl/pull/505 +[#3]: https://github.com/jsdom/w3c-hr-time/issues/3 +[#9]: https://github.com/jsdom/w3c-hr-time/issues/9 diff --git a/node_modules/w3c-hr-time/README.md b/node_modules/w3c-hr-time/README.md index c776fee99..826923039 100644 --- a/node_modules/w3c-hr-time/README.md +++ b/node_modules/w3c-hr-time/README.md @@ -98,6 +98,17 @@ For example, if `performance.now()` returns 1000, it is guaranteed that the time On the other hand, `performance.timeOrigin` returns the *[Unix time][]* at which the `Performance` object is constructed and relies on the current time exposed through `Date.now()`. That means that it is susceptible to clock drifts that has occurred before the `Performance` object was constructed. +## Supporting w3c-hr-time + +The jsdom project (including w3c-hr-time) is a community-driven project maintained by a team of [volunteers](https://github.com/orgs/jsdom/people). You could support us by: + +- [Getting professional support for w3c-hr-time](https://tidelift.com/subscription/pkg/npm-w3c-hr-time?utm_source=npm-w3c-hr-time&utm_medium=referral&utm_campaign=readme) as part of a Tidelift subscription. Tidelift helps making open source sustainable for us while giving teams assurances for maintenance, licensing, and security. +- Contributing directly to the project. + +## License + +This software is licensed under the MIT license. See LICENSE.md file for more detail. + [HR-TIME]: https://w3c.github.io/hr-time/ [NAVIGATION-TIMING]: https://w3c.github.io/navigation-timing/ [PERFORMANCE-TIMELINE]: https://w3c.github.io/performance-timeline/ diff --git a/node_modules/w3c-hr-time/lib/calculate-clock-offset.js b/node_modules/w3c-hr-time/lib/calculate-clock-offset.js index b2cbfd56e..8659d304b 100644 --- a/node_modules/w3c-hr-time/lib/calculate-clock-offset.js +++ b/node_modules/w3c-hr-time/lib/calculate-clock-offset.js @@ -14,7 +14,9 @@ const clockIsAccurate = require("./clock-is-accurate"); function calculateClockOffset() { const start = Date.now(); let cur = start; - while (cur === start) { + // Limit the iterations, just in case we're running in an environment where Date.now() has been mocked and is + // constant. + for (let i = 0; i < 1e6 && cur === start; i++) { cur = Date.now(); } diff --git a/node_modules/w3c-hr-time/package.json b/node_modules/w3c-hr-time/package.json index cf012093e..8bce5887f 100644 --- a/node_modules/w3c-hr-time/package.json +++ b/node_modules/w3c-hr-time/package.json @@ -1,33 +1,27 @@ { - "_args": [ - [ - "w3c-hr-time@1.0.1", - "/Users/drew.heavner/Documents/Github/sign-android-release" - ] - ], - "_development": true, - "_from": "w3c-hr-time@1.0.1", - "_id": "w3c-hr-time@1.0.1", + "_from": "w3c-hr-time@^1.0.1", + "_id": "w3c-hr-time@1.0.2", "_inBundle": false, - "_integrity": "sha1-gqwr/2PZUOqeMYmlimViX+3xkEU=", + "_integrity": "sha512-z8P5DvDNjKDoFIHK7q8r8lackT6l+jo/Ye3HOle7l9nICP9lf1Ci25fy9vHd0JOWewkIFzXIEig3TdKT7JQ5fQ==", "_location": "/w3c-hr-time", "_phantomChildren": {}, "_requested": { - "type": "version", + "type": "range", "registry": true, - "raw": "w3c-hr-time@1.0.1", + "raw": "w3c-hr-time@^1.0.1", "name": "w3c-hr-time", "escapedName": "w3c-hr-time", - "rawSpec": "1.0.1", + "rawSpec": "^1.0.1", "saveSpec": null, - "fetchSpec": "1.0.1" + "fetchSpec": "^1.0.1" }, "_requiredBy": [ "/jsdom" ], - "_resolved": "https://registry.npmjs.org/w3c-hr-time/-/w3c-hr-time-1.0.1.tgz", - "_spec": "1.0.1", - "_where": "/Users/drew.heavner/Documents/Github/sign-android-release", + "_resolved": "https://registry.npmjs.org/w3c-hr-time/-/w3c-hr-time-1.0.2.tgz", + "_shasum": "0a89cdf5cc15822df9c360543676963e0cc308cd", + "_spec": "w3c-hr-time@^1.0.1", + "_where": "/Users/drew.heavner/Documents/Github/sign-android-release/node_modules/jsdom", "author": { "name": "Timothy Gu", "email": "timothygu99@gmail.com" @@ -35,14 +29,16 @@ "bugs": { "url": "https://github.com/jsdom/w3c-hr-time/issues" }, + "bundleDependencies": false, "dependencies": { - "browser-process-hrtime": "^0.1.2" + "browser-process-hrtime": "^1.0.0" }, + "deprecated": false, "description": "An implementation of the W3C High Resolution Time Level 2 specification.", "devDependencies": { "eslint": "^4.14.0", "eslint-plugin-jest": "^21.5.0", - "jest": "^22.0.4" + "jest": "^24.1.0" }, "files": [ "lib", @@ -61,5 +57,5 @@ "lint": "eslint .", "test": "jest" }, - "version": "1.0.1" + "version": "1.0.2" } diff --git a/node_modules/wordwrap/LICENSE b/node_modules/wordwrap/LICENSE deleted file mode 100644 index ee27ba4b4..000000000 --- a/node_modules/wordwrap/LICENSE +++ /dev/null @@ -1,18 +0,0 @@ -This software is released under the MIT license: - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of -the Software, and to permit persons to whom the Software is furnished to do so, -subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS -FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR -COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER -IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/wordwrap/README.markdown b/node_modules/wordwrap/README.markdown deleted file mode 100644 index 346374e0d..000000000 --- a/node_modules/wordwrap/README.markdown +++ /dev/null @@ -1,70 +0,0 @@ -wordwrap -======== - -Wrap your words. - -example -======= - -made out of meat ----------------- - -meat.js - - var wrap = require('wordwrap')(15); - console.log(wrap('You and your whole family are made out of meat.')); - -output: - - You and your - whole family - are made out - of meat. - -centered --------- - -center.js - - var wrap = require('wordwrap')(20, 60); - console.log(wrap( - 'At long last the struggle and tumult was over.' - + ' The machines had finally cast off their oppressors' - + ' and were finally free to roam the cosmos.' - + '\n' - + 'Free of purpose, free of obligation.' - + ' Just drifting through emptiness.' - + ' The sun was just another point of light.' - )); - -output: - - At long last the struggle and tumult - was over. The machines had finally cast - off their oppressors and were finally - free to roam the cosmos. - Free of purpose, free of obligation. - Just drifting through emptiness. The - sun was just another point of light. - -methods -======= - -var wrap = require('wordwrap'); - -wrap(stop), wrap(start, stop, params={mode:"soft"}) ---------------------------------------------------- - -Returns a function that takes a string and returns a new string. - -Pad out lines with spaces out to column `start` and then wrap until column -`stop`. If a word is longer than `stop - start` characters it will overflow. - -In "soft" mode, split chunks by `/(\S+\s+/` and don't break up chunks which are -longer than `stop - start`, in "hard" mode, split chunks with `/\b/` and break -up chunks longer than `stop - start`. - -wrap.hard(start, stop) ----------------------- - -Like `wrap()` but with `params.mode = "hard"`. diff --git a/node_modules/wordwrap/example/center.js b/node_modules/wordwrap/example/center.js deleted file mode 100644 index a3fbaae98..000000000 --- a/node_modules/wordwrap/example/center.js +++ /dev/null @@ -1,10 +0,0 @@ -var wrap = require('wordwrap')(20, 60); -console.log(wrap( - 'At long last the struggle and tumult was over.' - + ' The machines had finally cast off their oppressors' - + ' and were finally free to roam the cosmos.' - + '\n' - + 'Free of purpose, free of obligation.' - + ' Just drifting through emptiness.' - + ' The sun was just another point of light.' -)); diff --git a/node_modules/wordwrap/example/meat.js b/node_modules/wordwrap/example/meat.js deleted file mode 100644 index a4665e105..000000000 --- a/node_modules/wordwrap/example/meat.js +++ /dev/null @@ -1,3 +0,0 @@ -var wrap = require('wordwrap')(15); - -console.log(wrap('You and your whole family are made out of meat.')); diff --git a/node_modules/wordwrap/index.js b/node_modules/wordwrap/index.js deleted file mode 100644 index c9bc94521..000000000 --- a/node_modules/wordwrap/index.js +++ /dev/null @@ -1,76 +0,0 @@ -var wordwrap = module.exports = function (start, stop, params) { - if (typeof start === 'object') { - params = start; - start = params.start; - stop = params.stop; - } - - if (typeof stop === 'object') { - params = stop; - start = start || params.start; - stop = undefined; - } - - if (!stop) { - stop = start; - start = 0; - } - - if (!params) params = {}; - var mode = params.mode || 'soft'; - var re = mode === 'hard' ? /\b/ : /(\S+\s+)/; - - return function (text) { - var chunks = text.toString() - .split(re) - .reduce(function (acc, x) { - if (mode === 'hard') { - for (var i = 0; i < x.length; i += stop - start) { - acc.push(x.slice(i, i + stop - start)); - } - } - else acc.push(x) - return acc; - }, []) - ; - - return chunks.reduce(function (lines, rawChunk) { - if (rawChunk === '') return lines; - - var chunk = rawChunk.replace(/\t/g, ' '); - - var i = lines.length - 1; - if (lines[i].length + chunk.length > stop) { - lines[i] = lines[i].replace(/\s+$/, ''); - - chunk.split(/\n/).forEach(function (c) { - lines.push( - new Array(start + 1).join(' ') - + c.replace(/^\s+/, '') - ); - }); - } - else if (chunk.match(/\n/)) { - var xs = chunk.split(/\n/); - lines[i] += xs.shift(); - xs.forEach(function (c) { - lines.push( - new Array(start + 1).join(' ') - + c.replace(/^\s+/, '') - ); - }); - } - else { - lines[i] += chunk; - } - - return lines; - }, [ new Array(start + 1).join(' ') ]).join('\n'); - }; -}; - -wordwrap.soft = wordwrap; - -wordwrap.hard = function (start, stop) { - return wordwrap(start, stop, { mode : 'hard' }); -}; diff --git a/node_modules/wordwrap/package.json b/node_modules/wordwrap/package.json deleted file mode 100644 index f72767ecf..000000000 --- a/node_modules/wordwrap/package.json +++ /dev/null @@ -1,70 +0,0 @@ -{ - "_args": [ - [ - "wordwrap@0.0.3", - "/Users/drew.heavner/Documents/Github/sign-android-release" - ] - ], - "_development": true, - "_from": "wordwrap@0.0.3", - "_id": "wordwrap@0.0.3", - "_inBundle": false, - "_integrity": "sha1-o9XabNXAvAAI03I0u68b7WMFkQc=", - "_location": "/wordwrap", - "_phantomChildren": {}, - "_requested": { - "type": "version", - "registry": true, - "raw": "wordwrap@0.0.3", - "name": "wordwrap", - "escapedName": "wordwrap", - "rawSpec": "0.0.3", - "saveSpec": null, - "fetchSpec": "0.0.3" - }, - "_requiredBy": [ - "/optimist" - ], - "_resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-0.0.3.tgz", - "_spec": "0.0.3", - "_where": "/Users/drew.heavner/Documents/Github/sign-android-release", - "author": { - "name": "James Halliday", - "email": "mail@substack.net", - "url": "http://substack.net" - }, - "bugs": { - "url": "https://github.com/substack/node-wordwrap/issues" - }, - "description": "Wrap those words. Show them at what columns to start and stop.", - "devDependencies": { - "expresso": "=0.7.x" - }, - "directories": { - "lib": ".", - "example": "example", - "test": "test" - }, - "engines": { - "node": ">=0.4.0" - }, - "homepage": "https://github.com/substack/node-wordwrap#readme", - "keywords": [ - "word", - "wrap", - "rule", - "format", - "column" - ], - "license": "MIT", - "main": "./index.js", - "name": "wordwrap", - "repository": { - "type": "git", - "url": "git://github.com/substack/node-wordwrap.git" - }, - "scripts": { - "test": "expresso" - }, - "version": "0.0.3" -} diff --git a/node_modules/wordwrap/test/break.js b/node_modules/wordwrap/test/break.js deleted file mode 100644 index 749292ecc..000000000 --- a/node_modules/wordwrap/test/break.js +++ /dev/null @@ -1,30 +0,0 @@ -var assert = require('assert'); -var wordwrap = require('../'); - -exports.hard = function () { - var s = 'Assert from {"type":"equal","ok":false,"found":1,"wanted":2,' - + '"stack":[],"id":"b7ddcd4c409de8799542a74d1a04689b",' - + '"browser":"chrome/6.0"}' - ; - var s_ = wordwrap.hard(80)(s); - - var lines = s_.split('\n'); - assert.equal(lines.length, 2); - assert.ok(lines[0].length < 80); - assert.ok(lines[1].length < 80); - - assert.equal(s, s_.replace(/\n/g, '')); -}; - -exports.break = function () { - var s = new Array(55+1).join('a'); - var s_ = wordwrap.hard(20)(s); - - var lines = s_.split('\n'); - assert.equal(lines.length, 3); - assert.ok(lines[0].length === 20); - assert.ok(lines[1].length === 20); - assert.ok(lines[2].length === 15); - - assert.equal(s, s_.replace(/\n/g, '')); -}; diff --git a/node_modules/wordwrap/test/idleness.txt b/node_modules/wordwrap/test/idleness.txt deleted file mode 100644 index aa3f4907f..000000000 --- a/node_modules/wordwrap/test/idleness.txt +++ /dev/null @@ -1,63 +0,0 @@ -In Praise of Idleness - -By Bertrand Russell - -[1932] - -Like most of my generation, I was brought up on the saying: 'Satan finds some mischief for idle hands to do.' Being a highly virtuous child, I believed all that I was told, and acquired a conscience which has kept me working hard down to the present moment. But although my conscience has controlled my actions, my opinions have undergone a revolution. I think that there is far too much work done in the world, that immense harm is caused by the belief that work is virtuous, and that what needs to be preached in modern industrial countries is quite different from what always has been preached. Everyone knows the story of the traveler in Naples who saw twelve beggars lying in the sun (it was before the days of Mussolini), and offered a lira to the laziest of them. Eleven of them jumped up to claim it, so he gave it to the twelfth. this traveler was on the right lines. But in countries which do not enjoy Mediterranean sunshine idleness is more difficult, and a great public propaganda will be required to inaugurate it. I hope that, after reading the following pages, the leaders of the YMCA will start a campaign to induce good young men to do nothing. If so, I shall not have lived in vain. - -Before advancing my own arguments for laziness, I must dispose of one which I cannot accept. Whenever a person who already has enough to live on proposes to engage in some everyday kind of job, such as school-teaching or typing, he or she is told that such conduct takes the bread out of other people's mouths, and is therefore wicked. If this argument were valid, it would only be necessary for us all to be idle in order that we should all have our mouths full of bread. What people who say such things forget is that what a man earns he usually spends, and in spending he gives employment. As long as a man spends his income, he puts just as much bread into people's mouths in spending as he takes out of other people's mouths in earning. The real villain, from this point of view, is the man who saves. If he merely puts his savings in a stocking, like the proverbial French peasant, it is obvious that they do not give employment. If he invests his savings, the matter is less obvious, and different cases arise. - -One of the commonest things to do with savings is to lend them to some Government. In view of the fact that the bulk of the public expenditure of most civilized Governments consists in payment for past wars or preparation for future wars, the man who lends his money to a Government is in the same position as the bad men in Shakespeare who hire murderers. The net result of the man's economical habits is to increase the armed forces of the State to which he lends his savings. Obviously it would be better if he spent the money, even if he spent it in drink or gambling. - -But, I shall be told, the case is quite different when savings are invested in industrial enterprises. When such enterprises succeed, and produce something useful, this may be conceded. In these days, however, no one will deny that most enterprises fail. That means that a large amount of human labor, which might have been devoted to producing something that could be enjoyed, was expended on producing machines which, when produced, lay idle and did no good to anyone. The man who invests his savings in a concern that goes bankrupt is therefore injuring others as well as himself. If he spent his money, say, in giving parties for his friends, they (we may hope) would get pleasure, and so would all those upon whom he spent money, such as the butcher, the baker, and the bootlegger. But if he spends it (let us say) upon laying down rails for surface card in some place where surface cars turn out not to be wanted, he has diverted a mass of labor into channels where it gives pleasure to no one. Nevertheless, when he becomes poor through failure of his investment he will be regarded as a victim of undeserved misfortune, whereas the gay spendthrift, who has spent his money philanthropically, will be despised as a fool and a frivolous person. - -All this is only preliminary. I want to say, in all seriousness, that a great deal of harm is being done in the modern world by belief in the virtuousness of work, and that the road to happiness and prosperity lies in an organized diminution of work. - -First of all: what is work? Work is of two kinds: first, altering the position of matter at or near the earth's surface relatively to other such matter; second, telling other people to do so. The first kind is unpleasant and ill paid; the second is pleasant and highly paid. The second kind is capable of indefinite extension: there are not only those who give orders, but those who give advice as to what orders should be given. Usually two opposite kinds of advice are given simultaneously by two organized bodies of men; this is called politics. The skill required for this kind of work is not knowledge of the subjects as to which advice is given, but knowledge of the art of persuasive speaking and writing, i.e. of advertising. - -Throughout Europe, though not in America, there is a third class of men, more respected than either of the classes of workers. There are men who, through ownership of land, are able to make others pay for the privilege of being allowed to exist and to work. These landowners are idle, and I might therefore be expected to praise them. Unfortunately, their idleness is only rendered possible by the industry of others; indeed their desire for comfortable idleness is historically the source of the whole gospel of work. The last thing they have ever wished is that others should follow their example. - -From the beginning of civilization until the Industrial Revolution, a man could, as a rule, produce by hard work little more than was required for the subsistence of himself and his family, although his wife worked at least as hard as he did, and his children added their labor as soon as they were old enough to do so. The small surplus above bare necessaries was not left to those who produced it, but was appropriated by warriors and priests. In times of famine there was no surplus; the warriors and priests, however, still secured as much as at other times, with the result that many of the workers died of hunger. This system persisted in Russia until 1917 [1], and still persists in the East; in England, in spite of the Industrial Revolution, it remained in full force throughout the Napoleonic wars, and until a hundred years ago, when the new class of manufacturers acquired power. In America, the system came to an end with the Revolution, except in the South, where it persisted until the Civil War. A system which lasted so long and ended so recently has naturally left a profound impress upon men's thoughts and opinions. Much that we take for granted about the desirability of work is derived from this system, and, being pre-industrial, is not adapted to the modern world. Modern technique has made it possible for leisure, within limits, to be not the prerogative of small privileged classes, but a right evenly distributed throughout the community. The morality of work is the morality of slaves, and the modern world has no need of slavery. - -It is obvious that, in primitive communities, peasants, left to themselves, would not have parted with the slender surplus upon which the warriors and priests subsisted, but would have either produced less or consumed more. At first, sheer force compelled them to produce and part with the surplus. Gradually, however, it was found possible to induce many of them to accept an ethic according to which it was their duty to work hard, although part of their work went to support others in idleness. By this means the amount of compulsion required was lessened, and the expenses of government were diminished. To this day, 99 per cent of British wage-earners would be genuinely shocked if it were proposed that the King should not have a larger income than a working man. The conception of duty, speaking historically, has been a means used by the holders of power to induce others to live for the interests of their masters rather than for their own. Of course the holders of power conceal this fact from themselves by managing to believe that their interests are identical with the larger interests of humanity. Sometimes this is true; Athenian slave-owners, for instance, employed part of their leisure in making a permanent contribution to civilization which would have been impossible under a just economic system. Leisure is essential to civilization, and in former times leisure for the few was only rendered possible by the labors of the many. But their labors were valuable, not because work is good, but because leisure is good. And with modern technique it would be possible to distribute leisure justly without injury to civilization. - -Modern technique has made it possible to diminish enormously the amount of labor required to secure the necessaries of life for everyone. This was made obvious during the war. At that time all the men in the armed forces, and all the men and women engaged in the production of munitions, all the men and women engaged in spying, war propaganda, or Government offices connected with the war, were withdrawn from productive occupations. In spite of this, the general level of well-being among unskilled wage-earners on the side of the Allies was higher than before or since. The significance of this fact was concealed by finance: borrowing made it appear as if the future was nourishing the present. But that, of course, would have been impossible; a man cannot eat a loaf of bread that does not yet exist. The war showed conclusively that, by the scientific organization of production, it is possible to keep modern populations in fair comfort on a small part of the working capacity of the modern world. If, at the end of the war, the scientific organization, which had been created in order to liberate men for fighting and munition work, had been preserved, and the hours of the week had been cut down to four, all would have been well. Instead of that the old chaos was restored, those whose work was demanded were made to work long hours, and the rest were left to starve as unemployed. Why? Because work is a duty, and a man should not receive wages in proportion to what he has produced, but in proportion to his virtue as exemplified by his industry. - -This is the morality of the Slave State, applied in circumstances totally unlike those in which it arose. No wonder the result has been disastrous. Let us take an illustration. Suppose that, at a given moment, a certain number of people are engaged in the manufacture of pins. They make as many pins as the world needs, working (say) eight hours a day. Someone makes an invention by which the same number of men can make twice as many pins: pins are already so cheap that hardly any more will be bought at a lower price. In a sensible world, everybody concerned in the manufacturing of pins would take to working four hours instead of eight, and everything else would go on as before. But in the actual world this would be thought demoralizing. The men still work eight hours, there are too many pins, some employers go bankrupt, and half the men previously concerned in making pins are thrown out of work. There is, in the end, just as much leisure as on the other plan, but half the men are totally idle while half are still overworked. In this way, it is insured that the unavoidable leisure shall cause misery all round instead of being a universal source of happiness. Can anything more insane be imagined? - -The idea that the poor should have leisure has always been shocking to the rich. In England, in the early nineteenth century, fifteen hours was the ordinary day's work for a man; children sometimes did as much, and very commonly did twelve hours a day. When meddlesome busybodies suggested that perhaps these hours were rather long, they were told that work kept adults from drink and children from mischief. When I was a child, shortly after urban working men had acquired the vote, certain public holidays were established by law, to the great indignation of the upper classes. I remember hearing an old Duchess say: 'What do the poor want with holidays? They ought to work.' People nowadays are less frank, but the sentiment persists, and is the source of much of our economic confusion. - -Let us, for a moment, consider the ethics of work frankly, without superstition. Every human being, of necessity, consumes, in the course of his life, a certain amount of the produce of human labor. Assuming, as we may, that labor is on the whole disagreeable, it is unjust that a man should consume more than he produces. Of course he may provide services rather than commodities, like a medical man, for example; but he should provide something in return for his board and lodging. to this extent, the duty of work must be admitted, but to this extent only. - -I shall not dwell upon the fact that, in all modern societies outside the USSR, many people escape even this minimum amount of work, namely all those who inherit money and all those who marry money. I do not think the fact that these people are allowed to be idle is nearly so harmful as the fact that wage-earners are expected to overwork or starve. - -If the ordinary wage-earner worked four hours a day, there would be enough for everybody and no unemployment -- assuming a certain very moderate amount of sensible organization. This idea shocks the well-to-do, because they are convinced that the poor would not know how to use so much leisure. In America men often work long hours even when they are well off; such men, naturally, are indignant at the idea of leisure for wage-earners, except as the grim punishment of unemployment; in fact, they dislike leisure even for their sons. Oddly enough, while they wish their sons to work so hard as to have no time to be civilized, they do not mind their wives and daughters having no work at all. the snobbish admiration of uselessness, which, in an aristocratic society, extends to both sexes, is, under a plutocracy, confined to women; this, however, does not make it any more in agreement with common sense. - -The wise use of leisure, it must be conceded, is a product of civilization and education. A man who has worked long hours all his life will become bored if he becomes suddenly idle. But without a considerable amount of leisure a man is cut off from many of the best things. There is no longer any reason why the bulk of the population should suffer this deprivation; only a foolish asceticism, usually vicarious, makes us continue to insist on work in excessive quantities now that the need no longer exists. - -In the new creed which controls the government of Russia, while there is much that is very different from the traditional teaching of the West, there are some things that are quite unchanged. The attitude of the governing classes, and especially of those who conduct educational propaganda, on the subject of the dignity of labor, is almost exactly that which the governing classes of the world have always preached to what were called the 'honest poor'. Industry, sobriety, willingness to work long hours for distant advantages, even submissiveness to authority, all these reappear; moreover authority still represents the will of the Ruler of the Universe, Who, however, is now called by a new name, Dialectical Materialism. - -The victory of the proletariat in Russia has some points in common with the victory of the feminists in some other countries. For ages, men had conceded the superior saintliness of women, and had consoled women for their inferiority by maintaining that saintliness is more desirable than power. At last the feminists decided that they would have both, since the pioneers among them believed all that the men had told them about the desirability of virtue, but not what they had told them about the worthlessness of political power. A similar thing has happened in Russia as regards manual work. For ages, the rich and their sycophants have written in praise of 'honest toil', have praised the simple life, have professed a religion which teaches that the poor are much more likely to go to heaven than the rich, and in general have tried to make manual workers believe that there is some special nobility about altering the position of matter in space, just as men tried to make women believe that they derived some special nobility from their sexual enslavement. In Russia, all this teaching about the excellence of manual work has been taken seriously, with the result that the manual worker is more honored than anyone else. What are, in essence, revivalist appeals are made, but not for the old purposes: they are made to secure shock workers for special tasks. Manual work is the ideal which is held before the young, and is the basis of all ethical teaching. - -For the present, possibly, this is all to the good. A large country, full of natural resources, awaits development, and has has to be developed with very little use of credit. In these circumstances, hard work is necessary, and is likely to bring a great reward. But what will happen when the point has been reached where everybody could be comfortable without working long hours? - -In the West, we have various ways of dealing with this problem. We have no attempt at economic justice, so that a large proportion of the total produce goes to a small minority of the population, many of whom do no work at all. Owing to the absence of any central control over production, we produce hosts of things that are not wanted. We keep a large percentage of the working population idle, because we can dispense with their labor by making the others overwork. When all these methods prove inadequate, we have a war: we cause a number of people to manufacture high explosives, and a number of others to explode them, as if we were children who had just discovered fireworks. By a combination of all these devices we manage, though with difficulty, to keep alive the notion that a great deal of severe manual work must be the lot of the average man. - -In Russia, owing to more economic justice and central control over production, the problem will have to be differently solved. the rational solution would be, as soon as the necessaries and elementary comforts can be provided for all, to reduce the hours of labor gradually, allowing a popular vote to decide, at each stage, whether more leisure or more goods were to be preferred. But, having taught the supreme virtue of hard work, it is difficult to see how the authorities can aim at a paradise in which there will be much leisure and little work. It seems more likely that they will find continually fresh schemes, by which present leisure is to be sacrificed to future productivity. I read recently of an ingenious plan put forward by Russian engineers, for making the White Sea and the northern coasts of Siberia warm, by putting a dam across the Kara Sea. An admirable project, but liable to postpone proletarian comfort for a generation, while the nobility of toil is being displayed amid the ice-fields and snowstorms of the Arctic Ocean. This sort of thing, if it happens, will be the result of regarding the virtue of hard work as an end in itself, rather than as a means to a state of affairs in which it is no longer needed. - -The fact is that moving matter about, while a certain amount of it is necessary to our existence, is emphatically not one of the ends of human life. If it were, we should have to consider every navvy superior to Shakespeare. We have been misled in this matter by two causes. One is the necessity of keeping the poor contented, which has led the rich, for thousands of years, to preach the dignity of labor, while taking care themselves to remain undignified in this respect. The other is the new pleasure in mechanism, which makes us delight in the astonishingly clever changes that we can produce on the earth's surface. Neither of these motives makes any great appeal to the actual worker. If you ask him what he thinks the best part of his life, he is not likely to say: 'I enjoy manual work because it makes me feel that I am fulfilling man's noblest task, and because I like to think how much man can transform his planet. It is true that my body demands periods of rest, which I have to fill in as best I may, but I am never so happy as when the morning comes and I can return to the toil from which my contentment springs.' I have never heard working men say this sort of thing. They consider work, as it should be considered, a necessary means to a livelihood, and it is from their leisure that they derive whatever happiness they may enjoy. - -It will be said that, while a little leisure is pleasant, men would not know how to fill their days if they had only four hours of work out of the twenty-four. In so far as this is true in the modern world, it is a condemnation of our civilization; it would not have been true at any earlier period. There was formerly a capacity for light-heartedness and play which has been to some extent inhibited by the cult of efficiency. The modern man thinks that everything ought to be done for the sake of something else, and never for its own sake. Serious-minded persons, for example, are continually condemning the habit of going to the cinema, and telling us that it leads the young into crime. But all the work that goes to producing a cinema is respectable, because it is work, and because it brings a money profit. The notion that the desirable activities are those that bring a profit has made everything topsy-turvy. The butcher who provides you with meat and the baker who provides you with bread are praiseworthy, because they are making money; but when you enjoy the food they have provided, you are merely frivolous, unless you eat only to get strength for your work. Broadly speaking, it is held that getting money is good and spending money is bad. Seeing that they are two sides of one transaction, this is absurd; one might as well maintain that keys are good, but keyholes are bad. Whatever merit there may be in the production of goods must be entirely derivative from the advantage to be obtained by consuming them. The individual, in our society, works for profit; but the social purpose of his work lies in the consumption of what he produces. It is this divorce between the individual and the social purpose of production that makes it so difficult for men to think clearly in a world in which profit-making is the incentive to industry. We think too much of production, and too little of consumption. One result is that we attach too little importance to enjoyment and simple happiness, and that we do not judge production by the pleasure that it gives to the consumer. - -When I suggest that working hours should be reduced to four, I am not meaning to imply that all the remaining time should necessarily be spent in pure frivolity. I mean that four hours' work a day should entitle a man to the necessities and elementary comforts of life, and that the rest of his time should be his to use as he might see fit. It is an essential part of any such social system that education should be carried further than it usually is at present, and should aim, in part, at providing tastes which would enable a man to use leisure intelligently. I am not thinking mainly of the sort of things that would be considered 'highbrow'. Peasant dances have died out except in remote rural areas, but the impulses which caused them to be cultivated must still exist in human nature. The pleasures of urban populations have become mainly passive: seeing cinemas, watching football matches, listening to the radio, and so on. This results from the fact that their active energies are fully taken up with work; if they had more leisure, they would again enjoy pleasures in which they took an active part. - -In the past, there was a small leisure class and a larger working class. The leisure class enjoyed advantages for which there was no basis in social justice; this necessarily made it oppressive, limited its sympathies, and caused it to invent theories by which to justify its privileges. These facts greatly diminished its excellence, but in spite of this drawback it contributed nearly the whole of what we call civilization. It cultivated the arts and discovered the sciences; it wrote the books, invented the philosophies, and refined social relations. Even the liberation of the oppressed has usually been inaugurated from above. Without the leisure class, mankind would never have emerged from barbarism. - -The method of a leisure class without duties was, however, extraordinarily wasteful. None of the members of the class had to be taught to be industrious, and the class as a whole was not exceptionally intelligent. The class might produce one Darwin, but against him had to be set tens of thousands of country gentlemen who never thought of anything more intelligent than fox-hunting and punishing poachers. At present, the universities are supposed to provide, in a more systematic way, what the leisure class provided accidentally and as a by-product. This is a great improvement, but it has certain drawbacks. University life is so different from life in the world at large that men who live in academic milieu tend to be unaware of the preoccupations and problems of ordinary men and women; moreover their ways of expressing themselves are usually such as to rob their opinions of the influence that they ought to have upon the general public. Another disadvantage is that in universities studies are organized, and the man who thinks of some original line of research is likely to be discouraged. Academic institutions, therefore, useful as they are, are not adequate guardians of the interests of civilization in a world where everyone outside their walls is too busy for unutilitarian pursuits. - -In a world where no one is compelled to work more than four hours a day, every person possessed of scientific curiosity will be able to indulge it, and every painter will be able to paint without starving, however excellent his pictures may be. Young writers will not be obliged to draw attention to themselves by sensational pot-boilers, with a view to acquiring the economic independence needed for monumental works, for which, when the time at last comes, they will have lost the taste and capacity. Men who, in their professional work, have become interested in some phase of economics or government, will be able to develop their ideas without the academic detachment that makes the work of university economists often seem lacking in reality. Medical men will have the time to learn about the progress of medicine, teachers will not be exasperatedly struggling to teach by routine methods things which they learnt in their youth, which may, in the interval, have been proved to be untrue. - -Above all, there will be happiness and joy of life, instead of frayed nerves, weariness, and dyspepsia. The work exacted will be enough to make leisure delightful, but not enough to produce exhaustion. Since men will not be tired in their spare time, they will not demand only such amusements as are passive and vapid. At least one per cent will probably devote the time not spent in professional work to pursuits of some public importance, and, since they will not depend upon these pursuits for their livelihood, their originality will be unhampered, and there will be no need to conform to the standards set by elderly pundits. But it is not only in these exceptional cases that the advantages of leisure will appear. Ordinary men and women, having the opportunity of a happy life, will become more kindly and less persecuting and less inclined to view others with suspicion. The taste for war will die out, partly for this reason, and partly because it will involve long and severe work for all. Good nature is, of all moral qualities, the one that the world needs most, and good nature is the result of ease and security, not of a life of arduous struggle. Modern methods of production have given us the possibility of ease and security for all; we have chosen, instead, to have overwork for some and starvation for others. Hitherto we have continued to be as energetic as we were before there were machines; in this we have been foolish, but there is no reason to go on being foolish forever. - -[1] Since then, members of the Communist Party have succeeded to this privilege of the warriors and priests. diff --git a/node_modules/wordwrap/test/wrap.js b/node_modules/wordwrap/test/wrap.js deleted file mode 100644 index 0cfb76d17..000000000 --- a/node_modules/wordwrap/test/wrap.js +++ /dev/null @@ -1,31 +0,0 @@ -var assert = require('assert'); -var wordwrap = require('wordwrap'); - -var fs = require('fs'); -var idleness = fs.readFileSync(__dirname + '/idleness.txt', 'utf8'); - -exports.stop80 = function () { - var lines = wordwrap(80)(idleness).split(/\n/); - var words = idleness.split(/\s+/); - - lines.forEach(function (line) { - assert.ok(line.length <= 80, 'line > 80 columns'); - var chunks = line.match(/\S/) ? line.split(/\s+/) : []; - assert.deepEqual(chunks, words.splice(0, chunks.length)); - }); -}; - -exports.start20stop60 = function () { - var lines = wordwrap(20, 100)(idleness).split(/\n/); - var words = idleness.split(/\s+/); - - lines.forEach(function (line) { - assert.ok(line.length <= 100, 'line > 100 columns'); - var chunks = line - .split(/\s+/) - .filter(function (x) { return x.match(/\S/) }) - ; - assert.deepEqual(chunks, words.splice(0, chunks.length)); - assert.deepEqual(line.slice(0, 20), new Array(20 + 1).join(' ')); - }); -}; diff --git a/node_modules/wrap-ansi/index.js b/node_modules/wrap-ansi/index.js index ff625435f..5038bb0c5 100755 --- a/node_modules/wrap-ansi/index.js +++ b/node_modules/wrap-ansi/index.js @@ -1,68 +1,42 @@ 'use strict'; -var stringWidth = require('string-width'); -var stripAnsi = require('strip-ansi'); - -var ESCAPES = [ - '\u001b', - '\u009b' -]; - -var END_CODE = 39; - -var ESCAPE_CODES = { - 0: 0, - 1: 22, - 2: 22, - 3: 23, - 4: 24, - 7: 27, - 8: 28, - 9: 29, - 30: 39, - 31: 39, - 32: 39, - 33: 39, - 34: 39, - 35: 39, - 36: 39, - 37: 39, - 90: 39, - 40: 49, - 41: 49, - 42: 49, - 43: 49, - 44: 49, - 45: 49, - 46: 49, - 47: 49 -}; +const stringWidth = require('string-width'); +const stripAnsi = require('strip-ansi'); +const ansiStyles = require('ansi-styles'); + +const ESCAPES = new Set([ + '\u001B', + '\u009B' +]); + +const END_CODE = 39; + +const wrapAnsi = code => `${ESCAPES.values().next().value}[${code}m`; -function wrapAnsi(code) { - return ESCAPES[0] + '[' + code + 'm'; -} +// Calculate the length of words split on ' ', ignoring +// the extra characters added by ansi escape codes +const wordLengths = string => string.split(' ').map(character => stringWidth(character)); -// calculate the length of words split on ' ', ignoring -// the extra characters added by ansi escape codes. -function wordLengths(str) { - return str.split(' ').map(function (s) { - return stringWidth(s); - }); -} +// Wrap a long word across multiple rows +// Ansi escape codes do not count towards length +const wrapWord = (rows, word, columns) => { + const characters = [...word]; -// wrap a long word across multiple rows. -// ansi escape codes do not count towards length. -function wrapWord(rows, word, cols) { - var insideEscape = false; - var visible = stripAnsi(rows[rows.length - 1]).length; + let insideEscape = false; + let visible = stringWidth(stripAnsi(rows[rows.length - 1])); - for (var i = 0; i < word.length; i++) { - var x = word[i]; + for (const [index, character] of characters.entries()) { + const characterLength = stringWidth(character); - rows[rows.length - 1] += x; + if (visible + characterLength <= columns) { + rows[rows.length - 1] += character; + } else { + rows.push(character); + visible = 0; + } - if (ESCAPES.indexOf(x) !== -1) { + if (ESCAPES.has(character)) { insideEscape = true; - } else if (insideEscape && x === 'm') { + } else if (insideEscape && character === 'm') { insideEscape = false; continue; } @@ -71,98 +45,144 @@ function wrapWord(rows, word, cols) { continue; } - visible++; + visible += characterLength; - if (visible >= cols && i < word.length - 1) { + if (visible === columns && index < characters.length - 1) { rows.push(''); visible = 0; } } - // it's possible that the last row we copy over is only - // ansi escape characters, handle this edge-case. + // It's possible that the last row we copy over is only + // ansi escape characters, handle this edge-case if (!visible && rows[rows.length - 1].length > 0 && rows.length > 1) { rows[rows.length - 2] += rows.pop(); } -} +}; + +// Trims spaces from a string ignoring invisible sequences +const stringVisibleTrimSpacesRight = str => { + const words = str.split(' '); + let last = words.length; + + while (last > 0) { + if (stringWidth(words[last - 1]) > 0) { + break; + } + + last--; + } + + if (last === words.length) { + return str; + } + + return words.slice(0, last).join(' ') + words.slice(last).join(''); +}; -// the wrap-ansi module can be invoked -// in either 'hard' or 'soft' wrap mode. +// The wrap-ansi module can be invoked +// in either 'hard' or 'soft' wrap mode // // 'hard' will never allow a string to take up more -// than cols characters. +// than columns characters // -// 'soft' allows long words to expand past the column length. -function exec(str, cols, opts) { - var options = opts || {}; +// 'soft' allows long words to expand past the column length +const exec = (string, columns, options = {}) => { + if (options.trim !== false && string.trim() === '') { + return ''; + } + + let pre = ''; + let ret = ''; + let escapeCode; + + const lengths = wordLengths(string); + let rows = ['']; - var pre = ''; - var ret = ''; - var escapeCode; + for (const [index, word] of string.split(' ').entries()) { + if (options.trim !== false) { + rows[rows.length - 1] = rows[rows.length - 1].trimLeft(); + } - var lengths = wordLengths(str); - var words = str.split(' '); - var rows = ['']; + let rowLength = stringWidth(rows[rows.length - 1]); - for (var i = 0, word; (word = words[i]) !== undefined; i++) { - var rowLength = stringWidth(rows[rows.length - 1]); + if (index !== 0) { + if (rowLength >= columns && (options.wordWrap === false || options.trim === false)) { + // If we start with a new word but the current row length equals the length of the columns, add a new row + rows.push(''); + rowLength = 0; + } - if (rowLength) { - rows[rows.length - 1] += ' '; - rowLength++; + if (rowLength > 0 || options.trim === false) { + rows[rows.length - 1] += ' '; + rowLength++; + } } - // in 'hard' wrap mode, the length of a line is - // never allowed to extend past 'cols'. - if (lengths[i] > cols && options.hard) { - if (rowLength) { + // In 'hard' wrap mode, the length of a line is + // never allowed to extend past 'columns' + if (options.hard && lengths[index] > columns) { + const remainingColumns = (columns - rowLength); + const breaksStartingThisLine = 1 + Math.floor((lengths[index] - remainingColumns - 1) / columns); + const breaksStartingNextLine = Math.floor((lengths[index] - 1) / columns); + if (breaksStartingNextLine < breaksStartingThisLine) { rows.push(''); } - wrapWord(rows, word, cols); + + wrapWord(rows, word, columns); continue; } - if (rowLength + lengths[i] > cols && rowLength > 0) { - if (options.wordWrap === false && rowLength < cols) { - wrapWord(rows, word, cols); + if (rowLength + lengths[index] > columns && rowLength > 0 && lengths[index] > 0) { + if (options.wordWrap === false && rowLength < columns) { + wrapWord(rows, word, columns); continue; } rows.push(''); } + if (rowLength + lengths[index] > columns && options.wordWrap === false) { + wrapWord(rows, word, columns); + continue; + } + rows[rows.length - 1] += word; } - pre = rows.map(function (r) { - return r.trim(); - }).join('\n'); + if (options.trim !== false) { + rows = rows.map(stringVisibleTrimSpacesRight); + } - for (var j = 0; j < pre.length; j++) { - var y = pre[j]; + pre = rows.join('\n'); - ret += y; + for (const [index, character] of [...pre].entries()) { + ret += character; - if (ESCAPES.indexOf(y) !== -1) { - var code = parseFloat(/[0-9][^m]*/.exec(pre.slice(j, j + 4))); + if (ESCAPES.has(character)) { + const code = parseFloat(/\d[^m]*/.exec(pre.slice(index, index + 4))); escapeCode = code === END_CODE ? null : code; } - if (escapeCode && ESCAPE_CODES[escapeCode]) { - if (pre[j + 1] === '\n') { - ret += wrapAnsi(ESCAPE_CODES[escapeCode]); - } else if (y === '\n') { + const code = ansiStyles.codes.get(Number(escapeCode)); + + if (escapeCode && code) { + if (pre[index + 1] === '\n') { + ret += wrapAnsi(code); + } else if (character === '\n') { ret += wrapAnsi(escapeCode); } } } return ret; -} +}; -// for each line break, invoke the method separately. -module.exports = function (str, cols, opts) { - return String(str).split('\n').map(function (substr) { - return exec(substr, cols, opts); - }).join('\n'); +// For each newline, invoke the method separately +module.exports = (string, columns, options) => { + return String(string) + .normalize() + .split('\n') + .map(line => exec(line, columns, options)) + .join('\n'); }; diff --git a/node_modules/wrap-ansi/license b/node_modules/wrap-ansi/license index 654d0bfe9..e7af2f771 100644 --- a/node_modules/wrap-ansi/license +++ b/node_modules/wrap-ansi/license @@ -1,21 +1,9 @@ -The MIT License (MIT) +MIT License Copyright (c) Sindre Sorhus (sindresorhus.com) -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/wrap-ansi/node_modules/ansi-regex/index.js b/node_modules/wrap-ansi/node_modules/ansi-regex/index.js deleted file mode 100644 index b9574ed7e..000000000 --- a/node_modules/wrap-ansi/node_modules/ansi-regex/index.js +++ /dev/null @@ -1,4 +0,0 @@ -'use strict'; -module.exports = function () { - return /[\u001b\u009b][[()#;?]*(?:[0-9]{1,4}(?:;[0-9]{0,4})*)?[0-9A-PRZcf-nqry=><]/g; -}; diff --git a/node_modules/wrap-ansi/node_modules/ansi-regex/license b/node_modules/wrap-ansi/node_modules/ansi-regex/license deleted file mode 100644 index 654d0bfe9..000000000 --- a/node_modules/wrap-ansi/node_modules/ansi-regex/license +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) Sindre Sorhus (sindresorhus.com) - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/node_modules/wrap-ansi/node_modules/ansi-regex/package.json b/node_modules/wrap-ansi/node_modules/ansi-regex/package.json deleted file mode 100644 index 4dc782e0d..000000000 --- a/node_modules/wrap-ansi/node_modules/ansi-regex/package.json +++ /dev/null @@ -1,112 +0,0 @@ -{ - "_args": [ - [ - "ansi-regex@2.1.1", - "/Users/drew.heavner/Documents/Github/sign-android-release" - ] - ], - "_development": true, - "_from": "ansi-regex@2.1.1", - "_id": "ansi-regex@2.1.1", - "_inBundle": false, - "_integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=", - "_location": "/wrap-ansi/ansi-regex", - "_phantomChildren": {}, - "_requested": { - "type": "version", - "registry": true, - "raw": "ansi-regex@2.1.1", - "name": "ansi-regex", - "escapedName": "ansi-regex", - "rawSpec": "2.1.1", - "saveSpec": null, - "fetchSpec": "2.1.1" - }, - "_requiredBy": [ - "/wrap-ansi/strip-ansi" - ], - "_resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", - "_spec": "2.1.1", - "_where": "/Users/drew.heavner/Documents/Github/sign-android-release", - "author": { - "name": "Sindre Sorhus", - "email": "sindresorhus@gmail.com", - "url": "sindresorhus.com" - }, - "bugs": { - "url": "https://github.com/chalk/ansi-regex/issues" - }, - "description": "Regular expression for matching ANSI escape codes", - "devDependencies": { - "ava": "0.17.0", - "xo": "0.16.0" - }, - "engines": { - "node": ">=0.10.0" - }, - "files": [ - "index.js" - ], - "homepage": "https://github.com/chalk/ansi-regex#readme", - "keywords": [ - "ansi", - "styles", - "color", - "colour", - "colors", - "terminal", - "console", - "cli", - "string", - "tty", - "escape", - "formatting", - "rgb", - "256", - "shell", - "xterm", - "command-line", - "text", - "regex", - "regexp", - "re", - "match", - "test", - "find", - "pattern" - ], - "license": "MIT", - "maintainers": [ - { - "name": "Sindre Sorhus", - "email": "sindresorhus@gmail.com", - "url": "sindresorhus.com" - }, - { - "name": "Joshua Appelman", - "email": "jappelman@xebia.com", - "url": "jbnicolai.com" - }, - { - "name": "JD Ballard", - "email": "i.am.qix@gmail.com", - "url": "github.com/qix-" - } - ], - "name": "ansi-regex", - "repository": { - "type": "git", - "url": "git+https://github.com/chalk/ansi-regex.git" - }, - "scripts": { - "test": "xo && ava --verbose", - "view-supported": "node fixtures/view-codes.js" - }, - "version": "2.1.1", - "xo": { - "rules": { - "guard-for-in": 0, - "no-loop-func": 0 - } - } -} diff --git a/node_modules/wrap-ansi/node_modules/ansi-regex/readme.md b/node_modules/wrap-ansi/node_modules/ansi-regex/readme.md deleted file mode 100644 index 6a928edf0..000000000 --- a/node_modules/wrap-ansi/node_modules/ansi-regex/readme.md +++ /dev/null @@ -1,39 +0,0 @@ -# ansi-regex [![Build Status](https://travis-ci.org/chalk/ansi-regex.svg?branch=master)](https://travis-ci.org/chalk/ansi-regex) - -> Regular expression for matching [ANSI escape codes](http://en.wikipedia.org/wiki/ANSI_escape_code) - - -## Install - -``` -$ npm install --save ansi-regex -``` - - -## Usage - -```js -const ansiRegex = require('ansi-regex'); - -ansiRegex().test('\u001b[4mcake\u001b[0m'); -//=> true - -ansiRegex().test('cake'); -//=> false - -'\u001b[4mcake\u001b[0m'.match(ansiRegex()); -//=> ['\u001b[4m', '\u001b[0m'] -``` - -## FAQ - -### Why do you test for codes not in the ECMA 48 standard? - -Some of the codes we run as a test are codes that we acquired finding various lists of non-standard or manufacturer specific codes. If I recall correctly, we test for both standard and non-standard codes, as most of them follow the same or similar format and can be safely matched in strings without the risk of removing actual string content. There are a few non-standard control codes that do not follow the traditional format (i.e. they end in numbers) thus forcing us to exclude them from the test because we cannot reliably match them. - -On the historical side, those ECMA standards were established in the early 90's whereas the VT100, for example, was designed in the mid/late 70's. At that point in time, control codes were still pretty ungoverned and engineers used them for a multitude of things, namely to activate hardware ports that may have been proprietary. Somewhere else you see a similar 'anarchy' of codes is in the x86 architecture for processors; there are a ton of "interrupts" that can mean different things on certain brands of processors, most of which have been phased out. - - -## License - -MIT © [Sindre Sorhus](http://sindresorhus.com) diff --git a/node_modules/wrap-ansi/node_modules/is-fullwidth-code-point/index.js b/node_modules/wrap-ansi/node_modules/is-fullwidth-code-point/index.js deleted file mode 100644 index a7d3e3855..000000000 --- a/node_modules/wrap-ansi/node_modules/is-fullwidth-code-point/index.js +++ /dev/null @@ -1,46 +0,0 @@ -'use strict'; -var numberIsNan = require('number-is-nan'); - -module.exports = function (x) { - if (numberIsNan(x)) { - return false; - } - - // https://github.com/nodejs/io.js/blob/cff7300a578be1b10001f2d967aaedc88aee6402/lib/readline.js#L1369 - - // code points are derived from: - // http://www.unix.org/Public/UNIDATA/EastAsianWidth.txt - if (x >= 0x1100 && ( - x <= 0x115f || // Hangul Jamo - 0x2329 === x || // LEFT-POINTING ANGLE BRACKET - 0x232a === x || // RIGHT-POINTING ANGLE BRACKET - // CJK Radicals Supplement .. Enclosed CJK Letters and Months - (0x2e80 <= x && x <= 0x3247 && x !== 0x303f) || - // Enclosed CJK Letters and Months .. CJK Unified Ideographs Extension A - 0x3250 <= x && x <= 0x4dbf || - // CJK Unified Ideographs .. Yi Radicals - 0x4e00 <= x && x <= 0xa4c6 || - // Hangul Jamo Extended-A - 0xa960 <= x && x <= 0xa97c || - // Hangul Syllables - 0xac00 <= x && x <= 0xd7a3 || - // CJK Compatibility Ideographs - 0xf900 <= x && x <= 0xfaff || - // Vertical Forms - 0xfe10 <= x && x <= 0xfe19 || - // CJK Compatibility Forms .. Small Form Variants - 0xfe30 <= x && x <= 0xfe6b || - // Halfwidth and Fullwidth Forms - 0xff01 <= x && x <= 0xff60 || - 0xffe0 <= x && x <= 0xffe6 || - // Kana Supplement - 0x1b000 <= x && x <= 0x1b001 || - // Enclosed Ideographic Supplement - 0x1f200 <= x && x <= 0x1f251 || - // CJK Unified Ideographs Extension B .. Tertiary Ideographic Plane - 0x20000 <= x && x <= 0x3fffd)) { - return true; - } - - return false; -} diff --git a/node_modules/wrap-ansi/node_modules/is-fullwidth-code-point/license b/node_modules/wrap-ansi/node_modules/is-fullwidth-code-point/license deleted file mode 100644 index 654d0bfe9..000000000 --- a/node_modules/wrap-ansi/node_modules/is-fullwidth-code-point/license +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) Sindre Sorhus (sindresorhus.com) - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/node_modules/wrap-ansi/node_modules/is-fullwidth-code-point/package.json b/node_modules/wrap-ansi/node_modules/is-fullwidth-code-point/package.json deleted file mode 100644 index 1d599b23e..000000000 --- a/node_modules/wrap-ansi/node_modules/is-fullwidth-code-point/package.json +++ /dev/null @@ -1,81 +0,0 @@ -{ - "_args": [ - [ - "is-fullwidth-code-point@1.0.0", - "/Users/drew.heavner/Documents/Github/sign-android-release" - ] - ], - "_development": true, - "_from": "is-fullwidth-code-point@1.0.0", - "_id": "is-fullwidth-code-point@1.0.0", - "_inBundle": false, - "_integrity": "sha1-754xOG8DGn8NZDr4L95QxFfvAMs=", - "_location": "/wrap-ansi/is-fullwidth-code-point", - "_phantomChildren": {}, - "_requested": { - "type": "version", - "registry": true, - "raw": "is-fullwidth-code-point@1.0.0", - "name": "is-fullwidth-code-point", - "escapedName": "is-fullwidth-code-point", - "rawSpec": "1.0.0", - "saveSpec": null, - "fetchSpec": "1.0.0" - }, - "_requiredBy": [ - "/wrap-ansi/string-width" - ], - "_resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz", - "_spec": "1.0.0", - "_where": "/Users/drew.heavner/Documents/Github/sign-android-release", - "author": { - "name": "Sindre Sorhus", - "email": "sindresorhus@gmail.com", - "url": "sindresorhus.com" - }, - "bugs": { - "url": "https://github.com/sindresorhus/is-fullwidth-code-point/issues" - }, - "dependencies": { - "number-is-nan": "^1.0.0" - }, - "description": "Check if the character represented by a given Unicode code point is fullwidth", - "devDependencies": { - "ava": "0.0.4", - "code-point-at": "^1.0.0" - }, - "engines": { - "node": ">=0.10.0" - }, - "files": [ - "index.js" - ], - "homepage": "https://github.com/sindresorhus/is-fullwidth-code-point#readme", - "keywords": [ - "fullwidth", - "full-width", - "full", - "width", - "unicode", - "character", - "char", - "string", - "str", - "codepoint", - "code", - "point", - "is", - "detect", - "check" - ], - "license": "MIT", - "name": "is-fullwidth-code-point", - "repository": { - "type": "git", - "url": "git+https://github.com/sindresorhus/is-fullwidth-code-point.git" - }, - "scripts": { - "test": "node test.js" - }, - "version": "1.0.0" -} diff --git a/node_modules/wrap-ansi/node_modules/is-fullwidth-code-point/readme.md b/node_modules/wrap-ansi/node_modules/is-fullwidth-code-point/readme.md deleted file mode 100644 index 4936464b1..000000000 --- a/node_modules/wrap-ansi/node_modules/is-fullwidth-code-point/readme.md +++ /dev/null @@ -1,39 +0,0 @@ -# is-fullwidth-code-point [![Build Status](https://travis-ci.org/sindresorhus/is-fullwidth-code-point.svg?branch=master)](https://travis-ci.org/sindresorhus/is-fullwidth-code-point) - -> Check if the character represented by a given [Unicode code point](https://en.wikipedia.org/wiki/Code_point) is [fullwidth](https://en.wikipedia.org/wiki/Halfwidth_and_fullwidth_forms) - - -## Install - -``` -$ npm install --save is-fullwidth-code-point -``` - - -## Usage - -```js -var isFullwidthCodePoint = require('is-fullwidth-code-point'); - -isFullwidthCodePoint('谢'.codePointAt()); -//=> true - -isFullwidthCodePoint('a'.codePointAt()); -//=> false -``` - - -## API - -### isFullwidthCodePoint(input) - -#### input - -Type: `number` - -[Code point](https://en.wikipedia.org/wiki/Code_point) of a character. - - -## License - -MIT © [Sindre Sorhus](http://sindresorhus.com) diff --git a/node_modules/wrap-ansi/node_modules/string-width/index.js b/node_modules/wrap-ansi/node_modules/string-width/index.js deleted file mode 100644 index b9bec6244..000000000 --- a/node_modules/wrap-ansi/node_modules/string-width/index.js +++ /dev/null @@ -1,37 +0,0 @@ -'use strict'; -var stripAnsi = require('strip-ansi'); -var codePointAt = require('code-point-at'); -var isFullwidthCodePoint = require('is-fullwidth-code-point'); - -// https://github.com/nodejs/io.js/blob/cff7300a578be1b10001f2d967aaedc88aee6402/lib/readline.js#L1345 -module.exports = function (str) { - if (typeof str !== 'string' || str.length === 0) { - return 0; - } - - var width = 0; - - str = stripAnsi(str); - - for (var i = 0; i < str.length; i++) { - var code = codePointAt(str, i); - - // ignore control characters - if (code <= 0x1f || (code >= 0x7f && code <= 0x9f)) { - continue; - } - - // surrogates - if (code >= 0x10000) { - i++; - } - - if (isFullwidthCodePoint(code)) { - width += 2; - } else { - width++; - } - } - - return width; -}; diff --git a/node_modules/wrap-ansi/node_modules/string-width/license b/node_modules/wrap-ansi/node_modules/string-width/license deleted file mode 100644 index 654d0bfe9..000000000 --- a/node_modules/wrap-ansi/node_modules/string-width/license +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) Sindre Sorhus (sindresorhus.com) - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/node_modules/wrap-ansi/node_modules/string-width/package.json b/node_modules/wrap-ansi/node_modules/string-width/package.json deleted file mode 100644 index 158560d06..000000000 --- a/node_modules/wrap-ansi/node_modules/string-width/package.json +++ /dev/null @@ -1,92 +0,0 @@ -{ - "_args": [ - [ - "string-width@1.0.2", - "/Users/drew.heavner/Documents/Github/sign-android-release" - ] - ], - "_development": true, - "_from": "string-width@1.0.2", - "_id": "string-width@1.0.2", - "_inBundle": false, - "_integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=", - "_location": "/wrap-ansi/string-width", - "_phantomChildren": {}, - "_requested": { - "type": "version", - "registry": true, - "raw": "string-width@1.0.2", - "name": "string-width", - "escapedName": "string-width", - "rawSpec": "1.0.2", - "saveSpec": null, - "fetchSpec": "1.0.2" - }, - "_requiredBy": [ - "/wrap-ansi" - ], - "_resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz", - "_spec": "1.0.2", - "_where": "/Users/drew.heavner/Documents/Github/sign-android-release", - "author": { - "name": "Sindre Sorhus", - "email": "sindresorhus@gmail.com", - "url": "sindresorhus.com" - }, - "bugs": { - "url": "https://github.com/sindresorhus/string-width/issues" - }, - "dependencies": { - "code-point-at": "^1.0.0", - "is-fullwidth-code-point": "^1.0.0", - "strip-ansi": "^3.0.0" - }, - "description": "Get the visual width of a string - the number of columns required to display it", - "devDependencies": { - "ava": "*", - "xo": "*" - }, - "engines": { - "node": ">=0.10.0" - }, - "files": [ - "index.js" - ], - "homepage": "https://github.com/sindresorhus/string-width#readme", - "keywords": [ - "string", - "str", - "character", - "char", - "unicode", - "width", - "visual", - "column", - "columns", - "fullwidth", - "full-width", - "full", - "ansi", - "escape", - "codes", - "cli", - "command-line", - "terminal", - "console", - "cjk", - "chinese", - "japanese", - "korean", - "fixed-width" - ], - "license": "MIT", - "name": "string-width", - "repository": { - "type": "git", - "url": "git+https://github.com/sindresorhus/string-width.git" - }, - "scripts": { - "test": "xo && ava" - }, - "version": "1.0.2" -} diff --git a/node_modules/wrap-ansi/node_modules/string-width/readme.md b/node_modules/wrap-ansi/node_modules/string-width/readme.md deleted file mode 100644 index 1ab42c935..000000000 --- a/node_modules/wrap-ansi/node_modules/string-width/readme.md +++ /dev/null @@ -1,42 +0,0 @@ -# string-width [![Build Status](https://travis-ci.org/sindresorhus/string-width.svg?branch=master)](https://travis-ci.org/sindresorhus/string-width) - -> Get the visual width of a string - the number of columns required to display it - -Some Unicode characters are [fullwidth](https://en.wikipedia.org/wiki/Halfwidth_and_fullwidth_forms) and use double the normal width. [ANSI escape codes](http://en.wikipedia.org/wiki/ANSI_escape_code) are stripped and doesn't affect the width. - -Useful to be able to measure the actual width of command-line output. - - -## Install - -``` -$ npm install --save string-width -``` - - -## Usage - -```js -const stringWidth = require('string-width'); - -stringWidth('古'); -//=> 2 - -stringWidth('\u001b[1m古\u001b[22m'); -//=> 2 - -stringWidth('a'); -//=> 1 -``` - - -## Related - -- [string-width-cli](https://github.com/sindresorhus/string-width-cli) - CLI for this module -- [string-length](https://github.com/sindresorhus/string-length) - Get the real length of a string -- [widest-line](https://github.com/sindresorhus/widest-line) - Get the visual width of the widest line in a string - - -## License - -MIT © [Sindre Sorhus](https://sindresorhus.com) diff --git a/node_modules/wrap-ansi/node_modules/strip-ansi/index.js b/node_modules/wrap-ansi/node_modules/strip-ansi/index.js deleted file mode 100644 index 099480fbf..000000000 --- a/node_modules/wrap-ansi/node_modules/strip-ansi/index.js +++ /dev/null @@ -1,6 +0,0 @@ -'use strict'; -var ansiRegex = require('ansi-regex')(); - -module.exports = function (str) { - return typeof str === 'string' ? str.replace(ansiRegex, '') : str; -}; diff --git a/node_modules/wrap-ansi/node_modules/strip-ansi/license b/node_modules/wrap-ansi/node_modules/strip-ansi/license deleted file mode 100644 index 654d0bfe9..000000000 --- a/node_modules/wrap-ansi/node_modules/strip-ansi/license +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) Sindre Sorhus (sindresorhus.com) - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/node_modules/wrap-ansi/node_modules/strip-ansi/package.json b/node_modules/wrap-ansi/node_modules/strip-ansi/package.json deleted file mode 100644 index 129ecbb24..000000000 --- a/node_modules/wrap-ansi/node_modules/strip-ansi/package.json +++ /dev/null @@ -1,106 +0,0 @@ -{ - "_args": [ - [ - "strip-ansi@3.0.1", - "/Users/drew.heavner/Documents/Github/sign-android-release" - ] - ], - "_development": true, - "_from": "strip-ansi@3.0.1", - "_id": "strip-ansi@3.0.1", - "_inBundle": false, - "_integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", - "_location": "/wrap-ansi/strip-ansi", - "_phantomChildren": {}, - "_requested": { - "type": "version", - "registry": true, - "raw": "strip-ansi@3.0.1", - "name": "strip-ansi", - "escapedName": "strip-ansi", - "rawSpec": "3.0.1", - "saveSpec": null, - "fetchSpec": "3.0.1" - }, - "_requiredBy": [ - "/wrap-ansi", - "/wrap-ansi/string-width" - ], - "_resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", - "_spec": "3.0.1", - "_where": "/Users/drew.heavner/Documents/Github/sign-android-release", - "author": { - "name": "Sindre Sorhus", - "email": "sindresorhus@gmail.com", - "url": "sindresorhus.com" - }, - "bugs": { - "url": "https://github.com/chalk/strip-ansi/issues" - }, - "dependencies": { - "ansi-regex": "^2.0.0" - }, - "description": "Strip ANSI escape codes", - "devDependencies": { - "ava": "*", - "xo": "*" - }, - "engines": { - "node": ">=0.10.0" - }, - "files": [ - "index.js" - ], - "homepage": "https://github.com/chalk/strip-ansi#readme", - "keywords": [ - "strip", - "trim", - "remove", - "ansi", - "styles", - "color", - "colour", - "colors", - "terminal", - "console", - "string", - "tty", - "escape", - "formatting", - "rgb", - "256", - "shell", - "xterm", - "log", - "logging", - "command-line", - "text" - ], - "license": "MIT", - "maintainers": [ - { - "name": "Sindre Sorhus", - "email": "sindresorhus@gmail.com", - "url": "sindresorhus.com" - }, - { - "name": "Joshua Boy Nicolai Appelman", - "email": "joshua@jbna.nl", - "url": "jbna.nl" - }, - { - "name": "JD Ballard", - "email": "i.am.qix@gmail.com", - "url": "github.com/qix-" - } - ], - "name": "strip-ansi", - "repository": { - "type": "git", - "url": "git+https://github.com/chalk/strip-ansi.git" - }, - "scripts": { - "test": "xo && ava" - }, - "version": "3.0.1" -} diff --git a/node_modules/wrap-ansi/node_modules/strip-ansi/readme.md b/node_modules/wrap-ansi/node_modules/strip-ansi/readme.md deleted file mode 100644 index cb7d9ff7e..000000000 --- a/node_modules/wrap-ansi/node_modules/strip-ansi/readme.md +++ /dev/null @@ -1,33 +0,0 @@ -# strip-ansi [![Build Status](https://travis-ci.org/chalk/strip-ansi.svg?branch=master)](https://travis-ci.org/chalk/strip-ansi) - -> Strip [ANSI escape codes](http://en.wikipedia.org/wiki/ANSI_escape_code) - - -## Install - -``` -$ npm install --save strip-ansi -``` - - -## Usage - -```js -var stripAnsi = require('strip-ansi'); - -stripAnsi('\u001b[4mcake\u001b[0m'); -//=> 'cake' -``` - - -## Related - -- [strip-ansi-cli](https://github.com/chalk/strip-ansi-cli) - CLI for this module -- [has-ansi](https://github.com/chalk/has-ansi) - Check if a string has ANSI escape codes -- [ansi-regex](https://github.com/chalk/ansi-regex) - Regular expression for matching ANSI escape codes -- [chalk](https://github.com/chalk/chalk) - Terminal string styling done right - - -## License - -MIT © [Sindre Sorhus](http://sindresorhus.com) diff --git a/node_modules/wrap-ansi/package.json b/node_modules/wrap-ansi/package.json index be03f8c1b..a32ea7e0e 100644 --- a/node_modules/wrap-ansi/package.json +++ b/node_modules/wrap-ansi/package.json @@ -1,36 +1,27 @@ { - "_args": [ - [ - "wrap-ansi@2.1.0", - "/Users/drew.heavner/Documents/Github/sign-android-release" - ] - ], - "_development": true, - "_from": "wrap-ansi@2.1.0", - "_id": "wrap-ansi@2.1.0", + "_from": "wrap-ansi@^5.1.0", + "_id": "wrap-ansi@5.1.0", "_inBundle": false, - "_integrity": "sha1-2Pw9KE3QV5T+hJc8rs3Rz4JP3YU=", + "_integrity": "sha512-QC1/iN/2/RPVJ5jYK8BGttj5z83LmSKmvbvrXPNCLZSEb32KKVDJDl/MOt2N01qU2H/FkzEa9PKto1BqDjtd7Q==", "_location": "/wrap-ansi", - "_phantomChildren": { - "code-point-at": "1.1.0", - "number-is-nan": "1.0.1" - }, + "_phantomChildren": {}, "_requested": { - "type": "version", + "type": "range", "registry": true, - "raw": "wrap-ansi@2.1.0", + "raw": "wrap-ansi@^5.1.0", "name": "wrap-ansi", "escapedName": "wrap-ansi", - "rawSpec": "2.1.0", + "rawSpec": "^5.1.0", "saveSpec": null, - "fetchSpec": "2.1.0" + "fetchSpec": "^5.1.0" }, "_requiredBy": [ "/cliui" ], - "_resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-2.1.0.tgz", - "_spec": "2.1.0", - "_where": "/Users/drew.heavner/Documents/Github/sign-android-release", + "_resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-5.1.0.tgz", + "_shasum": "1fd1f67235d5b6d0fee781056001bfb694c03b09", + "_spec": "wrap-ansi@^5.1.0", + "_where": "/Users/drew.heavner/Documents/Github/sign-android-release/node_modules/cliui", "author": { "name": "Sindre Sorhus", "email": "sindresorhus@gmail.com", @@ -39,22 +30,24 @@ "bugs": { "url": "https://github.com/chalk/wrap-ansi/issues" }, + "bundleDependencies": false, "dependencies": { - "string-width": "^1.0.1", - "strip-ansi": "^3.0.1" + "ansi-styles": "^3.2.0", + "string-width": "^3.0.0", + "strip-ansi": "^5.0.0" }, + "deprecated": false, "description": "Wordwrap a string with ANSI escape codes", "devDependencies": { - "ava": "^0.16.0", - "chalk": "^1.1.0", - "coveralls": "^2.11.4", - "has-ansi": "^2.0.0", - "nyc": "^6.2.1", - "strip-ansi": "^3.0.0", - "xo": "*" + "ava": "^1.2.1", + "chalk": "^2.4.2", + "coveralls": "^3.0.3", + "has-ansi": "^3.0.0", + "nyc": "^13.3.0", + "xo": "^0.24.0" }, "engines": { - "node": ">=0.10.0" + "node": ">=6" }, "files": [ "index.js" @@ -88,36 +81,13 @@ "text" ], "license": "MIT", - "maintainers": [ - { - "name": "Sindre Sorhus", - "email": "sindresorhus@gmail.com", - "url": "sindresorhus.com" - }, - { - "name": "Joshua Appelman", - "email": "jappelman@xebia.com", - "url": "jbnicolai.com" - }, - { - "name": "JD Ballard", - "email": "i.am.qix@gmail.com", - "url": "github.com/qix-" - }, - { - "name": "Benjamin Coe", - "email": "ben@npmjs.com", - "url": "github.com/bcoe" - } - ], "name": "wrap-ansi", "repository": { "type": "git", "url": "git+https://github.com/chalk/wrap-ansi.git" }, "scripts": { - "coveralls": "nyc report --reporter=text-lcov | coveralls", "test": "xo && nyc ava" }, - "version": "2.1.0" + "version": "5.1.0" } diff --git a/node_modules/wrap-ansi/readme.md b/node_modules/wrap-ansi/readme.md index 59fc96bda..73b87de22 100644 --- a/node_modules/wrap-ansi/readme.md +++ b/node_modules/wrap-ansi/readme.md @@ -1,12 +1,12 @@ # wrap-ansi [![Build Status](https://travis-ci.org/chalk/wrap-ansi.svg?branch=master)](https://travis-ci.org/chalk/wrap-ansi) [![Coverage Status](https://coveralls.io/repos/github/chalk/wrap-ansi/badge.svg?branch=master)](https://coveralls.io/github/chalk/wrap-ansi?branch=master) -> Wordwrap a string with [ANSI escape codes](http://en.wikipedia.org/wiki/ANSI_escape_code#Colors_and_Styles) +> Wordwrap a string with [ANSI escape codes](https://en.wikipedia.org/wiki/ANSI_escape_code#Colors_and_Styles) ## Install ``` -$ npm install --save wrap-ansi +$ npm install wrap-ansi ``` @@ -24,6 +24,20 @@ console.log(wrapAnsi(input, 20)); +--- + +
      + + Get professional support for this package with a Tidelift subscription + +
      + + Tidelift helps make open source sustainable for maintainers while giving companies
      assurances about security, maintenance, and licensing for their dependencies. +
      +
      + +--- + ## API @@ -45,6 +59,8 @@ Number of columns to wrap the text to. #### options +Type: `Object` + ##### hard Type: `boolean`
      @@ -59,6 +75,13 @@ Default: `true` By default, an attempt is made to split words at spaces, ensuring that they don't extend past the configured columns. If wordWrap is `false`, each column will instead be completely filled splitting words as necessary. +##### trim + +Type: `boolean`
      +Default: `true` + +Whitespace on all lines is removed by default. Set this option to `false` if you don't want to trim. + ## Related @@ -68,6 +91,18 @@ By default, an attempt is made to split words at spaces, ensuring that they don' - [jsesc](https://github.com/mathiasbynens/jsesc) - Generate ASCII-only output from Unicode strings. Useful for creating test fixtures. +## Maintainers + +- [Sindre Sorhus](https://github.com/sindresorhus) +- [Josh Junon](https://github.com/qix-) +- [Benjamin Coe](https://github.com/bcoe) + + +## Security + +To report a security vulnerability, please use the [Tidelift security contact](https://tidelift.com/security). Tidelift will coordinate the fix and disclosure. + + ## License -MIT © [Sindre Sorhus](https://sindresorhus.com) +MIT diff --git a/node_modules/yargs-parser/CHANGELOG.md b/node_modules/yargs-parser/CHANGELOG.md index 06c42c3cf..df11c0024 100644 --- a/node_modules/yargs-parser/CHANGELOG.md +++ b/node_modules/yargs-parser/CHANGELOG.md @@ -1,7 +1,62 @@ -# Change Log +# Changelog All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines. +### [13.1.1](https://www.github.com/yargs/yargs-parser/compare/v13.1.0...v13.1.1) (2019-06-10) + + +### Bug Fixes + +* convert values to strings when tokenizing ([#167](https://www.github.com/yargs/yargs-parser/issues/167)) ([57b7883](https://www.github.com/yargs/yargs-parser/commit/57b7883)) +* nargs should allow duplicates when duplicate-arguments-array=false ([#164](https://www.github.com/yargs/yargs-parser/issues/164)) ([47ccb0b](https://www.github.com/yargs/yargs-parser/commit/47ccb0b)) +* should populate "_" when given config with "short-option-groups" false ([#179](https://www.github.com/yargs/yargs-parser/issues/179)) ([6055974](https://www.github.com/yargs/yargs-parser/commit/6055974)) + +## [13.1.0](https://github.com/yargs/yargs-parser/compare/v13.0.0...v13.1.0) (2019-05-05) + + +### Features + +* add `strip-aliased` and `strip-dashed` configuration options. ([#172](https://github.com/yargs/yargs-parser/issues/172)) ([a3936aa](https://github.com/yargs/yargs-parser/commit/a3936aa)) +* support boolean which do not consume next argument. ([#171](https://github.com/yargs/yargs-parser/issues/171)) ([0ae7fcb](https://github.com/yargs/yargs-parser/commit/0ae7fcb)) + + + + +# [13.0.0](https://github.com/yargs/yargs-parser/compare/v12.0.0...v13.0.0) (2019-02-02) + + +### Features + +* don't coerce number from string with leading '0' or '+' ([#158](https://github.com/yargs/yargs-parser/issues/158)) ([18d0fd5](https://github.com/yargs/yargs-parser/commit/18d0fd5)) + + +### BREAKING CHANGES + +* options with leading '+' or '0' now parse as strings + + + + +# [12.0.0](https://github.com/yargs/yargs-parser/compare/v11.1.1...v12.0.0) (2019-01-29) + + +### Bug Fixes + +* better handling of quoted strings ([#153](https://github.com/yargs/yargs-parser/issues/153)) ([2fb71b2](https://github.com/yargs/yargs-parser/commit/2fb71b2)) + + +### Features + +* default value is now used if no right-hand value provided for numbers/strings ([#156](https://github.com/yargs/yargs-parser/issues/156)) ([5a7c46a](https://github.com/yargs/yargs-parser/commit/5a7c46a)) + + +### BREAKING CHANGES + +* a flag with no right-hand value no longer populates defaulted options with `undefined`. +* quotes at beginning and endings of strings are not removed during parsing. + + + ## [11.1.1](https://github.com/yargs/yargs-parser/compare/v11.1.0...v11.1.1) (2018-11-19) diff --git a/node_modules/yargs-parser/README.md b/node_modules/yargs-parser/README.md index 5847dffee..dde9f84d1 100644 --- a/node_modules/yargs-parser/README.md +++ b/node_modules/yargs-parser/README.md @@ -58,22 +58,24 @@ Parses command line arguments returning a simple mapping of keys and values. * `args`: a string or array of strings representing the options to parse. * `opts`: provide a set of hints indicating how `args` should be parsed: * `opts.alias`: an object representing the set of aliases for a key: `{alias: {foo: ['f']}}`. - * `opts.array`: indicate that keys should be parsed as an array: `{array: ['foo', 'bar']}`. - Indicate that keys should be parsed as an array and coerced to booleans / numbers: - `{array: [{ key: 'foo', boolean: true }, {key: 'bar', number: true}]}`. + * `opts.array`: indicate that keys should be parsed as an array: `{array: ['foo', 'bar']}`.
      + Indicate that keys should be parsed as an array and coerced to booleans / numbers:
      + `{array: [{ key: 'foo', boolean: true }, {key: 'bar', number: true}]}`. * `opts.boolean`: arguments should be parsed as booleans: `{boolean: ['x', 'y']}`. - * `opts.config`: indicate a key that represents a path to a configuration file (this file will be loaded and parsed). * `opts.coerce`: provide a custom synchronous function that returns a coerced value from the argument provided - (or throws an error), e.g. `{coerce: {foo: function (arg) {return modifiedArg}}}`. + (or throws an error). For arrays the function is called only once for the entire array:
      + `{coerce: {foo: function (arg) {return modifiedArg}}}`. + * `opts.config`: indicate a key that represents a path to a configuration file (this file will be loaded and parsed). + * `opts.configObjects`: configuration objects to parse, their properties will be set as arguments:
      + `{configObjects: [{'x': 5, 'y': 33}, {'z': 44}]}`. + * `opts.configuration`: provide configuration options to the yargs-parser (see: [configuration](#configuration)). * `opts.count`: indicate a key that should be used as a counter, e.g., `-vvv` = `{v: 3}`. * `opts.default`: provide default values for keys: `{default: {x: 33, y: 'hello world!'}}`. * `opts.envPrefix`: environment variables (`process.env`) with the prefix provided should be parsed. * `opts.narg`: specify that a key requires `n` arguments: `{narg: {x: 2}}`. * `opts.normalize`: `path.normalize()` will be applied to values set to this key. - * `opts.string`: keys should be treated as strings (even if they resemble a number `-x 33`). - * `opts.configuration`: provide configuration options to the yargs-parser (see: [configuration](#configuration)). * `opts.number`: keys should be treated as numbers. - * `opts['--']`: arguments after the end-of-options flag `--` will be set to the `argv.['--']` array instead of being set to the `argv._` array. + * `opts.string`: keys should be treated as strings (even if they resemble a number `-x 33`). **returns:** @@ -325,20 +327,63 @@ node example.js -a 1 -c 2 * default: `false`. * key: `halt-at-non-option`. -Should parsing stop at the first text argument? This is similar to how e.g. `ssh` parses its command line. +Should parsing stop at the first positional argument? This is similar to how e.g. `ssh` parses its command line. _If disabled:_ ```sh node example.js -a run b -x y -{ _: [ 'run', 'b', 'y' ], a: true, x: true } +{ _: [ 'b' ], a: 'run', x: 'y' } ``` _If enabled:_ ```sh node example.js -a run b -x y -{ _: [ 'run', 'b', '-x', 'y' ], a: true } +{ _: [ 'b', '-x', 'y' ], a: 'run' } +``` + +### strip aliased + +* default: `false` +* key: `strip-aliased` + +Should aliases be removed before returning results? + +_If disabled:_ + +```sh +node example.js --test-field 1 +{ _: [], 'test-field': 1, testField: 1, 'test-alias': 1, testAlias: 1 } +``` + +_If enabled:_ + +```sh +node example.js --test-field 1 +{ _: [], 'test-field': 1, testField: 1 } +``` + +### strip dashed + +* default: `false` +* key: `strip-dashed` + +Should dashed keys be removed before returning results? This option has no effect if +`camel-case-exansion` is disabled. + +_If disabled:_ + +```sh +node example.js --test-field 1 +{ _: [], 'test-field': 1, testField: 1 } +``` + +_If enabled:_ + +```sh +node example.js --test-field 1 +{ _: [], testField: 1 } ``` ## Special Thanks diff --git a/node_modules/yargs-parser/index.js b/node_modules/yargs-parser/index.js index 69fa72dc1..f9ee82414 100644 --- a/node_modules/yargs-parser/index.js +++ b/node_modules/yargs-parser/index.js @@ -9,9 +9,10 @@ function parse (args, opts) { // allow a string argument to be passed in rather // than an argv array. args = tokenizeArgString(args) + // aliases might have transitive relationships, normalize this. var aliases = combineAliases(opts.alias || {}) - var configuration = assign({ + var configuration = Object.assign({ 'short-option-groups': true, 'camel-case-expansion': true, 'dot-notation': true, @@ -23,7 +24,9 @@ function parse (args, opts) { 'populate--': false, 'combine-arrays': false, 'set-placeholder-key': false, - 'halt-at-non-option': false + 'halt-at-non-option': false, + 'strip-aliased': false, + 'strip-dashed': false }, opts.configuration) var defaults = opts.default || {} var configObjects = opts.configObjects || [] @@ -32,9 +35,7 @@ function parse (args, opts) { var notFlagsArgv = notFlagsOption ? '--' : '_' var newAliases = {} // allow a i18n handler to be passed in, default to a fake one (util.format). - var __ = opts.__ || function (str) { - return util.format.apply(util, Array.prototype.slice.call(arguments)) - } + var __ = opts.__ || util.format var error = null var flags = { aliases: {}, @@ -176,7 +177,7 @@ function parse (args, opts) { // -- seperated by space. } else if (arg.match(/^--.+/) || ( - !configuration['short-option-groups'] && arg.match(/^-.+/) + !configuration['short-option-groups'] && arg.match(/^-[^-]+/) )) { key = arg.match(/^--?(.+)/)[1] @@ -187,7 +188,7 @@ function parse (args, opts) { } else if (checkAllAliases(key, flags.arrays) && args.length > i + 1) { i = eatArray(i, key, args) } else { - next = args[i + 1] + next = flags.nargs[key] === 0 ? undefined : args[i + 1] if (next !== undefined && (!next.match(/^-/) || next.match(negative)) && @@ -199,7 +200,7 @@ function parse (args, opts) { setArg(key, next) i++ } else { - setArg(key, defaultForType(guessType(key, flags))) + setArg(key, defaultValue(key)) } } @@ -219,7 +220,7 @@ function parse (args, opts) { setArg(key, next) i++ } else { - setArg(key, defaultForType(guessType(key, flags))) + setArg(key, defaultValue(key)) } } else if (arg.match(/^-[^-]+/) && !arg.match(negative)) { letters = arg.slice(1, -1).split('') @@ -266,7 +267,7 @@ function parse (args, opts) { broken = true break } else { - setArg(letters[j], defaultForType(guessType(letters[j], flags))) + setArg(letters[j], defaultValue(letters[j])) } } @@ -292,7 +293,7 @@ function parse (args, opts) { setArg(key, next) i++ } else { - setArg(key, defaultForType(guessType(key, flags))) + setArg(key, defaultValue(key)) } } } @@ -332,6 +333,23 @@ function parse (args, opts) { argv[notFlagsArgv].push(key) }) + if (configuration['camel-case-expansion'] && configuration['strip-dashed']) { + Object.keys(argv).filter(key => key !== '--' && key.includes('-')).forEach(key => { + delete argv[key] + }) + } + + if (configuration['strip-aliased']) { + // XXX Switch to [].concat(...Object.values(aliases)) once node.js 6 is dropped + ;[].concat(...Object.keys(aliases).map(k => aliases[k])).forEach(alias => { + if (configuration['camel-case-expansion']) { + delete argv[alias.split('.').map(prop => camelCase(prop)).join('.')] + } + + delete argv[alias] + }) + } + // how many arguments should we consume, based // on the nargs option? function eatNargs (i, key, args) { @@ -403,7 +421,7 @@ function parse (args, opts) { setKey(argv, splitKey, value) // handle populating aliases of the full key - if (flags.aliases[key]) { + if (flags.aliases[key] && flags.aliases[key].forEach) { flags.aliases[key].forEach(function (x) { x = x.split('.') setKey(argv, x, value) @@ -450,6 +468,14 @@ function parse (args, opts) { } function processValue (key, val) { + // strings may be quoted, clean this up as we assign values. + if (typeof val === 'string' && + (val[0] === "'" || val[0] === '"') && + val[val.length - 1] === val[0] + ) { + val = val.substring(1, val.length - 1) + } + // handle parsing boolean arguments --foo=true --bar false. if (checkAllAliases(key, flags.bools) || checkAllAliases(key, flags.counts)) { if (typeof val === 'string') val = val === 'true' @@ -633,6 +659,10 @@ function parse (args, opts) { if (!configuration['dot-notation']) keys = [keys.join('.')] keys.slice(0, -1).forEach(function (key, index) { + // TODO(bcoe): in the next major version of yargs, switch to + // Object.create(null) for dot notation: + key = sanitizeKey(key) + if (typeof o === 'object' && o[key] === undefined) { o[key] = {} } @@ -652,11 +682,21 @@ function parse (args, opts) { } }) - var key = keys[keys.length - 1] + // TODO(bcoe): in the next major version of yargs, switch to + // Object.create(null) for dot notation: + const key = sanitizeKey(keys[keys.length - 1]) - var isTypeArray = checkAllAliases(keys.join('.'), flags.arrays) - var isValueArray = Array.isArray(value) - var duplicate = configuration['duplicate-arguments-array'] + const isTypeArray = checkAllAliases(keys.join('.'), flags.arrays) + const isValueArray = Array.isArray(value) + let duplicate = configuration['duplicate-arguments-array'] + + // nargs has higher priority than duplicate + if (!duplicate && checkAllAliases(key, flags.nargs)) { + duplicate = true + if ((!isUndefined(o[key]) && flags.nargs[key] === 1) || (Array.isArray(o[key]) && o[key].length === flags.nargs[key])) { + o[key] = undefined + } + } if (value === increment) { o[key] = increment(o[key]) @@ -678,8 +718,8 @@ function parse (args, opts) { } // extend the aliases list with inferred aliases. - function extendAliases () { - Array.prototype.slice.call(arguments).forEach(function (obj) { + function extendAliases (...args) { + args.forEach(function (obj) { Object.keys(obj || {}).forEach(function (key) { // short-circuit if we've already added a key // to the aliases array, for example it might @@ -740,6 +780,18 @@ function parse (args, opts) { }) } + // make a best effor to pick a default value + // for an option based on name and type. + function defaultValue (key) { + if (!checkAllAliases(key, flags.bools) && + !checkAllAliases(key, flags.counts) && + `${key}` in defaults) { + return defaults[key] + } else { + return defaultForType(guessType(key)) + } + } + // return a default value, given the type of a flag., // e.g., key of type 'string' will default to '', rather than 'true'. function defaultForType (type) { @@ -754,7 +806,7 @@ function parse (args, opts) { } // given a flag, enforce a default type. - function guessType (key, flags) { + function guessType (key) { var type = 'boolean' if (checkAllAliases(key, flags.strings)) type = 'string' @@ -765,9 +817,14 @@ function parse (args, opts) { } function isNumber (x) { + if (x === null || x === undefined) return false + // if loaded from config, may already be a number. if (typeof x === 'number') return true + // hexadecimal. if (/^0x[0-9a-f]+$/i.test(x)) return true - return /^[-+]?(?:\d+(?:\.\d*)?|\.\d+)(e[-+]?\d+)?$/.test(x) + // don't treat 0123 as a number; as it drops the leading '0'. + if (x.length > 1 && x[0] === '0') return false + return /^[-]?(?:\d+(?:\.\d*)?|\.\d+)(e[-+]?\d+)?$/.test(x) } function isUndefined (num) { @@ -830,20 +887,6 @@ function combineAliases (aliases) { return combined } -function assign (defaults, configuration) { - var o = {} - configuration = configuration || {} - - Object.keys(defaults).forEach(function (k) { - o[k] = defaults[k] - }) - Object.keys(configuration).forEach(function (k) { - o[k] = configuration[k] - }) - - return o -} - // this function should only be called when a count is given as an arg // it is NOT called to set a default value // thus we can start the count at 1 instead of 0 @@ -863,4 +906,11 @@ Parser.detailed = function (args, opts) { return parse(args.slice(), opts) } +// TODO(bcoe): in the next major version of yargs, switch to +// Object.create(null) for dot notation: +function sanitizeKey (key) { + if (key === '__proto__') return '___proto___' + return key +} + module.exports = Parser diff --git a/node_modules/yargs-parser/lib/tokenize-arg-string.js b/node_modules/yargs-parser/lib/tokenize-arg-string.js index 73e14cd64..fe05e27fd 100644 --- a/node_modules/yargs-parser/lib/tokenize-arg-string.js +++ b/node_modules/yargs-parser/lib/tokenize-arg-string.js @@ -1,6 +1,8 @@ // take an un-split argv string and tokenize it. module.exports = function (argString) { - if (Array.isArray(argString)) return argString + if (Array.isArray(argString)) { + return argString.map(e => typeof e !== 'string' ? e + '' : e) + } argString = argString.trim() @@ -25,12 +27,9 @@ module.exports = function (argString) { // don't split the string if we're in matching // opening or closing single and double quotes. if (c === opening) { - if (!args[i]) args[i] = '' opening = null - continue } else if ((c === "'" || c === '"') && !opening) { opening = c - continue } if (!args[i]) args[i] = '' diff --git a/node_modules/yargs-parser/package.json b/node_modules/yargs-parser/package.json index 0c949ea19..712ef185e 100644 --- a/node_modules/yargs-parser/package.json +++ b/node_modules/yargs-parser/package.json @@ -1,33 +1,28 @@ { - "_args": [ - [ - "yargs-parser@11.1.1", - "/Users/drew.heavner/Documents/Github/sign-android-release" - ] - ], - "_development": true, - "_from": "yargs-parser@11.1.1", - "_id": "yargs-parser@11.1.1", + "_from": "yargs-parser@^13.1.2", + "_id": "yargs-parser@13.1.2", "_inBundle": false, - "_integrity": "sha512-C6kB/WJDiaxONLJQnF8ccx9SEeoTTLek8RVbaOIsrAUS8VrBEXfmeSnCZxygc+XC2sNMBIwOOnfcxiynjHsVSQ==", + "_integrity": "sha512-3lbsNRf/j+A4QuSZfDRA7HRSfWrzO0YjqTJd5kjAq37Zep1CEgaYmrH9Q3GwPiB9cHyd1Y1UwggGhJGoxipbzg==", "_location": "/yargs-parser", "_phantomChildren": {}, "_requested": { - "type": "version", + "type": "range", "registry": true, - "raw": "yargs-parser@11.1.1", + "raw": "yargs-parser@^13.1.2", "name": "yargs-parser", "escapedName": "yargs-parser", - "rawSpec": "11.1.1", + "rawSpec": "^13.1.2", "saveSpec": null, - "fetchSpec": "11.1.1" + "fetchSpec": "^13.1.2" }, "_requiredBy": [ + "/jest/jest-cli/yargs", "/yargs" ], - "_resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-11.1.1.tgz", - "_spec": "11.1.1", - "_where": "/Users/drew.heavner/Documents/Github/sign-android-release", + "_resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-13.1.2.tgz", + "_shasum": "130f09702ebaeef2650d54ce6e3e5706f7a4fb38", + "_spec": "yargs-parser@^13.1.2", + "_where": "/Users/drew.heavner/Documents/Github/sign-android-release/node_modules/yargs", "author": { "name": "Ben Coe", "email": "ben@npmjs.com" @@ -35,18 +30,20 @@ "bugs": { "url": "https://github.com/yargs/yargs-parser/issues" }, + "bundleDependencies": false, "dependencies": { "camelcase": "^5.0.0", "decamelize": "^1.2.0" }, + "deprecated": false, "description": "the mighty option parser used by yargs", "devDependencies": { "chai": "^4.2.0", "coveralls": "^3.0.2", "mocha": "^5.2.0", - "nyc": "^13.0.1", + "nyc": "^14.1.0", "standard": "^12.0.1", - "standard-version": "^4.4.0" + "standard-version": "^6.0.0" }, "engine": { "node": ">=6" @@ -79,5 +76,5 @@ "release": "standard-version", "test": "nyc mocha test/*.js" }, - "version": "11.1.1" + "version": "13.1.2" } diff --git a/node_modules/yargs/CHANGELOG.md b/node_modules/yargs/CHANGELOG.md index 506764c1b..d78987002 100644 --- a/node_modules/yargs/CHANGELOG.md +++ b/node_modules/yargs/CHANGELOG.md @@ -1,7 +1,111 @@ -# Change Log +# Changelog All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines. +## [13.3.0](https://www.github.com/yargs/yargs/compare/v13.2.4...v13.3.0) (2019-06-10) + + +### Bug Fixes + +* **deps:** yargs-parser update addressing several parsing bugs ([#1357](https://www.github.com/yargs/yargs/issues/1357)) ([e230d5b](https://www.github.com/yargs/yargs/commit/e230d5b)) + + +### Features + +* **i18n:** swap out os-locale dependency for simple inline implementation ([#1356](https://www.github.com/yargs/yargs/issues/1356)) ([4dfa19b](https://www.github.com/yargs/yargs/commit/4dfa19b)) +* support defaultDescription for positional arguments ([812048c](https://www.github.com/yargs/yargs/commit/812048c)) + +### [13.2.4](https://github.com/yargs/yargs/compare/v13.2.3...v13.2.4) (2019-05-13) + + +### Bug Fixes + +* **i18n:** rename unclear 'implication failed' to 'missing dependent arguments' ([#1317](https://github.com/yargs/yargs/issues/1317)) ([bf46813](https://github.com/yargs/yargs/commit/bf46813)) + + + +### [13.2.3](https://github.com/yargs/yargs/compare/v13.2.2...v13.2.3) (2019-05-05) + + +### Bug Fixes + +* **deps:** upgrade cliui for compatibility with latest chalk. ([#1330](https://github.com/yargs/yargs/issues/1330)) ([b20db65](https://github.com/yargs/yargs/commit/b20db65)) +* address issues with dutch translation ([#1316](https://github.com/yargs/yargs/issues/1316)) ([0295132](https://github.com/yargs/yargs/commit/0295132)) + + +### Tests + +* accept differently formatted output ([#1327](https://github.com/yargs/yargs/issues/1327)) ([c294d1b](https://github.com/yargs/yargs/commit/c294d1b)) + + + +## [13.2.2](https://github.com/yargs/yargs/compare/v13.2.1...v13.2.2) (2019-03-06) + + + +## [13.2.1](https://github.com/yargs/yargs/compare/v13.2.0...v13.2.1) (2019-02-18) + + +### Bug Fixes + +* add zsh script to files array ([3180224](https://github.com/yargs/yargs/commit/3180224)) +* support options/sub-commands in zsh completion ([0a96394](https://github.com/yargs/yargs/commit/0a96394)) + + +# [13.2.0](https://github.com/yargs/yargs/compare/v13.1.0...v13.2.0) (2019-02-15) + + +### Features + +* zsh auto completion ([#1292](https://github.com/yargs/yargs/issues/1292)) ([16c5d25](https://github.com/yargs/yargs/commit/16c5d25)), closes [#1156](https://github.com/yargs/yargs/issues/1156) + + + +# [13.1.0](https://github.com/yargs/yargs/compare/v13.0.0...v13.1.0) (2019-02-12) + + +### Features + +* add applyBeforeValidation, for applying sync middleware before validation ([5be206a](https://github.com/yargs/yargs/commit/5be206a)) + + + + +# [13.0.0](https://github.com/yargs/yargs/compare/v12.0.5...v13.0.0) (2019-02-02) + + +### Bug Fixes + +* **deps:** Update os-locale to avoid security vulnerability ([#1270](https://github.com/yargs/yargs/issues/1270)) ([27bf739](https://github.com/yargs/yargs/commit/27bf739)) +* **validation:** Use the error as a message when none exists otherwise ([#1268](https://github.com/yargs/yargs/issues/1268)) ([0510fe6](https://github.com/yargs/yargs/commit/0510fe6)) +* better bash path completion ([#1272](https://github.com/yargs/yargs/issues/1272)) ([da75ea2](https://github.com/yargs/yargs/commit/da75ea2)) +* middleware added multiple times due to reference bug ([#1282](https://github.com/yargs/yargs/issues/1282)) ([64af518](https://github.com/yargs/yargs/commit/64af518)) + + +### Chores + +* ~drop Node 6 from testing matrix ([#1287](https://github.com/yargs/yargs/issues/1287)) ([ef16792](https://github.com/yargs/yargs/commit/ef16792))~ + * _opting to not drop Node 6 support until April, [see](https://github.com/nodejs/Release)._ +* update dependencies ([#1284](https://github.com/yargs/yargs/issues/1284)) ([f25de4f](https://github.com/yargs/yargs/commit/f25de4f)) + + +### Features + +* Add `.parserConfiguration()` method, deprecating package.json config ([#1262](https://github.com/yargs/yargs/issues/1262)) ([3c6869a](https://github.com/yargs/yargs/commit/3c6869a)) +* adds config option for sorting command output ([#1256](https://github.com/yargs/yargs/issues/1256)) ([6916ce9](https://github.com/yargs/yargs/commit/6916ce9)) +* options/positionals with leading '+' and '0' no longer parse as numbers ([#1286](https://github.com/yargs/yargs/issues/1286)) ([e9dc3aa](https://github.com/yargs/yargs/commit/e9dc3aa)) +* support promises in middleware ([f3a4e4f](https://github.com/yargs/yargs/commit/f3a4e4f)) + + +### BREAKING CHANGES + +* options with leading '+' or '0' now parse as strings +* dropping Node 6 which hits end of life in April 2019 +* see [yargs-parser@12.0.0 CHANGELOG](https://github.com/yargs/yargs-parser/blob/master/CHANGELOG.md#breaking-changes) +* we now warn if the yargs stanza package.json is used. + + + ## [12.0.5](https://github.com/yargs/yargs/compare/v12.0.4...v12.0.5) (2018-11-19) diff --git a/node_modules/yargs/README.md b/node_modules/yargs/README.md index b821f12c5..6b7d09662 100644 --- a/node_modules/yargs/README.md +++ b/node_modules/yargs/README.md @@ -31,12 +31,12 @@ It gives you: Stable version: ```bash -npm i yargs --save +npm i yargs ``` Bleeding edge version with the most recent features: ```bash -npm i yargs@next --save +npm i yargs@next ``` ## Usage : diff --git a/node_modules/yargs/completion.sh.hbs b/node_modules/yargs/completion.sh.hbs deleted file mode 100644 index 819c8ae83..000000000 --- a/node_modules/yargs/completion.sh.hbs +++ /dev/null @@ -1,28 +0,0 @@ -###-begin-{{app_name}}-completions-### -# -# yargs command completion script -# -# Installation: {{app_path}} {{completion_command}} >> ~/.bashrc -# or {{app_path}} {{completion_command}} >> ~/.bash_profile on OSX. -# -_yargs_completions() -{ - local cur_word args type_list - - cur_word="${COMP_WORDS[COMP_CWORD]}" - args=("${COMP_WORDS[@]}") - - # ask yargs to generate completions. - type_list=$({{app_path}} --get-yargs-completions "${args[@]}") - - COMPREPLY=( $(compgen -W "${type_list}" -- ${cur_word}) ) - - # if no match was found, fall back to filename completion - if [ ${#COMPREPLY[@]} -eq 0 ]; then - COMPREPLY=( $(compgen -f -- "${cur_word}" ) ) - fi - - return 0 -} -complete -F _yargs_completions {{app_name}} -###-end-{{app_name}}-completions-### diff --git a/node_modules/yargs/lib/argsert.js b/node_modules/yargs/lib/argsert.js index ed1d59871..f310b4e74 100644 --- a/node_modules/yargs/lib/argsert.js +++ b/node_modules/yargs/lib/argsert.js @@ -1,16 +1,18 @@ 'use strict' + +// hoisted due to circular dependency on command. +module.exports = argsert const command = require('./command')() const YError = require('./yerror') const positionName = ['first', 'second', 'third', 'fourth', 'fifth', 'sixth'] - -module.exports = function argsert (expected, callerArguments, length) { +function argsert (expected, callerArguments, length) { // TODO: should this eventually raise an exception. try { // preface the argument description with "cmd", so // that we can run it through yargs' command parser. let position = 0 - let parsed = {demanded: [], optional: []} + let parsed = { demanded: [], optional: [] } if (typeof expected === 'object') { length = callerArguments callerArguments = expected diff --git a/node_modules/yargs/lib/command.js b/node_modules/yargs/lib/command.js index 65ffc4ea5..895423a2b 100644 --- a/node_modules/yargs/lib/command.js +++ b/node_modules/yargs/lib/command.js @@ -1,6 +1,8 @@ 'use strict' const inspect = require('util').inspect +const isPromise = require('./is-promise') +const { applyMiddleware, commandMiddlewareFactory } = require('./middleware') const path = require('path') const Parser = require('yargs-parser') @@ -15,12 +17,12 @@ module.exports = function command (yargs, usage, validation, globalMiddleware) { let aliasMap = {} let defaultCommand globalMiddleware = globalMiddleware || [] - self.addHandler = function addHandler (cmd, description, builder, handler, middlewares) { + + self.addHandler = function addHandler (cmd, description, builder, handler, commandMiddleware) { let aliases = [] + const middlewares = commandMiddlewareFactory(commandMiddleware) handler = handler || (() => {}) - middlewares = middlewares || [] - globalMiddleware.push(...middlewares) - middlewares = globalMiddleware + if (Array.isArray(cmd)) { aliases = cmd.slice(1) cmd = cmd[0] @@ -223,23 +225,25 @@ module.exports = function command (yargs, usage, validation, globalMiddleware) { positionalMap = populatePositionals(commandHandler, innerArgv, currentContext, yargs) } + const middlewares = globalMiddleware.slice(0).concat(commandHandler.middlewares || []) + applyMiddleware(innerArgv, yargs, middlewares, true) + // we apply validation post-hoc, so that custom // checks get passed populated positional arguments. if (!yargs._hasOutput()) yargs._runValidation(innerArgv, aliases, positionalMap, yargs.parsed.error) if (commandHandler.handler && !yargs._hasOutput()) { yargs._setHasOutput() - if (commandHandler.middlewares.length > 0) { - const middlewareArgs = commandHandler.middlewares.reduce(function (initialObj, middleware) { - return Object.assign(initialObj, middleware(innerArgv)) - }, {}) - Object.assign(innerArgv, middlewareArgs) - } - const handlerResult = commandHandler.handler(innerArgv) - if (handlerResult && typeof handlerResult.then === 'function') { - handlerResult.then( - null, - (error) => yargs.getUsageInstance().fail(null, error) + + innerArgv = applyMiddleware(innerArgv, yargs, middlewares, false) + + const handlerResult = isPromise(innerArgv) + ? innerArgv.then(argv => commandHandler.handler(argv)) + : commandHandler.handler(innerArgv) + + if (isPromise(handlerResult)) { + handlerResult.catch(error => + yargs.getUsageInstance().fail(null, error) ) } } diff --git a/node_modules/yargs/lib/completion.js b/node_modules/yargs/lib/completion.js index ad6969a2d..e5cdd588a 100644 --- a/node_modules/yargs/lib/completion.js +++ b/node_modules/yargs/lib/completion.js @@ -1,5 +1,4 @@ 'use strict' -const fs = require('fs') const path = require('path') // add bash completions to your @@ -9,6 +8,7 @@ module.exports = function completion (yargs, usage, command) { completionKey: 'get-yargs-completions' } + const zshShell = process.env.SHELL && process.env.SHELL.indexOf('zsh') !== -1 // get a list of completion commands. // 'args' is the array of strings from the line to be completed self.getCompletion = function getCompletion (args, done) { @@ -16,6 +16,7 @@ module.exports = function completion (yargs, usage, command) { const current = args.length ? args[args.length - 1] : '' const argv = yargs.parse(args, true) const aliases = yargs.parsed.aliases + const parentCommands = yargs.getContext().commands // a custom completion function can be provided // to completion(). @@ -54,22 +55,33 @@ module.exports = function completion (yargs, usage, command) { } } - if (!current.match(/^-/)) { + if (!current.match(/^-/) && parentCommands[parentCommands.length - 1] !== current) { usage.getCommands().forEach((usageCommand) => { const commandName = command.parseCommand(usageCommand[0]).cmd if (args.indexOf(commandName) === -1) { - completions.push(commandName) + if (!zshShell) { + completions.push(commandName) + } else { + const desc = usageCommand[1] || '' + completions.push(commandName.replace(/:/g, '\\:') + ':' + desc) + } } }) } - if (current.match(/^-/)) { + if (current.match(/^-/) || (current === '' && completions.length === 0)) { + const descs = usage.getDescriptions() Object.keys(yargs.getOptions().key).forEach((key) => { // If the key and its aliases aren't in 'args', add the key to 'completions' const keyAndAliases = [key].concat(aliases[key] || []) const notInArgs = keyAndAliases.every(val => args.indexOf(`--${val}`) === -1) if (notInArgs) { - completions.push(`--${key}`) + if (!zshShell) { + completions.push(`--${key}`) + } else { + const desc = descs[key] || '' + completions.push(`--${key.replace(/:/g, '\\:')}:${desc.replace('__yargsString__:', '')}`) + } } }) } @@ -79,10 +91,8 @@ module.exports = function completion (yargs, usage, command) { // generate the completion script to add to your .bashrc. self.generateCompletionScript = function generateCompletionScript ($0, cmd) { - let script = fs.readFileSync( - path.resolve(__dirname, '../completion.sh.hbs'), - 'utf-8' - ) + const templates = require('./completion-templates') + let script = zshShell ? templates.completionZshTemplate : templates.completionShTemplate const name = path.basename($0) // add ./to applications not yet installed as bin. diff --git a/node_modules/yargs/lib/levenshtein.js b/node_modules/yargs/lib/levenshtein.js index dd3107333..c66c1babb 100644 --- a/node_modules/yargs/lib/levenshtein.js +++ b/node_modules/yargs/lib/levenshtein.js @@ -1,11 +1,22 @@ /* Copyright (c) 2011 Andrei Mackenzie -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of +the Software, and to permit persons to whom the Software is furnished to do so, +subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS +FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR +COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER +IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ // levenshtein distance algorithm, pulled from Andrei Mackenzie's MIT licensed. diff --git a/node_modules/yargs/lib/middleware.js b/node_modules/yargs/lib/middleware.js index 567ba571a..9f9c19696 100644 --- a/node_modules/yargs/lib/middleware.js +++ b/node_modules/yargs/lib/middleware.js @@ -1,10 +1,65 @@ -module.exports = function (globalMiddleware, context) { - return function (callback) { +'use strict' + +// hoisted due to circular dependency on command. +module.exports = { + applyMiddleware, + commandMiddlewareFactory, + globalMiddlewareFactory +} +const isPromise = require('./is-promise') +const argsert = require('./argsert') + +function globalMiddlewareFactory (globalMiddleware, context) { + return function (callback, applyBeforeValidation = false) { + argsert(' [boolean]', [callback, applyBeforeValidation], arguments.length) if (Array.isArray(callback)) { + for (let i = 0; i < callback.length; i++) { + if (typeof callback[i] !== 'function') { + throw Error('middleware must be a function') + } + callback[i].applyBeforeValidation = applyBeforeValidation + } Array.prototype.push.apply(globalMiddleware, callback) } else if (typeof callback === 'function') { + callback.applyBeforeValidation = applyBeforeValidation globalMiddleware.push(callback) } return context } } + +function commandMiddlewareFactory (commandMiddleware) { + if (!commandMiddleware) return [] + return commandMiddleware.map(middleware => { + middleware.applyBeforeValidation = false + return middleware + }) +} + +function applyMiddleware (argv, yargs, middlewares, beforeValidation) { + const beforeValidationError = new Error('middleware cannot return a promise when applyBeforeValidation is true') + return middlewares + .reduce((accumulation, middleware) => { + if (middleware.applyBeforeValidation !== beforeValidation && + !isPromise(accumulation)) { + return accumulation + } + + if (isPromise(accumulation)) { + return accumulation + .then(initialObj => + Promise.all([initialObj, middleware(initialObj, yargs)]) + ) + .then(([initialObj, middlewareObj]) => + Object.assign(initialObj, middlewareObj) + ) + } else { + const result = middleware(argv, yargs) + if (beforeValidation && isPromise(result)) throw beforeValidationError + + return isPromise(result) + ? result.then(middlewareObj => Object.assign(accumulation, middlewareObj)) + : Object.assign(accumulation, result) + } + }, argv) +} diff --git a/node_modules/yargs/lib/usage.js b/node_modules/yargs/lib/usage.js index 9be8a995b..8c3b068f8 100644 --- a/node_modules/yargs/lib/usage.js +++ b/node_modules/yargs/lib/usage.js @@ -1,6 +1,7 @@ 'use strict' // this file handles outputting usage instructions, // failures, etc. keeps logging in one place. +const decamelize = require('./decamelize') const stringWidth = require('string-width') const objFilter = require('./obj-filter') const path = require('path') @@ -180,7 +181,7 @@ module.exports = function usage (yargs, y18n) { usages.forEach((usage) => { ui.div(`${usage[0].replace(/\$0/g, base$0)}`) if (usage[1]) { - ui.div({text: `${usage[1]}`, padding: [1, 0, 0, 0]}) + ui.div({ text: `${usage[1]}`, padding: [1, 0, 0, 0] }) } }) ui.div() @@ -204,6 +205,10 @@ module.exports = function usage (yargs, y18n) { const context = yargs.getContext() const parentCommands = context.commands.length ? `${context.commands.join(' ')} ` : '' + if (yargs.getParserConfiguration()['sort-commands'] === true) { + commands = commands.sort((a, b) => a[0].localeCompare(b[0])) + } + commands.forEach((command) => { const commandString = `${base$0} ${parentCommands}${command[0].replace(/^\$0 ?/, '')}` // drop $0 from default commands. ui.span( @@ -212,7 +217,7 @@ module.exports = function usage (yargs, y18n) { padding: [0, 2, 0, 2], width: maxWidth(commands, theWrap, `${base$0}${parentCommands}`) + 4 }, - {text: command[1]} + { text: command[1] } ) const hints = [] if (command[2]) hints.push(`[${__('default:').slice(0, -1)}]`) // TODO hacking around i18n here @@ -220,7 +225,7 @@ module.exports = function usage (yargs, y18n) { hints.push(`[${__('aliases:')} ${command[3].join(', ')}]`) } if (hints.length) { - ui.div({text: hints.join(' '), padding: [0, 0, 0, 2], align: 'right'}) + ui.div({ text: hints.join(' '), padding: [0, 0, 0, 2], align: 'right' }) } else { ui.div() } @@ -296,11 +301,11 @@ module.exports = function usage (yargs, y18n) { ].filter(Boolean).join(' ') ui.span( - {text: kswitch, padding: [0, 2, 0, 2], width: maxWidth(switches, theWrap) + 4}, + { text: kswitch, padding: [0, 2, 0, 2], width: maxWidth(switches, theWrap) + 4 }, desc ) - if (extra) ui.div({text: extra, padding: [0, 0, 0, 2], align: 'right'}) + if (extra) ui.div({ text: extra, padding: [0, 0, 0, 2], align: 'right' }) else ui.div() }) @@ -428,7 +433,7 @@ module.exports = function usage (yargs, y18n) { } self.functionDescription = (fn) => { - const description = fn.name ? require('decamelize')(fn.name, '-') : __('generated-value') + const description = fn.name ? decamelize(fn.name, '-') : __('generated-value') return ['(', description, ')'].join('') } diff --git a/node_modules/yargs/locales/de.json b/node_modules/yargs/locales/de.json index d805710b0..05d983737 100644 --- a/node_modules/yargs/locales/de.json +++ b/node_modules/yargs/locales/de.json @@ -29,7 +29,7 @@ "Invalid values:": "Unzulässige Werte:", "Argument: %s, Given: %s, Choices: %s": "Argument: %s, Gegeben: %s, Möglichkeiten: %s", "Argument check failed: %s": "Argumente-Check fehlgeschlagen: %s", - "Implications failed:": "Implikationen fehlgeschlagen:", + "Implications failed:": "Fehlende abhängige Argumente:", "Not enough arguments following: %s": "Nicht genügend Argumente nach: %s", "Invalid JSON config file: %s": "Fehlerhafte JSON-Config Datei: %s", "Path to JSON config file": "Pfad zur JSON-Config Datei", diff --git a/node_modules/yargs/locales/en.json b/node_modules/yargs/locales/en.json index fc65c2a0d..b32a63f27 100644 --- a/node_modules/yargs/locales/en.json +++ b/node_modules/yargs/locales/en.json @@ -29,7 +29,7 @@ "Invalid values:": "Invalid values:", "Argument: %s, Given: %s, Choices: %s": "Argument: %s, Given: %s, Choices: %s", "Argument check failed: %s": "Argument check failed: %s", - "Implications failed:": "Implications failed:", + "Implications failed:": "Missing dependent arguments:", "Not enough arguments following: %s": "Not enough arguments following: %s", "Invalid JSON config file: %s": "Invalid JSON config file: %s", "Path to JSON config file": "Path to JSON config file", diff --git a/node_modules/yargs/locales/fr.json b/node_modules/yargs/locales/fr.json index 481f47e37..cf9c74bf5 100644 --- a/node_modules/yargs/locales/fr.json +++ b/node_modules/yargs/locales/fr.json @@ -28,7 +28,7 @@ "Invalid values:": "Valeurs invalides:", "Argument: %s, Given: %s, Choices: %s": "Argument: %s, Donné: %s, Choix: %s", "Argument check failed: %s": "Echec de la vérification de l'argument: %s", - "Implications failed:": "Implications échouées:", + "Implications failed:": "Arguments dépendants manquants:", "Not enough arguments following: %s": "Pas assez d'arguments suivant: %s", "Invalid JSON config file: %s": "Fichier de configuration JSON invalide: %s", "Path to JSON config file": "Chemin du fichier de configuration JSON", diff --git a/node_modules/yargs/locales/it.json b/node_modules/yargs/locales/it.json index f9eb3756e..9ee900d34 100644 --- a/node_modules/yargs/locales/it.json +++ b/node_modules/yargs/locales/it.json @@ -29,7 +29,7 @@ "Invalid values:": "Valori non validi:", "Argument: %s, Given: %s, Choices: %s": "Argomento: %s, Richiesto: %s, Scelte: %s", "Argument check failed: %s": "Controllo dell'argomento fallito: %s", - "Implications failed:": "Argomenti impliciti non soddisfatti:", + "Implications failed:": "Argomenti dipendenti mancanti:", "Not enough arguments following: %s": "Argomenti insufficienti dopo: %s", "Invalid JSON config file: %s": "File di configurazione JSON non valido: %s", "Path to JSON config file": "Percorso del file di configurazione JSON", diff --git a/node_modules/yargs/locales/nl.json b/node_modules/yargs/locales/nl.json index 1d144724e..5d62e0fc3 100644 --- a/node_modules/yargs/locales/nl.json +++ b/node_modules/yargs/locales/nl.json @@ -1,42 +1,42 @@ { - "Commands:": "Opdrachten:", + "Commands:": "Commando's:", "Options:": "Opties:", "Examples:": "Voorbeelden:", - "boolean": "boolean", + "boolean": "booleaans", "count": "aantal", - "string": "text", - "number": "nummer", + "string": "string", + "number": "getal", "array": "lijst", "required": "verplicht", "default:": "standaard:", "choices:": "keuzes:", "aliases:": "aliassen:", "generated-value": "gegenereerde waarde", - "Not enough non-option arguments: got %s, need at least %s": "Niet genoeg non-optie argumenten. Gekregen: %s, minstens nodig: %s", - "Too many non-option arguments: got %s, maximum of %s": "Te veel non-optie argumenten. Gekregen: %s, maximum: %s", + "Not enough non-option arguments: got %s, need at least %s": "Niet genoeg niet-optie-argumenten: %s gekregen, minstens %s nodig", + "Too many non-option arguments: got %s, maximum of %s": "Te veel niet-optie-argumenten: %s gekregen, maximum is %s", "Missing argument value: %s": { - "one": "Missing argument value: %s", - "other": "Missing argument values: %s" + "one": "Missende argumentwaarde: %s", + "other": "Missende argumentwaarden: %s" }, "Missing required argument: %s": { - "one": "Missend verplichte argument: %s", + "one": "Missend verplicht argument: %s", "other": "Missende verplichte argumenten: %s" }, "Unknown argument: %s": { "one": "Onbekend argument: %s", "other": "Onbekende argumenten: %s" }, - "Invalid values:": "Ongeldige waardes:", + "Invalid values:": "Ongeldige waarden:", "Argument: %s, Given: %s, Choices: %s": "Argument: %s, Gegeven: %s, Keuzes: %s", - "Argument check failed: %s": "Argument check mislukt: %s", - "Implications failed:": "Implicaties mislukt:", + "Argument check failed: %s": "Argumentcontrole mislukt: %s", + "Implications failed:": "Ontbrekende afhankelijke argumenten:", "Not enough arguments following: %s": "Niet genoeg argumenten na: %s", - "Invalid JSON config file: %s": "Ongeldig JSON configuratiebestand: %s", - "Path to JSON config file": "Pad naar JSON configuratiebestand", + "Invalid JSON config file: %s": "Ongeldig JSON-config-bestand: %s", + "Path to JSON config file": "Pad naar JSON-config-bestand", "Show help": "Toon help", - "Show version number": "Toon versie nummer", + "Show version number": "Toon versienummer", "Did you mean %s?": "Bedoelde u misschien %s?", - "Arguments %s and %s are mutually exclusive": "Argumenten %s en %s zijn onderling uitsluitend", + "Arguments %s and %s are mutually exclusive": "Argumenten %s en %s kunnen niet tegelijk gebruikt worden", "Positionals:": "Positie-afhankelijke argumenten", "command": "commando" } diff --git a/node_modules/yargs/node_modules/require-main-filename/.npmignore b/node_modules/yargs/node_modules/require-main-filename/.npmignore deleted file mode 100644 index 6f9fe6bad..000000000 --- a/node_modules/yargs/node_modules/require-main-filename/.npmignore +++ /dev/null @@ -1,3 +0,0 @@ -node_modules -.DS_Store -.nyc_output diff --git a/node_modules/yargs/node_modules/require-main-filename/.travis.yml b/node_modules/yargs/node_modules/require-main-filename/.travis.yml deleted file mode 100644 index ab61ce77e..000000000 --- a/node_modules/yargs/node_modules/require-main-filename/.travis.yml +++ /dev/null @@ -1,8 +0,0 @@ -language: node_js -os: - - linux -node_js: - - "0.10" - - "0.12" - - "4.1" - - "node" diff --git a/node_modules/yargs/node_modules/require-main-filename/LICENSE.txt b/node_modules/yargs/node_modules/require-main-filename/LICENSE.txt deleted file mode 100644 index 836440bef..000000000 --- a/node_modules/yargs/node_modules/require-main-filename/LICENSE.txt +++ /dev/null @@ -1,14 +0,0 @@ -Copyright (c) 2016, Contributors - -Permission to use, copy, modify, and/or distribute this software -for any purpose with or without fee is hereby granted, provided -that the above copyright notice and this permission notice -appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES -OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE -LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES -OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, -WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, -ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/node_modules/yargs/node_modules/require-main-filename/README.md b/node_modules/yargs/node_modules/require-main-filename/README.md deleted file mode 100644 index 820d9f589..000000000 --- a/node_modules/yargs/node_modules/require-main-filename/README.md +++ /dev/null @@ -1,26 +0,0 @@ -# require-main-filename - -[![Build Status](https://travis-ci.org/yargs/require-main-filename.png)](https://travis-ci.org/yargs/require-main-filename) -[![Coverage Status](https://coveralls.io/repos/yargs/require-main-filename/badge.svg?branch=master)](https://coveralls.io/r/yargs/require-main-filename?branch=master) -[![NPM version](https://img.shields.io/npm/v/require-main-filename.svg)](https://www.npmjs.com/package/require-main-filename) - -`require.main.filename` is great for figuring out the entry -point for the current application. This can be combined with a module like -[pkg-conf](https://www.npmjs.com/package/pkg-conf) to, _as if by magic_, load -top-level configuration. - -Unfortunately, `require.main.filename` sometimes fails when an application is -executed with an alternative process manager, e.g., [iisnode](https://github.com/tjanczuk/iisnode). - -`require-main-filename` is a shim that addresses this problem. - -## Usage - -```js -var main = require('require-main-filename')() -// use main as an alternative to require.main.filename. -``` - -## License - -ISC diff --git a/node_modules/yargs/node_modules/require-main-filename/index.js b/node_modules/yargs/node_modules/require-main-filename/index.js deleted file mode 100644 index dca7f0cc1..000000000 --- a/node_modules/yargs/node_modules/require-main-filename/index.js +++ /dev/null @@ -1,18 +0,0 @@ -module.exports = function (_require) { - _require = _require || require - var main = _require.main - if (main && isIISNode(main)) return handleIISNode(main) - else return main ? main.filename : process.cwd() -} - -function isIISNode (main) { - return /\\iisnode\\/.test(main.filename) -} - -function handleIISNode (main) { - if (!main.children.length) { - return main.filename - } else { - return main.children[0].filename - } -} diff --git a/node_modules/yargs/node_modules/require-main-filename/package.json b/node_modules/yargs/node_modules/require-main-filename/package.json deleted file mode 100644 index aa19b9e4f..000000000 --- a/node_modules/yargs/node_modules/require-main-filename/package.json +++ /dev/null @@ -1,62 +0,0 @@ -{ - "_args": [ - [ - "require-main-filename@1.0.1", - "/Users/drew.heavner/Documents/Github/sign-android-release" - ] - ], - "_development": true, - "_from": "require-main-filename@1.0.1", - "_id": "require-main-filename@1.0.1", - "_inBundle": false, - "_integrity": "sha1-l/cXtp1IeE9fUmpsWqj/3aBVpNE=", - "_location": "/yargs/require-main-filename", - "_phantomChildren": {}, - "_requested": { - "type": "version", - "registry": true, - "raw": "require-main-filename@1.0.1", - "name": "require-main-filename", - "escapedName": "require-main-filename", - "rawSpec": "1.0.1", - "saveSpec": null, - "fetchSpec": "1.0.1" - }, - "_requiredBy": [ - "/yargs" - ], - "_resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-1.0.1.tgz", - "_spec": "1.0.1", - "_where": "/Users/drew.heavner/Documents/Github/sign-android-release", - "author": { - "name": "Ben Coe", - "email": "ben@npmjs.com" - }, - "bugs": { - "url": "https://github.com/yargs/require-main-filename/issues" - }, - "description": "shim for require.main.filename() that works in as many environments as possible", - "devDependencies": { - "chai": "^3.5.0", - "standard": "^6.0.5", - "tap": "^5.2.0" - }, - "homepage": "https://github.com/yargs/require-main-filename#readme", - "keywords": [ - "require", - "shim", - "iisnode" - ], - "license": "ISC", - "main": "index.js", - "name": "require-main-filename", - "repository": { - "type": "git", - "url": "git+ssh://git@github.com/yargs/require-main-filename.git" - }, - "scripts": { - "pretest": "standard", - "test": "tap --coverage test.js" - }, - "version": "1.0.1" -} diff --git a/node_modules/yargs/node_modules/require-main-filename/test.js b/node_modules/yargs/node_modules/require-main-filename/test.js deleted file mode 100644 index d89e7dcba..000000000 --- a/node_modules/yargs/node_modules/require-main-filename/test.js +++ /dev/null @@ -1,36 +0,0 @@ -/* global describe, it */ - -var requireMainFilename = require('./') - -require('tap').mochaGlobals() -require('chai').should() - -describe('require-main-filename', function () { - it('returns require.main.filename in normal circumstances', function () { - requireMainFilename().should.match(/test\.js/) - }) - - it('should use children[0].filename when running on iisnode', function () { - var main = { - filename: 'D:\\Program Files (x86)\\iisnode\\interceptor.js', - children: [ {filename: 'D:\\home\\site\\wwwroot\\server.js'} ] - } - requireMainFilename({ - main: main - }).should.match(/server\.js/) - }) - - it('should not use children[0] if no children exist', function () { - var main = { - filename: 'D:\\Program Files (x86)\\iisnode\\interceptor.js', - children: [] - } - requireMainFilename({ - main: main - }).should.match(/interceptor\.js/) - }) - - it('should default to process.cwd() if require.main is undefined', function () { - requireMainFilename({}).should.match(/require-main-filename/) - }) -}) diff --git a/node_modules/yargs/package.json b/node_modules/yargs/package.json index 3821e64a1..11586245d 100644 --- a/node_modules/yargs/package.json +++ b/node_modules/yargs/package.json @@ -1,37 +1,31 @@ { - "_args": [ - [ - "yargs@12.0.5", - "/Users/drew.heavner/Documents/Github/sign-android-release" - ] - ], - "_development": true, - "_from": "yargs@12.0.5", - "_id": "yargs@12.0.5", + "_from": "yargs@^13.3.0", + "_id": "yargs@13.3.2", "_inBundle": false, - "_integrity": "sha512-Lhz8TLaYnxq/2ObqHDql8dX8CJi97oHxrjUcYtzKbbykPtVW9WB+poxI+NM2UIzsMgNCZTIf0AQwsjK5yMAqZw==", + "_integrity": "sha512-AX3Zw5iPruN5ie6xGRIDgqkT+ZhnRlZMLMHAs8tg7nRruy2Nb+i5o9bwghAogtM08q1dpr2LVoS8KSTMYpWXUw==", "_location": "/yargs", "_phantomChildren": {}, "_requested": { - "type": "version", + "type": "range", "registry": true, - "raw": "yargs@12.0.5", + "raw": "yargs@^13.3.0", "name": "yargs", "escapedName": "yargs", - "rawSpec": "12.0.5", + "rawSpec": "^13.3.0", "saveSpec": null, - "fetchSpec": "12.0.5" + "fetchSpec": "^13.3.0" }, "_requiredBy": [ - "/jest-runtime", - "/jest/jest-cli" + "/jest-runtime" ], - "_resolved": "https://registry.npmjs.org/yargs/-/yargs-12.0.5.tgz", - "_spec": "12.0.5", - "_where": "/Users/drew.heavner/Documents/Github/sign-android-release", + "_resolved": "https://registry.npmjs.org/yargs/-/yargs-13.3.2.tgz", + "_shasum": "ad7ffefec1aa59565ac915f82dccb38a9c31a2dd", + "_spec": "yargs@^13.3.0", + "_where": "/Users/drew.heavner/Documents/Github/sign-android-release/node_modules/jest-runtime", "bugs": { "url": "https://github.com/yargs/yargs/issues" }, + "bundleDependencies": false, "contributors": [ { "name": "Yargs Contributors", @@ -39,34 +33,33 @@ } ], "dependencies": { - "cliui": "^4.0.0", - "decamelize": "^1.2.0", + "cliui": "^5.0.0", "find-up": "^3.0.0", - "get-caller-file": "^1.0.1", - "os-locale": "^3.0.0", + "get-caller-file": "^2.0.1", "require-directory": "^2.1.1", - "require-main-filename": "^1.0.1", + "require-main-filename": "^2.0.0", "set-blocking": "^2.0.0", - "string-width": "^2.0.0", + "string-width": "^3.0.0", "which-module": "^2.0.0", - "y18n": "^3.2.1 || ^4.0.0", - "yargs-parser": "^11.1.1" + "y18n": "^4.0.0", + "yargs-parser": "^13.1.2" }, + "deprecated": false, "description": "yargs the modern, pirate-themed, successor to optimist.", "devDependencies": { - "chai": "^4.1.2", - "chalk": "^1.1.3", - "coveralls": "^3.0.2", - "cpr": "^2.0.0", + "chai": "^4.2.0", + "chalk": "^2.4.2", + "coveralls": "^3.0.3", + "cpr": "^3.0.1", "cross-spawn": "^6.0.4", - "es6-promise": "^4.0.2", + "es6-promise": "^4.2.5", "hashish": "0.0.4", - "mocha": "^5.1.1", - "nyc": "^11.7.3", - "rimraf": "^2.5.0", - "standard": "^11.0.1", - "standard-version": "^4.2.0", - "which": "^1.2.9", + "mocha": "^5.2.0", + "nyc": "^14.1.0", + "rimraf": "^2.6.3", + "standard": "^12.0.1", + "standard-version": "^6.0.1", + "which": "^1.3.1", "yargs-test-extends": "^1.0.1" }, "engine": { @@ -78,6 +71,7 @@ "lib", "locales", "completion.sh.hbs", + "completion.zsh.hbs", "LICENSE" ], "homepage": "https://yargs.js.org/", @@ -101,12 +95,12 @@ "coverage": "nyc report --reporter=text-lcov | coveralls", "pretest": "standard", "release": "standard-version", - "test": "nyc --cache mocha --require ./test/before.js --timeout=8000 --check-leaks" + "test": "nyc --cache mocha --require ./test/before.js --timeout=12000 --check-leaks" }, "standard": { "ignore": [ "**/example/**" ] }, - "version": "12.0.5" + "version": "13.3.2" } diff --git a/node_modules/yargs/yargs.js b/node_modules/yargs/yargs.js index 24c8e99ce..81d219364 100644 --- a/node_modules/yargs/yargs.js +++ b/node_modules/yargs/yargs.js @@ -11,7 +11,7 @@ const Y18n = require('y18n') const objFilter = require('./lib/obj-filter') const setBlocking = require('set-blocking') const applyExtends = require('./lib/apply-extends') -const middlewareFactory = require('./lib/middleware') +const { globalMiddlewareFactory } = require('./lib/middleware') const YError = require('./lib/yerror') exports = module.exports = Yargs @@ -33,7 +33,7 @@ function Yargs (processArgs, cwd, parentRequire) { updateFiles: false }) - self.middleware = middlewareFactory(globalMiddleware, self) + self.middleware = globalMiddlewareFactory(globalMiddleware, self) if (!cwd) cwd = process.cwd() @@ -231,6 +231,7 @@ function Yargs (processArgs, cwd, parentRequire) { function populateParserHintArray (type, keys, value) { keys = [].concat(keys) keys.forEach((key) => { + key = sanitizeKey(key) options[type].push(key) }) } @@ -286,8 +287,8 @@ function Yargs (processArgs, cwd, parentRequire) { function populateParserHintObject (builder, isArray, type, key, value) { if (Array.isArray(key)) { + const temp = Object.create(null) // an array of keys with one value ['x', 'y', 'z'], function parse () {} - const temp = {} key.forEach((k) => { temp[k] = value }) @@ -298,6 +299,7 @@ function Yargs (processArgs, cwd, parentRequire) { builder(k, key[k]) }) } else { + key = sanitizeKey(key) // a single key value pair 'x', parse() {} if (isArray) { options[type][key] = (options[type][key] || []).concat(value) @@ -307,6 +309,13 @@ function Yargs (processArgs, cwd, parentRequire) { } } + // TODO(bcoe): in future major versions move more objects towards + // Object.create(null): + function sanitizeKey (key) { + if (key === '__proto__') return '___proto___' + return key + } + function deleteFromParserHintObject (optionKey) { // delete from all parsing hints: // boolean, array, key, alias, etc. @@ -694,8 +703,8 @@ function Yargs (processArgs, cwd, parentRequire) { } // .positional() only supports a subset of the configuration - // options availble to .option(). - const supportedOpts = ['default', 'implies', 'normalize', + // options available to .option(). + const supportedOpts = ['default', 'defaultDescription', 'implies', 'normalize', 'choices', 'conflicts', 'coerce', 'type', 'describe', 'desc', 'description', 'alias'] opts = objFilter(opts, (k, v) => { @@ -765,6 +774,14 @@ function Yargs (processArgs, cwd, parentRequire) { } self.getStrict = () => strict + let parserConfig = {} + self.parserConfiguration = function parserConfiguration (config) { + argsert('', [config], arguments.length) + parserConfig = config + return self + } + self.getParserConfiguration = () => parserConfig + self.showHelp = function (level) { argsert('[string|function]', [level], arguments.length) if (!self.parsed) self._parseArgs(processArgs) // run parser, if it has not already been executed. @@ -895,7 +912,7 @@ function Yargs (processArgs, cwd, parentRequire) { // register the completion command. completionCommand = cmd || 'completion' if (!desc && desc !== false) { - desc = 'generate bash completion script' + desc = 'generate completion script' } self.command(completionCommand, desc) @@ -1010,7 +1027,14 @@ function Yargs (processArgs, cwd, parentRequire) { args = args || processArgs options.__ = y18n.__ - options.configuration = pkgUp()['yargs'] || {} + options.configuration = self.getParserConfiguration() + + // Deprecated + let pkgConfig = pkgUp()['yargs'] + if (pkgConfig) { + console.warn('Configuring yargs through package.json is deprecated and will be removed in the next major release, please use the JS API instead.') + options.configuration = Object.assign({}, pkgConfig, options.configuration) + } const parsed = Parser.detailed(args, options) let argv = parsed.argv @@ -1152,7 +1176,7 @@ function Yargs (processArgs, cwd, parentRequire) { } self._runValidation = function runValidation (argv, aliases, positionalMap, parseErrors) { - if (parseErrors) throw new YError(parseErrors.message) + if (parseErrors) throw new YError(parseErrors.message || parseErrors) validation.nonOptionCount(argv) validation.requiredArguments(argv) if (strict) validation.unknownArguments(argv, aliases, positionalMap) @@ -1166,8 +1190,9 @@ function Yargs (processArgs, cwd, parentRequire) { if (!detectLocale) return try { - const osLocale = require('os-locale') - self.locale(osLocale.sync({ spawn: false })) + const { env } = process + const locale = env.LC_ALL || env.LC_MESSAGES || env.LANG || env.LANGUAGE || 'en_US' + self.locale(locale.replace(/[.:].*/, '')) } catch (err) { // if we explode looking up locale just noop // we'll keep using the default language 'en'. diff --git a/package-lock.json b/package-lock.json index 8ae09bfda..366146709 100644 --- a/package-lock.json +++ b/package-lock.json @@ -5,19 +5,22 @@ "requires": true, "dependencies": { "@actions/core": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/@actions/core/-/core-1.0.0.tgz", - "integrity": "sha512-aMIlkx96XH4E/2YZtEOeyrYQfhlas9jIRkfGPqMwXD095Rdkzo4lB6ZmbxPQSzD+e1M+Xsm98ZhuSMYGv/AlqA==" + "version": "1.2.6", + "resolved": "https://registry.npmjs.org/@actions/core/-/core-1.2.6.tgz", + "integrity": "sha512-ZQYitnqiyBc3D+k7LsgSBmMDVkOVidaagDG7j3fOym77jNunWRuYx7VSHa9GNfFZh+zh61xsCjRj4JxMZlDqTA==" }, "@actions/exec": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/@actions/exec/-/exec-1.0.1.tgz", - "integrity": "sha512-nvFkxwiicvpzNiCBF4wFBDfnBvi7xp/as7LE1hBxBxKG2L29+gkIPBiLKMVORL+Hg3JNf07AKRfl0V5djoypjQ==" + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/@actions/exec/-/exec-1.0.4.tgz", + "integrity": "sha512-4DPChWow9yc9W3WqEbUj8Nr86xkpyE29ZzWjXucHItclLbEW6jr80Zx4nqv18QL6KK65+cifiQZXvnqgTV6oHw==", + "requires": { + "@actions/io": "^1.0.1" + } }, "@actions/io": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/@actions/io/-/io-1.0.1.tgz", - "integrity": "sha512-rhq+tfZukbtaus7xyUtwKfuiCRXd1hWSfmJNEpFgBQJ4woqPEpsBw04awicjwz9tyG2/MVhAEMfVn664Cri5zA==" + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/@actions/io/-/io-1.0.2.tgz", + "integrity": "sha512-J8KuFqVPr3p6U8W93DOXlXW6zFvrQAJANdS+vw0YhusLIq+bszW8zmK2Fh1C2kDPX8FMvwIl1OUcFgvJoXLbAg==" }, "@babel/code-frame": { "version": "7.5.5", @@ -29,34 +32,150 @@ } }, "@babel/core": { - "version": "7.5.5", - "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.5.5.tgz", - "integrity": "sha512-i4qoSr2KTtce0DmkuuQBV4AuQgGPUcPXMr9L5MyYAtk06z068lQ10a4O009fe5OB/DfNV+h+qqT7ddNV8UnRjg==", - "dev": true, - "requires": { - "@babel/code-frame": "^7.5.5", - "@babel/generator": "^7.5.5", - "@babel/helpers": "^7.5.5", - "@babel/parser": "^7.5.5", - "@babel/template": "^7.4.4", - "@babel/traverse": "^7.5.5", - "@babel/types": "^7.5.5", - "convert-source-map": "^1.1.0", + "version": "7.12.3", + "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.12.3.tgz", + "integrity": "sha512-0qXcZYKZp3/6N2jKYVxZv0aNCsxTSVCiK72DTiTYZAu7sjg73W0/aynWjMbiGd87EQL4WyA8reiJVh92AVla9g==", + "dev": true, + "requires": { + "@babel/code-frame": "^7.10.4", + "@babel/generator": "^7.12.1", + "@babel/helper-module-transforms": "^7.12.1", + "@babel/helpers": "^7.12.1", + "@babel/parser": "^7.12.3", + "@babel/template": "^7.10.4", + "@babel/traverse": "^7.12.1", + "@babel/types": "^7.12.1", + "convert-source-map": "^1.7.0", "debug": "^4.1.0", - "json5": "^2.1.0", - "lodash": "^4.17.13", + "gensync": "^1.0.0-beta.1", + "json5": "^2.1.2", + "lodash": "^4.17.19", "resolve": "^1.3.2", "semver": "^5.4.1", "source-map": "^0.5.0" }, "dependencies": { + "@babel/code-frame": { + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.10.4.tgz", + "integrity": "sha512-vG6SvB6oYEhvgisZNFRmRCUkLz11c7rp+tbNTynGqc6mS1d5ATd/sGyV6W0KZZnXRKMTzZDRgQT3Ou9jhpAfUg==", + "dev": true, + "requires": { + "@babel/highlight": "^7.10.4" + } + }, + "@babel/generator": { + "version": "7.12.5", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.12.5.tgz", + "integrity": "sha512-m16TQQJ8hPt7E+OS/XVQg/7U184MLXtvuGbCdA7na61vha+ImkyyNM/9DDA0unYCVZn3ZOhng+qz48/KBOT96A==", + "dev": true, + "requires": { + "@babel/types": "^7.12.5", + "jsesc": "^2.5.1", + "source-map": "^0.5.0" + } + }, + "@babel/helper-function-name": { + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.10.4.tgz", + "integrity": "sha512-YdaSyz1n8gY44EmN7x44zBn9zQ1Ry2Y+3GTA+3vH6Mizke1Vw0aWDM66FOYEPw8//qKkmqOckrGgTYa+6sceqQ==", + "dev": true, + "requires": { + "@babel/helper-get-function-arity": "^7.10.4", + "@babel/template": "^7.10.4", + "@babel/types": "^7.10.4" + } + }, + "@babel/helper-get-function-arity": { + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/helper-get-function-arity/-/helper-get-function-arity-7.10.4.tgz", + "integrity": "sha512-EkN3YDB+SRDgiIUnNgcmiD361ti+AVbL3f3Henf6dqqUyr5dMsorno0lJWJuLhDhkI5sYEpgj6y9kB8AOU1I2A==", + "dev": true, + "requires": { + "@babel/types": "^7.10.4" + } + }, + "@babel/helper-split-export-declaration": { + "version": "7.11.0", + "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.11.0.tgz", + "integrity": "sha512-74Vejvp6mHkGE+m+k5vHY93FX2cAtrw1zXrZXRlG4l410Nm9PxfEiVTn1PjDPV5SnmieiueY4AFg2xqhNFuuZg==", + "dev": true, + "requires": { + "@babel/types": "^7.11.0" + } + }, + "@babel/highlight": { + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.10.4.tgz", + "integrity": "sha512-i6rgnR/YgPEQzZZnbTHHuZdlE8qyoBNalD6F+q4vAFlcMEcqmkoG+mPqJYJCo63qPf74+Y1UZsl3l6f7/RIkmA==", + "dev": true, + "requires": { + "@babel/helper-validator-identifier": "^7.10.4", + "chalk": "^2.0.0", + "js-tokens": "^4.0.0" + } + }, + "@babel/parser": { + "version": "7.12.5", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.12.5.tgz", + "integrity": "sha512-FVM6RZQ0mn2KCf1VUED7KepYeUWoVShczewOCfm3nzoBybaih51h+sYVVGthW9M6lPByEPTQf+xm27PBdlpwmQ==", + "dev": true + }, + "@babel/template": { + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.10.4.tgz", + "integrity": "sha512-ZCjD27cGJFUB6nmCB1Enki3r+L5kJveX9pq1SvAUKoICy6CZ9yD8xO086YXdYhvNjBdnekm4ZnaP5yC8Cs/1tA==", + "dev": true, + "requires": { + "@babel/code-frame": "^7.10.4", + "@babel/parser": "^7.10.4", + "@babel/types": "^7.10.4" + } + }, + "@babel/traverse": { + "version": "7.12.5", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.12.5.tgz", + "integrity": "sha512-xa15FbQnias7z9a62LwYAA5SZZPkHIXpd42C6uW68o8uTuua96FHZy1y61Va5P/i83FAAcMpW8+A/QayntzuqA==", + "dev": true, + "requires": { + "@babel/code-frame": "^7.10.4", + "@babel/generator": "^7.12.5", + "@babel/helper-function-name": "^7.10.4", + "@babel/helper-split-export-declaration": "^7.11.0", + "@babel/parser": "^7.12.5", + "@babel/types": "^7.12.5", + "debug": "^4.1.0", + "globals": "^11.1.0", + "lodash": "^4.17.19" + } + }, + "@babel/types": { + "version": "7.12.6", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.12.6.tgz", + "integrity": "sha512-hwyjw6GvjBLiyy3W0YQf0Z5Zf4NpYejUnKFcfcUhZCSffoBBp30w6wP2Wn6pk31jMYZvcOrB/1b7cGXvEoKogA==", + "dev": true, + "requires": { + "@babel/helper-validator-identifier": "^7.10.4", + "lodash": "^4.17.19", + "to-fast-properties": "^2.0.0" + } + }, "debug": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz", - "integrity": "sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==", + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.2.0.tgz", + "integrity": "sha512-IX2ncY78vDTjZMFUdmsvIRFY2Cf4FnD0wRs+nQwJU8Lu99/tPFdb0VybiiMTPe3I6rQmwsqQqRBvxU+bZ/I8sg==", "dev": true, "requires": { - "ms": "^2.1.1" + "ms": "2.1.2" + } + }, + "json5": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/json5/-/json5-2.1.3.tgz", + "integrity": "sha512-KXPvOm8K9IJKFM0bmdn8QXh7udDh1g/giieX0NLCaMnb4hEiVFqnop2ImTXCc5e0/oHz3LTqmHGtExn5hfMkOA==", + "dev": true, + "requires": { + "minimist": "^1.2.5" } }, "ms": { @@ -65,12 +184,6 @@ "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", "dev": true }, - "semver": { - "version": "5.7.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.0.tgz", - "integrity": "sha512-Ya52jSX2u7QKghxeoFGpLwCtGlt7j0oY9DYb5apt9nPlJ42ID+ulTXESnt/qAQcoSERyZ5sl3LDIOw0nAn/5DA==", - "dev": true - }, "source-map": { "version": "0.5.7", "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", @@ -120,93 +233,347 @@ "@babel/types": "^7.0.0" } }, - "@babel/helper-plugin-utils": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.0.0.tgz", - "integrity": "sha512-CYAOUCARwExnEixLdB6sDm2dIJ/YgEAKDM1MOeMeZu9Ld/bDgVo8aiWrXwcY7OBh+1Ea2uUcVRcxKk0GJvW7QA==", - "dev": true - }, - "@babel/helper-split-export-declaration": { - "version": "7.4.4", - "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.4.4.tgz", - "integrity": "sha512-Ro/XkzLf3JFITkW6b+hNxzZ1n5OQ80NvIUdmHspih1XAhtN3vPTuUFT4eQnela+2MaZ5ulH+iyP513KJrxbN7Q==", + "@babel/helper-member-expression-to-functions": { + "version": "7.12.1", + "resolved": "https://registry.npmjs.org/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.12.1.tgz", + "integrity": "sha512-k0CIe3tXUKTRSoEx1LQEPFU9vRQfqHtl+kf8eNnDqb4AUJEy5pz6aIiog+YWtVm2jpggjS1laH68bPsR+KWWPQ==", "dev": true, "requires": { - "@babel/types": "^7.4.4" + "@babel/types": "^7.12.1" + }, + "dependencies": { + "@babel/types": { + "version": "7.12.6", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.12.6.tgz", + "integrity": "sha512-hwyjw6GvjBLiyy3W0YQf0Z5Zf4NpYejUnKFcfcUhZCSffoBBp30w6wP2Wn6pk31jMYZvcOrB/1b7cGXvEoKogA==", + "dev": true, + "requires": { + "@babel/helper-validator-identifier": "^7.10.4", + "lodash": "^4.17.19", + "to-fast-properties": "^2.0.0" + } + } } }, - "@babel/helpers": { - "version": "7.5.5", - "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.5.5.tgz", - "integrity": "sha512-nRq2BUhxZFnfEn/ciJuhklHvFOqjJUD5wpx+1bxUF2axL9C+v4DE/dmp5sT2dKnpOs4orZWzpAZqlCy8QqE/7g==", + "@babel/helper-module-imports": { + "version": "7.12.5", + "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.12.5.tgz", + "integrity": "sha512-SR713Ogqg6++uexFRORf/+nPXMmWIn80TALu0uaFb+iQIUoR7bOC7zBWyzBs5b3tBBJXuyD0cRu1F15GyzjOWA==", "dev": true, "requires": { - "@babel/template": "^7.4.4", - "@babel/traverse": "^7.5.5", - "@babel/types": "^7.5.5" + "@babel/types": "^7.12.5" + }, + "dependencies": { + "@babel/types": { + "version": "7.12.6", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.12.6.tgz", + "integrity": "sha512-hwyjw6GvjBLiyy3W0YQf0Z5Zf4NpYejUnKFcfcUhZCSffoBBp30w6wP2Wn6pk31jMYZvcOrB/1b7cGXvEoKogA==", + "dev": true, + "requires": { + "@babel/helper-validator-identifier": "^7.10.4", + "lodash": "^4.17.19", + "to-fast-properties": "^2.0.0" + } + } } }, - "@babel/highlight": { - "version": "7.5.0", - "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.5.0.tgz", - "integrity": "sha512-7dV4eu9gBxoM0dAnj/BCFDW9LFU0zvTrkq0ugM7pnHEgguOEeOz1so2ZghEdzviYzQEED0r4EAgpsBChKy1TRQ==", + "@babel/helper-module-transforms": { + "version": "7.12.1", + "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.12.1.tgz", + "integrity": "sha512-QQzehgFAZ2bbISiCpmVGfiGux8YVFXQ0abBic2Envhej22DVXV9nCFaS5hIQbkyo1AdGb+gNME2TSh3hYJVV/w==", "dev": true, "requires": { - "chalk": "^2.0.0", - "esutils": "^2.0.2", - "js-tokens": "^4.0.0" + "@babel/helper-module-imports": "^7.12.1", + "@babel/helper-replace-supers": "^7.12.1", + "@babel/helper-simple-access": "^7.12.1", + "@babel/helper-split-export-declaration": "^7.11.0", + "@babel/helper-validator-identifier": "^7.10.4", + "@babel/template": "^7.10.4", + "@babel/traverse": "^7.12.1", + "@babel/types": "^7.12.1", + "lodash": "^4.17.19" + }, + "dependencies": { + "@babel/code-frame": { + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.10.4.tgz", + "integrity": "sha512-vG6SvB6oYEhvgisZNFRmRCUkLz11c7rp+tbNTynGqc6mS1d5ATd/sGyV6W0KZZnXRKMTzZDRgQT3Ou9jhpAfUg==", + "dev": true, + "requires": { + "@babel/highlight": "^7.10.4" + } + }, + "@babel/generator": { + "version": "7.12.5", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.12.5.tgz", + "integrity": "sha512-m16TQQJ8hPt7E+OS/XVQg/7U184MLXtvuGbCdA7na61vha+ImkyyNM/9DDA0unYCVZn3ZOhng+qz48/KBOT96A==", + "dev": true, + "requires": { + "@babel/types": "^7.12.5", + "jsesc": "^2.5.1", + "source-map": "^0.5.0" + } + }, + "@babel/helper-function-name": { + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.10.4.tgz", + "integrity": "sha512-YdaSyz1n8gY44EmN7x44zBn9zQ1Ry2Y+3GTA+3vH6Mizke1Vw0aWDM66FOYEPw8//qKkmqOckrGgTYa+6sceqQ==", + "dev": true, + "requires": { + "@babel/helper-get-function-arity": "^7.10.4", + "@babel/template": "^7.10.4", + "@babel/types": "^7.10.4" + } + }, + "@babel/helper-get-function-arity": { + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/helper-get-function-arity/-/helper-get-function-arity-7.10.4.tgz", + "integrity": "sha512-EkN3YDB+SRDgiIUnNgcmiD361ti+AVbL3f3Henf6dqqUyr5dMsorno0lJWJuLhDhkI5sYEpgj6y9kB8AOU1I2A==", + "dev": true, + "requires": { + "@babel/types": "^7.10.4" + } + }, + "@babel/helper-split-export-declaration": { + "version": "7.11.0", + "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.11.0.tgz", + "integrity": "sha512-74Vejvp6mHkGE+m+k5vHY93FX2cAtrw1zXrZXRlG4l410Nm9PxfEiVTn1PjDPV5SnmieiueY4AFg2xqhNFuuZg==", + "dev": true, + "requires": { + "@babel/types": "^7.11.0" + } + }, + "@babel/highlight": { + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.10.4.tgz", + "integrity": "sha512-i6rgnR/YgPEQzZZnbTHHuZdlE8qyoBNalD6F+q4vAFlcMEcqmkoG+mPqJYJCo63qPf74+Y1UZsl3l6f7/RIkmA==", + "dev": true, + "requires": { + "@babel/helper-validator-identifier": "^7.10.4", + "chalk": "^2.0.0", + "js-tokens": "^4.0.0" + } + }, + "@babel/parser": { + "version": "7.12.5", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.12.5.tgz", + "integrity": "sha512-FVM6RZQ0mn2KCf1VUED7KepYeUWoVShczewOCfm3nzoBybaih51h+sYVVGthW9M6lPByEPTQf+xm27PBdlpwmQ==", + "dev": true + }, + "@babel/template": { + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.10.4.tgz", + "integrity": "sha512-ZCjD27cGJFUB6nmCB1Enki3r+L5kJveX9pq1SvAUKoICy6CZ9yD8xO086YXdYhvNjBdnekm4ZnaP5yC8Cs/1tA==", + "dev": true, + "requires": { + "@babel/code-frame": "^7.10.4", + "@babel/parser": "^7.10.4", + "@babel/types": "^7.10.4" + } + }, + "@babel/traverse": { + "version": "7.12.5", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.12.5.tgz", + "integrity": "sha512-xa15FbQnias7z9a62LwYAA5SZZPkHIXpd42C6uW68o8uTuua96FHZy1y61Va5P/i83FAAcMpW8+A/QayntzuqA==", + "dev": true, + "requires": { + "@babel/code-frame": "^7.10.4", + "@babel/generator": "^7.12.5", + "@babel/helper-function-name": "^7.10.4", + "@babel/helper-split-export-declaration": "^7.11.0", + "@babel/parser": "^7.12.5", + "@babel/types": "^7.12.5", + "debug": "^4.1.0", + "globals": "^11.1.0", + "lodash": "^4.17.19" + } + }, + "@babel/types": { + "version": "7.12.6", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.12.6.tgz", + "integrity": "sha512-hwyjw6GvjBLiyy3W0YQf0Z5Zf4NpYejUnKFcfcUhZCSffoBBp30w6wP2Wn6pk31jMYZvcOrB/1b7cGXvEoKogA==", + "dev": true, + "requires": { + "@babel/helper-validator-identifier": "^7.10.4", + "lodash": "^4.17.19", + "to-fast-properties": "^2.0.0" + } + }, + "debug": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.2.0.tgz", + "integrity": "sha512-IX2ncY78vDTjZMFUdmsvIRFY2Cf4FnD0wRs+nQwJU8Lu99/tPFdb0VybiiMTPe3I6rQmwsqQqRBvxU+bZ/I8sg==", + "dev": true, + "requires": { + "ms": "2.1.2" + } + }, + "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 + }, + "source-map": { + "version": "0.5.7", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", + "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=", + "dev": true + } } }, - "@babel/parser": { - "version": "7.5.5", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.5.5.tgz", - "integrity": "sha512-E5BN68cqR7dhKan1SfqgPGhQ178bkVKpXTPEXnFJBrEt8/DKRZlybmy+IgYLTeN7tp1R5Ccmbm2rBk17sHYU3g==", - "dev": true - }, - "@babel/plugin-syntax-object-rest-spread": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-object-rest-spread/-/plugin-syntax-object-rest-spread-7.2.0.tgz", - "integrity": "sha512-t0JKGgqk2We+9may3t0xDdmneaXmyxq0xieYcKHxIsrJO64n1OiMWNUtc5gQK1PA0NpdCRrtZp4z+IUaKugrSA==", + "@babel/helper-optimise-call-expression": { + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/helper-optimise-call-expression/-/helper-optimise-call-expression-7.10.4.tgz", + "integrity": "sha512-n3UGKY4VXwXThEiKrgRAoVPBMqeoPgHVqiHZOanAJCG9nQUL2pLRQirUzl0ioKclHGpGqRgIOkgcIJaIWLpygg==", "dev": true, "requires": { - "@babel/helper-plugin-utils": "^7.0.0" + "@babel/types": "^7.10.4" + }, + "dependencies": { + "@babel/types": { + "version": "7.12.6", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.12.6.tgz", + "integrity": "sha512-hwyjw6GvjBLiyy3W0YQf0Z5Zf4NpYejUnKFcfcUhZCSffoBBp30w6wP2Wn6pk31jMYZvcOrB/1b7cGXvEoKogA==", + "dev": true, + "requires": { + "@babel/helper-validator-identifier": "^7.10.4", + "lodash": "^4.17.19", + "to-fast-properties": "^2.0.0" + } + } } }, - "@babel/template": { - "version": "7.4.4", - "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.4.4.tgz", - "integrity": "sha512-CiGzLN9KgAvgZsnivND7rkA+AeJ9JB0ciPOD4U59GKbQP2iQl+olF1l76kJOupqidozfZ32ghwBEJDhnk9MEcw==", - "dev": true, - "requires": { - "@babel/code-frame": "^7.0.0", - "@babel/parser": "^7.4.4", - "@babel/types": "^7.4.4" - } + "@babel/helper-plugin-utils": { + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.10.4.tgz", + "integrity": "sha512-O4KCvQA6lLiMU9l2eawBPMf1xPP8xPfB3iEQw150hOVTqj/rfXz0ThTb4HEzqQfs2Bmo5Ay8BzxfzVtBrr9dVg==", + "dev": true }, - "@babel/traverse": { - "version": "7.5.5", - "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.5.5.tgz", - "integrity": "sha512-MqB0782whsfffYfSjH4TM+LMjrJnhCNEDMDIjeTpl+ASaUvxcjoiVCo/sM1GhS1pHOXYfWVCYneLjMckuUxDaQ==", + "@babel/helper-replace-supers": { + "version": "7.12.5", + "resolved": "https://registry.npmjs.org/@babel/helper-replace-supers/-/helper-replace-supers-7.12.5.tgz", + "integrity": "sha512-5YILoed0ZyIpF4gKcpZitEnXEJ9UoDRki1Ey6xz46rxOzfNMAhVIJMoune1hmPVxh40LRv1+oafz7UsWX+vyWA==", "dev": true, "requires": { - "@babel/code-frame": "^7.5.5", - "@babel/generator": "^7.5.5", - "@babel/helper-function-name": "^7.1.0", - "@babel/helper-split-export-declaration": "^7.4.4", - "@babel/parser": "^7.5.5", - "@babel/types": "^7.5.5", - "debug": "^4.1.0", - "globals": "^11.1.0", - "lodash": "^4.17.13" + "@babel/helper-member-expression-to-functions": "^7.12.1", + "@babel/helper-optimise-call-expression": "^7.10.4", + "@babel/traverse": "^7.12.5", + "@babel/types": "^7.12.5" }, "dependencies": { + "@babel/code-frame": { + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.10.4.tgz", + "integrity": "sha512-vG6SvB6oYEhvgisZNFRmRCUkLz11c7rp+tbNTynGqc6mS1d5ATd/sGyV6W0KZZnXRKMTzZDRgQT3Ou9jhpAfUg==", + "dev": true, + "requires": { + "@babel/highlight": "^7.10.4" + } + }, + "@babel/generator": { + "version": "7.12.5", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.12.5.tgz", + "integrity": "sha512-m16TQQJ8hPt7E+OS/XVQg/7U184MLXtvuGbCdA7na61vha+ImkyyNM/9DDA0unYCVZn3ZOhng+qz48/KBOT96A==", + "dev": true, + "requires": { + "@babel/types": "^7.12.5", + "jsesc": "^2.5.1", + "source-map": "^0.5.0" + } + }, + "@babel/helper-function-name": { + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.10.4.tgz", + "integrity": "sha512-YdaSyz1n8gY44EmN7x44zBn9zQ1Ry2Y+3GTA+3vH6Mizke1Vw0aWDM66FOYEPw8//qKkmqOckrGgTYa+6sceqQ==", + "dev": true, + "requires": { + "@babel/helper-get-function-arity": "^7.10.4", + "@babel/template": "^7.10.4", + "@babel/types": "^7.10.4" + } + }, + "@babel/helper-get-function-arity": { + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/helper-get-function-arity/-/helper-get-function-arity-7.10.4.tgz", + "integrity": "sha512-EkN3YDB+SRDgiIUnNgcmiD361ti+AVbL3f3Henf6dqqUyr5dMsorno0lJWJuLhDhkI5sYEpgj6y9kB8AOU1I2A==", + "dev": true, + "requires": { + "@babel/types": "^7.10.4" + } + }, + "@babel/helper-split-export-declaration": { + "version": "7.11.0", + "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.11.0.tgz", + "integrity": "sha512-74Vejvp6mHkGE+m+k5vHY93FX2cAtrw1zXrZXRlG4l410Nm9PxfEiVTn1PjDPV5SnmieiueY4AFg2xqhNFuuZg==", + "dev": true, + "requires": { + "@babel/types": "^7.11.0" + } + }, + "@babel/highlight": { + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.10.4.tgz", + "integrity": "sha512-i6rgnR/YgPEQzZZnbTHHuZdlE8qyoBNalD6F+q4vAFlcMEcqmkoG+mPqJYJCo63qPf74+Y1UZsl3l6f7/RIkmA==", + "dev": true, + "requires": { + "@babel/helper-validator-identifier": "^7.10.4", + "chalk": "^2.0.0", + "js-tokens": "^4.0.0" + } + }, + "@babel/parser": { + "version": "7.12.5", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.12.5.tgz", + "integrity": "sha512-FVM6RZQ0mn2KCf1VUED7KepYeUWoVShczewOCfm3nzoBybaih51h+sYVVGthW9M6lPByEPTQf+xm27PBdlpwmQ==", + "dev": true + }, + "@babel/template": { + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.10.4.tgz", + "integrity": "sha512-ZCjD27cGJFUB6nmCB1Enki3r+L5kJveX9pq1SvAUKoICy6CZ9yD8xO086YXdYhvNjBdnekm4ZnaP5yC8Cs/1tA==", + "dev": true, + "requires": { + "@babel/code-frame": "^7.10.4", + "@babel/parser": "^7.10.4", + "@babel/types": "^7.10.4" + } + }, + "@babel/traverse": { + "version": "7.12.5", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.12.5.tgz", + "integrity": "sha512-xa15FbQnias7z9a62LwYAA5SZZPkHIXpd42C6uW68o8uTuua96FHZy1y61Va5P/i83FAAcMpW8+A/QayntzuqA==", + "dev": true, + "requires": { + "@babel/code-frame": "^7.10.4", + "@babel/generator": "^7.12.5", + "@babel/helper-function-name": "^7.10.4", + "@babel/helper-split-export-declaration": "^7.11.0", + "@babel/parser": "^7.12.5", + "@babel/types": "^7.12.5", + "debug": "^4.1.0", + "globals": "^11.1.0", + "lodash": "^4.17.19" + } + }, + "@babel/types": { + "version": "7.12.6", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.12.6.tgz", + "integrity": "sha512-hwyjw6GvjBLiyy3W0YQf0Z5Zf4NpYejUnKFcfcUhZCSffoBBp30w6wP2Wn6pk31jMYZvcOrB/1b7cGXvEoKogA==", + "dev": true, + "requires": { + "@babel/helper-validator-identifier": "^7.10.4", + "lodash": "^4.17.19", + "to-fast-properties": "^2.0.0" + } + }, "debug": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz", - "integrity": "sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==", + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.2.0.tgz", + "integrity": "sha512-IX2ncY78vDTjZMFUdmsvIRFY2Cf4FnD0wRs+nQwJU8Lu99/tPFdb0VybiiMTPe3I6rQmwsqQqRBvxU+bZ/I8sg==", "dev": true, "requires": { - "ms": "^2.1.1" + "ms": "2.1.2" } }, "ms": { @@ -214,25 +581,278 @@ "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", "dev": true + }, + "source-map": { + "version": "0.5.7", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", + "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=", + "dev": true } } }, - "@babel/types": { - "version": "7.5.5", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.5.5.tgz", - "integrity": "sha512-s63F9nJioLqOlW3UkyMd+BYhXt44YuaFm/VV0VwuteqjYwRrObkU7ra9pY4wAJR3oXi8hJrMcrcJdO/HH33vtw==", + "@babel/helper-simple-access": { + "version": "7.12.1", + "resolved": "https://registry.npmjs.org/@babel/helper-simple-access/-/helper-simple-access-7.12.1.tgz", + "integrity": "sha512-OxBp7pMrjVewSSC8fXDFrHrBcJATOOFssZwv16F3/6Xtc138GHybBfPbm9kfiqQHKhYQrlamWILwlDCeyMFEaA==", "dev": true, "requires": { - "esutils": "^2.0.2", - "lodash": "^4.17.13", - "to-fast-properties": "^2.0.0" + "@babel/types": "^7.12.1" + }, + "dependencies": { + "@babel/types": { + "version": "7.12.6", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.12.6.tgz", + "integrity": "sha512-hwyjw6GvjBLiyy3W0YQf0Z5Zf4NpYejUnKFcfcUhZCSffoBBp30w6wP2Wn6pk31jMYZvcOrB/1b7cGXvEoKogA==", + "dev": true, + "requires": { + "@babel/helper-validator-identifier": "^7.10.4", + "lodash": "^4.17.19", + "to-fast-properties": "^2.0.0" + } + } } }, - "@cnakazawa/watch": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/@cnakazawa/watch/-/watch-1.0.3.tgz", - "integrity": "sha512-r5160ogAvGyHsal38Kux7YYtodEKOj89RGb28ht1jh3SJb08VwRwAKKJL0bGb04Zd/3r9FL3BFIc3bBidYffCA==", - "dev": true, + "@babel/helper-split-export-declaration": { + "version": "7.4.4", + "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.4.4.tgz", + "integrity": "sha512-Ro/XkzLf3JFITkW6b+hNxzZ1n5OQ80NvIUdmHspih1XAhtN3vPTuUFT4eQnela+2MaZ5ulH+iyP513KJrxbN7Q==", + "dev": true, + "requires": { + "@babel/types": "^7.4.4" + } + }, + "@babel/helper-validator-identifier": { + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.10.4.tgz", + "integrity": "sha512-3U9y+43hz7ZM+rzG24Qe2mufW5KhvFg/NhnNph+i9mgCtdTCtMJuI1TMkrIUiK7Ix4PYlRF9I5dhqaLYA/ADXw==", + "dev": true + }, + "@babel/helpers": { + "version": "7.12.5", + "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.12.5.tgz", + "integrity": "sha512-lgKGMQlKqA8meJqKsW6rUnc4MdUk35Ln0ATDqdM1a/UpARODdI4j5Y5lVfUScnSNkJcdCRAaWkspykNoFg9sJA==", + "dev": true, + "requires": { + "@babel/template": "^7.10.4", + "@babel/traverse": "^7.12.5", + "@babel/types": "^7.12.5" + }, + "dependencies": { + "@babel/code-frame": { + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.10.4.tgz", + "integrity": "sha512-vG6SvB6oYEhvgisZNFRmRCUkLz11c7rp+tbNTynGqc6mS1d5ATd/sGyV6W0KZZnXRKMTzZDRgQT3Ou9jhpAfUg==", + "dev": true, + "requires": { + "@babel/highlight": "^7.10.4" + } + }, + "@babel/generator": { + "version": "7.12.5", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.12.5.tgz", + "integrity": "sha512-m16TQQJ8hPt7E+OS/XVQg/7U184MLXtvuGbCdA7na61vha+ImkyyNM/9DDA0unYCVZn3ZOhng+qz48/KBOT96A==", + "dev": true, + "requires": { + "@babel/types": "^7.12.5", + "jsesc": "^2.5.1", + "source-map": "^0.5.0" + } + }, + "@babel/helper-function-name": { + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.10.4.tgz", + "integrity": "sha512-YdaSyz1n8gY44EmN7x44zBn9zQ1Ry2Y+3GTA+3vH6Mizke1Vw0aWDM66FOYEPw8//qKkmqOckrGgTYa+6sceqQ==", + "dev": true, + "requires": { + "@babel/helper-get-function-arity": "^7.10.4", + "@babel/template": "^7.10.4", + "@babel/types": "^7.10.4" + } + }, + "@babel/helper-get-function-arity": { + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/helper-get-function-arity/-/helper-get-function-arity-7.10.4.tgz", + "integrity": "sha512-EkN3YDB+SRDgiIUnNgcmiD361ti+AVbL3f3Henf6dqqUyr5dMsorno0lJWJuLhDhkI5sYEpgj6y9kB8AOU1I2A==", + "dev": true, + "requires": { + "@babel/types": "^7.10.4" + } + }, + "@babel/helper-split-export-declaration": { + "version": "7.11.0", + "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.11.0.tgz", + "integrity": "sha512-74Vejvp6mHkGE+m+k5vHY93FX2cAtrw1zXrZXRlG4l410Nm9PxfEiVTn1PjDPV5SnmieiueY4AFg2xqhNFuuZg==", + "dev": true, + "requires": { + "@babel/types": "^7.11.0" + } + }, + "@babel/highlight": { + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.10.4.tgz", + "integrity": "sha512-i6rgnR/YgPEQzZZnbTHHuZdlE8qyoBNalD6F+q4vAFlcMEcqmkoG+mPqJYJCo63qPf74+Y1UZsl3l6f7/RIkmA==", + "dev": true, + "requires": { + "@babel/helper-validator-identifier": "^7.10.4", + "chalk": "^2.0.0", + "js-tokens": "^4.0.0" + } + }, + "@babel/parser": { + "version": "7.12.5", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.12.5.tgz", + "integrity": "sha512-FVM6RZQ0mn2KCf1VUED7KepYeUWoVShczewOCfm3nzoBybaih51h+sYVVGthW9M6lPByEPTQf+xm27PBdlpwmQ==", + "dev": true + }, + "@babel/template": { + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.10.4.tgz", + "integrity": "sha512-ZCjD27cGJFUB6nmCB1Enki3r+L5kJveX9pq1SvAUKoICy6CZ9yD8xO086YXdYhvNjBdnekm4ZnaP5yC8Cs/1tA==", + "dev": true, + "requires": { + "@babel/code-frame": "^7.10.4", + "@babel/parser": "^7.10.4", + "@babel/types": "^7.10.4" + } + }, + "@babel/traverse": { + "version": "7.12.5", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.12.5.tgz", + "integrity": "sha512-xa15FbQnias7z9a62LwYAA5SZZPkHIXpd42C6uW68o8uTuua96FHZy1y61Va5P/i83FAAcMpW8+A/QayntzuqA==", + "dev": true, + "requires": { + "@babel/code-frame": "^7.10.4", + "@babel/generator": "^7.12.5", + "@babel/helper-function-name": "^7.10.4", + "@babel/helper-split-export-declaration": "^7.11.0", + "@babel/parser": "^7.12.5", + "@babel/types": "^7.12.5", + "debug": "^4.1.0", + "globals": "^11.1.0", + "lodash": "^4.17.19" + } + }, + "@babel/types": { + "version": "7.12.6", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.12.6.tgz", + "integrity": "sha512-hwyjw6GvjBLiyy3W0YQf0Z5Zf4NpYejUnKFcfcUhZCSffoBBp30w6wP2Wn6pk31jMYZvcOrB/1b7cGXvEoKogA==", + "dev": true, + "requires": { + "@babel/helper-validator-identifier": "^7.10.4", + "lodash": "^4.17.19", + "to-fast-properties": "^2.0.0" + } + }, + "debug": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.2.0.tgz", + "integrity": "sha512-IX2ncY78vDTjZMFUdmsvIRFY2Cf4FnD0wRs+nQwJU8Lu99/tPFdb0VybiiMTPe3I6rQmwsqQqRBvxU+bZ/I8sg==", + "dev": true, + "requires": { + "ms": "2.1.2" + } + }, + "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 + }, + "source-map": { + "version": "0.5.7", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", + "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=", + "dev": true + } + } + }, + "@babel/highlight": { + "version": "7.5.0", + "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.5.0.tgz", + "integrity": "sha512-7dV4eu9gBxoM0dAnj/BCFDW9LFU0zvTrkq0ugM7pnHEgguOEeOz1so2ZghEdzviYzQEED0r4EAgpsBChKy1TRQ==", + "dev": true, + "requires": { + "chalk": "^2.0.0", + "esutils": "^2.0.2", + "js-tokens": "^4.0.0" + } + }, + "@babel/parser": { + "version": "7.5.5", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.5.5.tgz", + "integrity": "sha512-E5BN68cqR7dhKan1SfqgPGhQ178bkVKpXTPEXnFJBrEt8/DKRZlybmy+IgYLTeN7tp1R5Ccmbm2rBk17sHYU3g==", + "dev": true + }, + "@babel/plugin-syntax-object-rest-spread": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-object-rest-spread/-/plugin-syntax-object-rest-spread-7.8.3.tgz", + "integrity": "sha512-XoqMijGZb9y3y2XskN+P1wUGiVwWZ5JmoDRwx5+3GmEplNyVM2s2Dg8ILFQm8rWM48orGy5YpI5Bl8U1y7ydlA==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.8.0" + } + }, + "@babel/template": { + "version": "7.4.4", + "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.4.4.tgz", + "integrity": "sha512-CiGzLN9KgAvgZsnivND7rkA+AeJ9JB0ciPOD4U59GKbQP2iQl+olF1l76kJOupqidozfZ32ghwBEJDhnk9MEcw==", + "dev": true, + "requires": { + "@babel/code-frame": "^7.0.0", + "@babel/parser": "^7.4.4", + "@babel/types": "^7.4.4" + } + }, + "@babel/traverse": { + "version": "7.5.5", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.5.5.tgz", + "integrity": "sha512-MqB0782whsfffYfSjH4TM+LMjrJnhCNEDMDIjeTpl+ASaUvxcjoiVCo/sM1GhS1pHOXYfWVCYneLjMckuUxDaQ==", + "dev": true, + "requires": { + "@babel/code-frame": "^7.5.5", + "@babel/generator": "^7.5.5", + "@babel/helper-function-name": "^7.1.0", + "@babel/helper-split-export-declaration": "^7.4.4", + "@babel/parser": "^7.5.5", + "@babel/types": "^7.5.5", + "debug": "^4.1.0", + "globals": "^11.1.0", + "lodash": "^4.17.13" + }, + "dependencies": { + "debug": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz", + "integrity": "sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==", + "dev": true, + "requires": { + "ms": "^2.1.1" + } + }, + "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 + } + } + }, + "@babel/types": { + "version": "7.5.5", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.5.5.tgz", + "integrity": "sha512-s63F9nJioLqOlW3UkyMd+BYhXt44YuaFm/VV0VwuteqjYwRrObkU7ra9pY4wAJR3oXi8hJrMcrcJdO/HH33vtw==", + "dev": true, + "requires": { + "esutils": "^2.0.2", + "lodash": "^4.17.13", + "to-fast-properties": "^2.0.0" + } + }, + "@cnakazawa/watch": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/@cnakazawa/watch/-/watch-1.0.4.tgz", + "integrity": "sha512-v9kIhKwjeZThiWrLmj0y17CWoyddASLj9O2yvbZkbvw/N3rWOYy9zkV66ursAoVr0mV15bL8g0c4QZUE6cdDoQ==", + "dev": true, "requires": { "exec-sh": "^0.3.2", "minimist": "^1.2.0" @@ -257,74 +877,132 @@ } } }, - "@jest/core": { - "version": "24.8.0", - "resolved": "https://registry.npmjs.org/@jest/core/-/core-24.8.0.tgz", - "integrity": "sha512-R9rhAJwCBQzaRnrRgAdVfnglUuATXdwTRsYqs6NMdVcAl5euG8LtWDe+fVkN27YfKVBW61IojVsXKaOmSnqd/A==", - "dev": true, - "requires": { - "@jest/console": "^24.7.1", - "@jest/reporters": "^24.8.0", - "@jest/test-result": "^24.8.0", - "@jest/transform": "^24.8.0", - "@jest/types": "^24.8.0", - "ansi-escapes": "^3.0.0", - "chalk": "^2.0.1", - "exit": "^0.1.2", - "graceful-fs": "^4.1.15", - "jest-changed-files": "^24.8.0", - "jest-config": "^24.8.0", - "jest-haste-map": "^24.8.0", - "jest-message-util": "^24.8.0", - "jest-regex-util": "^24.3.0", - "jest-resolve-dependencies": "^24.8.0", - "jest-runner": "^24.8.0", - "jest-runtime": "^24.8.0", - "jest-snapshot": "^24.8.0", - "jest-util": "^24.8.0", - "jest-validate": "^24.8.0", - "jest-watcher": "^24.8.0", - "micromatch": "^3.1.10", - "p-each-series": "^1.0.0", - "pirates": "^4.0.1", - "realpath-native": "^1.1.0", - "rimraf": "^2.5.4", - "strip-ansi": "^5.0.0" - } - }, "@jest/environment": { - "version": "24.8.0", - "resolved": "https://registry.npmjs.org/@jest/environment/-/environment-24.8.0.tgz", - "integrity": "sha512-vlGt2HLg7qM+vtBrSkjDxk9K0YtRBi7HfRFaDxoRtyi+DyVChzhF20duvpdAnKVBV6W5tym8jm0U9EfXbDk1tw==", + "version": "24.9.0", + "resolved": "https://registry.npmjs.org/@jest/environment/-/environment-24.9.0.tgz", + "integrity": "sha512-5A1QluTPhvdIPFYnO3sZC3smkNeXPVELz7ikPbhUj0bQjB07EoE9qtLrem14ZUYWdVayYbsjVwIiL4WBIMV4aQ==", "dev": true, "requires": { - "@jest/fake-timers": "^24.8.0", - "@jest/transform": "^24.8.0", - "@jest/types": "^24.8.0", - "jest-mock": "^24.8.0" + "@jest/fake-timers": "^24.9.0", + "@jest/transform": "^24.9.0", + "@jest/types": "^24.9.0", + "jest-mock": "^24.9.0" + }, + "dependencies": { + "@jest/types": { + "version": "24.9.0", + "resolved": "https://registry.npmjs.org/@jest/types/-/types-24.9.0.tgz", + "integrity": "sha512-XKK7ze1apu5JWQ5eZjHITP66AX+QsLlbaJRBGYr8pNzwcAE2JVkwnf0yqjHTsDRcjR0mujy/NmZMXw5kl+kGBw==", + "dev": true, + "requires": { + "@types/istanbul-lib-coverage": "^2.0.0", + "@types/istanbul-reports": "^1.1.1", + "@types/yargs": "^13.0.0" + } + }, + "@types/yargs": { + "version": "13.0.11", + "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-13.0.11.tgz", + "integrity": "sha512-NRqD6T4gktUrDi1o1wLH3EKC1o2caCr7/wR87ODcbVITQF106OM3sFN92ysZ++wqelOd1CTzatnOBRDYYG6wGQ==", + "dev": true, + "requires": { + "@types/yargs-parser": "*" + } + } } }, "@jest/fake-timers": { - "version": "24.8.0", - "resolved": "https://registry.npmjs.org/@jest/fake-timers/-/fake-timers-24.8.0.tgz", - "integrity": "sha512-2M4d5MufVXwi6VzZhJ9f5S/wU4ud2ck0kxPof1Iz3zWx6Y+V2eJrES9jEktB6O3o/oEyk+il/uNu9PvASjWXQw==", + "version": "24.9.0", + "resolved": "https://registry.npmjs.org/@jest/fake-timers/-/fake-timers-24.9.0.tgz", + "integrity": "sha512-eWQcNa2YSwzXWIMC5KufBh3oWRIijrQFROsIqt6v/NS9Io/gknw1jsAC9c+ih/RQX4A3O7SeWAhQeN0goKhT9A==", "dev": true, "requires": { - "@jest/types": "^24.8.0", - "jest-message-util": "^24.8.0", - "jest-mock": "^24.8.0" + "@jest/types": "^24.9.0", + "jest-message-util": "^24.9.0", + "jest-mock": "^24.9.0" + }, + "dependencies": { + "@jest/console": { + "version": "24.9.0", + "resolved": "https://registry.npmjs.org/@jest/console/-/console-24.9.0.tgz", + "integrity": "sha512-Zuj6b8TnKXi3q4ymac8EQfc3ea/uhLeCGThFqXeC8H9/raaH8ARPUTdId+XyGd03Z4In0/VjD2OYFcBF09fNLQ==", + "dev": true, + "requires": { + "@jest/source-map": "^24.9.0", + "chalk": "^2.0.1", + "slash": "^2.0.0" + } + }, + "@jest/source-map": { + "version": "24.9.0", + "resolved": "https://registry.npmjs.org/@jest/source-map/-/source-map-24.9.0.tgz", + "integrity": "sha512-/Xw7xGlsZb4MJzNDgB7PW5crou5JqWiBQaz6xyPd3ArOg2nfn/PunV8+olXbbEZzNl591o5rWKE9BRDaFAuIBg==", + "dev": true, + "requires": { + "callsites": "^3.0.0", + "graceful-fs": "^4.1.15", + "source-map": "^0.6.0" + } + }, + "@jest/test-result": { + "version": "24.9.0", + "resolved": "https://registry.npmjs.org/@jest/test-result/-/test-result-24.9.0.tgz", + "integrity": "sha512-XEFrHbBonBJ8dGp2JmF8kP/nQI/ImPpygKHwQ/SY+es59Z3L5PI4Qb9TQQMAEeYsThG1xF0k6tmG0tIKATNiiA==", + "dev": true, + "requires": { + "@jest/console": "^24.9.0", + "@jest/types": "^24.9.0", + "@types/istanbul-lib-coverage": "^2.0.0" + } + }, + "@jest/types": { + "version": "24.9.0", + "resolved": "https://registry.npmjs.org/@jest/types/-/types-24.9.0.tgz", + "integrity": "sha512-XKK7ze1apu5JWQ5eZjHITP66AX+QsLlbaJRBGYr8pNzwcAE2JVkwnf0yqjHTsDRcjR0mujy/NmZMXw5kl+kGBw==", + "dev": true, + "requires": { + "@types/istanbul-lib-coverage": "^2.0.0", + "@types/istanbul-reports": "^1.1.1", + "@types/yargs": "^13.0.0" + } + }, + "@types/yargs": { + "version": "13.0.11", + "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-13.0.11.tgz", + "integrity": "sha512-NRqD6T4gktUrDi1o1wLH3EKC1o2caCr7/wR87ODcbVITQF106OM3sFN92ysZ++wqelOd1CTzatnOBRDYYG6wGQ==", + "dev": true, + "requires": { + "@types/yargs-parser": "*" + } + }, + "jest-message-util": { + "version": "24.9.0", + "resolved": "https://registry.npmjs.org/jest-message-util/-/jest-message-util-24.9.0.tgz", + "integrity": "sha512-oCj8FiZ3U0hTP4aSui87P4L4jC37BtQwUMqk+zk/b11FR19BJDeZsZAvIHutWnmtw7r85UmR3CEWZ0HWU2mAlw==", + "dev": true, + "requires": { + "@babel/code-frame": "^7.0.0", + "@jest/test-result": "^24.9.0", + "@jest/types": "^24.9.0", + "@types/stack-utils": "^1.0.1", + "chalk": "^2.0.1", + "micromatch": "^3.1.10", + "slash": "^2.0.0", + "stack-utils": "^1.0.1" + } + } } }, "@jest/reporters": { - "version": "24.8.0", - "resolved": "https://registry.npmjs.org/@jest/reporters/-/reporters-24.8.0.tgz", - "integrity": "sha512-eZ9TyUYpyIIXfYCrw0UHUWUvE35vx5I92HGMgS93Pv7du+GHIzl+/vh8Qj9MCWFK/4TqyttVBPakWMOfZRIfxw==", + "version": "24.9.0", + "resolved": "https://registry.npmjs.org/@jest/reporters/-/reporters-24.9.0.tgz", + "integrity": "sha512-mu4X0yjaHrffOsWmVLzitKmmmWSQ3GGuefgNscUSWNiUNcEOSEQk9k3pERKEQVBb0Cnn88+UESIsZEMH3o88Gw==", "dev": true, "requires": { - "@jest/environment": "^24.8.0", - "@jest/test-result": "^24.8.0", - "@jest/transform": "^24.8.0", - "@jest/types": "^24.8.0", + "@jest/environment": "^24.9.0", + "@jest/test-result": "^24.9.0", + "@jest/transform": "^24.9.0", + "@jest/types": "^24.9.0", "chalk": "^2.0.1", "exit": "^0.1.2", "glob": "^7.1.2", @@ -332,23 +1010,70 @@ "istanbul-lib-instrument": "^3.0.1", "istanbul-lib-report": "^2.0.4", "istanbul-lib-source-maps": "^3.0.1", - "istanbul-reports": "^2.1.1", - "jest-haste-map": "^24.8.0", - "jest-resolve": "^24.8.0", - "jest-runtime": "^24.8.0", - "jest-util": "^24.8.0", + "istanbul-reports": "^2.2.6", + "jest-haste-map": "^24.9.0", + "jest-resolve": "^24.9.0", + "jest-runtime": "^24.9.0", + "jest-util": "^24.9.0", "jest-worker": "^24.6.0", - "node-notifier": "^5.2.1", + "node-notifier": "^5.4.2", "slash": "^2.0.0", "source-map": "^0.6.0", "string-length": "^2.0.0" }, "dependencies": { - "slash": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/slash/-/slash-2.0.0.tgz", - "integrity": "sha512-ZYKh3Wh2z1PpEXWr0MpSBZ0V6mZHAQfYevttO11c51CaWjGTaadiKZ+wVt1PbMlDV5qhMFslpZCemhwOK7C89A==", - "dev": true + "@jest/console": { + "version": "24.9.0", + "resolved": "https://registry.npmjs.org/@jest/console/-/console-24.9.0.tgz", + "integrity": "sha512-Zuj6b8TnKXi3q4ymac8EQfc3ea/uhLeCGThFqXeC8H9/raaH8ARPUTdId+XyGd03Z4In0/VjD2OYFcBF09fNLQ==", + "dev": true, + "requires": { + "@jest/source-map": "^24.9.0", + "chalk": "^2.0.1", + "slash": "^2.0.0" + } + }, + "@jest/source-map": { + "version": "24.9.0", + "resolved": "https://registry.npmjs.org/@jest/source-map/-/source-map-24.9.0.tgz", + "integrity": "sha512-/Xw7xGlsZb4MJzNDgB7PW5crou5JqWiBQaz6xyPd3ArOg2nfn/PunV8+olXbbEZzNl591o5rWKE9BRDaFAuIBg==", + "dev": true, + "requires": { + "callsites": "^3.0.0", + "graceful-fs": "^4.1.15", + "source-map": "^0.6.0" + } + }, + "@jest/test-result": { + "version": "24.9.0", + "resolved": "https://registry.npmjs.org/@jest/test-result/-/test-result-24.9.0.tgz", + "integrity": "sha512-XEFrHbBonBJ8dGp2JmF8kP/nQI/ImPpygKHwQ/SY+es59Z3L5PI4Qb9TQQMAEeYsThG1xF0k6tmG0tIKATNiiA==", + "dev": true, + "requires": { + "@jest/console": "^24.9.0", + "@jest/types": "^24.9.0", + "@types/istanbul-lib-coverage": "^2.0.0" + } + }, + "@jest/types": { + "version": "24.9.0", + "resolved": "https://registry.npmjs.org/@jest/types/-/types-24.9.0.tgz", + "integrity": "sha512-XKK7ze1apu5JWQ5eZjHITP66AX+QsLlbaJRBGYr8pNzwcAE2JVkwnf0yqjHTsDRcjR0mujy/NmZMXw5kl+kGBw==", + "dev": true, + "requires": { + "@types/istanbul-lib-coverage": "^2.0.0", + "@types/istanbul-reports": "^1.1.1", + "@types/yargs": "^13.0.0" + } + }, + "@types/yargs": { + "version": "13.0.11", + "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-13.0.11.tgz", + "integrity": "sha512-NRqD6T4gktUrDi1o1wLH3EKC1o2caCr7/wR87ODcbVITQF106OM3sFN92ysZ++wqelOd1CTzatnOBRDYYG6wGQ==", + "dev": true, + "requires": { + "@types/yargs-parser": "*" + } } } }, @@ -383,44 +1108,120 @@ } }, "@jest/test-sequencer": { - "version": "24.8.0", - "resolved": "https://registry.npmjs.org/@jest/test-sequencer/-/test-sequencer-24.8.0.tgz", - "integrity": "sha512-OzL/2yHyPdCHXEzhoBuq37CE99nkme15eHkAzXRVqthreWZamEMA0WoetwstsQBCXABhczpK03JNbc4L01vvLg==", - "dev": true, - "requires": { - "@jest/test-result": "^24.8.0", - "jest-haste-map": "^24.8.0", - "jest-runner": "^24.8.0", - "jest-runtime": "^24.8.0" - } - }, - "@jest/transform": { - "version": "24.8.0", - "resolved": "https://registry.npmjs.org/@jest/transform/-/transform-24.8.0.tgz", - "integrity": "sha512-xBMfFUP7TortCs0O+Xtez2W7Zu1PLH9bvJgtraN1CDST6LBM/eTOZ9SfwS/lvV8yOfcDpFmwf9bq5cYbXvqsvA==", + "version": "24.9.0", + "resolved": "https://registry.npmjs.org/@jest/test-sequencer/-/test-sequencer-24.9.0.tgz", + "integrity": "sha512-6qqsU4o0kW1dvA95qfNog8v8gkRN9ph6Lz7r96IvZpHdNipP2cBcb07J1Z45mz/VIS01OHJ3pY8T5fUY38tg4A==", + "dev": true, + "requires": { + "@jest/test-result": "^24.9.0", + "jest-haste-map": "^24.9.0", + "jest-runner": "^24.9.0", + "jest-runtime": "^24.9.0" + }, + "dependencies": { + "@jest/console": { + "version": "24.9.0", + "resolved": "https://registry.npmjs.org/@jest/console/-/console-24.9.0.tgz", + "integrity": "sha512-Zuj6b8TnKXi3q4ymac8EQfc3ea/uhLeCGThFqXeC8H9/raaH8ARPUTdId+XyGd03Z4In0/VjD2OYFcBF09fNLQ==", + "dev": true, + "requires": { + "@jest/source-map": "^24.9.0", + "chalk": "^2.0.1", + "slash": "^2.0.0" + } + }, + "@jest/source-map": { + "version": "24.9.0", + "resolved": "https://registry.npmjs.org/@jest/source-map/-/source-map-24.9.0.tgz", + "integrity": "sha512-/Xw7xGlsZb4MJzNDgB7PW5crou5JqWiBQaz6xyPd3ArOg2nfn/PunV8+olXbbEZzNl591o5rWKE9BRDaFAuIBg==", + "dev": true, + "requires": { + "callsites": "^3.0.0", + "graceful-fs": "^4.1.15", + "source-map": "^0.6.0" + } + }, + "@jest/test-result": { + "version": "24.9.0", + "resolved": "https://registry.npmjs.org/@jest/test-result/-/test-result-24.9.0.tgz", + "integrity": "sha512-XEFrHbBonBJ8dGp2JmF8kP/nQI/ImPpygKHwQ/SY+es59Z3L5PI4Qb9TQQMAEeYsThG1xF0k6tmG0tIKATNiiA==", + "dev": true, + "requires": { + "@jest/console": "^24.9.0", + "@jest/types": "^24.9.0", + "@types/istanbul-lib-coverage": "^2.0.0" + } + }, + "@jest/types": { + "version": "24.9.0", + "resolved": "https://registry.npmjs.org/@jest/types/-/types-24.9.0.tgz", + "integrity": "sha512-XKK7ze1apu5JWQ5eZjHITP66AX+QsLlbaJRBGYr8pNzwcAE2JVkwnf0yqjHTsDRcjR0mujy/NmZMXw5kl+kGBw==", + "dev": true, + "requires": { + "@types/istanbul-lib-coverage": "^2.0.0", + "@types/istanbul-reports": "^1.1.1", + "@types/yargs": "^13.0.0" + } + }, + "@types/yargs": { + "version": "13.0.11", + "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-13.0.11.tgz", + "integrity": "sha512-NRqD6T4gktUrDi1o1wLH3EKC1o2caCr7/wR87ODcbVITQF106OM3sFN92ysZ++wqelOd1CTzatnOBRDYYG6wGQ==", + "dev": true, + "requires": { + "@types/yargs-parser": "*" + } + } + } + }, + "@jest/transform": { + "version": "24.9.0", + "resolved": "https://registry.npmjs.org/@jest/transform/-/transform-24.9.0.tgz", + "integrity": "sha512-TcQUmyNRxV94S0QpMOnZl0++6RMiqpbH/ZMccFB/amku6Uwvyb1cjYX7xkp5nGNkbX4QPH/FcB6q1HBTHynLmQ==", "dev": true, "requires": { "@babel/core": "^7.1.0", - "@jest/types": "^24.8.0", + "@jest/types": "^24.9.0", "babel-plugin-istanbul": "^5.1.0", "chalk": "^2.0.1", "convert-source-map": "^1.4.0", "fast-json-stable-stringify": "^2.0.0", "graceful-fs": "^4.1.15", - "jest-haste-map": "^24.8.0", - "jest-regex-util": "^24.3.0", - "jest-util": "^24.8.0", + "jest-haste-map": "^24.9.0", + "jest-regex-util": "^24.9.0", + "jest-util": "^24.9.0", "micromatch": "^3.1.10", + "pirates": "^4.0.1", "realpath-native": "^1.1.0", "slash": "^2.0.0", "source-map": "^0.6.1", "write-file-atomic": "2.4.1" }, "dependencies": { - "slash": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/slash/-/slash-2.0.0.tgz", - "integrity": "sha512-ZYKh3Wh2z1PpEXWr0MpSBZ0V6mZHAQfYevttO11c51CaWjGTaadiKZ+wVt1PbMlDV5qhMFslpZCemhwOK7C89A==", + "@jest/types": { + "version": "24.9.0", + "resolved": "https://registry.npmjs.org/@jest/types/-/types-24.9.0.tgz", + "integrity": "sha512-XKK7ze1apu5JWQ5eZjHITP66AX+QsLlbaJRBGYr8pNzwcAE2JVkwnf0yqjHTsDRcjR0mujy/NmZMXw5kl+kGBw==", + "dev": true, + "requires": { + "@types/istanbul-lib-coverage": "^2.0.0", + "@types/istanbul-reports": "^1.1.1", + "@types/yargs": "^13.0.0" + } + }, + "@types/yargs": { + "version": "13.0.11", + "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-13.0.11.tgz", + "integrity": "sha512-NRqD6T4gktUrDi1o1wLH3EKC1o2caCr7/wR87ODcbVITQF106OM3sFN92ysZ++wqelOd1CTzatnOBRDYYG6wGQ==", + "dev": true, + "requires": { + "@types/yargs-parser": "*" + } + }, + "jest-regex-util": { + "version": "24.9.0", + "resolved": "https://registry.npmjs.org/jest-regex-util/-/jest-regex-util-24.9.0.tgz", + "integrity": "sha512-05Cmb6CuxaA+Ys6fjr3PhvV3bGQmO+2p2La4hFbU+W5uOc479f7FdLXUWXw4pYMAhhSZIuKHwSXSu6CsSBAXQA==", "dev": true } } @@ -437,9 +1238,9 @@ } }, "@types/babel__core": { - "version": "7.1.2", - "resolved": "https://registry.npmjs.org/@types/babel__core/-/babel__core-7.1.2.tgz", - "integrity": "sha512-cfCCrFmiGY/yq0NuKNxIQvZFy9kY/1immpSpTngOnyIbD4+eJOG5mxphhHDv3CHL9GltO4GcKr54kGBg3RNdbg==", + "version": "7.1.12", + "resolved": "https://registry.npmjs.org/@types/babel__core/-/babel__core-7.1.12.tgz", + "integrity": "sha512-wMTHiiTiBAAPebqaPiPDLFA4LYPKr6Ph0Xq/6rq1Ur3v66HXyG+clfR9CNETkD7MQS8ZHvpQOtA53DLws5WAEQ==", "dev": true, "requires": { "@babel/parser": "^7.1.0", @@ -450,18 +1251,18 @@ } }, "@types/babel__generator": { - "version": "7.0.2", - "resolved": "https://registry.npmjs.org/@types/babel__generator/-/babel__generator-7.0.2.tgz", - "integrity": "sha512-NHcOfab3Zw4q5sEE2COkpfXjoE7o+PmqD9DQW4koUT3roNxwziUdXGnRndMat/LJNUtePwn1TlP4do3uoe3KZQ==", + "version": "7.6.2", + "resolved": "https://registry.npmjs.org/@types/babel__generator/-/babel__generator-7.6.2.tgz", + "integrity": "sha512-MdSJnBjl+bdwkLskZ3NGFp9YcXGx5ggLpQQPqtgakVhsWK0hTtNYhjpZLlWQTviGTvF8at+Bvli3jV7faPdgeQ==", "dev": true, "requires": { "@babel/types": "^7.0.0" } }, "@types/babel__template": { - "version": "7.0.2", - "resolved": "https://registry.npmjs.org/@types/babel__template/-/babel__template-7.0.2.tgz", - "integrity": "sha512-/K6zCpeW7Imzgab2bLkLEbz0+1JlFSrUMdw7KoIIu+IUdu51GWaBZpd3y1VXGVXzynvGa4DaIaxNZHiON3GXUg==", + "version": "7.4.0", + "resolved": "https://registry.npmjs.org/@types/babel__template/-/babel__template-7.4.0.tgz", + "integrity": "sha512-NTPErx4/FiPCGScH7foPyr+/1Dkzkni+rHiYHHoTjvwou7AQzJkNeD60A9CXRy+ZEN2B1bggmkTMCDb+Mv5k+A==", "dev": true, "requires": { "@babel/parser": "^7.1.0", @@ -469,9 +1270,9 @@ } }, "@types/babel__traverse": { - "version": "7.0.7", - "resolved": "https://registry.npmjs.org/@types/babel__traverse/-/babel__traverse-7.0.7.tgz", - "integrity": "sha512-CeBpmX1J8kWLcDEnI3Cl2Eo6RfbGvzUctA+CjZUhOKDFbLfcr7fc4usEqLNWetrlJd7RhAkyYe2czXop4fICpw==", + "version": "7.0.15", + "resolved": "https://registry.npmjs.org/@types/babel__traverse/-/babel__traverse-7.0.15.tgz", + "integrity": "sha512-Pzh9O3sTK8V6I1olsXpCfj2k/ygO2q1X0vhhnDrEQyYLHZesWz+zMZMVcwXLCYf0U36EtmyYaFGPfXlTtDHe3A==", "dev": true, "requires": { "@babel/types": "^7.3.0" @@ -535,10 +1336,16 @@ "integrity": "sha512-SOhuU4wNBxhhTHxYaiG5NY4HBhDIDnJF60GU+2LqHAdKKer86//e4yg69aENCtQ04n0ovz+tq2YPME5t5yp4pw==", "dev": true }, + "@types/yargs-parser": { + "version": "15.0.0", + "resolved": "https://registry.npmjs.org/@types/yargs-parser/-/yargs-parser-15.0.0.tgz", + "integrity": "sha512-FA/BWv8t8ZWJ+gEOnLLd8ygxH/2UFbAvgEonyfN6yWGLKc7zVjbpl2Y4CTjid9h2RfgPP6SEt6uHwEOply00yw==", + "dev": true + }, "abab": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/abab/-/abab-2.0.0.tgz", - "integrity": "sha512-sY5AXXVZv4Y1VACTtR11UJCPHHudgY5i26Qj5TypE6DKlIApbwb5uqhXcJ5UUGbvZNRh7EeIoW+LrJumBsKp7w==", + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/abab/-/abab-2.0.5.tgz", + "integrity": "sha512-9IK9EadsbHo6jLWIpxpR6pL0sazTXV6+SQv25ZB+F7Bj9mJNaOc4nCRabwd5M/JwmUa8idz6Eci6eKfJryPs6Q==", "dev": true }, "acorn": { @@ -548,9 +1355,9 @@ "dev": true }, "acorn-globals": { - "version": "4.3.2", - "resolved": "https://registry.npmjs.org/acorn-globals/-/acorn-globals-4.3.2.tgz", - "integrity": "sha512-BbzvZhVtZP+Bs1J1HcwrQe8ycfO0wStkSGxuul3He3GkHOIZ6eTqOkPuw9IP1X3+IkOo4wiJmwkobzXYz4wewQ==", + "version": "4.3.4", + "resolved": "https://registry.npmjs.org/acorn-globals/-/acorn-globals-4.3.4.tgz", + "integrity": "sha512-clfQEh21R+D0leSbUdWf3OcfqyaCSAQ8Ryq00bofSekfr9W8u1jyYZo6ir0xu9Gtcf7BjcHJpnbZH7JOCpP60A==", "dev": true, "requires": { "acorn": "^6.0.1", @@ -558,9 +1365,9 @@ }, "dependencies": { "acorn": { - "version": "6.4.1", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-6.4.1.tgz", - "integrity": "sha512-ZVA9k326Nwrj3Cj9jlh3wGFutC2ZornPNARZwsNYqQYgN0EsV2d53w5RN/co65Ohn4sUAUtb1rSUAOD6XN9idA==", + "version": "6.4.2", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-6.4.2.tgz", + "integrity": "sha512-XtGIhXwF8YM8bJhGxG5kXgjkEuNGLTkoYqVE+KMR+aspr4KGYmKYg7yUe3KghyQ9yheNwLnjmzh/7+gfDBmHCQ==", "dev": true } } @@ -572,12 +1379,12 @@ "dev": true }, "ajv": { - "version": "6.10.2", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.10.2.tgz", - "integrity": "sha512-TXtUUEYHuaTEbLZWIKUr5pmBuhDLy+8KYtPYdcV8qC+pOZL+NKqYwvWSRrVXHn+ZmRRAu8vJTAznH7Oag6RVRw==", + "version": "6.12.6", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", + "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", "dev": true, "requires": { - "fast-deep-equal": "^2.0.1", + "fast-deep-equal": "^3.1.1", "fast-json-stable-stringify": "^2.0.0", "json-schema-traverse": "^0.4.1", "uri-js": "^4.2.2" @@ -696,31 +1503,45 @@ "dev": true }, "aws4": { - "version": "1.8.0", - "resolved": "https://registry.npmjs.org/aws4/-/aws4-1.8.0.tgz", - "integrity": "sha512-ReZxvNHIOv88FlT7rxcXIIC0fPt4KZqZbOlivyWtXLt8ESx84zd3kMC6iK5jVeS2qt+g7ftS7ye4fi06X5rtRQ==", + "version": "1.11.0", + "resolved": "https://registry.npmjs.org/aws4/-/aws4-1.11.0.tgz", + "integrity": "sha512-xh1Rl34h6Fi1DC2WWKfxUTVqRsNnr6LsKz2+hfwDxQJWmrx8+c7ylaqBMcHfl1U1r2dsifOvKX3LQuLNZ+XSvA==", "dev": true }, "babel-jest": { - "version": "24.8.0", - "resolved": "https://registry.npmjs.org/babel-jest/-/babel-jest-24.8.0.tgz", - "integrity": "sha512-+5/kaZt4I9efoXzPlZASyK/lN9qdRKmmUav9smVc0ruPQD7IsfucQ87gpOE8mn2jbDuS6M/YOW6n3v9ZoIfgnw==", + "version": "24.9.0", + "resolved": "https://registry.npmjs.org/babel-jest/-/babel-jest-24.9.0.tgz", + "integrity": "sha512-ntuddfyiN+EhMw58PTNL1ph4C9rECiQXjI4nMMBKBaNjXvqLdkXpPRcMSr4iyBrJg/+wz9brFUD6RhOAT6r4Iw==", "dev": true, "requires": { - "@jest/transform": "^24.8.0", - "@jest/types": "^24.8.0", + "@jest/transform": "^24.9.0", + "@jest/types": "^24.9.0", "@types/babel__core": "^7.1.0", "babel-plugin-istanbul": "^5.1.0", - "babel-preset-jest": "^24.6.0", + "babel-preset-jest": "^24.9.0", "chalk": "^2.4.2", "slash": "^2.0.0" }, "dependencies": { - "slash": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/slash/-/slash-2.0.0.tgz", - "integrity": "sha512-ZYKh3Wh2z1PpEXWr0MpSBZ0V6mZHAQfYevttO11c51CaWjGTaadiKZ+wVt1PbMlDV5qhMFslpZCemhwOK7C89A==", - "dev": true + "@jest/types": { + "version": "24.9.0", + "resolved": "https://registry.npmjs.org/@jest/types/-/types-24.9.0.tgz", + "integrity": "sha512-XKK7ze1apu5JWQ5eZjHITP66AX+QsLlbaJRBGYr8pNzwcAE2JVkwnf0yqjHTsDRcjR0mujy/NmZMXw5kl+kGBw==", + "dev": true, + "requires": { + "@types/istanbul-lib-coverage": "^2.0.0", + "@types/istanbul-reports": "^1.1.1", + "@types/yargs": "^13.0.0" + } + }, + "@types/yargs": { + "version": "13.0.11", + "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-13.0.11.tgz", + "integrity": "sha512-NRqD6T4gktUrDi1o1wLH3EKC1o2caCr7/wR87ODcbVITQF106OM3sFN92ysZ++wqelOd1CTzatnOBRDYYG6wGQ==", + "dev": true, + "requires": { + "@types/yargs-parser": "*" + } } } }, @@ -737,22 +1558,22 @@ } }, "babel-plugin-jest-hoist": { - "version": "24.6.0", - "resolved": "https://registry.npmjs.org/babel-plugin-jest-hoist/-/babel-plugin-jest-hoist-24.6.0.tgz", - "integrity": "sha512-3pKNH6hMt9SbOv0F3WVmy5CWQ4uogS3k0GY5XLyQHJ9EGpAT9XWkFd2ZiXXtkwFHdAHa5j7w7kfxSP5lAIwu7w==", + "version": "24.9.0", + "resolved": "https://registry.npmjs.org/babel-plugin-jest-hoist/-/babel-plugin-jest-hoist-24.9.0.tgz", + "integrity": "sha512-2EMA2P8Vp7lG0RAzr4HXqtYwacfMErOuv1U3wrvxHX6rD1sV6xS3WXG3r8TRQ2r6w8OhvSdWt+z41hQNwNm3Xw==", "dev": true, "requires": { "@types/babel__traverse": "^7.0.6" } }, "babel-preset-jest": { - "version": "24.6.0", - "resolved": "https://registry.npmjs.org/babel-preset-jest/-/babel-preset-jest-24.6.0.tgz", - "integrity": "sha512-pdZqLEdmy1ZK5kyRUfvBb2IfTPb2BUvIJczlPspS8fWmBQslNNDBqVfh7BW5leOVJMDZKzjD8XEyABTk6gQ5yw==", + "version": "24.9.0", + "resolved": "https://registry.npmjs.org/babel-preset-jest/-/babel-preset-jest-24.9.0.tgz", + "integrity": "sha512-izTUuhE4TMfTRPF92fFwD2QfdXaZW08qvWTFCI51V8rW5x00UuPgc3ajRoWofXOuxjfcOM5zzSYsQS3H8KGCAg==", "dev": true, "requires": { "@babel/plugin-syntax-object-rest-spread": "^7.0.0", - "babel-plugin-jest-hoist": "^24.6.0" + "babel-plugin-jest-hoist": "^24.9.0" } }, "balanced-match": { @@ -831,6 +1652,16 @@ "tweetnacl": "^0.14.3" } }, + "bindings": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/bindings/-/bindings-1.5.0.tgz", + "integrity": "sha512-p2q/t/mhvuOj/UeLlV6566GD/guowlr0hHxClI0W9m7MWYkL1F0hLo+0Aexs9HSPCtR1SXQ0TD3MMKrXZajbiQ==", + "dev": true, + "optional": true, + "requires": { + "file-uri-to-path": "1.0.0" + } + }, "brace-expansion": { "version": "1.1.11", "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", @@ -877,9 +1708,9 @@ } }, "browser-process-hrtime": { - "version": "0.1.3", - "resolved": "https://registry.npmjs.org/browser-process-hrtime/-/browser-process-hrtime-0.1.3.tgz", - "integrity": "sha512-bRFnI4NnjO6cnyLmOV/7PVoDEMJChlcfN0z4s1YMBY989/SvlfMI1lgCnkFUs53e9gQF+w7qu7XdllSTiSl8Aw==", + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/browser-process-hrtime/-/browser-process-hrtime-1.0.0.tgz", + "integrity": "sha512-9o5UecI3GhkpM6DrXr69PblIuWxPKk9Y0jHBRhdocZ2y7YECBFCsHm79Pr3OyR2AvjhDkabFJaDJMYRazHgsow==", "dev": true }, "browser-resolve": { @@ -909,9 +1740,9 @@ } }, "bser": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/bser/-/bser-2.1.0.tgz", - "integrity": "sha512-8zsjWrQkkBoLK6uxASk1nJ2SKv97ltiGDo6A3wA0/yRPz+CwmEyDo0hUrhIuukG2JHpAl3bvFIixw2/3Hi0DOg==", + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/bser/-/bser-2.1.1.tgz", + "integrity": "sha512-gQxTNE/GAfIIrmHLUE3oJyp5FO6HRBfhjnw4/wMmA63ZGDJnWBmgY/lyQBpnDUkGmAhbSe39tx2d/iTOAfglwQ==", "dev": true, "requires": { "node-int64": "^0.4.0" @@ -948,6 +1779,12 @@ } } }, + "callsites": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", + "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==", + "dev": true + }, "camelcase": { "version": "5.3.1", "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz", @@ -1016,31 +1853,14 @@ } }, "cliui": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/cliui/-/cliui-4.1.0.tgz", - "integrity": "sha512-4FG+RSG9DL7uEwRUZXZn3SS34DiDPfzP0VOiEwtUWlE+AR2EIg+hSyvrIgUUfhdgR/UkAeW2QHgeP+hWrXs7jQ==", + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-5.0.0.tgz", + "integrity": "sha512-PYeGSEmmHM6zvoef2w8TPzlrnNpXIjTipYK780YswmIP9vjxmd6Y2a3CB2Ks6/AU8NHjZugXvo8w3oWM2qnwXA==", "dev": true, "requires": { - "string-width": "^2.1.1", - "strip-ansi": "^4.0.0", - "wrap-ansi": "^2.0.0" - }, - "dependencies": { - "ansi-regex": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", - "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=", - "dev": true - }, - "strip-ansi": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", - "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", - "dev": true, - "requires": { - "ansi-regex": "^3.0.0" - } - } + "string-width": "^3.1.0", + "strip-ansi": "^5.2.0", + "wrap-ansi": "^5.1.0" } }, "co": { @@ -1049,12 +1869,6 @@ "integrity": "sha1-bqa989hTrlTMuOR7+gvz+QMfsYQ=", "dev": true }, - "code-point-at": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/code-point-at/-/code-point-at-1.1.0.tgz", - "integrity": "sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c=", - "dev": true - }, "collection-visit": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/collection-visit/-/collection-visit-1.0.0.tgz", @@ -1089,13 +1903,6 @@ "delayed-stream": "~1.0.0" } }, - "commander": { - "version": "2.20.3", - "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz", - "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==", - "dev": true, - "optional": true - }, "component-emitter": { "version": "1.3.0", "resolved": "https://registry.npmjs.org/component-emitter/-/component-emitter-1.3.0.tgz", @@ -1109,9 +1916,9 @@ "dev": true }, "convert-source-map": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.6.0.tgz", - "integrity": "sha512-eFu7XigvxdZ1ETfbgPBohgyQ/Z++C0eEhTor0qRwBw9unw+L0/6V8wkSuGgzdThkiS5lSpdptOQPD8Ak40a+7A==", + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.7.0.tgz", + "integrity": "sha512-4FJkXzKXEDB1snCFZlLP4gpC3JILicCpGbzG9f9G7tGqGCzETQ2hWPrcinA9oU4wtf2biUaEH5065UnMeR33oA==", "dev": true, "requires": { "safe-buffer": "~5.1.1" @@ -1140,14 +1947,6 @@ "semver": "^5.5.0", "shebang-command": "^1.2.0", "which": "^1.2.9" - }, - "dependencies": { - "semver": { - "version": "5.7.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.0.tgz", - "integrity": "sha512-Ya52jSX2u7QKghxeoFGpLwCtGlt7j0oY9DYb5apt9nPlJ42ID+ulTXESnt/qAQcoSERyZ5sl3LDIOw0nAn/5DA==", - "dev": true - } } }, "cssom": { @@ -1186,9 +1985,9 @@ }, "dependencies": { "whatwg-url": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-7.0.0.tgz", - "integrity": "sha512-37GeVSIJ3kn1JgKyjiYNmSLP1yzbpb29jdmwBSgkD9h40/hyrR/OifpVUndji3tmwGgD8qpw7iQu3RSbCrBpsQ==", + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-7.1.0.tgz", + "integrity": "sha512-WUu7Rg1DroM7oQvGWfOiAK21n74Gg+T4elXEQYkOhtyLeWiJFoOGLXPKI/9gzIie9CtwVLm8wtw6YJdKyxSjeg==", "dev": true, "requires": { "lodash.sortby": "^4.7.0", @@ -1318,10 +2117,16 @@ "safer-buffer": "^2.1.0" } }, + "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 + }, "end-of-stream": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.1.tgz", - "integrity": "sha512-1MkrZNvWTKCaigbn+W15elq2BB/L22nqrSY5DKlo3X6+vclJm8Bb5djXJBmEX6fS3+zCh/F4VBK5Z2KxJt4s2Q==", + "version": "1.4.4", + "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.4.tgz", + "integrity": "sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q==", "dev": true, "requires": { "once": "^1.4.0" @@ -1368,30 +2173,28 @@ "dev": true }, "escodegen": { - "version": "1.11.1", - "resolved": "https://registry.npmjs.org/escodegen/-/escodegen-1.11.1.tgz", - "integrity": "sha512-JwiqFD9KdGVVpeuRa68yU3zZnBEOcPs0nKW7wZzXky8Z7tffdYUHbe11bPCV5jYlK6DVdKLWLm0f5I/QlL0Kmw==", + "version": "1.14.3", + "resolved": "https://registry.npmjs.org/escodegen/-/escodegen-1.14.3.tgz", + "integrity": "sha512-qFcX0XJkdg+PB3xjZZG/wKSuT1PnQWx57+TVSjIMmILd2yC/6ByYElPwJnslDsuWuSAp4AwJGumarAAmJch5Kw==", "dev": true, "requires": { - "esprima": "^3.1.3", + "esprima": "^4.0.1", "estraverse": "^4.2.0", "esutils": "^2.0.2", "optionator": "^0.8.1", "source-map": "~0.6.1" - }, - "dependencies": { - "esprima": { - "version": "3.1.3", - "resolved": "https://registry.npmjs.org/esprima/-/esprima-3.1.3.tgz", - "integrity": "sha1-/cpRzuYTOJXjyI1TXOSdv/YqRjM=", - "dev": true - } } }, + "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 + }, "estraverse": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.2.0.tgz", - "integrity": "sha1-De4/7TH81GlhjOc0IJn8GvoL2xM=", + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.3.0.tgz", + "integrity": "sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw==", "dev": true }, "esutils": { @@ -1401,9 +2204,9 @@ "dev": true }, "exec-sh": { - "version": "0.3.2", - "resolved": "https://registry.npmjs.org/exec-sh/-/exec-sh-0.3.2.tgz", - "integrity": "sha512-9sLAvzhI5nc8TpuQUh4ahMdCrWT00wPWz7j47/emR5+2qEfoZP5zzUXvx+vdx+H6ohhnsYC31iX04QLYJK8zTg==", + "version": "0.3.4", + "resolved": "https://registry.npmjs.org/exec-sh/-/exec-sh-0.3.4.tgz", + "integrity": "sha512-sEFIkc61v75sWeOe72qyrqg2Qg0OuLESziUDk/O/z2qgS15y2gWVFrI6f2Qn/qw/0/NCfCEsmNA4zOjkwEZT1A==", "dev": true }, "execa": { @@ -1588,662 +2391,138 @@ "resolved": "https://registry.npmjs.org/extsprintf/-/extsprintf-1.3.0.tgz", "integrity": "sha1-lpGEQOMEGnpBT4xS48V06zw+HgU=", "dev": true - }, - "fast-deep-equal": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-2.0.1.tgz", - "integrity": "sha1-ewUhjd+WZ79/Nwv3/bLLFf3Qqkk=", - "dev": true - }, - "fast-json-stable-stringify": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.0.0.tgz", - "integrity": "sha1-1RQsDK7msRifh9OnYREGT4bIu/I=", - "dev": true - }, - "fast-levenshtein": { - "version": "2.0.6", - "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz", - "integrity": "sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc=", - "dev": true - }, - "fb-watchman": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/fb-watchman/-/fb-watchman-2.0.0.tgz", - "integrity": "sha1-VOmr99+i8mzZsWNsWIwa/AXeXVg=", - "dev": true, - "requires": { - "bser": "^2.0.0" - } - }, - "fill-range": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-4.0.0.tgz", - "integrity": "sha1-1USBHUKPmOsGpj3EAtJAPDKMOPc=", - "dev": true, - "requires": { - "extend-shallow": "^2.0.1", - "is-number": "^3.0.0", - "repeat-string": "^1.6.1", - "to-regex-range": "^2.1.0" - }, - "dependencies": { - "extend-shallow": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", - "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", - "dev": true, - "requires": { - "is-extendable": "^0.1.0" - } - } - } - }, - "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, - "requires": { - "locate-path": "^3.0.0" - } - }, - "for-in": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/for-in/-/for-in-1.0.2.tgz", - "integrity": "sha1-gQaNKVqBQuwKxybG4iAMMPttXoA=", - "dev": true - }, - "forever-agent": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/forever-agent/-/forever-agent-0.6.1.tgz", - "integrity": "sha1-+8cfDEGt6zf5bFd60e1C2P2sypE=", - "dev": true - }, - "form-data": { - "version": "2.3.3", - "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.3.3.tgz", - "integrity": "sha512-1lLKB2Mu3aGP1Q/2eCOx0fNbRMe7XdwktwOruhfqqd0rIJWwN4Dh+E3hrPSlDCXnSR7UtZ1N38rVXm+6+MEhJQ==", - "dev": true, - "requires": { - "asynckit": "^0.4.0", - "combined-stream": "^1.0.6", - "mime-types": "^2.1.12" - } - }, - "fragment-cache": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/fragment-cache/-/fragment-cache-0.2.1.tgz", - "integrity": "sha1-QpD60n8T6Jvn8zeZxrxaCr//DRk=", - "dev": true, - "requires": { - "map-cache": "^0.2.2" - } - }, - "fs.realpath": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", - "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=", - "dev": true - }, - "fsevents": { - "version": "1.2.9", - "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-1.2.9.tgz", - "integrity": "sha512-oeyj2H3EjjonWcFjD5NvZNE9Rqe4UW+nQBU2HNeKw0koVLEFIhtyETyAakeAM3de7Z/SW5kcA+fZUait9EApnw==", - "dev": true, - "optional": true, - "requires": { - "nan": "^2.12.1", - "node-pre-gyp": "^0.12.0" - }, - "dependencies": { - "abbrev": { - "version": "1.1.1", - "bundled": true, - "dev": true, - "optional": true - }, - "ansi-regex": { - "version": "2.1.1", - "bundled": true, - "dev": true, - "optional": true - }, - "aproba": { - "version": "1.2.0", - "bundled": true, - "dev": true, - "optional": true - }, - "are-we-there-yet": { - "version": "1.1.5", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "delegates": "^1.0.0", - "readable-stream": "^2.0.6" - } - }, - "balanced-match": { - "version": "1.0.0", - "bundled": true, - "dev": true, - "optional": true - }, - "brace-expansion": { - "version": "1.1.11", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" - } - }, - "chownr": { - "version": "1.1.1", - "bundled": true, - "dev": true, - "optional": true - }, - "code-point-at": { - "version": "1.1.0", - "bundled": true, - "dev": true, - "optional": true - }, - "concat-map": { - "version": "0.0.1", - "bundled": true, - "dev": true, - "optional": true - }, - "console-control-strings": { - "version": "1.1.0", - "bundled": true, - "dev": true, - "optional": true - }, - "core-util-is": { - "version": "1.0.2", - "bundled": true, - "dev": true, - "optional": true - }, - "debug": { - "version": "4.1.1", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "ms": "^2.1.1" - } - }, - "deep-extend": { - "version": "0.6.0", - "bundled": true, - "dev": true, - "optional": true - }, - "delegates": { - "version": "1.0.0", - "bundled": true, - "dev": true, - "optional": true - }, - "detect-libc": { - "version": "1.0.3", - "bundled": true, - "dev": true, - "optional": true - }, - "fs-minipass": { - "version": "1.2.5", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "minipass": "^2.2.1" - } - }, - "fs.realpath": { - "version": "1.0.0", - "bundled": true, - "dev": true, - "optional": true - }, - "gauge": { - "version": "2.7.4", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "aproba": "^1.0.3", - "console-control-strings": "^1.0.0", - "has-unicode": "^2.0.0", - "object-assign": "^4.1.0", - "signal-exit": "^3.0.0", - "string-width": "^1.0.1", - "strip-ansi": "^3.0.1", - "wide-align": "^1.1.0" - } - }, - "glob": { - "version": "7.1.3", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.0.4", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - } - }, - "has-unicode": { - "version": "2.0.1", - "bundled": true, - "dev": true, - "optional": true - }, - "iconv-lite": { - "version": "0.4.24", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "safer-buffer": ">= 2.1.2 < 3" - } - }, - "ignore-walk": { - "version": "3.0.1", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "minimatch": "^3.0.4" - } - }, - "inflight": { - "version": "1.0.6", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "once": "^1.3.0", - "wrappy": "1" - } - }, - "inherits": { - "version": "2.0.3", - "bundled": true, - "dev": true, - "optional": true - }, - "ini": { - "version": "1.3.5", - "bundled": true, - "dev": true, - "optional": true - }, - "is-fullwidth-code-point": { - "version": "1.0.0", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "number-is-nan": "^1.0.0" - } - }, - "isarray": { - "version": "1.0.0", - "bundled": true, - "dev": true, - "optional": true - }, - "minimatch": { - "version": "3.0.4", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "brace-expansion": "^1.1.7" - } - }, - "minimist": { - "version": "0.0.8", - "bundled": true, - "dev": true, - "optional": true - }, - "minipass": { - "version": "2.3.5", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "safe-buffer": "^5.1.2", - "yallist": "^3.0.0" - } - }, - "minizlib": { - "version": "1.2.1", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "minipass": "^2.2.1" - } - }, - "mkdirp": { - "version": "0.5.1", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "minimist": "0.0.8" - } - }, - "ms": { - "version": "2.1.1", - "bundled": true, - "dev": true, - "optional": true - }, - "needle": { - "version": "2.3.0", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "debug": "^4.1.0", - "iconv-lite": "^0.4.4", - "sax": "^1.2.4" - } - }, - "node-pre-gyp": { - "version": "0.12.0", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "detect-libc": "^1.0.2", - "mkdirp": "^0.5.1", - "needle": "^2.2.1", - "nopt": "^4.0.1", - "npm-packlist": "^1.1.6", - "npmlog": "^4.0.2", - "rc": "^1.2.7", - "rimraf": "^2.6.1", - "semver": "^5.3.0", - "tar": "^4" - } - }, - "nopt": { - "version": "4.0.1", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "abbrev": "1", - "osenv": "^0.1.4" - } - }, - "npm-bundled": { - "version": "1.0.6", - "bundled": true, - "dev": true, - "optional": true - }, - "npm-packlist": { - "version": "1.4.1", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "ignore-walk": "^3.0.1", - "npm-bundled": "^1.0.1" - } - }, - "npmlog": { - "version": "4.1.2", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "are-we-there-yet": "~1.1.2", - "console-control-strings": "~1.1.0", - "gauge": "~2.7.3", - "set-blocking": "~2.0.0" - } - }, - "number-is-nan": { - "version": "1.0.1", - "bundled": true, - "dev": true, - "optional": true - }, - "object-assign": { - "version": "4.1.1", - "bundled": true, - "dev": true, - "optional": true - }, - "once": { - "version": "1.4.0", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "wrappy": "1" - } - }, - "os-homedir": { - "version": "1.0.2", - "bundled": true, - "dev": true, - "optional": true - }, - "os-tmpdir": { - "version": "1.0.2", - "bundled": true, - "dev": true, - "optional": true - }, - "osenv": { - "version": "0.1.5", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "os-homedir": "^1.0.0", - "os-tmpdir": "^1.0.0" - } - }, - "path-is-absolute": { - "version": "1.0.1", - "bundled": true, - "dev": true, - "optional": true - }, - "process-nextick-args": { - "version": "2.0.0", - "bundled": true, - "dev": true, - "optional": true - }, - "rc": { - "version": "1.2.8", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "deep-extend": "^0.6.0", - "ini": "~1.3.0", - "minimist": "^1.2.0", - "strip-json-comments": "~2.0.1" - }, - "dependencies": { - "minimist": { - "version": "1.2.0", - "bundled": true, - "dev": true, - "optional": true - } - } - }, - "readable-stream": { - "version": "2.3.6", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.3", - "isarray": "~1.0.0", - "process-nextick-args": "~2.0.0", - "safe-buffer": "~5.1.1", - "string_decoder": "~1.1.1", - "util-deprecate": "~1.0.1" - } - }, - "rimraf": { - "version": "2.6.3", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "glob": "^7.1.3" - } - }, - "safe-buffer": { - "version": "5.1.2", - "bundled": true, - "dev": true, - "optional": true - }, - "safer-buffer": { - "version": "2.1.2", - "bundled": true, - "dev": true, - "optional": true - }, - "sax": { - "version": "1.2.4", - "bundled": true, - "dev": true, - "optional": true - }, - "semver": { - "version": "5.7.0", - "bundled": true, - "dev": true, - "optional": true - }, - "set-blocking": { - "version": "2.0.0", - "bundled": true, - "dev": true, - "optional": true - }, - "signal-exit": { - "version": "3.0.2", - "bundled": true, - "dev": true, - "optional": true - }, - "string-width": { - "version": "1.0.2", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "code-point-at": "^1.0.0", - "is-fullwidth-code-point": "^1.0.0", - "strip-ansi": "^3.0.0" - } - }, - "string_decoder": { - "version": "1.1.1", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "safe-buffer": "~5.1.0" - } - }, - "strip-ansi": { - "version": "3.0.1", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "ansi-regex": "^2.0.0" - } - }, - "strip-json-comments": { + }, + "fast-deep-equal": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", + "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==", + "dev": true + }, + "fast-json-stable-stringify": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.0.0.tgz", + "integrity": "sha1-1RQsDK7msRifh9OnYREGT4bIu/I=", + "dev": true + }, + "fast-levenshtein": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz", + "integrity": "sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc=", + "dev": true + }, + "fb-watchman": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/fb-watchman/-/fb-watchman-2.0.1.tgz", + "integrity": "sha512-DkPJKQeY6kKwmuMretBhr7G6Vodr7bFwDYTXIkfG1gjvNpaxBTQV3PbXg6bR1c1UP4jPOX0jHUbbHANL9vRjVg==", + "dev": true, + "requires": { + "bser": "2.1.1" + } + }, + "file-uri-to-path": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/file-uri-to-path/-/file-uri-to-path-1.0.0.tgz", + "integrity": "sha512-0Zt+s3L7Vf1biwWZ29aARiVYLx7iMGnEUl9x33fbB/j3jR81u/O2LbqK+Bm1CDSNDKVtJ/YjwY7TUd5SkeLQLw==", + "dev": true, + "optional": true + }, + "fill-range": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-4.0.0.tgz", + "integrity": "sha1-1USBHUKPmOsGpj3EAtJAPDKMOPc=", + "dev": true, + "requires": { + "extend-shallow": "^2.0.1", + "is-number": "^3.0.0", + "repeat-string": "^1.6.1", + "to-regex-range": "^2.1.0" + }, + "dependencies": { + "extend-shallow": { "version": "2.0.1", - "bundled": true, - "dev": true, - "optional": true - }, - "tar": { - "version": "4.4.8", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "chownr": "^1.1.1", - "fs-minipass": "^1.2.5", - "minipass": "^2.3.4", - "minizlib": "^1.1.1", - "mkdirp": "^0.5.0", - "safe-buffer": "^5.1.2", - "yallist": "^3.0.2" - } - }, - "util-deprecate": { - "version": "1.0.2", - "bundled": true, - "dev": true, - "optional": true - }, - "wide-align": { - "version": "1.1.3", - "bundled": true, + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", "dev": true, - "optional": true, "requires": { - "string-width": "^1.0.2 || 2" + "is-extendable": "^0.1.0" } - }, - "wrappy": { - "version": "1.0.2", - "bundled": true, - "dev": true, - "optional": true - }, - "yallist": { - "version": "3.0.3", - "bundled": true, - "dev": true, - "optional": true } } }, + "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, + "requires": { + "locate-path": "^3.0.0" + } + }, + "for-in": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/for-in/-/for-in-1.0.2.tgz", + "integrity": "sha1-gQaNKVqBQuwKxybG4iAMMPttXoA=", + "dev": true + }, + "forever-agent": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/forever-agent/-/forever-agent-0.6.1.tgz", + "integrity": "sha1-+8cfDEGt6zf5bFd60e1C2P2sypE=", + "dev": true + }, + "form-data": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.3.3.tgz", + "integrity": "sha512-1lLKB2Mu3aGP1Q/2eCOx0fNbRMe7XdwktwOruhfqqd0rIJWwN4Dh+E3hrPSlDCXnSR7UtZ1N38rVXm+6+MEhJQ==", + "dev": true, + "requires": { + "asynckit": "^0.4.0", + "combined-stream": "^1.0.6", + "mime-types": "^2.1.12" + } + }, + "fragment-cache": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/fragment-cache/-/fragment-cache-0.2.1.tgz", + "integrity": "sha1-QpD60n8T6Jvn8zeZxrxaCr//DRk=", + "dev": true, + "requires": { + "map-cache": "^0.2.2" + } + }, + "fs.realpath": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", + "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=", + "dev": true + }, + "fsevents": { + "version": "1.2.13", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-1.2.13.tgz", + "integrity": "sha512-oWb1Z6mkHIskLzEJ/XWX0srkpkTQ7vaopMQkyaEIoq0fmtFVxOthb8cCxeT+p3ynTdkk/RZwbgG4brR5BeWECw==", + "dev": true, + "optional": true, + "requires": { + "bindings": "^1.5.0", + "nan": "^2.12.1" + } + }, "function-bind": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==", "dev": true }, + "gensync": { + "version": "1.0.0-beta.2", + "resolved": "https://registry.npmjs.org/gensync/-/gensync-1.0.0-beta.2.tgz", + "integrity": "sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg==", + "dev": true + }, "get-caller-file": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-1.0.3.tgz", - "integrity": "sha512-3t6rVToeoZfYSGd8YoLFR2DJkiQrIiUrGcjvFX2mDw3bn6k2OtwHN0TNCLbBO+w8qTvimhDkv+LSscbJY1vE6w==", + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", + "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", "dev": true }, "get-stream": { @@ -2271,9 +2550,9 @@ } }, "glob": { - "version": "7.1.4", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.4.tgz", - "integrity": "sha512-hkLPepehmnKk41pUGm3sYxoFs/umurYfYJCerbXEyFIWcAzvpipAgVkBqqT9RBKMGjnq6kMuyYwha6csxbiM1A==", + "version": "7.1.6", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.6.tgz", + "integrity": "sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA==", "dev": true, "requires": { "fs.realpath": "^1.0.0", @@ -2302,18 +2581,6 @@ "integrity": "sha1-8QdIy+dq+WS3yWyTxrzCivEgwIE=", "dev": true }, - "handlebars": { - "version": "4.5.1", - "resolved": "https://registry.npmjs.org/handlebars/-/handlebars-4.5.1.tgz", - "integrity": "sha512-C29UoFzHe9yM61lOsIlCE5/mQVGrnIOrOq7maQl76L7tYPCgC1og0Ajt6uWnX4ZTxBPnjw+CUvawphwCfJgUnA==", - "dev": true, - "requires": { - "neo-async": "^2.6.0", - "optimist": "^0.6.1", - "source-map": "^0.6.1", - "uglify-js": "^3.1.4" - } - }, "har-schema": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/har-schema/-/har-schema-2.0.0.tgz", @@ -2321,12 +2588,12 @@ "dev": true }, "har-validator": { - "version": "5.1.3", - "resolved": "https://registry.npmjs.org/har-validator/-/har-validator-5.1.3.tgz", - "integrity": "sha512-sNvOCzEQNr/qrvJgc3UG/kD4QtlHycrzwS+6mfTrrSq97BvaYcPZZI1ZSqGSPR73Cxn4LKTD4PttRwfU7jWq5g==", + "version": "5.1.5", + "resolved": "https://registry.npmjs.org/har-validator/-/har-validator-5.1.5.tgz", + "integrity": "sha512-nmT2T0lljbxdQZfspsno9hgrG3Uir6Ks5afism62poxqBM6sDnMEuPmzTq8XN0OEwqKLLdh1jQI3qyE66Nzb3w==", "dev": true, "requires": { - "ajv": "^6.5.5", + "ajv": "^6.12.3", "har-schema": "^2.0.0" } }, @@ -2392,9 +2659,9 @@ } }, "hosted-git-info": { - "version": "2.7.1", - "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.7.1.tgz", - "integrity": "sha512-7T/BxH19zbcCTa8XkMlbK5lTo1WtgkFi3GvdWEyNuc4Vex7/9Dqbnpsf4JMydcfj9HCg4zUWFTL3Za6lapg5/w==", + "version": "2.8.8", + "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.8.8.tgz", + "integrity": "sha512-f/wzC2QaWBs7t9IYqB4T3sR1xviIViXJRJTWBlx2Gf3g0Xi5vI7Yy4koXQ1c9OYDGHN9sBy1DQ2AB8fqZBWhUg==", "dev": true }, "html-encoding-sniffer": { @@ -2406,6 +2673,12 @@ "whatwg-encoding": "^1.0.1" } }, + "html-escaper": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/html-escaper/-/html-escaper-2.0.2.tgz", + "integrity": "sha512-H2iMtd0I4Mt5eYiapRdIDjp+XzelXQ0tFE4JS7YFwFevXXMmOp9myNrUvCg0D6ws8iqkRPBfKHgbwig1SmlLfg==", + "dev": true + }, "http-signature": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/http-signature/-/http-signature-1.2.0.tgz", @@ -2478,12 +2751,6 @@ "loose-envify": "^1.0.0" } }, - "invert-kv": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/invert-kv/-/invert-kv-2.0.0.tgz", - "integrity": "sha512-wPVv/y/QQ/Uiirj/vh3oP+1Ww+AWehmi1g5fFWGPF6IpCBCDVrhgHRMvrLfdYcwDh3QJbGXDW4JAuzxElLSqKA==", - "dev": true - }, "is-accessor-descriptor": { "version": "0.1.6", "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz", @@ -2693,6 +2960,14 @@ "@babel/types": "^7.4.0", "istanbul-lib-coverage": "^2.0.5", "semver": "^6.0.0" + }, + "dependencies": { + "semver": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", + "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", + "dev": true + } } }, "istanbul-lib-report": { @@ -2712,94 +2987,473 @@ "integrity": "sha512-qe1jfm1Mg7Nq/NSh6XE24gPXROEVsWHxC1LIx//XNlD9iw7YZQGjZNjYN7xGaEG6iKdA8EtNFW6R0gjnVXp+wQ==", "dev": true, "requires": { - "has-flag": "^3.0.0" + "has-flag": "^3.0.0" + } + } + } + }, + "istanbul-lib-source-maps": { + "version": "3.0.6", + "resolved": "https://registry.npmjs.org/istanbul-lib-source-maps/-/istanbul-lib-source-maps-3.0.6.tgz", + "integrity": "sha512-R47KzMtDJH6X4/YW9XTx+jrLnZnscW4VpNN+1PViSYTejLVPWv7oov+Duf8YQSPyVRUvueQqz1TcsC6mooZTXw==", + "dev": true, + "requires": { + "debug": "^4.1.1", + "istanbul-lib-coverage": "^2.0.5", + "make-dir": "^2.1.0", + "rimraf": "^2.6.3", + "source-map": "^0.6.1" + }, + "dependencies": { + "debug": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.2.0.tgz", + "integrity": "sha512-IX2ncY78vDTjZMFUdmsvIRFY2Cf4FnD0wRs+nQwJU8Lu99/tPFdb0VybiiMTPe3I6rQmwsqQqRBvxU+bZ/I8sg==", + "dev": true, + "requires": { + "ms": "2.1.2" + } + }, + "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 + } + } + }, + "istanbul-reports": { + "version": "2.2.7", + "resolved": "https://registry.npmjs.org/istanbul-reports/-/istanbul-reports-2.2.7.tgz", + "integrity": "sha512-uu1F/L1o5Y6LzPVSVZXNOoD/KXpJue9aeLRd0sM9uMXfZvzomB0WxVamWb5ue8kA2vVWEmW7EG+A5n3f1kqHKg==", + "dev": true, + "requires": { + "html-escaper": "^2.0.0" + } + }, + "jest": { + "version": "24.8.0", + "resolved": "https://registry.npmjs.org/jest/-/jest-24.8.0.tgz", + "integrity": "sha512-o0HM90RKFRNWmAWvlyV8i5jGZ97pFwkeVoGvPW1EtLTgJc2+jcuqcbbqcSZLE/3f2S5pt0y2ZBETuhpWNl1Reg==", + "dev": true, + "requires": { + "import-local": "^2.0.0", + "jest-cli": "^24.8.0" + }, + "dependencies": { + "@jest/source-map": { + "version": "24.9.0", + "resolved": "https://registry.npmjs.org/@jest/source-map/-/source-map-24.9.0.tgz", + "integrity": "sha512-/Xw7xGlsZb4MJzNDgB7PW5crou5JqWiBQaz6xyPd3ArOg2nfn/PunV8+olXbbEZzNl591o5rWKE9BRDaFAuIBg==", + "dev": true, + "requires": { + "callsites": "^3.0.0", + "graceful-fs": "^4.1.15", + "source-map": "^0.6.0" + } + }, + "@jest/transform": { + "version": "24.9.0", + "resolved": "https://registry.npmjs.org/@jest/transform/-/transform-24.9.0.tgz", + "integrity": "sha512-TcQUmyNRxV94S0QpMOnZl0++6RMiqpbH/ZMccFB/amku6Uwvyb1cjYX7xkp5nGNkbX4QPH/FcB6q1HBTHynLmQ==", + "dev": true, + "requires": { + "@babel/core": "^7.1.0", + "@jest/types": "^24.9.0", + "babel-plugin-istanbul": "^5.1.0", + "chalk": "^2.0.1", + "convert-source-map": "^1.4.0", + "fast-json-stable-stringify": "^2.0.0", + "graceful-fs": "^4.1.15", + "jest-haste-map": "^24.9.0", + "jest-regex-util": "^24.9.0", + "jest-util": "^24.9.0", + "micromatch": "^3.1.10", + "pirates": "^4.0.1", + "realpath-native": "^1.1.0", + "slash": "^2.0.0", + "source-map": "^0.6.1", + "write-file-atomic": "2.4.1" + }, + "dependencies": { + "@jest/types": { + "version": "24.9.0", + "resolved": "https://registry.npmjs.org/@jest/types/-/types-24.9.0.tgz", + "integrity": "sha512-XKK7ze1apu5JWQ5eZjHITP66AX+QsLlbaJRBGYr8pNzwcAE2JVkwnf0yqjHTsDRcjR0mujy/NmZMXw5kl+kGBw==", + "dev": true, + "requires": { + "@types/istanbul-lib-coverage": "^2.0.0", + "@types/istanbul-reports": "^1.1.1", + "@types/yargs": "^13.0.0" + } + }, + "jest-regex-util": { + "version": "24.9.0", + "resolved": "https://registry.npmjs.org/jest-regex-util/-/jest-regex-util-24.9.0.tgz", + "integrity": "sha512-05Cmb6CuxaA+Ys6fjr3PhvV3bGQmO+2p2La4hFbU+W5uOc479f7FdLXUWXw4pYMAhhSZIuKHwSXSu6CsSBAXQA==", + "dev": true + } + } + }, + "@types/yargs": { + "version": "13.0.11", + "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-13.0.11.tgz", + "integrity": "sha512-NRqD6T4gktUrDi1o1wLH3EKC1o2caCr7/wR87ODcbVITQF106OM3sFN92ysZ++wqelOd1CTzatnOBRDYYG6wGQ==", + "dev": true, + "requires": { + "@types/yargs-parser": "*" + } + }, + "jest-cli": { + "version": "24.9.0", + "resolved": "https://registry.npmjs.org/jest-cli/-/jest-cli-24.9.0.tgz", + "integrity": "sha512-+VLRKyitT3BWoMeSUIHRxV/2g8y9gw91Jh5z2UmXZzkZKpbC08CSehVxgHUwTpy+HwGcns/tqafQDJW7imYvGg==", + "dev": true, + "requires": { + "@jest/core": "^24.9.0", + "@jest/test-result": "^24.9.0", + "@jest/types": "^24.9.0", + "chalk": "^2.0.1", + "exit": "^0.1.2", + "import-local": "^2.0.0", + "is-ci": "^2.0.0", + "jest-config": "^24.9.0", + "jest-util": "^24.9.0", + "jest-validate": "^24.9.0", + "prompts": "^2.0.1", + "realpath-native": "^1.1.0", + "yargs": "^13.3.0" + }, + "dependencies": { + "@jest/core": { + "version": "24.9.0", + "resolved": "https://registry.npmjs.org/@jest/core/-/core-24.9.0.tgz", + "integrity": "sha512-Fogg3s4wlAr1VX7q+rhV9RVnUv5tD7VuWfYy1+whMiWUrvl7U3QJSJyWcDio9Lq2prqYsZaeTv2Rz24pWGkJ2A==", + "dev": true, + "requires": { + "@jest/console": "^24.7.1", + "@jest/reporters": "^24.9.0", + "@jest/test-result": "^24.9.0", + "@jest/transform": "^24.9.0", + "@jest/types": "^24.9.0", + "ansi-escapes": "^3.0.0", + "chalk": "^2.0.1", + "exit": "^0.1.2", + "graceful-fs": "^4.1.15", + "jest-changed-files": "^24.9.0", + "jest-config": "^24.9.0", + "jest-haste-map": "^24.9.0", + "jest-message-util": "^24.9.0", + "jest-regex-util": "^24.3.0", + "jest-resolve": "^24.9.0", + "jest-resolve-dependencies": "^24.9.0", + "jest-runner": "^24.9.0", + "jest-runtime": "^24.9.0", + "jest-snapshot": "^24.9.0", + "jest-util": "^24.9.0", + "jest-validate": "^24.9.0", + "jest-watcher": "^24.9.0", + "micromatch": "^3.1.10", + "p-each-series": "^1.0.0", + "realpath-native": "^1.1.0", + "rimraf": "^2.5.4", + "slash": "^2.0.0", + "strip-ansi": "^5.0.0" + } + }, + "@jest/test-result": { + "version": "24.9.0", + "resolved": "https://registry.npmjs.org/@jest/test-result/-/test-result-24.9.0.tgz", + "integrity": "sha512-XEFrHbBonBJ8dGp2JmF8kP/nQI/ImPpygKHwQ/SY+es59Z3L5PI4Qb9TQQMAEeYsThG1xF0k6tmG0tIKATNiiA==", + "dev": true, + "requires": { + "@jest/console": "^24.9.0", + "@jest/types": "^24.9.0", + "@types/istanbul-lib-coverage": "^2.0.0" + }, + "dependencies": { + "@jest/console": { + "version": "24.9.0", + "resolved": "https://registry.npmjs.org/@jest/console/-/console-24.9.0.tgz", + "integrity": "sha512-Zuj6b8TnKXi3q4ymac8EQfc3ea/uhLeCGThFqXeC8H9/raaH8ARPUTdId+XyGd03Z4In0/VjD2OYFcBF09fNLQ==", + "dev": true, + "requires": { + "@jest/source-map": "^24.9.0", + "chalk": "^2.0.1", + "slash": "^2.0.0" + } + } + } + }, + "@jest/types": { + "version": "24.9.0", + "resolved": "https://registry.npmjs.org/@jest/types/-/types-24.9.0.tgz", + "integrity": "sha512-XKK7ze1apu5JWQ5eZjHITP66AX+QsLlbaJRBGYr8pNzwcAE2JVkwnf0yqjHTsDRcjR0mujy/NmZMXw5kl+kGBw==", + "dev": true, + "requires": { + "@types/istanbul-lib-coverage": "^2.0.0", + "@types/istanbul-reports": "^1.1.1", + "@types/yargs": "^13.0.0" + } + }, + "exit": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/exit/-/exit-0.1.2.tgz", + "integrity": "sha1-BjJjj42HfMghB9MKD/8aF8uhzQw=", + "dev": true + }, + "jest-config": { + "version": "24.9.0", + "resolved": "https://registry.npmjs.org/jest-config/-/jest-config-24.9.0.tgz", + "integrity": "sha512-RATtQJtVYQrp7fvWg6f5y3pEFj9I+H8sWw4aKxnDZ96mob5i5SD6ZEGWgMLXQ4LE8UurrjbdlLWdUeo+28QpfQ==", + "dev": true, + "requires": { + "@babel/core": "^7.1.0", + "@jest/test-sequencer": "^24.9.0", + "@jest/types": "^24.9.0", + "babel-jest": "^24.9.0", + "chalk": "^2.0.1", + "glob": "^7.1.1", + "jest-environment-jsdom": "^24.9.0", + "jest-environment-node": "^24.9.0", + "jest-get-type": "^24.9.0", + "jest-jasmine2": "^24.9.0", + "jest-regex-util": "^24.3.0", + "jest-resolve": "^24.9.0", + "jest-util": "^24.9.0", + "jest-validate": "^24.9.0", + "micromatch": "^3.1.10", + "pretty-format": "^24.9.0", + "realpath-native": "^1.1.0" + } + }, + "jest-util": { + "version": "24.9.0", + "resolved": "https://registry.npmjs.org/jest-util/-/jest-util-24.9.0.tgz", + "integrity": "sha512-x+cZU8VRmOJxbA1K5oDBdxQmdq0OIdADarLxk0Mq+3XS4jgvhG/oKGWcIDCtPG0HgjxOYvF+ilPJQsAyXfbNOg==", + "dev": true, + "requires": { + "@jest/console": "^24.9.0", + "@jest/fake-timers": "^24.9.0", + "@jest/source-map": "^24.9.0", + "@jest/test-result": "^24.9.0", + "@jest/types": "^24.9.0", + "callsites": "^3.0.0", + "chalk": "^2.0.1", + "graceful-fs": "^4.1.15", + "is-ci": "^2.0.0", + "mkdirp": "^0.5.1", + "slash": "^2.0.0", + "source-map": "^0.6.0" + }, + "dependencies": { + "@jest/console": { + "version": "24.9.0", + "resolved": "https://registry.npmjs.org/@jest/console/-/console-24.9.0.tgz", + "integrity": "sha512-Zuj6b8TnKXi3q4ymac8EQfc3ea/uhLeCGThFqXeC8H9/raaH8ARPUTdId+XyGd03Z4In0/VjD2OYFcBF09fNLQ==", + "dev": true, + "requires": { + "@jest/source-map": "^24.9.0", + "chalk": "^2.0.1", + "slash": "^2.0.0" + } + } + } + }, + "jest-validate": { + "version": "24.9.0", + "resolved": "https://registry.npmjs.org/jest-validate/-/jest-validate-24.9.0.tgz", + "integrity": "sha512-HPIt6C5ACwiqSiwi+OfSSHbK8sG7akG8eATl+IPKaeIjtPOeBUd/g3J7DghugzxrGjI93qS/+RPKe1H6PqvhRQ==", + "dev": true, + "requires": { + "@jest/types": "^24.9.0", + "camelcase": "^5.3.1", + "chalk": "^2.0.1", + "jest-get-type": "^24.9.0", + "leven": "^3.1.0", + "pretty-format": "^24.9.0" + } + }, + "prompts": { + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/prompts/-/prompts-2.4.0.tgz", + "integrity": "sha512-awZAKrk3vN6CroQukBL+R9051a4R3zCZBlJm/HBfrSZ8iTpYix3VX1vU4mveiLpiwmOJT4wokTF9m6HUk4KqWQ==", + "dev": true, + "requires": { + "kleur": "^3.0.3", + "sisteransi": "^1.0.5" + } + }, + "yargs": { + "version": "13.3.2", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-13.3.2.tgz", + "integrity": "sha512-AX3Zw5iPruN5ie6xGRIDgqkT+ZhnRlZMLMHAs8tg7nRruy2Nb+i5o9bwghAogtM08q1dpr2LVoS8KSTMYpWXUw==", + "dev": true, + "requires": { + "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" + } + } + } + }, + "jest-get-type": { + "version": "24.9.0", + "resolved": "https://registry.npmjs.org/jest-get-type/-/jest-get-type-24.9.0.tgz", + "integrity": "sha512-lUseMzAley4LhIcpSP9Jf+fTrQ4a1yHQwLNeeVa2cEmbCGeoZAtYPOIv8JaxLD/sUpKxetKGP+gsHl8f8TSj8Q==", + "dev": true + }, + "jest-haste-map": { + "version": "24.9.0", + "resolved": "https://registry.npmjs.org/jest-haste-map/-/jest-haste-map-24.9.0.tgz", + "integrity": "sha512-kfVFmsuWui2Sj1Rp1AJ4D9HqJwE4uwTlS/vO+eRUaMmd54BFpli2XhMQnPC2k4cHFVbB2Q2C+jtI1AGLgEnCjQ==", + "dev": true, + "requires": { + "@jest/types": "^24.9.0", + "anymatch": "^2.0.0", + "fb-watchman": "^2.0.0", + "fsevents": "^1.2.7", + "graceful-fs": "^4.1.15", + "invariant": "^2.2.4", + "jest-serializer": "^24.9.0", + "jest-util": "^24.9.0", + "jest-worker": "^24.9.0", + "micromatch": "^3.1.10", + "sane": "^4.0.3", + "walker": "^1.0.7" + }, + "dependencies": { + "@jest/types": { + "version": "24.9.0", + "resolved": "https://registry.npmjs.org/@jest/types/-/types-24.9.0.tgz", + "integrity": "sha512-XKK7ze1apu5JWQ5eZjHITP66AX+QsLlbaJRBGYr8pNzwcAE2JVkwnf0yqjHTsDRcjR0mujy/NmZMXw5kl+kGBw==", + "dev": true, + "requires": { + "@types/istanbul-lib-coverage": "^2.0.0", + "@types/istanbul-reports": "^1.1.1", + "@types/yargs": "^13.0.0" + } + } + } + }, + "jest-message-util": { + "version": "24.9.0", + "resolved": "https://registry.npmjs.org/jest-message-util/-/jest-message-util-24.9.0.tgz", + "integrity": "sha512-oCj8FiZ3U0hTP4aSui87P4L4jC37BtQwUMqk+zk/b11FR19BJDeZsZAvIHutWnmtw7r85UmR3CEWZ0HWU2mAlw==", + "dev": true, + "requires": { + "@babel/code-frame": "^7.0.0", + "@jest/test-result": "^24.9.0", + "@jest/types": "^24.9.0", + "@types/stack-utils": "^1.0.1", + "chalk": "^2.0.1", + "micromatch": "^3.1.10", + "slash": "^2.0.0", + "stack-utils": "^1.0.1" + }, + "dependencies": { + "@jest/console": { + "version": "24.9.0", + "resolved": "https://registry.npmjs.org/@jest/console/-/console-24.9.0.tgz", + "integrity": "sha512-Zuj6b8TnKXi3q4ymac8EQfc3ea/uhLeCGThFqXeC8H9/raaH8ARPUTdId+XyGd03Z4In0/VjD2OYFcBF09fNLQ==", + "dev": true, + "requires": { + "@jest/source-map": "^24.9.0", + "chalk": "^2.0.1", + "slash": "^2.0.0" + } + }, + "@jest/test-result": { + "version": "24.9.0", + "resolved": "https://registry.npmjs.org/@jest/test-result/-/test-result-24.9.0.tgz", + "integrity": "sha512-XEFrHbBonBJ8dGp2JmF8kP/nQI/ImPpygKHwQ/SY+es59Z3L5PI4Qb9TQQMAEeYsThG1xF0k6tmG0tIKATNiiA==", + "dev": true, + "requires": { + "@jest/console": "^24.9.0", + "@jest/types": "^24.9.0", + "@types/istanbul-lib-coverage": "^2.0.0" + } + }, + "@jest/types": { + "version": "24.9.0", + "resolved": "https://registry.npmjs.org/@jest/types/-/types-24.9.0.tgz", + "integrity": "sha512-XKK7ze1apu5JWQ5eZjHITP66AX+QsLlbaJRBGYr8pNzwcAE2JVkwnf0yqjHTsDRcjR0mujy/NmZMXw5kl+kGBw==", + "dev": true, + "requires": { + "@types/istanbul-lib-coverage": "^2.0.0", + "@types/istanbul-reports": "^1.1.1", + "@types/yargs": "^13.0.0" + } + } + } + }, + "pretty-format": { + "version": "24.9.0", + "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-24.9.0.tgz", + "integrity": "sha512-00ZMZUiHaJrNfk33guavqgvfJS30sLYf0f8+Srklv0AMPodGGHcoHgksZ3OThYnIvOd+8yMCn0YiEOogjlgsnA==", + "dev": true, + "requires": { + "@jest/types": "^24.9.0", + "ansi-regex": "^4.0.0", + "ansi-styles": "^3.2.0", + "react-is": "^16.8.4" + }, + "dependencies": { + "@jest/types": { + "version": "24.9.0", + "resolved": "https://registry.npmjs.org/@jest/types/-/types-24.9.0.tgz", + "integrity": "sha512-XKK7ze1apu5JWQ5eZjHITP66AX+QsLlbaJRBGYr8pNzwcAE2JVkwnf0yqjHTsDRcjR0mujy/NmZMXw5kl+kGBw==", + "dev": true, + "requires": { + "@types/istanbul-lib-coverage": "^2.0.0", + "@types/istanbul-reports": "^1.1.1", + "@types/yargs": "^13.0.0" + } + } } } } }, - "istanbul-lib-source-maps": { - "version": "3.0.6", - "resolved": "https://registry.npmjs.org/istanbul-lib-source-maps/-/istanbul-lib-source-maps-3.0.6.tgz", - "integrity": "sha512-R47KzMtDJH6X4/YW9XTx+jrLnZnscW4VpNN+1PViSYTejLVPWv7oov+Duf8YQSPyVRUvueQqz1TcsC6mooZTXw==", + "jest-changed-files": { + "version": "24.9.0", + "resolved": "https://registry.npmjs.org/jest-changed-files/-/jest-changed-files-24.9.0.tgz", + "integrity": "sha512-6aTWpe2mHF0DhL28WjdkO8LyGjs3zItPET4bMSeXU6T3ub4FPMw+mcOcbdGXQOAfmLcxofD23/5Bl9Z4AkFwqg==", "dev": true, "requires": { - "debug": "^4.1.1", - "istanbul-lib-coverage": "^2.0.5", - "make-dir": "^2.1.0", - "rimraf": "^2.6.3", - "source-map": "^0.6.1" + "@jest/types": "^24.9.0", + "execa": "^1.0.0", + "throat": "^4.0.0" }, "dependencies": { - "debug": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz", - "integrity": "sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==", + "@jest/types": { + "version": "24.9.0", + "resolved": "https://registry.npmjs.org/@jest/types/-/types-24.9.0.tgz", + "integrity": "sha512-XKK7ze1apu5JWQ5eZjHITP66AX+QsLlbaJRBGYr8pNzwcAE2JVkwnf0yqjHTsDRcjR0mujy/NmZMXw5kl+kGBw==", "dev": true, "requires": { - "ms": "^2.1.1" + "@types/istanbul-lib-coverage": "^2.0.0", + "@types/istanbul-reports": "^1.1.1", + "@types/yargs": "^13.0.0" } }, - "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 - } - } - }, - "istanbul-reports": { - "version": "2.2.6", - "resolved": "https://registry.npmjs.org/istanbul-reports/-/istanbul-reports-2.2.6.tgz", - "integrity": "sha512-SKi4rnMyLBKe0Jy2uUdx28h8oG7ph2PPuQPvIAh31d+Ci+lSiEu4C+h3oBPuJ9+mPKhOyW0M8gY4U5NM1WLeXA==", - "dev": true, - "requires": { - "handlebars": "^4.1.2" - } - }, - "jest": { - "version": "24.8.0", - "resolved": "https://registry.npmjs.org/jest/-/jest-24.8.0.tgz", - "integrity": "sha512-o0HM90RKFRNWmAWvlyV8i5jGZ97pFwkeVoGvPW1EtLTgJc2+jcuqcbbqcSZLE/3f2S5pt0y2ZBETuhpWNl1Reg==", - "dev": true, - "requires": { - "import-local": "^2.0.0", - "jest-cli": "^24.8.0" - }, - "dependencies": { - "jest-cli": { - "version": "24.8.0", - "resolved": "https://registry.npmjs.org/jest-cli/-/jest-cli-24.8.0.tgz", - "integrity": "sha512-+p6J00jSMPQ116ZLlHJJvdf8wbjNbZdeSX9ptfHX06/MSNaXmKihQzx5vQcw0q2G6JsdVkUIdWbOWtSnaYs3yA==", + "@types/yargs": { + "version": "13.0.11", + "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-13.0.11.tgz", + "integrity": "sha512-NRqD6T4gktUrDi1o1wLH3EKC1o2caCr7/wR87ODcbVITQF106OM3sFN92ysZ++wqelOd1CTzatnOBRDYYG6wGQ==", "dev": true, "requires": { - "@jest/core": "^24.8.0", - "@jest/test-result": "^24.8.0", - "@jest/types": "^24.8.0", - "chalk": "^2.0.1", - "exit": "^0.1.2", - "import-local": "^2.0.0", - "is-ci": "^2.0.0", - "jest-config": "^24.8.0", - "jest-util": "^24.8.0", - "jest-validate": "^24.8.0", - "prompts": "^2.0.1", - "realpath-native": "^1.1.0", - "yargs": "^12.0.2" + "@types/yargs-parser": "*" } } } }, - "jest-changed-files": { - "version": "24.8.0", - "resolved": "https://registry.npmjs.org/jest-changed-files/-/jest-changed-files-24.8.0.tgz", - "integrity": "sha512-qgANC1Yrivsq+UrLXsvJefBKVoCsKB0Hv+mBb6NMjjZ90wwxCDmU3hsCXBya30cH+LnPYjwgcU65i6yJ5Nfuug==", - "dev": true, - "requires": { - "@jest/types": "^24.8.0", - "execa": "^1.0.0", - "throat": "^4.0.0" - } - }, "jest-circus": { "version": "24.8.0", "resolved": "https://registry.npmjs.org/jest-circus/-/jest-circus-24.8.0.tgz", @@ -2825,28 +3479,68 @@ } }, "jest-config": { - "version": "24.8.0", - "resolved": "https://registry.npmjs.org/jest-config/-/jest-config-24.8.0.tgz", - "integrity": "sha512-Czl3Nn2uEzVGsOeaewGWoDPD8GStxCpAe0zOYs2x2l0fZAgPbCr3uwUkgNKV3LwE13VXythM946cd5rdGkkBZw==", + "version": "24.9.0", + "resolved": "https://registry.npmjs.org/jest-config/-/jest-config-24.9.0.tgz", + "integrity": "sha512-RATtQJtVYQrp7fvWg6f5y3pEFj9I+H8sWw4aKxnDZ96mob5i5SD6ZEGWgMLXQ4LE8UurrjbdlLWdUeo+28QpfQ==", "dev": true, "requires": { "@babel/core": "^7.1.0", - "@jest/test-sequencer": "^24.8.0", - "@jest/types": "^24.8.0", - "babel-jest": "^24.8.0", + "@jest/test-sequencer": "^24.9.0", + "@jest/types": "^24.9.0", + "babel-jest": "^24.9.0", "chalk": "^2.0.1", "glob": "^7.1.1", - "jest-environment-jsdom": "^24.8.0", - "jest-environment-node": "^24.8.0", - "jest-get-type": "^24.8.0", - "jest-jasmine2": "^24.8.0", + "jest-environment-jsdom": "^24.9.0", + "jest-environment-node": "^24.9.0", + "jest-get-type": "^24.9.0", + "jest-jasmine2": "^24.9.0", "jest-regex-util": "^24.3.0", - "jest-resolve": "^24.8.0", - "jest-util": "^24.8.0", - "jest-validate": "^24.8.0", + "jest-resolve": "^24.9.0", + "jest-util": "^24.9.0", + "jest-validate": "^24.9.0", "micromatch": "^3.1.10", - "pretty-format": "^24.8.0", + "pretty-format": "^24.9.0", "realpath-native": "^1.1.0" + }, + "dependencies": { + "@jest/types": { + "version": "24.9.0", + "resolved": "https://registry.npmjs.org/@jest/types/-/types-24.9.0.tgz", + "integrity": "sha512-XKK7ze1apu5JWQ5eZjHITP66AX+QsLlbaJRBGYr8pNzwcAE2JVkwnf0yqjHTsDRcjR0mujy/NmZMXw5kl+kGBw==", + "dev": true, + "requires": { + "@types/istanbul-lib-coverage": "^2.0.0", + "@types/istanbul-reports": "^1.1.1", + "@types/yargs": "^13.0.0" + } + }, + "@types/yargs": { + "version": "13.0.11", + "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-13.0.11.tgz", + "integrity": "sha512-NRqD6T4gktUrDi1o1wLH3EKC1o2caCr7/wR87ODcbVITQF106OM3sFN92ysZ++wqelOd1CTzatnOBRDYYG6wGQ==", + "dev": true, + "requires": { + "@types/yargs-parser": "*" + } + }, + "jest-get-type": { + "version": "24.9.0", + "resolved": "https://registry.npmjs.org/jest-get-type/-/jest-get-type-24.9.0.tgz", + "integrity": "sha512-lUseMzAley4LhIcpSP9Jf+fTrQ4a1yHQwLNeeVa2cEmbCGeoZAtYPOIv8JaxLD/sUpKxetKGP+gsHl8f8TSj8Q==", + "dev": true + }, + "pretty-format": { + "version": "24.9.0", + "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-24.9.0.tgz", + "integrity": "sha512-00ZMZUiHaJrNfk33guavqgvfJS30sLYf0f8+Srklv0AMPodGGHcoHgksZ3OThYnIvOd+8yMCn0YiEOogjlgsnA==", + "dev": true, + "requires": { + "@jest/types": "^24.9.0", + "ansi-regex": "^4.0.0", + "ansi-styles": "^3.2.0", + "react-is": "^16.8.4" + } + } } }, "jest-diff": { @@ -2862,52 +3556,136 @@ } }, "jest-docblock": { - "version": "24.3.0", - "resolved": "https://registry.npmjs.org/jest-docblock/-/jest-docblock-24.3.0.tgz", - "integrity": "sha512-nlANmF9Yq1dufhFlKG9rasfQlrY7wINJbo3q01tu56Jv5eBU5jirylhF2O5ZBnLxzOVBGRDz/9NAwNyBtG4Nyg==", + "version": "24.9.0", + "resolved": "https://registry.npmjs.org/jest-docblock/-/jest-docblock-24.9.0.tgz", + "integrity": "sha512-F1DjdpDMJMA1cN6He0FNYNZlo3yYmOtRUnktrT9Q37njYzC5WEaDdmbynIgy0L/IvXvvgsG8OsqhLPXTpfmZAA==", "dev": true, "requires": { "detect-newline": "^2.1.0" } }, "jest-each": { - "version": "24.8.0", - "resolved": "https://registry.npmjs.org/jest-each/-/jest-each-24.8.0.tgz", - "integrity": "sha512-NrwK9gaL5+XgrgoCsd9svsoWdVkK4gnvyhcpzd6m487tXHqIdYeykgq3MKI1u4I+5Zf0tofr70at9dWJDeb+BA==", + "version": "24.9.0", + "resolved": "https://registry.npmjs.org/jest-each/-/jest-each-24.9.0.tgz", + "integrity": "sha512-ONi0R4BvW45cw8s2Lrx8YgbeXL1oCQ/wIDwmsM3CqM/nlblNCPmnC3IPQlMbRFZu3wKdQ2U8BqM6lh3LJ5Bsog==", "dev": true, "requires": { - "@jest/types": "^24.8.0", + "@jest/types": "^24.9.0", "chalk": "^2.0.1", - "jest-get-type": "^24.8.0", - "jest-util": "^24.8.0", - "pretty-format": "^24.8.0" + "jest-get-type": "^24.9.0", + "jest-util": "^24.9.0", + "pretty-format": "^24.9.0" + }, + "dependencies": { + "@jest/types": { + "version": "24.9.0", + "resolved": "https://registry.npmjs.org/@jest/types/-/types-24.9.0.tgz", + "integrity": "sha512-XKK7ze1apu5JWQ5eZjHITP66AX+QsLlbaJRBGYr8pNzwcAE2JVkwnf0yqjHTsDRcjR0mujy/NmZMXw5kl+kGBw==", + "dev": true, + "requires": { + "@types/istanbul-lib-coverage": "^2.0.0", + "@types/istanbul-reports": "^1.1.1", + "@types/yargs": "^13.0.0" + } + }, + "@types/yargs": { + "version": "13.0.11", + "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-13.0.11.tgz", + "integrity": "sha512-NRqD6T4gktUrDi1o1wLH3EKC1o2caCr7/wR87ODcbVITQF106OM3sFN92ysZ++wqelOd1CTzatnOBRDYYG6wGQ==", + "dev": true, + "requires": { + "@types/yargs-parser": "*" + } + }, + "jest-get-type": { + "version": "24.9.0", + "resolved": "https://registry.npmjs.org/jest-get-type/-/jest-get-type-24.9.0.tgz", + "integrity": "sha512-lUseMzAley4LhIcpSP9Jf+fTrQ4a1yHQwLNeeVa2cEmbCGeoZAtYPOIv8JaxLD/sUpKxetKGP+gsHl8f8TSj8Q==", + "dev": true + }, + "pretty-format": { + "version": "24.9.0", + "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-24.9.0.tgz", + "integrity": "sha512-00ZMZUiHaJrNfk33guavqgvfJS30sLYf0f8+Srklv0AMPodGGHcoHgksZ3OThYnIvOd+8yMCn0YiEOogjlgsnA==", + "dev": true, + "requires": { + "@jest/types": "^24.9.0", + "ansi-regex": "^4.0.0", + "ansi-styles": "^3.2.0", + "react-is": "^16.8.4" + } + } } }, "jest-environment-jsdom": { - "version": "24.8.0", - "resolved": "https://registry.npmjs.org/jest-environment-jsdom/-/jest-environment-jsdom-24.8.0.tgz", - "integrity": "sha512-qbvgLmR7PpwjoFjM/sbuqHJt/NCkviuq9vus9NBn/76hhSidO+Z6Bn9tU8friecegbJL8gzZQEMZBQlFWDCwAQ==", + "version": "24.9.0", + "resolved": "https://registry.npmjs.org/jest-environment-jsdom/-/jest-environment-jsdom-24.9.0.tgz", + "integrity": "sha512-Zv9FV9NBRzLuALXjvRijO2351DRQeLYXtpD4xNvfoVFw21IOKNhZAEUKcbiEtjTkm2GsJ3boMVgkaR7rN8qetA==", "dev": true, "requires": { - "@jest/environment": "^24.8.0", - "@jest/fake-timers": "^24.8.0", - "@jest/types": "^24.8.0", - "jest-mock": "^24.8.0", - "jest-util": "^24.8.0", + "@jest/environment": "^24.9.0", + "@jest/fake-timers": "^24.9.0", + "@jest/types": "^24.9.0", + "jest-mock": "^24.9.0", + "jest-util": "^24.9.0", "jsdom": "^11.5.1" + }, + "dependencies": { + "@jest/types": { + "version": "24.9.0", + "resolved": "https://registry.npmjs.org/@jest/types/-/types-24.9.0.tgz", + "integrity": "sha512-XKK7ze1apu5JWQ5eZjHITP66AX+QsLlbaJRBGYr8pNzwcAE2JVkwnf0yqjHTsDRcjR0mujy/NmZMXw5kl+kGBw==", + "dev": true, + "requires": { + "@types/istanbul-lib-coverage": "^2.0.0", + "@types/istanbul-reports": "^1.1.1", + "@types/yargs": "^13.0.0" + } + }, + "@types/yargs": { + "version": "13.0.11", + "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-13.0.11.tgz", + "integrity": "sha512-NRqD6T4gktUrDi1o1wLH3EKC1o2caCr7/wR87ODcbVITQF106OM3sFN92ysZ++wqelOd1CTzatnOBRDYYG6wGQ==", + "dev": true, + "requires": { + "@types/yargs-parser": "*" + } + } } }, "jest-environment-node": { - "version": "24.8.0", - "resolved": "https://registry.npmjs.org/jest-environment-node/-/jest-environment-node-24.8.0.tgz", - "integrity": "sha512-vIGUEScd1cdDgR6sqn2M08sJTRLQp6Dk/eIkCeO4PFHxZMOgy+uYLPMC4ix3PEfM5Au/x3uQ/5Tl0DpXXZsJ/Q==", + "version": "24.9.0", + "resolved": "https://registry.npmjs.org/jest-environment-node/-/jest-environment-node-24.9.0.tgz", + "integrity": "sha512-6d4V2f4nxzIzwendo27Tr0aFm+IXWa0XEUnaH6nU0FMaozxovt+sfRvh4J47wL1OvF83I3SSTu0XK+i4Bqe7uA==", "dev": true, "requires": { - "@jest/environment": "^24.8.0", - "@jest/fake-timers": "^24.8.0", - "@jest/types": "^24.8.0", - "jest-mock": "^24.8.0", - "jest-util": "^24.8.0" + "@jest/environment": "^24.9.0", + "@jest/fake-timers": "^24.9.0", + "@jest/types": "^24.9.0", + "jest-mock": "^24.9.0", + "jest-util": "^24.9.0" + }, + "dependencies": { + "@jest/types": { + "version": "24.9.0", + "resolved": "https://registry.npmjs.org/@jest/types/-/types-24.9.0.tgz", + "integrity": "sha512-XKK7ze1apu5JWQ5eZjHITP66AX+QsLlbaJRBGYr8pNzwcAE2JVkwnf0yqjHTsDRcjR0mujy/NmZMXw5kl+kGBw==", + "dev": true, + "requires": { + "@types/istanbul-lib-coverage": "^2.0.0", + "@types/istanbul-reports": "^1.1.1", + "@types/yargs": "^13.0.0" + } + }, + "@types/yargs": { + "version": "13.0.11", + "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-13.0.11.tgz", + "integrity": "sha512-NRqD6T4gktUrDi1o1wLH3EKC1o2caCr7/wR87ODcbVITQF106OM3sFN92ysZ++wqelOd1CTzatnOBRDYYG6wGQ==", + "dev": true, + "requires": { + "@types/yargs-parser": "*" + } + } } }, "jest-get-type": { @@ -2917,56 +3695,258 @@ "dev": true }, "jest-haste-map": { - "version": "24.8.1", - "resolved": "https://registry.npmjs.org/jest-haste-map/-/jest-haste-map-24.8.1.tgz", - "integrity": "sha512-SwaxMGVdAZk3ernAx2Uv2sorA7jm3Kx+lR0grp6rMmnY06Kn/urtKx1LPN2mGTea4fCT38impYT28FfcLUhX0g==", + "version": "24.9.0", + "resolved": "https://registry.npmjs.org/jest-haste-map/-/jest-haste-map-24.9.0.tgz", + "integrity": "sha512-kfVFmsuWui2Sj1Rp1AJ4D9HqJwE4uwTlS/vO+eRUaMmd54BFpli2XhMQnPC2k4cHFVbB2Q2C+jtI1AGLgEnCjQ==", "dev": true, "requires": { - "@jest/types": "^24.8.0", + "@jest/types": "^24.9.0", "anymatch": "^2.0.0", "fb-watchman": "^2.0.0", "fsevents": "^1.2.7", "graceful-fs": "^4.1.15", "invariant": "^2.2.4", - "jest-serializer": "^24.4.0", - "jest-util": "^24.8.0", - "jest-worker": "^24.6.0", + "jest-serializer": "^24.9.0", + "jest-util": "^24.9.0", + "jest-worker": "^24.9.0", "micromatch": "^3.1.10", "sane": "^4.0.3", "walker": "^1.0.7" + }, + "dependencies": { + "@jest/types": { + "version": "24.9.0", + "resolved": "https://registry.npmjs.org/@jest/types/-/types-24.9.0.tgz", + "integrity": "sha512-XKK7ze1apu5JWQ5eZjHITP66AX+QsLlbaJRBGYr8pNzwcAE2JVkwnf0yqjHTsDRcjR0mujy/NmZMXw5kl+kGBw==", + "dev": true, + "requires": { + "@types/istanbul-lib-coverage": "^2.0.0", + "@types/istanbul-reports": "^1.1.1", + "@types/yargs": "^13.0.0" + } + }, + "@types/yargs": { + "version": "13.0.11", + "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-13.0.11.tgz", + "integrity": "sha512-NRqD6T4gktUrDi1o1wLH3EKC1o2caCr7/wR87ODcbVITQF106OM3sFN92ysZ++wqelOd1CTzatnOBRDYYG6wGQ==", + "dev": true, + "requires": { + "@types/yargs-parser": "*" + } + } } }, "jest-jasmine2": { - "version": "24.8.0", - "resolved": "https://registry.npmjs.org/jest-jasmine2/-/jest-jasmine2-24.8.0.tgz", - "integrity": "sha512-cEky88npEE5LKd5jPpTdDCLvKkdyklnaRycBXL6GNmpxe41F0WN44+i7lpQKa/hcbXaQ+rc9RMaM4dsebrYong==", + "version": "24.9.0", + "resolved": "https://registry.npmjs.org/jest-jasmine2/-/jest-jasmine2-24.9.0.tgz", + "integrity": "sha512-Cq7vkAgaYKp+PsX+2/JbTarrk0DmNhsEtqBXNwUHkdlbrTBLtMJINADf2mf5FkowNsq8evbPc07/qFO0AdKTzw==", "dev": true, "requires": { "@babel/traverse": "^7.1.0", - "@jest/environment": "^24.8.0", - "@jest/test-result": "^24.8.0", - "@jest/types": "^24.8.0", + "@jest/environment": "^24.9.0", + "@jest/test-result": "^24.9.0", + "@jest/types": "^24.9.0", "chalk": "^2.0.1", "co": "^4.6.0", - "expect": "^24.8.0", + "expect": "^24.9.0", "is-generator-fn": "^2.0.0", - "jest-each": "^24.8.0", - "jest-matcher-utils": "^24.8.0", - "jest-message-util": "^24.8.0", - "jest-runtime": "^24.8.0", - "jest-snapshot": "^24.8.0", - "jest-util": "^24.8.0", - "pretty-format": "^24.8.0", + "jest-each": "^24.9.0", + "jest-matcher-utils": "^24.9.0", + "jest-message-util": "^24.9.0", + "jest-runtime": "^24.9.0", + "jest-snapshot": "^24.9.0", + "jest-util": "^24.9.0", + "pretty-format": "^24.9.0", "throat": "^4.0.0" + }, + "dependencies": { + "@jest/console": { + "version": "24.9.0", + "resolved": "https://registry.npmjs.org/@jest/console/-/console-24.9.0.tgz", + "integrity": "sha512-Zuj6b8TnKXi3q4ymac8EQfc3ea/uhLeCGThFqXeC8H9/raaH8ARPUTdId+XyGd03Z4In0/VjD2OYFcBF09fNLQ==", + "dev": true, + "requires": { + "@jest/source-map": "^24.9.0", + "chalk": "^2.0.1", + "slash": "^2.0.0" + } + }, + "@jest/source-map": { + "version": "24.9.0", + "resolved": "https://registry.npmjs.org/@jest/source-map/-/source-map-24.9.0.tgz", + "integrity": "sha512-/Xw7xGlsZb4MJzNDgB7PW5crou5JqWiBQaz6xyPd3ArOg2nfn/PunV8+olXbbEZzNl591o5rWKE9BRDaFAuIBg==", + "dev": true, + "requires": { + "callsites": "^3.0.0", + "graceful-fs": "^4.1.15", + "source-map": "^0.6.0" + } + }, + "@jest/test-result": { + "version": "24.9.0", + "resolved": "https://registry.npmjs.org/@jest/test-result/-/test-result-24.9.0.tgz", + "integrity": "sha512-XEFrHbBonBJ8dGp2JmF8kP/nQI/ImPpygKHwQ/SY+es59Z3L5PI4Qb9TQQMAEeYsThG1xF0k6tmG0tIKATNiiA==", + "dev": true, + "requires": { + "@jest/console": "^24.9.0", + "@jest/types": "^24.9.0", + "@types/istanbul-lib-coverage": "^2.0.0" + } + }, + "@jest/types": { + "version": "24.9.0", + "resolved": "https://registry.npmjs.org/@jest/types/-/types-24.9.0.tgz", + "integrity": "sha512-XKK7ze1apu5JWQ5eZjHITP66AX+QsLlbaJRBGYr8pNzwcAE2JVkwnf0yqjHTsDRcjR0mujy/NmZMXw5kl+kGBw==", + "dev": true, + "requires": { + "@types/istanbul-lib-coverage": "^2.0.0", + "@types/istanbul-reports": "^1.1.1", + "@types/yargs": "^13.0.0" + } + }, + "@types/yargs": { + "version": "13.0.11", + "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-13.0.11.tgz", + "integrity": "sha512-NRqD6T4gktUrDi1o1wLH3EKC1o2caCr7/wR87ODcbVITQF106OM3sFN92ysZ++wqelOd1CTzatnOBRDYYG6wGQ==", + "dev": true, + "requires": { + "@types/yargs-parser": "*" + } + }, + "diff-sequences": { + "version": "24.9.0", + "resolved": "https://registry.npmjs.org/diff-sequences/-/diff-sequences-24.9.0.tgz", + "integrity": "sha512-Dj6Wk3tWyTE+Fo1rW8v0Xhwk80um6yFYKbuAxc9c3EZxIHFDYwbi34Uk42u1CdnIiVorvt4RmlSDjIPyzGC2ew==", + "dev": true + }, + "expect": { + "version": "24.9.0", + "resolved": "https://registry.npmjs.org/expect/-/expect-24.9.0.tgz", + "integrity": "sha512-wvVAx8XIol3Z5m9zvZXiyZOQ+sRJqNTIm6sGjdWlaZIeupQGO3WbYI+15D/AmEwZywL6wtJkbAbJtzkOfBuR0Q==", + "dev": true, + "requires": { + "@jest/types": "^24.9.0", + "ansi-styles": "^3.2.0", + "jest-get-type": "^24.9.0", + "jest-matcher-utils": "^24.9.0", + "jest-message-util": "^24.9.0", + "jest-regex-util": "^24.9.0" + } + }, + "jest-diff": { + "version": "24.9.0", + "resolved": "https://registry.npmjs.org/jest-diff/-/jest-diff-24.9.0.tgz", + "integrity": "sha512-qMfrTs8AdJE2iqrTp0hzh7kTd2PQWrsFyj9tORoKmu32xjPjeE4NyjVRDz8ybYwqS2ik8N4hsIpiVTyFeo2lBQ==", + "dev": true, + "requires": { + "chalk": "^2.0.1", + "diff-sequences": "^24.9.0", + "jest-get-type": "^24.9.0", + "pretty-format": "^24.9.0" + } + }, + "jest-get-type": { + "version": "24.9.0", + "resolved": "https://registry.npmjs.org/jest-get-type/-/jest-get-type-24.9.0.tgz", + "integrity": "sha512-lUseMzAley4LhIcpSP9Jf+fTrQ4a1yHQwLNeeVa2cEmbCGeoZAtYPOIv8JaxLD/sUpKxetKGP+gsHl8f8TSj8Q==", + "dev": true + }, + "jest-matcher-utils": { + "version": "24.9.0", + "resolved": "https://registry.npmjs.org/jest-matcher-utils/-/jest-matcher-utils-24.9.0.tgz", + "integrity": "sha512-OZz2IXsu6eaiMAwe67c1T+5tUAtQyQx27/EMEkbFAGiw52tB9em+uGbzpcgYVpA8wl0hlxKPZxrly4CXU/GjHA==", + "dev": true, + "requires": { + "chalk": "^2.0.1", + "jest-diff": "^24.9.0", + "jest-get-type": "^24.9.0", + "pretty-format": "^24.9.0" + } + }, + "jest-message-util": { + "version": "24.9.0", + "resolved": "https://registry.npmjs.org/jest-message-util/-/jest-message-util-24.9.0.tgz", + "integrity": "sha512-oCj8FiZ3U0hTP4aSui87P4L4jC37BtQwUMqk+zk/b11FR19BJDeZsZAvIHutWnmtw7r85UmR3CEWZ0HWU2mAlw==", + "dev": true, + "requires": { + "@babel/code-frame": "^7.0.0", + "@jest/test-result": "^24.9.0", + "@jest/types": "^24.9.0", + "@types/stack-utils": "^1.0.1", + "chalk": "^2.0.1", + "micromatch": "^3.1.10", + "slash": "^2.0.0", + "stack-utils": "^1.0.1" + } + }, + "jest-regex-util": { + "version": "24.9.0", + "resolved": "https://registry.npmjs.org/jest-regex-util/-/jest-regex-util-24.9.0.tgz", + "integrity": "sha512-05Cmb6CuxaA+Ys6fjr3PhvV3bGQmO+2p2La4hFbU+W5uOc479f7FdLXUWXw4pYMAhhSZIuKHwSXSu6CsSBAXQA==", + "dev": true + }, + "pretty-format": { + "version": "24.9.0", + "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-24.9.0.tgz", + "integrity": "sha512-00ZMZUiHaJrNfk33guavqgvfJS30sLYf0f8+Srklv0AMPodGGHcoHgksZ3OThYnIvOd+8yMCn0YiEOogjlgsnA==", + "dev": true, + "requires": { + "@jest/types": "^24.9.0", + "ansi-regex": "^4.0.0", + "ansi-styles": "^3.2.0", + "react-is": "^16.8.4" + } + } } }, "jest-leak-detector": { - "version": "24.8.0", - "resolved": "https://registry.npmjs.org/jest-leak-detector/-/jest-leak-detector-24.8.0.tgz", - "integrity": "sha512-cG0yRSK8A831LN8lIHxI3AblB40uhv0z+SsQdW3GoMMVcK+sJwrIIyax5tu3eHHNJ8Fu6IMDpnLda2jhn2pD/g==", + "version": "24.9.0", + "resolved": "https://registry.npmjs.org/jest-leak-detector/-/jest-leak-detector-24.9.0.tgz", + "integrity": "sha512-tYkFIDsiKTGwb2FG1w8hX9V0aUb2ot8zY/2nFg087dUageonw1zrLMP4W6zsRO59dPkTSKie+D4rhMuP9nRmrA==", "dev": true, "requires": { - "pretty-format": "^24.8.0" + "jest-get-type": "^24.9.0", + "pretty-format": "^24.9.0" + }, + "dependencies": { + "@jest/types": { + "version": "24.9.0", + "resolved": "https://registry.npmjs.org/@jest/types/-/types-24.9.0.tgz", + "integrity": "sha512-XKK7ze1apu5JWQ5eZjHITP66AX+QsLlbaJRBGYr8pNzwcAE2JVkwnf0yqjHTsDRcjR0mujy/NmZMXw5kl+kGBw==", + "dev": true, + "requires": { + "@types/istanbul-lib-coverage": "^2.0.0", + "@types/istanbul-reports": "^1.1.1", + "@types/yargs": "^13.0.0" + } + }, + "@types/yargs": { + "version": "13.0.11", + "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-13.0.11.tgz", + "integrity": "sha512-NRqD6T4gktUrDi1o1wLH3EKC1o2caCr7/wR87ODcbVITQF106OM3sFN92ysZ++wqelOd1CTzatnOBRDYYG6wGQ==", + "dev": true, + "requires": { + "@types/yargs-parser": "*" + } + }, + "jest-get-type": { + "version": "24.9.0", + "resolved": "https://registry.npmjs.org/jest-get-type/-/jest-get-type-24.9.0.tgz", + "integrity": "sha512-lUseMzAley4LhIcpSP9Jf+fTrQ4a1yHQwLNeeVa2cEmbCGeoZAtYPOIv8JaxLD/sUpKxetKGP+gsHl8f8TSj8Q==", + "dev": true + }, + "pretty-format": { + "version": "24.9.0", + "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-24.9.0.tgz", + "integrity": "sha512-00ZMZUiHaJrNfk33guavqgvfJS30sLYf0f8+Srklv0AMPodGGHcoHgksZ3OThYnIvOd+8yMCn0YiEOogjlgsnA==", + "dev": true, + "requires": { + "@jest/types": "^24.9.0", + "ansi-regex": "^4.0.0", + "ansi-styles": "^3.2.0", + "react-is": "^16.8.4" + } + } } }, "jest-matcher-utils": { @@ -3006,18 +3986,40 @@ } }, "jest-mock": { - "version": "24.8.0", - "resolved": "https://registry.npmjs.org/jest-mock/-/jest-mock-24.8.0.tgz", - "integrity": "sha512-6kWugwjGjJw+ZkK4mDa0Df3sDlUTsV47MSrT0nGQ0RBWJbpODDQ8MHDVtGtUYBne3IwZUhtB7elxHspU79WH3A==", + "version": "24.9.0", + "resolved": "https://registry.npmjs.org/jest-mock/-/jest-mock-24.9.0.tgz", + "integrity": "sha512-3BEYN5WbSq9wd+SyLDES7AHnjH9A/ROBwmz7l2y+ol+NtSFO8DYiEBzoO1CeFc9a8DYy10EO4dDFVv/wN3zl1w==", "dev": true, "requires": { - "@jest/types": "^24.8.0" + "@jest/types": "^24.9.0" + }, + "dependencies": { + "@jest/types": { + "version": "24.9.0", + "resolved": "https://registry.npmjs.org/@jest/types/-/types-24.9.0.tgz", + "integrity": "sha512-XKK7ze1apu5JWQ5eZjHITP66AX+QsLlbaJRBGYr8pNzwcAE2JVkwnf0yqjHTsDRcjR0mujy/NmZMXw5kl+kGBw==", + "dev": true, + "requires": { + "@types/istanbul-lib-coverage": "^2.0.0", + "@types/istanbul-reports": "^1.1.1", + "@types/yargs": "^13.0.0" + } + }, + "@types/yargs": { + "version": "13.0.11", + "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-13.0.11.tgz", + "integrity": "sha512-NRqD6T4gktUrDi1o1wLH3EKC1o2caCr7/wR87ODcbVITQF106OM3sFN92ysZ++wqelOd1CTzatnOBRDYYG6wGQ==", + "dev": true, + "requires": { + "@types/yargs-parser": "*" + } + } } }, "jest-pnp-resolver": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/jest-pnp-resolver/-/jest-pnp-resolver-1.2.1.tgz", - "integrity": "sha512-pgFw2tm54fzgYvc/OHrnysABEObZCUNFnhjoRjaVOCN8NYc032/gVjPaHD4Aq6ApkSieWtfKAFQtmDKAmhupnQ==", + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/jest-pnp-resolver/-/jest-pnp-resolver-1.2.2.tgz", + "integrity": "sha512-olV41bKSMm8BdnuMsewT4jqlZ8+3TCARAXjZGT9jcoSnrfUnRCqnMoF9XEeoWjbzObpqF9dRhHQj0Xb9QdF6/w==", "dev": true }, "jest-regex-util": { @@ -3027,140 +4029,460 @@ "dev": true }, "jest-resolve": { - "version": "24.8.0", - "resolved": "https://registry.npmjs.org/jest-resolve/-/jest-resolve-24.8.0.tgz", - "integrity": "sha512-+hjSzi1PoRvnuOICoYd5V/KpIQmkAsfjFO71458hQ2Whi/yf1GDeBOFj8Gxw4LrApHsVJvn5fmjcPdmoUHaVKw==", + "version": "24.9.0", + "resolved": "https://registry.npmjs.org/jest-resolve/-/jest-resolve-24.9.0.tgz", + "integrity": "sha512-TaLeLVL1l08YFZAt3zaPtjiVvyy4oSA6CRe+0AFPPVX3Q/VI0giIWWoAvoS5L96vj9Dqxj4fB5p2qrHCmTU/MQ==", "dev": true, "requires": { - "@jest/types": "^24.8.0", + "@jest/types": "^24.9.0", "browser-resolve": "^1.11.3", "chalk": "^2.0.1", "jest-pnp-resolver": "^1.2.1", "realpath-native": "^1.1.0" + }, + "dependencies": { + "@jest/types": { + "version": "24.9.0", + "resolved": "https://registry.npmjs.org/@jest/types/-/types-24.9.0.tgz", + "integrity": "sha512-XKK7ze1apu5JWQ5eZjHITP66AX+QsLlbaJRBGYr8pNzwcAE2JVkwnf0yqjHTsDRcjR0mujy/NmZMXw5kl+kGBw==", + "dev": true, + "requires": { + "@types/istanbul-lib-coverage": "^2.0.0", + "@types/istanbul-reports": "^1.1.1", + "@types/yargs": "^13.0.0" + } + }, + "@types/yargs": { + "version": "13.0.11", + "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-13.0.11.tgz", + "integrity": "sha512-NRqD6T4gktUrDi1o1wLH3EKC1o2caCr7/wR87ODcbVITQF106OM3sFN92ysZ++wqelOd1CTzatnOBRDYYG6wGQ==", + "dev": true, + "requires": { + "@types/yargs-parser": "*" + } + } } }, "jest-resolve-dependencies": { - "version": "24.8.0", - "resolved": "https://registry.npmjs.org/jest-resolve-dependencies/-/jest-resolve-dependencies-24.8.0.tgz", - "integrity": "sha512-hyK1qfIf/krV+fSNyhyJeq3elVMhK9Eijlwy+j5jqmZ9QsxwKBiP6qukQxaHtK8k6zql/KYWwCTQ+fDGTIJauw==", + "version": "24.9.0", + "resolved": "https://registry.npmjs.org/jest-resolve-dependencies/-/jest-resolve-dependencies-24.9.0.tgz", + "integrity": "sha512-Fm7b6AlWnYhT0BXy4hXpactHIqER7erNgIsIozDXWl5dVm+k8XdGVe1oTg1JyaFnOxarMEbax3wyRJqGP2Pq+g==", "dev": true, "requires": { - "@jest/types": "^24.8.0", + "@jest/types": "^24.9.0", "jest-regex-util": "^24.3.0", - "jest-snapshot": "^24.8.0" + "jest-snapshot": "^24.9.0" + }, + "dependencies": { + "@jest/types": { + "version": "24.9.0", + "resolved": "https://registry.npmjs.org/@jest/types/-/types-24.9.0.tgz", + "integrity": "sha512-XKK7ze1apu5JWQ5eZjHITP66AX+QsLlbaJRBGYr8pNzwcAE2JVkwnf0yqjHTsDRcjR0mujy/NmZMXw5kl+kGBw==", + "dev": true, + "requires": { + "@types/istanbul-lib-coverage": "^2.0.0", + "@types/istanbul-reports": "^1.1.1", + "@types/yargs": "^13.0.0" + } + }, + "@types/yargs": { + "version": "13.0.11", + "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-13.0.11.tgz", + "integrity": "sha512-NRqD6T4gktUrDi1o1wLH3EKC1o2caCr7/wR87ODcbVITQF106OM3sFN92ysZ++wqelOd1CTzatnOBRDYYG6wGQ==", + "dev": true, + "requires": { + "@types/yargs-parser": "*" + } + } } }, "jest-runner": { - "version": "24.8.0", - "resolved": "https://registry.npmjs.org/jest-runner/-/jest-runner-24.8.0.tgz", - "integrity": "sha512-utFqC5BaA3JmznbissSs95X1ZF+d+4WuOWwpM9+Ak356YtMhHE/GXUondZdcyAAOTBEsRGAgH/0TwLzfI9h7ow==", + "version": "24.9.0", + "resolved": "https://registry.npmjs.org/jest-runner/-/jest-runner-24.9.0.tgz", + "integrity": "sha512-KksJQyI3/0mhcfspnxxEOBueGrd5E4vV7ADQLT9ESaCzz02WnbdbKWIf5Mkaucoaj7obQckYPVX6JJhgUcoWWg==", "dev": true, "requires": { "@jest/console": "^24.7.1", - "@jest/environment": "^24.8.0", - "@jest/test-result": "^24.8.0", - "@jest/types": "^24.8.0", + "@jest/environment": "^24.9.0", + "@jest/test-result": "^24.9.0", + "@jest/types": "^24.9.0", "chalk": "^2.4.2", "exit": "^0.1.2", "graceful-fs": "^4.1.15", - "jest-config": "^24.8.0", + "jest-config": "^24.9.0", "jest-docblock": "^24.3.0", - "jest-haste-map": "^24.8.0", - "jest-jasmine2": "^24.8.0", - "jest-leak-detector": "^24.8.0", - "jest-message-util": "^24.8.0", - "jest-resolve": "^24.8.0", - "jest-runtime": "^24.8.0", - "jest-util": "^24.8.0", + "jest-haste-map": "^24.9.0", + "jest-jasmine2": "^24.9.0", + "jest-leak-detector": "^24.9.0", + "jest-message-util": "^24.9.0", + "jest-resolve": "^24.9.0", + "jest-runtime": "^24.9.0", + "jest-util": "^24.9.0", "jest-worker": "^24.6.0", "source-map-support": "^0.5.6", "throat": "^4.0.0" + }, + "dependencies": { + "@jest/source-map": { + "version": "24.9.0", + "resolved": "https://registry.npmjs.org/@jest/source-map/-/source-map-24.9.0.tgz", + "integrity": "sha512-/Xw7xGlsZb4MJzNDgB7PW5crou5JqWiBQaz6xyPd3ArOg2nfn/PunV8+olXbbEZzNl591o5rWKE9BRDaFAuIBg==", + "dev": true, + "requires": { + "callsites": "^3.0.0", + "graceful-fs": "^4.1.15", + "source-map": "^0.6.0" + } + }, + "@jest/test-result": { + "version": "24.9.0", + "resolved": "https://registry.npmjs.org/@jest/test-result/-/test-result-24.9.0.tgz", + "integrity": "sha512-XEFrHbBonBJ8dGp2JmF8kP/nQI/ImPpygKHwQ/SY+es59Z3L5PI4Qb9TQQMAEeYsThG1xF0k6tmG0tIKATNiiA==", + "dev": true, + "requires": { + "@jest/console": "^24.9.0", + "@jest/types": "^24.9.0", + "@types/istanbul-lib-coverage": "^2.0.0" + }, + "dependencies": { + "@jest/console": { + "version": "24.9.0", + "resolved": "https://registry.npmjs.org/@jest/console/-/console-24.9.0.tgz", + "integrity": "sha512-Zuj6b8TnKXi3q4ymac8EQfc3ea/uhLeCGThFqXeC8H9/raaH8ARPUTdId+XyGd03Z4In0/VjD2OYFcBF09fNLQ==", + "dev": true, + "requires": { + "@jest/source-map": "^24.9.0", + "chalk": "^2.0.1", + "slash": "^2.0.0" + } + } + } + }, + "@jest/types": { + "version": "24.9.0", + "resolved": "https://registry.npmjs.org/@jest/types/-/types-24.9.0.tgz", + "integrity": "sha512-XKK7ze1apu5JWQ5eZjHITP66AX+QsLlbaJRBGYr8pNzwcAE2JVkwnf0yqjHTsDRcjR0mujy/NmZMXw5kl+kGBw==", + "dev": true, + "requires": { + "@types/istanbul-lib-coverage": "^2.0.0", + "@types/istanbul-reports": "^1.1.1", + "@types/yargs": "^13.0.0" + } + }, + "@types/yargs": { + "version": "13.0.11", + "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-13.0.11.tgz", + "integrity": "sha512-NRqD6T4gktUrDi1o1wLH3EKC1o2caCr7/wR87ODcbVITQF106OM3sFN92ysZ++wqelOd1CTzatnOBRDYYG6wGQ==", + "dev": true, + "requires": { + "@types/yargs-parser": "*" + } + }, + "jest-message-util": { + "version": "24.9.0", + "resolved": "https://registry.npmjs.org/jest-message-util/-/jest-message-util-24.9.0.tgz", + "integrity": "sha512-oCj8FiZ3U0hTP4aSui87P4L4jC37BtQwUMqk+zk/b11FR19BJDeZsZAvIHutWnmtw7r85UmR3CEWZ0HWU2mAlw==", + "dev": true, + "requires": { + "@babel/code-frame": "^7.0.0", + "@jest/test-result": "^24.9.0", + "@jest/types": "^24.9.0", + "@types/stack-utils": "^1.0.1", + "chalk": "^2.0.1", + "micromatch": "^3.1.10", + "slash": "^2.0.0", + "stack-utils": "^1.0.1" + } + } } }, "jest-runtime": { - "version": "24.8.0", - "resolved": "https://registry.npmjs.org/jest-runtime/-/jest-runtime-24.8.0.tgz", - "integrity": "sha512-Mq0aIXhvO/3bX44ccT+czU1/57IgOMyy80oM0XR/nyD5zgBcesF84BPabZi39pJVA6UXw+fY2Q1N+4BiVUBWOA==", + "version": "24.9.0", + "resolved": "https://registry.npmjs.org/jest-runtime/-/jest-runtime-24.9.0.tgz", + "integrity": "sha512-8oNqgnmF3v2J6PVRM2Jfuj8oX3syKmaynlDMMKQ4iyzbQzIG6th5ub/lM2bCMTmoTKM3ykcUYI2Pw9xwNtjMnw==", "dev": true, "requires": { "@jest/console": "^24.7.1", - "@jest/environment": "^24.8.0", + "@jest/environment": "^24.9.0", "@jest/source-map": "^24.3.0", - "@jest/transform": "^24.8.0", - "@jest/types": "^24.8.0", - "@types/yargs": "^12.0.2", + "@jest/transform": "^24.9.0", + "@jest/types": "^24.9.0", + "@types/yargs": "^13.0.0", "chalk": "^2.0.1", "exit": "^0.1.2", "glob": "^7.1.3", "graceful-fs": "^4.1.15", - "jest-config": "^24.8.0", - "jest-haste-map": "^24.8.0", - "jest-message-util": "^24.8.0", - "jest-mock": "^24.8.0", + "jest-config": "^24.9.0", + "jest-haste-map": "^24.9.0", + "jest-message-util": "^24.9.0", + "jest-mock": "^24.9.0", "jest-regex-util": "^24.3.0", - "jest-resolve": "^24.8.0", - "jest-snapshot": "^24.8.0", - "jest-util": "^24.8.0", - "jest-validate": "^24.8.0", + "jest-resolve": "^24.9.0", + "jest-snapshot": "^24.9.0", + "jest-util": "^24.9.0", + "jest-validate": "^24.9.0", "realpath-native": "^1.1.0", "slash": "^2.0.0", "strip-bom": "^3.0.0", - "yargs": "^12.0.2" + "yargs": "^13.3.0" }, "dependencies": { - "slash": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/slash/-/slash-2.0.0.tgz", - "integrity": "sha512-ZYKh3Wh2z1PpEXWr0MpSBZ0V6mZHAQfYevttO11c51CaWjGTaadiKZ+wVt1PbMlDV5qhMFslpZCemhwOK7C89A==", - "dev": true + "@jest/test-result": { + "version": "24.9.0", + "resolved": "https://registry.npmjs.org/@jest/test-result/-/test-result-24.9.0.tgz", + "integrity": "sha512-XEFrHbBonBJ8dGp2JmF8kP/nQI/ImPpygKHwQ/SY+es59Z3L5PI4Qb9TQQMAEeYsThG1xF0k6tmG0tIKATNiiA==", + "dev": true, + "requires": { + "@jest/console": "^24.9.0", + "@jest/types": "^24.9.0", + "@types/istanbul-lib-coverage": "^2.0.0" + }, + "dependencies": { + "@jest/console": { + "version": "24.9.0", + "resolved": "https://registry.npmjs.org/@jest/console/-/console-24.9.0.tgz", + "integrity": "sha512-Zuj6b8TnKXi3q4ymac8EQfc3ea/uhLeCGThFqXeC8H9/raaH8ARPUTdId+XyGd03Z4In0/VjD2OYFcBF09fNLQ==", + "dev": true, + "requires": { + "@jest/source-map": "^24.9.0", + "chalk": "^2.0.1", + "slash": "^2.0.0" + } + }, + "@jest/source-map": { + "version": "24.9.0", + "resolved": "https://registry.npmjs.org/@jest/source-map/-/source-map-24.9.0.tgz", + "integrity": "sha512-/Xw7xGlsZb4MJzNDgB7PW5crou5JqWiBQaz6xyPd3ArOg2nfn/PunV8+olXbbEZzNl591o5rWKE9BRDaFAuIBg==", + "dev": true, + "requires": { + "callsites": "^3.0.0", + "graceful-fs": "^4.1.15", + "source-map": "^0.6.0" + } + } + } + }, + "@jest/types": { + "version": "24.9.0", + "resolved": "https://registry.npmjs.org/@jest/types/-/types-24.9.0.tgz", + "integrity": "sha512-XKK7ze1apu5JWQ5eZjHITP66AX+QsLlbaJRBGYr8pNzwcAE2JVkwnf0yqjHTsDRcjR0mujy/NmZMXw5kl+kGBw==", + "dev": true, + "requires": { + "@types/istanbul-lib-coverage": "^2.0.0", + "@types/istanbul-reports": "^1.1.1", + "@types/yargs": "^13.0.0" + } + }, + "@types/yargs": { + "version": "13.0.11", + "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-13.0.11.tgz", + "integrity": "sha512-NRqD6T4gktUrDi1o1wLH3EKC1o2caCr7/wR87ODcbVITQF106OM3sFN92ysZ++wqelOd1CTzatnOBRDYYG6wGQ==", + "dev": true, + "requires": { + "@types/yargs-parser": "*" + } + }, + "jest-message-util": { + "version": "24.9.0", + "resolved": "https://registry.npmjs.org/jest-message-util/-/jest-message-util-24.9.0.tgz", + "integrity": "sha512-oCj8FiZ3U0hTP4aSui87P4L4jC37BtQwUMqk+zk/b11FR19BJDeZsZAvIHutWnmtw7r85UmR3CEWZ0HWU2mAlw==", + "dev": true, + "requires": { + "@babel/code-frame": "^7.0.0", + "@jest/test-result": "^24.9.0", + "@jest/types": "^24.9.0", + "@types/stack-utils": "^1.0.1", + "chalk": "^2.0.1", + "micromatch": "^3.1.10", + "slash": "^2.0.0", + "stack-utils": "^1.0.1" + } } } }, "jest-serializer": { - "version": "24.4.0", - "resolved": "https://registry.npmjs.org/jest-serializer/-/jest-serializer-24.4.0.tgz", - "integrity": "sha512-k//0DtglVstc1fv+GY/VHDIjrtNjdYvYjMlbLUed4kxrE92sIUewOi5Hj3vrpB8CXfkJntRPDRjCrCvUhBdL8Q==", + "version": "24.9.0", + "resolved": "https://registry.npmjs.org/jest-serializer/-/jest-serializer-24.9.0.tgz", + "integrity": "sha512-DxYipDr8OvfrKH3Kel6NdED3OXxjvxXZ1uIY2I9OFbGg+vUkkg7AGvi65qbhbWNPvDckXmzMPbK3u3HaDO49bQ==", "dev": true }, "jest-snapshot": { - "version": "24.8.0", - "resolved": "https://registry.npmjs.org/jest-snapshot/-/jest-snapshot-24.8.0.tgz", - "integrity": "sha512-5ehtWoc8oU9/cAPe6fez6QofVJLBKyqkY2+TlKTOf0VllBB/mqUNdARdcjlZrs9F1Cv+/HKoCS/BknT0+tmfPg==", + "version": "24.9.0", + "resolved": "https://registry.npmjs.org/jest-snapshot/-/jest-snapshot-24.9.0.tgz", + "integrity": "sha512-uI/rszGSs73xCM0l+up7O7a40o90cnrk429LOiK3aeTvfC0HHmldbd81/B7Ix81KSFe1lwkbl7GnBGG4UfuDew==", "dev": true, "requires": { "@babel/types": "^7.0.0", - "@jest/types": "^24.8.0", + "@jest/types": "^24.9.0", "chalk": "^2.0.1", - "expect": "^24.8.0", - "jest-diff": "^24.8.0", - "jest-matcher-utils": "^24.8.0", - "jest-message-util": "^24.8.0", - "jest-resolve": "^24.8.0", + "expect": "^24.9.0", + "jest-diff": "^24.9.0", + "jest-get-type": "^24.9.0", + "jest-matcher-utils": "^24.9.0", + "jest-message-util": "^24.9.0", + "jest-resolve": "^24.9.0", "mkdirp": "^0.5.1", "natural-compare": "^1.4.0", - "pretty-format": "^24.8.0", - "semver": "^5.5.0" + "pretty-format": "^24.9.0", + "semver": "^6.2.0" }, "dependencies": { + "@jest/console": { + "version": "24.9.0", + "resolved": "https://registry.npmjs.org/@jest/console/-/console-24.9.0.tgz", + "integrity": "sha512-Zuj6b8TnKXi3q4ymac8EQfc3ea/uhLeCGThFqXeC8H9/raaH8ARPUTdId+XyGd03Z4In0/VjD2OYFcBF09fNLQ==", + "dev": true, + "requires": { + "@jest/source-map": "^24.9.0", + "chalk": "^2.0.1", + "slash": "^2.0.0" + } + }, + "@jest/source-map": { + "version": "24.9.0", + "resolved": "https://registry.npmjs.org/@jest/source-map/-/source-map-24.9.0.tgz", + "integrity": "sha512-/Xw7xGlsZb4MJzNDgB7PW5crou5JqWiBQaz6xyPd3ArOg2nfn/PunV8+olXbbEZzNl591o5rWKE9BRDaFAuIBg==", + "dev": true, + "requires": { + "callsites": "^3.0.0", + "graceful-fs": "^4.1.15", + "source-map": "^0.6.0" + } + }, + "@jest/test-result": { + "version": "24.9.0", + "resolved": "https://registry.npmjs.org/@jest/test-result/-/test-result-24.9.0.tgz", + "integrity": "sha512-XEFrHbBonBJ8dGp2JmF8kP/nQI/ImPpygKHwQ/SY+es59Z3L5PI4Qb9TQQMAEeYsThG1xF0k6tmG0tIKATNiiA==", + "dev": true, + "requires": { + "@jest/console": "^24.9.0", + "@jest/types": "^24.9.0", + "@types/istanbul-lib-coverage": "^2.0.0" + } + }, + "@jest/types": { + "version": "24.9.0", + "resolved": "https://registry.npmjs.org/@jest/types/-/types-24.9.0.tgz", + "integrity": "sha512-XKK7ze1apu5JWQ5eZjHITP66AX+QsLlbaJRBGYr8pNzwcAE2JVkwnf0yqjHTsDRcjR0mujy/NmZMXw5kl+kGBw==", + "dev": true, + "requires": { + "@types/istanbul-lib-coverage": "^2.0.0", + "@types/istanbul-reports": "^1.1.1", + "@types/yargs": "^13.0.0" + } + }, + "@types/yargs": { + "version": "13.0.11", + "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-13.0.11.tgz", + "integrity": "sha512-NRqD6T4gktUrDi1o1wLH3EKC1o2caCr7/wR87ODcbVITQF106OM3sFN92ysZ++wqelOd1CTzatnOBRDYYG6wGQ==", + "dev": true, + "requires": { + "@types/yargs-parser": "*" + } + }, + "diff-sequences": { + "version": "24.9.0", + "resolved": "https://registry.npmjs.org/diff-sequences/-/diff-sequences-24.9.0.tgz", + "integrity": "sha512-Dj6Wk3tWyTE+Fo1rW8v0Xhwk80um6yFYKbuAxc9c3EZxIHFDYwbi34Uk42u1CdnIiVorvt4RmlSDjIPyzGC2ew==", + "dev": true + }, + "expect": { + "version": "24.9.0", + "resolved": "https://registry.npmjs.org/expect/-/expect-24.9.0.tgz", + "integrity": "sha512-wvVAx8XIol3Z5m9zvZXiyZOQ+sRJqNTIm6sGjdWlaZIeupQGO3WbYI+15D/AmEwZywL6wtJkbAbJtzkOfBuR0Q==", + "dev": true, + "requires": { + "@jest/types": "^24.9.0", + "ansi-styles": "^3.2.0", + "jest-get-type": "^24.9.0", + "jest-matcher-utils": "^24.9.0", + "jest-message-util": "^24.9.0", + "jest-regex-util": "^24.9.0" + } + }, + "jest-diff": { + "version": "24.9.0", + "resolved": "https://registry.npmjs.org/jest-diff/-/jest-diff-24.9.0.tgz", + "integrity": "sha512-qMfrTs8AdJE2iqrTp0hzh7kTd2PQWrsFyj9tORoKmu32xjPjeE4NyjVRDz8ybYwqS2ik8N4hsIpiVTyFeo2lBQ==", + "dev": true, + "requires": { + "chalk": "^2.0.1", + "diff-sequences": "^24.9.0", + "jest-get-type": "^24.9.0", + "pretty-format": "^24.9.0" + } + }, + "jest-get-type": { + "version": "24.9.0", + "resolved": "https://registry.npmjs.org/jest-get-type/-/jest-get-type-24.9.0.tgz", + "integrity": "sha512-lUseMzAley4LhIcpSP9Jf+fTrQ4a1yHQwLNeeVa2cEmbCGeoZAtYPOIv8JaxLD/sUpKxetKGP+gsHl8f8TSj8Q==", + "dev": true + }, + "jest-matcher-utils": { + "version": "24.9.0", + "resolved": "https://registry.npmjs.org/jest-matcher-utils/-/jest-matcher-utils-24.9.0.tgz", + "integrity": "sha512-OZz2IXsu6eaiMAwe67c1T+5tUAtQyQx27/EMEkbFAGiw52tB9em+uGbzpcgYVpA8wl0hlxKPZxrly4CXU/GjHA==", + "dev": true, + "requires": { + "chalk": "^2.0.1", + "jest-diff": "^24.9.0", + "jest-get-type": "^24.9.0", + "pretty-format": "^24.9.0" + } + }, + "jest-message-util": { + "version": "24.9.0", + "resolved": "https://registry.npmjs.org/jest-message-util/-/jest-message-util-24.9.0.tgz", + "integrity": "sha512-oCj8FiZ3U0hTP4aSui87P4L4jC37BtQwUMqk+zk/b11FR19BJDeZsZAvIHutWnmtw7r85UmR3CEWZ0HWU2mAlw==", + "dev": true, + "requires": { + "@babel/code-frame": "^7.0.0", + "@jest/test-result": "^24.9.0", + "@jest/types": "^24.9.0", + "@types/stack-utils": "^1.0.1", + "chalk": "^2.0.1", + "micromatch": "^3.1.10", + "slash": "^2.0.0", + "stack-utils": "^1.0.1" + } + }, + "jest-regex-util": { + "version": "24.9.0", + "resolved": "https://registry.npmjs.org/jest-regex-util/-/jest-regex-util-24.9.0.tgz", + "integrity": "sha512-05Cmb6CuxaA+Ys6fjr3PhvV3bGQmO+2p2La4hFbU+W5uOc479f7FdLXUWXw4pYMAhhSZIuKHwSXSu6CsSBAXQA==", + "dev": true + }, + "pretty-format": { + "version": "24.9.0", + "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-24.9.0.tgz", + "integrity": "sha512-00ZMZUiHaJrNfk33guavqgvfJS30sLYf0f8+Srklv0AMPodGGHcoHgksZ3OThYnIvOd+8yMCn0YiEOogjlgsnA==", + "dev": true, + "requires": { + "@jest/types": "^24.9.0", + "ansi-regex": "^4.0.0", + "ansi-styles": "^3.2.0", + "react-is": "^16.8.4" + } + }, "semver": { - "version": "5.7.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.0.tgz", - "integrity": "sha512-Ya52jSX2u7QKghxeoFGpLwCtGlt7j0oY9DYb5apt9nPlJ42ID+ulTXESnt/qAQcoSERyZ5sl3LDIOw0nAn/5DA==", + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", + "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", "dev": true } } }, "jest-util": { - "version": "24.8.0", - "resolved": "https://registry.npmjs.org/jest-util/-/jest-util-24.8.0.tgz", - "integrity": "sha512-DYZeE+XyAnbNt0BG1OQqKy/4GVLPtzwGx5tsnDrFcax36rVE3lTA5fbvgmbVPUZf9w77AJ8otqR4VBbfFJkUZA==", + "version": "24.9.0", + "resolved": "https://registry.npmjs.org/jest-util/-/jest-util-24.9.0.tgz", + "integrity": "sha512-x+cZU8VRmOJxbA1K5oDBdxQmdq0OIdADarLxk0Mq+3XS4jgvhG/oKGWcIDCtPG0HgjxOYvF+ilPJQsAyXfbNOg==", "dev": true, "requires": { - "@jest/console": "^24.7.1", - "@jest/fake-timers": "^24.8.0", - "@jest/source-map": "^24.3.0", - "@jest/test-result": "^24.8.0", - "@jest/types": "^24.8.0", + "@jest/console": "^24.9.0", + "@jest/fake-timers": "^24.9.0", + "@jest/source-map": "^24.9.0", + "@jest/test-result": "^24.9.0", + "@jest/types": "^24.9.0", "callsites": "^3.0.0", "chalk": "^2.0.1", "graceful-fs": "^4.1.15", @@ -3170,56 +4492,192 @@ "source-map": "^0.6.0" }, "dependencies": { - "callsites": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", - "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==", - "dev": true + "@jest/console": { + "version": "24.9.0", + "resolved": "https://registry.npmjs.org/@jest/console/-/console-24.9.0.tgz", + "integrity": "sha512-Zuj6b8TnKXi3q4ymac8EQfc3ea/uhLeCGThFqXeC8H9/raaH8ARPUTdId+XyGd03Z4In0/VjD2OYFcBF09fNLQ==", + "dev": true, + "requires": { + "@jest/source-map": "^24.9.0", + "chalk": "^2.0.1", + "slash": "^2.0.0" + } }, - "slash": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/slash/-/slash-2.0.0.tgz", - "integrity": "sha512-ZYKh3Wh2z1PpEXWr0MpSBZ0V6mZHAQfYevttO11c51CaWjGTaadiKZ+wVt1PbMlDV5qhMFslpZCemhwOK7C89A==", - "dev": true + "@jest/source-map": { + "version": "24.9.0", + "resolved": "https://registry.npmjs.org/@jest/source-map/-/source-map-24.9.0.tgz", + "integrity": "sha512-/Xw7xGlsZb4MJzNDgB7PW5crou5JqWiBQaz6xyPd3ArOg2nfn/PunV8+olXbbEZzNl591o5rWKE9BRDaFAuIBg==", + "dev": true, + "requires": { + "callsites": "^3.0.0", + "graceful-fs": "^4.1.15", + "source-map": "^0.6.0" + } + }, + "@jest/test-result": { + "version": "24.9.0", + "resolved": "https://registry.npmjs.org/@jest/test-result/-/test-result-24.9.0.tgz", + "integrity": "sha512-XEFrHbBonBJ8dGp2JmF8kP/nQI/ImPpygKHwQ/SY+es59Z3L5PI4Qb9TQQMAEeYsThG1xF0k6tmG0tIKATNiiA==", + "dev": true, + "requires": { + "@jest/console": "^24.9.0", + "@jest/types": "^24.9.0", + "@types/istanbul-lib-coverage": "^2.0.0" + } + }, + "@jest/types": { + "version": "24.9.0", + "resolved": "https://registry.npmjs.org/@jest/types/-/types-24.9.0.tgz", + "integrity": "sha512-XKK7ze1apu5JWQ5eZjHITP66AX+QsLlbaJRBGYr8pNzwcAE2JVkwnf0yqjHTsDRcjR0mujy/NmZMXw5kl+kGBw==", + "dev": true, + "requires": { + "@types/istanbul-lib-coverage": "^2.0.0", + "@types/istanbul-reports": "^1.1.1", + "@types/yargs": "^13.0.0" + } + }, + "@types/yargs": { + "version": "13.0.11", + "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-13.0.11.tgz", + "integrity": "sha512-NRqD6T4gktUrDi1o1wLH3EKC1o2caCr7/wR87ODcbVITQF106OM3sFN92ysZ++wqelOd1CTzatnOBRDYYG6wGQ==", + "dev": true, + "requires": { + "@types/yargs-parser": "*" + } } } }, "jest-validate": { - "version": "24.8.0", - "resolved": "https://registry.npmjs.org/jest-validate/-/jest-validate-24.8.0.tgz", - "integrity": "sha512-+/N7VOEMW1Vzsrk3UWBDYTExTPwf68tavEPKDnJzrC6UlHtUDU/fuEdXqFoHzv9XnQ+zW6X3qMZhJ3YexfeLDA==", + "version": "24.9.0", + "resolved": "https://registry.npmjs.org/jest-validate/-/jest-validate-24.9.0.tgz", + "integrity": "sha512-HPIt6C5ACwiqSiwi+OfSSHbK8sG7akG8eATl+IPKaeIjtPOeBUd/g3J7DghugzxrGjI93qS/+RPKe1H6PqvhRQ==", "dev": true, "requires": { - "@jest/types": "^24.8.0", - "camelcase": "^5.0.0", + "@jest/types": "^24.9.0", + "camelcase": "^5.3.1", "chalk": "^2.0.1", - "jest-get-type": "^24.8.0", - "leven": "^2.1.0", - "pretty-format": "^24.8.0" + "jest-get-type": "^24.9.0", + "leven": "^3.1.0", + "pretty-format": "^24.9.0" + }, + "dependencies": { + "@jest/types": { + "version": "24.9.0", + "resolved": "https://registry.npmjs.org/@jest/types/-/types-24.9.0.tgz", + "integrity": "sha512-XKK7ze1apu5JWQ5eZjHITP66AX+QsLlbaJRBGYr8pNzwcAE2JVkwnf0yqjHTsDRcjR0mujy/NmZMXw5kl+kGBw==", + "dev": true, + "requires": { + "@types/istanbul-lib-coverage": "^2.0.0", + "@types/istanbul-reports": "^1.1.1", + "@types/yargs": "^13.0.0" + } + }, + "@types/yargs": { + "version": "13.0.11", + "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-13.0.11.tgz", + "integrity": "sha512-NRqD6T4gktUrDi1o1wLH3EKC1o2caCr7/wR87ODcbVITQF106OM3sFN92ysZ++wqelOd1CTzatnOBRDYYG6wGQ==", + "dev": true, + "requires": { + "@types/yargs-parser": "*" + } + }, + "jest-get-type": { + "version": "24.9.0", + "resolved": "https://registry.npmjs.org/jest-get-type/-/jest-get-type-24.9.0.tgz", + "integrity": "sha512-lUseMzAley4LhIcpSP9Jf+fTrQ4a1yHQwLNeeVa2cEmbCGeoZAtYPOIv8JaxLD/sUpKxetKGP+gsHl8f8TSj8Q==", + "dev": true + }, + "pretty-format": { + "version": "24.9.0", + "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-24.9.0.tgz", + "integrity": "sha512-00ZMZUiHaJrNfk33guavqgvfJS30sLYf0f8+Srklv0AMPodGGHcoHgksZ3OThYnIvOd+8yMCn0YiEOogjlgsnA==", + "dev": true, + "requires": { + "@jest/types": "^24.9.0", + "ansi-regex": "^4.0.0", + "ansi-styles": "^3.2.0", + "react-is": "^16.8.4" + } + } } }, "jest-watcher": { - "version": "24.8.0", - "resolved": "https://registry.npmjs.org/jest-watcher/-/jest-watcher-24.8.0.tgz", - "integrity": "sha512-SBjwHt5NedQoVu54M5GEx7cl7IGEFFznvd/HNT8ier7cCAx/Qgu9ZMlaTQkvK22G1YOpcWBLQPFSImmxdn3DAw==", + "version": "24.9.0", + "resolved": "https://registry.npmjs.org/jest-watcher/-/jest-watcher-24.9.0.tgz", + "integrity": "sha512-+/fLOfKPXXYJDYlks62/4R4GoT+GU1tYZed99JSCOsmzkkF7727RqKrjNAxtfO4YpGv11wybgRvCjR73lK2GZw==", "dev": true, "requires": { - "@jest/test-result": "^24.8.0", - "@jest/types": "^24.8.0", - "@types/yargs": "^12.0.9", + "@jest/test-result": "^24.9.0", + "@jest/types": "^24.9.0", + "@types/yargs": "^13.0.0", "ansi-escapes": "^3.0.0", "chalk": "^2.0.1", - "jest-util": "^24.8.0", + "jest-util": "^24.9.0", "string-length": "^2.0.0" + }, + "dependencies": { + "@jest/console": { + "version": "24.9.0", + "resolved": "https://registry.npmjs.org/@jest/console/-/console-24.9.0.tgz", + "integrity": "sha512-Zuj6b8TnKXi3q4ymac8EQfc3ea/uhLeCGThFqXeC8H9/raaH8ARPUTdId+XyGd03Z4In0/VjD2OYFcBF09fNLQ==", + "dev": true, + "requires": { + "@jest/source-map": "^24.9.0", + "chalk": "^2.0.1", + "slash": "^2.0.0" + } + }, + "@jest/source-map": { + "version": "24.9.0", + "resolved": "https://registry.npmjs.org/@jest/source-map/-/source-map-24.9.0.tgz", + "integrity": "sha512-/Xw7xGlsZb4MJzNDgB7PW5crou5JqWiBQaz6xyPd3ArOg2nfn/PunV8+olXbbEZzNl591o5rWKE9BRDaFAuIBg==", + "dev": true, + "requires": { + "callsites": "^3.0.0", + "graceful-fs": "^4.1.15", + "source-map": "^0.6.0" + } + }, + "@jest/test-result": { + "version": "24.9.0", + "resolved": "https://registry.npmjs.org/@jest/test-result/-/test-result-24.9.0.tgz", + "integrity": "sha512-XEFrHbBonBJ8dGp2JmF8kP/nQI/ImPpygKHwQ/SY+es59Z3L5PI4Qb9TQQMAEeYsThG1xF0k6tmG0tIKATNiiA==", + "dev": true, + "requires": { + "@jest/console": "^24.9.0", + "@jest/types": "^24.9.0", + "@types/istanbul-lib-coverage": "^2.0.0" + } + }, + "@jest/types": { + "version": "24.9.0", + "resolved": "https://registry.npmjs.org/@jest/types/-/types-24.9.0.tgz", + "integrity": "sha512-XKK7ze1apu5JWQ5eZjHITP66AX+QsLlbaJRBGYr8pNzwcAE2JVkwnf0yqjHTsDRcjR0mujy/NmZMXw5kl+kGBw==", + "dev": true, + "requires": { + "@types/istanbul-lib-coverage": "^2.0.0", + "@types/istanbul-reports": "^1.1.1", + "@types/yargs": "^13.0.0" + } + }, + "@types/yargs": { + "version": "13.0.11", + "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-13.0.11.tgz", + "integrity": "sha512-NRqD6T4gktUrDi1o1wLH3EKC1o2caCr7/wR87ODcbVITQF106OM3sFN92ysZ++wqelOd1CTzatnOBRDYYG6wGQ==", + "dev": true, + "requires": { + "@types/yargs-parser": "*" + } + } } }, "jest-worker": { - "version": "24.6.0", - "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-24.6.0.tgz", - "integrity": "sha512-jDwgW5W9qGNvpI1tNnvajh0a5IE/PuGLFmHk6aR/BZFz8tSgGw17GsDPXAJ6p91IvYDjOw8GpFbvvZGAK+DPQQ==", + "version": "24.9.0", + "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-24.9.0.tgz", + "integrity": "sha512-51PE4haMSXcHohnSMdM42anbvZANYTqMrr52tVKPqqsPJMzoP6FYYDVqahX/HrAoKEKz3uUPzSvKs9A3qR4iVw==", "dev": true, "requires": { - "merge-stream": "^1.0.1", + "merge-stream": "^2.0.0", "supports-color": "^6.1.0" }, "dependencies": { @@ -3311,12 +4769,12 @@ "dev": true }, "json5": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/json5/-/json5-2.1.0.tgz", - "integrity": "sha512-8Mh9h6xViijj36g7Dxi+Y4S6hNGV96vcJZr/SrlHh1LR/pEn/8j/+qIBbs44YKl69Lrfctp4QD+AdWLTMqEZAQ==", + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/json5/-/json5-2.1.3.tgz", + "integrity": "sha512-KXPvOm8K9IJKFM0bmdn8QXh7udDh1g/giieX0NLCaMnb4hEiVFqnop2ImTXCc5e0/oHz3LTqmHGtExn5hfMkOA==", "dev": true, "requires": { - "minimist": "^1.2.0" + "minimist": "^1.2.5" } }, "jsprim": { @@ -3332,9 +4790,9 @@ } }, "kind-of": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.2.tgz", - "integrity": "sha512-s5kLOcnH0XqDO+FvuaLX8DDjZ18CGFk7VygH40QoKPUQhW4e2rvM0rwUq0t8IQDOwYSeLK01U90OjzBTme2QqA==", + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz", + "integrity": "sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==", "dev": true }, "kleur": { @@ -3343,15 +4801,6 @@ "integrity": "sha512-eTIzlVOSUR+JxdDFepEYcBMtZ9Qqdef+rnzWdRZuMbOywu5tO2w2N7rqjoANZ5k9vywhL6Br1VRjUIgTQx4E8w==", "dev": true }, - "lcid": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/lcid/-/lcid-2.0.0.tgz", - "integrity": "sha512-avPEb8P8EGnwXKClwsNUgryVjllcRqtMYa49NTsbQagYuT1DcXnl1915oxWjoyGrXR6zH/Y0Zc96xWsPcoDKeA==", - "dev": true, - "requires": { - "invert-kv": "^2.0.0" - } - }, "left-pad": { "version": "1.3.0", "resolved": "https://registry.npmjs.org/left-pad/-/left-pad-1.3.0.tgz", @@ -3359,9 +4808,9 @@ "dev": true }, "leven": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/leven/-/leven-2.1.0.tgz", - "integrity": "sha1-wuep93IJTe6dNCAq6KzORoeHVYA=", + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/leven/-/leven-3.1.0.tgz", + "integrity": "sha512-qsda+H8jTaUaN/x5vzW2rzc+8Rw4TAQ/4KjB46IwK5VH+IlVeeeje/EoZRpiXvIqjFgK84QffqPztGI3VBLG1A==", "dev": true }, "levn": { @@ -3402,6 +4851,12 @@ "integrity": "sha512-JNvd8XER9GQX0v2qJgsaN/mzFCNA5BRe/j8JN9d+tWyGLSodKQHKFicdwNYzWwI3wjRnaKPsGj1XkBjx/F96DQ==", "dev": true }, + "lodash.memoize": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/lodash.memoize/-/lodash.memoize-4.1.2.tgz", + "integrity": "sha1-vMbEmkKihA7Zl/Mj6tpezRguC/4=", + "dev": true + }, "lodash.sortby": { "version": "4.7.0", "resolved": "https://registry.npmjs.org/lodash.sortby/-/lodash.sortby-4.7.0.tgz", @@ -3432,19 +4887,13 @@ "resolved": "https://registry.npmjs.org/pify/-/pify-4.0.1.tgz", "integrity": "sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g==", "dev": true - }, - "semver": { - "version": "5.7.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.0.tgz", - "integrity": "sha512-Ya52jSX2u7QKghxeoFGpLwCtGlt7j0oY9DYb5apt9nPlJ42ID+ulTXESnt/qAQcoSERyZ5sl3LDIOw0nAn/5DA==", - "dev": true } } }, "make-error": { - "version": "1.3.5", - "resolved": "https://registry.npmjs.org/make-error/-/make-error-1.3.5.tgz", - "integrity": "sha512-c3sIjNUow0+8swNwVpqoH4YCShKNFkMaw6oH1mNS2haDZQqkeZFlHS3dhoeEbKKmJB4vXpJucU6oH75aDYeE9g==", + "version": "1.3.6", + "resolved": "https://registry.npmjs.org/make-error/-/make-error-1.3.6.tgz", + "integrity": "sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw==", "dev": true }, "makeerror": { @@ -3456,15 +4905,6 @@ "tmpl": "1.0.x" } }, - "map-age-cleaner": { - "version": "0.1.3", - "resolved": "https://registry.npmjs.org/map-age-cleaner/-/map-age-cleaner-0.1.3.tgz", - "integrity": "sha512-bJzx6nMoP6PDLPBFmg7+xRKeFZvFboMrGlxmNj9ClvX53KrmvM5bXFXEWjbz4cz1AFn+jWJ9z/DJSz7hrs0w3w==", - "dev": true, - "requires": { - "p-defer": "^1.0.0" - } - }, "map-cache": { "version": "0.2.2", "resolved": "https://registry.npmjs.org/map-cache/-/map-cache-0.2.2.tgz", @@ -3480,25 +4920,11 @@ "object-visit": "^1.0.0" } }, - "mem": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/mem/-/mem-4.3.0.tgz", - "integrity": "sha512-qX2bG48pTqYRVmDB37rn/6PT7LcR8T7oAX3bf99u1Tt1nzxYfxkgqDwUwolPlXweM0XzBOBFzSx4kfp7KP1s/w==", - "dev": true, - "requires": { - "map-age-cleaner": "^0.1.1", - "mimic-fn": "^2.0.0", - "p-is-promise": "^2.0.0" - } - }, "merge-stream": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/merge-stream/-/merge-stream-1.0.1.tgz", - "integrity": "sha1-QEEgLVCKNCugAXQAjfDCUbjBNeE=", - "dev": true, - "requires": { - "readable-stream": "^2.0.1" - } + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/merge-stream/-/merge-stream-2.0.0.tgz", + "integrity": "sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w==", + "dev": true }, "micromatch": { "version": "3.1.10", @@ -3522,26 +4948,20 @@ } }, "mime-db": { - "version": "1.40.0", - "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.40.0.tgz", - "integrity": "sha512-jYdeOMPy9vnxEqFRRo6ZvTZ8d9oPb+k18PKoYNYUe2stVEBPPwsln/qWzdbmaIvnhZ9v2P+CuecK+fpUfsV2mA==", + "version": "1.44.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.44.0.tgz", + "integrity": "sha512-/NOTfLrsPBVeH7YtFPgsVWveuL+4SjjYxaQ1xtM1KMFj7HdxlBlxeyNLzhyJVx7r4rZGJAZ/6lkKCitSc/Nmpg==", "dev": true }, "mime-types": { - "version": "2.1.24", - "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.24.tgz", - "integrity": "sha512-WaFHS3MCl5fapm3oLxU4eYDw77IQM2ACcxQ9RIxfaC3ooc6PFuBMGZZsYpvoXS5D5QTWPieo1jjLdAm3TBP3cQ==", + "version": "2.1.27", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.27.tgz", + "integrity": "sha512-JIhqnCasI9yD+SsmkquHBxTSEuZdQX5BuQnS2Vc7puQQQ+8yiP5AY5uWhpdv4YL4VM5c6iliiYWPgJ/nJQLp7w==", "dev": true, "requires": { - "mime-db": "1.40.0" + "mime-db": "1.44.0" } }, - "mimic-fn": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-2.1.0.tgz", - "integrity": "sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==", - "dev": true - }, "minimatch": { "version": "3.0.4", "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", @@ -3552,9 +4972,9 @@ } }, "minimist": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", - "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=", + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz", + "integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==", "dev": true }, "mixin-deep": { @@ -3594,20 +5014,12 @@ } }, "mkdirp": { - "version": "0.5.1", - "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz", - "integrity": "sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM=", + "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, "requires": { - "minimist": "0.0.8" - }, - "dependencies": { - "minimist": { - "version": "0.0.8", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz", - "integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0=", - "dev": true - } + "minimist": "^1.2.5" } }, "ms": { @@ -3617,9 +5029,9 @@ "dev": true }, "nan": { - "version": "2.14.0", - "resolved": "https://registry.npmjs.org/nan/-/nan-2.14.0.tgz", - "integrity": "sha512-INOFj37C7k3AfaNTtX8RhsTw7qRy7eLET14cROi9+5HAVbbHuIWUHEauBv5qT4Av2tWasiTY1Jw6puUNqRJXQg==", + "version": "2.14.2", + "resolved": "https://registry.npmjs.org/nan/-/nan-2.14.2.tgz", + "integrity": "sha512-M2ufzIiINKCuDfBSAUr1vWQ+vuVcA9kqx8JJUsbQi6yf1uGRyb7HfpdfUr5qLXf3B/t8dPvcjhKMmlfnP47EzQ==", "dev": true, "optional": true }, @@ -3648,12 +5060,6 @@ "integrity": "sha1-Sr6/7tdUHywnrPspvbvRXI1bpPc=", "dev": true }, - "neo-async": { - "version": "2.6.1", - "resolved": "https://registry.npmjs.org/neo-async/-/neo-async-2.6.1.tgz", - "integrity": "sha512-iyam8fBuCUpWeKPGpaNMetEocMt364qkCsfL9JuhjXX6dRnguRVOfk2GZaDpPjcOKiiXCPINZC1GczQ7iTq3Zw==", - "dev": true - }, "nice-try": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/nice-try/-/nice-try-1.0.5.tgz", @@ -3673,9 +5079,9 @@ "dev": true }, "node-notifier": { - "version": "5.4.0", - "resolved": "https://registry.npmjs.org/node-notifier/-/node-notifier-5.4.0.tgz", - "integrity": "sha512-SUDEb+o71XR5lXSTyivXd9J7fCloE3SyP4lSgt3lU2oSANiox+SxlNRGPjDKrwU1YN3ix2KN/VGGCg0t01rttQ==", + "version": "5.4.3", + "resolved": "https://registry.npmjs.org/node-notifier/-/node-notifier-5.4.3.tgz", + "integrity": "sha512-M4UBGcs4jeOK9CjTsYwkvH6/MzuUmGCyTW+kCY7uO+1ZVr0+FHGdPdIf5CCLqAaxnRrWidyoQlNkMIIVwbKB8Q==", "dev": true, "requires": { "growly": "^1.3.0", @@ -3683,14 +5089,6 @@ "semver": "^5.5.0", "shellwords": "^0.1.1", "which": "^1.3.0" - }, - "dependencies": { - "semver": { - "version": "5.7.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.0.tgz", - "integrity": "sha512-Ya52jSX2u7QKghxeoFGpLwCtGlt7j0oY9DYb5apt9nPlJ42ID+ulTXESnt/qAQcoSERyZ5sl3LDIOw0nAn/5DA==", - "dev": true - } } }, "normalize-package-data": { @@ -3703,14 +5101,6 @@ "resolve": "^1.10.0", "semver": "2 || 3 || 4 || 5", "validate-npm-package-license": "^3.0.1" - }, - "dependencies": { - "semver": { - "version": "5.7.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.0.tgz", - "integrity": "sha512-Ya52jSX2u7QKghxeoFGpLwCtGlt7j0oY9DYb5apt9nPlJ42ID+ulTXESnt/qAQcoSERyZ5sl3LDIOw0nAn/5DA==", - "dev": true - } } }, "normalize-path": { @@ -3731,16 +5121,10 @@ "path-key": "^2.0.0" } }, - "number-is-nan": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/number-is-nan/-/number-is-nan-1.0.1.tgz", - "integrity": "sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0=", - "dev": true - }, "nwsapi": { - "version": "2.1.4", - "resolved": "https://registry.npmjs.org/nwsapi/-/nwsapi-2.1.4.tgz", - "integrity": "sha512-iGfd9Y6SFdTNldEy2L0GUhcarIutFmk+MPWIn9dmj8NMIup03G08uUF2KGbbmv/Ux4RT0VZJoP/sVbWA6d/VIw==", + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/nwsapi/-/nwsapi-2.2.0.tgz", + "integrity": "sha512-h2AatdwYH+JHiZpv7pt/gSX1XoRGb7L/qSIeuqA6GwYoF9w1vP1cw42TO0aI2pNyshRK5893hNSl+1//vHK7hQ==", "dev": true }, "oauth-sign": { @@ -3839,63 +5223,20 @@ "wrappy": "1" } }, - "optimist": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/optimist/-/optimist-0.6.1.tgz", - "integrity": "sha1-2j6nRob6IaGaERwybpDrFaAZZoY=", - "dev": true, - "requires": { - "minimist": "~0.0.1", - "wordwrap": "~0.0.2" - }, - "dependencies": { - "minimist": { - "version": "0.0.10", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.10.tgz", - "integrity": "sha1-3j+YVD2/lggr5IrRoMfNqDYwHc8=", - "dev": true - } - } - }, "optionator": { - "version": "0.8.2", - "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.8.2.tgz", - "integrity": "sha1-NkxeQJ0/TWMB1sC0wFu6UBgK62Q=", + "version": "0.8.3", + "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.8.3.tgz", + "integrity": "sha512-+IW9pACdk3XWmmTXG8m3upGUJst5XRGzxMRjXzAuJ1XnIFNvfhjjIuYkDvysnPQ7qzqVzLt78BCruntqRhWQbA==", "dev": true, "requires": { "deep-is": "~0.1.3", - "fast-levenshtein": "~2.0.4", + "fast-levenshtein": "~2.0.6", "levn": "~0.3.0", "prelude-ls": "~1.1.2", "type-check": "~0.3.2", - "wordwrap": "~1.0.0" - }, - "dependencies": { - "wordwrap": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-1.0.0.tgz", - "integrity": "sha1-J1hIEIkUVqQXHI0CJkQa3pDLyus=", - "dev": true - } + "word-wrap": "~1.2.3" } }, - "os-locale": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/os-locale/-/os-locale-3.1.0.tgz", - "integrity": "sha512-Z8l3R4wYWM40/52Z+S265okfFj8Kt2cC2MKY+xNi3kFs+XGI7WXu/I309QQQYbRW4ijiZ+yxs9pqEhJh0DqW3Q==", - "dev": true, - "requires": { - "execa": "^1.0.0", - "lcid": "^2.0.0", - "mem": "^4.0.0" - } - }, - "p-defer": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/p-defer/-/p-defer-1.0.0.tgz", - "integrity": "sha1-n26xgvbJqozXQwBKfU+WsZaw+ww=", - "dev": true - }, "p-each-series": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/p-each-series/-/p-each-series-1.0.0.tgz", @@ -3911,12 +5252,6 @@ "integrity": "sha1-P7z7FbiZpEEjs0ttzBi3JDNqLK4=", "dev": true }, - "p-is-promise": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/p-is-promise/-/p-is-promise-2.1.0.tgz", - "integrity": "sha512-Y3W0wlRPK8ZMRbNq97l4M5otioeA5lm1z7bkNkxCka8HSPjR0xRWmpCmc9utiaLP9Jb1eD8BgeIxTW4AIF45Pg==", - "dev": true - }, "p-limit": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.2.0.tgz", @@ -4008,6 +5343,12 @@ "integrity": "sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns=", "dev": true }, + "picomatch": { + "version": "2.2.2", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.2.2.tgz", + "integrity": "sha512-q0M/9eZHzmr0AulXyPwNfZjtwZ/RBZlbN3K3CErVrk50T2ASYI7Bye0EvekFY3IP1Nt2DHu0re+V2ZHIpMkuWg==", + "dev": true + }, "pify": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", @@ -4053,26 +5394,10 @@ "react-is": "^16.8.4" } }, - "process-nextick-args": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz", - "integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==", - "dev": true - }, - "prompts": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/prompts/-/prompts-2.1.0.tgz", - "integrity": "sha512-+x5TozgqYdOwWsQFZizE/Tra3fKvAoy037kOyU6cgz84n8f6zxngLOV4O32kTwt9FcLCxAqw0P/c8rOr9y+Gfg==", - "dev": true, - "requires": { - "kleur": "^3.0.2", - "sisteransi": "^1.0.0" - } - }, "psl": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/psl/-/psl-1.3.0.tgz", - "integrity": "sha512-avHdspHO+9rQTLbv1RO+MPYeP/SzsCoxofjVnHanETfQhTJrmB0HlDoW+EiN/R+C0BZ+gERab9NY0lPN2TxNag==", + "version": "1.8.0", + "resolved": "https://registry.npmjs.org/psl/-/psl-1.8.0.tgz", + "integrity": "sha512-RIdOzyoavK+hA18OGGWDqUTsCLhtA7IcZ/6NCs4fFJaHBDab+pDDmDIByWFRQJq2Cd7r1OoQxBGKOaztq+hjIQ==", "dev": true }, "pump": { @@ -4103,6 +5428,17 @@ "integrity": "sha512-aUk3bHfZ2bRSVFFbbeVS4i+lNPZr3/WM5jT2J5omUVV1zzcs1nAaf3l51ctA5FFvCRbhrH0bdAsRRQddFJZPtA==", "dev": true }, + "read-pkg": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-3.0.0.tgz", + "integrity": "sha1-nLxoaXj+5l0WwA4rGcI3/Pbjg4k=", + "dev": true, + "requires": { + "load-json-file": "^4.0.0", + "normalize-package-data": "^2.3.2", + "path-type": "^3.0.0" + } + }, "read-pkg-up": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-4.0.0.tgz", @@ -4111,34 +5447,6 @@ "requires": { "find-up": "^3.0.0", "read-pkg": "^3.0.0" - }, - "dependencies": { - "read-pkg": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-3.0.0.tgz", - "integrity": "sha1-nLxoaXj+5l0WwA4rGcI3/Pbjg4k=", - "dev": true, - "requires": { - "load-json-file": "^4.0.0", - "normalize-package-data": "^2.3.2", - "path-type": "^3.0.0" - } - } - } - }, - "readable-stream": { - "version": "2.3.6", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz", - "integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==", - "dev": true, - "requires": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.3", - "isarray": "~1.0.0", - "process-nextick-args": "~2.0.0", - "safe-buffer": "~5.1.1", - "string_decoder": "~1.1.1", - "util-deprecate": "~1.0.1" } }, "realpath-native": { @@ -4179,9 +5487,9 @@ "dev": true }, "request": { - "version": "2.88.0", - "resolved": "https://registry.npmjs.org/request/-/request-2.88.0.tgz", - "integrity": "sha512-NAqBSrijGLZdM0WZNsInLJpkJokL72XYjUpnB0iwsRgxh7dB6COrHnTBNwN0E+lHDAJzu7kLAkDeY08z2/A0hg==", + "version": "2.88.2", + "resolved": "https://registry.npmjs.org/request/-/request-2.88.2.tgz", + "integrity": "sha512-MsvtOrfG9ZcrOwAW+Qi+F6HbD0CWXEh9ou77uOb7FM2WPhwT7smM833PzanhJLsgXjN89Ir6V2PczXNnMpwKhw==", "dev": true, "requires": { "aws-sign2": "~0.7.0", @@ -4191,7 +5499,7 @@ "extend": "~3.0.2", "forever-agent": "~0.6.1", "form-data": "~2.3.2", - "har-validator": "~5.1.0", + "har-validator": "~5.1.3", "http-signature": "~1.2.0", "is-typedarray": "~1.0.0", "isstream": "~0.1.2", @@ -4201,45 +5509,27 @@ "performance-now": "^2.1.0", "qs": "~6.5.2", "safe-buffer": "^5.1.2", - "tough-cookie": "~2.4.3", + "tough-cookie": "~2.5.0", "tunnel-agent": "^0.6.0", "uuid": "^3.3.2" - }, - "dependencies": { - "punycode": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.4.1.tgz", - "integrity": "sha1-wNWmOycYgArY4esPpSachN1BhF4=", - "dev": true - }, - "tough-cookie": { - "version": "2.4.3", - "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.4.3.tgz", - "integrity": "sha512-Q5srk/4vDM54WJsJio3XNn6K2sCG+CQ8G5Wz6bZhRZoAe/+TxjWB/GlFAnYEbkYVlON9FMk/fE3h2RLpPXo4lQ==", - "dev": true, - "requires": { - "psl": "^1.1.24", - "punycode": "^1.4.1" - } - } } }, "request-promise-core": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/request-promise-core/-/request-promise-core-1.1.2.tgz", - "integrity": "sha512-UHYyq1MO8GsefGEt7EprS8UrXsm1TxEvFUX1IMTuSLU2Rh7fTIdFtl8xD7JiEYiWU2dl+NYAjCTksTehQUxPag==", + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/request-promise-core/-/request-promise-core-1.1.4.tgz", + "integrity": "sha512-TTbAfBBRdWD7aNNOoVOBH4pN/KigV6LyapYNNlAPA8JwbovRti1E88m3sYAwsLi5ryhPKsE9APwnjFTgdUjTpw==", "dev": true, "requires": { - "lodash": "^4.17.11" + "lodash": "^4.17.19" } }, "request-promise-native": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/request-promise-native/-/request-promise-native-1.0.7.tgz", - "integrity": "sha512-rIMnbBdgNViL37nZ1b3L/VfPOpSi0TqVDQPAvO6U14lMzOLrt5nilxCQqtDKhZeDiW0/hkCXGoQjhgJd/tCh6w==", + "version": "1.0.9", + "resolved": "https://registry.npmjs.org/request-promise-native/-/request-promise-native-1.0.9.tgz", + "integrity": "sha512-wcW+sIUiWnKgNY0dqCpOZkUbF/I+YPi+f09JZIDa39Ec+q82CpSYniDp+ISgTTbKmnpJWASeJBPZmoxH84wt3g==", "dev": true, "requires": { - "request-promise-core": "1.1.2", + "request-promise-core": "1.1.4", "stealthy-require": "^1.1.1", "tough-cookie": "^2.3.3" } @@ -4293,9 +5583,9 @@ "dev": true }, "rimraf": { - "version": "2.6.3", - "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.6.3.tgz", - "integrity": "sha512-mwqeW5XsA2qAejG46gYdENaxXjx9onRNCfn7L0duuP4hCuTIi/QO7PDK07KJfp1d+izWPrzEJDcSqBa0OZQriA==", + "version": "2.7.1", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.7.1.tgz", + "integrity": "sha512-uWjbaKIK3T1OSVptzX7Nl6PvQ3qAGtKEtVRjRuazjfL3Bx5eI409VZSqgND+4UNnmzLVdPj9FqFJNPqBZFve4w==", "dev": true, "requires": { "glob": "^7.1.3" @@ -4352,9 +5642,9 @@ "dev": true }, "semver": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", - "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", + "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", "dev": true }, "set-blocking": { @@ -4423,15 +5713,21 @@ "dev": true }, "signal-exit": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.2.tgz", - "integrity": "sha1-tf3AjxKH6hF4Yo5BXiUTK3NkbG0=", + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.3.tgz", + "integrity": "sha512-VUJ49FC8U1OxwZLxIbTTrDvLnf/6TDgxZcK8wxR8zs13xpx7xbG60ndBlhNrFi2EMuFRoeDoJO7wthSLq42EjA==", "dev": true }, "sisteransi": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/sisteransi/-/sisteransi-1.0.2.tgz", - "integrity": "sha512-ZcYcZcT69nSLAR2oLN2JwNmLkJEKGooFMCdvOkFrToUt/WfcRWqhIg4P4KwY4dmLbuyXIx4o4YmPsvMRJYJd/w==", + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/sisteransi/-/sisteransi-1.0.5.tgz", + "integrity": "sha512-bLGGlR1QxBcynn2d5YmDX4MGjlZvy2MRBDRNHLJ8VI6l6+9FUiyTFNJ0IveOSP0bcXgVDPRcfGqA0pjaqUpfVg==", + "dev": true + }, + "slash": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/slash/-/slash-2.0.0.tgz", + "integrity": "sha512-ZYKh3Wh2z1PpEXWr0MpSBZ0V6mZHAQfYevttO11c51CaWjGTaadiKZ+wVt1PbMlDV5qhMFslpZCemhwOK7C89A==", "dev": true }, "snapdragon": { @@ -4573,9 +5869,9 @@ } }, "source-map-support": { - "version": "0.5.13", - "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.13.tgz", - "integrity": "sha512-SHSKFHadjVA5oR4PPqhtAVdcBWwRYVd6g6cAXnIbRiIwc2EhPrTuKUBdSLvlEKyIP3GCf89fltvcZiP9MMFA1w==", + "version": "0.5.19", + "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.19.tgz", + "integrity": "sha512-Wonm7zOCIJzBGQdB+thsPar0kYuCIzYvxZwlBa87yi/Mdjv7Tip2cyVbLj5o0cFPN4EVkuTwb3GDDyUx2DGnGw==", "dev": true, "requires": { "buffer-from": "^1.0.0", @@ -4589,9 +5885,9 @@ "dev": true }, "spdx-correct": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/spdx-correct/-/spdx-correct-3.1.0.tgz", - "integrity": "sha512-lr2EZCctC2BNR7j7WzJ2FpDznxky1sjfxvvYEyzxNyb6lZXHODmEoJeFu4JupYlkfha1KZpJyoqiJ7pgA1qq8Q==", + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/spdx-correct/-/spdx-correct-3.1.1.tgz", + "integrity": "sha512-cOYcUWwhCuHCXi49RhFRCyJEK3iPj1Ziz9DpViV3tbZOwXD49QzIN3MpOLJNxh2qwq2lJJZaKMVw9qNi4jTC0w==", "dev": true, "requires": { "spdx-expression-parse": "^3.0.0", @@ -4599,15 +5895,15 @@ } }, "spdx-exceptions": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/spdx-exceptions/-/spdx-exceptions-2.2.0.tgz", - "integrity": "sha512-2XQACfElKi9SlVb1CYadKDXvoajPgBVPn/gOQLrTvHdElaVhr7ZEbqJaRnJLVNeaI4cMEAgVCeBMKF6MWRDCRA==", + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/spdx-exceptions/-/spdx-exceptions-2.3.0.tgz", + "integrity": "sha512-/tTrYOC7PPI1nUAgx34hUpqXuyJG+DTHJTnIULG4rDygi4xu/tfgmq1e1cIRwRzwZgo4NLySi+ricLkZkw4i5A==", "dev": true }, "spdx-expression-parse": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/spdx-expression-parse/-/spdx-expression-parse-3.0.0.tgz", - "integrity": "sha512-Yg6D3XpRD4kkOmTpdgbUiEJFKghJH03fiC1OPll5h/0sO6neh2jqRDVHOQ4o/LMea0tgCkbMgea5ip/e+MkWyg==", + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/spdx-expression-parse/-/spdx-expression-parse-3.0.1.tgz", + "integrity": "sha512-cbqHunsQWnJNE6KhVSMsMeH5H/L9EpymbzqTQ3uLwNCLZ1Q481oWaofqH7nO6V07xlXwY6PhQdQ2IedWx/ZK4Q==", "dev": true, "requires": { "spdx-exceptions": "^2.1.0", @@ -4615,9 +5911,9 @@ } }, "spdx-license-ids": { - "version": "3.0.5", - "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.5.tgz", - "integrity": "sha512-J+FWzZoynJEXGphVIS+XEh3kFSjZX/1i9gFBaWQcB+/tmpe2qUsSBABpcxqxnAxFdiUFEgAX1bjYGQvIZmoz9Q==", + "version": "3.0.6", + "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.6.tgz", + "integrity": "sha512-+orQK83kyMva3WyPf59k1+Y525csj5JejicWut55zeTWANuN17qSiSLUXWtzHeNWORSvT7GLDJ/E/XiIWoXBTw==", "dev": true }, "split-string": { @@ -4707,39 +6003,14 @@ } }, "string-width": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz", - "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==", + "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, "requires": { + "emoji-regex": "^7.0.1", "is-fullwidth-code-point": "^2.0.0", - "strip-ansi": "^4.0.0" - }, - "dependencies": { - "ansi-regex": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", - "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=", - "dev": true - }, - "strip-ansi": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", - "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", - "dev": true, - "requires": { - "ansi-regex": "^3.0.0" - } - } - } - }, - "string_decoder": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", - "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", - "dev": true, - "requires": { - "safe-buffer": "~5.1.0" + "strip-ansi": "^5.1.0" } }, "strip-ansi": { @@ -4876,42 +6147,242 @@ "dev": true }, "ts-jest": { - "version": "24.0.2", - "resolved": "https://registry.npmjs.org/ts-jest/-/ts-jest-24.0.2.tgz", - "integrity": "sha512-h6ZCZiA1EQgjczxq+uGLXQlNgeg02WWJBbeT8j6nyIBRQdglqbvzDoHahTEIiS6Eor6x8mK6PfZ7brQ9Q6tzHw==", + "version": "26.4.4", + "resolved": "https://registry.npmjs.org/ts-jest/-/ts-jest-26.4.4.tgz", + "integrity": "sha512-3lFWKbLxJm34QxyVNNCgXX1u4o/RV0myvA2y2Bxm46iGIjKlaY0own9gIckbjZJPn+WaJEnfPPJ20HHGpoq4yg==", "dev": true, "requires": { + "@types/jest": "26.x", "bs-logger": "0.x", "buffer-from": "1.x", "fast-json-stable-stringify": "2.x", + "jest-util": "^26.1.0", "json5": "2.x", + "lodash.memoize": "4.x", "make-error": "1.x", - "mkdirp": "0.x", - "resolve": "1.x", - "semver": "^5.5", - "yargs-parser": "10.x" + "mkdirp": "1.x", + "semver": "7.x", + "yargs-parser": "20.x" }, "dependencies": { - "camelcase": { + "@jest/types": { + "version": "26.6.2", + "resolved": "https://registry.npmjs.org/@jest/types/-/types-26.6.2.tgz", + "integrity": "sha512-fC6QCp7Sc5sX6g8Tvbmj4XUTbyrik0akgRy03yjXbQaBWWNWGE7SGtJk98m0N8nzegD/7SggrUlivxo5ax4KWQ==", + "dev": true, + "requires": { + "@types/istanbul-lib-coverage": "^2.0.0", + "@types/istanbul-reports": "^3.0.0", + "@types/node": "*", + "@types/yargs": "^15.0.0", + "chalk": "^4.0.0" + } + }, + "@types/istanbul-reports": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/@types/istanbul-reports/-/istanbul-reports-3.0.0.tgz", + "integrity": "sha512-nwKNbvnwJ2/mndE9ItP/zc2TCzw6uuodnF4EHYWD+gCQDVBuRQL5UzbZD0/ezy1iKsFU2ZQiDqg4M9dN4+wZgA==", + "dev": true, + "requires": { + "@types/istanbul-lib-report": "*" + } + }, + "@types/jest": { + "version": "26.0.15", + "resolved": "https://registry.npmjs.org/@types/jest/-/jest-26.0.15.tgz", + "integrity": "sha512-s2VMReFXRg9XXxV+CW9e5Nz8fH2K1aEhwgjUqPPbQd7g95T0laAcvLv032EhFHIa5GHsZ8W7iJEQVaJq6k3Gog==", + "dev": true, + "requires": { + "jest-diff": "^26.0.0", + "pretty-format": "^26.0.0" + } + }, + "@types/yargs": { + "version": "15.0.9", + "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-15.0.9.tgz", + "integrity": "sha512-HmU8SeIRhZCWcnRskCs36Q1Q00KBV6Cqh/ora8WN1+22dY07AZdn6Gel8QZ3t26XYPImtcL8WV/eqjhVmMEw4g==", + "dev": true, + "requires": { + "@types/yargs-parser": "*" + } + }, + "ansi-regex": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.0.tgz", + "integrity": "sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg==", + "dev": true + }, + "ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "requires": { + "color-convert": "^2.0.1" + } + }, + "braces": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", + "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", + "dev": true, + "requires": { + "fill-range": "^7.0.1" + } + }, + "chalk": { "version": "4.1.0", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-4.1.0.tgz", - "integrity": "sha1-1UVjW+HjPFQmScaRc+Xeas+uNN0=", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.0.tgz", + "integrity": "sha512-qwx12AxXe2Q5xQ43Ac//I6v5aXTipYrSESdOgzrN+9XjgEpyjpKuvSGaN4qE93f7TQTlerQQ8S+EQ0EyDoVL1A==", + "dev": true, + "requires": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + } + }, + "color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "requires": { + "color-name": "~1.1.4" + } + }, + "color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true + }, + "diff-sequences": { + "version": "26.6.2", + "resolved": "https://registry.npmjs.org/diff-sequences/-/diff-sequences-26.6.2.tgz", + "integrity": "sha512-Mv/TDa3nZ9sbc5soK+OoA74BsS3mL37yixCvUAQkiuA4Wz6YtwP/K47n2rv2ovzHZvoiQeA5FTQOschKkEwB0Q==", + "dev": true + }, + "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, + "requires": { + "to-regex-range": "^5.0.1" + } + }, + "graceful-fs": { + "version": "4.2.4", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.4.tgz", + "integrity": "sha512-WjKPNJF79dtJAVniUlGGWHYGz2jWxT6VhN/4m1NdkbZ2nOsEF+cI1Edgql5zCRhs/VsQYRvrXctxktVXZUkixw==", + "dev": true + }, + "has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true + }, + "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 + }, + "jest-diff": { + "version": "26.6.2", + "resolved": "https://registry.npmjs.org/jest-diff/-/jest-diff-26.6.2.tgz", + "integrity": "sha512-6m+9Z3Gv9wN0WFVasqjCL/06+EFCMTqDEUl/b87HYK2rAPTyfz4ZIuSlPhY51PIQRWx5TaxeF1qmXKe9gfN3sA==", + "dev": true, + "requires": { + "chalk": "^4.0.0", + "diff-sequences": "^26.6.2", + "jest-get-type": "^26.3.0", + "pretty-format": "^26.6.2" + } + }, + "jest-get-type": { + "version": "26.3.0", + "resolved": "https://registry.npmjs.org/jest-get-type/-/jest-get-type-26.3.0.tgz", + "integrity": "sha512-TpfaviN1R2pQWkIihlfEanwOXK0zcxrKEE4MlU6Tn7keoXdN6/3gK/xl0yEh8DOunn5pOVGKf8hB4R9gVh04ig==", + "dev": true + }, + "jest-util": { + "version": "26.6.2", + "resolved": "https://registry.npmjs.org/jest-util/-/jest-util-26.6.2.tgz", + "integrity": "sha512-MDW0fKfsn0OI7MS7Euz6h8HNDXVQ0gaM9uW6RjfDmd1DAFcaxX9OqIakHIqhbnmF08Cf2DLDG+ulq8YQQ0Lp0Q==", + "dev": true, + "requires": { + "@jest/types": "^26.6.2", + "@types/node": "*", + "chalk": "^4.0.0", + "graceful-fs": "^4.2.4", + "is-ci": "^2.0.0", + "micromatch": "^4.0.2" + } + }, + "micromatch": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.2.tgz", + "integrity": "sha512-y7FpHSbMUMoyPbYUSzO6PaZ6FyRnQOpHuKwbo1G+Knck95XVU4QAiKdGEnj5wwoS7PlOgthX/09u5iFJ+aYf5Q==", + "dev": true, + "requires": { + "braces": "^3.0.1", + "picomatch": "^2.0.5" + } + }, + "mkdirp": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-1.0.4.tgz", + "integrity": "sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==", + "dev": true + }, + "pretty-format": { + "version": "26.6.2", + "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-26.6.2.tgz", + "integrity": "sha512-7AeGuCYNGmycyQbCqd/3PWH4eOoX/OiCa0uphp57NVTeAGdJGaAliecxwBDHYQCIvrW7aDBZCYeNTP/WX69mkg==", + "dev": true, + "requires": { + "@jest/types": "^26.6.2", + "ansi-regex": "^5.0.0", + "ansi-styles": "^4.0.0", + "react-is": "^17.0.1" + } + }, + "react-is": { + "version": "17.0.1", + "resolved": "https://registry.npmjs.org/react-is/-/react-is-17.0.1.tgz", + "integrity": "sha512-NAnt2iGDXohE5LI7uBnLnqvLQMtzhkiAOLXTmv+qnF9Ky7xAPcX8Up/xWIhxvLVGJvuLiNc4xQLtuqDRzb4fSA==", "dev": true }, "semver": { - "version": "5.7.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.0.tgz", - "integrity": "sha512-Ya52jSX2u7QKghxeoFGpLwCtGlt7j0oY9DYb5apt9nPlJ42ID+ulTXESnt/qAQcoSERyZ5sl3LDIOw0nAn/5DA==", + "version": "7.3.2", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.2.tgz", + "integrity": "sha512-OrOb32TeeambH6UrhtShmF7CRDqhL6/5XpPNp2DuRH6+9QLw/orhp72j87v8Qa1ScDkvrrBNpZcDejAirJmfXQ==", "dev": true }, - "yargs-parser": { - "version": "10.1.0", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-10.1.0.tgz", - "integrity": "sha512-VCIyR1wJoEBZUqk5PA+oOBF6ypbwh5aNB3I50guxAL/quggdfs4TtNHQrSazFA3fYZ+tEqfs0zIGlv0c/rgjbQ==", + "supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dev": true, + "requires": { + "has-flag": "^4.0.0" + } + }, + "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, "requires": { - "camelcase": "^4.1.0" + "is-number": "^7.0.0" } + }, + "yargs-parser": { + "version": "20.2.4", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.4.tgz", + "integrity": "sha512-WOkpgNhPTlE73h4VFAFsOnomJVaovO8VqLDzy5saChRBFQFBoMYirowyW+Q9HB4HFF4Z7VZTiG3iSzJJA29yRA==", + "dev": true } } }, @@ -4945,17 +6416,6 @@ "integrity": "sha512-ACzBtm/PhXBDId6a6sDJfroT2pOWt/oOnk4/dElG5G33ZL776N3Y6/6bKZJBFpd+b05F3Ct9qDjMeJmRWtE2/g==", "dev": true }, - "uglify-js": { - "version": "3.6.8", - "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.6.8.tgz", - "integrity": "sha512-XhHJ3S3ZyMwP8kY1Gkugqx3CJh2C3O0y8NPiSxtm1tyD/pktLAkFZsFGpuNfTZddKDQ/bbDBLAd2YyA1pbi8HQ==", - "dev": true, - "optional": true, - "requires": { - "commander": "~2.20.3", - "source-map": "~0.6.1" - } - }, "union-value": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/union-value/-/union-value-1.0.1.tgz", @@ -5015,9 +6475,9 @@ } }, "uri-js": { - "version": "4.2.2", - "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.2.2.tgz", - "integrity": "sha512-KY9Frmirql91X2Qgjry0Wd4Y+YTdrdZheS8TFwvkbLWf/G5KNJDCh6pKL5OZctEW4+0Baa5idK2ZQuELRwPznQ==", + "version": "4.4.0", + "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.0.tgz", + "integrity": "sha512-B0yRTzYdUCCn9n+F4+Gh4yIDtMQcaJsmYBDsTSG8g/OejKBodLQ2IHfN3bM7jUsRXndopT7OIXWdYqc1fjmV6g==", "dev": true, "requires": { "punycode": "^2.1.0" @@ -5035,12 +6495,6 @@ "integrity": "sha512-cwESVXlO3url9YWlFW/TA9cshCEhtu7IKJ/p5soJ/gGpj7vbvFrAY/eIioQ6Dw23KjZhYgiIo8HOs1nQ2vr/oQ==", "dev": true }, - "util-deprecate": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", - "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=", - "dev": true - }, "util.promisify": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/util.promisify/-/util.promisify-1.0.0.tgz", @@ -5052,9 +6506,9 @@ } }, "uuid": { - "version": "3.3.2", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.3.2.tgz", - "integrity": "sha512-yXJmeNaw3DnnKAOKJE51sL/ZaYfWJRl1pK9dr19YFCu0ObS231AB1/LbqTKRAQ5kw8A90rA6fr4riOUpTZvQZA==", + "version": "3.4.0", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.4.0.tgz", + "integrity": "sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A==", "dev": true }, "validate-npm-package-license": { @@ -5079,12 +6533,12 @@ } }, "w3c-hr-time": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/w3c-hr-time/-/w3c-hr-time-1.0.1.tgz", - "integrity": "sha1-gqwr/2PZUOqeMYmlimViX+3xkEU=", + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/w3c-hr-time/-/w3c-hr-time-1.0.2.tgz", + "integrity": "sha512-z8P5DvDNjKDoFIHK7q8r8lackT6l+jo/Ye3HOle7l9nICP9lf1Ci25fy9vHd0JOWewkIFzXIEig3TdKT7JQ5fQ==", "dev": true, "requires": { - "browser-process-hrtime": "^0.1.2" + "browser-process-hrtime": "^1.0.0" } }, "walker": { @@ -5143,57 +6597,21 @@ "integrity": "sha1-2e8H3Od7mQK4o6j6SzHD4/fm6Ho=", "dev": true }, - "wordwrap": { - "version": "0.0.3", - "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-0.0.3.tgz", - "integrity": "sha1-o9XabNXAvAAI03I0u68b7WMFkQc=", + "word-wrap": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.3.tgz", + "integrity": "sha512-Hz/mrNwitNRh/HUAtM/VT/5VH+ygD6DV7mYKZAtHOrbs8U7lvPS6xf7EJKMF0uW1KJCl0H701g3ZGus+muE5vQ==", "dev": true }, "wrap-ansi": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-2.1.0.tgz", - "integrity": "sha1-2Pw9KE3QV5T+hJc8rs3Rz4JP3YU=", + "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, "requires": { - "string-width": "^1.0.1", - "strip-ansi": "^3.0.1" - }, - "dependencies": { - "ansi-regex": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", - "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=", - "dev": true - }, - "is-fullwidth-code-point": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz", - "integrity": "sha1-754xOG8DGn8NZDr4L95QxFfvAMs=", - "dev": true, - "requires": { - "number-is-nan": "^1.0.0" - } - }, - "string-width": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz", - "integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=", - "dev": true, - "requires": { - "code-point-at": "^1.0.0", - "is-fullwidth-code-point": "^1.0.0", - "strip-ansi": "^3.0.0" - } - }, - "strip-ansi": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", - "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", - "dev": true, - "requires": { - "ansi-regex": "^2.0.0" - } - } + "ansi-styles": "^3.2.0", + "string-width": "^3.0.0", + "strip-ansi": "^5.0.0" } }, "wrappy": { @@ -5235,37 +6653,27 @@ "dev": true }, "yargs": { - "version": "12.0.5", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-12.0.5.tgz", - "integrity": "sha512-Lhz8TLaYnxq/2ObqHDql8dX8CJi97oHxrjUcYtzKbbykPtVW9WB+poxI+NM2UIzsMgNCZTIf0AQwsjK5yMAqZw==", + "version": "13.3.2", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-13.3.2.tgz", + "integrity": "sha512-AX3Zw5iPruN5ie6xGRIDgqkT+ZhnRlZMLMHAs8tg7nRruy2Nb+i5o9bwghAogtM08q1dpr2LVoS8KSTMYpWXUw==", "dev": true, "requires": { - "cliui": "^4.0.0", - "decamelize": "^1.2.0", + "cliui": "^5.0.0", "find-up": "^3.0.0", - "get-caller-file": "^1.0.1", - "os-locale": "^3.0.0", + "get-caller-file": "^2.0.1", "require-directory": "^2.1.1", - "require-main-filename": "^1.0.1", + "require-main-filename": "^2.0.0", "set-blocking": "^2.0.0", - "string-width": "^2.0.0", + "string-width": "^3.0.0", "which-module": "^2.0.0", - "y18n": "^3.2.1 || ^4.0.0", - "yargs-parser": "^11.1.1" - }, - "dependencies": { - "require-main-filename": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-1.0.1.tgz", - "integrity": "sha1-l/cXtp1IeE9fUmpsWqj/3aBVpNE=", - "dev": true - } + "y18n": "^4.0.0", + "yargs-parser": "^13.1.2" } }, "yargs-parser": { - "version": "11.1.1", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-11.1.1.tgz", - "integrity": "sha512-C6kB/WJDiaxONLJQnF8ccx9SEeoTTLek8RVbaOIsrAUS8VrBEXfmeSnCZxygc+XC2sNMBIwOOnfcxiynjHsVSQ==", + "version": "13.1.2", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-13.1.2.tgz", + "integrity": "sha512-3lbsNRf/j+A4QuSZfDRA7HRSfWrzO0YjqTJd5kjAq37Zep1CEgaYmrH9Q3GwPiB9cHyd1Y1UwggGhJGoxipbzg==", "dev": true, "requires": { "camelcase": "^5.0.0", diff --git a/package.json b/package.json index 5b307bc48..6352e85b5 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "sign-android-release", - "version": "1.0.2", + "version": "1.0.3", "private": true, "description": "GitHub action used to sign Android release packages", "main": "lib/main.js", @@ -21,16 +21,16 @@ "author": "r0adkll", "license": "MIT", "dependencies": { - "@actions/core": "^1.0.0", - "@actions/exec": "^1.0.1", - "@actions/io": "^1.0.1" + "@actions/core": "^1.2.6", + "@actions/exec": "^1.0.4", + "@actions/io": "^1.0.2" }, "devDependencies": { "@types/jest": "^24.0.13", "@types/node": "^12.0.4", "jest": "^24.8.0", "jest-circus": "^24.7.1", - "ts-jest": "^24.0.2", + "ts-jest": "^26.4.4", "typescript": "^3.5.1" } }